Chore: Renamed the Ledger Table to Account

Chore: Renamed the Ledger Model to Account
Chore: Renamed LedgerType to AccountType
Chore: Renamed all properties of Account table to lowercase with underscores

Feature: Starred Accounts and their entries do not delete during a rebase.
Info: Starred Vouchers still delete. They can be starred, but have no effect.
This commit is contained in:
tanshu
2018-07-07 16:31:44 +05:30
parent 739c872815
commit 9f4eb334d7
49 changed files with 791 additions and 455 deletions

View File

@ -29,8 +29,8 @@ from brewman.models.master import (
Product,
CostCentre,
Employee,
Ledger,
LedgerBase,
Account,
AccountBase,
ProductGroup,
Recipe,
RecipeItem,
@ -139,25 +139,25 @@ def main(argv=sys.argv):
for cost_centre in cost_centres:
dbsession.add(cost_centre)
ledgers = [Ledger(1, 'All Purchases', 2, True, False, uuid.UUID('7b845f95-dfef-fa4a-897c-f0baf15284a3'),
uuid.UUID('240dd899-c413-854c-a7eb-67a29d154490'), True),
Ledger(1, 'Local Purchase', 9, True, False, uuid.UUID('36f59436-522a-0746-ae94-e0f746bf6c0d'),
uuid.UUID('d2b75912-505f-2548-9093-466dfff6a0f9'), True),
Ledger(1, 'ESI/PF - Payable', 11, True, False, uuid.UUID('36f59436-522a-0746-ae94-e0f746bf6c0d'),
uuid.UUID('42277912-cc18-854b-b134-9f4b00dba419'), True),
Ledger(2, 'ESI/PF - Expense', 7, True, False, uuid.UUID('36f59436-522a-0746-ae94-e0f746bf6c0d'),
uuid.UUID('d2a1a286-e900-764b-a1a5-9f4b00dbb940'), True),
Ledger(1, 'Cash in Hand', 1, True, False, uuid.UUID('36f59436-522a-0746-ae94-e0f746bf6c0d'),
uuid.UUID('ed2341bb-80b8-9649-90db-f9aaca183bb3'), True),
Ledger(1, 'Staff Salary', 7, True, False, uuid.UUID('36f59436-522a-0746-ae94-e0f746bf6c0d'),
uuid.UUID('5c2b54d0-c174-004d-a0d5-92cdaadcefa7'), True),
Ledger(2, 'Service Charges', 11, True, False, uuid.UUID('36f59436-522a-0746-ae94-e0f746bf6c0d'),
uuid.UUID('b7eff754-e8ba-e047-ab06-9132c15c7640'), True),
Ledger(1, 'Suspense', 4, True, False, uuid.UUID('36f59436-522a-0746-ae94-e0f746bf6c0d'),
uuid.UUID('3854e317-6f3b-5142-ab26-9c44d4cddd08'), True)]
accounts = [Account(1, 'All Purchases', 2, True, False, uuid.UUID('7b845f95-dfef-fa4a-897c-f0baf15284a3'),
uuid.UUID('240dd899-c413-854c-a7eb-67a29d154490'), True),
Account(1, 'Local Purchase', 9, True, False, uuid.UUID('36f59436-522a-0746-ae94-e0f746bf6c0d'),
uuid.UUID('d2b75912-505f-2548-9093-466dfff6a0f9'), True),
Account(1, 'ESI/PF - Payable', 11, True, False, uuid.UUID('36f59436-522a-0746-ae94-e0f746bf6c0d'),
uuid.UUID('42277912-cc18-854b-b134-9f4b00dba419'), True),
Account(2, 'ESI/PF - Expense', 7, True, False, uuid.UUID('36f59436-522a-0746-ae94-e0f746bf6c0d'),
uuid.UUID('d2a1a286-e900-764b-a1a5-9f4b00dbb940'), True),
Account(1, 'Cash in Hand', 1, True, False, uuid.UUID('36f59436-522a-0746-ae94-e0f746bf6c0d'),
uuid.UUID('ed2341bb-80b8-9649-90db-f9aaca183bb3'), True),
Account(1, 'Staff Salary', 7, True, False, uuid.UUID('36f59436-522a-0746-ae94-e0f746bf6c0d'),
uuid.UUID('5c2b54d0-c174-004d-a0d5-92cdaadcefa7'), True),
Account(2, 'Service Charges', 11, True, False, uuid.UUID('36f59436-522a-0746-ae94-e0f746bf6c0d'),
uuid.UUID('b7eff754-e8ba-e047-ab06-9132c15c7640'), True),
Account(1, 'Suspense', 4, True, False, uuid.UUID('36f59436-522a-0746-ae94-e0f746bf6c0d'),
uuid.UUID('3854e317-6f3b-5142-ab26-9c44d4cddd08'), True)]
for ledger in ledgers:
dbsession.add(ledger)
for account in accounts:
dbsession.add(account)
product_group = ProductGroup('Suspense', uuid.UUID('ae59a20c-87bb-444a-8abb-915ad5e58b83'), True)
dbsession.add(product_group)