132 lines
7.4 KiB
PHP
132 lines
7.4 KiB
PHP
<?php
|
|
/**
|
|
* @var \App\View\AppView $this
|
|
* @var \Cake\Datasource\EntityInterface $deAccount
|
|
*/
|
|
?>
|
|
<div class="row">
|
|
<aside class="column">
|
|
<div class="side-nav">
|
|
<h4 class="heading"><?= __('Actions') ?></h4>
|
|
<?= $this->Html->link(__('Edit De Account'), ['action' => 'edit', $deAccount->id], ['class' => 'side-nav-item']) ?>
|
|
<?= $this->Form->postLink(__('Delete De Account'), ['action' => 'delete', $deAccount->id], ['confirm' => __('Are you sure you want to delete # {0}?', $deAccount->id), 'class' => 'side-nav-item']) ?>
|
|
<?= $this->Html->link(__('List De Accounts'), ['action' => 'index'], ['class' => 'side-nav-item']) ?>
|
|
<?= $this->Html->link(__('New De Account'), ['action' => 'add'], ['class' => 'side-nav-item']) ?>
|
|
</div>
|
|
</aside>
|
|
<div class="column column-80">
|
|
<div class="deAccounts view content">
|
|
<h3><?= h($deAccount->name) ?></h3>
|
|
<h5><?= 'Current Balance: '; ?><strong>
|
|
<?= $totals && array_key_exists($deAccount->account_number, $totals) && array_key_exists('balance', $totals[$deAccount->account_number]) ? $this->Number->format($totals[$deAccount->account_number]['balance']) : 0; ?>
|
|
</strong>
|
|
</h5>
|
|
<table>
|
|
<?php if ($deAccount->hasValue('parent_de_account')) : ?>
|
|
<tr>
|
|
<th><?= __('Parent De Account') ?></th>
|
|
<td>
|
|
<?= $deAccount->hasValue('parent_de_account') ? $this->Html->link($deAccount->parent_de_account->name, [
|
|
'controller' => 'DeAccounts',
|
|
'action' => 'view',
|
|
$deAccount->parent_de_account->id,
|
|
]) : '' ?></td>
|
|
</tr>
|
|
<?php endif; ?>
|
|
<tr>
|
|
<th><?= __('De Account Type') ?></th>
|
|
<td><?= $deAccount->hasValue('de_account_type') ? $this->Html->link($deAccount->de_account_type->name, ['controller' => 'DeAccountTypes', 'action' => 'view', $deAccount->de_account_type->account_type_code]) : '' ?></td>
|
|
</tr>
|
|
<tr>
|
|
<th><?= __('Name') ?></th>
|
|
<td><?= h($deAccount->name) ?></td>
|
|
</tr>
|
|
<tr>
|
|
<th><?= __('Account Number') ?></th>
|
|
<td><?= $deAccount->account_number ?></td>
|
|
</tr>
|
|
<tr>
|
|
<th><?= __('Account Limit') ?></th>
|
|
<td><?= $deAccount->account_limit === null ? '' : $this->Number->format($deAccount->account_limit) ?></td>
|
|
</tr>
|
|
<tr>
|
|
<th><?= __('Can Credit') ?></th>
|
|
<td><?= $deAccount->can_credit ? __('Yes') : __('No'); ?></td>
|
|
</tr>
|
|
<tr>
|
|
<th><?= __('Can Debit') ?></th>
|
|
<td><?= $deAccount->can_debit ? __('Yes') : __('No'); ?></td>
|
|
</tr>
|
|
</table>
|
|
<div class="related">
|
|
<h4><?= __('Related De Accounts') ?></h4>
|
|
<?php if (!empty($deAccount->child_de_accounts)) : ?>
|
|
<div class="table-responsive">
|
|
<table>
|
|
<tr>
|
|
<th><?= __('Id') ?></th>
|
|
<th><?= __('Account Number') ?></th>
|
|
<th><?= __('Parent Id') ?></th>
|
|
<th><?= __('Lft') ?></th>
|
|
<th><?= __('Rght') ?></th>
|
|
<th><?= __('Account Type Code') ?></th>
|
|
<th><?= __('Name') ?></th>
|
|
<th><?= __('Account Limit') ?></th>
|
|
<th><?= __('Can Credit') ?></th>
|
|
<th><?= __('Can Debit') ?></th>
|
|
<th class="actions"><?= __('Actions') ?></th>
|
|
</tr>
|
|
<?php foreach ($deAccount->child_de_accounts as $childDeAccounts) : ?>
|
|
<tr>
|
|
<td><?= h($childDeAccounts->id) ?></td>
|
|
<td><?= h($childDeAccounts->account_number) ?></td>
|
|
<td><?= h($childDeAccounts->parent_id) ?></td>
|
|
<td><?= h($childDeAccounts->lft) ?></td>
|
|
<td><?= h($childDeAccounts->rght) ?></td>
|
|
<td><?= h($childDeAccounts->account_type_code) ?></td>
|
|
<td><?= h($childDeAccounts->name) ?></td>
|
|
<td><?= h($childDeAccounts->account_limit) ?></td>
|
|
<td><?= h($childDeAccounts->can_credit) ?></td>
|
|
<td><?= h($childDeAccounts->can_debit) ?></td>
|
|
<td class="actions">
|
|
<?= $this->Html->link(__('View'), ['controller' => 'DeAccounts', 'action' => 'view', $childDeAccounts->id]) ?>
|
|
<?= $this->Html->link(__('Edit'), ['controller' => 'DeAccounts', 'action' => 'edit', $childDeAccounts->id]) ?>
|
|
<?= $this->Form->postLink(__('Delete'), ['controller' => 'DeAccounts', 'action' => 'delete', $childDeAccounts->id], ['confirm' => __('Are you sure you want to delete # {0}?', $childDeAccounts->id)]) ?>
|
|
</td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</table>
|
|
</div>
|
|
<?php endif; ?>
|
|
</div>
|
|
<div class="related">
|
|
<h4><?= __('Related De Account Statements') ?></h4>
|
|
<?php if (!empty($deAccount->de_account_statements)) : ?>
|
|
<div class="table-responsive">
|
|
<table>
|
|
<tr>
|
|
<th><?= __('Account Number') ?></th>
|
|
<th><?= __('Statement Date') ?></th>
|
|
<th><?= __('Closing Balance') ?></th>
|
|
<th class="actions"><?= __('Actions') ?></th>
|
|
</tr>
|
|
<?php foreach ($deAccount->de_account_statements as $deAccountStatements) : ?>
|
|
<tr>
|
|
<td><?= h($deAccountStatements->account_number) ?></td>
|
|
<td><?= h($deAccountStatements->statement_date) ?></td>
|
|
<td><?= h($deAccountStatements->closing_balance) ?></td>
|
|
<td class="actions">
|
|
<?= $this->Html->link(__('View'), ['controller' => 'DeAccountStatements', 'action' => 'view', $deAccountStatements->account_number]) ?>
|
|
<?= $this->Html->link(__('Edit'), ['controller' => 'DeAccountStatements', 'action' => 'edit', $deAccountStatements->account_number]) ?>
|
|
<?= $this->Form->postLink(__('Delete'), ['controller' => 'DeAccountStatements', 'action' => 'delete', $deAccountStatements->account_number], ['confirm' => __('Are you sure you want to delete # {0}?', $deAccountStatements->account_number)]) ?>
|
|
</td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</table>
|
|
</div>
|
|
<?php endif; ?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|