mustangproject icon indicating copy to clipboard operation
mustangproject copied to clipboard

Mustang ignores the precision in "BT-146" and "BT-129" and always rounds to two decimal places.

Open psynetic opened this issue 1 year ago • 3 comments

Mustang ignores the precision in "BT-146" and "BT-129" and always rounds to two decimal places. The reference for this is the example from Zugferd, the file 'EN16931_Rabatte.pdf', where unit prices and quantities are specified with four decimal places.

psynetic avatar Dec 24 '24 22:12 psynetic

Which exact version are you using ? Since 2.24.1 this should no longer be the case. UnitPrice and Quantity have 4 decimal places in my case. Commit https://github.com/ZUGFeRD/mustangproject/commit/0967971e16ddc7aad005e1cd5d6d3c5ca4c79975 changed the behavior to a flexible number of decimal places, depending on the given value.

      <ram:SpecifiedLineTradeAgreement>
        <ram:NetPriceProductTradePrice>
          <ram:ChargeAmount>13.5500</ram:ChargeAmount>
          <ram:BasisQuantity unitCode="EA ">1.0000</ram:BasisQuantity>
        </ram:NetPriceProductTradePrice>
      </ram:SpecifiedLineTradeAgreement>
      <ram:SpecifiedLineTradeDelivery>
        <ram:BilledQuantity unitCode="EA ">-1.0000</ram:BilledQuantity>
      </ram:SpecifiedLineTradeDelivery>

langfr avatar Dec 26 '24 11:12 langfr

Mustang-CLI-2.15.2.jar

Problem only in HTML-visualization: HTML: grafik

PDF is OK: grafik

psynetic avatar Dec 26 '24 12:12 psynetic

actually I know, we're using the same transformation like Quba https://github.com/ZUGFeRD/quba-viewer/issues/86 (and actually the issue is probably from upstream, https://github.com/itplr-kosit/xrechnung-visualization)

jstaerk avatar Jan 07 '25 10:01 jstaerk