update
This commit is contained in:
parent
9bb78d0723
commit
810900d76e
@ -99,7 +99,7 @@ def create_ledger_entity(sender, instance, created, **kwargs):
|
||||
# Cash Account
|
||||
asset_ca_cash = entity.create_account(
|
||||
coa_model=coa,
|
||||
code="1010",
|
||||
code="1101",
|
||||
role=roles.ASSET_CA_CASH,
|
||||
name=_("Cash"),
|
||||
balance_type="debit",
|
||||
@ -107,11 +107,20 @@ def create_ledger_entity(sender, instance, created, **kwargs):
|
||||
)
|
||||
asset_ca_cash.role_default = True
|
||||
asset_ca_cash.save()
|
||||
|
||||
asset_ca_cash_bank = entity.create_account(
|
||||
coa_model=coa,
|
||||
code="1102",
|
||||
role=roles.ASSET_CA_CASH,
|
||||
name=_("Cash in Bank"),
|
||||
balance_type="debit",
|
||||
active=True,
|
||||
)
|
||||
|
||||
# Accounts Receivable Account
|
||||
asset_ca_receivables = entity.create_account(
|
||||
coa_model=coa,
|
||||
code="1102",
|
||||
code="1103",
|
||||
role=roles.ASSET_CA_RECEIVABLES,
|
||||
name=_("Accounts Receivable"),
|
||||
balance_type="debit",
|
||||
@ -123,7 +132,7 @@ def create_ledger_entity(sender, instance, created, **kwargs):
|
||||
# Inventory Account
|
||||
asset_ca_inventory = entity.create_account(
|
||||
coa_model=coa,
|
||||
code="1103",
|
||||
code="1104",
|
||||
role=roles.ASSET_CA_INVENTORY,
|
||||
name=_("Inventory"),
|
||||
balance_type="debit",
|
||||
@ -135,7 +144,7 @@ def create_ledger_entity(sender, instance, created, **kwargs):
|
||||
# Prepaid Expenses Account
|
||||
asset_ca_prepaid = entity.create_account(
|
||||
coa_model=coa,
|
||||
code="1104",
|
||||
code="1105",
|
||||
role=roles.ASSET_CA_PREPAID,
|
||||
name=_("Prepaid Expenses"),
|
||||
balance_type="debit",
|
||||
@ -143,6 +152,15 @@ def create_ledger_entity(sender, instance, created, **kwargs):
|
||||
)
|
||||
asset_ca_prepaid.role_default = True
|
||||
asset_ca_prepaid.save()
|
||||
# Prepaid Expenses Account
|
||||
asset_ca_prepaid_employee = entity.create_account(
|
||||
coa_model=coa,
|
||||
code="1106",
|
||||
role=roles.ASSET_CA_PREPAID,
|
||||
name=_("Employee Advance"),
|
||||
balance_type="debit",
|
||||
active=True,
|
||||
)
|
||||
|
||||
# Notes Receivable Account
|
||||
asset_lti_notes_receivable = entity.create_account(
|
||||
@ -154,7 +172,7 @@ def create_ledger_entity(sender, instance, created, **kwargs):
|
||||
active=True,
|
||||
)
|
||||
asset_lti_notes_receivable.role_default = True
|
||||
asset_lti_notes_receivable.save()
|
||||
asset_lti_notes_receivable.save()
|
||||
|
||||
# Land Account
|
||||
asset_lti_land = entity.create_account(
|
||||
@ -167,6 +185,30 @@ def create_ledger_entity(sender, instance, created, **kwargs):
|
||||
)
|
||||
asset_lti_land.role_default = True
|
||||
asset_lti_land.save()
|
||||
|
||||
# intangible Account
|
||||
asset_lti_land_intangable = entity.create_account(
|
||||
coa_model=coa,
|
||||
code="1203",
|
||||
role=roles.ASSET_INTANGIBLE_ASSETS,
|
||||
name=_("Intangible Assets"),
|
||||
balance_type="debit",
|
||||
active=True,
|
||||
)
|
||||
asset_lti_land_intangable.role_default = True
|
||||
asset_lti_land_intangable.save()
|
||||
|
||||
# investment Account
|
||||
asset_lti_land_investment = entity.create_account(
|
||||
coa_model=coa,
|
||||
code="1204",
|
||||
role=roles.ASSET_LTI_SECURITIES,
|
||||
name=_("Investments"),
|
||||
balance_type="debit",
|
||||
active=True,
|
||||
)
|
||||
asset_lti_land_investment.role_default = True
|
||||
asset_lti_land_investment.save()
|
||||
|
||||
# Buildings Account
|
||||
asset_ppe_buildings = entity.create_account(
|
||||
@ -191,6 +233,16 @@ def create_ledger_entity(sender, instance, created, **kwargs):
|
||||
)
|
||||
asset_ppe_buildings_accum_depreciation.role_default = True
|
||||
asset_ppe_buildings_accum_depreciation.save()
|
||||
asset_ppe_buildings_accum_depreciation = entity.create_account(
|
||||
coa_model=coa,
|
||||
code="1303",
|
||||
role=roles.ASSET_PPE_EQUIPMENT,
|
||||
name=_("Property, Plant, and Equipment"),
|
||||
balance_type="credit",
|
||||
active=True,
|
||||
)
|
||||
asset_ppe_buildings_accum_depreciation.role_default = True
|
||||
asset_ppe_buildings_accum_depreciation.save()
|
||||
|
||||
# Accounts Payable Account
|
||||
liability_cl_acc_payable = entity.create_account(
|
||||
@ -203,19 +255,7 @@ def create_ledger_entity(sender, instance, created, **kwargs):
|
||||
)
|
||||
liability_cl_acc_payable.role_default = True
|
||||
liability_cl_acc_payable.save()
|
||||
|
||||
# Deferred Revenue Account
|
||||
liability_cl_def_rev = entity.create_account(
|
||||
coa_model=coa,
|
||||
code="2103",
|
||||
role=roles.LIABILITY_CL_DEFERRED_REVENUE,
|
||||
name=_("Deferred Revenue"),
|
||||
balance_type="credit",
|
||||
active=True,
|
||||
)
|
||||
liability_cl_def_rev.role_default = True
|
||||
liability_cl_def_rev.save()
|
||||
|
||||
|
||||
# Wages Payable Account
|
||||
liability_cl_wages_payable = entity.create_account(
|
||||
coa_model=coa,
|
||||
@ -228,10 +268,34 @@ def create_ledger_entity(sender, instance, created, **kwargs):
|
||||
liability_cl_wages_payable.role_default = True
|
||||
liability_cl_wages_payable.save()
|
||||
|
||||
# Deferred Revenue Account
|
||||
liability_cl_def_rev = entity.create_account(
|
||||
coa_model=coa,
|
||||
code="2103",
|
||||
role=roles.LIABILITY_CL_DEFERRED_REVENUE,
|
||||
name=_("Deferred Revenue"),
|
||||
balance_type="credit",
|
||||
active=True,
|
||||
)
|
||||
liability_cl_def_rev.role_default = True
|
||||
liability_cl_def_rev.save()
|
||||
|
||||
# Short-Term Notes Payable Account
|
||||
liability_ltl_notes_payable = entity.create_account(
|
||||
coa_model=coa,
|
||||
code="2104",
|
||||
role=roles.LIABILITY_CL_ST_NOTES_PAYABLE,
|
||||
name=_("Short-Term Notes Payable"),
|
||||
balance_type="credit",
|
||||
active=True,
|
||||
)
|
||||
liability_ltl_notes_payable.role_default = True
|
||||
liability_ltl_notes_payable.save()
|
||||
|
||||
# Long-Term Notes Payable Account
|
||||
liability_ltl_notes_payable = entity.create_account(
|
||||
coa_model=coa,
|
||||
code="2201",
|
||||
code="2105",
|
||||
role=roles.LIABILITY_LTL_NOTES_PAYABLE,
|
||||
name=_("Long-Term Notes Payable"),
|
||||
balance_type="credit",
|
||||
@ -239,11 +303,41 @@ def create_ledger_entity(sender, instance, created, **kwargs):
|
||||
)
|
||||
liability_ltl_notes_payable.role_default = True
|
||||
liability_ltl_notes_payable.save()
|
||||
|
||||
# VAT Payable Account
|
||||
liability_ltl_vat_payable = entity.create_account(
|
||||
coa_model=coa,
|
||||
code="2106",
|
||||
role=roles.LIABILITY_LTL_BONDS_PAYABLE,
|
||||
name=_("VAT Payable"),
|
||||
balance_type="credit",
|
||||
active=True,
|
||||
)
|
||||
|
||||
# taxes Payable Account
|
||||
liability_ltl_taxes_payable = entity.create_account(
|
||||
coa_model=coa,
|
||||
code="2107",
|
||||
role=roles.LIABILITY_LTL_NOTES_PAYABLE,
|
||||
name=_("Taxes Payable"),
|
||||
balance_type="credit",
|
||||
active=True,
|
||||
)
|
||||
|
||||
# social insurance Payable Account
|
||||
liability_ltl_social_insurance_payable = entity.create_account(
|
||||
coa_model=coa,
|
||||
code="2108",
|
||||
role=roles.LIABILITY_LTL_NOTES_PAYABLE,
|
||||
name=_("Social Insurance Payable"),
|
||||
balance_type="credit",
|
||||
active=True,
|
||||
)
|
||||
|
||||
# Mortgage Payable Account
|
||||
liability_ltl_mortgage_payable = entity.create_account(
|
||||
coa_model=coa,
|
||||
code="2202",
|
||||
code="2203",
|
||||
role=roles.LIABILITY_LTL_MORTGAGE_PAYABLE,
|
||||
name=_("Mortgage Payable"),
|
||||
balance_type="credit",
|
||||
@ -300,6 +394,17 @@ def create_ledger_entity(sender, instance, created, **kwargs):
|
||||
income_interest.role_default = True
|
||||
income_interest.save()
|
||||
|
||||
# Uneared Income Account
|
||||
income_unearned = entity.create_account(
|
||||
coa_model=coa,
|
||||
code="4103",
|
||||
role=roles.INCOME_OTHER,
|
||||
name=_("Unearned Income"),
|
||||
balance_type="credit",
|
||||
active=True,
|
||||
)
|
||||
|
||||
|
||||
# Cost of Goods Sold (COGS) Account
|
||||
expense_cogs = entity.create_account(
|
||||
coa_model=coa,
|
||||
@ -311,7 +416,33 @@ def create_ledger_entity(sender, instance, created, **kwargs):
|
||||
)
|
||||
expense_cogs.role_default = True
|
||||
expense_cogs.save()
|
||||
|
||||
|
||||
# 5.1 Direct Costs
|
||||
entity.create_account(coa_model=coa, code="5101", role=roles.EXPENSE_OPERATIONAL, name=_("Cost of Goods Sold"), balance_type="debit", active=True)
|
||||
entity.create_account(coa_model=coa, code="5102", role=roles.EXPENSE_OPERATIONAL, name=_("Salaries and Wages"), balance_type="debit", active=True)
|
||||
entity.create_account(coa_model=coa, code="5103", role=roles.EXPENSE_OPERATIONAL, name=_("Sales Commissions"), balance_type="debit", active=True)
|
||||
entity.create_account(coa_model=coa, code="5104", role=roles.EXPENSE_OPERATIONAL, name=_("Shipping and Customs Clearance"), balance_type="debit", active=True)
|
||||
|
||||
# accrued Expenses Account
|
||||
expense_cogs = entity.create_account(
|
||||
coa_model=coa,
|
||||
code="6117",
|
||||
role=roles.EXPENSE_OPERATIONAL,
|
||||
name=_("Accrued Expenses"),
|
||||
balance_type="debit",
|
||||
active=True,
|
||||
)
|
||||
|
||||
# accrued salaries Account
|
||||
expense_cogs = entity.create_account(
|
||||
coa_model=coa,
|
||||
code="6118",
|
||||
role=roles.EXPENSE_OPERATIONAL,
|
||||
name=_("Accrued Salaries"),
|
||||
balance_type="debit",
|
||||
active=True,
|
||||
)
|
||||
|
||||
# Rent Expense Account
|
||||
expense_rent = entity.create_account(
|
||||
coa_model=coa,
|
||||
@ -323,7 +454,155 @@ def create_ledger_entity(sender, instance, created, **kwargs):
|
||||
)
|
||||
expense_rent.role_default = True
|
||||
expense_rent.save()
|
||||
|
||||
# Salaries and Administrative Fees
|
||||
expense_salaries = entity.create_account(
|
||||
coa_model=coa,
|
||||
code="6103",
|
||||
role=roles.EXPENSE_OPERATIONAL,
|
||||
name=_("Salaries and Administrative Fees"),
|
||||
balance_type="debit",
|
||||
active=True,
|
||||
)
|
||||
|
||||
# Medical Insurance
|
||||
expense_medical_insurance = entity.create_account(
|
||||
coa_model=coa,
|
||||
code="6104",
|
||||
role=roles.EXPENSE_OPERATIONAL,
|
||||
name=_("Medical Insurance"),
|
||||
balance_type="debit",
|
||||
active=True,
|
||||
)
|
||||
|
||||
# Marketing and Advertising Expenses
|
||||
expense_marketing = entity.create_account(
|
||||
coa_model=coa,
|
||||
code="6105",
|
||||
role=roles.EXPENSE_OPERATIONAL,
|
||||
name=_("Marketing and Advertising Expenses"),
|
||||
balance_type="debit",
|
||||
active=True,
|
||||
)
|
||||
|
||||
# Commissions and Incentives
|
||||
expense_commissions = entity.create_account(
|
||||
coa_model=coa,
|
||||
code="6106",
|
||||
role=roles.EXPENSE_OPERATIONAL,
|
||||
name=_("Commissions and Incentives"),
|
||||
balance_type="debit",
|
||||
active=True,
|
||||
)
|
||||
|
||||
# Travel Tickets
|
||||
expense_travel = entity.create_account(
|
||||
coa_model=coa,
|
||||
code="6107",
|
||||
role=roles.EXPENSE_OPERATIONAL,
|
||||
name=_("Travel Tickets"),
|
||||
balance_type="debit",
|
||||
active=True,
|
||||
)
|
||||
|
||||
# Social Insurance
|
||||
expense_other = entity.create_account(
|
||||
coa_model=coa,
|
||||
code="6108",
|
||||
role=roles.EXPENSE_OPERATIONAL,
|
||||
name=_("Social Insurance"),
|
||||
balance_type="debit",
|
||||
active=True,
|
||||
)
|
||||
|
||||
# Government Fees
|
||||
expense_other = entity.create_account(
|
||||
coa_model=coa,
|
||||
code="6109",
|
||||
role=roles.EXPENSE_OPERATIONAL,
|
||||
name=_("Government Fees"),
|
||||
balance_type="debit",
|
||||
active=True,
|
||||
)
|
||||
|
||||
# Fees and Subscriptions
|
||||
expense_other = entity.create_account(
|
||||
coa_model=coa,
|
||||
code="6110",
|
||||
role=roles.EXPENSE_OPERATIONAL,
|
||||
name=_("Fees and Subscriptions"),
|
||||
balance_type="debit",
|
||||
active=True,
|
||||
)
|
||||
|
||||
# Office Services Expenses
|
||||
expense_other = entity.create_account(
|
||||
coa_model=coa,
|
||||
code="6111",
|
||||
role=roles.EXPENSE_OPERATIONAL,
|
||||
name=_("Office Services Expenses"),
|
||||
balance_type="debit",
|
||||
active=True,
|
||||
)
|
||||
|
||||
# Office Supplies and Printing
|
||||
expense_other = entity.create_account(
|
||||
coa_model=coa,
|
||||
code="6112",
|
||||
role=roles.EXPENSE_OPERATIONAL,
|
||||
name=_("Office Supplies and Printing"),
|
||||
balance_type="debit",
|
||||
active=True,
|
||||
)
|
||||
|
||||
# Hospitality Expenses
|
||||
expense_other = entity.create_account(
|
||||
coa_model=coa,
|
||||
code="6113",
|
||||
role=roles.EXPENSE_OPERATIONAL,
|
||||
name=_("Hospitality Expenses"),
|
||||
balance_type="debit",
|
||||
active=True,
|
||||
)
|
||||
|
||||
# Bank Commissions
|
||||
expense_other = entity.create_account(
|
||||
coa_model=coa,
|
||||
code="6114",
|
||||
role=roles.EXPENSE_OPERATIONAL,
|
||||
name=_("Bank Commissions"),
|
||||
balance_type="debit",
|
||||
active=True,
|
||||
)
|
||||
|
||||
# Other Expenses
|
||||
expense_other = entity.create_account(
|
||||
coa_model=coa,
|
||||
code="6115",
|
||||
role=roles.EXPENSE_OPERATIONAL,
|
||||
name=_("Other Expenses"),
|
||||
balance_type="debit",
|
||||
active=True,
|
||||
)
|
||||
|
||||
# Transportation Expenses
|
||||
expense_other = entity.create_account(
|
||||
coa_model=coa,
|
||||
code="6116",
|
||||
role=roles.EXPENSE_OPERATIONAL,
|
||||
name=_("Transportation Expenses"),
|
||||
balance_type="debit",
|
||||
active=True,
|
||||
)
|
||||
|
||||
# 5.3 Non-Operating Expenses
|
||||
entity.create_account(coa_model=coa, code="6301", role=roles.EXPENSE_OTHER, name=_("Zakat"), balance_type="debit", active=True)
|
||||
entity.create_account(coa_model=coa, code="6302", role=roles.EXPENSE_OTHER, name=_("Taxes"), balance_type="debit", active=True)
|
||||
entity.create_account(coa_model=coa, code="6303", role=roles.EXPENSE_OTHER, name=_("Foreign Currency Translation"), balance_type="debit", active=True)
|
||||
entity.create_account(coa_model=coa, code="6304", role=roles.EXPENSE_OTHER, name=_("Interest Expenses"), balance_type="debit", active=True)
|
||||
|
||||
|
||||
|
||||
# Create Vendor
|
||||
@receiver(post_save, sender=models.Vendor)
|
||||
def create_ledger_vendor(sender, instance, created, **kwargs):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user