update void foc and credit for member discount

This commit is contained in:
Aung Myo
2017-12-28 18:02:25 +06:30
parent 06acf3acb9
commit ecb9a5f010
5 changed files with 22 additions and 12 deletions

View File

@@ -261,6 +261,11 @@ class Origami::PaymentsController < BaseOrigamiController
if(Sale.exists?(sale_id))
saleObj = Sale.find(sale_id)
if saleObj.discount_type == "member_discount"
saleObj.compute_by_sale_items(sale_id, saleObj.sale_items,0)
end
sale_payment = SalePayment.new
sale_payment.process_payment(saleObj, @user, cash, "foc")