sihaysistema / factura_electronica_gt

Electronic Invoice support for Guatemala - Factura Electronica de Guatemala
https://sihaysistema.com/factura-electronica/install
GNU General Public License v3.0
26 stars 25 forks source link

GL Entry math bug with Excise Tax Item in row #196

Closed Tropicalrambler closed 4 years ago

Tropicalrambler commented 4 years ago

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

Screen Shot 2020-10-27 at 5 34 28 PM

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

Screen Shot 2020-10-27 at 6 01 56 PM

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.

Screen Shot 2020-10-27 at 6 00 23 PM

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()

Tropicalrambler commented 4 years ago

https://portal.sat.gob.gt/portal/descarga/12235/detalle-de-proveedores/36753/preguntas-frecuentes-2.pdf

Tropicalrambler commented 4 years ago

Thanks, verified.