Comment 77 for bug 452854

Revision history for this message
Joël Grand-Guillaume @ camptocamp (jgrandguillaume-c2c) wrote : Re: Cannot validate invoices with foreign currency or price_accuracy=3

Hi,

This seems to work in some cases, but OERPScenario still fail with price_accuracy = 2 with this test:

      Given 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|

@rounding @bug452854
  Scenario: Validate the rouding computation on an invoice with 3 lines
    Given I have recorded on the 11 oct 2009 a supplier invoice (in_invoice) of 1144.0 CHF without tax called MySupplierInvoiceRounding
    And I add a line called MyFirstLine on the last created invoice of 91.73
    And I add a line called MySecondLine on the last created invoice of 63.00
    And I correct the total amount of the invoice according to changes
    When I press the validate button
    Then I should see the invoice MySupplierInvoiceRounding open
    And the total credit amount must be equal to the total debit amount
    And the total amount convert into company currency must be same amount than the credit line on the payable/receivable
account

      expected: 1983.71,
           got: 1983.7 (using ==)

       Diff:
      @@ -1,2 +1,2 @@
      -1983.71
      +1983.7

This fix the incoherence in price_accurace define in the server and the computation, but doesn't handle the trouble with 2 digit I think.

On two digit, you still have a difference between debit and credit moves...

I think it's ok to correct that, it's better than nothing, but don't close the bug as it did fix everything.

Regards,