[Urgent] Server Error on Validating Bill with POS Invoice

hi, i’m using erpnext in a working company, and yesterday we updated the system, and we are getting this error in Validating Bills with POS Invoices

Have you added any custom scripts since your last update?

Have you tried: `bench update --reset ?

nop no custom scripts added, i’ll backup and try with bench update reset

Have you tried the same process with another record (Bill, POS Invoice)?

From the screenshot it is a python error of dividing a number (float) with nothing (None) you might have some misconfiguration in that record.

i’m doing the same progress that i always did, and tried without including POS Invoice getting the same result

i still cant validate with bench update --reset

Can you say the version that you updated to? Did you update ErpNext only or was there a OS update or change in the operating environment, python version etc?

Was any change made to settings for precision , in currency for example?

hi, i only did bench update, to the last version i guess :c

any new ideas?

Share the ERPNext and Frappe versions by going to Help > about

Share the steps to replicate this. Also, be sure to report any customizations done to the invoice.

When the error occurs, check the console and paste the traceback. That should help users try to narrow down the issue.

thanks kennethsequeira

Installed Apps

ERPNext: v12.10.0 (version-12)

Frappe Framework: v12.7.3 (version-12)


  • Creating a Client and Patient
  • Asigning and Validating an Encounter
  • Do a Bill Obtaining the prices from “medical attention”
  • Try to Validate It and the errors jumps in

Traceback: request.js.355
Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/desk/form/save.py”, line 19, in savedocs
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 867, in submit
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 856, in _submit
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 273, in save
return self._save(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 326, in _save
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 930, in run_post_save_methods
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 797, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 1071, in composer
return composed(self, method, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 1054, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 791, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/accounts/doctype/sales_invoice/sales_invoice.py”, line 198, in on_submit
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/accounts/doctype/sales_invoice/sales_invoice.py”, line 1108, in make_loyalty_point_entry
points_earned = cint(eligible_amount/lp_details.collection_factor)
TypeError: unsupported operand type(s) for /: ‘float’ and ‘NoneType’

any news guys? or u recommend me to do a clean install and restore my databases?

in that case, how can i backup all my databases?

did you add loyalty program ?

yes i did

share that loyalty program screen shot

Here You Go ^^

already fixed, my minimum ammount for bronze was 36.000 i putted it as 0 and worked again, thanks all ^^

1 Like