fix - change base of pre sale / extra sale on quota stat & total purchase of rancher in Quota usage calculation

This commit is contained in:
2025-11-26 15:50:35 +03:30
parent 817f26519d
commit 65bdb539bc
7 changed files with 51 additions and 26 deletions

View File

@@ -247,6 +247,12 @@ class ExtraSale(BaseModel):
related_name='extra_sales',
null=True
)
quota_stat = models.ForeignKey(
product_models.OrganizationQuotaStats,
on_delete=models.CASCADE,
related_name='extra_sales',
null=True
)
transaction = models.ForeignKey(
InventoryQuotaSaleTransaction,
on_delete=models.CASCADE,
@@ -281,6 +287,12 @@ class QuotaPreSaleItem(BaseModel):
related_name='pre_sales',
null=True
)
quota_stat = models.ForeignKey(
product_models.OrganizationQuotaStats,
on_delete=models.CASCADE,
related_name='pre_sales',
null=True
)
transaction = models.ForeignKey(
InventoryQuotaSaleTransaction,
on_delete=models.CASCADE,