Delete First

Brightcells 5 years ago
parent
commit
df8adeba18
1 changed files with 3 additions and 0 deletions
  1. 3 0
      commands/management/commands/sale.py

+ 3 - 0
commands/management/commands/sale.py

@@ -32,6 +32,9 @@ class Command(CompatibilityBaseCommand):
32 32
         brands = BrandInfo.objects.filter(status=True)
33 33
 
34 34
         for b in brands:
35
+            SalesResponsibilityInfoModelsSaleStatisticInfo.objects.filter(brand_id=b.brand_id, ymd=day).delete()
36
+            SuperSalesResponsibilityInfoModelsSaleStatisticInfo.objects.filter(brand_id=b.brand_id, ymd=day).delete()
37
+
35 38
             distributors = DistributorInfo.objects.filter(brand_id=b.brand_id, status=True)
36 39
             models = ModelInfo.objects.filter(brand_id=b.brand_id, status=True)
37 40
             for d in distributors: