add: add expence type crud and model

This commit is contained in:
behruz-dev
2025-09-08 17:57:31 +05:00
parent ffe9215892
commit 0d5fcf6ee7
8 changed files with 171 additions and 3 deletions

View File

@@ -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 *

View 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'