Further tweaked the code to add new transactions, primarily by creating separate verification and addition functions in each underlying model. There are logic changes as well, such as adding in the other half of the missing double entry (as well as the double entry itself). This checkin also introduces the creation of CREDIT statement entries, when the customer has overpayed. It's working fairly well, although undoubtedly will need more tweaking.

git-svn-id: file:///svn-source/pmgr/branches/yafr_20090716@394 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
abijah
2009-07-28 01:16:42 +00:00
parent ba62eed027
commit b3389652fd
6 changed files with 447 additions and 374 deletions

View File

@@ -372,6 +372,7 @@ class Customer extends AppModel {
'fields' => $this->StatementEntry->chargePaymentFields(true),
'conditions' => array('StatementEntry.customer_id' => $id),
));
$find_stats = $find_stats[0];
pr(compact('find_stats'));
$tquery = $query;
@@ -395,7 +396,8 @@ class Customer extends AppModel {
$ar_transaction_stats += $ar_transaction_stats['LedgerEntry'];
pr(compact('ar_transaction_stats'));
$stats = $ar_transaction_stats;
//$stats = $ar_transaction_stats;
$stats = $find_stats;
return $stats;
}