closing balance
This commit is contained in:
@@ -29,6 +29,7 @@ class Origami::ShiftsController < BaseOrigamiController
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
def edit
|
||||
end
|
||||
end
|
||||
|
||||
@@ -52,4 +52,10 @@ class ShiftSale < ApplicationRecord
|
||||
self.save
|
||||
|
||||
end
|
||||
|
||||
def get_closing_balance(shift)
|
||||
shiftobj = ShiftSale.find(shift)
|
||||
closing_balance = shiftobj.grand_total + shiftobj.cash_in - shiftobj.cash_out + shiftobj.total_cash
|
||||
return closing_balance
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user