RE: Get sum of orders - both open and released based on locationcode
Hello,
It sounds like you're looking to do a Sales Booked report that has all open Sales Order lines plus what has already been Shipped/Invoiced for the same time period. This is a tricky report in NAV, but can be done a couple different ways.
If you typically create the invoice right when the item ships then you can make this report by combining two separate queries into one report (Sales Orders and Posted Sales Invoices).
--
The first step is to get the open Sales Order lines. You will use the two Sales tables:
[Sales Header]
[Sales Line]
When you sum the lines from the Sales Line table you must use the [Outstanding Amount] field; where the Document Type = 1 and the Status = Open or Released.
--
The second step is to get the Posted Sales Invoice lines. You will use the two Sales Invoice tables:
[Sales Invoice Header]
[Sales Invoice Line]
When you sum the lines from the Sale Invoice Line table use the [Amount Including VAT] field.
*Both the [Outstanding Amount] and [Amount Including VAT] fields include tax.