Fixes issue 22881: Wrong definition of the alert
authorJavier Etxarri <javier.echarri@openbravo.com>
Wed, 20 Feb 2013 15:57:22 +0100
changeset 19749 65a7f0584de6
parent 19748 4f70e2becd1c
child 19750 8dbf1061bef4
Fixes issue 22881: Wrong definition of the alert
'Wrong Matched Invoice posting. Wrong currency conversion.'
referencedata/sampledata/F_B_International_Group.xml
--- a/referencedata/sampledata/F_B_International_Group.xml	Wed Feb 20 15:55:45 2013 +0100
+++ b/referencedata/sampledata/F_B_International_Group.xml	Wed Feb 20 15:57:22 2013 +0100
@@ -1456385,7 +1456385,7 @@
     <name>Wrong Matched Invoice posting. Wrong currency conversion.</name>
     <tab id="408"/>
     <filterClause xsi:nil="true"/>
-    <sql>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)  &lt;&gt; (fa.amtacctdr + fa.amtacctcr) OR COALESCE(fi.amtacctcr + fi.amtacctdr, fa.amtacctdr + fa.amtacctcr)  &lt;&gt; (fa.amtacctdr + fa.amtacctcr))</sql>
+    <sql>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)  &lt;&gt; (fa.amtacctdr + fa.amtacctcr) OR COALESCE(fi.amtacctcr + fi.amtacctdr, fa.amtacctdr + fa.amtacctcr)  &lt;&gt; (fa.amtacctdr + fa.amtacctcr))</sql>
     <type>D</type>
   </ADAlertRule>
   <ADAlertRule id="DCA2BC13703C411FB092E8271BAD9E71">