mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-31 10:49:09 +00:00
[perpetual accounting] [minor] fixes for test cases
This commit is contained in:
@@ -38,7 +38,7 @@ class DocType:
|
||||
for k in mandatory:
|
||||
if not self.doc.fields.get(k):
|
||||
msgprint(k + _(" is mandatory for GL Entry"), raise_exception=1)
|
||||
|
||||
|
||||
# Zero value transaction is not allowed
|
||||
if not (flt(self.doc.debit) or flt(self.doc.credit)):
|
||||
msgprint(_("GL Entry: Debit or Credit amount is mandatory for ") + self.doc.account,
|
||||
|
||||
@@ -48,8 +48,6 @@ class DocType(SellingController):
|
||||
self.validate_proj_cust()
|
||||
self.validate_with_previous_doc()
|
||||
self.validate_uom_is_integer("stock_uom", "qty")
|
||||
self.validate_warehouse_with_company([d.warehouse
|
||||
for d in self.doclist.get({"parentfield": "entries"})])
|
||||
|
||||
sales_com_obj = get_obj('Sales Common')
|
||||
sales_com_obj.check_stop_sales_order(self)
|
||||
|
||||
@@ -375,7 +375,7 @@ def get_stock_and_account_difference(warehouse_list=None):
|
||||
stock_value = sum([sum(bin_map.get(warehouse, {}).values())
|
||||
for warehouse in warehouse_list])
|
||||
|
||||
if stock_value - account_balance:
|
||||
difference.setdefault(account, (stock_value - account_balance))
|
||||
if flt(stock_value) - flt(account_balance):
|
||||
difference.setdefault(account, flt(stock_value) - flt(account_balance))
|
||||
|
||||
return difference
|
||||
|
||||
Reference in New Issue
Block a user