summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAzka Nathan <darizkyfaz@gmail.com>2025-08-27 15:36:54 +0700
committerAzka Nathan <darizkyfaz@gmail.com>2025-08-27 15:36:54 +0700
commitfbf4071010149637fed008c581424137577ee67f (patch)
tree84f9acf8b016cef2729731a53d5bb2f163b4e92d
parent9add83a67fb62b20db56750f3d318debb84ea5e5 (diff)
fix bug program line
-rw-r--r--indoteknik_custom/models/solr/promotion_program_line.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/indoteknik_custom/models/solr/promotion_program_line.py b/indoteknik_custom/models/solr/promotion_program_line.py
index 4eafb9ac..64ad4209 100644
--- a/indoteknik_custom/models/solr/promotion_program_line.py
+++ b/indoteknik_custom/models/solr/promotion_program_line.py
@@ -64,7 +64,7 @@ class PromotionProgramLine(models.Model):
'free_product_ids': [x.product_id.id for x in rec.free_product_ids],
'free_products_s': json.dumps(free_products),
'total_qty_i': sum([x.qty for x in rec.product_ids] + [x.qty for x in rec.free_product_ids]),
- 'total_qty_sold_f': sum([x.product_id.qty_sold for x in rec.product_ids]),
+ 'total_qty_sold_f': [x.product_id.qty_sold for x in rec.product_ids],
'active_b': rec.active,
"manufacture_name_s": rec.product_ids.product_id.x_manufacture.x_name or '',
"category_name": category_names,