src-util/buildvalidation/src/org/openbravo/buildvalidation/GLJournalAccountingCheck_data.xsql
changeset 26406 af63dcb16553
parent 26270 d21dd3116c92
child 26388 3f83f6ab144b
child 26679 6cbc78180ba8
--- a/src-util/buildvalidation/src/org/openbravo/buildvalidation/GLJournalAccountingCheck_data.xsql	Thu Apr 16 11:06:30 2015 +0200
+++ b/src-util/buildvalidation/src/org/openbravo/buildvalidation/GLJournalAccountingCheck_data.xsql	Thu Apr 16 18:33:31 2015 +0200
@@ -55,10 +55,8 @@
          WHERE t1.gl_journal_id = t2.record_id
          AND t1.gl_journalline_id = t2.line_id
          AND t1.c_validcombination_id IS NOT NULL
-         AND (t1.amtsourcedr <> t2.amtsourcedr
-         OR t1.amtsourcecr <> t2.amtsourcecr
-         OR t1.amtacctdr <> t2.amtacctdr
-         OR t1.amtacctcr <> t2.amtacctcr)
+         AND ((t1.amtsourcedr - t1.amtsourcecr) <> (t2.amtsourcedr - t2.amtsourcecr)
+         OR  (t1.amtacctdr - t1.amtacctcr) <> (t2.amtacctdr - t2.amtacctcr))
       ]]>
     </Sql>
   </SqlMethod>  
@@ -113,10 +111,8 @@
       AND t1.gl_journalline_id = t2.line_id
       AND t1.c_validcombination_id IS NOT NULL
       AND t1.ad_client_id = ?
-      AND (t1.amtsourcedr <> t2.amtsourcedr
-      OR t1.amtsourcecr <> t2.amtsourcecr
-      OR t1.amtacctdr <> t2.amtacctdr
-      OR t1.amtacctcr <> t2.amtacctcr)
+      AND ((t1.amtsourcedr - t1.amtsourcecr) <> (t2.amtsourcedr - t2.amtsourcecr)
+      OR  (t1.amtacctdr - t1.amtacctcr) <> (t2.amtacctdr - t2.amtacctcr))
       ]]>
     </Sql>
     <Parameter name="client"/>