phamos-eu / Swiss-Accounting-Integration

Extending ERPNexts functionality with Swiss QR Integration and Abacus Export
GNU General Public License v3.0
6 stars 14 forks source link

Fetching tax code via Item tax template #15

Open mayanknahata007 opened 2 years ago

mayanknahata007 commented 2 years ago

Currently, the tax code of the invoice is fetched from sales/purchase tax.

In cases where there are tax codes are different per item, can this be added on priority based fetching? Eg. As it is required in the case of transportation.

For example, if the system is unable to find any item tax attached to the item, it takes the default tax code from the sales/purchase template (currently implemented)

wojosc commented 2 years ago

We are working on something similar on a different project. We are looking to move the tax code to item level. This can be done pretty easily by creating Accounting Dimensions. The actual values could be set on pre defined Item Tax Templates. Does this sound right to you?

wojosc commented 2 years ago

@mayanknahata007 it's kind of this, right? https://www.giters.com/software-to-hardware/erpnext-vat-mtd

wojosc commented 2 years ago

We have added custom field "Tax code" to Sales Invoice Item and Item Tax Template. At a further point in time we will add a fetch from.

The TaxCode in the XML works but is fetching the worng value. We will need to make some changes here https://github.com/phamos-eu/Swiss-Accounting-Integration/blob/main/swiss_accounting_integration/utils.py

Also we need to clarify the exact line where the TaxCode should be set in the *.xml

wojosc commented 2 years ago

@mayanknahata007 Please check our the latest export! on the staging system.