Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0023617Openbravo ERP01. General setuppublic2013-04-23 13:392013-06-01 02:14
maite 
Sandrahuguet 
highminoralways
closedfixed 
5
 
3.0MP24 
Core
No
0023617: Static alert rule query definition needs to be corrected too
Static alert rule query definition needs to be corrected too
As consequence of issue number 0022881, alert rule was fixed to not show false positives. However, no changes were performed in Issue21640WrongMatchInvAccounting.java file, which still includes wrong query definition in variable 'ALERT_RULE_SQL2'
Modify ALERT_RULE_SQL2 variable in Issue21640WrongMatchInvAccounting.java file from
"SELECT DISTINCT ad_column_identifier('m_matchinv', fa.record_id, 'en_US') as record_id, fa.record_id as referencekey_id, 0 as ad_role_id, null as ad_user_id, 'This Matched Invoice need to be posted again due to wrong accounting.' as description, 'Y' as isactive, mi.ad_org_id, mi.ad_client_id, now() as created, 0 as createdBy, now() as updated, 0 as updatedBy FROM fact_acct fa JOIN m_matchinv mi ON fa.record_id = mi.m_matchinv_id LEFT JOIN fact_acct far ON far.line_id = mi.m_inoutline_id AND far.account_id = fa.account_id LEFT JOIN fact_acct fi ON fi.line_id = mi.c_invoiceline_id AND fi.account_id = fa.account_id AND fi.ad_table_id = '318' WHERE fa.ad_table_id = '472' AND (COALESCE(far.amtacctcr + far.amtacctdr, fa.amtacctdr + fa.amtacctcr) <> (fa.amtacctdr + fa.amtacctcr) OR COALESCE(fi.amtacctcr + fi.amtacctdr, fa.amtacctdr + fa.amtacctcr) <> (fa.amtacctdr + fa.amtacctcr))"
to
"SELECT DISTINCT ad_column_identifier('m_matchinv', fa.record_id, 'en_US') as record_id, fa.record_id as referencekey_id, 0 as ad_role_id, null as ad_user_id, 'This Matched Invoice need to be posted again due to wrong accounting.' as description, 'Y' as isactive, mi.ad_org_id, mi.ad_client_id, now() as created, 0 as createdBy, now() as updated, 0 as updatedBy FROM fact_acct fa JOIN m_matchinv mi ON fa.record_id = mi.m_matchinv_id LEFT JOIN fact_acct far ON far.line_id = mi.m_inoutline_id AND far.account_id = fa.account_id LEFT JOIN fact_acct fi ON fi.line_id = mi.c_invoiceline_id AND fi.account_id = fa.account_id AND fi.ad_table_id = '318' WHERE (round((select movementqty from m_inoutline where m_inoutline_id=mi.m_inoutline_id),2) = round((select qtyinvoiced from c_invoiceline where c_invoiceline_id=mi.c_invoiceline_id),2)) AND fa.ad_table_id = '472' AND (COALESCE(far.amtacctcr + far.amtacctdr, fa.amtacctdr + fa.amtacctcr) <> (fa.amtacctdr + fa.amtacctcr) OR COALESCE(fi.amtacctcr + fi.amtacctdr, fa.amtacctdr + fa.amtacctcr) <> (fa.amtacctdr + fa.amtacctcr))"
No tags attached.
related to defect 00228813.0MP22 closed jecharri Wrong definition of the alert 'Wrong Matched Invoice posting. Wrong currency conversion.' 
Issue History
2013-04-23 13:39maiteNew Issue
2013-04-23 13:39maiteAssigned To => dmiguelez
2013-04-23 13:39maiteModules => Core
2013-04-23 13:39maiteTriggers an Emergency Pack => No
2013-04-23 13:40maiteRelationship addedrelated to 0022881
2013-04-23 13:40maiteIssue Monitored: networkb
2013-04-23 18:47dmiguelezAssigned Todmiguelez => jonalegriaesarte
2013-05-13 17:31dmiguelezAssigned Tojonalegriaesarte => dmiguelez
2013-05-28 12:57SandrahuguetAssigned Todmiguelez => Sandrahuguet
2013-05-28 12:58hgbotCheckin
2013-05-28 12:58hgbotNote Added: 0058988
2013-05-28 12:58hgbotStatusnew => resolved
2013-05-28 12:58hgbotResolutionopen => fixed
2013-05-28 12:58hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/7b20cf4da8efc5ad038d1ede283ae58bcfe9b40f [^]
2013-05-28 13:34maiteNote Added: 0058992
2013-05-28 13:34maiteStatusresolved => closed
2013-06-01 02:14hudsonbotCheckin
2013-06-01 02:14hudsonbotNote Added: 0059092

Notes
(0058988)
hgbot   
2013-05-28 12:58   
Repository: erp/devel/pi
Changeset: 7b20cf4da8efc5ad038d1ede283ae58bcfe9b40f
Author: Sandra Huguet <sandra.huguet <at> openbravo.com>
Date: Fri May 17 12:04:47 2013 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/7b20cf4da8efc5ad038d1ede283ae58bcfe9b40f [^]

Fixed bug 23617 changed ALERT_RULE_SQL2 in Issue21640WrongMatchInvAccounting

---
M src-util/modulescript/build/classes/org/openbravo/modulescript/Issue21640WrongMatchInvAccounting.class
M src-util/modulescript/src/org/openbravo/modulescript/Issue21640WrongMatchInvAccounting.java
---
(0058992)
maite   
2013-05-28 13:34   
verified
(0059092)
hudsonbot   
2013-06-01 02:14   
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/31f9b82dde77 [^]

Maturity status: Test