diff --git a/erpnext/accounts/doctype/pos_invoice/pos_invoice.py b/erpnext/accounts/doctype/pos_invoice/pos_invoice.py index 23ef9099b6d..71d04db1ea0 100644 --- a/erpnext/accounts/doctype/pos_invoice/pos_invoice.py +++ b/erpnext/accounts/doctype/pos_invoice/pos_invoice.py @@ -1036,8 +1036,7 @@ def make_sales_return(source_name: str, target_doc: Document | str | None = None def make_merge_log(invoices: str | list): import json - if isinstance(invoices, str): - invoices = json.loads(invoices) + invoices = frappe.parse_json(invoices) if len(invoices) == 0: frappe.throw(_("At least one invoice has to be selected."))