CakeAccounting/templates/DeAccounts/index.php

37 lines
1.3 KiB
PHP

<?php
/**
* @var \App\View\AppView $this
* @var iterable<\Cake\Datasource\EntityInterface> $deAccounts
*/
?>
<div class="deAccounts index content">
<?= $this->Html->link(__('Use Account Templates'), [
'plugin' => 'CakeAccounting',
'controller' => 'DeAccountTemplates',
'action' => 'index'
], ['class' => 'button float-right']) ?>
<?= $this->Html->link(__('New De Account'), ['action' => 'add'], ['class' => 'button float-right']) ?>
<h3><?= __('De Accounts') ?></h3>
<div class="table-responsive">
<table>
<thead>
<tr>
<th><?= 'Account Type' ?></th>
<th><?= 'Account Number' ?></th>
<th><?= 'Name' ?></th>
<th><?= 'Total' ?></th>
<th class="actions"><?= __('Actions') ?></th>
</tr>
</thead>
<tbody>
<?php foreach ($deAccounts as $deAccount) : ?>
<?= $this->element('DeAccounts/row', [
'account' => $deAccount,
'totals' => array_key_exists($deAccount->account_number, $totals) ? $totals[$deAccount->account_number] : [],
]); ?>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>