Moving back to the Invoice/Receipt mechanism. Seems to work fairly well, even if it's non-standard.

git-svn-id: file:///svn-source/pmgr/branches/charge_credit_20090629/site@189 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
abijah
2009-06-30 04:47:18 +00:00
parent 10f71a1fe3
commit 9fea9c79f3
2 changed files with 11 additions and 7 deletions

View File

@@ -304,7 +304,7 @@ class LedgerEntriesController extends AppController {
'conditions' => array('LedgerEntry.id' => $id),
));
pr($entry);
//pr($entry);
// Because 'DebitLedger' and 'CreditLedger' both relate to 'Account',
// CakePHP will not include them in the LedgerEntry->find (or so it

View File

@@ -81,12 +81,16 @@ echo $this->element('table',
echo '<div class="infobox">' . "\n";
$rows = array();
if ($debit_ledger['Account']['trackable']) {
$rows[] = array('Debit Amount Reconciled:', FormatHelper::currency($stats['debit_amount_reconciled']));
$rows[] = array('Debit Amount Remaining:', FormatHelper::currency($stats['debit_amount_remaining']));
$rows[] = array("Applied from {$debit_ledger['Account']['name']}:",
FormatHelper::currency($stats['debit_amount_reconciled']));
$rows[] = array("{$debit_ledger['Account']['name']} Amount Remaining:",
FormatHelper::currency($stats['debit_amount_remaining']));
}
if ($credit_ledger['Account']['trackable']) {
$rows[] = array('Credit Amount Reconciled:', FormatHelper::currency($stats['credit_amount_reconciled']));
$rows[] = array('Credit Amount Remaining:', FormatHelper::currency($stats['credit_amount_remaining']));
$rows[] = array("Applied to {$credit_ledger['Account']['name']}:",
FormatHelper::currency($stats['credit_amount_reconciled']));
$rows[] = array("{$credit_ledger['Account']['name']} Amount Remaining:",
FormatHelper::currency($stats['credit_amount_remaining']));
}
echo $this->element('table',
array('class' => 'summary',
@@ -113,7 +117,7 @@ echo '<div CLASS="detail supporting">' . "\n";
if ($debit_ledger['Account']['trackable']) {
echo $this->element('ledger_entries',
array('caption' => "Payments Received",
array('caption' => "Applied to " . $debit_ledger['Account']['name'],
'grid_div_id' => 'debit_reconciliation_ledger_entries',
'account_ftype' => 'debit',
'reconcile_id' => $entry['id'],
@@ -123,7 +127,7 @@ if ($debit_ledger['Account']['trackable']) {
if ($credit_ledger['Account']['trackable']) {
echo $this->element('ledger_entries',
array('caption' => "Charges Paid",
array('caption' => "Applied to " . $credit_ledger['Account']['name'],
'grid_div_id' => 'credit_reconciliation_ledger_entries',
'account_ftype' => 'credit',
'reconcile_id' => $entry['id'],