git-svn-id: file:///svn-source/pmgr/branches/v0.2.0_work@900 97e9348a-65ac-dc4b-aefc-98561f571b83
102 lines
3.3 KiB
PHP
102 lines
3.3 KiB
PHP
<?php /* -*- mode:PHP -*- */
|
|
|
|
echo '<div class="tender view">' . "\n";
|
|
|
|
/**********************************************************************
|
|
**********************************************************************
|
|
**********************************************************************
|
|
**********************************************************************
|
|
* Tender Detail Main Section
|
|
*/
|
|
|
|
$ttype = $tender['TenderType'];
|
|
$customer = $tender['Customer'];
|
|
$entry = $tender['LedgerEntry'];
|
|
$transaction = $entry['Transaction'];
|
|
$tender = $tender['Tender'];
|
|
|
|
$rows = array();
|
|
$rows[] = array('Item', $tender['name']);
|
|
$rows[] = array('Received', FormatHelper::date($transaction['stamp']));
|
|
$rows[] = array('Customer', $html->link($customer['name'],
|
|
array('controller' => 'customers',
|
|
'action' => 'view',
|
|
$customer['id'])));
|
|
$rows[] = array('Amount', FormatHelper::currency($entry['amount']));
|
|
$rows[] = array('Type', $ttype['name']);
|
|
/* $rows[] = array('Type', $html->link($ttype['name'], */
|
|
/* array('controller' => 'tender_types', */
|
|
/* 'action' => 'view', */
|
|
/* $ttype['id']))); */
|
|
|
|
for ($i=1; $i<=4; ++$i)
|
|
if (!empty($ttype["data{$i}_name"]))
|
|
$rows[] = array($ttype["data{$i}_name"], $tender["data{$i}"]);
|
|
|
|
$rows[] = array('Deposit',
|
|
empty($tender['deposit_transaction_id'])
|
|
? "-"
|
|
: $html->link('#'.$tender['deposit_transaction_id'],
|
|
array('controller' => 'transactions',
|
|
'action' => 'deposit_slip',
|
|
$tender['deposit_transaction_id'])));
|
|
|
|
if (!empty($tender['nsf_transaction_id']))
|
|
$rows[] = array('NSF', $html->link('#'.$tender['nsf_transaction_id'],
|
|
array('controller' => 'transactions',
|
|
'action' => 'view',
|
|
$tender['nsf_transaction_id'])));
|
|
|
|
$rows[] = array('Comment', $tender['comment']);
|
|
|
|
echo $this->element('table',
|
|
array('class' => 'item tender detail',
|
|
'caption' => 'Legal Tender Detail',
|
|
'rows' => $rows,
|
|
'column_class' => array('field', 'value')));
|
|
|
|
|
|
/**********************************************************************
|
|
* Tender Info Box
|
|
*/
|
|
|
|
echo '<div class="infobox">' . "\n";
|
|
$rows = array();
|
|
echo $this->element('table',
|
|
array('class' => 'summary',
|
|
'rows' => $rows,
|
|
'column_class' => array('field', 'value'),
|
|
'suppress_alternate_rows' => true,
|
|
));
|
|
echo '</div>' . "\n";
|
|
|
|
|
|
/**********************************************************************
|
|
**********************************************************************
|
|
**********************************************************************
|
|
**********************************************************************
|
|
* Supporting Elements Section
|
|
*/
|
|
|
|
echo '<div CLASS="detail supporting">' . "\n";
|
|
|
|
|
|
/**********************************************************************
|
|
* Ledger Entries
|
|
*/
|
|
|
|
echo $this->element('ledger_entries', array
|
|
(// Grid configuration
|
|
'config' => array
|
|
('caption' => "Ledger Entries",
|
|
'filter' => array('id' => array($tender['ledger_entry_id'], $tender['nsf_ledger_entry_id'])),
|
|
'exclude' => array('Tender'),
|
|
)));
|
|
|
|
|
|
/* End "detail supporting" div */
|
|
echo '</div>' . "\n";
|
|
|
|
/* End page div */
|
|
echo '</div>' . "\n";
|