Use this procedure to define a statement that groups the
invoice totals by VAT rate.
- On the next line in the Editor list box, enter the following
statement:
#LVLT = 0;
#TVAT = 0;
j=1;
while j <= stllimit do
begin
$STL[j].#VATA = ($STL[j].#LVLA * $STL[j].#VATP:2) / 100.0;
$STL[j].#EVLA = $STL[j].#LVLA;
$STL[j].#ASDA = $STL[j].#LVLA;
$STL[j].#APSI = $STL[j].#LVLA + $STL[j].#VATA;
#LVLT = #LVLT + $STL[j].#LVLA;
#TVAT = #TVAT + $STL[j].#VATA;
j=j+1;
end
- Press Enter twice to insert one
blank line after the statement.
Note: It is not necessary
to include a blank line after this statement. However, doing so may
improve readability of the extended rule.