1 DEF VAR line-total
AS DEC INIT 0 NO-UNDO.
2 DEF VAR n
AS INT NO-UNDO.
4 ON ASSIGN OF InvoiceLine.YourShare
OVERRIDE DO: END.
6 FIND Office
WHERE ThisOffice
NO-LOCK.
9 Invoice.TaxAmount
<> 0 AND
10 ABS( Invoice.TaxAmount
) > ABS( Invoice.Total
)
14 FOR EACH InvoiceLine
OF Invoice
NO-LOCK:
15 line-total
= line-total
+ InvoiceLine.YourShare.
19 Invoice.Total
= line-total
20 Invoice.TaxAmount
= IF Invoice.TaxApplies
THEN
21 ( line-total
* ( Office.GST
/ 100 ) ) ELSE 0
26 MESSAGE n
"Invoices have been repaired." VIEW-AS ALERT-BOX INFORMATION