fixed from trello bug

This commit is contained in:
Yan
2017-10-25 18:25:28 +06:30
parent 32866428ce
commit 9cc2c61700
5 changed files with 39 additions and 31 deletions

View File

@@ -217,6 +217,9 @@ class Promotion < ApplicationRecord
update_existing_item(foc_qty, item, sale_id, "promotion discount", price)
else
foc_qty = find_second_item_qty(sale_id, promo_product.item_code)
# give total qty is 1
foc_qty = (foc_qty - foc_qty) + 1
item = OrderItem.find_by_item_instance_code(promo_product.item_code)
# total = item.price * foc_qty
total = item.price