add: add expence type crud and model
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
from .cash_transaction import *
|
||||
from .payment_type import *
|
||||
from .type_income import *
|
||||
from .income import *
|
||||
from .income import *
|
||||
from .expence_type import *
|
||||
22
core/apps/finance/models/expence_type.py
Normal file
22
core/apps/finance/models/expence_type.py
Normal file
@@ -0,0 +1,22 @@
|
||||
from django.db import models
|
||||
|
||||
from core.apps.shared.models import BaseModel
|
||||
|
||||
|
||||
class ExpenceType(BaseModel):
|
||||
name = models.CharField(max_length=200)
|
||||
category = models.CharField(
|
||||
choices=[('OTHERS', 'boshqalar'), ('FIXED_COST', 'doimiy xarajat')], max_length=20
|
||||
)
|
||||
activity = models.CharField(
|
||||
max_length=20, choices=[('FINANCIAL', 'moliyaviy'), ('CAPITAL', 'sarmoya')]
|
||||
)
|
||||
comment = models.CharField(max_length=200)
|
||||
status = models.BooleanField(default=True)
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
|
||||
class Meta:
|
||||
verbose_name = 'xarajat turi'
|
||||
verbose_name_plural = 'xarajat turlari'
|
||||
Reference in New Issue
Block a user