mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Adjustments for Facturae 3.2.2
This commit is contained in:
parent
e1863394ef
commit
1de6086c21
@ -218,8 +218,10 @@ class FacturaEInvoice extends AbstractService
|
|||||||
private function setPoNumber(): self
|
private function setPoNumber(): self
|
||||||
{
|
{
|
||||||
$po = $this->invoice->po_number ?? '';
|
$po = $this->invoice->po_number ?? '';
|
||||||
|
$transaction_reference = (isset($this->invoice->custom_value1) && strlen($this->invoice->custom_value1) > 2) ? substr($this->invoice->custom_value1, 0, 20) : null;
|
||||||
|
$contract_reference = (isset($this->invoice->custom_value2) && strlen($this->invoice->custom_value2) > 2) ? $this->invoice->custom_value2: null;
|
||||||
|
|
||||||
$this->fac->setReferences($po, substr($this->invoice->custom_value1, 0, 20), $this->invoice->custom_value2);
|
$this->fac->setReferences($po, $transaction_reference, $contract_reference);
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
@ -242,6 +244,9 @@ class FacturaEInvoice extends AbstractService
|
|||||||
|
|
||||||
private function setBillingPeriod(): self
|
private function setBillingPeriod(): self
|
||||||
{
|
{
|
||||||
|
if(!$this->invoice->custom_value3)
|
||||||
|
return $this;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (\Carbon\Carbon::createFromFormat('Y-m-d', $this->invoice->custom_value3)->format('Y-m-d') === $this->invoice->custom_value3 &&
|
if (\Carbon\Carbon::createFromFormat('Y-m-d', $this->invoice->custom_value3)->format('Y-m-d') === $this->invoice->custom_value3 &&
|
||||||
\Carbon\Carbon::createFromFormat('Y-m-d', $this->invoice->custom_value4)->format('Y-m-d') === $this->invoice->custom_value4
|
\Carbon\Carbon::createFromFormat('Y-m-d', $this->invoice->custom_value4)->format('Y-m-d') === $this->invoice->custom_value4
|
||||||
|
Loading…
x
Reference in New Issue
Block a user