Weird error popping up + POS invoice not syncing


I am having 2 problems with the latest version.
I keep getting a pop up saying “Due Date cannot be before Posting Date” but I cannot find any invoice that has a due date earlier that posting date.

Also I have a problem with pos invoices. I submit them and they do not sync with the Sales invoices list in the backend.

I am using the latest V8 version.


Also when viewing the console output on Chrome I get the following

desk.min.js:141 Traceback (most recent call last):
  File "/home/frappe/frappe-bench/apps/frappe/frappe/", line 56, in application
    response = frappe.handler.handle()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/", line 19, in handle
  File "/home/frappe/frappe-bench/apps/frappe/frappe/", line 42, in execute_cmd
    ret =, **frappe.form_dict)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/", line 907, in call
    return fn(*args, **newargs)
  File "/home/frappe/frappe-bench/apps/erpnext/erpnext/accounts/doctype/sales_invoice/", line 302, in make_invoice
    submit_invoice(si_doc, name, doc)
  File "/home/frappe/frappe-bench/apps/erpnext/erpnext/accounts/doctype/sales_invoice/", line 401, in submit_invoice
    save_invoice(e, si_doc, name)
  File "/home/frappe/frappe-bench/apps/erpnext/erpnext/accounts/doctype/sales_invoice/", line 407, in save_invoice
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/", line 193, in insert
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/", line 772, in run_before_save_methods
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/", line 667, in run_method
    out = Document.hook(fn)(self, *args, **kwargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/", line 892, in composer
    return composed(self, method, *args, **kwargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/", line 875, in runner
    add_to_return_value(self, fn(self, *args, **kwargs))
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/", line 661, in <lambda>
    fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
  File "/home/frappe/frappe-bench/apps/erpnext/erpnext/accounts/doctype/sales_invoice/", line 54, in validate
    super(SalesInvoice, self).validate()
  File "/home/frappe/frappe-bench/apps/erpnext/erpnext/controllers/", line 33, in validate
    super(SellingController, self).validate()
  File "/home/frappe/frappe-bench/apps/erpnext/erpnext/controllers/", line 16, in validate
    super(StockController, self).validate()
  File "/home/frappe/frappe-bench/apps/erpnext/erpnext/controllers/", line 47, in validate
  File "/home/frappe/frappe-bench/apps/erpnext/erpnext/controllers/", line 125, in validate_due_date
    validate_due_date(self.posting_date, self.due_date, "Customer", self.customer,
  File "/home/frappe/frappe-bench/apps/erpnext/erpnext/accounts/", line 286, in validate_due_date
    frappe.throw(_("Due Date cannot be before Posting Date"))
  File "/home/frappe/frappe-bench/apps/frappe/frappe/", line 316, in throw
    msgprint(msg, raise_exception=exc, title=title, indicator='red')
  File "/home/frappe/frappe-bench/apps/frappe/frappe/", line 306, in msgprint
  File "/home/frappe/frappe-bench/apps/frappe/frappe/", line 279, in _raise_exception
    raise raise_exception, encode(msg)
ValidationError: Due Date cannot be before Posting Date

Any ideas on this?

I am still trying to make a POS sale and its not syncing to sale invoices…

CC @rohit_w

Hi @xdelios

We have fixed this issue and soon we’ll release it.
It seems that due to stock deficiency you were not able to submit the invoice, can you check the stock availability. You can also disable update stock option from the POS profile and make delivery note after syncing of an invoices


I already have stock update disabled so I dont understand why this would happen.


Also let me explain

I can submit the pos invoice and click on pay just fine, then on pos page the invoice shows as paid but it never syncs with the backend. I can never see it on the sale invoices page nor the numbering sequence updates.


Hi @xdelios

Kindly do bench update and check

It is indeed working now perfectly.

Thank you.