Total counting formula for invoice line, allowances & taxes?
Business Term id
|
Term Name
|
Details
|
Calculation Formula
|
UBL Example
|
BT-146
|
Item net price
|
If the gross price and the discount exist, the Item net price has to be equal with the item gross price less the item price discount.
|
Item net price (BT-146) = Item gross price (BT-148) − Item price discount (BT-147)
|
UBL example of invoice line net price with amount discount
<cac:Price>
<cbc:PriceAmount currencyID="SAR">450</cbc:PriceAmount> (BT-146)
<cbc:BaseQuantity unitCode="PCE">1</cbc:BaseQuantity>
<cac:AllowanceCharge>
<cbc:ChargeIndicator>false</cbc:ChargeIndicator>
<cbc:Amount currencyID="SAR">50</cbc:Amount> (BT-147)
<cbc:BaseAmount currencyID="SAR">500</cbc:BaseAmount> (BT-148)
</cac:AllowanceCharge>
</cac:Price>
|
BT-131
|
Invoice line net amount
|
The invoice line net amount without VAT, and inclusive of line level allowance.
|
Item line net amount (BT-131) = ((Item net price (BT-146) ÷ Item price base quantity (BT-149)) × (Invoiced Quantity (BT-129)) − Invoice line allowance amount (BT136) + Invoice line charge amount (BT-141)
|
UBL example of invoice line net amount with no line allowance (discount) and charge
<cbc:InvoicedQuantity unitCode="PCE">10</cbc:InvoicedQuantity> (BT-129)
<cbc:LineExtensionAmount currencyID="SAR">2000.00</cbc:LineExtensionAmount>
(BT-131)
<!-- Code omitted for clarity-->
<cac:Price>
<cbc:PriceAmount currencyID="SAR">400</cbc:PriceAmount> (BT-146)
<cbc:BaseQuantity unitCode="PCE">2</cbc:BaseQuantity> (BT-149)
UBL example of invoice line net amount with line allowance (discount) and line charge
<cbc:InvoicedQuantity unitCode="PCE">10</cbc:InvoicedQuantity> (BT-129)
<cbc:LineExtensionAmount currencyID="SAR">925.00</cbc:LineExtensionAmount>
(BT-131)
<!-- Code omitted for clarity-->
<!—XML tags for Allowance (Discount)--> <cac:AllowanceCharge> <cbc:ChargeIndicator>false</cbc:ChargeIndicator>
<cbc:AllowanceChargeReasonCode>95 </cbc:AllowanceChargeReaso
nCode>
|
Total counting formula for invoice header level, allowances & taxes
Use Case
|
UBL Example
|
Calculation formula Elements
|
UBL example of adjustment of the prepayment amount from the final invoice amount.
|
<!--Adjustment of prepayment amount--> <cac:LegalMonetaryTotal> <cbc:LineExtensionAmount currencyID="SAR">200</cbc:LineExtensionAmount> <cbc:TaxExclusiveAmount currencyID="SAR">200</cbc:TaxExclusiveAmount> <cbc:TaxInclusiveAmount currencyID="SAR">230</cbc:TaxInclusiveAmount> <cbc:PrepaidAmount currencyID="SAR">100</cbc:PrepaidAmount> (1) <cbc:PayableAmount currencyID="SAR">130</cbc:PayableAmount> </cac:LegalMonetaryTotal> <!--Additional invoice line for prepayment amount adjustment--> <cac:InvoiceLine> <cbc:ID>2</cbc:ID> <cbc:InvoicedQuantity unitCode="PCE">0.00</cbc:InvoicedQuantity> <cbc:LineExtensionAmount currencyID="SAR">0.00</cbc:LineExtensionAmount> (10) <!-- document reference of the prepayment invoice--> <cac:DocumentReference> <cbc:ID>46531</cbc:ID> (2) <cbc:IssueDate>2021-07-31</cbc:IssueDate> (3) <cbc:IssueTime>12:28:17</cbc:IssueTime> (4) <cbc:DocumentTypeCode>386</cbc:DocumentTypeCode> (5) </cac:DocumentReference> <cac:TaxTotal> <cbc:TaxAmount currencyID="SAR">0.00</cbc:TaxAmount> (10) <cbc:RoundingAmount currencyID="SAR">0.00</cbc:RoundingAmount> (10) <!-- breakdown of the prepayment amount --> <cac:TaxSubtotal> <cbc:TaxableAmount currencyID="SAR">86.96</cbc:TaxableAmount> (6) <cbc:TaxAmount currencyID="SAR">13.04</cbc:TaxAmount> (7) <cac:TaxCategory> <cbc:ID>S</cbc:ID> (8) <cbc:Percent>15.00</cbc:Percent> (9) <cac:TaxScheme> <cbc:ID>VAT</cbc:ID> </cac:TaxScheme> </cac:TaxCategory> </cac:TaxSubtotal> </cac:TaxTotal> <cac:Item> <cbc:Name>Prepayment adjustment</cbc:Name> <cac:ClassifiedTaxCategory> <cbc:ID>S</cbc:ID> <cbc:Percent>15</cbc:Percent> <cac:TaxScheme> <cbc:ID>VAT</cbc:ID> </cac:TaxScheme> </cac:ClassifiedTaxCategory> </cac:Item> <cac:Price> <cbc:PriceAmount currencyID="SAR">0.00</cbc:PriceAmount> (10) </cac:Price> </cac:InvoiceLine>
|
(1) Adjustment of Prepayment Amount i.e. the sum total of the amount provided in (6) and the amount provided in (7)
(2) Prepayment ID (KSA-26) i.e. Invoice number of the prepayment invoice
(3) Prepayment Issue Date (KSA28) i.e. issue date of the prepayment invoice
(4) Prepayment Issue Time (KSA29) i.e. issue time of the prepayment invoice
(5) Prepayment Document Type Code (KSA-30) i.e. invoice type code of the prepayment invoice. The value must be ‘386’
(6) Prepayment VAT category Taxable Amount (KSA-31) for category S and rate = 15%
(7) Prepayment VAT Category Tax Amount (KSA-32) = Prepayment VAT category Taxable amount (KSA-31) × (VAT rate ÷ 100)
(8) Prepayment VAT category code (KSA-33) i.e. the VAT category code of the prepayment invoice
(9) Prepayment VAT rate (KSA-34) i.e. the VAT rate of the Prepayment VAT category code
(10) Item net price (BT-146), Item line net amount (BT-131), line VAT amount (KSA-11) and line amount with VAT (KSA-12) for the additional invoice line with document reference must be 0 (Zero).
|
UBL example of adjustment of multiple prepayments amounts from the final invoice amount.
|
<cac:LegalMonetaryTotal> <cbc:LineExtensionAmount currencyID="SAR">200</cbc:LineExtensionAmount> <cbc:TaxExclusiveAmount currencyID="SAR">200</cbc:TaxExclusiveAmount> <cbc:TaxInclusiveAmount currencyID="SAR">230</cbc:TaxInclusiveAmount> <cbc:PrepaidAmount currencyID="SAR">104</cbc:PrepaidAmount> (1) <cbc:PayableAmount currencyID="SAR">126</cbc:PayableAmount> </cac:LegalMonetaryTotal> <!—Additional invoice line # 2 for prepayment amount adjustment <cac:InvoiceLine> <cbc:ID>2</cbc:ID> <cbc:InvoicedQuantity unitCode="PCE">0.00</cbc:InvoicedQuantity> <cbc:LineExtensionAmount currencyID="SAR">0.00</cbc:LineExtensionAmount> (10) <!-- document reference of the prepayment invoice--> <cac:DocumentReference> <cbc:ID>46531</cbc:ID> (2) <cbc:IssueDate>2021-07-31</cbc:IssueDate> (3) <cbc:IssueTime>12:28:17</cbc:IssueTime> (4) <cbc:DocumentTypeCode>386</cbc:DocumentTypeCode> (5) </cac:DocumentReference> <cac:TaxTotal> <cbc:TaxAmount currencyID="SAR">0.00</cbc:TaxAmount> (10) <cbc:RoundingAmount currencyID="SAR">0.00</cbc:RoundingAmount> (10) <!-- breakdown of the prepayment amount --> <cac:TaxSubtotal> <cbc:TaxableAmount currencyID="SAR">40.00</cbc:TaxableAmount> (6) <cbc:TaxAmount currencyID="SAR">0.00</cbc:TaxAmount> (7) <cac:TaxCategory> <cbc:ID>E</cbc:ID> (8) <cbc:Percent>0.00</cbc:Percent> (9) <cac:TaxScheme> <cbc:ID>VAT</cbc:ID> </cac:TaxScheme> </cac:TaxCategory> </cac:TaxSubtotal> </cac:TaxTotal> <cac:Item> <cbc:Name>Prepayment adjustment</cbc:Name> <cac:ClassifiedTaxCategory> <cbc:ID>E</cbc:ID> <cbc:Percent>0.00</cbc:Percent> <cac:TaxScheme> <cbc:ID>VAT</cbc:ID> </cac:TaxScheme> </cac:ClassifiedTaxCategory> </cac:Item> <cac:Price> <cbc:PriceAmount currencyID="SAR">0.00</cbc:PriceAmount> (10) </cac:Price> </cac:InvoiceLine> <!--Additional invoice line # 3 for prepayment amount adjustment--> <cac:InvoiceLine> <cbc:ID>3</cbc:ID> <cbc:InvoicedQuantity unitCode="PCE">0.00</cbc:InvoicedQuantity> <cbc:LineExtensionAmount currencyID="SAR">0.00</cbc:LineExtensionAmount> (10) <!-- document reference of the prepayment invoice--> <cac:DocumentReference> <cbc:ID>465334341</cbc:ID> (2) <cbc:IssueDate>2022-07-31</cbc:IssueDate> (3) <cbc:IssueTime>12:29:17</cbc:IssueTime> (4) <cbc:DocumentTypeCode>386</cbc:DocumentTypeCode> (5) </cac:DocumentReference> <cac:DocumentReference> <cbc:ID>765334</cbc:ID> (2) <cbc:IssueDate>2020-07-31</cbc:IssueDate> (3) <cbc:IssueTime>12:22:17</cbc:IssueTime> (4) <cbc:DocumentTypeCode>386</cbc:DocumentTypeCode> (5) </cac:DocumentReference> <cac:TaxTotal> <cbc:TaxAmount currencyID="SAR">0.00</cbc:TaxAmount> (10) <cbc:RoundingAmount currencyID="SAR">0.00</cbc:RoundingAmount> (10) <cac:TaxSubtotal> <cbc:TaxableAmount currencyID="SAR">10.00</cbc:TaxableAmount> (6) <cbc:TaxAmount currencyID="SAR">1.50</cbc:TaxAmount> (7) <cac:TaxCategory> <cbc:ID>S</cbc:ID> (8) <cbc:Percent>15.00</cbc:Percent> (9) <cac:TaxScheme> <cbc:ID>VAT</cbc:ID> </cac:TaxScheme> </cac:TaxCategory> </cac:TaxSubtotal> </cac:TaxTotal> <cac:Item> <cbc:Name>Prepayment adjustment</cbc:Name> <cac:ClassifiedTaxCategory> <cbc:ID>S</cbc:ID> <cbc:Percent>15.00</cbc:Percent> <cac:TaxScheme> <cbc:ID>VAT</cbc:ID> </cac:TaxScheme> </cac:ClassifiedTaxCategory> </cac:Item> <cac:Price> <cbc:PriceAmount currencyID="SAR">0.00</cbc:PriceAmount> (10) </cac:Price> </cac:InvoiceLine> <!--Additional invoice line # 4 for prepayment amount adjustment--> <cac:InvoiceLine> <cbc:ID>4</cbc:ID> <cbc:InvoicedQuantity unitCode="PCE">0.00</cbc:InvoicedQuantity> <cbc:LineExtensionAmount currencyID="SAR">0.00</cbc:LineExtensionAmount> (10) <!-- document reference of the prepayment invoice--> <cac:DocumentReference> <cbc:ID>86531</cbc:ID> (2) <cbc:IssueDate>2019-02-31</cbc:IssueDate> (3) <cbc:IssueTime>12:29:37</cbc:IssueTime> (4) <cbc:DocumentTypeCode>386</cbc:DocumentTypeCode> (5) </cac:DocumentReference> <cac:TaxTotal> <cbc:TaxAmount currencyID="SAR">0.00</cbc:TaxAmount> (10) <cbc:RoundingAmount currencyID="SAR">0.00</cbc:RoundingAmount> (10) <!-- breakdown of the prepayment amount --> <cac:TaxSubtotal> <cbc:TaxableAmount currencyID="SAR">50.00</cbc:TaxableAmount> (6) <cbc:TaxAmount currencyID="SAR">2.5</cbc:TaxAmount> (7) <cac:TaxCategory> <cbc:ID>S</cbc:ID> (8) <cbc:Percent>5.00</cbc:Percent> (11) <cac:TaxScheme> <cbc:ID>VAT</cbc:ID> </cac:TaxScheme> </cac:TaxCategory> </cac:TaxSubtotal> </cac:TaxTotal> <cac:Item> <cbc:Name>Prepayment adjustment</cbc:Name> <cac:ClassifiedTaxCategory> <cbc:ID>S</cbc:ID> <cbc:Percent>5.00</cbc:Percent> <cac:TaxScheme> <cbc:ID>VAT</cbc:ID> </cac:TaxScheme> </cac:ClassifiedTaxCategory> </cac:Item> <cac:Price> <cbc:PriceAmount currencyID="SAR">0.00</cbc:PriceAmount> (10) </cac:Price> </cac:InvoiceLine>
|
|
Author
Meet Jadav
Meet Jadav, an experienced Marketing & Finance professional with a passion for digital transformation. With a background in accounting and technology, He specializes in e-invoicing solutions and writes insightful blogs to educate businesses on the benefits and best practices of adopting electronic invoicing. He is dedicated to simplifying complex financial processes for organizations.