add - org quota stat to inventory_entry / inventory_balance to org_quota_stat
This commit is contained in:
@@ -470,6 +470,7 @@ class Quota(BaseModel):
|
||||
organization=org
|
||||
)
|
||||
return {
|
||||
"id": stat.first().id if stat.exists() else 0,
|
||||
"quota_weight": stat.first().total_amount if stat.exists() else 0,
|
||||
"remaining_weight": stat.first().remaining_amount if stat.exists() else 0,
|
||||
"quota_distributed": stat.first().total_distributed if stat.exists() else 0,
|
||||
@@ -817,6 +818,7 @@ class OrganizationQuotaStats(BaseModel):
|
||||
total_amount = models.PositiveBigIntegerField(default=0)
|
||||
total_distributed = models.PositiveBigIntegerField(default=0)
|
||||
inventory_received = models.PositiveBigIntegerField(default=0)
|
||||
inventory_entry_balance = models.PositiveBigIntegerField(default=0)
|
||||
sold_amount = models.PositiveBigIntegerField(default=0)
|
||||
remaining_amount = models.PositiveBigIntegerField(default=0) # total - sold
|
||||
stat_type = models.CharField(max_length=150, choices=(
|
||||
|
||||
Reference in New Issue
Block a user