modify(/GCB Commission %/)
{
Trigger OnAfterValidate()
begin
if /GCB Commission %/ = 0 then begin
/Rep Order Amount/ := 0;
/Line Amount/ := /Unit Price/ * /Quantity/;
/Amount Including VAT/ := /Line Amount/ + (/Line Amount/ * /VAT %/ / 100);
/Amount/ := /Unit Price/ * /Quantity/;
/VAT Base Amount/ := /Line Amount/ + (/Line Amount/ * /VAT %/ / 100);
/Outstanding Amount/ := /Line Amount/ + (/Line Amount/ * /VAT %/ / 100);
/Outstanding Amount (LCY)/ := /Line Amount/ + (/Line Amount/ * /VAT %/ / 100);
// /Amount Including VAT/ := /Line Amount/ + (/Line Amount/ * /VAT %/ / 100);
end
else begin
/Rep Order Amount/ := /Quantity/ * /Unit Price/;
/Line Amount/ := (/Unit Price/ * /Quantity/) * (/GCB Commission %/ / 100);
/Amount Including VAT/ := /Line Amount/ + (/Line Amount/ * /VAT %/ / 100);
/Amount/ := (/Unit Price/ * /Quantity/) * (/GCB Commission %/ / 100);
/VAT Base Amount/ := /Line Amount/ + (/Line Amount/ * /VAT %/ / 100);
/Outstanding Amount/ := /Line Amount/ + (/Line Amount/ * /VAT %/ / 100);
/Outstanding Amount (LCY)/ := /Line Amount/ + (/Line Amount/ * /VAT %/ / 100);
end;
end;
}