Merge pull request #23709 from marination/cashier-closing-type-issue
fix: Cashier Closing Type Issue
This commit is contained in:
commit
99dfbfc365
@ -23,13 +23,13 @@ class CashierClosing(Document):
|
|||||||
where posting_date=%s and posting_time>=%s and posting_time<=%s and owner=%s
|
where posting_date=%s and posting_time>=%s and posting_time<=%s and owner=%s
|
||||||
""", (self.date, self.from_time, self.time, self.user))
|
""", (self.date, self.from_time, self.time, self.user))
|
||||||
self.outstanding_amount = flt(values[0][0] if values else 0)
|
self.outstanding_amount = flt(values[0][0] if values else 0)
|
||||||
|
|
||||||
def make_calculations(self):
|
def make_calculations(self):
|
||||||
total = 0.00
|
total = 0.00
|
||||||
for i in self.payments:
|
for i in self.payments:
|
||||||
total += flt(i.amount)
|
total += flt(i.amount)
|
||||||
|
|
||||||
self.net_amount = total + self.outstanding_amount + self.expense - self.custody + self.returns
|
self.net_amount = total + self.outstanding_amount + flt(self.expense) - flt(self.custody) + flt(self.returns)
|
||||||
|
|
||||||
def validate_time(self):
|
def validate_time(self):
|
||||||
if self.from_time >= self.time:
|
if self.from_time >= self.time:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user