0

unposted sales invoices from 2 companies

I am trying to pull unposted sales invoices from 2 different companies, but seem to be getting an issue, here is what I have.

I am filtering by document date so it sorts by document date.
C55=NL("filter","Sales Header","Document Date","No.","MT*|AT*","Shortcut Dimension 2 Code",$H$3,"+Document Date",$AA$6,"Company=","company 1")
D55=NL("filter","Sales Header","Document Date","No.","MT*|AT*","Shortcut Dimension 2 Code",$H$3,"+Document Date",$AA$6,"Company=","company 2")
E55=NL("rows",NP("Union",$C55,$D55))

This will now bring in the document no. which i need
F55=NL("filter","Sales Header","No.","No.","MT*|AT*","Shortcut Dimension 2 Code",$H$3,"+Document Date","@@"&$E$55,"Company=","company 1")
G55=NL("filter","Sales Header","No.","No.","MT*|AT*","Shortcut Dimension 2 Code",$H$3,"+Document Date","@@"&$E$55,"Company=","company 2")
H55=NL("rows",NP("Union",$F55,$G55))

This is where I think I have the issue, now I want to pull the amount.

This is the amount.
=IF(NL("Sum","Sales Line","Outstanding Amount","Document No.","@@"&$H55,"Document Type","Invoice","Company=","company 1")="",NL("Sum","Sales Line","Outstanding Amount","Document No.","@@"&$H55,"Document Type","Invoice","Company=","company 2"),NL("Sum","Sales Line","Outstanding Amount","Document No.","@@"&$H55,"Document Type","Invoice","Company=","company 1"))



I beieve the if statements is where my mess up is. can anyone help ?

1 comment

Please sign in to leave a comment.