mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
commit
c4076d8428
@ -449,22 +449,26 @@ class InvoiceService
|
|||||||
if ($force) {
|
if ($force) {
|
||||||
$this->invoice->invitations->each(function ($invitation) {
|
$this->invoice->invitations->each(function ($invitation) {
|
||||||
(new CreateEntityPdf($invitation))->handle();
|
(new CreateEntityPdf($invitation))->handle();
|
||||||
if ($invitation instanceof InvoiceInvitation)
|
|
||||||
|
if ($invitation->company->enable_e_invoice && $invitation instanceof InvoiceInvitation)
|
||||||
{
|
{
|
||||||
(new CreateEInvoice($invitation->invoice, true))->handle();
|
(new CreateEInvoice($invitation->invoice, true))->handle();
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->invoice->invitations->each(function ($invitation) {
|
if($this->invoice->company->enable_e_invoice) {
|
||||||
CreateEntityPdf::dispatch($invitation);
|
$this->invoice->invitations->each(function ($invitation) {
|
||||||
if ($invitation instanceof InvoiceInvitation)
|
CreateEntityPdf::dispatch($invitation);
|
||||||
{
|
if ($invitation instanceof InvoiceInvitation) {
|
||||||
CreateEInvoice::dispatch($invitation->invoice, true);
|
CreateEInvoice::dispatch($invitation->invoice, true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
nlog('failed creating invoices in Touch PDF');
|
nlog('failed creating invoices in Touch PDF');
|
||||||
}
|
}
|
||||||
|
@ -196,6 +196,7 @@ class CompanyTransformer extends EntityTransformer
|
|||||||
'invoice_task_hours' => (bool) $company->invoice_task_hours,
|
'invoice_task_hours' => (bool) $company->invoice_task_hours,
|
||||||
'calculate_taxes' => (bool) $company->calculate_taxes,
|
'calculate_taxes' => (bool) $company->calculate_taxes,
|
||||||
'tax_data' => $company->tax_data ?: new \stdClass,
|
'tax_data' => $company->tax_data ?: new \stdClass,
|
||||||
|
'enable_e_invoice' => (bool) $company->enable_e_invoice,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user