How do I see backorder items that have been invoiced but not shipped? |
Author |
Message |
|
Posted : 2007-06-30 00:18:02 |
Could someone kindly provide me with a sample, or is there a stored procedure that would allow me to only pull out back ordered invoices from the invoice table? |
|
|
|
Tom |
|
Group | : Administrator |
Posts | : 5510 |
Joined | : 2006-02-17 |
|
Profile |
|
Posted : 2007-06-30 21:22:36 |
Please clarify want you mean? Are you asking which invoice lines are from Sales Orders or are you asking which invoice lines have purchase order lines? |
|
|
|
|
Posted : 2007-07-01 00:59:43 |
Ok Well right now if a customer orders some items, we create an invoice. Then if some things are back ordered, when the packing slip is created it shows they were not sent out, and that item is back ordered. I was looking for a query or a SP that would show me only invoices that have not been completely shipped or just all the items on back order. |
|
|
|
Tom |
|
Group | : Administrator |
Posts | : 5510 |
Joined | : 2006-02-17 |
|
Profile |
|
Posted : 2007-07-01 11:38:32 |
Ok, I think that's shown in invoice lines that don't have a ship date. Try:
SELECT * FROM invoiceline where Shipdate is null |
|
|
|
|
Posted : 2007-07-01 11:52:55 |
So really I should be able to use a simple innerjoin statement to pull the invoices out that are associated with invoice lines that have not been shipped. perfect thank you much I will let you know if it works. |
|
|
|
|
Posted : 2007-07-05 22:48:22 |
Unfortunately SELECT * FROM invoiceline where Shipdate is null does not work. |
|
|
|
Tom |
|
Group | : Administrator |
Posts | : 5510 |
Joined | : 2006-02-17 |
|
Profile |
|
Posted : 2007-07-06 08:08:02 |
All you really need to do is use the ItemInventory table to pick up the quantity on hand and compare it with the ordered quantity ordered and invoiced to date (invoiced or not) and call the column "Qty to Pick".
Something along the lines of:
SELECT SalesOrderLine.SalesOrderLIneItemRefFullName as Type, SalesOrderLine.TxnDate as Date, SalesOrderLine.DueDate, SalesOrderLine.RefNumber as Num, SalesOrderLine.CustomerRefFullName as Name, SalesOrderLine.SalesOrderLineQuantity as "Qty Ordered", SalesOrderLine.SalesOrderLineInvoiced as "Qty Invoiced", (SalesOrderLine.SalesOrderLineQuantity - SalesOrderLine.SalesOrderLineInvoiced) as "Qty to Pick", ItemInventory.QuantityOnHand as "Qty Available", ItemInventory.QuantityOnOrder as "Qty on Back Order" FROM SalesOrderLine, ItemInventory where SalesOrderLine.SalesOrderLineItemRefListID = ItemInventory.ListID and SalesOrderLine.IsFullyInvoiced = FALSE and SalesOrderLine.SalesOrderLineInvoiced < SalesOrderLine.SalesOrderLineQuantity
|
|
|
|