Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0041935
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 07. Sales managementmajoralways2019-10-04 22:332019-12-12 23:01
ReporterlbressanView Statuspublic 
Assigned Tomarkmm82 
PrioritynormalResolutionfixedFixed in Version3.0PR20Q1
StatusclosedFix in branchFixed in SCM revision4c494b46c371
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionpiSCM revision 
Review Assigned ToSandrahuguet
Web browserGoogle Chrome
ModulesCore
Regression levelPre packaging ( pi )
Regression date2019-09-05
Regression introduced in releasemain
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0041935: Modify Payment Plan shows invalid amount when changing payment methods.

DescriptionIn some cases, using the Modify Payment Plan feature will show that the Outstanding Amount is invalid when is not the case.
For example, when having several Payment Plan records, and only one remaining to be paid, the Payment Method cannot be changed (even without altering Outstanding Amount) using the Modify Payment Plan.
This happens after commit from issue: https://issues.openbravo.com/view.php?id=41732 [^]

The problem happens because the total invoice amount is considered when validating the Outstanding Amount. But since the other payment plans are paid (and not shown in the pop up grid), the amounts will never match, giving the error to the user.
Steps To Reproduce1. Create and complete a sales invoice with total amount 1500.
2. Use Modify Payment Plan to create two more payment plans and divide the amount between the three.
3. Remaining Payment Plans should be as following:
Payment Plan 1: 500
Payment Plan 2: 500
Payment Plan 3: 500
4. Pay any two payment plans fully.
5. Pay partially the las payment plan.
6. Use Modify Payment Plan again to change that same payment plan's payment method.
7. Outstanding Amount will be colored Red with a message saying that the value is incorrect. Even though it was not changed.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
depends on backport 00419363.0PR19Q4 closedmarkmm82 Modify Payment Plan shows invalid amount when changing payment methods. 
depends on backport 00419373.0PR19Q3.2 closedmarkmm82 Modify Payment Plan shows invalid amount when changing payment methods. 
depends on backport 00419383.0PR19Q2.4 closedmarkmm82 Modify Payment Plan shows invalid amount when changing payment methods. 
caused by defect 0041732pi closedcollazoandy4 Modify payment plan recalculation when deleting line 

-  Notes
(0114938)
markmm82 (developer)
2019-10-08 00:14
edited on: 2019-10-08 00:39

Test Plan 1: Some payment plans are paid
0. Set Displayed "Modify Payment Plan" button in Sales invoice window.
1. Create and complete a sales invoice with total amount 1500.
2. Use Modify Payment Plan to create two more payment plans and divide the amount between the three.
   2.1 Change the current outstanding amount of the line to 500.
   2.2 Add a new line with outstanding amount of 500.
   2.3 Add a new line with outstanding amount of 500.
3. Pay the first and second payment plans fully.
4. Pay partially the last payment plan, for instance with 200.
5. Use Modify Payment Plan again to change that same payment plan's payment method.
   Notice Outstanding Amount will be not colored Red.
6. Set an outstanding amount lower than expected one, for example 100.
   Notice it is colored red with a message saying that the value is incorrect.
6. Set the expected outstanding amount = 300.
   Notice Outstanding Amount will be not colored Red.

Test this test for purchase workflow and notice the outstanding amount is updated correctly and takes into account already paid amount

(0114939)
markmm82 (developer)
2019-10-08 00:27

Test Plan 2: Testing scenario of issue 41732
  Make "Modify Payment Plan" button in Sales invoice displayed
  Go to Payment Term window and create a new record:
    Search Key/Name: Term
    Offset Month Due: 1
    Overdue Payment Days Rule: 10
    Create a new record in Lines tab:
      Percentage Due: 50
      Overdue Payment Days Rule: 1
      Rest: N
    Create another record in Lines tab:
      Percentage Due: 50
      Overdue Payment Days Rule: 1
      Rest: Y
  Go to Sales Invoice and create a new record:
    Business Partner: Alimentos y Supermercados, S.A
    Payment Term: Term
    Create a new record in Lines tab:
      Product: Limonada 0,5L
      Invoiced Quantity: 100
    Complete the invoice and check:
      There are 3 records in Payment Plan
      Invoice total amount is 100.43
    Click on Modify Payment Plan button
      Remove the first record
      Edit the outstanding amount of the second record to 75.33 and check the amounts are properly recalculated
      Click on Submit button, refresh Payment Plan tab and check:
        There are 2 records in Payment Plan with 25.10 and 75.33
    Click on Modify Payment Plan button
      Add a new record with Outstanding: 25.11, Payment Method: Al contado
      Edit the line with Outstanding 75.33 to 50.22
      Click on Submit button, Refresh Payment Plan tab and check:
        There are 3 records in Payment Plan with 25.10, 25.11 and 50.22
    Click on Modify Payment Plan button
      Edit the Payment method Al contado to Transferencia
      Click on Submit button, Refresh Payment Plan tab and check the payment method is updated
(0114940)
markmm82 (developer)
2019-10-08 00:38

Test Plan 3: Related to issue 40392
As System Admin role:
   Set displayed Modify Payment Plan field in Payment Plan tab of Purchase Invoice and Sales Invoice windows

As group admin role:
   Create a Purchase Invoice with a total amount of 381.15 and complete it
   Modify it's Payment Plan:
      1) Change the amount of the line to 200
      2) Add a new line with a different Due date and Payment Method and an amount of 181.15
   Submit
   Refresh the tab and check two lines are created
   Modify it's Payment Plan again: try to change the Payment Method in the second line
   Check no error message is shown.

   Modify it's Payment Plan again: try to change the amounts in both lines keeping the sum of them equals than the outstanding original amount (381.15). For example you can exchange the amount of each line, set 200 in the second line and 181.15 in the first line.
   Submit
   Refresh the tab and check the two lines are updated with the previously changed amounts.

   Modify it's Payment Plan again: try to change the amounts in any line in a way that the sum of the new outstanding amounts is different than the original one (381.15). For example you set 400 in the second line .
   Submit
   Check an error message is shown.
      "One or more fields contain illegal values, check the errors for each field."
   The Outstanding field of the two lines appear in red as the sum of the new generated outstanding amount is different than the original one.
(0115023)
hgbot (developer)
2019-10-11 09:11

Repository: erp/devel/pi
Changeset: 4c494b46c3715eeecffd0bd329db5a99f9140317
Author: Mark Molina <mark.molina <at> doceleguas.com>
Date: Mon Oct 07 19:48:59 2019 -0300
URL: http://code.openbravo.com/erp/devel/pi/rev/4c494b46c3715eeecffd0bd329db5a99f9140317 [^]

Fixes issue 41935: Take into account total paid when calculating the outstanding
amount of lines when using the Modify Payment Plan feature.

In some cases, using the Modify Payment Plan feature was shoing that the Outstanding Amount
was invalid because the total invoice amount was considered when validating the Outstanding Amount
but wasn't taking into account the other payment plans already paid.
The issue on this situation was to to get the received amount from records shown in
the grid, as those lines already paid are not shown in the pop up grid, the amount
don'tr match and an error is shown to the user.

To fix this issue is validated that the total Outstanding amount is exactly the difference
between the invoice grand total and the total invoice amount already paid

---
M modules/org.openbravo.advpaymentmngt/web/org.openbravo.advpaymentmngt/js/ob-aprm-utilities.js
---
(0115031)
Sandrahuguet (developer)
2019-10-11 09:14

code review + testing ok
(0116238)
hudsonbot (developer)
2019-12-12 23:01

A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/954d2b7a66fb [^]
Maturity status: Test

- Issue History
Date Modified Username Field Change
2019-10-04 22:33 lbressan New Issue
2019-10-04 22:33 lbressan Assigned To => Triage Finance
2019-10-04 22:33 lbressan Web browser => Google Chrome
2019-10-04 22:33 lbressan Modules => Core
2019-10-04 22:33 lbressan Resolution time => 1571349600
2019-10-04 22:33 lbressan Triggers an Emergency Pack => No
2019-10-04 22:33 lbressan Relationship added caused by 0041732
2019-10-07 08:50 Sandrahuguet Assigned To Triage Finance => markmm82
2019-10-07 08:53 Sandrahuguet Web browser Google Chrome => Google Chrome
2019-10-07 08:53 Sandrahuguet Regression level => Pre packaging ( pi )
2019-10-07 08:53 Sandrahuguet Regression date => 2019-09-05
2019-10-07 08:53 Sandrahuguet Regression introduced in release => main
2019-10-07 08:55 Sandrahuguet Status new => scheduled
2019-10-08 00:14 markmm82 Note Added: 0114938
2019-10-08 00:27 markmm82 Note Added: 0114939
2019-10-08 00:38 markmm82 Note Added: 0114940
2019-10-08 00:39 markmm82 Note Edited: 0114938 View Revisions
2019-10-11 09:11 hgbot Checkin
2019-10-11 09:11 hgbot Note Added: 0115023
2019-10-11 09:11 hgbot Status scheduled => resolved
2019-10-11 09:11 hgbot Resolution open => fixed
2019-10-11 09:11 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/4c494b46c3715eeecffd0bd329db5a99f9140317 [^]
2019-10-11 09:14 Sandrahuguet Review Assigned To => Sandrahuguet
2019-10-11 09:14 Sandrahuguet Note Added: 0115031
2019-10-11 09:14 Sandrahuguet Status resolved => closed
2019-10-11 09:14 Sandrahuguet Fixed in Version => 3.0PR20Q1
2019-12-12 23:01 hudsonbot Checkin
2019-12-12 23:01 hudsonbot Note Added: 0116238


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker