You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Mustangproject生成XRechnung时含税价与净价一致的校验问题

问题场景

我使用Mustangproject创建XRechnung时,校验器提示:当提供Gross price时,Item的net price必须等于(Gross price - Allowance amount),对应路径为/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction[1]/ram:IncludedSupplyChainTradeLineItem[1]/ram:SpecifiedLineTradeAgreement[1]/ram:GrossPriceProductTradePrice[1]

查看生成的XML,发现当前Item的GrossPriceProductTradePrice和NetPriceProductTradePrice的ChargeAmount均为100.0000:

<ram:SpecifiedLineTradeAgreement>
        <ram:GrossPriceProductTradePrice>
          <ram:ChargeAmount>100.0000</ram:ChargeAmount>
          <ram:BasisQuantity unitCode="EA">1.0000</ram:BasisQuantity>
        </ram:GrossPriceProductTradePrice>
        <ram:NetPriceProductTradePrice>
          <ram:ChargeAmount>100.0000</ram:ChargeAmount>
          <ram:BasisQuantity unitCode="EA">1.0000</ram:BasisQuantity>
        </ram:NetPriceProductTradePrice>
      </ram:SpecifiedLineTradeAgreement>

文档级别的Allowance及税费设置正确:

<ram:SpecifiedTradeSettlementHeaderMonetarySummation>
        <ram:LineTotalAmount>200.00</ram:LineTotalAmount>
        <ram:ChargeTotalAmount>0.00</ram:ChargeTotalAmount>
        <ram:AllowanceTotalAmount>10.00</ram:AllowanceTotalAmount>
        <ram:TaxBasisTotalAmount>190.00</ram:TaxBasisTotalAmount>
        <ram:TaxTotalAmount currencyID="EUR">36.10</ram:TaxTotalAmount>
        <ram:GrandTotalAmount>226.10</ram:GrandTotalAmount>              
        <ram:TotalPrepaidAmount>0.00</ram:TotalPrepaidAmount>
        <ram:DuePayableAmount>226.10</ram:DuePayableAmount>
      </ram:SpecifiedTradeSettlementHeaderMonetarySummation>

我当前添加Item的代码如下:

invoice.addItem(new Item(new BigDecimal(100.00), new BigDecimal(2), new Product("test", "name", "EA", new BigDecimal(19)))) .addAllowance(new Allowance(new BigDecimal(10)).setTaxPercent(new BigDecimal(19)));

请问是否有设置gross price的选项?或者是否需要以不同方式创建Item?

解决方案

已通过升级到Mustang 2.11.0解决,该版本修复了当净价与含税价相同时自动移除含税价的问题(对应issue #369)。使用的校验器为:

  • EPO Consulting XRechnung校验器
  • 巴登-符腾堡州电子发票校验器

内容的提问来源于stack exchange,提问作者Jonas Stengel

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.23 08:05:13