summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAzka Nathan <darizkyfaz@gmail.com>2024-08-19 09:08:40 +0700
committerAzka Nathan <darizkyfaz@gmail.com>2024-08-19 09:08:40 +0700
commitc3ad6b7c5d8748c0df8d8f6adddee086ed10fc69 (patch)
treef81476051c4f34cd02d923d613673364cd11cd18
parente7fba490aad1d5253b89eec7094350116e1d87e7 (diff)
fix error sync solr voucher pasti hemat
-rw-r--r--indoteknik_custom/models/solr/product_template.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/indoteknik_custom/models/solr/product_template.py b/indoteknik_custom/models/solr/product_template.py
index 6ad49af7..44e609d4 100644
--- a/indoteknik_custom/models/solr/product_template.py
+++ b/indoteknik_custom/models/solr/product_template.py
@@ -111,12 +111,10 @@ class ProductTemplate(models.Model):
"qty_sold_f": template.qty_sold,
"is_in_bu_b": is_in_bu,
"on_hand_qty_i": on_hand_qty,
- "voucher_pastihemat" : {
- "min_purchase" : voucher.min_purchase_amount or 0,
- "discount_type" : voucher.discount_type or '',
- "discount_amount" : voucher.discount_amount or 0,
- "max_discount" : voucher.max_discount_amount or 0
- }
+ "voucher_min_purchase_f" : voucher.min_purchase_amount or 0,
+ "voucher_discount_type_s" : voucher.discount_type or '',
+ "voucher_discount_amount_f" : voucher.discount_amount or 0,
+ "voucher_max_discount_f" : voucher.max_discount_amount or 0
})
self.solr().add(docs=[document], softCommit=True)