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:
@@ -877,7 +877,8 @@ LOCK TABLES `pmgr_accounts` WRITE;
|
|||||||
INSERT INTO `pmgr_accounts` (`type`, `name`)
|
INSERT INTO `pmgr_accounts` (`type`, `name`)
|
||||||
VALUES
|
VALUES
|
||||||
('ASSET', 'A/R' ),
|
('ASSET', 'A/R' ),
|
||||||
('LIABILITY', 'A/P' );
|
('LIABILITY', 'A/P' ),
|
||||||
|
('LIABILITY', 'Customer Credit' );
|
||||||
INSERT INTO `pmgr_accounts` (`type`, `name`, `receipts`)
|
INSERT INTO `pmgr_accounts` (`type`, `name`, `receipts`)
|
||||||
VALUES
|
VALUES
|
||||||
('ASSET', 'Cash', 1),
|
('ASSET', 'Cash', 1),
|
||||||
|
|||||||
@@ -139,6 +139,7 @@ class Account extends AppModel {
|
|||||||
function invoiceAccountID() { return $this->nameToID('Invoice'); }
|
function invoiceAccountID() { return $this->nameToID('Invoice'); }
|
||||||
function receiptAccountID() { return $this->nameToID('Receipt'); }
|
function receiptAccountID() { return $this->nameToID('Receipt'); }
|
||||||
function badDebtAccountID() { return $this->nameToID('Bad Debt'); }
|
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);
|
$this->queryInit($query);
|
||||||
$query['link'] = array('Account' => $query['link']);
|
$query['link'] = array('Account' => $query['link']);
|
||||||
|
|
||||||
|
$stats = array();
|
||||||
foreach ($this->ledgers($id, $all) AS $ledger)
|
foreach ($this->ledgers($id, $all) AS $ledger)
|
||||||
$this->statsMerge($stats['Ledger'],
|
$this->statsMerge($stats['Ledger'],
|
||||||
$this->Ledger->stats($ledger, $query));
|
$this->Ledger->stats($ledger, $query));
|
||||||
|
|||||||
Reference in New Issue
Block a user