Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0020428Openbravo ERP09. Financial managementpublic2012-05-07 10:372012-05-29 18:22
eduardo_Argal 
eduardo_Argal 
urgentmajoralways
closedfixed 
5
 
3.0MP12 
Core
No
0020428: Record_ID2 column is taking values when posting documents of the new financial flows when it should point just debt/payments
Record_ID2 column is taking values when posting documents of the new financial flows when it should point just debt/payments.

This document was introduced to be able to hide matched debt payments in ledger report. It was fulfilled with debt payment info, so that invoice and payment can be related and hidden when required.
In the new financial flow this info was fulfilled wrongly and can result in having strange info in fact_acct table.
1) create a payment
2) Post it
3) Mind that there is info in record_Id2 column of table fact_Acct when posting the payment. This column should be empty as info inside refers to no Debt/payment.
Fix posting logic for new financial flows (payment, transaction, reconciliation) not to include info in record_id2.
Create a module script that clears info in that column when it does not refer to debt/payment items.
No tags attached.
Issue History
2012-05-07 10:37eduardo_ArgalNew Issue
2012-05-07 10:37eduardo_ArgalAssigned To => eduardo_Argal
2012-05-07 10:37eduardo_ArgalModules => Core
2012-05-07 10:37eduardo_ArgalStatusnew => scheduled
2012-05-07 10:37eduardo_Argalfix_in_branch => pi
2012-05-11 18:49hgbotCheckin
2012-05-11 18:49hgbotNote Added: 0048586
2012-05-11 18:49hgbotStatusscheduled => resolved
2012-05-11 18:49hgbotResolutionopen => fixed
2012-05-11 18:49hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/566af5c103158e75403dbededaaf8806b9fc0e5c [^]
2012-05-25 12:11hudsonbotCheckin
2012-05-25 12:11hudsonbotNote Added: 0049102
2012-05-29 18:22miruritaNote Added: 0049441
2012-05-29 18:22miruritaStatusresolved => closed
2012-05-29 18:22miruritaFixed in Version => 3.0MP12

Notes
(0048586)
hgbot   
2012-05-11 18:49   
Repository: erp/devel/pi
Changeset: 566af5c103158e75403dbededaaf8806b9fc0e5c
Author: Eduardo Argal Guibert <eduardo.argal <at> openbravo.com>
Date: Mon May 07 10:54:55 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/566af5c103158e75403dbededaaf8806b9fc0e5c [^]

Fixes bug 20428: Record_ID2 column is taking values when posting documents of the new financial flows when it should point just debt/payments

---
M src/org/openbravo/erpCommon/ad_forms/DocFINFinAccTransaction.java
M src/org/openbravo/erpCommon/ad_forms/DocFINReconciliation.java
M src/org/openbravo/erpCommon/ad_forms/DocInvoice.java
M src/org/openbravo/erpCommon/ad_forms/DocLine_FINFinAccTransaction.java
M src/org/openbravo/erpCommon/ad_forms/DocLine_FINPayment.java
M src/org/openbravo/erpCommon/ad_forms/DocLine_FINReconciliation.java
M src/org/openbravo/erpCommon/ad_forms/DocLine_FinPaymentSchedule.java
A modules/org.openbravo.advpaymentmngt/build/classes/org/openbravo/advpaymentmngt/modulescript/UpdateRecordId2Value.class
A modules/org.openbravo.advpaymentmngt/build/classes/org/openbravo/advpaymentmngt/modulescript/UpdateRecordId2ValueData.class
A modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/org/openbravo/advpaymentmngt/modulescript/UpdateRecordId2Value.java
A modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/org/openbravo/advpaymentmngt/modulescript/UpdateRecordId2Value_data.xsql
A modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/src/org/openbravo/advpaymentmngt/modulescript/UpdateRecordId2ValueData.java
---
(0049102)
hudsonbot   
2012-05-25 12:11   
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/5401e185a8b0 [^]

Maturity status: Test
(0049441)
mirurita   
2012-05-29 18:22   
Testing Plan
1) Do not apply the patch
2) Create a new payment (configured to generate accounting)
3) Post it
4) The record_id2 is not populated because the value on m_record_id2 is overwritten inside the loadAttributes method
m_Record_Id2 = data.getField("cDebtpaymentId");
5) Update manually record_id2 column in fact_acct for previously generated payment
select record_id2 from fact_acct order by created desc
update fact_acct set record_id2 = record_id where fact_acct_id = '4B3B27F4CC6A41F9B8471576DB2AF0D0'
6) Apply the patch and run ant smartbuild -Dlocal=no. The modulescript will be executed.
7) Check again the column and record_id2 column should be empty
8) Unpost payment created on step 2)
9) Post it again
10) Check in fact_acct for record_Id2 column


1) Create a payment and post it
2) Create a transaction for the previous payment and post it
3) Create a reconciliation, include previous transaction and post it
4) Check that there is no data on record_id2 column in fact_acct table
select record_id2 from fact_acct order by created desc