mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-08 17:04:30 -04:00
Merge pull request #4698 from beganovich/v5-data-refs-for-totals-table
(v5) Add data-refs to totals table for PDFs
This commit is contained in:
commit
c46fc2f97b
@ -448,11 +448,11 @@ class Design extends BaseDesign
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($taxes as $tax) {
|
foreach ($taxes as $i => $tax) {
|
||||||
$elements[] = ['element' => 'div', 'elements' => [
|
$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' => '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' => $tax['name'], 'properties' => ['data-ref' => 'totals-table-total_tax_' . $i . '-label']],
|
||||||
['element' => 'span', 'content', 'content' => Number::formatMoney($tax['total'], $this->context['client'])],
|
['element' => 'span', 'content', 'content' => Number::formatMoney($tax['total'], $this->context['client']), 'properties' => ['data-ref' => 'totals-table-total_tax_' . $i]],
|
||||||
]];
|
]];
|
||||||
}
|
}
|
||||||
} elseif ($variable == '$line_taxes') {
|
} elseif ($variable == '$line_taxes') {
|
||||||
@ -462,18 +462,18 @@ class Design extends BaseDesign
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($taxes as $tax) {
|
foreach ($taxes as $i => $tax) {
|
||||||
$elements[] = ['element' => 'div', 'elements' => [
|
$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' => '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' => $tax['name'], 'properties' => ['data-ref' => 'totals-table-line_tax_' . $i . '-label']],
|
||||||
['element' => 'span', 'content', 'content' => Number::formatMoney($tax['total'], $this->context['client'])],
|
['element' => 'span', 'content', 'content' => Number::formatMoney($tax['total'], $this->context['client']), 'properties' => ['data-ref' => 'totals-table-line_tax_' . $i]],
|
||||||
]];
|
]];
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$elements[] = ['element' => 'div', 'elements' => [
|
$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' => '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 . '_label', 'properties' => ['data-ref' => 'totals_table-' . substr($variable, 1) . '-label']],
|
||||||
['element' => 'span', 'content' => $variable],
|
['element' => 'span', 'content' => $variable, 'properties' => ['data-ref' => 'totals_table-' . substr($variable, 1)]],
|
||||||
]];
|
]];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user