Weird error popping up + POS invoice not syncing

Hello,

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.

Regards,
George

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/app.py", line 56, in application
    response = frappe.handler.handle()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/handler.py", line 19, in handle
    execute_cmd(cmd)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/handler.py", line 42, in execute_cmd
    ret = frappe.call(method, **frappe.form_dict)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 907, in call
    return fn(*args, **newargs)
  File "/home/frappe/frappe-bench/apps/erpnext/erpnext/accounts/doctype/sales_invoice/pos.py", line 302, in make_invoice
    submit_invoice(si_doc, name, doc)
  File "/home/frappe/frappe-bench/apps/erpnext/erpnext/accounts/doctype/sales_invoice/pos.py", line 401, in submit_invoice
    save_invoice(e, si_doc, name)
  File "/home/frappe/frappe-bench/apps/erpnext/erpnext/accounts/doctype/sales_invoice/pos.py", line 407, in save_invoice
    si_doc.insert()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 193, in insert
    self.run_before_save_methods()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 772, in run_before_save_methods
    self.run_method("validate")
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 667, in run_method
    out = Document.hook(fn)(self, *args, **kwargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 892, in composer
    return composed(self, method, *args, **kwargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 875, in runner
    add_to_return_value(self, fn(self, *args, **kwargs))
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", 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/sales_invoice.py", line 54, in validate
    super(SalesInvoice, self).validate()
  File "/home/frappe/frappe-bench/apps/erpnext/erpnext/controllers/selling_controller.py", line 33, in validate
    super(SellingController, self).validate()
  File "/home/frappe/frappe-bench/apps/erpnext/erpnext/controllers/stock_controller.py", line 16, in validate
    super(StockController, self).validate()
  File "/home/frappe/frappe-bench/apps/erpnext/erpnext/controllers/accounts_controller.py", line 47, in validate
    self.validate_due_date()
  File "/home/frappe/frappe-bench/apps/erpnext/erpnext/controllers/accounts_controller.py", line 125, in validate_due_date
    validate_due_date(self.posting_date, self.due_date, "Customer", self.customer, self.company)
  File "/home/frappe/frappe-bench/apps/erpnext/erpnext/accounts/party.py", line 286, in validate_due_date
    frappe.throw(_("Due Date cannot be before Posting Date"))
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 316, in throw
    msgprint(msg, raise_exception=exc, title=title, indicator='red')
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 306, in msgprint
    _raise_exception()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", 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

Hello,

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

Regards

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.

Regards

Hi @xdelios

Kindly do bench update and check

It is indeed working now perfectly.

Thank you.