Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0030115Openbravo ERPZ. Otherspublic2015-05-22 09:562015-06-12 13:56
ngarcia 
jorge-garcia 
urgentmajoralways
closedfixed 
5
 
3.0PR15Q2.2 
vmromanos
Advanced Payables and Receivables Mngmt
Production - Confirmed Stable
2014-02-11
3.0PR14Q2
https://code.openbravo.com/erp/devel/pi/rev/87765308f9bd4cdc21b7b53b437f1ed014f5a483 [^]
No
0030115: Outstanding amount of sales order payment plan is not updated when payment method is set as automatic receipt
Outstanding amount of sales order payment plan is not updated when payment method is set as automatic receipt
As group admin role:
   Create a new Payment Method and set Automatic Receipt = 'Y'
   Add it to a financial account
   Create a Sales Order, set the previously created payment method and Invoice Terms = Immediate
   Create a Sales Invoice from it and complete it
   Check the Received field of the Payment Plan of the order has been updated but the Outstanding amount has not been updated
Approved
blocks defect 00299723.0PR15Q3 closed jorge-garcia Outstanding amount of sales order payment plan is not updated when payment method is set as automatic receipt 
Issue History
2015-06-05 11:48jorge-garciaTypedefect => backport
2015-06-05 11:48jorge-garciaTarget Versionpi => 3.0PR15Q2.2
2015-06-05 13:08jorge-garciaRegression date => 2014-02-11
2015-06-10 13:24dmitry_mezentsevTag Attached: Approved
2015-06-12 13:46hgbotCheckin
2015-06-12 13:46hgbotNote Added: 0078235
2015-06-12 13:46hgbotStatusscheduled => resolved
2015-06-12 13:46hgbotResolutionopen => fixed
2015-06-12 13:46hgbotFixed in SCM revision => http://code.openbravo.com/erp/backports/3.0PR15Q2.2/rev/dc78e10a61a0d9a18d14b0c6ab43644503bc570d [^]
2015-06-12 13:46hgbotCheckin
2015-06-12 13:46hgbotNote Added: 0078237
2015-06-12 13:56vmromanosReview Assigned To => vmromanos
2015-06-12 13:56vmromanosNote Added: 0078250
2015-06-12 13:56vmromanosStatusresolved => closed

Notes
(0078235)
hgbot   
2015-06-12 13:46   
Repository: erp/backports/3.0PR15Q2.2
Changeset: dc78e10a61a0d9a18d14b0c6ab43644503bc570d
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Wed Jun 10 10:52:18 2015 +0200
URL: http://code.openbravo.com/erp/backports/3.0PR15Q2.2/rev/dc78e10a61a0d9a18d14b0c6ab43644503bc570d [^]

Fixed issue 30115: Outstanding amount of sales order payment plan is not updated

The problem was that the outstanding amount of sales order payment plan is not
updated when payment method is set as automatic receipt.

Before the commit which introduces this regression, the function checked the
status of the payment. With the changes, the function checks if the payment
schedule detail is paid.

The problem was in the update of the payment plan of the sales order,
specifically in WHERE clause for outstanding amount.

Now, the where clause works as expected, and the outstanding amount is updated
properly.

---
M modules/org.openbravo.advpaymentmngt/src-db/database/model/functions/APRM_GEN_PAYMENTSCHEDULE_INV.xml
---
(0078237)
hgbot   
2015-06-12 13:46   
Repository: erp/backports/3.0PR15Q2.2
Changeset: ebc2affd351ec427738b0a98cc193b188618fe8e
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Fri Jun 12 12:05:42 2015 +0200
URL: http://code.openbravo.com/erp/backports/3.0PR15Q2.2/rev/ebc2affd351ec427738b0a98cc193b188618fe8e [^]

Related to issue 30115: code review improvements
Reduced useless query complexity to update outstanding amount.
It's only necessary to check fin_payment_detail_id is null (not associated payment) or isinvoicepaid='N' (associated payment but in a non paid yet status)

---
M modules/org.openbravo.advpaymentmngt/src-db/database/model/functions/APRM_GEN_PAYMENTSCHEDULE_INV.xml
---
(0078250)
vmromanos   
2015-06-12 13:56   
Code review + testing OK