fix logic of quantity validation (#9311)
This commit is contained in:
parent
b07535bb64
commit
5f407907a2
@ -59,6 +59,7 @@ class PurchaseInvoice(BuyingController):
|
||||
self.check_for_closed_status()
|
||||
self.validate_with_previous_doc()
|
||||
self.validate_uom_is_integer("uom", "qty")
|
||||
self.validate_uom_is_integer("stock_uom", "stock_qty")
|
||||
self.set_expense_account(for_validate=True)
|
||||
self.set_against_expense_account()
|
||||
self.validate_write_off_account()
|
||||
|
@ -57,7 +57,8 @@ class SalesInvoice(SellingController):
|
||||
self.so_dn_required()
|
||||
self.validate_proj_cust()
|
||||
self.validate_with_previous_doc()
|
||||
self.validate_uom_is_integer("stock_uom", "qty")
|
||||
self.validate_uom_is_integer("stock_uom", "stock_qty")
|
||||
self.validate_uom_is_integer("uom", "qty")
|
||||
self.check_close_sales_order("sales_order")
|
||||
self.validate_debit_to_acc()
|
||||
self.clear_unallocated_advances("Sales Invoice Advance", "advances")
|
||||
|
@ -43,7 +43,7 @@ class PurchaseOrder(BuyingController):
|
||||
self.check_for_closed_status()
|
||||
|
||||
self.validate_uom_is_integer("uom", "qty")
|
||||
self.validate_uom_is_integer("stock_uom", ["qty", "required_qty"])
|
||||
self.validate_uom_is_integer("stock_uom", "stock_qty")
|
||||
|
||||
self.validate_with_previous_doc()
|
||||
self.validate_for_subcontracting()
|
||||
|
@ -32,7 +32,7 @@ class SalesOrder(SellingController):
|
||||
self.validate_mandatory()
|
||||
self.validate_proj_cust()
|
||||
self.validate_po()
|
||||
self.validate_uom_is_integer("stock_uom", "qty")
|
||||
self.validate_uom_is_integer("stock_uom", "stock_qty")
|
||||
self.validate_uom_is_integer("uom", "qty")
|
||||
self.validate_for_items()
|
||||
self.validate_warehouse()
|
||||
|
@ -102,7 +102,7 @@ class DeliveryNote(SellingController):
|
||||
self.check_close_sales_order("against_sales_order")
|
||||
self.validate_for_items()
|
||||
self.validate_warehouse()
|
||||
self.validate_uom_is_integer("stock_uom", "qty")
|
||||
self.validate_uom_is_integer("stock_uom", "stock_qty")
|
||||
self.validate_uom_is_integer("uom", "qty")
|
||||
self.validate_with_previous_doc()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user