git-svn-id: file:///svn-source/pmgr/branches/invoice_receipt_20090629@336 97e9348a-65ac-dc4b-aefc-98561f571b83
75 lines
2.9 KiB
PHP
75 lines
2.9 KiB
PHP
<?php /* -*- mode:PHP -*- */
|
|
|
|
echo '<div class="account deposit">' . "\n";
|
|
echo '<H2>Perform Bank Deposit</H2>' . "\n";
|
|
echo '<P>Make sure to select the checkboxes below for only those types of currency (Cash, Check, etc) which you intend to actually deposit (you can see all the individual items by dropping down the list below the checkbox). Then, select the Deposit Account where you will make the deposit, and click "Perform Deposit" to close the books on the selected currency types and reset them to a zero balance. On the next page, you will be provided with a deposit slip to prepare the actual deposit.' . "\n";
|
|
echo '<P><BR>' . "\n";
|
|
|
|
//pr(compact('tillableAccount', 'depositableAccount'));
|
|
|
|
echo $form->create(null, array('id' => 'deposit-form',
|
|
'url' => array('controller' => 'accounts',
|
|
'action' => 'deposit')));
|
|
|
|
foreach ($tillableAccount AS $acct) {
|
|
//$acct = $acct['Account'];
|
|
|
|
echo "\n";
|
|
echo $form->input('Tillable.Ledger.'.$acct['CurrentLedger']['id'].'.checked',
|
|
array(//'label' => $acct['Account']['name'],
|
|
'type' => 'checkbox',
|
|
'checked' => true,
|
|
'value' => true,
|
|
'label' => (" I have exactly " .
|
|
FormatHelper::currency($acct['Account']['stats']['Ledger']['balance']) .
|
|
" in " . ($acct['Account']['name'] === 'Cash'
|
|
? 'Cash'
|
|
: Inflector::pluralize($acct['Account']['name'])) .
|
|
" and will be depositing it all.")
|
|
));
|
|
echo "\n";
|
|
echo $form->input('Tillable.Ledger.'.$acct['CurrentLedger']['id'].'.amount',
|
|
array('type' => 'hidden',
|
|
'value' => $acct['Account']['stats']['Ledger']['balance'],
|
|
));
|
|
echo "\n";
|
|
echo $form->input('Tillable.Ledger.'.$acct['CurrentLedger']['id'].'.account_id',
|
|
array('type' => 'hidden',
|
|
'value' => $acct['Account']['id'],
|
|
));
|
|
echo "\n";
|
|
echo $form->input('Tillable.Ledger.'.$acct['CurrentLedger']['id'].'.account_name',
|
|
array('type' => 'hidden',
|
|
'value' => $acct['Account']['name'],
|
|
));
|
|
echo "\n";
|
|
|
|
$grid_div_id = 'ledger_entries'.$acct['CurrentLedger']['id'].'-list';
|
|
echo $this->element('ledger_entries', array
|
|
(// Element configuration
|
|
'ledger_id' => $acct['CurrentLedger']['id'],
|
|
'no_account' => true,
|
|
|
|
// Grid configuration
|
|
'config' => array
|
|
(
|
|
'grid_div_id' => $grid_div_id,
|
|
'caption' => ('<A HREF="#" ONCLICK="$(\'#'.$grid_div_id.' .HeaderButton\').click();'.
|
|
' return false;">Items in '.$acct['Account']['name'].' Ledger</A>'),
|
|
'grid_setup' => array('hiddengrid' => true),
|
|
),
|
|
));
|
|
}
|
|
|
|
$options = array();
|
|
foreach ($depositableAccount AS $acct) {
|
|
$options[$acct['Account']['id']] = $acct['Account']['name'];
|
|
}
|
|
|
|
echo $form->input('Deposit.Account.id', array('label' => 'Deposit Account ',
|
|
'options' => $options));
|
|
echo $form->end('Perform Deposit');
|
|
|
|
/* End page div */
|
|
echo '</div>' . "\n";
|