closing balance

This commit is contained in:
Nweni
2017-06-30 10:07:51 +06:30
parent 959102b338
commit 063d561f3e
2 changed files with 7 additions and 0 deletions

View File

@@ -29,6 +29,7 @@ class Origami::ShiftsController < BaseOrigamiController
end
end
def edit
end
end

View File

@@ -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