首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >我应该如何表示带有负数的UBL订单行?

我应该如何表示带有负数的UBL订单行?
EN

Stack Overflow用户
提问于 2019-01-24 07:32:57
回答 1查看 708关注 0票数 1

我想发送我们的发票在UBL标准,更具体的PEPPOL BIS计费3.0。我们的一些客户使用负价格的项目给予削减。他们想保持这种工作方式。

UBL强制规定,Price.PriceAmountInvoiceLine不能是负的。那么我该如何处理这种发票行呢?

这里有一个小例子,我试图增加30项削减31欧元的项目:

代码语言:javascript
复制
<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>

这会导致以下消息验证失败:

XPath测试:(cac:价格/cbc:Price装入) >= 0 错误信息:BR-27-项目净价(BT-146)不得为负数.

我怎样才能在我的UBL发票中添加带有负金额的行?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2019-01-25 11:36:39

为了使发票有效,价格应该是正数。然而,LineExtensionAmount可能有负数。你可能会想让InvoicedQuantity变成负值。在返回的情况下,数量可能为负数。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/54341450

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档