When submitting a purchase invoice, ERPNext creates the GL Entries required for proper accounting of the transaction.
Based on this screen shot for the calculation of fuel Excise Tax furnished by the Guatemalan Tax Authority: Superintendencia de Administración Tributaria
This bug has been found occurring for the same sample transaction: Although the calculations are correct, the GL Entries show the net amount without sales tax, but estimated from a base that includes the excise tax. This generates an error. Row 6 should show a value of 72.50
Suggested course of action:
[x] For each row of items that contains a check of "Is Fuel" get the value of the row and the expense account indicated.
This action is necessary because users might enter different expense accounts for different rows of items with excise tax calculations.
[x] With a for loop, go through this list with filters for the voucher number (sales or purchase invoice number) and expense account, updating GL entry with this value.
Con un for, a esta lista se busca el voucher number y expense_account, haciendo update a GL Entry con este valor.
[x] Do a first test with Purchase Invoice.
Upon success, add the same code for:
Sales Invoice
Verify what happens when registering inventory for these two.
Purchase Receipt
Delivery Note
When submitting a purchase invoice, ERPNext creates the GL Entries required for proper accounting of the transaction.
Based on this screen shot for the calculation of fuel Excise Tax furnished by the Guatemalan Tax Authority: Superintendencia de Administración Tributaria
This bug has been found occurring for the same sample transaction: Although the calculations are correct, the GL Entries show the net amount without sales tax, but estimated from a base that includes the excise tax. This generates an error. Row 6 should show a value of 72.50
Suggested course of action:
[ { net_fuel_amount: 72.50 expense_account: "Cuenta Gastos 11" voucher: ACC-PINV-2020-00005 }, { net_fuel_amount: 72.50 expense_account: "Cuenta Gastos 44" voucher: ACC-PINV-2020-00005 } ]
This action is necessary because users might enter different expense accounts for different rows of items with excise tax calculations.
Con un for, a esta lista se busca el voucher number y expense_account, haciendo update a GL Entry con este valor.
Upon success, add the same code for: Sales Invoice
Verify what happens when registering inventory for these two. Purchase Receipt Delivery Note
item_expense_acct_excise_tax_gl_correction()