mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-16 11:39:18 +00:00
[Fix] POS Closing Voucher, on save collected amount becomes zero issue and added test cases (#14649)
* [Fix] POS Closing Voucher, on save collected amount becomes zero * Added test cases for the POS Closing Voucher
This commit is contained in:
committed by
Nabin Hait
parent
648728f330
commit
3a595d07d0
@@ -363,4 +363,4 @@ def check_active_sales_items(obj):
|
||||
"company": obj.company,
|
||||
"income_account": d.income_account
|
||||
})
|
||||
doc.save()
|
||||
doc.save(ignore_permissions=True)
|
||||
|
||||
@@ -166,6 +166,7 @@ class calculate_taxes_and_totals(object):
|
||||
|
||||
def calculate_net_total(self):
|
||||
self.doc.total_qty = self.doc.total = self.doc.base_total = self.doc.net_total = self.doc.base_net_total = 0.0
|
||||
|
||||
for item in self.doc.get("items"):
|
||||
self.doc.total += item.amount
|
||||
self.doc.total_qty += item.qty
|
||||
@@ -175,6 +176,9 @@ class calculate_taxes_and_totals(object):
|
||||
|
||||
self.doc.round_floats_in(self.doc, ["total", "base_total", "net_total", "base_net_total"])
|
||||
|
||||
if self.doc.doctype == 'Sales Invoice' and self.doc.is_pos:
|
||||
self.doc.pos_total_qty = self.doc.total_qty
|
||||
|
||||
def calculate_taxes(self):
|
||||
self.doc.rounding_adjustment = 0
|
||||
# maintain actual tax rate based on idx
|
||||
|
||||
Reference in New Issue
Block a user