Skip to Content
0
Former Member
Aug 31, 2010 at 02:53 PM

Approval query to not allow invoicing if no freight entered

18 Views

Hi, I have the following query which generates an "internal error" message but then does not trigger the approval process.

select Distinct 'True' From OINV T0 INNER JOIN INV3 T1 ON T0.DocEntry = T1.DocEntry WHERE T0.OINV.U_Ship = 'Prepaid & Billed' and T1.[LineTotal] is Null and CardCode = $[ORDR.CardCode]

If someone is copying a delivery to an invoice and the there is no freight amount in the freight field when there should be, then I don't want the delivery to become an invoice until that freight amount is filled in. Is there a better way to accomplish this. If not, please help me fix my query. Thanks!