[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb:[4244] branches/1.3/sql/modules/Payment.sql



Revision: 4244
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=4244&view=rev
Author:   ehuelsmann
Date:     2011-12-28 14:41:38 +0000 (Wed, 28 Dec 2011)
Log Message:
-----------
Work around the fact that we're not clearing foreign currency
invoices to the fractional penny in local currency.

Modified Paths:
--------------
    branches/1.3/sql/modules/Payment.sql

Modified: branches/1.3/sql/modules/Payment.sql
===================================================================
--- branches/1.3/sql/modules/Payment.sql	2011-12-27 13:11:30 UTC (rev 4243)
+++ branches/1.3/sql/modules/Payment.sql	2011-12-28 14:41:38 UTC (rev 4244)
@@ -224,7 +224,8 @@
               	        AND a.invoice_class = in_account_class
 		        AND c.entity_class = in_account_class
 		        AND c.id = in_entity_credit_id
-		        AND a.amount - a.paid <> 0
+                        --### short term: ignore fractional cent differences
+		        AND ABS(a.amount - a.paid) > 0.005
 		        AND a.curr = in_curr
 		        AND (a.transdate >= in_datefrom 
 		             OR in_datefrom IS NULL)
@@ -395,7 +396,8 @@
 		         AND a.curr = in_currency
 		         AND a.entity_credit_account = c.id
 			 AND p.due <> 0
-		         AND a.amount <> a.paid 
+                         --### short term: ignore fractional differences
+		         AND ABS(a.amount - a.paid) > 0.005
 			 AND NOT a.on_hold
 		         AND EXISTS (select trans_id FROM acc_trans
 		                      WHERE trans_id = a.id AND

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.