diff options
| author | IT Fixcomart <it@fixcomart.co.id> | 2023-07-24 01:59:15 +0000 |
|---|---|---|
| committer | IT Fixcomart <it@fixcomart.co.id> | 2023-07-24 01:59:15 +0000 |
| commit | 6966c00bf2ef2bd9c2261d9363ac6b463a7766dd (patch) | |
| tree | 2149f187f28c0897f4d17118209231a95084b35d /indoteknik_custom/models/product_sla.py | |
| parent | 11aa548be858c2751b2e7b4d15ed0ffcc7b5f237 (diff) | |
| parent | 968f63a411f8cc9e190a261123e47604ce54c2b2 (diff) | |
Merged in real-stock (pull request #63)
Real stock
Diffstat (limited to 'indoteknik_custom/models/product_sla.py')
| -rw-r--r-- | indoteknik_custom/models/product_sla.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/indoteknik_custom/models/product_sla.py b/indoteknik_custom/models/product_sla.py index f969502f..2e663d30 100644 --- a/indoteknik_custom/models/product_sla.py +++ b/indoteknik_custom/models/product_sla.py @@ -51,12 +51,9 @@ class ProductSla(models.Model): qty_available = 0 qty_available = product.qty_onhand_bandengan - qty_available -= 10 - if qty_available < 10: - qty_available = 0 - - if qty_available > 10: + + if qty_available > 0: self.sla = '1 Hari' query = [ @@ -80,7 +77,7 @@ class ProductSla(models.Model): rounded_leadtime = math.ceil(avg_leadtime) self.avg_leadtime = rounded_leadtime if rounded_leadtime >= 1 and rounded_leadtime <= 5: - self.sla = '3-6 Hari' + self.sla = '3-7 Hari' elif rounded_leadtime >= 6 and rounded_leadtime <= 10: self.sla = '4-12 Hari' elif rounded_leadtime >= 11: |
