feat: GST E Invoicing (#23455)

* feat: init e-invoice settings

* feat: read public key file

* feat: rsa encryption with public key

* feat: save token and sek from auth request

* chore: handle error response

* feat: AES decryption of SEK with appkey

* feat: decrypt json data with SEK

* feat: make e invoice from erpnext sales invoice

* feat: generate IRN

* feat: decode signed json and QR code

* chore: validations

* feat: cancel IRN

* feat: complete e-invoice schema

* chore: move e-invoice settings to regional

* chore: split einvoice settings and operations

* chore: rename schema to template & js cleanup

* feat: make IRN field on regional setup

* feat: Generate & Cancel IRN from Sales Invoice

* chore: minor fixes

* fix: item discount

* chore: show irn cancelled check after cancellation

* fix: hide cancel irn dialog on error

* fix: public key is required on validate

* fix: cannot find attached key file

* fix: validation if e invoicing is disabled

* fix: do not show generate irn for invalid supply type

* fix: update irn_cancelled after cancelling irn

* chore: show irn field for proper gst_category

* feat: e-way bill details in e-invoice

* fix: save e-way bill no on irn generation

* chore: no copy on e invoice custom fields

* feat: cancel e-way bill before cancelling IRN

* feat: manual download / upload json

* chore: group e-invoicing actions

* fix: fn name

* chore: save signed invoice and qrcode after uplaoding irn

* fix: fetch token if not valid

* chore: move einvoicing stuff to seperate folder

* feat: QRCode Image and E-Invoice Print Format

* fix: bug

* fix: invalid syntax

* chore: code cleanup

* chore: clean up e invoice actions

* fix: download & upload e-invoice

* fix: print format

* fix: validations

* fix: add permissions on regional setup

* feat: add patch

* fix: validate document name

* fix: return date

* fix: credit note einvoice

* fix: validations

* fix: error logging

* fix: e_invoice module not found

* fix: add missing package

* fix: rename e_invoice_utils.py

* fix: einvoice field validation

* fix: patch

* fix: invoice totals calculation

* fix: other charges calculation

* chore: improve document name validation message

* fix: qr code image string

* feat: initialize GSP connector

* chore: remove unwanted fields

* fix: qr code generation

* feat: fetch and cache GSTIN details

* feat: generate & cancel IRN

* feat: cancel eway bill

* chore: remove unwanted fuctions

* chore: clean up einvoice actions

* fix: attach qrcode on irn generation

* fix: generate & cancel IRN

* fix: show/hide eway bill fields

* fix: valiations

* feat: generate eway bill from IRN

* chore: remove unwanted imports

* chore: error logging

* feat: header & footer in GST E Invoice

* chore: remove test pincode

* fix: invalid syntax

* feat: cess non advolem on einvoice item

* chore: remove fetch token from e invocie settings

* fix: imports

* fix: error handling

* feat: update timeline on einvoice actions

* fix: qrcode image size

* fix: exclude intra company transactions

* fix: eway bill test

* fix: ewaybill mandatory conditions

* chore: add tests

* fix: returning condition

* feat: log e-invocing requests

* chore: add ack date and ack no field for print formats

* fix: sider issues

* feat: show e-invoice preview before IRN generation

* fix: use as_list for error message

* fix: minor ux issues

* fix: dialog is undefined

* fix: error handling

* feat: add docs link to e invoice settings

* feat: multiple gstins for e invoicing

* fix: uncomment test condition

* fix: remove test pincode

* fix: cannot cancel irn without submitting sales invoice

* chore: code cleanup

* fix: sider issues

* fix: e invoice request log permissions

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
31 files changed
tree: b9c31670f195eefe4dfaa59d07fb4b9ab66d6c20
  1. .github/
  2. .travis/
  3. erpnext/
  4. .editorconfig
  5. .eslintrc
  6. .gitignore
  7. .pylintrc
  8. .snyk
  9. .travis.yml
  10. attributions.md
  11. CODE_OF_CONDUCT.md
  12. CODEOWNERS
  13. license.txt
  14. package.json
  15. README.md
  16. requirements.txt
  17. SECURITY.md
  18. setup.py
  19. sponsors.md
  20. yarn.lock
README.md

Build Status Open Source Helpers Coverage Status

https://erpnext.com

ERPNext as a monolith includes the following areas for managing businesses:

  1. Accounting
  2. Warehouse Management
  3. CRM
  4. Sales
  5. Purchase
  6. HRMS
  7. Project Management
  8. Support
  9. Asset Management
  10. Quality Management
  11. Manufacturing
  12. Website Management
  13. Customize ERPNext
  14. And More

ERPNext requires MariaDB.

ERPNext is built on the Frappe Framework, a full-stack web app framework built with Python & JavaScript.


Full Install

The Easy Way: our install script for bench will install all dependencies (e.g. MariaDB). See https://github.com/frappe/bench for more details.

New passwords will be created for the ERPNext "Administrator" user, the MariaDB root user, and the frappe user (the script displays the passwords and saves them to ~/frappe_passwords.txt).

Virtual Image

You can download a virtual image to run ERPNext in a virtual machine on your local system.

System and user credentials are listed on the download page.


License

GNU/General Public License (see license.txt)

The ERPNext code is licensed as GNU General Public License (v3) and the Documentation is licensed as Creative Commons (CC-BY-SA-3.0) and the copyright is owned by Frappe Technologies Pvt Ltd (Frappe) and Contributors.


Contributing

  1. Issue Guidelines
  2. Report Security Vulnerabilities
  3. Pull Request Requirements
  4. Translations
  5. Chart of Accounts

Logo and Trademark

The brand name ERPNext and the logo are trademarks of Frappe Technologies Pvt. Ltd.

Introduction

Frappe Technologies Pvt. Ltd. (Frappe) owns and oversees the trademarks for the ERPNext name and logos. We have developed this trademark usage policy with the following goals in mind:

  • We’d like to make it easy for anyone to use the ERPNext name or logo for community-oriented efforts that help spread and improve ERPNext.
  • We’d like to make it clear how ERPNext-related businesses and projects can (and cannot) use the ERPNext name and logo.
  • We’d like to make it hard for anyone to use the ERPNext name and logo to unfairly profit from, trick or confuse people who are looking for official ERPNext resources.

Frappe Trademark Usage Policy

Permission from Frappe is required to use the ERPNext name or logo as part of any project, product, service, domain or company name.

We will grant permission to use the ERPNext name and logo for projects that meet the following criteria:

  • The primary purpose of your project is to promote the spread and improvement of the ERPNext software.
  • Your project is non-commercial in nature (it can make money to cover its costs or contribute to non-profit entities, but it cannot be run as a for-profit project or business). Your project neither promotes nor is associated with entities that currently fail to comply with the GPL license under which ERPNext is distributed.
  • If your project meets these criteria, you will be permitted to use the ERPNext name and logo to promote your project in any way you see fit with one exception: Please do not use ERPNext as part of a domain name.

Use of the ERPNext name and logo is additionally allowed in the following situations:

All other ERPNext-related businesses or projects can use the ERPNext name and logo to refer to and explain their services, but they cannot use them as part of a product, project, service, domain, or company name and they cannot use them in any way that suggests an affiliation with or endorsement by ERPNext or Frappe Technologies or the ERPNext open source project. For example, a consulting company can describe its business as “123 Web Services, offering ERPNext consulting for small businesses,” but cannot call its business “The ERPNext Consulting Company.”

Similarly, it’s OK to use the ERPNext logo as part of a page that describes your products or services, but it is not OK to use it as part of your company or product logo or branding itself. Under no circumstances is it permitted to use ERPNext as part of a top-level domain name.

We do not allow the use of the trademark in advertising, including AdSense/AdWords.

Please note that it is not the goal of this policy to limit commercial activity around ERPNext. We encourage ERPNext-based businesses, and we would love to see hundreds of them.

When in doubt about your use of the ERPNext name or logo, please contact Frappe Technologies for clarification.

(inspired by WordPress)