This commit is contained in:
Moe Su
2017-06-11 13:58:34 +06:30
29 changed files with 232 additions and 334 deletions

View File

@@ -10,7 +10,7 @@ class Origami::PaymentsController < BaseOrigamiController
if(Sale.exists?(sale_id))
saleObj = Sale.find(sale_id)
sale_payment = SalePayment.new
sale_payment.process_payment(saleObj, @user, cash)
sale_payment.process_payment(saleObj, @user, cash, "cash")
end
end
@@ -18,6 +18,11 @@ class Origami::PaymentsController < BaseOrigamiController
sale_id = params[:sale_id]
if Sale.exists?(sale_id)
@sale_data = Sale.find_by_sale_id(sale_id)
@sale_data.sale_payments.each do |spay|
if spay.payment_method == "cash"
@cash = spay.payment_amount
end
end
end
end

View File

@@ -18,4 +18,4 @@ class Origami::PayparPaymentsController < BaseOrigamiController
end
end
end
end