mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-03 16:54:36 -04:00
add data-refs to taxes
This commit is contained in:
parent
7eb8da061b
commit
8df374c9db
@ -448,11 +448,11 @@ class Design extends BaseDesign
|
||||
continue;
|
||||
}
|
||||
|
||||
foreach ($taxes as $tax) {
|
||||
foreach ($taxes as $i => $tax) {
|
||||
$elements[] = ['element' => 'div', 'elements' => [
|
||||
['element' => 'span', 'content' => 'This is placeholder for the 3rd fraction of element.', 'properties' => ['style' => 'opacity: 0%']], // Placeholder for fraction of element (3fr)
|
||||
['element' => 'span', 'content', 'content' => $tax['name']],
|
||||
['element' => 'span', 'content', 'content' => Number::formatMoney($tax['total'], $this->context['client'])],
|
||||
['element' => 'span', 'content', 'content' => $tax['name'], 'properties' => ['data-ref' => 'totals-table-total_tax_' . $i . '-label']],
|
||||
['element' => 'span', 'content', 'content' => Number::formatMoney($tax['total'], $this->context['client']), 'properties' => ['data-ref' => 'totals-table-total_tax_' . $i]],
|
||||
]];
|
||||
}
|
||||
} elseif ($variable == '$line_taxes') {
|
||||
@ -462,18 +462,18 @@ class Design extends BaseDesign
|
||||
continue;
|
||||
}
|
||||
|
||||
foreach ($taxes as $tax) {
|
||||
foreach ($taxes as $i => $tax) {
|
||||
$elements[] = ['element' => 'div', 'elements' => [
|
||||
['element' => 'span', 'content' => 'This is placeholder for the 3rd fraction of element.', 'properties' => ['style' => 'opacity: 0%']], // Placeholder for fraction of element (3fr)
|
||||
['element' => 'span', 'content', 'content' => $tax['name']],
|
||||
['element' => 'span', 'content', 'content' => Number::formatMoney($tax['total'], $this->context['client'])],
|
||||
['element' => 'span', 'content', 'content' => $tax['name'], 'properties' => ['data-ref' => 'totals-table-line_tax_' . $i . '-label']],
|
||||
['element' => 'span', 'content', 'content' => Number::formatMoney($tax['total'], $this->context['client']), 'properties' => ['data-ref' => 'totals-table-line_tax_' . $i]],
|
||||
]];
|
||||
}
|
||||
} else {
|
||||
$elements[] = ['element' => 'div', 'elements' => [
|
||||
['element' => 'span', 'content' => 'This is placeholder for the 3rd fraction of element.', 'properties' => ['style' => 'opacity: 0%']], // Placeholder for fraction of element (3fr)
|
||||
['element' => 'span', 'content' => $variable . '_label', 'properties' => ['data-ref' => 'totals_table-' . substr($variable, 1)]],
|
||||
['element' => 'span', 'content' => $variable],
|
||||
['element' => 'span', 'content' => $variable . '_label', 'properties' => ['data-ref' => 'totals_table-' . substr($variable, 1) . '-label']],
|
||||
['element' => 'span', 'content' => $variable, 'properties' => ['data-ref' => 'totals_table-' . substr($variable, 1)]],
|
||||
]];
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user