Page 1 of 1

How to set reorder level

Posted: Wed Feb 15, 2012 6:15 pm
by viddz
I wanna set reorder level to stock table when quantity is @ 11kg in mysql , php database ? pls help me

Re: How to set reorder level

Posted: Wed Feb 15, 2012 10:57 pm
by Saman
I wanna set reorder level to stock table when quantity is @ 11kg in mysql , php database ? pls help me
First of Welcome to ROBOT.LK !!!

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!

Re: How to set reorder level

Posted: Wed Feb 29, 2012 10:30 am
by viddz
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

Re: How to set reorder level

Posted: Wed Feb 29, 2012 3:17 pm
by Saman

Code: Select all

UPDATE item_table SET quantity=quantity+10 WHERE item_id=A00001

Re: How to set reorder level

Posted: Wed Feb 29, 2012 9:34 pm
by viddz
thank u very much :D . I never thought dat is so simple as u mentioned. :o.