Fix issue with Unit Price on 4 decimal

This commit is contained in:
sparkyx 2026-05-14 11:52:01 +02:00
parent d109832d44
commit 19fce4d3c5

View file

@ -491,7 +491,7 @@ class InvoiceUBL21 extends XMLInvoice {
$item->appendChild($classifiedTaxCat);
$result->appendChild($item);
$price=$result->appendChild($this->createElement("cac:Price"));
$price->appendChild($this->createElement("cbc:PriceAmount",sprintf("%.2f",abs($row['price_unit']))))
$price->appendChild($this->createElement("cbc:PriceAmount",sprintf("%.4f",abs($row['price_unit']))))
->setAttribute("currencyID",$this->data['currency']);
$result->appendChild($price);