shift open/close
This commit is contained in:
@@ -4,10 +4,11 @@ class Origami::ShiftsController < BaseOrigamiController
|
||||
end
|
||||
|
||||
def show
|
||||
@shift = ShiftSale.current_open_shift(current_user.id)
|
||||
end
|
||||
|
||||
def new
|
||||
@float = Lookup.where('lookup_type=?','float')
|
||||
@float = Lookup.where('lookup_type=?','float_value')
|
||||
end
|
||||
|
||||
def create
|
||||
@@ -16,6 +17,14 @@ class Origami::ShiftsController < BaseOrigamiController
|
||||
@shift.create(opening_balance,current_user)
|
||||
end
|
||||
|
||||
def update_shift
|
||||
@shift = ShiftSale.current_open_shift(current_user.id)
|
||||
if @shift
|
||||
@shift.shift_closed_at = DateTime.now.utc
|
||||
@shift.save
|
||||
end
|
||||
end
|
||||
|
||||
def edit
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user