mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 21:22:58 +01:00
Add E-Document to ZIP-Download
This commit is contained in:
parent
8c06698980
commit
da273d4ed5
@ -67,6 +67,11 @@ class ZipPurchaseOrders implements ShouldQueue
|
||||
try {
|
||||
foreach ($invitations as $invitation) {
|
||||
|
||||
if ($invitation->purchase_order->client->getSetting('enable_e_invoice')) {
|
||||
$xml = $invitation->purchase_order->service()->getEInvoice();
|
||||
$zipFile->addFromString($invitation->purchase_order->getFileName("xml"), $xml);
|
||||
}
|
||||
|
||||
$file = (new CreateRawPdf($invitation))->handle();
|
||||
|
||||
$zipFile->addFromString($invitation->purchase_order->numberFormatter().".pdf", $file);
|
||||
|
@ -63,6 +63,10 @@ class ZipQuotes implements ShouldQueue
|
||||
try {
|
||||
|
||||
foreach ($invitations as $invitation) {
|
||||
if ($invitation->quote->client->getSetting('enable_e_invoice')) {
|
||||
$xml = $invitation->quote->service()->getEInvoice();
|
||||
$zipFile->addFromString($invitation->quote->getFileName("xml"), $xml);
|
||||
}
|
||||
$file = (new \App\Jobs\Entity\CreateRawPdf($invitation))->handle();
|
||||
$zipFile->addFromString($invitation->quote->numberFormatter() . '.pdf', $file);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user