mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Working on data feeds for templates
This commit is contained in:
parent
69400c8371
commit
09fafb46dd
@ -274,8 +274,8 @@ class PdfMock
|
|||||||
'$product.quantity' => '',
|
'$product.quantity' => '',
|
||||||
'$total_tax_labels' => '',
|
'$total_tax_labels' => '',
|
||||||
'$total_tax_values' => '',
|
'$total_tax_values' => '',
|
||||||
'$invoice.discount' => '$0.00',
|
'$invoice.discount' => '$5.00',
|
||||||
'$invoice.subtotal' => '$0.00',
|
'$invoice.subtotal' => '$100.00',
|
||||||
'$company.address2' => $this->settings->address2,
|
'$company.address2' => $this->settings->address2,
|
||||||
'$partial_due_date' => ' ',
|
'$partial_due_date' => ' ',
|
||||||
'$invoice.due_date' => '2023-10-24',
|
'$invoice.due_date' => '2023-10-24',
|
||||||
@ -346,9 +346,9 @@ class PdfMock
|
|||||||
'$task.discount' => '',
|
'$task.discount' => '',
|
||||||
'$contact.email' => 'bob@gmail.com',
|
'$contact.email' => 'bob@gmail.com',
|
||||||
'$primary_color' => isset($this->settings->primary_color) ? $this->settings->primary_color : '#4e4e4e',
|
'$primary_color' => isset($this->settings->primary_color) ? $this->settings->primary_color : '#4e4e4e',
|
||||||
'$credit_amount' => '$0.00',
|
'$credit_amount' => '$40.00',
|
||||||
'$invoice.total' => '$0.00',
|
'$invoice.total' => '$330.00',
|
||||||
'$invoice.taxes' => '$0.00',
|
'$invoice.taxes' => '$10.00',
|
||||||
'$quote.custom1' => 'custom value',
|
'$quote.custom1' => 'custom value',
|
||||||
'$quote.custom2' => 'custom value',
|
'$quote.custom2' => 'custom value',
|
||||||
'$quote.custom3' => 'custom value',
|
'$quote.custom3' => 'custom value',
|
||||||
@ -395,10 +395,10 @@ class PdfMock
|
|||||||
'$valid_until' => '',
|
'$valid_until' => '',
|
||||||
'$your_entity' => '',
|
'$your_entity' => '',
|
||||||
'$shipping' => ctrans('texts.shipping_address'),
|
'$shipping' => ctrans('texts.shipping_address'),
|
||||||
'$balance_due' => '$0.00',
|
'$balance_due' => '$1110.00',
|
||||||
'$outstanding' => '$0.00',
|
'$outstanding' => '$440.00',
|
||||||
'$partial_due' => '$0.00',
|
'$partial_due' => '$50.00',
|
||||||
'$quote.total' => '$0.00',
|
'$quote.total' => '$10.00',
|
||||||
'$payment_due' => ' ',
|
'$payment_due' => ' ',
|
||||||
'$credit.date' => '25/Feb/2023',
|
'$credit.date' => '25/Feb/2023',
|
||||||
'$invoiceDate' => '25/Feb/2023',
|
'$invoiceDate' => '25/Feb/2023',
|
||||||
@ -456,8 +456,8 @@ class PdfMock
|
|||||||
'$view_url' => 'http://ninja.test:8000/client/invoice/UAUY8vIPuno72igmXbbpldwo5BDDKIqs',
|
'$view_url' => 'http://ninja.test:8000/client/invoice/UAUY8vIPuno72igmXbbpldwo5BDDKIqs',
|
||||||
'$font_url' => 'https://fonts.googleapis.com/css2?family=Roboto&display=swap',
|
'$font_url' => 'https://fonts.googleapis.com/css2?family=Roboto&display=swap',
|
||||||
'$details' => '',
|
'$details' => '',
|
||||||
'$balance' => '$0.00',
|
'$balance' => '$40.00',
|
||||||
'$partial' => '$0.00',
|
'$partial' => '$30.00',
|
||||||
'$client1' => 'custom value',
|
'$client1' => 'custom value',
|
||||||
'$client2' => 'custom value',
|
'$client2' => 'custom value',
|
||||||
'$client3' => 'custom value',
|
'$client3' => 'custom value',
|
||||||
@ -471,7 +471,7 @@ class PdfMock
|
|||||||
'$website' => 'http://www.parisian.org/',
|
'$website' => 'http://www.parisian.org/',
|
||||||
'$entity' => '',
|
'$entity' => '',
|
||||||
'$thanks' => 'Thanks!',
|
'$thanks' => 'Thanks!',
|
||||||
'$amount' => '$0.00',
|
'$amount' => '$30.00',
|
||||||
'$method' => ' ',
|
'$method' => ' ',
|
||||||
'$number' => '0029',
|
'$number' => '0029',
|
||||||
'$footer' => 'Default invoice footer',
|
'$footer' => 'Default invoice footer',
|
||||||
@ -481,8 +481,8 @@ class PdfMock
|
|||||||
'_rate1' => '',
|
'_rate1' => '',
|
||||||
'_rate2' => '',
|
'_rate2' => '',
|
||||||
'_rate3' => '',
|
'_rate3' => '',
|
||||||
'$taxes' => '$0.00',
|
'$taxes' => '$40.00',
|
||||||
'$total' => '$0.00',
|
'$total' => '$10.00',
|
||||||
'$phone' => ' ',
|
'$phone' => ' ',
|
||||||
'$terms' => 'Default company invoice terms',
|
'$terms' => 'Default company invoice terms',
|
||||||
'$from' => 'Bob Jones',
|
'$from' => 'Bob Jones',
|
||||||
|
File diff suppressed because one or more lines are too long
@ -285,7 +285,7 @@ class TemplateService
|
|||||||
'projects' => $processed = [],
|
'projects' => $processed = [],
|
||||||
'purchase_orders' => (new VendorHtmlEngine($value->first()->invitations()->first()))->generateLabelsAndValues() ?? [],
|
'purchase_orders' => (new VendorHtmlEngine($value->first()->invitations()->first()))->generateLabelsAndValues() ?? [],
|
||||||
};
|
};
|
||||||
|
|
||||||
return $processed;
|
return $processed;
|
||||||
|
|
||||||
})->toArray();
|
})->toArray();
|
||||||
@ -377,6 +377,8 @@ class TemplateService
|
|||||||
'credit_balance' => $invoice->client->credit_balance,
|
'credit_balance' => $invoice->client->credit_balance,
|
||||||
],
|
],
|
||||||
'payments' => $payments,
|
'payments' => $payments,
|
||||||
|
'total_tax_map' => $invoice->calc()->getTotalTaxMap(),
|
||||||
|
'line_tax_map' => $invoice->calc()->getTaxMap(),
|
||||||
];
|
];
|
||||||
|
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user