fix: mandatory on hold comment for purchase invoice (#20666)

This commit is contained in:
Saqib 2020-02-20 12:29:44 +05:30 committed by GitHub
parent f3acb6b79f
commit cfe2db6d77
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1058,7 +1058,7 @@ def unblock_invoice(name):
@frappe.whitelist()
def block_invoice(name, hold_comment, release_date):
def block_invoice(name, release_date, hold_comment=None):
if frappe.db.exists('Purchase Invoice', name):
pi = frappe.get_doc('Purchase Invoice', name)
pi.block_invoice(hold_comment, release_date)