Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Invoice from Appointment fails (region Italy) #332

Open
1 task done
tamburro92 opened this issue Nov 16, 2023 · 1 comment
Open
1 task done

Create Invoice from Appointment fails (region Italy) #332

tamburro92 opened this issue Nov 16, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@tamburro92
Copy link
Contributor

tamburro92 commented Nov 16, 2023

Information about bug

After I create a new patient_appointment and try to do a payment error occurs like missing tax information.
I checked log and code and seems like there is an integration problem with "Italy tax validator" which fails because try to parsing "taxes" filed that doesn't exist in the doc created by Health module

Module

Integration with ERPNext modules, Regional / Other Integrations

Version

Frappe 14 or latest
Frappe Health 14 or latest develop
Screenshot 2023-11-16 alle 22 57 51
Screenshot 2023-11-16 alle 22 53 03
Screenshot 2023-11-16 alle 22 50 32

Installation method

manual install

Relevant log output / Stack trace / Full Error Message.

{
    "exc_type": "ValidationError",
    "exception": "frappe.exceptions.ValidationError: Si prega di impostare almeno una riga nella tabella Imposte e spese",
    "exc": "[\"Traceback (most recent call last):\\n  File \\\"apps/frappe/frappe/app.py\\\", line 95, in application\\n    response = frappe.api.handle()\\n               ^^^^^^^^^^^^^^^^^^^\\n  File \\\"apps/frappe/frappe/api.py\\\", line 55, in handle\\n    return frappe.handler.handle()\\n           ^^^^^^^^^^^^^^^^^^^^^^^\\n  File \\\"apps/frappe/frappe/handler.py\\\", line 47, in handle\\n    data = execute_cmd(cmd)\\n           ^^^^^^^^^^^^^^^^\\n  File \\\"apps/frappe/frappe/handler.py\\\", line 85, in execute_cmd\\n    return frappe.call(method, **frappe.form_dict)\\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\\n  File \\\"apps/frappe/frappe/__init__.py\\\", line 1622, in call\\n    return fn(*args, **newargs)\\n           ^^^^^^^^^^^^^^^^^^^^\\n  File \\\"apps/healthcare/healthcare/healthcare/doctype/patient_appointment/patient_appointment.py\\\", line 403, in invoice_appointment\\n    create_sales_invoice(appointment_doc)\\n  File \\\"apps/healthcare/healthcare/healthcare/doctype/patient_appointment/patient_appointment.py\\\", line 428, in create_sales_invoice\\n    sales_invoice.save(ignore_permissions=True)\\n  File \\\"apps/frappe/frappe/model/document.py\\\", line 309, in save\\n    return self._save(*args, **kwargs)\\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^\\n  File \\\"apps/frappe/frappe/model/document.py\\\", line 331, in _save\\n    return self.insert()\\n           ^^^^^^^^^^^^^\\n  File \\\"apps/frappe/frappe/model/document.py\\\", line 262, in insert\\n    self.run_before_save_methods()\\n  File \\\"apps/frappe/frappe/model/document.py\\\", line 1055, in run_before_save_methods\\n    self.run_method(\\\"validate\\\")\\n  File \\\"apps/frappe/frappe/model/document.py\\\", line 919, in run_method\\n    out = Document.hook(fn)(self, *args, **kwargs)\\n          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\\n  File \\\"apps/frappe/frappe/model/document.py\\\", line 1281, in composer\\n    return composed(self, method, *args, **kwargs)\\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\\n  File \\\"apps/frappe/frappe/model/document.py\\\", line 1263, in runner\\n    add_to_return_value(self, fn(self, *args, **kwargs))\\n                              ^^^^^^^^^^^^^^^^^^^^^^^^^\\n  File \\\"apps/frappe/frappe/model/document.py\\\", line 916, in fn\\n    return method_object(*args, **kwargs)\\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\\n  File \\\"apps/erpnext/erpnext/accounts/doctype/sales_invoice/sales_invoice.py\\\", line 89, in validate\\n    super(SalesInvoice, self).validate()\\n  File \\\"apps/erpnext/erpnext/controllers/selling_controller.py\\\", line 32, in validate\\n    super(SellingController, self).validate()\\n  File \\\"apps/erpnext/erpnext/controllers/stock_controller.py\\\", line 45, in validate\\n    super(StockController, self).validate()\\n  File \\\"apps/erpnext/erpnext/controllers/accounts_controller.py\\\", line 215, in validate\\n    validate_regional(self)\\n  File \\\"apps/erpnext/erpnext/__init__.py\\\", line 151, in caller\\n    return frappe.get_attr(overrides[function_path][-1])(*args, **kwargs)\\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\\n  File \\\"apps/erpnext/erpnext/regional/italy/utils.py\\\", line 302, in sales_invoice_validate\\n    frappe.throw(\\n  File \\\"apps/frappe/frappe/__init__.py\\\", line 534, in throw\\n    msgprint(\\n  File \\\"apps/frappe/frappe/__init__.py\\\", line 502, in msgprint\\n    _raise_exception()\\n  File \\\"apps/frappe/frappe/__init__.py\\\", line 451, in _raise_exception\\n    raise raise_exception(msg)\\nfrappe.exceptions.ValidationError: Si prega di impostare almeno una riga nella tabella Imposte e spese\\n\"]",
    "_server_messages": "[\"{\\\"message\\\": \\\"Prezzo Articolo aggiunto per visita derm in Listino Prezzi Listino di Vendita\\\", \\\"title\\\": \\\"Messaggio\\\", \\\"alert\\\": 1}\", \"{\\\"message\\\": \\\"Si prega di impostare almeno una riga nella tabella Imposte e spese\\\", \\\"title\\\": \\\"Informazioni sulla fatturazione elettronica mancanti\\\", \\\"indicator\\\": \\\"red\\\", \\\"raise_exception\\\": 1}\"]"
}

Code of Conduct

  • I agree to follow this project's Code of Conduct
@tamburro92 tamburro92 added the bug Something isn't working label Nov 16, 2023
@QXEFV
Copy link

QXEFV commented Feb 5, 2024

Homeworkify understands the power of collaboration in the learning process. Our platform features interactive forums, discussion boards, and collaborative spaces where students can engage with peers, exchange ideas, and seek assistance from a broader community. By fostering a collaborative learning environment, Homeworkify encourages knowledge sharing, critical thinking, and the development of valuable academic networks.

https://homeworkify.website/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants