closed and active quota lists - incentive plan search

This commit is contained in:
2025-07-12 12:58:23 +03:30
parent b60165aa42
commit 24e3d6b155
9 changed files with 795 additions and 673 deletions

View File

@@ -268,9 +268,6 @@ class IncentivePlan(BaseModel):
start_date_limit = models.DateField(null=True, blank=True)
end_date_limit = models.DateField(null=True, blank=True)
class Meta:
unique_together = ('name', 'registering_organization')
def __str__(self):
return self.name
@@ -304,6 +301,12 @@ class Quota(BaseModel):
null=True
)
sale_type = models.CharField(max_length=50, choices=[("free", "آزاد"), ("gov", "دولتی")]) # noqa
sale_unit = models.ForeignKey(
SaleUnit,
on_delete=models.CASCADE,
related_name='quotas',
null=True
)
month_choices = ArrayField(base_field=models.IntegerField(), null=True)
group = models.CharField(
max_length=50,
@@ -311,7 +314,6 @@ class Quota(BaseModel):
)
has_distribution_limit = models.BooleanField(default=False)
distribution_mode = ArrayField(base_field=models.IntegerField(), blank=True, null=True)
base_price_factory = models.DecimalField(max_digits=12, decimal_places=2)
base_price_cooperative = models.DecimalField(max_digits=12, decimal_places=2)
final_price = models.DecimalField(max_digits=12, decimal_places=2, null=True, blank=True)