diff options
| author | Azka Nathan <darizkyfaz@gmail.com> | 2024-06-25 09:09:34 +0700 |
|---|---|---|
| committer | Azka Nathan <darizkyfaz@gmail.com> | 2024-06-25 09:09:34 +0700 |
| commit | ac01fa257abf2f12588d240689c42f0d12da644f (patch) | |
| tree | 5014114abc523d13a944e2ecdd0929d469f9e08c /indoteknik_custom/models/automatic_purchase.py | |
| parent | 6e256f5d35f48f75804829ddef08288905c33c68 (diff) | |
trying to fix ppn keluar on bill
Diffstat (limited to 'indoteknik_custom/models/automatic_purchase.py')
| -rw-r--r-- | indoteknik_custom/models/automatic_purchase.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/indoteknik_custom/models/automatic_purchase.py b/indoteknik_custom/models/automatic_purchase.py index 2c83c0ea..73416c48 100644 --- a/indoteknik_custom/models/automatic_purchase.py +++ b/indoteknik_custom/models/automatic_purchase.py @@ -506,13 +506,15 @@ class AutomaticPurchase(models.Model): taxes = '' human_last_update = purchase_price.human_last_update or datetime.min system_last_update = purchase_price.system_last_update or datetime.min - - price = purchase_price.product_price - taxes = purchase_price.taxes_product_id.id + + if purchase_price.taxes_product_id.type_tax_use == 'purchase': + price = purchase_price.product_price + taxes = purchase_price.taxes_product_id.id if system_last_update > human_last_update: - price = purchase_price.system_price - taxes = purchase_price.taxes_system_id.id + if purchase_price.taxes_system_id.type_tax_use == 'purchase': + price = purchase_price.system_price + taxes = purchase_price.taxes_system_id.id return price, taxes |
