change price type int -> decimal field

This commit is contained in:
behruz-dev
2025-11-07 12:17:57 +05:00
parent c113f003df
commit 8dca5505d8
35 changed files with 584 additions and 195 deletions

View File

@@ -21,9 +21,9 @@ class ExpenceContract(BaseModel):
Counterparty, on_delete=models.SET_NULL, related_name='expence_contracts', null=True, blank=True
)
price = models.PositiveBigIntegerField()
price = models.DecimalField(max_digits=15, decimal_places=2, default=0.00)
currency = models.CharField(max_length=3, choices=[('uzs', 'uzs'), ('usd', 'usd')])
paid_price = models.PositiveBigIntegerField(default=0, null=True, blank=True)
paid_price = models.DecimalField(max_digits=15, decimal_places=2, default=0.00)
date = models.DateField()
comment = models.TextField(null=True, blank=True)