124 lines
7.2 KiB
PHP
124 lines
7.2 KiB
PHP
<?php
|
|
/**
|
|
* @var \App\View\AppView $this
|
|
* @var iterable<\Cake\Datasource\EntityInterface> $deJournalItems
|
|
*/
|
|
?>
|
|
<div class="deJournalItems index content">
|
|
<?= $this->Html->link(__('New De Journal Entry'), ['controller' => 'DeJournalEntries', 'action' => 'add'], ['class' => 'button float-right']) ?>
|
|
<h3><?= __('De Journal Items') ?></h3>
|
|
<div class="table-responsive">
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th><?= $this->Paginator->sort('created') ?></th>
|
|
<th><?= $this->Paginator->sort('journal_entry.journal_id', 'Journal') ?></th>
|
|
<th><?= $this->Paginator->sort('de_journal_entry_id', 'Journal Entry') ?></th>
|
|
<th><?= $this->Paginator->sort('external_account_number_credit', 'DR Ext. Account') ?></th>
|
|
<th><?= $this->Paginator->sort('external_account_number_debit', 'CR Ext. Account') ?></th>
|
|
<th><?= $this->Paginator->sort('account_number_credit', 'Credit Account') ?></th>
|
|
<th><?= $this->Paginator->sort('account_number_debit', 'Debit Account') ?></th>
|
|
<th><?= $this->Paginator->sort('account_number_debit', 'Debit') ?></th>
|
|
<th><?= $this->Paginator->sort('account_number_credit', 'Credit') ?></th>
|
|
<th class="actions"><?= __('Actions') ?></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php foreach ($deJournalItems as $deJournalItem): ?>
|
|
<tr>
|
|
<td><?= h($deJournalItem->created) ?></td>
|
|
<td>
|
|
<?= $deJournalItem->hasValue('de_journal_entry') && $deJournalItem->de_journal_entry->hasValue('de_journal') ?
|
|
$this->Html->link($deJournalItem->de_journal_entry->de_journal->name, ['controller' => 'DeJournals', 'action' => 'view', $deJournalItem->de_journal_entry->journal_id]) :
|
|
'' ?>
|
|
</td>
|
|
<td>
|
|
<?= $deJournalItem->hasValue('de_journal_entry') ?
|
|
$this->Html->link($deJournalItem->de_journal_entry->id, ['controller' => 'DeJournalEntries', 'action' => 'view', $deJournalItem->de_journal_entry->id]) :
|
|
'' ?>
|
|
</td>
|
|
<td colspan="2" style="text-align: center;">
|
|
<?= $deJournalItem->hasValue('debit_de_external_account') ?
|
|
$this->Html->link($deJournalItem->debit_de_external_account->account_number, [
|
|
'controller' => 'DeExternalAccounts',
|
|
'action' => 'view',
|
|
$deJournalItem->debit_de_external_account->account_number]) :
|
|
'' ?>
|
|
</td>
|
|
<td colspan="2" style="text-align: right;">
|
|
<?= $deJournalItem->hasValue('debit_de_account') ?
|
|
$this->Html->link($deJournalItem->debit_de_account->account_number_and_name, [
|
|
'controller' => 'DeAccounts',
|
|
'action' => 'view',
|
|
$deJournalItem->debit_de_account->account_number]) :
|
|
'' ?>
|
|
</td>
|
|
<td><?= $deJournalItem->hasValue('debit_de_account') ? $this->Number->format($deJournalItem->amount) : ''; ?></td>
|
|
<td><?= ''; ?></td>
|
|
<td class="actions">
|
|
<?= $this->Html->link(__('View'), ['action' => 'view', $deJournalItem->id]) ?>
|
|
<?= $this->Html->link(__('Edit'), ['action' => 'edit', $deJournalItem->id]) ?>
|
|
<?= $this->Form->postLink(__('Delete'), ['action' => 'delete', $deJournalItem->id], ['confirm' => __('Are you sure you want to delete # {0}?', $deJournalItem->id)]) ?>
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<tr>
|
|
<td><?= h($deJournalItem->created) ?></td>
|
|
<td>
|
|
<?= $deJournalItem->hasValue('de_journal_entry') && $deJournalItem->de_journal_entry->hasValue('de_journal') ?
|
|
$this->Html->link($deJournalItem->de_journal_entry->de_journal->name, ['controller' => 'DeJournals', 'action' => 'view', $deJournalItem->de_journal_entry->journal_id]) :
|
|
'' ?>
|
|
</td>
|
|
<td>
|
|
<?= $deJournalItem->hasValue('de_journal_entry') ?
|
|
$this->Html->link($deJournalItem->de_journal_entry->id, ['controller' => 'DeJournalEntries', 'action' => 'view', $deJournalItem->de_journal_entry->id]) :
|
|
'' ?>
|
|
</td>
|
|
<td colspan="2" style="text-align: center;">
|
|
<?= $deJournalItem->hasValue('credit_de_external_account') ?
|
|
$this->Html->link($deJournalItem->credit_de_external_account->account_number, [
|
|
'controller' => 'DeExternalAccounts',
|
|
'action' => 'view',
|
|
$deJournalItem->credit_de_external_account->account_number]) :
|
|
'' ?>
|
|
</td>
|
|
<td colspan="2" style="text-align: right;">
|
|
<?= $deJournalItem->hasValue('credit_de_account') ?
|
|
$this->Html->link($deJournalItem->credit_de_account->account_number_and_name, [
|
|
'controller' => 'DeAccounts',
|
|
'action' => 'view',
|
|
$deJournalItem->credit_de_account->account_number]) :
|
|
'' ?>
|
|
</td>
|
|
<td><?= ''; ?></td>
|
|
<td><?= $deJournalItem->hasValue('credit_de_account') ? $this->Number->format($deJournalItem->amount) : ''; ?></td>
|
|
<td class="actions">
|
|
<?= $this->Html->link(__('View'), ['action' => 'view', $deJournalItem->id]) ?>
|
|
<?= $this->Html->link(__('Edit'), ['action' => 'edit', $deJournalItem->id]) ?>
|
|
<?= $this->Form->postLink(__('Delete'), ['action' => 'delete', $deJournalItem->id], ['confirm' => __('Are you sure you want to delete # {0}?', $deJournalItem->id)]) ?>
|
|
</td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div class="paginator">
|
|
<ul class="pagination">
|
|
<?= $this->Paginator->first('<< ' . __('first')) ?>
|
|
<?= $this->Paginator->prev('< ' . __('previous')) ?>
|
|
<?= $this->Paginator->numbers() ?>
|
|
<?= $this->Paginator->next(__('next') . ' >') ?>
|
|
<?= $this->Paginator->last(__('last') . ' >>') ?>
|
|
</ul>
|
|
<p><?= $this->Paginator->counter(__('Page {{page}} of {{pages}}, showing {{current}} record(s) out of {{count}} total')) ?></p>
|
|
</div>
|
|
</div>
|