details: https://code.openbravo.com/erp/devel/pi/rev/ca313a1ecdf8 changeset: 16802:ca313a1ecdf8 user: Naiara Martinez <naiara.martinez <at> openbravo.com> date: Thu May 31 17:10:45 2012 +0200 summary: fixed bug 20647 Remove duplicated constraint
details: https://code.openbravo.com/erp/devel/pi/rev/0f8fd9baa16e changeset: 16803:0f8fd9baa16e user: Naiara Martinez <naiara.martinez <at> openbravo.com> date: Fri Jun 01 14:53:40 2012 +0200 summary: fixed bug 20589 JS and Java error trying to convert string in number details: https://code.openbravo.com/erp/devel/pi/rev/299e47c77f04 changeset: 16804:299e47c77f04 user: Sandra Huguet <sandra.huguet <at> openbravo.com> date: Fri Jun 01 10:43:35 2012 +0200 summary: Fixed bug 19819 Add logic to catch division by 0 in Add details Add logic to catch division by 0 when change actual converted in Add Details in Payment In window. details: https://code.openbravo.com/erp/devel/pi/rev/a6672f4c6903 changeset: 16805:a6672f4c6903 user: Mikel Irurita <mikel.irurita <at> openbravo.com> date: Tue Jun 12 10:18:59 2012 +0200 summary: Related to issue 19819: code review, use js compare method diffstat: modules/org.openbravo.advpaymentmngt/web/org.openbravo.advpaymentmngt/FIN_Utilities.js | 4 +++- modules/org.openbravo.client.application/web/org.openbravo.client.application/js/return-material/ob-return-material.js | 5 ++++- modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/NumberUIDefinition.java | 7 ++++++- src-db/database/model/tables/FIN_PAYMENT_RUN_PARA.xml | 1 - 4 files changed, 13 insertions(+), 4 deletions(-) diffs (61 lines): diff -r 8b8886e76823 -r a6672f4c6903 modules/org.openbravo.advpaymentmngt/web/org.openbravo.advpaymentmngt/FIN_Utilities.js --- a/modules/org.openbravo.advpaymentmngt/web/org.openbravo.advpaymentmngt/FIN_Utilities.js Mon Jun 11 20:52:58 2012 +0200 +++ b/modules/org.openbravo.advpaymentmngt/web/org.openbravo.advpaymentmngt/FIN_Utilities.js Tue Jun 12 10:18:59 2012 +0200 @@ -283,7 +283,9 @@ if (actualConverted && expectedConverted && exchangeRate) { if (recalcExchangeRate) { if (actualConverted.value && actualPayment.value) { - exchangeRate.value = formattedNumberOpTemp(actualConverted.value, '/', actualPayment.value, roundedMask, globalDecSeparator, globalGroupSeparator, globalGroupInterval); + if (compare(actualPayment.value, '!=', 0)) { + exchangeRate.value = formattedNumberOpTemp(actualConverted.value, '/', actualPayment.value, roundedMask, globalDecSeparator, globalGroupSeparator, globalGroupInterval); + } } else { exchangeRate.value = ''; } diff -r 8b8886e76823 -r a6672f4c6903 modules/org.openbravo.client.application/web/org.openbravo.client.application/js/return-material/ob-return-material.js --- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/return-material/ob-return-material.js Mon Jun 11 20:52:58 2012 +0200 +++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/return-material/ob-return-material.js Tue Jun 12 10:18:59 2012 +0200 @@ -23,6 +23,9 @@ * Check that entered return quantity is less than original inout qty. */ OB.RM.RMOrderQtyValidate = function (item, validator, value, record) { + if (!isc.isA.Number(value)){ + return false; + } // Check if record has related shipment to skip check. if (record.goodsShipmentLine === null || record.goodsShipmentLine === '') { return value !== null && value > 0; @@ -137,4 +140,4 @@ record.movementQuantity = availableQty.toString(); } } -}; \ No newline at end of file +}; diff -r 8b8886e76823 -r a6672f4c6903 modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/NumberUIDefinition.java --- a/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/NumberUIDefinition.java Mon Jun 11 20:52:58 2012 +0200 +++ b/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/NumberUIDefinition.java Tue Jun 12 10:18:59 2012 +0200 @@ -162,7 +162,12 @@ valueStr = valueStr.replace( variables.getSessionValue("#GroupSeparator|" + getFormat()).substring(0, 1), "").replace( variables.getSessionValue("#DecimalSeparator|" + getFormat()).substring(0, 1), "."); - return new BigDecimal(valueStr); + try { + return new BigDecimal(valueStr); + } catch (Exception e) { + return null; + } + } @Override diff -r 8b8886e76823 -r a6672f4c6903 src-db/database/model/tables/FIN_PAYMENT_RUN_PARA.xml --- a/src-db/database/model/tables/FIN_PAYMENT_RUN_PARA.xml Mon Jun 11 20:52:58 2012 +0200 +++ b/src-db/database/model/tables/FIN_PAYMENT_RUN_PARA.xml Tue Jun 12 10:18:59 2012 +0200 @@ -62,6 +62,5 @@ <reference local="FIN_PAY_EXEC_PROCESS_PARA_ID" foreign="FIN_PAY_EXEC_PROCESS_PARA_ID"/> </foreign-key> <check name="FIN_PAYMENTRUNPARA_ACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check> - <check name="FIN_PAYMENTRUNPARA_VALCHK_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check> </table> </database> ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Openbravo-commits mailing list Openbravo-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbravo-commits