Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ADD] account: Invoice residual shall not change with FX differences #31257

Open
wants to merge 2 commits into
base: 12.0
from

Conversation

Projects
None yet
6 participants
@hbto
Copy link
Contributor

hbto commented Feb 19, 2019

Main

Mexican Law requieres to Enterprises make realization entries for the Payables/Receivable in the invoices, and their taxes, and their realization, must be done in separate ways, without mixing them, gains & loss, because according to Income Tax Act the must be treated as interest.

Justification

In the following Slides we have the legal justification for having done a separate FX difference Journal Entry and why they are being reconciled in the way we have depicted in this PR.

Slides in Spanish: https://docs.google.com/presentation/d/15E-xUNEIiQ2pWOfJsQ-uEglxhOqgGd1G6LBY_BmqQ2E/edit#slide=id.p5
Slides in English: https://docs.google.com/presentation/d/1ltjcJ1cYmhgXU8YaQCu2rRFg2ZJl95zcy7jk3sJdO68/edit#slide=id.p1

Explanation

    Company's Currency EUR

    Having issued an invoice at date Nov-21-2018 as:

    Accounts         Amount Currency         Debit(EUR)       Credit(EUR)
    ---------------------------------------------------------------------
    Expenses            5,301.00 USD         106,841.65              0.00
    Taxes                 848.16 USD          17,094.66              0.00
        Payables       -6,149.16 USD               0.00        123,936.31

    On Nov-30-2018 user issues an FX Journal Entry as required by law:

    Accounts         Amount Currency         Debit(EUR)       Credit(EUR)
    ---------------------------------------------------------------------
    FX Losses               0.00 USD           1,572.96             0.00
        Payables            0.00 USD               0.00         1,572.96

    On Dec-31-2018 user issues an FX Journal Entry as required by law:

    Accounts         Amount Currency         Debit(EUR)       Credit(EUR)
    ---------------------------------------------------------------------
    Payables                0.00 USD           4,475.97             0.00
        FX Gains            0.00 USD               0.00         4,475.97

    This can continue for several months so far the invoice remain unpaid.
    Leading to payments to the Tax Statutory Authority because of the Gains, 
    in the realization, and thus complying with the law.

Issue

Having the need to comply with the law in the detailed way we have depicted above. We have encountered with the following issue:
As of now when reconciling a FX Journal item (debit) to Payable (credit) -- conversely for Receivable -- it is regarded as a payment, hence reducing the amount residual in the Invoice Currency, in this case Invoice currency != Company's currency. In this case FX Difference shall not be regarded as Payment, the debt must be kept the same to be realized when the transaction is closed, fully paid or collected.

Update: A video has been added to this description for better explanation of the issue.

External Documentation

https://coem.mx/tratamiento-la-fluctuacion-cambiaria/

This procedure has been verified by a third party consultant and has been deemed abiding to law.

Video

https://youtu.be/Oq9Zyu1WyRk

Opw & Issue

OPW 1943518 / #31294

--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

@robodoo robodoo added the seen 🙂 label Feb 19, 2019

@hugho-ad hugho-ad force-pushed the vauxoo-dev:12.0-fx_diff_rec_unittest-hbto branch from f01e703 Feb 20, 2019

@josemoralesp josemoralesp force-pushed the vauxoo-dev:12.0-fx_diff_rec_unittest-hbto branch 2 times, most recently Feb 22, 2019

@hugho-ad

This comment has been minimized.

Copy link
Contributor

hugho-ad commented Feb 23, 2019

OPW 1943518

@josemoralesp josemoralesp force-pushed the vauxoo-dev:12.0-fx_diff_rec_unittest-hbto branch 3 times, most recently Feb 23, 2019

@josemoralesp josemoralesp force-pushed the vauxoo-dev:12.0-fx_diff_rec_unittest-hbto branch 2 times, most recently Feb 23, 2019

@robodoo robodoo added the CI 🤖 label Feb 23, 2019

@hbto hbto force-pushed the vauxoo-dev:12.0-fx_diff_rec_unittest-hbto branch Feb 23, 2019

@robodoo robodoo removed the CI 🤖 label Feb 23, 2019

@hbto hbto force-pushed the vauxoo-dev:12.0-fx_diff_rec_unittest-hbto branch to 8780f74 Feb 24, 2019

@robodoo robodoo added CI 🤖 and removed CI 🤖 labels Feb 24, 2019

hbto and others added some commits Feb 19, 2019

@moylop260 moylop260 force-pushed the vauxoo-dev:12.0-fx_diff_rec_unittest-hbto branch to c036697 Feb 24, 2019

@robodoo robodoo added the CI 🤖 label Feb 24, 2019

@nhomar

nhomar approved these changes Feb 26, 2019

Copy link
Contributor

nhomar left a comment

@qdp-odoo @nim-odoo

This fix is a HUGE need in MX we have several customers with different sizing asking for such fix, and we are close to close the year here in MX and 2 month of the year for the valuation we are way late with this fix (it took to us a lot of time checking the corner cases and trying to solve with no development).

Can we expedite this review my friends

Regards.

@qdp-odoo

This comment has been minimized.

Copy link
Contributor

qdp-odoo commented Feb 26, 2019

I"m sorry dudes, I'm reading carefully and I just don't get what's the issue and what's the failing use case. 😭

@hbto

This comment has been minimized.

Copy link
Contributor Author

hbto commented Feb 26, 2019

@qdp-odoo I have updated description with Issue and Video

https://youtu.be/Oq9Zyu1WyRk

@qdp-odoo

This comment has been minimized.

Copy link
Contributor

qdp-odoo commented Feb 27, 2019

thanks for the video, the use case is effectively much clearer.

Nevertheless, I don't agree with how you deal with your currency provisioning.
1°) the provision of November should be reversed on the 1st of December, and the provision of December should be computed based on the new rate only
2°) the provisioning entry should not be reconciled with anything. The fact the foreign currency rate changed doesn't affect how much your customer owns you at all and shouldn't be reflected at all on the invoice or in partner reports.

This is at least how we deal with it here (I believe it's True for Belgium, France, Switzerland... maybe the whole Europe?). We have currently a WIP branch to implement this feature, feel free to test and give your feedback on it: odoo/enterprise#3334

To conclude, I don't see any reason to apply such risky changes in the residual amounts computation. Let me know your thoughts

@nhomar

This comment has been minimized.

Copy link
Contributor

nhomar commented Feb 27, 2019

@qdp-odoo Falling appart with what @hbto think.

The revaluation is not a report because the user must/need affect accounting.

In other hand @hbto solution is being used for valuation, but the problem is present even if simply the exchange rate goes down forcing the receivable/payable goind down/up in th ecurrency of the transaction when has payments in the currency of the company.

He will explain better, but I think a report is mandatory/necesary (nice for that) but the execution of the revaluation affect the balances and is not just informative.

Regards.

@qdp-odoo

This comment has been minimized.

Copy link
Contributor

qdp-odoo commented Feb 27, 2019

@nhomar That's also what I mean. Please test the branch: we're making, based on the report, a journal entry which will be auto-reversed at the end of the month so that we can start the next month with fresh new provision based on what real risks remain

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.