Skip to content
Snippets Groups Projects
Commit e17906e5 authored by Neda Moeini's avatar Neda Moeini
Browse files

Update Models to sync with MEO DB

parent d1cb4b7b
No related branches found
No related tags found
No related merge requests found
......@@ -2,24 +2,7 @@
from django.db import models
class PlAccountCodes(models.Model):
"""Represents profit and loss (PL) account codes.
This model maps the PL account names to their respective codes.
"""
objects = None
pl_account_name = models.TextField(db_column="PL_Account_Name")
pl_account_code = models.CharField(db_column="PL_Account_Code", primary_key=True, max_length=50)
class Meta:
"""Metaclass for the PlAccountCodes model."""
managed = False
db_table = "PL_Account_Codes"
class Meocostcentres(models.Model):
class MeoCostCentres(models.Model):
"""Represents cost centres.
This model contains data related to cost centres,
......@@ -28,68 +11,68 @@ class Meocostcentres(models.Model):
cc = models.CharField(db_column="CC", max_length=3)
cc_name = models.CharField(db_column="CC_Name", max_length=50, blank=True, null=True)
cctype = models.CharField(db_column="CCType", max_length=8)
cc_type = models.CharField(db_column="CCType", max_length=8)
id = models.IntegerField(db_column="ID", primary_key=True)
class Meta:
"""Metaclass for the Meocostcentres model."""
"""Metaclass for the MeoCostCentres model."""
managed = False
db_table = "meoCostCentres"
class Meonominal(models.Model):
class MeoNominal(models.Model):
"""View for MEO nominal codes."""
nom = models.CharField(db_column="Nom", max_length=5)
nomname = models.CharField(db_column="NomName", max_length=60, blank=True, null=True)
nomid = models.IntegerField(db_column="NomID")
nom_name = models.CharField(db_column="NomName", max_length=60, blank=True, null=True)
nom_id = models.IntegerField(db_column="NomID")
class Meta:
"""Metaclass for the Meonominal model."""
"""Metaclass for the MeoNominal model."""
managed = False
db_table = "meoNominal"
class Meovalidsageaccounts(models.Model):
class MeoValidSageAccounts(models.Model):
"""View for MEO valid Sage accounts."""
accountname = models.CharField(db_column="AccountName", max_length=60)
accountnumber = models.CharField(db_column="AccountNumber", max_length=8, blank=True, null=True)
accountcostcentre = models.CharField(db_column="AccountCostCentre", max_length=3, blank=True, null=True)
accountdepartment = models.CharField(db_column="AccountDepartment", max_length=3, blank=True, null=True)
account_name = models.CharField(db_column="AccountName", max_length=60)
account_number = models.CharField(db_column="AccountNumber", max_length=8, blank=True, null=True)
account_cost_centre = models.CharField(db_column="AccountCostCentre", max_length=3, blank=True, null=True)
account_department = models.CharField(db_column="AccountDepartment", max_length=3, blank=True, null=True)
class Meta:
"""Metaclass for the Meovalidsageaccounts model."""
"""Metaclass for the MeoValidSageAccounts model."""
managed = False
db_table = "meoValidSageAccounts"
class Meovalidsuppliers(models.Model):
class MeoValidSuppliers(models.Model):
"""View for MEO valid suppliers."""
supplieraccountnumber = models.CharField(db_column="SupplierAccountNumber", max_length=8)
supplieraccountname = models.CharField(db_column="SupplierAccountName", max_length=60)
supplier_account_number = models.CharField(db_column="SupplierAccountNumber", max_length=8, primary_key=True)
supplier_account_name = models.CharField(db_column="SupplierAccountName", max_length=60)
class Meta:
"""Metaclass for the Meovalidsuppliers model."""
"""Metaclass for the MeoValidSuppliers model."""
managed = False
db_table = "meoValidSuppliers"
class Meovalidvat(models.Model):
class MeoValidVat(models.Model):
"""View for MEO valid VAT codes."""
tax_code = models.SmallIntegerField(db_column="Tax code")
tax_code_label = models.CharField(db_column="tax code label", max_length=60)
rate = models.DecimalField(db_column="Rate", max_digits=18, decimal_places=2)
inputnominalaccount = models.CharField(db_column="InputNominalAccount", max_length=8, blank=True, null=True)
input_nominal_account = models.CharField(db_column="InputNominalAccount", max_length=8, blank=True, null=True)
class Meta:
"""Metaclass for the Meovalidvat model."""
"""Metaclass for the MeoValidVat model."""
managed = False
db_table = "meoValidVAT"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment