Hi Jay,

About your last comments: (in our example the invoices is still 450$)
- "Without any patch(in the current situation), you will get 250.00 as residual 
after the first pay of 200.00 USD" --> OK

- "if I pay 250"..."will lead residual to -72.30" --> yes, you have to treat 
final payment a different way than partial payments...and this is the tricky 
part. 
As long as you are posting partial payment you do not have any write off 
entries to generate due to exchange rate. However, when the final payment comes 
you have to post the ex-rate write off due to the fact that invoice has been 
posted at invoice day rate and  each payment at payment day rate. 
I do not have the time to check again but I think that, in the residual amount 
calculation, the system should take all payments done and put them at invoice 
rate (unless you manage to take in the entry the amount in the column currency 
directly - except write off line). and I think, right now, the system just take 
the write off amount in EUR x last payment ex-rate.

It is all about exchange rate difference between invoice and payments...

-- 
Pay invoice wizard regression in foreign currency
https://bugs.launchpad.net/bugs/511104
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.

Status in OpenObject Addons Modules: In Progress

Bug description:
Hi !


There is a regression introduce by commit 2537 into addons on the pay invoice 
wizard !

The amount in currency are wrongly computed !!!

Here the test case :
  Background:
      Given I am loged as admin user with password admin used
      And the company currency is set to EUR 
      And the following currency rate settings are:
      |code|rate|name|
      |EUR|1.000|01-01-2009|
      |CHF|1.644|01-01-2009|
      |CHF|1.500|09-09-2009|
      |CHF|0.6547|10-10-2009|
      |USD|1.3785|01-01-2009|
      And a cash journal in USD exists
      And a cash journal in CHF exists
      And a cash journal in EUR exists

    Scenario: make_and_validate_payments_with_pay_invoice_wizard
      Given I have recorded on the 1 jan 2009 a supplier invoice (in_invoice) 
of 1000,0 CHF without tax called MySupplierInvoicePayWizard
      When I press the validate button
      Then I should see the invoice MySupplierInvoicePayWizard open

      When I call the Pay invoice wizard
      And I partially pay 200.0 CHF.- on the 10 jan 2009
      Then I should see a residual amount of 800.0 CHF.-
      
      When I call the Pay invoice wizard
      And I partially pay 200.0 USD.- on the 11 jan 2009
      Then I should see a residual amount of 561.48 CHF.-
      
CRASH HERE  expected: 561.48,
           got: 600.0 (using ==)


      When I call the Pay invoice wizard
      And I partially pay 200.0 EUR.- on the 12 jan 2009
      Then I should see a residual amount of 232.68 CHF.-
      
      When I call the Pay invoice wizard
      And I completely pay the residual amount in CHF on the 13 sep 2009
      Then I should see a residual amount of 0.0 CHF.-
      And I should see the invoice MySupplierInvoicePayWizard paid


THANKS TO REVERT THIS COMMIT ASAP !!

Regards,



_______________________________________________
Mailing list: https://launchpad.net/~c2c-oerpscenario
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~c2c-oerpscenario
More help   : https://help.launchpad.net/ListHelp

Reply via email to