Comment 12 for bug 511104

Revision history for this message
Joël Grand-Guillaume @ camptocamp (jgrandguillaume-c2c) wrote :

Hi Jay,

I just tested your patch and unfortunately, it doesn't pass my test on OERPScenario, here are the results :

      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|

      Given a cash journal in USD exists
      And a cash journal in CHF exists
      And a cash journal in EUR exists
      And on all journal entries can be canceled

    Given I have recorded on the 1 jan 2009 a supplier invoice (in_invoice) of 1000,0 CHF without tax called
    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.-
    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.-
      expected: 0.0,
           got: -9.75 (using ==)

       Diff:
      @@ -1,2 +1,2 @@
      -0.0
      +-9.75
       (Spec::Expectations::ExpectationNotMetError)
      ./features/account/wizard/step_definitions/wizard_pay_invoice.rb:84:in `/^I should see a residual amount of (.*) (\w+)\.\-$/'
      features/account/wizard/pay_invoice.feature:39:in `Then I should see a residual amount of 0.0 CHF.-'
    And I should see the invoice MySupplierInvoicePayWizard paid

I strongly suggest you work from this test case which is probably representing on of the most complex case with this wizard... Good luck for this one, as it seems to be really tricky !!

Regards,