1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-20 16:31:33 +02:00

Add net_subtotal option

This commit is contained in:
David Bomba 2021-07-18 18:57:26 +10:00
parent 729c92a343
commit 53f6aeb9d3
2 changed files with 2 additions and 0 deletions

View File

@ -663,6 +663,7 @@ class CompanySettings extends BaseSettings
'$task.line_total',
],
'total_columns' => [
'$net_subtotal',
'$subtotal',
'$discount',
'$custom_surcharge1',

View File

@ -167,6 +167,7 @@ class HtmlEngine
$data['$invoice.discount'] = ['value' => Number::formatMoney($this->entity_calc->getTotalDiscount(), $this->client) ?: ' ', 'label' => ctrans('texts.discount')];
$data['$discount'] = &$data['$invoice.discount'];
$data['$subtotal'] = ['value' => Number::formatMoney($this->entity_calc->getSubTotal(), $this->client) ?: ' ', 'label' => ctrans('texts.subtotal')];
$data['$net_subtotal'] = ['value' => Number::formatMoney(($this->entity_calc->getSubTotal() - $this->entity->total_taxes), $this->client) ?: ' ', 'label' => ctrans('texts.subtotal')];
$data['$invoice.subtotal'] = &$data['$subtotal'];
if ($this->entity->partial > 0) {