I am looking at sending our invoices in the UBL standard, more specifically PEPPOL BIS Billing 3.0. Some of our customers use items with a negative price to give reductions. They want to maintain this method of working.
UBL enforces that the Price.PriceAmount
of an InvoiceLine
cannot be negative. How should I deal with these kind of invoice lines then?
Here's a little of example where I am trying to add 30 items of 31 eurocents reduction:
<cac:InvoiceLine>
<!-- Unique identifier for the individual line within the invoice -->
<cbc:ID>1</cbc:ID>
<!-- Quantity of items charged in the invoice line. The unit of measure that applies to the invoiced quantity is a code from one of two standards. -->
<cbc:InvoicedQuantity unitCode="C62">30</cbc:InvoicedQuantity>
<!-- Line extension amount for this invoice line, rounded to max 2 decimals -->
<cbc:LineExtensionAmount currencyID="EUR">-9.30</cbc:LineExtensionAmount>
<!-- Item information -->
<cac:Item>
<!-- Item name -->
<cbc:Name>KO Algemene korting</cbc:Name>
<!-- Line VAT information -->
<cac:ClassifiedTaxCategory>
<!-- VAT category code for the invoiced item -->
<cbc:ID>E</cbc:ID>
<cbc:Percent>0.00</cbc:Percent>
<cac:TaxScheme>
<!-- Mandatory element, use "VAT" -->
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:ClassifiedTaxCategory>
</cac:Item>
<!-- Price details -->
<cac:Price>
<!-- Item price, VAT exclusive, after subtracting item price discount. The Item net price has to be equal with the Item gross price less the Item price discount, if they are both provided. Item price can not be negative. -->
<cbc:PriceAmount currencyID="EUR">-0.31</cbc:PriceAmount>
<!-- Number of item units to which the price applies -->
<cbc:BaseQuantity unitCode="C62">1</cbc:BaseQuantity>
<!-- Allowance to apply reduction -->
<cac:AllowanceCharge>
<!-- Mandatory element that must be set to false -->
<cbc:ChargeIndicator>false</cbc:ChargeIndicator>
<!-- Item price discount -->
<cbc:Amount currencyID="EUR">0.31</cbc:Amount>
</cac:AllowanceCharge>
</cac:Price>
</cac:InvoiceLine>
This fails validation with the following message:
XPath test: (cac:Price/cbc:PriceAmount) >= 0
Error message: [BR-27]-The Item net price (BT-146) shall NOT be negative.
How can I add lines to my UBL invoices with a negative amount?
Price Amount should be positive in order the invoice to be valid. However LineExtensionAmount could have negative amount. You probably might want to make InvoicedQuantity negative instead. The quantity may be negative in case of returns.