We have a script that is on the last phase. The last programmer did a great job but unfortunately is too busy to finish for us.
We already have the input of the form to the db complete...the last section is for when we receive info back from vendors then we can update fields and purchase items that were being quoted. I'll post the info and please ask any questions if needed. Attached is an image of how we need the below info to look.
Sort first by vendor then sub-sort by herb (w/ qty). Next to the vendor name we want to have their shipping terms & price breaks which will come from the vendor table.
Underneath that will be where we update the quote prices. If it's from herb it will have 3 fields for conventional, organic & price. If it's not an herb it will just have price. So once we get the email back we update the price and enter a ship date. When a user hits update it needs to:
A - enter info into updated_date and updated_user
B - change the status to Updated
C - update the cost and ship_date in quote_items
The above info is really basic but now......Then you see the items in red. which only a user with admin rights can see. This is where it gets trickier and cooler.
The admin will log in once all the fields have been updated and he will be required to check either purchase or remove on each line, enter a qty then hit the purchase button. When the button is hit it will need to:
A - enter Yes or No into purchased in quote_items (Yes if the purchased checkbox was checked and No if the remove was checked)
B - remove the info from the current page so the items can not be purchased again.
C - Enter in the db table po - id (auto), vendor_id, status (Purchased)
D - in po_items enter id, po_id, item (if an herb and we chose Organic enter the Alfalfa Leaf Powder - Organic), qty, unit_price (price from quote_items), line_total (qty times price)
So if i chose 2 items from one vendor then 2 lines would be entered into po_items.
E - emails the vendor so they know what we purchased and copies an email to us.
A quote can have multiple vendors & items tied to it BUT a po can have only one vendor with multiple items tied to it. That's why we need a purchase button under each vendor.
Once all the purchased buttons have been hit then admin can click complete which ends the quote by
A - changes the status to Complete
B - enter info into completed_date and completed_user
Please only serious bidders that can deliver in a timely manner.