frappe / erpnext

Free and Open Source Enterprise Resource Planning (ERP)
https://erpnext.com
GNU General Public License v3.0
20.37k stars 7.08k forks source link

Error while submitting internal sales invoice #34834

Open sjain17 opened 1 year ago

sjain17 commented 1 year ago

Information about bug

Steps =

  1. Create Customer - Is Internal Customer = true, address = GST State Delhi
  2. Create an Item with a Batch number
  3. Create a sales order for an internal customer with a Delhi Address and Company & Dispatch of any other GST State (Maharashtra)
  4. Update Stock Check box = True and Source Warehouse = Maharashtra , Target Warehouse = Goods in Transit.
  5. Submit the invoice and below error is appearing

When I am trying to submit a sales invoice of an internal customer the system is not allowing it and throws an exception of "Account is Required".

Module

accounts

Version

ERPNext: v14.20.3 (version-14) Frappe Framework: v14.31.0 (version-14) Frappe HR: v1.0.0 (develop) India Compliance: v14.5.2 (version-14)

Installation method

manual install

Relevant log output / Stack trace / Full Error Message.

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 54, in handle
    return frappe.handler.handle()
  File "apps/frappe/frappe/handler.py", line 45, in handle
    data = execute_cmd(cmd)
  File "apps/frappe/frappe/handler.py", line 83, in execute_cmd
    return frappe.call(method, **frappe.form_dict)
  File "apps/frappe/frappe/__init__.py", line 1607, in call
    return fn(*args, **newargs)
  File "apps/frappe/frappe/desk/form/save.py", line 26, in savedocs
    doc.save()
  File "apps/frappe/frappe/model/document.py", line 305, in save
    return self._save(*args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 356, in _save
    self.run_post_save_methods()
  File "apps/frappe/frappe/model/document.py", line 1085, in run_post_save_methods
    self.run_method("on_submit")
  File "apps/frappe/frappe/model/document.py", line 914, in run_method
    out = Document.hook(fn)(self, *args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 1264, in composer
    return composed(self, method, *args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 1246, in runner
    add_to_return_value(self, fn(self, *args, **kwargs))
  File "apps/frappe/frappe/model/document.py", line 911, in fn
    return method_object(*args, **kwargs)
  File "apps/erpnext/erpnext/accounts/doctype/sales_invoice/sales_invoice.py", line 269, in on_submit
    self.make_gl_entries()
  File "apps/erpnext/erpnext/accounts/doctype/sales_invoice/sales_invoice.py", line 1037, in make_gl_entries
    make_gl_entries(
  File "apps/erpnext/erpnext/accounts/general_ledger.py", line 45, in make_gl_entries
    save_entries(gl_map, adv_adj, update_outstanding, from_repost)
  File "apps/erpnext/erpnext/accounts/general_ledger.py", line 305, in save_entries
    make_entry(entry, adv_adj, update_outstanding, from_repost)
  File "apps/erpnext/erpnext/accounts/general_ledger.py", line 316, in make_entry
    gle.submit()
  File "apps/frappe/frappe/model/document.py", line 1005, in submit
    return self._submit()
  File "apps/frappe/frappe/model/document.py", line 984, in _submit
    return self.save()
  File "apps/frappe/frappe/model/document.py", line 305, in save
    return self._save(*args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 327, in _save
    return self.insert()
  File "apps/frappe/frappe/model/document.py", line 259, in insert
    self.run_before_save_methods()
  File "apps/frappe/frappe/model/document.py", line 1048, in run_before_save_methods
    self.run_method("validate")
  File "apps/frappe/frappe/model/document.py", line 914, in run_method
    out = Document.hook(fn)(self, *args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 1264, in composer
    return composed(self, method, *args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 1246, in runner
    add_to_return_value(self, fn(self, *args, **kwargs))
  File "apps/frappe/frappe/model/document.py", line 911, in fn
    return method_object(*args, **kwargs)
  File "apps/erpnext/erpnext/accounts/doctype/gl_entry/gl_entry.py", line 46, in validate
    self.check_mandatory()
  File "apps/erpnext/erpnext/accounts/doctype/gl_entry/gl_entry.py", line 80, in check_mandatory
    frappe.throw(_("{0} is required").format(_(self.meta.get_label(k))))
  File "apps/frappe/frappe/__init__.py", line 525, in throw
    msgprint(
  File "apps/frappe/frappe/__init__.py", line 493, in msgprint
    _raise_exception()
  File "apps/frappe/frappe/__init__.py", line 442, in _raise_exception
    raise raise_exception(msg)
frappe.exceptions.ValidationError: Account is required
sjain17 commented 1 year ago

This issue is appearing at Delivery Note also.

adityanarayanm095 commented 7 months ago

@umairsy is anyone working on this issue o/w i would like to work on this.

tundebabzy commented 7 months ago

@adityanarayanm095 if the issue still persists, please feel free to work on it

SanjaySiddharth commented 4 months ago

@umairsy If this issue is still open , can I work on it ?