Prepare Trail Balancen -Django
Budget: ₹400 – ₹750 INR
The project is Django - Python
Models:
Transaction Header
Transaction Detail
AccountMaster
Filter: User
class FinTransHeader(models.Model):
user = models.ForeignKey(User, null=True, blank=True, on_delete=models.SET_NULL)
fh_type = models.CharField(max_length=200)
fh_code = models.CharField(max_length=200)
fh_no = models.IntegerField(blank=False,null=False)
fh_dt = models.DateField()
fh_detail=models.CharField(max_length=200,blank=True,null=True)
fh_cust_code = models.CharField(max_length=200,blank=True,null=True)
fh_user_code =models.CharField(max_length=200,blank=True,null=True)
fh_ref=models.CharField(max_length=200,default='nil',blank=True,null=True)
fh_status=models.CharField(max_length=1,default=0)
fh_post_status = models.BooleanField(default=False)
fh_prt_status=models.BooleanField(default=False)
def __str__(self):
"""String for representing the Model object."""
return str(self.fh_no)
# return self.fh_no
class FinTransDetail(models.Model):
user = models.ForeignKey(User, null=True, blank=True, on_delete=models.SET_NULL)
fd_no = models.ForeignKey(FinTransHeader, on_delete=models.CASCADE,default=1)
# fd_acct = models.ForeignKey(AccountMaster, to_field='AcctCode', on_delete=models.CASCADE,default=1)
fd_acct = models.DecimalField(decimal_places=0, max_digits=6)
fd_debit = models.DecimalField(max_digits=12, decimal_places=2, default=0, null=False)
fd_credit = models.DecimalField(max_digits=12, decimal_places=2, default=0, null=False)
fd_detail = models.CharField(max_length=200, null=True, blank=True)
fd_tax = models.DecimalField(max_digits=12, decimal_places=2, default=0, null=False)
fd_posting = models.BooleanField(default=False, blank=True, null=True)
def __str__(self):
return str(self.fd_debit)
(can recommend to change the releationship between models eg foreign key)
class AccountMaster(models.Model):
"""Model representing a book (but not a specific copy of a book)."""
user = models.ForeignKey(User, null=True, blank=True, on_delete=models.SET_NULL)
AcctLevel = models.CharField(max_length=100,default='0',null=False)
AcctCode =models.DecimalField( decimal_places=0, max_digits=6)
AcctName = models.CharField(max_length=50)
AcctDesc = models.CharField(max_length=100)
# AcctType = models.ForeignKey(AcctType,on_delete=models.PROTECT,null=True,blank=True)
AcctType = models.CharField(max_length=20,choices=ACCTTYPE_CHOICES,null=False, blank=False,default="A")
AcctGrp = models.CharField(max_length=20, choices=ACCTGRP_CHOICES, null = False, blank = False, default = "G")
# AcctReport1 = models.ForeignKey('self', on_delete=models.CASCADE, null=True, blank=True,required=False)
AcctReport1 = models.DecimalField( decimal_places=0, max_digits=6,default=0,null=True, blank=True)
# AcctReport1 = models.DecimalField(max_digits=6, decimal_places=0, default=0, blank=True)
AcctReport2 = models.DecimalField(max_digits=6, decimal_places=0, default=0, blank=True)
AcctPosting = models.BooleanField(default=False, blank=True)
AcctFreeze= models.BooleanField(default=False, blank=True)
AcctBal = models.DecimalField(max_digits=12, decimal_places=2, default=0, null=False)
AcctDefault= models.BooleanField(default=False, blank=True)
class Meta:
ordering = ["AcctCode"]
def __str__(self):
"""String for representing the Model object."""
# return self.ToString(AcctCode)+"-"+self.AcctName
return str(self.AcctCode)
Needs to prepare trai lbalance with
Account Level 1 -Total
Account level 2 - Total
Account Level 3 - total
(more details on chats)
Models:
Transaction Header
Transaction Detail
AccountMaster
Filter: User
class FinTransHeader(models.Model):
user = models.ForeignKey(User, null=True, blank=True, on_delete=models.SET_NULL)
fh_type = models.CharField(max_length=200)
fh_code = models.CharField(max_length=200)
fh_no = models.IntegerField(blank=False,null=False)
fh_dt = models.DateField()
fh_detail=models.CharField(max_length=200,blank=True,null=True)
fh_cust_code = models.CharField(max_length=200,blank=True,null=True)
fh_user_code =models.CharField(max_length=200,blank=True,null=True)
fh_ref=models.CharField(max_length=200,default='nil',blank=True,null=True)
fh_status=models.CharField(max_length=1,default=0)
fh_post_status = models.BooleanField(default=False)
fh_prt_status=models.BooleanField(default=False)
def __str__(self):
"""String for representing the Model object."""
return str(self.fh_no)
# return self.fh_no
class FinTransDetail(models.Model):
user = models.ForeignKey(User, null=True, blank=True, on_delete=models.SET_NULL)
fd_no = models.ForeignKey(FinTransHeader, on_delete=models.CASCADE,default=1)
# fd_acct = models.ForeignKey(AccountMaster, to_field='AcctCode', on_delete=models.CASCADE,default=1)
fd_acct = models.DecimalField(decimal_places=0, max_digits=6)
fd_debit = models.DecimalField(max_digits=12, decimal_places=2, default=0, null=False)
fd_credit = models.DecimalField(max_digits=12, decimal_places=2, default=0, null=False)
fd_detail = models.CharField(max_length=200, null=True, blank=True)
fd_tax = models.DecimalField(max_digits=12, decimal_places=2, default=0, null=False)
fd_posting = models.BooleanField(default=False, blank=True, null=True)
def __str__(self):
return str(self.fd_debit)
(can recommend to change the releationship between models eg foreign key)
class AccountMaster(models.Model):
"""Model representing a book (but not a specific copy of a book)."""
user = models.ForeignKey(User, null=True, blank=True, on_delete=models.SET_NULL)
AcctLevel = models.CharField(max_length=100,default='0',null=False)
AcctCode =models.DecimalField( decimal_places=0, max_digits=6)
AcctName = models.CharField(max_length=50)
AcctDesc = models.CharField(max_length=100)
# AcctType = models.ForeignKey(AcctType,on_delete=models.PROTECT,null=True,blank=True)
AcctType = models.CharField(max_length=20,choices=ACCTTYPE_CHOICES,null=False, blank=False,default="A")
AcctGrp = models.CharField(max_length=20, choices=ACCTGRP_CHOICES, null = False, blank = False, default = "G")
# AcctReport1 = models.ForeignKey('self', on_delete=models.CASCADE, null=True, blank=True,required=False)
AcctReport1 = models.DecimalField( decimal_places=0, max_digits=6,default=0,null=True, blank=True)
# AcctReport1 = models.DecimalField(max_digits=6, decimal_places=0, default=0, blank=True)
AcctReport2 = models.DecimalField(max_digits=6, decimal_places=0, default=0, blank=True)
AcctPosting = models.BooleanField(default=False, blank=True)
AcctFreeze= models.BooleanField(default=False, blank=True)
AcctBal = models.DecimalField(max_digits=12, decimal_places=2, default=0, null=False)
AcctDefault= models.BooleanField(default=False, blank=True)
class Meta:
ordering = ["AcctCode"]
def __str__(self):
"""String for representing the Model object."""
# return self.ToString(AcctCode)+"-"+self.AcctName
return str(self.AcctCode)
Needs to prepare trai lbalance with
Account Level 1 -Total
Account level 2 - Total
Account Level 3 - total
(more details on chats)