You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This change assumes that there will always be a purchase order linked to Payment Entry when applying TDS. This breaks when there is none.
Module
accounts
Version
Frappe-version-13, ERPNext Version - 13.55
Installation method
manual install
Relevant log output / Stack trace / Full Error Message.
Since there is no PO linked to the payment, getting this exception in
File "apps/erpnext/erpnext/accounts/doctype/payment_entry/payment_entry.py", line 675, in get_order_net_total
tax_withholding_net_total = frappe.db.get_value(
:8000/api/method/frappe.desk.form.save.savedocs:1
Failed to load resource: the server responded with a status of 500 (INTERNAL SERVER ERROR)
desk.min.js?ver=1713465470.0:sourcemap:4140 Syntax error in query:
desk.min.js?ver=1713465470.0:sourcemap:4140 selectsum(base_net_total) from `tabPurchase Order` where `name`in () order by modified desc limit 1
desk.min.js?ver=1713465470.0:sourcemap:4140 Traceback (most recent call last):
File "apps/frappe/frappe/app.py", line 66, in application
response = frappe.api.handle()
File "apps/frappe/frappe/api.py", line 55, in handle
returnfrappe.handler.handle()
File "apps/frappe/frappe/handler.py", line 38, in handle
data = execute_cmd(cmd)
File "apps/frappe/frappe/handler.py", line 76, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File "apps/frappe/frappe/__init__.py", line 1474, in call
return fn(*args, **newargs)
File "apps/frappe/frappe/desk/form/save.py", line 25, in savedocs
doc.save()
File "apps/frappe/frappe/model/document.py", line 312, in save
return self._save(*args, **kwargs)
File "apps/frappe/frappe/model/document.py", line 334, in _save
returnself.insert()
File "apps/frappe/frappe/model/document.py", line 263, in insert
self.run_before_save_methods()
File "apps/frappe/frappe/model/document.py", line 1059, in run_before_save_methods
self.run_method("validate")
File "apps/frappe/frappe/model/document.py", line 943, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File "apps/frappe/frappe/model/document.py", line 1267, in composer
return composed(self, method, *args, **kwargs)
File "apps/frappe/frappe/model/document.py", line 1249, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File "apps/frappe/frappe/model/document.py", line 940, in fn
return method_object(*args, **kwargs)
File "apps/erpnext/erpnext/accounts/doctype/payment_entry/payment_entry.py", line 82, in validate
self.set_tax_withholding()
File "apps/erpnext/erpnext/accounts/doctype/payment_entry/payment_entry.py", line 620, in set_tax_withholding
order_amount = self.get_order_net_total()
File "apps/erpnext/erpnext/accounts/doctype/payment_entry/payment_entry.py", line 675, in get_order_net_total
tax_withholding_net_total = frappe.db.get_value(
File "apps/frappe/frappe/database/database.py", line 472, in get_value
ret = self.get_values(
File "apps/frappe/frappe/database/database.py", line 544, in get_values
out = self._get_values_from_table(
File "apps/frappe/frappe/database/database.py", line 739, in _get_values_from_table
r = self.sql(
File "apps/frappe/frappe/database/database.py", line 187, in sql
self._cursor.execute(query, values)
File "env/lib/python3.8/site-packages/pymysql/cursors.py", line 148, in execute
result = self._query(query)
File "env/lib/python3.8/site-packages/pymysql/cursors.py", line 310, in _query
conn.query(q)
File "env/lib/python3.8/site-packages/pymysql/connections.py", line 548, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
File "env/lib/python3.8/site-packages/pymysql/connections.py", line 775, in _read_query_result
result.read()
File "env/lib/python3.8/site-packages/pymysql/connections.py", line 1156, inread
first_packet = self.connection._read_packet()
File "env/lib/python3.8/site-packages/pymysql/connections.py", line 725, in _read_packet
packet.raise_for_error()
File "env/lib/python3.8/site-packages/pymysql/protocol.py", line 221, in raise_for_error
err.raise_mysql_exception(self._data)
File "env/lib/python3.8/site-packages/pymysql/err.py", line 143, in raise_mysql_exception
raise errorclass(errno, errval)
pymysql.err.ProgrammingError: (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ') order by modified desc limit 1' at line 1")
:8000/api/method/frappe.desk.form.save.savedocs:1
Failed to load resource: net::ERR_NETWORK_IO_SUSPENDED
The text was updated successfully, but these errors were encountered:
Information about bug
This change assumes that there will always be a purchase order linked to Payment Entry when applying TDS. This breaks when there is none.
Module
accounts
Version
Frappe-version-13, ERPNext Version - 13.55
Installation method
manual install
Relevant log output / Stack trace / Full Error Message.
The text was updated successfully, but these errors were encountered: