fix: if not budget then don't validate (#38861) (cherry picked from commit d375164100158db9b974742caa3e05062c481d7d) Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
This commit is contained in:
parent
4057682c87
commit
793e3ad78e
@ -169,7 +169,9 @@ class MaterialRequest(BuyingController):
|
||||
def on_submit(self):
|
||||
self.update_requested_qty_in_production_plan()
|
||||
self.update_requested_qty()
|
||||
if self.material_request_type == "Purchase":
|
||||
if self.material_request_type == "Purchase" and frappe.db.exists(
|
||||
"Budget", {"applicable_on_material_request": 1, "docstatus": 1}
|
||||
):
|
||||
self.validate_budget()
|
||||
|
||||
def before_save(self):
|
||||
|
Loading…
x
Reference in New Issue
Block a user