Moving back to the Invoice/Receipt mechanism. Seems to work fairly well, even if it's non-standard.
git-svn-id: file:///svn-source/pmgr/branches/charge_credit_20090629@189 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
@@ -633,15 +633,6 @@ CREATE TABLE `pmgr_customers` (
|
||||
-- If NULL, rely on the contact info exclusively
|
||||
`name` VARCHAR(80) DEFAULT NULL,
|
||||
|
||||
-- A customer gets their own account, although any
|
||||
-- lease specific charge (rent, late fees, etc) will
|
||||
-- be debited against the lease account. This one
|
||||
-- will be used for non-lease related charges, as
|
||||
-- well as charges that intentionally span more than
|
||||
-- one lease (such as one security deposit to cover
|
||||
-- two or more units).
|
||||
`account_id` INT(10) UNSIGNED NOT NULL,
|
||||
|
||||
-- Primary Contact... every customer must have one
|
||||
-- (and presumably, most customers will _be_ one).
|
||||
-- REVISIT <AP> 20090612:
|
||||
@@ -708,7 +699,6 @@ CREATE TABLE `pmgr_leases` (
|
||||
`lease_type_id` INT(10) UNSIGNED NOT NULL,
|
||||
`unit_id` INT(10) UNSIGNED NOT NULL,
|
||||
`customer_id` INT(10) UNSIGNED NOT NULL,
|
||||
`account_id` INT(10) UNSIGNED NOT NULL,
|
||||
`late_schedule_id` INT(10) UNSIGNED DEFAULT NULL,
|
||||
|
||||
`lease_date` DATE NOT NULL,
|
||||
@@ -848,7 +838,7 @@ CREATE TABLE `pmgr_accounts` (
|
||||
-- For LIABILITY, EQUITY, and INCOME, the opposite
|
||||
-- is true, with reconciliations posted, under
|
||||
-- normal circumstances, when a debit occurs.
|
||||
`trackable` INT UNSIGNED DEFAULT 0,
|
||||
`trackable` INT UNSIGNED DEFAULT 1,
|
||||
|
||||
-- Security Level
|
||||
`level` INT UNSIGNED DEFAULT 1,
|
||||
@@ -869,15 +859,17 @@ INSERT INTO `pmgr_accounts` (`type`, `name`, `trackable`)
|
||||
('ASSET', 'Invoice', 1),
|
||||
('ASSET', 'Receipt', 1),
|
||||
('LIABILITY', 'A/P', 1),
|
||||
('LIABILITY', 'Tax', 0),
|
||||
('LIABILITY', 'Tax', 1),
|
||||
('LIABILITY', 'Customer Credit', 1),
|
||||
('ASSET', 'Bank', 0),
|
||||
('ASSET', 'Till', 0),
|
||||
('ASSET', 'Bank', 1),
|
||||
('ASSET', 'Cash', 1),
|
||||
('ASSET', 'Check', 1),
|
||||
('ASSET', 'Money Order', 1),
|
||||
('LIABILITY', 'Security Deposit', 1),
|
||||
('INCOME', 'Rent', 0),
|
||||
('INCOME', 'Late Charge', 0),
|
||||
('EXPENSE', 'Concession', 0),
|
||||
('EXPENSE', 'Bad Debt', 0);
|
||||
('INCOME', 'Rent', 1),
|
||||
('INCOME', 'Late Charge', 1),
|
||||
('EXPENSE', 'Concession', 1),
|
||||
('EXPENSE', 'Bad Debt', 1);
|
||||
UNLOCK TABLES;
|
||||
|
||||
|
||||
@@ -942,6 +934,10 @@ DROP TABLE IF EXISTS `pmgr_transactions`;
|
||||
CREATE TABLE `pmgr_transactions` (
|
||||
`id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
|
||||
-- `type` ENUM('INVOICE',
|
||||
-- 'RECEIPT')
|
||||
-- NOT NULL,
|
||||
|
||||
`stamp` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`through_date` DATE DEFAULT NULL,
|
||||
`due_date` DATE DEFAULT NULL,
|
||||
|
||||
Reference in New Issue
Block a user