details:   https://code.openbravo.com/erp/devel/pi/rev/a1f81dbe808b
changeset: 17389:a1f81dbe808b
user:      Gorka Ion Damián <gorkaion.damian <at> openbravo.com>
date:      Fri Jun 29 13:16:01 2012 +0200
summary:   Fix issue in callouts when using comma as decimal separator.

details:   https://code.openbravo.com/erp/devel/pi/rev/13c71c0e0216
changeset: 17390:13c71c0e0216
user:      Gorka Ion Damián <gorkaion.damian <at> openbravo.com>
date:      Fri Jun 29 13:27:10 2012 +0200
summary:   Fixed issue 20899.Prices do not need to be negate.QtyReturned is 
negative.

diffstat:

 src-db/database/sourcedata/AD_FIELD.xml                       |   2 -
 src/org/openbravo/common/actionhandler/SRMOPickEditLines.java |   4 +-
 src/org/openbravo/erpCommon/ad_callouts/SL_Invoice_Amt.java   |  18 +++++-----
 src/org/openbravo/erpCommon/ad_callouts/SL_Order_Amt.java     |  18 +++++-----
 4 files changed, 20 insertions(+), 22 deletions(-)

diffs (103 lines):

diff -r 651b169b8720 -r 13c71c0e0216 src-db/database/sourcedata/AD_FIELD.xml
--- a/src-db/database/sourcedata/AD_FIELD.xml   Fri Jun 29 13:00:59 2012 +0200
+++ b/src-db/database/sourcedata/AD_FIELD.xml   Fri Jun 29 13:27:10 2012 +0200
@@ -229854,7 +229854,6 @@
 <!--C3851545D3EC83AAE040007F01000897-->  
<STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
 <!--C3851545D3EC83AAE040007F01000897-->  
<STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
 <!--C3851545D3EC83AAE040007F01000897-->  
<ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
-<!--C3851545D3EC83AAE040007F01000897-->  
<CLIENTCLASS><![CDATA[OBTruncAddMinusDisplay]]></CLIENTCLASS>
 <!--C3851545D3EC83AAE040007F01000897-->  
<EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
 <!--C3851545D3EC83AAE040007F01000897--></AD_FIELD>
 
@@ -229916,7 +229915,6 @@
 <!--C3852055B7B2C1D2E040007F010008D8-->  
<STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
 <!--C3852055B7B2C1D2E040007F010008D8-->  
<STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
 <!--C3852055B7B2C1D2E040007F010008D8-->  
<ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
-<!--C3852055B7B2C1D2E040007F010008D8-->  
<CLIENTCLASS><![CDATA[OBTruncAddMinusDisplay]]></CLIENTCLASS>
 <!--C3852055B7B2C1D2E040007F010008D8-->  
<EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
 <!--C3852055B7B2C1D2E040007F010008D8--></AD_FIELD>
 
diff -r 651b169b8720 -r 13c71c0e0216 
src/org/openbravo/common/actionhandler/SRMOPickEditLines.java
--- a/src/org/openbravo/common/actionhandler/SRMOPickEditLines.java     Fri Jun 
29 13:00:59 2012 +0200
+++ b/src/org/openbravo/common/actionhandler/SRMOPickEditLines.java     Fri Jun 
29 13:27:10 2012 +0200
@@ -151,8 +151,8 @@
       newOrderLine.setAttributeSetValue(asi);
       newOrderLine.setUOM(uom);
       // Ordered Quantity = returned quantity.
-      BigDecimal qtyReturned = new 
BigDecimal(selectedLine.getString("returned"));
-      newOrderLine.setOrderedQuantity(qtyReturned.negate());
+      BigDecimal qtyReturned = new 
BigDecimal(selectedLine.getString("returned")).negate();
+      newOrderLine.setOrderedQuantity(qtyReturned);
 
       TaxRate tax = null;
       if (shipmentLine != null && shipmentLine.getSalesOrderLine() != null) {
diff -r 651b169b8720 -r 13c71c0e0216 
src/org/openbravo/erpCommon/ad_callouts/SL_Invoice_Amt.java
--- a/src/org/openbravo/erpCommon/ad_callouts/SL_Invoice_Amt.java       Fri Jun 
29 13:00:59 2012 +0200
+++ b/src/org/openbravo/erpCommon/ad_callouts/SL_Invoice_Amt.java       Fri Jun 
29 13:27:10 2012 +0200
@@ -181,10 +181,10 @@
       priceActual = netUnitPrice;
       priceStd = netUnitPrice;
 
-      resultado.append("new Array(\"inppriceactual\",\"" + netUnitPrice + 
"\"),");
-      resultado.append("new Array(\"inppricelist\", \"" + netUnitPrice + 
"\"),");
-      resultado.append("new Array(\"inppricelimit\", \"" + netUnitPrice + 
"\"),");
-      resultado.append("new Array(\"inppricestd\", \"" + netUnitPrice + 
"\"),");
+      resultado.append("new Array(\"inppriceactual\"," + 
netUnitPrice.toString() + "),");
+      resultado.append("new Array(\"inppricelist\", " + 
netUnitPrice.toString() + "),");
+      resultado.append("new Array(\"inppricelimit\", " + 
netUnitPrice.toString() + "),");
+      resultado.append("new Array(\"inppricestd\", " + netUnitPrice.toString() 
+ "\"),");
     }
     // if taxinclusive field is changed then modify net unit price and gross 
price
     if (strChanged.equals("inpgrossUnitPrice")) {
@@ -195,11 +195,11 @@
       priceActual = netUnitPrice;
       priceStd = netUnitPrice;
 
-      resultado.append("new Array(\"inplineGrossAmount\",\"" + grossAmount + 
"\"),");
-      resultado.append("new Array(\"inppriceactual\",\"" + netUnitPrice + 
"\"),");
-      resultado.append("new Array(\"inppricelist\",\"" + netUnitPrice + 
"\"),");
-      resultado.append("new Array(\"inppricelimit\", \"" + netUnitPrice + 
"\"),");
-      resultado.append("new Array(\"inppricestd\",\"" + netUnitPrice + "\"),");
+      resultado.append("new Array(\"inplineGrossAmount\"," + 
grossAmount.toString() + "),");
+      resultado.append("new Array(\"inppriceactual\"," + 
netUnitPrice.toString() + "),");
+      resultado.append("new Array(\"inppricelist\"," + netUnitPrice.toString() 
+ "),");
+      resultado.append("new Array(\"inppricelimit\", " + 
netUnitPrice.toString() + "),");
+      resultado.append("new Array(\"inppricestd\"," + netUnitPrice.toString() 
+ "),");
     }
     if (!strChanged.equals("inplinenetamt"))
       // Net amount of a line equals quantity x unit price (actual price)
diff -r 651b169b8720 -r 13c71c0e0216 
src/org/openbravo/erpCommon/ad_callouts/SL_Order_Amt.java
--- a/src/org/openbravo/erpCommon/ad_callouts/SL_Order_Amt.java Fri Jun 29 
13:00:59 2012 +0200
+++ b/src/org/openbravo/erpCommon/ad_callouts/SL_Order_Amt.java Fri Jun 29 
13:27:10 2012 +0200
@@ -330,10 +330,10 @@
           PricePrecision, taxBaseAmt, qtyOrdered);
       priceActual = netUnitPrice;
       priceStd = netUnitPrice;
-      resultado.append("new Array(\"inppriceactual\",\"" + netUnitPrice + 
"\"),");
-      resultado.append("new Array(\"inppricelist\", \"" + netUnitPrice + 
"\"),");
-      resultado.append("new Array(\"inppricelimit\", \"" + netUnitPrice + 
"\"),");
-      resultado.append("new Array(\"inppricestd\", \"" + netUnitPrice + 
"\"),");
+      resultado.append("new Array(\"inppriceactual\"," + 
netUnitPrice.toString() + "),");
+      resultado.append("new Array(\"inppricelist\", " + 
netUnitPrice.toString() + "),");
+      resultado.append("new Array(\"inppricelimit\", " + 
netUnitPrice.toString() + "),");
+      resultado.append("new Array(\"inppricestd\", " + netUnitPrice.toString() 
+ "),");
     }
 
     // if taxinclusive field is changed then modify net unit price and gross 
price
@@ -348,11 +348,11 @@
       priceActual = netUnitPrice;
       priceStd = netUnitPrice;
 
-      resultado.append("new Array(\"inplineGrossAmount\",\"" + grossAmount + 
"\"),");
-      resultado.append("new Array(\"inppriceactual\",\"" + netUnitPrice + 
"\"),");
-      resultado.append("new Array(\"inppricelist\",\"" + netUnitPrice + 
"\"),");
-      resultado.append("new Array(\"inppricelimit\", \"" + netUnitPrice + 
"\"),");
-      resultado.append("new Array(\"inppricestd\",\"" + netUnitPrice + "\"),");
+      resultado.append("new Array(\"inplineGrossAmount\"," + 
grossAmount.toString() + "),");
+      resultado.append("new Array(\"inppriceactual\"," + 
netUnitPrice.toString() + "),");
+      resultado.append("new Array(\"inppricelist\"," + netUnitPrice.toString() 
+ "),");
+      resultado.append("new Array(\"inppricelimit\", " + 
netUnitPrice.toString() + "),");
+      resultado.append("new Array(\"inppricestd\"," + netUnitPrice.toString() 
+ "),");
     }
 
     // if net unit price changed then modify tax inclusive unit price

------------------------------------------------------------------------------
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

Reply via email to