details: https://code.openbravo.com/erp/devel/pi/rev/09736ab499bb changeset: 31988:09736ab499bb user: Atul Gaware <atul.gaware <at> openbravo.com> date: Wed Apr 12 00:32:23 2017 +0530 summary: Fixes issue 35705: Cannot use any available credit if it is a payment for same bp that generated credit and payment method removed from fin account
When there is case that financial account and payment method does not have record in FIN_FINACC_PAYMENTMETHOD, function APRM_SEQNUMBERPAYMENTSTATUS when called from function aprm_seqnoinvpaidstatus returns value 'N' while converting to integer gives number format exception. To avoid this situation function will return minimun value required for invoice status paid control that is 40 in both Payment In and Payment Out. details: https://code.openbravo.com/erp/devel/pi/rev/5e818f0155f5 changeset: 31989:5e818f0155f5 user: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com> date: Thu Apr 27 21:05:33 2017 +0200 summary: Related to issue 35705: Code review improvements diffstat: modules/org.openbravo.advpaymentmngt/src-db/database/model/functions/APRM_SEQNUMBERPAYMENTSTATUS.xml | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diffs (30 lines): diff -r 3f0bb1b574c3 -r 5e818f0155f5 modules/org.openbravo.advpaymentmngt/src-db/database/model/functions/APRM_SEQNUMBERPAYMENTSTATUS.xml --- a/modules/org.openbravo.advpaymentmngt/src-db/database/model/functions/APRM_SEQNUMBERPAYMENTSTATUS.xml Thu Apr 27 10:46:56 2017 -0400 +++ b/modules/org.openbravo.advpaymentmngt/src-db/database/model/functions/APRM_SEQNUMBERPAYMENTSTATUS.xml Thu Apr 27 21:05:33 2017 +0200 @@ -16,7 +16,7 @@ * under the License. * The Original Code is Openbravo ERP. * The Initial Developer of the Original Code is Openbravo SLU -* All portions are Copyright (C) 2014 Openbravo SLU +* All portions are Copyright (C) 2014-2017 Openbravo SLU * All Rights Reserved. * Contributor(s): ______________________________________. ************************************************************************/ @@ -25,6 +25,7 @@ v_referencelist VARCHAR2(32):='575BCB88A4694C27BC013DE9C73E6FE7'; BEGIN + -- Check if the status exists SELECT count(*) INTO v_count FROM DUAL WHERE EXISTS (SELECT 1 FROM ad_ref_list @@ -32,7 +33,8 @@ AND value = status); IF (v_count = 0) THEN - RETURN 'N'; + -- If status is null, return minimum value for invoice paid status (RPR or PPM) + RETURN '40'; END IF; SELECT seqno ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Openbravo-commits mailing list Openbravo-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbravo-commits