diff options
| author | Azka Nathan <darizkyfaz@gmail.com> | 2023-07-27 08:25:39 +0700 |
|---|---|---|
| committer | Azka Nathan <darizkyfaz@gmail.com> | 2023-07-27 08:25:39 +0700 |
| commit | e242ba1f680ff543ccdbe3ff5eee08924588a8e5 (patch) | |
| tree | 1cb85c1a0c9175d978425c87c86b1365f5aa7496 /indoteknik_api/controllers/api_v1 | |
| parent | 4e942ec974303d0df73eecb270f2bcf127eaf2a7 (diff) | |
fix condition api product sla
Diffstat (limited to 'indoteknik_api/controllers/api_v1')
| -rw-r--r-- | indoteknik_api/controllers/api_v1/product.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/indoteknik_api/controllers/api_v1/product.py b/indoteknik_api/controllers/api_v1/product.py index 20684107..e08ec97b 100644 --- a/indoteknik_api/controllers/api_v1/product.py +++ b/indoteknik_api/controllers/api_v1/product.py @@ -55,12 +55,13 @@ class Product(controller.Controller): except: print('error') else: - if qty_vendor > 0: - qty = total_excell - sla_date = '2-4 Hari' - else: + if qty_available > 0: qty = qty_available sla_date = product_sla.sla or '-' + elif qty_vendor > 0: + qty = total_excell + sla_date = '2-4 Hari' + data = { 'qty': qty, |
