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_template.py | |
| parent | 11aa548be858c2751b2e7b4d15ed0ffcc7b5f237 (diff) | |
| parent | 968f63a411f8cc9e190a261123e47604ce54c2b2 (diff) | |
Merged in real-stock (pull request #63)
Real stock
Diffstat (limited to 'indoteknik_custom/models/product_template.py')
| -rwxr-xr-x | indoteknik_custom/models/product_template.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/indoteknik_custom/models/product_template.py b/indoteknik_custom/models/product_template.py index 1a83b702..7abdf1c1 100755 --- a/indoteknik_custom/models/product_template.py +++ b/indoteknik_custom/models/product_template.py @@ -221,7 +221,7 @@ class ProductTemplate(models.Model): datas = json.loads(response.text)['data'] qty = 0 for data in datas: - availability = int(data['availability']) # Mengonversi ke tipe data int + availability = float(data['availability']) # Mengonversi ke tipe data int qty += availability # Mengakumulasi qty dari setiap data return qty |
