cis12232004
Technical User
I created this formula to calculate the sum of the invoices for each inventory item. The invoice represents the inventory items that left the warehouse during a particular period.
if GroupName ({vr_10630.TranType}) = "IN" then
Sum ({@PStockQty}, {vr_10630.SiteID})
@PStockQty represents the amount taken from stock
vr_10630.SiteID represents the site the invoice pertains to (we have 2)
"IN" represents invoices.
This formula gives these results:
Site ID Total 28
IN
Invoice EACH -2 -2
Invoice EACH -4 -4
Invoice EACH -1 -1
Invoice EACH -1 -1
RC
Receipt EACH 40 40
IN
Invoice EACH -2 -2
Invoice EACH -2 -2
As you can see it is facturing in the receipt of 40 items when I don't want that. I just want the sum of all invoices and when there was no invoices processed for that ID, a want a result of zero.
Any ideas how I can do this?
if GroupName ({vr_10630.TranType}) = "IN" then
Sum ({@PStockQty}, {vr_10630.SiteID})
@PStockQty represents the amount taken from stock
vr_10630.SiteID represents the site the invoice pertains to (we have 2)
"IN" represents invoices.
This formula gives these results:
Site ID Total 28
IN
Invoice EACH -2 -2
Invoice EACH -4 -4
Invoice EACH -1 -1
Invoice EACH -1 -1
RC
Receipt EACH 40 40
IN
Invoice EACH -2 -2
Invoice EACH -2 -2
As you can see it is facturing in the receipt of 40 items when I don't want that. I just want the sum of all invoices and when there was no invoices processed for that ID, a want a result of zero.
Any ideas how I can do this?