Modifying Invoice Layouts for VAT
This topic discusses how to change the treatment of VAT-related information on an invoice form. You can modify the following VAT information on the invoice layouts:
VAT messages.
Total tax by VAT code.
VAT line information.
PeopleSoft Billing delivers 13 generic VAT treatment messages that describe the VAT treatment of invoices. Not all of these messages pertain to all countries.
You can modify these messages as needed in the following SQR modules: BIPRTL00.SQC, BIPRTL01.SQC, BIPRTP00.SQC, BIPRTP01.SQC, and BIPRTP02.SQC.
To change the VAT treatment message, find the appropriate string name for the message that you want to configure, and change the string in the strings table. The program ID is BIIVCSTR. The string names for each of the generic messages are:
Field or Control |
Description |
---|---|
Domestic Goods Sale |
VAT_DGS |
Domestic Reverse Charge Sale |
VAT_DGRS |
Deemed Service Export |
VAT_DSE |
Domestic Service Sale |
VAT_DSS |
EU Goods Distance Sale (european union goods distance sale) |
VAT_EGDS |
EU Goods Sale (european union goods sale) |
VAT_EGS |
EU Sale (Simplification) (european union sale) |
VAT_ ESS |
Out of Scope EU Service Sale (out of scope european union service sale) |
VAT_OESS |
Outside of Scope |
VAT_OOS |
Out of Scope Service Export |
VAT_OSE |
Zero-Rated EU Service Sale |
VAT_ZESS |
Zero-Rated Goods Export |
VAT_ZGE |
Zero-Rated Service Export |
VAT_ZSE |
If you want to print the VAT basis amount by VAT code rather than the net extended amount, change the following print routines in the PRINT-VAT-TOTAL-BY-VAT-CODE procedure:
Field or Control |
Description |
---|---|
BIPRTL00 |
For Landscape Default Example. |
BIPRTL01 |
For Landscape Order Management Example. |
BIPRTP00 |
For Portrait Default Example. |
BIPRTP01 |
For Portrait Misc Example. |
BIPRTP02 |
For Portrait RightStub Example. |
Two examples of the modified VAT code follow, one in landscape default example format, the other in portrait right stub example format. The modified code for the other layout examples is similar except for the procedure name, which reflects the individual invoice layout type.
Procedure PRINT-VAT-TOTAL-BY-VAT-CODE for the Landscape Default Example
To total VAT by the net basis amount on the landscape default layout example:
Change the PRINT-VAT-TOTAL-BY-VAT-CODE procedure by commenting the following lines where they appear:
print $xv_NET_AMOUNT2 (+1,{net_amount_label})
and
do Format_Currency_Amt (&summed_net_extended_amt, $bi_currency_cd, $select_effdt,
Remove the comment from the following lines where they appear:
! print $xv_NET_BASIS_AMT (+1,{net_amount_label})
and
! do Format_Currency_Amt (&summed_vat_basis_amt, $bi_currency_cd, $select_effdt,
The following procedure provides an example of the code that is needed to total VAT by the net basis amount on the landscape default layout example:
!----------------------------------------------------------------------!
! Procedure: PRINT-VAT-TOTAL-BY-VAT-CODE-DEFAULT !
! Desc: Print VAT total by VAT code. !
! !
!----------------------------------------------------------------------!
begin-procedure PRINT-VAT-TOTAL-BY-VAT-CODE-DEFAULT
add 1 to #level
move 'PRINT-VAT-TOTAL-BY-VAT-CODE-DEFAULT' to $Current-Procedure
#ifdef DebugF
do PRINT-FLOW
#endif
if $FirstNet = 'Y'
! print $xv_NET_AMOUNT2 (+1,{net_amount_label})
!VAT: To print the Net VAT Basis Amt rather than the Net Extended Amt,
!comment the line above
! and un-comment the line below. Do the reverse to print Net Extended Amt.
print $xv_NET_BASIS_AMT (+1,{net_amount_label})
! do Format_Currency_Amt (&summed_net_extended_amt, $bi_currency_cd, $select_effdt,
!VAT: To print the Net VAT Basis Amt rather than the Net Extended Amt,
!comment the line above
! and un-comment the line below. Do the reverse to print Net Extended Amt.
do Format_Currency_Amt (&summed_vat_basis_amt, $bi_currency_cd, $select_effdt,
'999,999,999,999,999.999', $out, 'I')
print $out (,{net_amount})
move &sum_vat.tax_cd_vat_pct to #TaxCdPct
do Get-Tax-Code-Name
print $TaxCdDescr (,{tax_code_name_tot})
print #TaxCdPct (,{tax_pct_tot}) edit 99.999
print '%' (,{tax_pct_sign_tot})
move &summed_vat_amt to #summed_vat_amt
! print #summed_vat_amt (,{amount_col2}) edit 999,999,999,999.99pf
do Format_Currency_Amt (#summed_vat_amt, $bi_currency_cd, $select_effdt,
'999,999,999,999,999.999', $out, 'I')
print $out (,{amount_col2})
let $FirstNet = 'N'
else
! do Format_Currency_Amt (&summed_net_extended_amt, $bi_currency_cd, $select_effdt,
!VAT: To print the Net VAT Basis Amt rather than the Net Extended Amt,
!comment the line above
! and un-comment the line below. Do the reverse to print Net Extended Amt.
do Format_Currency_Amt (&summed_vat_basis_amt, $bi_currency_cd, $select_effdt,
'999,999,999,999,999.999', $out, 'I')
print $out (+1,{net_amount})
move &sum_vat.tax_cd_vat_pct to #TaxCdPct
do Get-Tax-Code-Name
print $TaxCdDescr (,{tax_code_name_tot})
print #TaxCdPct (,{tax_pct_tot}) edit 99.999
print '%' (,{tax_pct_sign_tot})
move &summed_vat_amt to #summed_vat_amt
! print #summed_vat_amt (,{amount_col2}) edit 999,999,999,999.99pf
do Format_Currency_Amt (#summed_vat_amt, $bi_currency_cd, $select_effdt,
'999,999,999,999,999.999', $out, 'I')
print $out (,{amount_col2})
end-if
subtract 1 from #level
end-procedure
Procedure PRINT-VAT-TOTAL-BY-VAT-CODE for the Portrait RightStub Example
To total VAT by the net basis amount on the Portrait RightStub layout example:
Change the PRINT-VAT-TOTAL-HEADING-RIGHTSTUB and PRINT-VAT-TOTAL-BY-VAT-CODE-RIGHTSTUB procedures by commenting the following lines where they appear:
print $xv_NET_AMOUNT2 (+1,{rs_net_amount_label})
and
do Format_Currency_Amt (&summed_net_extended_amt, $bi_currency_cd, $select_effdt,
Remove the comment from the following lines where they appear:
! print $xv_NET_BASIS_AMT (+1,{rs_net_amount_label})
and
! do Format_Currency_Amt (&summed_vat_basis_amt, $bi_currency_cd, $select_effdt,
The following procedure provides an example of the code that is needed to total VAT by the net basis amount on the Portrait RightStub layout:
!----------------------------------------------------------------------!
! Procedure: PRINT-VAT-TOTAL-HEADING-RIGHTSTUB !
! Desc: Print Heading for VAT Totals. !
! !
!----------------------------------------------------------------------!
begin-procedure PRINT-VAT-TOTAL-HEADING-RIGHTSTUB
add 1 to #level
move 'PRINT-VAT-TOTAL-HEADING-RIGHTSTUB' to $Current-Procedure
#ifdef DebugF
do PRINT-FLOW
#endif
move 1 to #lines_to_print
do CHECK-FOR-PAGE-BREAK
! let $TaxLabel = 'VAT: '
let $TaxLabel = $xv_VAT2
print $TaxLabel (+1,{rs_net_amount_label})
print $TaxLabel (,{rs_tot_lbl_right})
if $FirstNet = 'Y'
print $xv_NET_AMOUNT2 (+1,{rs_net_amount_label})
!VAT: To print the Net Basis Amt label rather than the Net Amount,
!comment the line above
! and un-comment the line below. Do the reverse to print Net Amount label.
! print $xv_NET_BASIS_AMT (+1,{rs_net_amount_label})
end-if
subtract 1 from #level
end-procedure
!----------------------------------------------------------------------!
! Procedure: PRINT-VAT-TOTAL-BY-VAT-CODE-RIGHTSTUB !
! Desc: Print VAT total by VAT code. !
! !
!----------------------------------------------------------------------!
begin-procedure PRINT-VAT-TOTAL-BY-VAT-CODE-RIGHTSTUB
add 1 to #level
move 'PRINT-VAT-TOTAL-BY-VAT-CODE-RIGHTSTUB' to $Current-Procedure
#ifdef DebugF
do PRINT-FLOW
#endif
if $FirstNet = 'Y'
do Format_Currency_Amt (&summed_net_extended_amt, $bi_currency_cd, $select_effdt,
!VAT: To print the Net VAT Basis Amt rather than the Net Extended Amt,
!comment the line above
! and un-comment the line below. Do the reverse to print Net Extended Amt.
! do Format_Currency_Amt (&summed_vat_basis_amt, $bi_currency_cd, $select_effdt,
'999,999,999,999,999.999', $out, 'I')
print $out (,{rs_net_amount}) edit 999,999,999,999.99pf
move &sum_vat.tax_cd_vat_pct to #TaxCdPct
print $TaxCd (,{rs_tot_tax_cd})
print #TaxCdPct (,{rs_tot_tax_pct}) edit 99.999
print '%' (,{rs_tot_tax_pct_sign})
move &summed_vat_amt to #summed_vat_amt
! print #summed_vat_amt (,{rs_tot_amt_left}) edit 999,999,999,999.99pf
do Format_Currency_Amt (#summed_vat_amt, $bi_currency_cd, $select_effdt,
'999,999,999,999,999.999', $out, 'I')
print $out (,{rs_tot_amt_left}) edit 999,999,999,999.99pf
let $FirstNet = 'N'
else
do Format_Currency_Amt (&summed_net_extended_amt, $bi_currency_cd, $select_effdt,
!VAT: To print the Net VAT Basis Amt rather than the Net Extended Amt,
!comment the line above
! and un-comment the line below. Do the reverse to print Net Extended Amt.
! do Format_Currency_Amt (&summed_vat_basis_amt, $bi_currency_cd, $select_effdt,
'999,999,999,999,999.999', $out, 'I')
print $out (+1,{rs_net_amount}) edit 999,999,999,999.99pf
move &sum_vat.tax_cd_vat_pct to #TaxCdPct
print $TaxCd (,{rs_tot_tax_cd})
print #TaxCdPct (,{rs_tot_tax_pct}) edit 99.999
print '%' (,{rs_tot_tax_pct_sign})
move &summed_vat_amt to #summed_vat_amt
! print #summed_vat_amt (,{rs_tot_amt_left}) edit 999,999,999,999.99pf
do Format_Currency_Amt (#summed_vat_amt, $bi_currency_cd, $select_effdt,
'999,999,999,999,999.999', $out, 'I')
print $out (,{rs_tot_amt_left}) edit 999,999,999,999.99pf
end-if
print $TaxCd (,{rs_tax_cd_right})
print #TaxCdPct (,{rs_tax_pct_right}) edit 99.999
print '%' (,{rs_tax_pct_sign_right})
! print #summed_vat_amt (,{rs_tot_amt_right}) edit 999,999,999,999.99pf
print $out (,{rs_tot_amt_right}) edit 999,999,999,999.99pf
subtract 1 from #level
end-procedure
The landscape and portrait invoice layouts print the VAT description rather than the VAT code. Due to space limitations, the portrait RightStub prints only the VAT code. If you want to print the VAT code instead of or in addition to the VAT description, print the variable $TaxCd by using the appropriate column definition for your reporting needs.