add: add new field for expence income, and add to filter new fields
This commit is contained in:
@@ -13,7 +13,8 @@ class ExpenceFilter(django_filters.FilterSet):
|
||||
class Meta:
|
||||
model = Expence
|
||||
fields = [
|
||||
'payment_type', 'project_folder', 'project', 'user', 'expence_type', 'cash_transaction', 'date'
|
||||
'payment_type', 'project_folder', 'project', 'user', 'expence_type', 'cash_transaction', 'date',
|
||||
'audit', 'counterparty'
|
||||
]
|
||||
|
||||
def filter_by_created_at(self, queryset, name, value):
|
||||
|
||||
@@ -13,7 +13,8 @@ class IncomeFilter(django_filters.FilterSet):
|
||||
class Meta:
|
||||
model = Income
|
||||
fields = [
|
||||
'payment_type', 'project_folder', 'project', 'user', 'type_income', 'date', 'cash_transaction'
|
||||
'payment_type', 'project_folder', 'project', 'user', 'type_income', 'date', 'cash_transaction',
|
||||
'audit', 'counterparty'
|
||||
]
|
||||
|
||||
def filter_by_created_at(self, queryset, name, value):
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
# Generated by Django 5.2.4 on 2025-09-29 15:28
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('finance', '0030_incomechat_incomemessage'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='expence',
|
||||
name='audit',
|
||||
field=models.CharField(blank=True, choices=[('CHECKED', 'tekshirildi'), ('PROCESS', 'jarayonda')], max_length=20, null=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='income',
|
||||
name='audit',
|
||||
field=models.CharField(blank=True, choices=[('CHECKED', 'tekshirildi'), ('PROCESS', 'jarayonda')], max_length=20, null=True),
|
||||
),
|
||||
]
|
||||
@@ -38,7 +38,10 @@ class Expence(BaseModel):
|
||||
)
|
||||
date = models.DateField(null=True, blank=True)
|
||||
comment = models.TextField(null=True, blank=True)
|
||||
audit = models.CharField(max_length=200, null=True, blank=True)
|
||||
audit = models.CharField(
|
||||
max_length=20, choices=[('CHECKED', 'tekshirildi'),('PROCESS', 'jarayonda')],
|
||||
null=True, blank=True
|
||||
)
|
||||
file = models.FileField(null=True, blank=True, upload_to='finance/expence/files/')
|
||||
status = models.CharField(max_length=20, choices=STATUS, default='PENDING', null=True, blank=True)
|
||||
is_deleted = models.BooleanField(default=False)
|
||||
|
||||
@@ -31,7 +31,10 @@ class Income(BaseModel):
|
||||
date = models.DateField(null=True, blank=True)
|
||||
comment = models.TextField(null=True, blank=True)
|
||||
file = models.FileField(upload_to='finance/income/file/', null=True, blank=True)
|
||||
audit = models.CharField(max_length=200, null=True, blank=True)
|
||||
audit = models.CharField(
|
||||
max_length=20, choices=[('CHECKED', 'tekshirildi'),('PROCESS', 'jarayonda')],
|
||||
null=True, blank=True
|
||||
)
|
||||
is_deleted = models.BooleanField(default=False)
|
||||
|
||||
def __str__(self):
|
||||
|
||||
Reference in New Issue
Block a user