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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0030007
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 09. Financial managementminoralways2015-05-26 09:422016-02-02 09:36
ReportermalsasuaView Statuspublic 
Assigned Toaferraz 
PriorityimmediateResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revisiona1b8bf010d17
ProjectionnoneETAnoneTarget Version
OSLinux 32 bitDatabasePostgreSQLJava version1.6.0_18
OS VersionCommunity ApplianceDatabase version8.3.9Ant version1.7.1
Product VersionSCM revision 
Review Assigned Tovmromanos
Web browser
ModulesCore
Regression levelProduction - Confirmed Stable
Regression date2014-04-03
Regression introduced in release3.0PR14Q2
Regression introduced by commithttps://code.openbravo.com/erp/devel/pi/rev/f7078a85289e6c61918f567b28d2df3fe17ddb47 [^]
Triggers an Emergency PackNo
Summary

0030007: Payment schedule amount incorrectly calculated when adding a payment from reconcile window to a sales order

DescriptionPayment schedule amount incorrectly calculated when adding a payment from financial account reconcile window to a sales order
Steps To Reproduce- Create a sales order from "F&B España - Región Norte" org to BP "Alimentos y Supermercados, S.A" for 1,000 and book it.
- Go to the Financial Account "Cuenta de Banco"
- Click on tab "Imported Bank Statement"
- Click on new, give it a name, and go to "Bank Statement Lines" tab.
- Click on new, give it a reference, choose "Alimentos y Supermercados, S.A" business partner, set amount in to 1,000.
- Click on save and process, and Match Statement.
- Click on "+" icon to create a transaction.
- Click on Add Payment In/Out
- Choose transaction type "Orders", set the amount to 1,000.
- Select just the 1,000 order created in the previous step.
- Click on process, and choose "Process Received payment/s and deposit", and click on Ok.
- Go to the sales order, and realize that payment schedule record says:
Expected Amount: 1,000
Received Amount: 2,000
Outstanding: -1,000
Proposed Solution- fin_payment_schedule record is not correctly updated when running the described steps.
- fin_payment_schedule_detail records are ok. The issue is when updating the fin_payment_schedule record.
- Please notice that if you click on "Add Transaction" in Financial Account window, bug is not reproduced, only if AddTransaction servlet is invoqued from the automatic reconcile window.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
duplicate of defect 0028236 closedpramakrishnan Payment schedule amount incorrectly calculated when adding a payment from reconcile window to a sales order 
related to defect 00292383.0PR15Q2 closedumartirena Transactions created from "Match Statement" process are created in Draft status 
related to defect 00288603.0PR15Q2 closedSandrahuguet UpdatePaymentPlan modulscript takes long when updating from a version lower than q3 to q3. 
related to defect 0030009 closedaferraz UpdatePaymentPlan modulscript takes hours to finish updating from mp31 to PR15Q2 
depends on backport 00300193.0PR15Q2.3 closedaferraz Payment schedule amount incorrectly calculated when adding a payment from reconcile window to a sales order 
depends on backport 00300203.0PR15Q1.6 closedaferraz Payment schedule amount incorrectly calculated when adding a payment from reconcile window to a sales order 
depends on defect 00300823.0PR15Q3 closedjorge-garcia Payment plan is updating wrong in some circunstancies 
caused by feature request 00293903.0PR14Q4 closedSandrahuguet Reconciliation refactor project 
blocks defect 00301703.0PR15Q3 closedaferraz Generic UpdatePaymentPlan module script 
causes defect 00300953.0PR15Q3 closedaferraz BP current balance not properly updated when generating credit from Payment In/Out 
causes defect 00301663.0PR15Q3 closedaferraz Wrong order payment plan with isinvoicepaid feature 

-  Notes
(0077852)
aferraz (manager)
2015-05-28 09:27
edited on: 2015-06-19 12:19

Test Plan 1:

- Create a sales order from "F&B España - Región Norte" org to BP "Alimentos y Supermercados, S.A" for 1,000 amount and book it.

- Go to the Financial Account "Cuenta de Banco"
  Create a new record in "Imported Bank Statement"
  Add a record in "Bank Statement Lines" tab with "Alimentos y Supermercados, S.A" business partner and amount in to 1,000.
  Process it.

- Click on Match Statement.
  Click on "+" icon to create a transaction.
  Click on "+" icon of Payment field to add a payment

- In Add Payment process, choose "Transferencia" payment method and transaction type "Orders".
  Select just the 1,000 order created in the previous step.
  Choose "Process Received Payment/s", and click on Done.
  Click on Done in Add Transaction process.
  Click on Ok in Match Statement process.

- Go to the created Sales Order.
  Realize that Payment Plan record (and Payment Details record also) says:
  Expected Amount: 1,000
  Received: 1,000
  Outstanding: 0


Test Plan 2:

- Create a sales order from "F&B España - Región Norte" org to BP "Alimentos y Supermercados, S.A" for 1,000 amount and book it.

- Create a goods shipment from the sales order and complete it.

- Create a sales invoice from the goods shipment and complete it.

- Go to the Financial Account "Cuenta de Banco"
  Create a new record in "Imported Bank Statement"
  Add a record in "Bank Statement Lines" tab with "Alimentos y Supermercados, S.A" business partner and amount in to 1,000.
  Process it.

- Click on Match Statement.
  Click on "+" icon to create a transaction.
  Click on "+" icon of Payment field to add a payment

- In Add Payment process, choose "Transferencia" payment method and transaction type "Invoices".
  Select just the 1,000 invoice created in the previous step.
  Choose "Process Received Payment/s", and click on Done.
  Click on Done in Add Transaction process.
  Click on Ok in Match Statement process.

- Go to the created Sales Order.
  Realize that Payment Plan record (and Payment Details record also) says:
  Expected Amount: 1,000
  Received: 1,000
  Outstanding: 0

- Go to the created Sales Invoice.
  Realize that Payment Plan record (and Payment Details record also) says:
  Expected Amount: 1,000
  Received: 1,000
  Outstanding: 0


Test Plan 3:

- Go to Preference window and create a record for "Allow to use invoice paid status control" property and value = Y

- Create a sales order from "F&B España - Región Norte" org to BP "Alimentos y Supermercados, S.A" for 1,000 amount and book it.

- Go to the Financial Account "Cuenta de Banco"
  Go to "Transferencia" Payment Method.
  Set Invoice Paid Status = Payment Cleared in Payment In and Payment Out.

- Go to the Financial Account "Cuenta de Banco"
  Create a new record in "Imported Bank Statement"
  Add a record in "Bank Statement Lines" tab with "Alimentos y Supermercados, S.A" business partner and amount in to 1,000.
  Process it.

- Click on Match Statement.
  Click on "+" icon to create a transaction.
  Click on "+" icon of Payment field to add a payment

- In Add Payment process, choose "Transferencia" payment method and transaction type "Orders".
  Select just the 1,000 order created in the previous step.
  Choose "Process Received Payment/s", and click on Done.
  Click on Done in Add Transaction process.
  Click on Ok in Match Statement process.

- Go to the created Sales Order.
  Realize that Payment Plan record (and Payment Details record also) says:
  Expected Amount: 1,000
  Received: 1,000
  Outstanding: 0


Test Plan 4:

- Go to Preference window and create a record for "Allow to use invoice paid status control" property and value = Y

- Create a sales invoice from "F&B España - Región Norte" org to BP "Alimentos y Supermercados, S.A" for 1,000 amount and book it.

- Go to the Financial Account "Cuenta de Banco"
  Go to "Transferencia" Payment Method.
  Set Invoice Paid Status = Payment Cleared in Payment In and Payment Out.

- Go to the Financial Account "Cuenta de Banco"
  Create a new record in "Imported Bank Statement"
  Add a record in "Bank Statement Lines" tab with "Alimentos y Supermercados, S.A" business partner and amount in to 1,000.
  Process it.

- Click on Match Statement.
  Click on "+" icon to create a transaction.
  Click on "+" icon of Payment field to add a payment

- In Add Payment process, choose "Transferencia" payment method and transaction type "Invoices".
  Select just the 1,000 invoice created in the previous step.
  Choose "Process Received Payment/s", and click on Done.
  Click on Done in Add Transaction process.
  Click on Ok in Match Statement process.

- Go to the created Sales Invoice.
  Realize that Payment Plan record (and Payment Details record also) says:
  Expected Amount: 1,000
  Received: 1,000
  Outstanding: 0


Test Plan 5:

- Go to Preference window and create a record for "Allow to use invoice paid status control" property and value = Y

- Go to the Financial Account "Cuenta de Banco"
  Go to "Transferencia" Payment Method.
  Set Invoice Paid Status = Payment Cleared in Payment In and Payment Out.

- Create a sales order from "F&B España - Región Norte" org to BP "Alimentos y Supermercados, S.A" for 1,000 amount and book it.
  Click on Add Payment button, and click on Done.

- Realize that Payment Plan record (and Payment Details record also) says:
  Expected Amount: 1,000
  Received: 0
  Outstanding: 1,000


Test Plan 6:

- Register Sales Order for any Org and BP. Set Invoice terms= immediate. Add any line and process order

- Register Sales Invoice using "Create lines from" process from previous order

- Register Payment In for partial amount

- Register another Payment In for rest of amount

- Access Sales Order and Sales Invoice and realize that Payment Plan information is properly updated in both cases

- "Reactivate and delete lines" from second Payment In

- Access Sales Order and Sales Invoice and realize that Payment Plan information is properly updated in both cases

(0077876)
hgbot (developer)
2015-05-28 18:58

Repository: erp/devel/pi
Changeset: aed0c66779e9442c6c92010951125f28179c0e1e
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Thu May 28 12:58:25 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/aed0c66779e9442c6c92010951125f28179c0e1e [^]

Fixes issue 30007: Payment schedule amount incorrectly calculated.

Payment schedule amount incorrectly calculated when adding a payment from reconcile window to a sales order.
FIN_TransactionProcess and PaidStatusEventHandler have been changed in order to set invoicepaid=true only when FIN_PaymentScheduleDetail has a related InvoicePaymentSchedule.
FIN_PaymentProcess.java has also been changed, in order to check invoicePaidAmounts only if FIN_PaymentScheduleDetail has a related InvoicePaymentSchedule.
In case of a payment to a order without an invoice, updatePaymentAmounts will be called only once.
Name of preference in UpdatePaymentPlan modulescript has been update to run it again and fix wrong data created by the issue.

---
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_PaymentProcess.java
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_TransactionProcess.java
M src-util/modulescript/build/classes/org/openbravo/modulescript/UpdatePaymentPlanData.class
M src-util/modulescript/src/org/openbravo/modulescript/UpdatePaymentPlan_data.xsql
M src/org/openbravo/event/PaidStatusEventHandler.java
---
(0077878)
vmromanos (manager)
2015-05-28 18:58

Code review + testing OK
(0077903)
hudsonbot (developer)
2015-05-29 17:24

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/bd6740e1bbd3 [^]
Maturity status: Test
(0078366)
hgbot (developer)
2015-06-18 12:21

Repository: erp/devel/pi
Changeset: 56e313660729ba9148ad01703190a43a604ae231
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Wed Jun 17 13:50:39 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/56e313660729ba9148ad01703190a43a604ae231 [^]

Related to issue 30007: Backout changeset aed0c66779e9

---
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_PaymentProcess.java
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_TransactionProcess.java
M src-util/modulescript/build/classes/org/openbravo/modulescript/UpdatePaymentPlanData.class
M src-util/modulescript/src/org/openbravo/modulescript/UpdatePaymentPlan_data.xsql
M src/org/openbravo/event/PaidStatusEventHandler.java
---
(0078382)
hudsonbot (developer)
2015-06-18 18:32

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/42df4e2c6b02 [^]
Maturity status: Test
(0078390)
hgbot (developer)
2015-06-19 12:18

Repository: erp/devel/pi
Changeset: a1b8bf010d175767b49d7f9dc325220ff2c7ba92
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Wed Jun 17 18:53:46 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/a1b8bf010d175767b49d7f9dc325220ff2c7ba92 [^]

Fixes issue 30007: Payment schedule amount incorrectly calculated

FIN_PaymentProcess was not setting isinvoicepaid = true when processing a payment related to an order.
Also, APRM_ISPAYMENTCONFIRMED function, was not taking into account isinvoicepaid when checking if a payment related to an order was confirmed.
Name of preference in UpdatePaymentPlan modulescript has been update to run it again and fix wrong data created by the issue.

---
M modules/org.openbravo.advpaymentmngt/src-db/database/model/functions/APRM_ISPAYMENTCONFIRMED.xml
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_PaymentProcess.java
M src-util/modulescript/build/classes/org/openbravo/modulescript/UpdatePaymentPlanData.class
M src-util/modulescript/src/org/openbravo/modulescript/UpdatePaymentPlan_data.xsql
---
(0078391)
vmromanos (manager)
2015-06-19 12:20

Code review + testing OK
(0078399)
hudsonbot (developer)
2015-06-19 23:57

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/53058d80de1d [^]
Maturity status: Test
(0083818)
hgbot (developer)
2016-02-02 09:36

Repository: tools/automation/int
Changeset: bf7d200e031213521d68adb9be0ab62d804b8d7d
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Thu Oct 01 16:20:44 2015 +0200
URL: http://code.openbravo.com/tools/automation/int/rev/bf7d200e031213521d68adb9be0ab62d804b8d7d [^]

Related to issue 30007: Added some automated tests

---
M src-test/com/openbravo/test/integration/erp/data/financial/receivablespayables/transactions/AddTransactionData.java
M src-test/com/openbravo/test/integration/erp/data/financial/receivablespayables/transactions/MatchStatementData.java
M src-test/com/openbravo/test/integration/erp/gui/financial/receivablespayables/transactions/AddTransactionProcess.java
M src-test/com/openbravo/test/integration/erp/modules/functionalteam/addpayment/testsuites/APR_Regressions/RegressionSuite.java
M src-test/com/openbravo/test/integration/erp/modules/functionalteam/addpayment/testsuites/APR_Regressions/build.xml
A src-test/com/openbravo/test/integration/erp/modules/functionalteam/addpayment/testsuites/APR_Regressions/APRRegression30007In.java
A src-test/com/openbravo/test/integration/erp/modules/functionalteam/addpayment/testsuites/APR_Regressions/APRRegression30007Out.java
---

- Issue History
Date Modified Username Field Change
2015-05-26 09:42 malsasua New Issue
2015-05-26 09:42 malsasua Assigned To => Triage Finance
2015-05-26 09:42 malsasua Modules => Core
2015-05-26 09:42 malsasua Triggers an Emergency Pack => No
2015-05-26 15:27 aferraz Assigned To Triage Finance => aferraz
2015-05-26 18:11 aferraz Status new => scheduled
2015-05-26 18:28 aferraz Relationship added caused by 0029390
2015-05-26 18:29 aferraz Relationship added duplicate of 0028236
2015-05-26 18:29 aferraz Relationship added related to 0029238
2015-05-26 18:30 aferraz Relationship added related to 0028860
2015-05-26 18:31 aferraz Regression level => Production - Confirmed Stable
2015-05-26 18:31 aferraz Regression date => 2015-03-12
2015-05-26 18:31 aferraz Regression introduced in release => 3.0PR15Q1.2
2015-05-26 18:31 aferraz Regression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/f7078a85289e6c61918f567b28d2df3fe17ddb47 [^]
2015-05-26 18:36 txasu Issue Monitored: txasu
2015-05-28 09:27 aferraz Note Added: 0077852
2015-05-28 09:27 aferraz Note Edited: 0077852 View Revisions
2015-05-28 09:28 aferraz Note Edited: 0077852 View Revisions
2015-05-28 09:40 aferraz Note Edited: 0077852 View Revisions
2015-05-28 09:41 aferraz Note Edited: 0077852 View Revisions
2015-05-28 10:02 aferraz Note Edited: 0077852 View Revisions
2015-05-28 10:23 aferraz Note Edited: 0077852 View Revisions
2015-05-28 10:54 aferraz Relationship added related to 0030009
2015-05-28 11:26 aferraz Note Edited: 0077852 View Revisions
2015-05-28 18:58 hgbot Checkin
2015-05-28 18:58 hgbot Note Added: 0077876
2015-05-28 18:58 hgbot Status scheduled => resolved
2015-05-28 18:58 hgbot Resolution open => fixed
2015-05-28 18:58 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/aed0c66779e9442c6c92010951125f28179c0e1e [^]
2015-05-28 18:58 vmromanos Review Assigned To => vmromanos
2015-05-28 18:58 vmromanos Note Added: 0077878
2015-05-28 18:58 vmromanos Status resolved => closed
2015-05-29 17:24 hudsonbot Checkin
2015-05-29 17:24 hudsonbot Note Added: 0077903
2015-06-02 18:05 Sandrahuguet Regression date 2015-03-12 => 2014-04-03
2015-06-02 18:05 Sandrahuguet Regression introduced in release 3.0PR15Q1.2 => 3.0PR14Q2
2015-06-04 14:00 aferraz Relationship added causes 0030095
2015-06-17 13:43 aferraz Status closed => new
2015-06-17 13:43 aferraz Resolution fixed => open
2015-06-17 14:47 aferraz Relationship added blocks 0030166
2015-06-18 12:21 hgbot Checkin
2015-06-18 12:21 hgbot Note Added: 0078366
2015-06-18 12:43 aferraz Relationship deleted blocks 0030166
2015-06-18 12:43 aferraz Relationship added causes 0030166
2015-06-18 18:32 hudsonbot Checkin
2015-06-18 18:32 hudsonbot Note Added: 0078382
2015-06-19 11:54 aferraz Note Edited: 0077852 View Revisions
2015-06-19 12:10 vmromanos Status new => scheduled
2015-06-19 12:18 hgbot Checkin
2015-06-19 12:18 hgbot Note Added: 0078390
2015-06-19 12:18 hgbot Status scheduled => resolved
2015-06-19 12:18 hgbot Resolution open => fixed
2015-06-19 12:18 hgbot Fixed in SCM revision http://code.openbravo.com/erp/devel/pi/rev/aed0c66779e9442c6c92010951125f28179c0e1e [^] => http://code.openbravo.com/erp/devel/pi/rev/a1b8bf010d175767b49d7f9dc325220ff2c7ba92 [^]
2015-06-19 12:19 vmromanos Note Edited: 0077852 View Revisions
2015-06-19 12:20 vmromanos Note Added: 0078391
2015-06-19 12:20 vmromanos Status resolved => closed
2015-06-19 23:57 hudsonbot Checkin
2015-06-19 23:57 hudsonbot Note Added: 0078399
2015-06-22 11:56 vmromanos Relationship added blocks 0030170
2015-06-22 11:58 vmromanos Relationship added depends on 0030082
2016-02-02 09:36 hgbot Checkin
2016-02-02 09:36 hgbot Note Added: 0083818


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker