Added a column to Tender that identifies the exact ledger entry which was used to deposit the tender. It was necessary due to the kludgy way that I've set ACH items to auto-deposit, which uses a ledger entry that has nothing to do with the transaction account. This would probably allow us to eliminate the deposit_transaction_id, but I'd like to break as little as possible at the moment. I'll come back and clean this up in the future. Also, fixed a stupid bug that was causing major database thrash whenever a transaction was entered without a customer id. I could have fixed the Customer::update() function, but it was designed to accept null so that we could update all the customers, something definitely useful while developing.
git-svn-id: file:///svn-source/pmgr/branches/yafr_20090716@609 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
@@ -878,7 +878,7 @@ INSERT INTO `pmgr_accounts` (`type`, `name`)
|
||||
VALUES
|
||||
('ASSET', 'A/R' ),
|
||||
('LIABILITY', 'A/P' ),
|
||||
('LIABILITY', 'Customer Credit' );
|
||||
('LIABILITY', 'Credit' );
|
||||
INSERT INTO `pmgr_accounts` (`type`, `name`, `receipts`)
|
||||
VALUES
|
||||
('ASSET', 'Cash', 1),
|
||||
@@ -971,6 +971,7 @@ CREATE TABLE `pmgr_transactions` (
|
||||
'CREDIT_NOTE', -- Inverse of Sales Invoice
|
||||
'PAYMENT', -- Actual payment
|
||||
'DEPOSIT',
|
||||
'AUTO_DEPOSIT', -- Fundamentally same as DEPOSIT
|
||||
'WITHDRAWAL',
|
||||
'CLOSE', -- Essentially an internal (not accounting) transaction
|
||||
-- 'CREDIT',
|
||||
@@ -1227,6 +1228,8 @@ CREATE TABLE `pmgr_tenders` (
|
||||
`ledger_entry_id` INT(10) UNSIGNED NOT NULL,
|
||||
-- The ledger entry if this tender is marked NSF
|
||||
`nsf_ledger_entry_id` INT(10) UNSIGNED DEFAULT NULL,
|
||||
-- The ledger entry if this actual deposit transaction
|
||||
`deposit_ledger_entry_id` INT(10) UNSIGNED DEFAULT NULL,
|
||||
-- The deposit transaction that included these monies
|
||||
`deposit_transaction_id` INT(10) UNSIGNED DEFAULT NULL,
|
||||
-- The NSF transaction coming back from the bank.
|
||||
|
||||
Reference in New Issue
Block a user