mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-07 21:54:30 -04:00
Minor Fixes for templates
This commit is contained in:
parent
1cf829b137
commit
9294e2c347
@ -144,8 +144,8 @@ class Statement
|
||||
'variables' => collect([$variables]),
|
||||
'invoices' => $this->getInvoices()->get(),
|
||||
'payments' => $this->options['show_payments_table'] ? $this->getPayments()->get() : collect([]),
|
||||
'credits' => $this->options['show_credits_table'] ? $this->getCredits()->get() : [],
|
||||
'aging' => $this->options['show_aging_table'] ? $this->getAging() : [],
|
||||
'credits' => $this->options['show_credits_table'] ? $this->getCredits()->get() : collect([]),
|
||||
'aging' => $this->options['show_aging_table'] ? $this->getAging() : collect([]),
|
||||
]);
|
||||
|
||||
$html = $ts->getHtml();
|
||||
|
@ -195,7 +195,6 @@ class PdfMock
|
||||
{
|
||||
return ['values' =>
|
||||
[
|
||||
|
||||
'$client.shipping_postal_code' => '46420',
|
||||
'$client.billing_postal_code' => '11243',
|
||||
'$company.city_state_postal' => 'Beveley Hills, CA, 90210',
|
||||
@ -496,6 +495,8 @@ class PdfMock
|
||||
'$show_shipping_address' => $this->settings->show_shipping_address ? 'flex' : 'none',
|
||||
'$show_shipping_address_block' => $this->settings->show_shipping_address ? 'block' : 'none',
|
||||
'$show_shipping_address_visibility' => $this->settings->show_shipping_address ? 'visible' : 'hidden',
|
||||
'$start_date' => '31/01/2023',
|
||||
'$end_date' => '31/12/2023',
|
||||
],
|
||||
'labels' => $this->mockTranslatedLabels(),
|
||||
];
|
||||
@ -811,6 +812,8 @@ class PdfMock
|
||||
'$tax_label' => ctrans('texts.tax'),
|
||||
'$dir_label' => '',
|
||||
'$to_label' => ctrans('texts.to'),
|
||||
'$start_date_label' => ctrans('texts.start_date'),
|
||||
'$end_date_label' => ctrans('texts.end_date'),
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -84,6 +84,12 @@ class TemplateService
|
||||
});
|
||||
$this->twig->addFunction($function);
|
||||
|
||||
$filter = new \Twig\TwigFilter('sum', function (array $array, string $column) {
|
||||
return array_sum(array_column($array, $column));
|
||||
});
|
||||
|
||||
$this->twig->addFilter($filter);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
@ -5163,6 +5163,8 @@ $LANG = array(
|
||||
'click_or_drop_files_here' => 'Click or drop files here',
|
||||
'payment_refund_receipt' => 'Payment Refund Receipt # :number',
|
||||
'payment_receipt' => 'Payment Receipt # :number',
|
||||
'load_template_description' => 'The template will be applied to following:',
|
||||
'run_template' => 'Run template',
|
||||
);
|
||||
|
||||
return $LANG;
|
||||
|
Loading…
x
Reference in New Issue
Block a user