class Origami::CashOutsController < BaseOrigamiController def new end def create reference = params[:reference] remark = params[:remark] amount = params[:amount] p_jour = PaymentJournal.new p_jour.cash_out(reference, remark, amount, current_user.id) shift = ShiftSale.current_open_shift(current_user.id) shift.cash_out = shift.cash_out + amount.to_i shift.save end #Shop Name in Navbor helper_method :shop_detail def shop_detail @shop = Shop.first end end