Added a customer credit account.

git-svn-id: file:///svn-source/pmgr/branches/surplus_account_20090815@586 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
abijah
2009-08-16 19:16:42 +00:00
parent 2634cf824a
commit 366d59a5e6
2 changed files with 4 additions and 1 deletions

View File

@@ -877,7 +877,8 @@ LOCK TABLES `pmgr_accounts` WRITE;
INSERT INTO `pmgr_accounts` (`type`, `name`)
VALUES
('ASSET', 'A/R' ),
('LIABILITY', 'A/P' );
('LIABILITY', 'A/P' ),
('LIABILITY', 'Customer Credit' );
INSERT INTO `pmgr_accounts` (`type`, `name`, `receipts`)
VALUES
('ASSET', 'Cash', 1),

View File

@@ -139,6 +139,7 @@ class Account extends AppModel {
function invoiceAccountID() { return $this->nameToID('Invoice'); }
function receiptAccountID() { return $this->nameToID('Receipt'); }
function badDebtAccountID() { return $this->nameToID('Bad Debt'); }
function customerCreditAccountID() { return $this->nameToID('Customer Credit'); }
/**************************************************************************
@@ -345,6 +346,7 @@ class Account extends AppModel {
$this->queryInit($query);
$query['link'] = array('Account' => $query['link']);
$stats = array();
foreach ($this->ledgers($id, $all) AS $ledger)
$this->statsMerge($stats['Ledger'],
$this->Ledger->stats($ledger, $query));