Stripped security deposits out of the Receipt page (and bad debt too). Added a dedicated security deposit utilization page. Works, I think, but my eyes are closing and it really needs fresh eyes again in the morning.

git-svn-id: file:///svn-source/pmgr/branches/invoice_receipt_20090629@293 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
abijah
2009-07-10 09:28:29 +00:00
parent 5877874e82
commit f2f389ee45
7 changed files with 71 additions and 48 deletions

View File

@@ -135,7 +135,7 @@ class Transaction extends AppModel {
* - Adds a new receipt transaction
*/
function addReceipt($data, $customer_id) {
function addReceipt($data, $customer_id, $lease_id = null) {
// Sanitize the data
if (!$data['Transaction']['comment'])
$data['Transaction']['comment'] = null;
@@ -173,7 +173,7 @@ class Transaction extends AppModel {
$this->LedgerEntry->MonetarySource->nameToID('Cash');
unset($entry['MonetarySource']);
}
else {
elseif (isset($entry['MonetarySource'])) {
$entry['MonetarySource']['name'] = $A->name($entry['account_id']);
// Give it a fancy name based on the check number
@@ -197,6 +197,7 @@ class Transaction extends AppModel {
= $A->currentLedgerID($A->receiptAccountID());
$entry['customer_id'] = $customer_id;
$entry['lease_id'] = $lease_id;
// Create it
$receipt_entry = new LedgerEntry();