How to set reorder level

How to set reorder level

Postby viddz » Wed Feb 15, 2012 12:45 pm

I wanna set reorder level to stock table when quantity is @ 11kg in mysql , php database ? pls help me
User avatar
viddz
 
Posts: 45
Joined: Fri Aug 26, 2011 12:36 am
Cash on hand: 1,823.50
Location: Colombo

Invitations sent: 0
Registered friends: 0
Reputation point: 0
Lance Corporal

Re: How to set reorder level

Postby Saman » Wed Feb 15, 2012 5:27 pm

I wanna set reorder level to stock table when quantity is @ 11kg in mysql , php database ? pls help me

First of Welcome to ExpertCore !!!

This is really simple. Say you have items stored in a table named as 'item_table' with two fields as 'quantity' and ' reorder_level'. The you can program reorder level for each and every item on the database.

For example:
Code: Select all
item_id     item_desc                  quantity         reorder_level
A00001     Anchor butter 200g            10                 5
A00002     Sugar                          1000.5          11


I have taken your example to sugar. Current sugar quantity in-stock is 1000.5 Kg and the reorder level is set to 11 Kg.

You need to execute an SQL command as below to get the list of items which reached reorder level.

Code: Select all
SELECT * FROM item_table WHERE quantity <= reorder_level


Good luck!
User avatar
Saman
Support Team
Support Team
 
Posts: 812
Joined: Fri Jul 31, 2009 5:02 pm
Cash on hand: 152,553.20
Location: Mount Lavinia
Medals: 1
EC_Achievment (1)

Invitations sent: 44
Registered friends: 1
Reputation point: 37
Staff Sergeant

Re: How to set reorder level

Postby viddz » Wed Feb 29, 2012 5:00 am

Thanku very much saman.  :D  :D  :D It is very useful.
Can u pls xplain according to ur example how we can  just update table by amount like 10kg , 20kg like wise then i want to take the whole amount of stock. eg previous stock 1000kg , now um adding 10kg so the system should show 1010kg. Pls help me. Iam new to Php n mySql n um doing my first project these days.  Thnks in advance
User avatar
viddz
 
Posts: 45
Joined: Fri Aug 26, 2011 12:36 am
Cash on hand: 1,823.50
Location: Colombo

Invitations sent: 0
Registered friends: 0
Reputation point: 0
Lance Corporal

Re: How to set reorder level

Postby Saman » Wed Feb 29, 2012 9:47 am

Code: Select all
UPDATE item_table SET quantity=quantity+10 WHERE item_id=A00001
User avatar
Saman
Support Team
Support Team
 
Posts: 812
Joined: Fri Jul 31, 2009 5:02 pm
Cash on hand: 152,553.20
Location: Mount Lavinia
Medals: 1
EC_Achievment (1)

Invitations sent: 44
Registered friends: 1
Reputation point: 37
Staff Sergeant

Re: How to set reorder level

Postby viddz » Wed Feb 29, 2012 4:04 pm

thank u very much  :D . I never thought dat is so simple as u mentioned.  :o.
User avatar
viddz
 
Posts: 45
Joined: Fri Aug 26, 2011 12:36 am
Cash on hand: 1,823.50
Location: Colombo

Invitations sent: 0
Registered friends: 0
Reputation point: 0
Lance Corporal


Return to PHP & MySQL

Who is online

Users browsing this forum: No registered users and 1 guest

cron