fix - change base of pre sale / extra sale on quota stat & total purchase of rancher in Quota usage calculation
This commit is contained in:
@@ -863,6 +863,8 @@ class OrganizationQuotaStats(BaseModel):
|
||||
('distribution', 'DISTRIBUTION'),
|
||||
('quota', 'QUOTA'),
|
||||
), default='distribution')
|
||||
free_sale_balance = models.PositiveBigIntegerField(default=0)
|
||||
pre_sale_balance = models.PositiveBigIntegerField(default=0)
|
||||
|
||||
def update_amount(self, main_quota=None):
|
||||
""" calculate total/sold/remaining """
|
||||
|
||||
@@ -321,7 +321,7 @@ class OrganizationQuotaStatsSerializer(serializers.ModelSerializer):
|
||||
|
||||
# rancher live stock statistics by quota distributions
|
||||
representation['rancher_quota_weight_statistics'] = rancher_quota_weight(
|
||||
rancher, quota=instance.quota
|
||||
rancher, quota=instance.quota, quota_stat=instance
|
||||
)
|
||||
|
||||
return representation
|
||||
|
||||
Reference in New Issue
Block a user