change hardcoded payment methods
This commit is contained in:
@@ -87,7 +87,7 @@ class Origami::DiscountsController < BaseOrigamiController
|
||||
remark = "Discount Item Name ->#{sale_item.product_name}-Product Code ->#{sale_item.product_code} | Price [#{sale_item.price}] | Receipt No #{sale.receipt_no} "
|
||||
|
||||
sale_audit = SaleAudit.record_audit_discount(sale_item.sale_id,sale.cashier_name, action_by,remark,"ITEMDISCOUNT" )
|
||||
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ class Origami::OthersPaymentsController < BaseOrigamiController
|
||||
@cashier_type = params[:type]
|
||||
path = request.fullpath
|
||||
if path.include? ("credit_payment")
|
||||
@payment_method_setting = PaymentMethodSetting.where("LOWER(payment_method) in ('mpu','visa','master','jcb','unionpay','alipay') and is_active='1'")
|
||||
@payment_method_setting = PaymentMethodSetting.where("is_active='1'")
|
||||
else
|
||||
@payment_method_setting = PaymentMethodSetting.all
|
||||
end
|
||||
|
||||
@@ -112,7 +112,7 @@ class Origami::ShiftsController < BaseOrigamiController
|
||||
@total_takeway = ShiftSale.get_total_takeway(@shift).total_takeway_amount
|
||||
@total_other_charges = ShiftSale.get_total_other_charges(@shift).total_other_charges_amount
|
||||
@total_credit_payments = ShiftSale.get_shift_sales_with_credit_payment(shift_id).total_credit_payments
|
||||
|
||||
@payment_methods = PaymentMethodSetting.where("is_active='1'").pluck("payment_method")
|
||||
# get printer info
|
||||
print_settings = PrintSetting.find_by_unique_code(unique_code)
|
||||
printer = Printer::CashierStationPrinter.new(print_settings)
|
||||
@@ -125,7 +125,7 @@ class Origami::ShiftsController < BaseOrigamiController
|
||||
end
|
||||
find_close_cashier_print = Lookup.collection_of('close_cashier_print')
|
||||
if find_close_cashier_print[0][1].to_i > 0
|
||||
printer.print_close_cashier(print_settings,cashier_terminal,@shift, @sale_items, @total_other_charges_info, shop_details,@sale_taxes,@other_payment,@total_amount_by_account,@total_discount_by_account,@total_member_discount,@total_dinein,@total_takeway,@total_other_charges,@total_waste,@total_spoile,@total_credit_payments)
|
||||
printer.print_close_cashier(print_settings,cashier_terminal,@shift, @sale_items, @total_other_charges_info, shop_details,@sale_taxes,@other_payment,@total_amount_by_account,@total_discount_by_account,@total_member_discount,@total_dinein,@total_takeway,@total_other_charges,@total_waste,@total_spoile,@total_credit_payments,@payment_methods)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user