To Reproduce
- Create a EN16931 invoice with discounts on line items in the form of allowances
- Check the xml output
Current vs. Expected behavior
A Charge indicator set to false should be present at the top but nothing is set, i also tried adding chargeIndicator: false to the object but it does nothing.
Here is what is generated :
<ram:IncludedSupplyChainTradeLineItem>
<ram:AssociatedDocumentLineDocument>
<ram:LineID>2</ram:LineID>
</ram:AssociatedDocumentLineDocument>
<ram:SpecifiedTradeProduct>
<ram:Name>Billets - Billet 2</ram:Name>
</ram:SpecifiedTradeProduct>
<ram:SpecifiedLineTradeAgreement>
<ram:GrossPriceProductTradePrice>
<ram:ChargeAmount>65</ram:ChargeAmount>
<ram:BasisQuantity unitCode="C62">1</ram:BasisQuantity>
</ram:GrossPriceProductTradePrice>
<ram:NetPriceProductTradePrice>
<ram:ChargeAmount>52.5</ram:ChargeAmount>
<ram:BasisQuantity unitCode="C62">1</ram:BasisQuantity>
</ram:NetPriceProductTradePrice>
</ram:SpecifiedLineTradeAgreement>
<ram:SpecifiedLineTradeDelivery>
<ram:BilledQuantity unitCode="C62">1</ram:BilledQuantity>
</ram:SpecifiedLineTradeDelivery>
<ram:SpecifiedLineTradeSettlement>
<ram:ApplicableTradeTax>
<ram:TypeCode>VAT</ram:TypeCode>
<ram:CategoryCode>S</ram:CategoryCode>
<ram:RateApplicablePercent>20</ram:RateApplicablePercent>
</ram:ApplicableTradeTax>
<ram:SpecifiedTradeAllowanceCharge>
<ram:ActualAmount>12.5</ram:ActualAmount>
<ram:Reason>BILLETPASCHER applied on Billets - Billet 2</ram:Reason>
</ram:SpecifiedTradeAllowanceCharge>
<ram:SpecifiedTradeSettlementLineMonetarySummation>
<ram:LineTotalAmount>52.5</ram:LineTotalAmount>
</ram:SpecifiedTradeSettlementLineMonetarySummation>
</ram:SpecifiedLineTradeSettlement>
</ram:IncludedSupplyChainTradeLineItem>
Notice SpecifiedTradeAllowanceCharge is missing ChargeIndicator.
Here is the error report from Mustang:
schema validation fails:org.xml.sax.SAXParseException; lineNumber: 93; columnNumber: 29; cvc-complex-type.2.4.a: Invalid content was found starting with element ‘{“urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100”:ActualAmount}’. One of ‘{“urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100”:ChargeIndicator}’ is expected.
[CII-SR-463]-Each Specified Trade Allowance Charge (BG-20)(BG-21) shall contain a Charge Indicator. [ID FX-SCH-A-000348] from /xslt/ZF_240/FACTUR-X_EN16931.xslt)
[CII-SR-463]-Each Specified Trade Allowance Charge (BG-20)(BG-21) shall contain a Charge Indicator. [ID FX-SCH-A-000348] from /xslt/ZF_240/FACTUR-X_EN16931.xslt)
What version of node-zugferd are you using?
0.1.1-beta.1
Provide environment information
Which area(s) are affected? (Select all that apply)
Package
Config (if applicable)
import { zugferd } from 'node-zugferd';
import { EN16931, type ProfileEN16931 } from 'node-zugferd/profile/en16931';
const invoicer = zugferd({
profile: EN16931,
strict: false,
});
To Reproduce
Current vs. Expected behavior
A Charge indicator set to false should be present at the top but nothing is set, i also tried adding
chargeIndicator: falseto the object but it does nothing.Here is what is generated :
Notice
SpecifiedTradeAllowanceChargeis missingChargeIndicator.Here is the error report from Mustang:
What version of node-zugferd are you using?
0.1.1-beta.1
Provide environment information
Which area(s) are affected? (Select all that apply)
Package
Config (if applicable)