mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Fix for phantom displaying Recurring Invoices
This commit is contained in:
parent
9fa043afdd
commit
3c72a15707
@ -16,6 +16,7 @@ use App\Models\CreditInvitation;
|
||||
use App\Models\Design;
|
||||
use App\Models\InvoiceInvitation;
|
||||
use App\Models\QuoteInvitation;
|
||||
use App\Models\RecurringInvoiceInvitation;
|
||||
use App\Models\SystemLog;
|
||||
use App\Services\PdfMaker\Design as PdfDesignModel;
|
||||
use App\Services\PdfMaker\Design as PdfMakerDesign;
|
||||
@ -52,6 +53,9 @@ class Phantom
|
||||
} elseif ($invitation instanceof QuoteInvitation) {
|
||||
$entity = 'quote';
|
||||
$entity_design_id = 'quote_design_id';
|
||||
} elseif ($inviation instanceof RecurringInvoiceInvitation) {
|
||||
$entity = 'recurring_invoice';
|
||||
$entity_design_id = 'invoice_design_id';
|
||||
}
|
||||
|
||||
$entity_obj = $invitation->{$entity};
|
||||
@ -68,6 +72,10 @@ class Phantom
|
||||
$path = $entity_obj->client->credit_filepath();
|
||||
}
|
||||
|
||||
if ($entity == 'recurring_invoice') {
|
||||
$path = $entity_obj->client->recurring_invoice_filepath();
|
||||
}
|
||||
|
||||
$file_path = $path.$entity_obj->number.'.pdf';
|
||||
|
||||
$url = config('ninja.app_url').'/phantom/'.$entity.'/'.$invitation->key.'?phantomjs_secret='.config('ninja.phantomjs_secret');
|
||||
|
Loading…
x
Reference in New Issue
Block a user