mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Add Invoice Reference Subject
This commit is contained in:
parent
b47bac317c
commit
171c182bd6
@ -251,6 +251,7 @@ class PaymentEmailEngine extends BaseEmailEngine
|
||||
$data['$emailSignature'] = &$data['$signature'];
|
||||
|
||||
$data['$invoices'] = ['value' => $this->formatInvoices(), 'label' => ctrans('texts.invoices')];
|
||||
$data['$invoice_references_subject'] = ['value' => $this->formatInvoiceReferencesSubject(), 'label' => ctrans('texts.invoices')];
|
||||
$data['$invoice_references'] = ['value' => $this->formatInvoiceReferences(), 'label' => ctrans('texts.invoices')];
|
||||
$data['$invoice'] = ['value' => $this->formatInvoice(), 'label' => ctrans('texts.invoices')];
|
||||
$data['$invoice.po_number'] = ['value' => $this->formatPoNumber(), 'label' => ctrans('texts.po_number')];
|
||||
@ -329,6 +330,24 @@ class PaymentEmailEngine extends BaseEmailEngine
|
||||
return $invoice_list;
|
||||
}
|
||||
|
||||
private function formatInvoiceReferencesSubject()
|
||||
{
|
||||
$invoice_list = '';
|
||||
|
||||
foreach ($this->payment->invoices as $invoice) {
|
||||
if (strlen($invoice->po_number) > 1) {
|
||||
$invoice_list .= ctrans('texts.po_number')." {$invoice->po_number} <br>";
|
||||
}
|
||||
|
||||
$invoice_list .= ctrans('texts.invoice_number_short')." {$invoice->number} " . Number::formatMoney($invoice->pivot->amount, $this->client).', ';
|
||||
|
||||
}
|
||||
|
||||
return $invoice_list;
|
||||
|
||||
}
|
||||
|
||||
|
||||
private function formatInvoiceReferences()
|
||||
{
|
||||
$invoice_list = '<br><br>';
|
||||
|
@ -24,9 +24,9 @@ class ScheduleEntity
|
||||
}
|
||||
|
||||
public function run()
|
||||
{nlog("here");
|
||||
{
|
||||
$class = 'App\\Models\\' . Str::camel($this->scheduler->parameters['entity']);
|
||||
nlog($class);
|
||||
|
||||
$class::find($this->decodePrimaryKey($this->scheduler->parameters['entity_id']))->service()->sendEmail();
|
||||
|
||||
$this->scheduler->forceDelete();
|
||||
|
Loading…
x
Reference in New Issue
Block a user