OpenERP Addons (modules)

Invoice tax : Onchanges on tax amount and base should consider the tax-code and base-code signs respectively

Reported by Nicolas Bessi - Camptocamp on 2010-02-19
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenERP Addons
Status tracked in Trunk
5.0
Low
JMA(Open ERP)
Trunk
High
Jay Vora (Serpent Consulting Services)

Bug Description

When you manually edit the amount of an invoice tax line on an purchase invoice (it will probably do the same on customer), the tax amount is recomputed, the amount is right but the sign is wrong if the tax sign is negative. It appears that the tax code sign in ignored.

That error report itself in the accounting line and spoiled the Vat report.

Maybe we should use a rule based on debit or credit and account type instead of having a tax code sign in order to avoid this kind of problems.

Regards

Nicolas

Changed in account-banking:
status: New → Confirmed
affects: account-banking → openobject-addons

Hi,

This bug is still present in the current 5.0.7 version !

This is important, as the VAT declaration is erroneous without a fix or a manual intervention on the base code amount.

OERPScenario can now detect this bug with --tag=@bug524278.

Here is the complete test case :

 Given I have recorded on the 10 sept 2009 a supplier invoice (in_invoice) of 1000.0 CHF without tax called MySupplierInvoiceTax
    And I add a line with tax called MyTaxLine on the last created invoice of 12156.0 with the tax called 'Buy 19.6%'
 When I compute the taxes on invoice
 Then I should have a invoice tax line with a base amount of 12156.0
 And a tax amount of 2382.58

 When I modify the tax amount to 2382.55
 Then I should have a invoice tax line with a base amount of 12156.0
 And a tax amount of 2382.55
 And a tax code amount of -1588.37

!!! Fails here => get 1588.37 instead of -1588.37

 And a tax base amount of -8104.0

 Given I correct the total amount of the invoice according to changes
 When I press the validate button
 Then I should see the invoice MySupplierInvoiceTax open
 And I should have a linked account move with 4 lines and a posted status

Changed in openobject-addons:
importance: Undecided → High
milestone: none → 5.0.8
Changed in openobject-addons:
assignee: nobody → Jay (Open ERP) (jvo-openerp)

The root of the problem is, the account_invoice_tax object has no relation with account.tax.

Should we be adding a field for that?

Let us know.
Thanks.

Changed in openobject-addons:
assignee: Jay (Open ERP) (jvo-openerp) → nobody
status: Confirmed → In Progress
assignee: nobody → Jay (Open ERP) (jvo-openerp)

This is again an issue which needs a guidance from our Accounting experts.

Thanks.

Ferdinand (office-chricar) wrote :

we have a "weak" relation via tax_code_id

IMHO yes we should (only) have ONE account_invoice_tax line per tax_id (which is the same as in account_invoice_line_tax)

Hello Joël and Nicolas,

The 'Taxes' one2many is only an overview of the total taxes applied on different invoice lines.
Altering them explicitly would be not countable.

As of now, we do not have any relation to account.tax and so onchange can't be applied on it.
So, I pass this bug to be fixed on trunk.
Let us know your views please.

Thanks.

Nathan (nathan-bowden-kiwi) wrote :

i pointmatch with ferdinand.
i work for account,i know its importent.

pap(openerp) (pap-openerp) wrote :

Hello,
It is fixed in trunk-addons.

Thank you.

It has been fixed by revision 4901 <email address hidden>.
Thanks.

summary: - On change on invoice taxes ignore tax code sign
+ Invoice tax : Onchanges on tax amount and base should consider the tax-
+ code and base-code signs respectively
tags: added: maintenance

Hello Vincent/Frederic,

Can you please try with this patch?

Thanks.

Nathan (nathan-bowden-kiwi) wrote :

works ok for me.

Nathan (nathan-bowden-kiwi) wrote :

can someone see it if Jay(Openerp) is dead(not replying or cannot see anymore)?

Nathan,

Thanks for coming back on this.

We are actually waiting for a response from C2C as this is a maintenance case(tag has been added).

Thanks.

P.s.: I am very much alive (due to all your blessings).

Nathan (nathan-bowden-kiwi) wrote :

Sorry Jay(openerp), I didnot mean it.
btw,thanks for fix.

Nathan (nathan-bowden-kiwi) wrote :

up.

Nathan (nathan-bowden-kiwi) wrote :

JMA(OpenERP), thank you for efforts and patch, we are now using version 6.
you can shut this bug down.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers