Adjustments for Facturae 3.2.2

This commit is contained in:
David Bomba 2023-07-23 11:13:37 +10:00
parent e3dd63a9cc
commit 79d50d5686

View File

@ -212,9 +212,9 @@ class FacturaEInvoice extends AbstractService
private function setPoNumber(): self private function setPoNumber(): self
{ {
if(strlen($this->invoice->po_number) > 1) { $po = $this->invoice->po_number ?? '';
$this->fac->setReferences($this->invoice->po_number);
} $this->fac->setReferences($po, $this->invoice->custom_value1, $this->invoice->custom_value2);
return $this; return $this;
} }
@ -233,10 +233,10 @@ class FacturaEInvoice extends AbstractService
foreach($this->invoice->line_items as $item) { foreach($this->invoice->line_items as $item) {
$this->fac->addItem(new FacturaeItem([ $this->fac->addItem(new FacturaeItem([
'name' => $item->product_key, 'name' => $item->notes,
'description' => $item->notes, 'description' => $item->product_key,
'quantity' => $item->quantity, 'quantity' => $item->quantity,
'unitPrice' => $item->cost, 'unitPriceWithoutTax' => $item->cost,
'discountsAndRebates' => $item->discount, 'discountsAndRebates' => $item->discount,
'charges' => [], 'charges' => [],
'discounts' => [], 'discounts' => [],