XML Peppol : correct negative amount
This commit is contained in:
parent
c8f7f420a3
commit
43c686d64e
1 changed files with 1 additions and 0 deletions
|
|
@ -475,6 +475,7 @@ class InvoiceUBL21 extends XMLInvoice {
|
||||||
|
|
||||||
$result->appendChild($this->createElement("cbc:ID", $i));
|
$result->appendChild($this->createElement("cbc:ID", $i));
|
||||||
$amount=sprintf("%.2f",$row['price']);
|
$amount=sprintf("%.2f",$row['price']);
|
||||||
|
if ( $row['quantity'] > 0 && $amount < 0 ) $row['quantity'] =bcsub(0,$row['quantity'] ,4);
|
||||||
$result->appendChild(
|
$result->appendChild(
|
||||||
$this->createElement("cbc:InvoicedQuantity", sprintf("%.2f",$row['quantity'])))
|
$this->createElement("cbc:InvoicedQuantity", sprintf("%.2f",$row['quantity'])))
|
||||||
->setAttribute("unitCode", $row["code_quantity"]);
|
->setAttribute("unitCode", $row["code_quantity"]);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue