The company orders items from its Vendors because they do not carry stock
for 80% of their items. Here is what is currently done:
1. Orders come in each day.
2. If the order is ok, it is marked as "Paid" in the database.
3. A program is then run every day or every few days that does the following:
Sets an "Ordered" field to True and "Date_Ordered" field to that days date,
for those orders that were marked as "Paid" in step 2 above.
It then prints out a list of all the products that a particular Vendor stocks,
based on the date set above and if the product is already in stock:
(WHERE Date_Ordered = getdate() AND InStock = 0)
Vendor_1
Qty - - - - - - - - - Item
1 SS8787 - St. Joseph Medal
Engraving: Good Luck
3 SSJ899 - Table Crucifix
1 SSJ3331 - T-Shirt
Mens, Small, Blue
Vendor_2
Qty - - - - - - - - - Item
1 WWDE74545 - Holy Water
any product options
3 WWDe7683 - Candle
Vendor_3
........
Then faxes are sent to each Vendor to order the products.
I used Crystal Reports to do this and was able to have a new page for each Vendor and tons of formating options.
But all I really need is just a simple Report like the one above for now.
The problem I see is with the product options. I need to have any option(s)
that were selected for that product included on this list.
There is currently something in the Admin that produces almost what I want.
It is the Vendor email template (see attached) and could be used if I could
select the same rows based on the Vendor field. But I'm not sure where that SQL or script is in the code.
Any ideas/thoughts on how this can be done appreciated. Thanks