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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0030019
TypeCategorySeverityReproducibilityDate SubmittedLast Update
backport[Openbravo ERP] 09. Financial managementminoralways2015-05-26 09:422015-06-22 11:35
ReportermalsasuaView Statuspublic 
Assigned Toaferraz 
PriorityimmediateResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revision6b3505a5370e
ProjectionnoneETAnoneTarget Version3.0PR15Q2.3
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 level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0030019: 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.
TagsApproved
Attached Filesdiff file icon 30019.diff [^] (9,220 bytes) 2015-06-19 12:21 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]
blocks defect 0030007 closedaferraz Payment schedule amount incorrectly calculated when adding a payment from reconcile window to a sales order 

-  Notes
(0077874)
hgbot (developer)
2015-05-28 18:57

Repository: erp/backports/3.0PR15Q2.2
Changeset: c7f004f2815dd0c7b9d389bb5e1eadaab83111f0
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Thu May 28 13:02:49 2015 +0200
URL: http://code.openbravo.com/erp/backports/3.0PR15Q2.2/rev/c7f004f2815dd0c7b9d389bb5e1eadaab83111f0 [^]

Fixes issue 30019: 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
---
(0077877)
vmromanos (developer)
2015-05-28 18:58

Code review + testing OK
(0078346)
hgbot (developer)
2015-06-17 19:00

Repository: erp/backports/3.0PR15Q2.2
Changeset: 38993c090dd0e079d603ee11f1440f442c266ba1
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Wed Jun 17 14:27:39 2015 +0200
URL: http://code.openbravo.com/erp/backports/3.0PR15Q2.2/rev/38993c090dd0e079d603ee11f1440f442c266ba1 [^]

Related to issue 30019: Backout changeset c7f004f2815d

---
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
---
(0078392)
vmromanos (developer)
2015-06-19 12:21
edited on: 2015-06-19 12:22

Attached is the right fix.
Blocked until backport repo is created

(0078407)
hgbot (developer)
2015-06-22 11:35

Repository: erp/backports/3.0PR15Q2.3
Changeset: 6b3505a5370e8829b13058b5449e2d8bb45cd73b
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Wed Jun 17 18:53:46 2015 +0200
URL: http://code.openbravo.com/erp/backports/3.0PR15Q2.3/rev/6b3505a5370e8829b13058b5449e2d8bb45cd73b [^]

Fixes issue 30019: 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
---
(0078408)
vmromanos (developer)
2015-06-22 11:35

Code review + testing OK

- Issue History
Date Modified Username Field Change
2015-05-26 18:11 aferraz Type defect => backport
2015-05-26 18:11 aferraz Target Version => 3.0PR15Q2.2
2015-05-27 11:00 dmitry_mezentsev Tag Attached: Approved
2015-05-28 18:57 hgbot Checkin
2015-05-28 18:57 hgbot Note Added: 0077874
2015-05-28 18:57 hgbot Status scheduled => resolved
2015-05-28 18:57 hgbot Resolution open => fixed
2015-05-28 18:57 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/backports/3.0PR15Q2.2/rev/c7f004f2815dd0c7b9d389bb5e1eadaab83111f0 [^]
2015-05-28 18:58 vmromanos Review Assigned To => vmromanos
2015-05-28 18:58 vmromanos Note Added: 0077877
2015-05-28 18:58 vmromanos Status resolved => closed
2015-06-17 14:42 aferraz Status closed => new
2015-06-17 14:42 aferraz Resolution fixed => open
2015-06-17 19:00 hgbot Checkin
2015-06-17 19:00 hgbot Note Added: 0078346
2015-06-18 09:36 aferraz Target Version 3.0PR15Q2.2 => 3.0PR15Q2.3
2015-06-19 12:10 vmromanos Status new => scheduled
2015-06-19 12:21 vmromanos File Added: 30019.diff
2015-06-19 12:21 vmromanos Note Added: 0078392
2015-06-19 12:22 vmromanos Note Edited: 0078392 View Revisions
2015-06-22 11:35 hgbot Checkin
2015-06-22 11:35 hgbot Note Added: 0078407
2015-06-22 11:35 hgbot Status scheduled => resolved
2015-06-22 11:35 hgbot Resolution open => fixed
2015-06-22 11:35 hgbot Fixed in SCM revision http://code.openbravo.com/erp/backports/3.0PR15Q2.2/rev/c7f004f2815dd0c7b9d389bb5e1eadaab83111f0 [^] => http://code.openbravo.com/erp/backports/3.0PR15Q2.3/rev/6b3505a5370e8829b13058b5449e2d8bb45cd73b [^]
2015-06-22 11:35 vmromanos Note Added: 0078408
2015-06-22 11:35 vmromanos Status resolved => closed


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker