mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Minor fixes for tax currencies - vendor vs client
This commit is contained in:
parent
2244da8947
commit
e34cb0a585
@ -58,8 +58,6 @@ class Design extends BaseDesign
|
|||||||
|
|
||||||
public $company;
|
public $company;
|
||||||
|
|
||||||
public $client_or_vendor_entity;
|
|
||||||
|
|
||||||
/** @var array */
|
/** @var array */
|
||||||
public $aging = [];
|
public $aging = [];
|
||||||
|
|
||||||
@ -803,7 +801,7 @@ class Design extends BaseDesign
|
|||||||
foreach ($taxes as $i => $tax) {
|
foreach ($taxes as $i => $tax) {
|
||||||
$elements[1]['elements'][] = ['element' => 'div', 'elements' => [
|
$elements[1]['elements'][] = ['element' => 'div', 'elements' => [
|
||||||
['element' => 'span', 'content', 'content' => $tax['name'], 'properties' => ['data-ref' => 'totals-table-total_tax_' . $i . '-label']],
|
['element' => 'span', 'content', 'content' => $tax['name'], 'properties' => ['data-ref' => 'totals-table-total_tax_' . $i . '-label']],
|
||||||
['element' => 'span', 'content', 'content' => Number::formatMoney($tax['total'], $this->entity instanceof \App\Models\PurchaseOrder ? $this->company : $this->client_or_vendor_entity), 'properties' => ['data-ref' => 'totals-table-total_tax_' . $i]],
|
['element' => 'span', 'content', 'content' => Number::formatMoney($tax['total'], $this->entity instanceof \App\Models\PurchaseOrder ? $this->vendor : $this->client), 'properties' => ['data-ref' => 'totals-table-total_tax_' . $i]],
|
||||||
]];
|
]];
|
||||||
}
|
}
|
||||||
} elseif ($variable == '$line_taxes') {
|
} elseif ($variable == '$line_taxes') {
|
||||||
@ -816,7 +814,7 @@ class Design extends BaseDesign
|
|||||||
foreach ($taxes as $i => $tax) {
|
foreach ($taxes as $i => $tax) {
|
||||||
$elements[1]['elements'][] = ['element' => 'div', 'elements' => [
|
$elements[1]['elements'][] = ['element' => 'div', 'elements' => [
|
||||||
['element' => 'span', 'content', 'content' => $tax['name'], 'properties' => ['data-ref' => 'totals-table-line_tax_' . $i . '-label']],
|
['element' => 'span', 'content', 'content' => $tax['name'], 'properties' => ['data-ref' => 'totals-table-line_tax_' . $i . '-label']],
|
||||||
['element' => 'span', 'content', 'content' => Number::formatMoney($tax['total'], $this->entity instanceof \App\Models\PurchaseOrder ? $this->company : $this->client_or_vendor_entity), 'properties' => ['data-ref' => 'totals-table-line_tax_' . $i]],
|
['element' => 'span', 'content', 'content' => Number::formatMoney($tax['total'], $this->entity instanceof \App\Models\PurchaseOrder ? $this->vendor : $this->client), 'properties' => ['data-ref' => 'totals-table-line_tax_' . $i]],
|
||||||
]];
|
]];
|
||||||
}
|
}
|
||||||
} elseif (Str::startsWith($variable, '$custom_surcharge')) {
|
} elseif (Str::startsWith($variable, '$custom_surcharge')) {
|
||||||
|
@ -32,12 +32,10 @@ trait DesignHelpers
|
|||||||
|
|
||||||
if (isset($this->context['vendor'])) {
|
if (isset($this->context['vendor'])) {
|
||||||
$this->vendor = $this->context['vendor'];
|
$this->vendor = $this->context['vendor'];
|
||||||
$this->client_or_vendor_entity = $this->context['vendor'];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($this->context['client'])) {
|
if (isset($this->context['client'])) {
|
||||||
$this->client = $this->context['client'];
|
$this->client = $this->context['client'];
|
||||||
$this->client_or_vendor_entity = $this->context['client'];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($this->context['entity'])) {
|
if (isset($this->context['entity'])) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user