Typeerror: not all arguments converted during string formatting adding items to order

ERPNext: v14.36.0 (version-14)

Frappe Framework: v14.46.0 (version-14)

Frappe HR: v15.0.0-dev (version-14)

Payments: v0.0.1 (develop)

POS Awesome: v6.1.3 (develop)

error occrus when i try to add items on a sale invoice or sale order, create delivery note from sale order

any idea?

*** it’s urgent i cannot make sale orders not invoices please ***

App Versions

{
	"erpnext": "14.31.3",
	"frappe": "14.47.1",
	"hrms": "14.8.0",
	"payments": "0.0.1",
	"posawesome": "6.1.2"
}

Route

Form/Sales Order/SAL-ORD-2023-00631

Traceback

Traceback (most recent call last):
  File "apps/frappe/frappe/app.py", line 94, in application
    response = frappe.api.handle()
  File "apps/frappe/frappe/api.py", line 54, in handle
    return frappe.handler.handle()
  File "apps/frappe/frappe/handler.py", line 47, in handle
    data = execute_cmd(cmd)
  File "apps/frappe/frappe/handler.py", line 85, in execute_cmd
    return frappe.call(method, **frappe.form_dict)
  File "apps/frappe/frappe/__init__.py", line 1622, in call
    return fn(*args, **newargs)
  File "apps/frappe/frappe/model/mapper.py", line 36, in make_mapped_doc
    return method(source_name)
  File "apps/erpnext/erpnext/selling/doctype/sales_order/sales_order.py", line 691, in make_delivery_note
    target_doc = get_mapped_doc("Sales Order", source_name, mapper, target_doc, set_missing_values)
  File "apps/frappe/frappe/model/mapper.py", line 148, in get_mapped_doc
    postprocess(source_doc, target_doc)
  File "apps/erpnext/erpnext/selling/doctype/sales_order/sales_order.py", line 635, in set_missing_values
    target.run_method("set_missing_values")
  File "apps/frappe/frappe/model/document.py", line 917, in run_method
    out = Document.hook(fn)(self, *args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 1279, in composer
    return composed(self, method, *args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 1261, in runner
    add_to_return_value(self, fn(self, *args, **kwargs))
  File "apps/frappe/frappe/model/document.py", line 914, in fn
    return method_object(*args, **kwargs)
  File "apps/erpnext/erpnext/controllers/selling_controller.py", line 50, in set_missing_values
    self.set_price_list_and_item_details(for_validate=for_validate)
  File "apps/erpnext/erpnext/controllers/selling_controller.py", line 109, in set_price_list_and_item_details
    self.set_missing_item_details(for_validate=for_validate)
  File "apps/erpnext/erpnext/controllers/accounts_controller.py", line 549, in set_missing_item_details
    ret = get_item_details(args, self, for_validate=True, overwrite_warehouse=False)
  File "apps/erpnext/erpnext/stock/get_item_details.py", line 127, in get_item_details
    data = get_pricing_rule_for_item(args, doc=doc, for_validate=for_validate)
  File "apps/erpnext/erpnext/accounts/doctype/pricing_rule/pricing_rule.py", line 340, in get_pricing_rule_for_item
    else get_pricing_rules(args, doc)
  File "apps/erpnext/erpnext/accounts/doctype/pricing_rule/utils.py", line 53, in get_pricing_rules
    pricing_rule = filter_pricing_rules(args, pricing_rules, doc)
  File "apps/erpnext/erpnext/accounts/doctype/pricing_rule/utils.py", line 286, in filter_pricing_rules
    data = get_qty_amount_data_for_cumulative(pr_doc, args, items)
  File "apps/erpnext/erpnext/accounts/doctype/pricing_rule/utils.py", line 530, in get_qty_amount_data_for_cumulative
    data_set = frappe.db.sql(
  File "apps/frappe/frappe/database/database.py", line 220, in sql
    self._cursor.execute(query, values)
  File "env/lib/python3.10/site-packages/pymysql/cursors.py", line 156, in execute
    query = self.mogrify(query, args)
  File "env/lib/python3.10/site-packages/pymysql/cursors.py", line 134, in mogrify
    query = query % self._escape_args(args, conn)
TypeError: not all arguments converted during string formatting

Request Data

{
	"type": "POST",
	"args": {
		"method": "erpnext.selling.doctype.sales_order.sales_order.make_delivery_note",
		"source_name": "SAL-ORD-2023-00631",
		"args": "{}",
		"selected_children": "{}"
	},
	"freeze": true,
	"freeze_message": "",
	"headers": {},
	"error_handlers": {},
	"url": "/api/method/frappe.model.mapper.make_mapped_doc"
}

Response Data

{
	"exception": "TypeError: not all arguments converted during string formatting"
}