details:   /erp/devel/int/rev/051c78094978
changeset: 6462:051c78094978
user:      Harikrishnan Raja <harikrishnan.raja <at> openbravo.com>
date:      Fri Feb 19 15:04:21 2010 +0530
summary:   Fixes Issue 11875: When complete a Purchase Invoice creates a 
payment with amount 0.

details:   /erp/devel/int/rev/43b32f4982a1
changeset: 6463:43b32f4982a1
user:      Antonio Moreno <antonio.moreno <at> openbravo.com>
date:      Fri Feb 19 10:47:51 2010 +0100
summary:   By default, safe.mode property will from now on be activated.

diffstat:

 config/Openbravo.properties.template               |  2 +-
 src-db/database/model/functions/C_INVOICE_POST.xml |  4 ++++
 2 files changed, 5 insertions(+), 1 deletions(-)

diffs (40 lines):

diff -r 6a9cac2e2b48 -r 43b32f4982a1 config/Openbravo.properties.template
--- a/config/Openbravo.properties.template      Fri Feb 19 00:46:41 2010 +0100
+++ b/config/Openbravo.properties.template      Fri Feb 19 10:47:51 2010 +0100
@@ -134,7 +134,7 @@
 # wasn't restarted, users will only be able to login in the application 
 # with role System Administrator
 
-safe.mode=false
+safe.mode=true
 
 ##############
 # Hibernate #
diff -r 6a9cac2e2b48 -r 43b32f4982a1 
src-db/database/model/functions/C_INVOICE_POST.xml
--- a/src-db/database/model/functions/C_INVOICE_POST.xml        Fri Feb 19 
00:46:41 2010 +0100
+++ b/src-db/database/model/functions/C_INVOICE_POST.xml        Fri Feb 19 
10:47:51 2010 +0100
@@ -95,6 +95,7 @@
     v_Currency_ID VARCHAR2(32);
     v_Multiplier NUMBER:=1;
        v_Amount NUMBER:=0;--CashLine amount
+    v_paymentcheck NUMBER;
     --
     v_RInvoice_ID VARCHAR2(32);
     v_RDocumentNo C_INVOICE.DocumentNo%TYPE;
@@ -1611,6 +1612,8 @@
                 END IF;
                 v_pendingAmount:=v_pendingAmount - v_paymentAmount;
                 Ad_Sequence_Next('C_Debt_Payment', v_Record_ID, 
v_debtPaymentID) ;
+                v_paymentcheck:=C_Currency_Round((v_paymentamount 
*v_multiplierarc) -withholdamount *(v_paymentamount *v_multiplierarc / 
v_grandtotal), v_Currency_ID, NULL);
+                IF(v_paymentcheck <> 0) THEN
                 INSERT
                 INTO C_DEBT_PAYMENT
                   (
@@ -1635,6 +1638,7 @@
                     'N', v_C_Project_Id, 'DE', 'DE', 
C_Currency_Round(withholdamount *(v_paymentamount *v_multiplierarc / 
v_grandtotal), v_Currency_ID, NULL),cWithHoldId
                   )
                   ;
+                  END IF;
                 --AL
                 --Looking for autogenerated debt-payments
                 SELECT MAX(c_Debt_Payment_Id), MAX(ad_Org_ID)

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to