details:   https://code.openbravo.com/erp/devel/pi/rev/dfeda939b698
changeset: 19661:dfeda939b698
user:      Ioritz Cia <ioritz.cia <at> openbravo.com>
date:      Tue Feb 12 10:30:50 2013 +0100
summary:   Fixes issue 22294: Changing 'Payment date' should not launch 
'paymentDateOnChange'
function when not working with multicurrency.

diffstat:

 
modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddPaymentFromInvoice.html
 |  14 ++++++---
 1 files changed, 9 insertions(+), 5 deletions(-)

diffs (31 lines):

diff -r 45fb52770d50 -r dfeda939b698 
modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddPaymentFromInvoice.html
--- 
a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddPaymentFromInvoice.html
  Tue Feb 12 16:18:40 2013 +0100
+++ 
b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddPaymentFromInvoice.html
  Tue Feb 12 10:30:50 2013 +0100
@@ -235,8 +235,10 @@
 }
 
 function validateDate(element){
-  if(isValidDate(element.value, element.getAttribute("displayformat")))
-    loadGridList();
+  if (isMulticurrencyTxn()) {
+    if(isValidDate(element.value, element.getAttribute("displayformat")))
+      loadGridList();
+  }
 }
 
 function paymentAmountOnChange(element){
@@ -246,9 +248,11 @@
 
 function paymentDateOnChange(){
   try {
-    var url = 
"../org.openbravo.advpaymentmngt.ad_actionbutton/AddPaymentFromInvoice.html";
-    var paramXMLReq = null;
-    return submitXmlHttpRequest(callBackExchangeRate, document.frmMain, 
"EXCHANGERATE", url, false, null, paramXMLReq);
+       if (isMulticurrencyTxn()) {
+         var url = 
"../org.openbravo.advpaymentmngt.ad_actionbutton/AddPaymentFromInvoice.html";
+         var paramXMLReq = null;
+         return submitXmlHttpRequest(callBackExchangeRate, document.frmMain, 
"EXCHANGERATE", url, false, null, paramXMLReq);
+       }
   } catch (e) {
     alert(e);
   }

------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to