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

Scaffold statement-aging-table

This commit is contained in:
Benjamin Beganović 2021-08-23 14:50:39 +02:00
parent c7cd6e8281
commit 8a188dd731

View File

@ -136,6 +136,10 @@ class Design extends BaseDesign
'id' => 'statement-payment-table',
'elements' => $this->statementPaymentTable(),
],
'statement-aging-table' => [
'id' => 'statement-aging-table',
'elements' => $this->statementAgingTable(),
],
'table-totals' => [
'id' => 'table-totals',
'elements' => $this->tableTotals(),
@ -392,6 +396,32 @@ class Design extends BaseDesign
];
}
public function statementAgingTable()
{
if (is_null($this->payments) || $this->type !== self::STATEMENT) {
return [];
}
return [
['element' => 'thead', 'elements' => [
['element' => 'th', 'content' => '0-30', 'properties' => []],
['element' => 'th', 'content' => '30-60', 'properties' => []],
['element' => 'th', 'content' => '60-90', 'properties' => []],
['element' => 'th', 'content' => '90-120', 'properties' => []],
['element' => 'th', 'content' => '120+', 'properties' => []],
]],
['element' => 'tbody', 'elements' => [
['element' => 'tr', 'elements' => [
['element' => 'td', 'content' => '$0.00'],
['element' => 'td', 'content' => '$0.00'],
['element' => 'td', 'content' => '$0.00'],
['element' => 'td', 'content' => '$0.00'],
['element' => 'td', 'content' => '$0.00'],
]],
]],
];
}
/**
* Generate the structure of table headers. (<thead/>)
*