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

index 148363f..f0db9ab 100644 (file)
@@ -235,7 +235,7 @@ BEGIN
     -- if currency rate is off...
     IF v_diff != 0.00  THEN
     
-        v_new_rate := _ar.aropen_amount / v_gl_ar_amount;
+        v_new_rate := _ar.aropen_amount / v_gltrans_amount;
         
         RAISE NOTICE 'aropen_id  % change currency rate from % to %', i_aropen_id, _ar.aropen_curr_rate  ,v_new_rate ;