pgsql/investigations/ar-debitmemo.sql
authorEdward <edward@roojs.com>
Tue, 4 Feb 2014 10:11:21 +0000 (18:11 +0800)
committerEdward <edward@roojs.com>
Tue, 4 Feb 2014 10:11:21 +0000 (18:11 +0800)
pgsql/investigations/ar-debitmemo.sql

index 0c2d510..793a6b8 100644 (file)
@@ -75,8 +75,8 @@ BEGIN
     
     SELECT
             gltrans_id,
-            gltrans_amount,
-            ROUND( _ar.aropen_amount / _ar.aropen_curr_rate, 3 ) - ROUND(gltrans_amount, 3),
+            gltrans_amount * -1.0,
+            ROUND( _ar.aropen_amount / _ar.aropen_curr_rate, 3 ) - ROUND(gltrans_amount * -1.0, 3),
             v_diff
     INTO
             v_gl_id,