details:   https://code.openbravo.com/erp/devel/pi/rev/67db68052e38
changeset: 25091:67db68052e38
user:      Sandra Huguet <sandra.huguet <at> openbravo.com>
date:      Fri Oct 24 09:05:56 2014 +0200
summary:   Related to issue 27913

fix convertDateToUTC method and match statement force name process

details:   https://code.openbravo.com/erp/devel/pi/rev/b6a6eab1a584
changeset: 25092:b6a6eab1a584
user:      Sandra Huguet <sandra.huguet <at> openbravo.com>
date:      Fri Oct 24 09:07:03 2014 +0200
summary:   Fixed bug 27972 Landed cost field should be readonly in landed cost 
tab

details:   https://code.openbravo.com/erp/devel/pi/rev/204a51e9e87c
changeset: 25093:204a51e9e87c
user:      Sandra Huguet <sandra.huguet <at> openbravo.com>
date:      Fri Oct 24 09:39:25 2014 +0200
summary:   Fixed bug 27971 Process matching should not be shown in Goods 
Receipt window

details:   https://code.openbravo.com/erp/devel/pi/rev/ec9704fba4ee
changeset: 25094:ec9704fba4ee
user:      Sandra Huguet <sandra.huguet <at> openbravo.com>
date:      Fri Oct 24 09:57:22 2014 +0200
summary:   Fixed bug 27950 Unit Cost of the Inventory Amount Update window is 
not calculated

Currency is not mandatory in organization, if currency in organization is null
the reference currency should be client currency.

diffstat:

 modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_ELEMENT.xml 
|  4 ++--
 modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_FIELD.xml   
|  2 +-
 src-db/database/sourcedata/AD_FIELD.xml                                        
|  4 ++--
 src/org/openbravo/erpCommon/ad_callouts/SL_InvAmtUpd_AmtUnitCost.java          
|  7 +++++--
 src/org/openbravo/erpCommon/utility/OBDateUtils.java                           
|  4 ++--
 5 files changed, 12 insertions(+), 9 deletions(-)

diffs (93 lines):

diff -r e6566a390dba -r ec9704fba4ee 
modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_ELEMENT.xml
--- 
a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_ELEMENT.xml
    Fri Oct 24 09:56:21 2014 +0200
+++ 
b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_ELEMENT.xml
    Fri Oct 24 09:57:22 2014 +0200
@@ -1528,8 +1528,8 @@
 <!--F79620AE1CC041308045C23E661BD907-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--F79620AE1CC041308045C23E661BD907-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--F79620AE1CC041308045C23E661BD907-->  
<COLUMNNAME><![CDATA[EM_APRM_MatchTrans_Force]]></COLUMNNAME>
-<!--F79620AE1CC041308045C23E661BD907-->  
<NAME><![CDATA[EM_APRM_MatchTransactions_Force]]></NAME>
-<!--F79620AE1CC041308045C23E661BD907-->  
<PRINTNAME><![CDATA[EM_APRM_MatchTransactions_Force]]></PRINTNAME>
+<!--F79620AE1CC041308045C23E661BD907-->  <NAME><![CDATA[Match Transactions 
Force]]></NAME>
+<!--F79620AE1CC041308045C23E661BD907-->  <PRINTNAME><![CDATA[Match 
Transactions Force]]></PRINTNAME>
 <!--F79620AE1CC041308045C23E661BD907-->  
<AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--F79620AE1CC041308045C23E661BD907-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
 <!--F79620AE1CC041308045C23E661BD907--></AD_ELEMENT>
diff -r e6566a390dba -r ec9704fba4ee 
modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_FIELD.xml
--- 
a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_FIELD.xml  
    Fri Oct 24 09:56:21 2014 +0200
+++ 
b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_FIELD.xml  
    Fri Oct 24 09:57:22 2014 +0200
@@ -17032,7 +17032,7 @@
 <!--B7C06E2CD9EC460FBA493804E274ACC7-->  
<AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
 <!--B7C06E2CD9EC460FBA493804E274ACC7-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--B7C06E2CD9EC460FBA493804E274ACC7-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--B7C06E2CD9EC460FBA493804E274ACC7-->  
<NAME><![CDATA[EM_APRM_MatchTransactions_Force]]></NAME>
+<!--B7C06E2CD9EC460FBA493804E274ACC7-->  <NAME><![CDATA[Match Transactions 
Force]]></NAME>
 <!--B7C06E2CD9EC460FBA493804E274ACC7-->  
<ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
 <!--B7C06E2CD9EC460FBA493804E274ACC7-->  
<AD_TAB_ID><![CDATA[2845D761A8394468BD3BA4710AA888D4]]></AD_TAB_ID>
 <!--B7C06E2CD9EC460FBA493804E274ACC7-->  
<AD_COLUMN_ID><![CDATA[9DC8500B414640E09BF61A3D14FE13D1]]></AD_COLUMN_ID>
diff -r e6566a390dba -r ec9704fba4ee src-db/database/sourcedata/AD_FIELD.xml
--- a/src-db/database/sourcedata/AD_FIELD.xml   Fri Oct 24 09:56:21 2014 +0200
+++ b/src-db/database/sourcedata/AD_FIELD.xml   Fri Oct 24 09:57:22 2014 +0200
@@ -176305,7 +176305,7 @@
 <!--00568254CC048733E050007F01000513-->  
<IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
 <!--00568254CC048733E050007F01000513-->  
<ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
 <!--00568254CC048733E050007F01000513-->  
<DISPLAYLENGTH><![CDATA[32]]></DISPLAYLENGTH>
-<!--00568254CC048733E050007F01000513-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--00568254CC048733E050007F01000513-->  <ISREADONLY><![CDATA[Y]]></ISREADONLY>
 <!--00568254CC048733E050007F01000513-->  <SEQNO><![CDATA[80]]></SEQNO>
 <!--00568254CC048733E050007F01000513-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--00568254CC048733E050007F01000513-->  
<ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
@@ -178524,7 +178524,7 @@
 <!--023AA8E75FDB4274E050007F01005DB0-->  
<AD_TAB_ID><![CDATA[0F76B56EB2874C729ABE1665D5853E9D]]></AD_TAB_ID>
 <!--023AA8E75FDB4274E050007F01005DB0-->  
<AD_COLUMN_ID><![CDATA[022DB885E9665700E050007F01000846]]></AD_COLUMN_ID>
 <!--023AA8E75FDB4274E050007F01005DB0-->  
<IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
-<!--023AA8E75FDB4274E050007F01005DB0-->  
<ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--023AA8E75FDB4274E050007F01005DB0-->  
<ISDISPLAYED><![CDATA[N]]></ISDISPLAYED>
 <!--023AA8E75FDB4274E050007F01005DB0-->  
<DISPLAYLOGIC><![CDATA[@IsMatched@='N']]></DISPLAYLOGIC>
 <!--023AA8E75FDB4274E050007F01005DB0-->  
<DISPLAYLENGTH><![CDATA[1]]></DISPLAYLENGTH>
 <!--023AA8E75FDB4274E050007F01005DB0-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
diff -r e6566a390dba -r ec9704fba4ee 
src/org/openbravo/erpCommon/ad_callouts/SL_InvAmtUpd_AmtUnitCost.java
--- a/src/org/openbravo/erpCommon/ad_callouts/SL_InvAmtUpd_AmtUnitCost.java     
Fri Oct 24 09:56:21 2014 +0200
+++ b/src/org/openbravo/erpCommon/ad_callouts/SL_InvAmtUpd_AmtUnitCost.java     
Fri Oct 24 09:57:22 2014 +0200
@@ -23,6 +23,7 @@
 import javax.servlet.ServletException;
 
 import org.openbravo.dal.service.OBDal;
+import org.openbravo.model.common.currency.Currency;
 import org.openbravo.model.common.enterprise.Organization;
 
 public class SL_InvAmtUpd_AmtUnitCost extends SimpleCallout {
@@ -34,13 +35,15 @@
     BigDecimal onHandQty = info.getBigDecimalParameter("inponhandqty");
     String orgId = info.getStringParameter("inpadOrgId", null);
     Organization organization = OBDal.getInstance().get(Organization.class, 
orgId);
+    Currency currency = organization.getCurrency() != null ? 
organization.getCurrency()
+        : organization.getClient().getCurrency();
 
     if (info.getLastFieldChanged().equalsIgnoreCase("inpinventoryAmount")) {
       BigDecimal invAmount = info.getBigDecimalParameter("inpinventoryAmount");
       info.addResult(
           "inpunitcost",
-          onHandQty.intValue() == 0 ? BigDecimal.ZERO : 
invAmount.divide(onHandQty, organization
-              .getCurrency().getPricePrecision().intValue(), 
BigDecimal.ROUND_HALF_UP));
+          onHandQty.intValue() == 0 ? BigDecimal.ZERO : 
invAmount.divide(onHandQty, currency
+              .getPricePrecision().intValue(), BigDecimal.ROUND_HALF_UP));
     } else if (info.getLastFieldChanged().equalsIgnoreCase("inpunitcost")) {
       BigDecimal unitCost = info.getBigDecimalParameter("inpunitcost");
       info.addResult("inpinventoryAmount", unitCost.multiply(onHandQty));
diff -r e6566a390dba -r ec9704fba4ee 
src/org/openbravo/erpCommon/utility/OBDateUtils.java
--- a/src/org/openbravo/erpCommon/utility/OBDateUtils.java      Fri Oct 24 
09:56:21 2014 +0200
+++ b/src/org/openbravo/erpCommon/utility/OBDateUtils.java      Fri Oct 24 
09:57:22 2014 +0200
@@ -244,11 +244,11 @@
    * 
    */
   public static Date convertDateToUTC(Date date) {
-    Calendar now = Calendar.getInstance();
     Calendar calendar = Calendar.getInstance();
     calendar.setTime(date);
 
-    int gmtMillisecondOffset = (now.get(Calendar.ZONE_OFFSET) + 
now.get(Calendar.DST_OFFSET));
+    int gmtMillisecondOffset = (calendar.get(Calendar.ZONE_OFFSET) + calendar
+        .get(Calendar.DST_OFFSET));
     calendar.add(Calendar.MILLISECOND, -gmtMillisecondOffset);
 
     return calendar.getTime();

------------------------------------------------------------------------------
_______________________________________________
Openbravo-commits mailing list
Openbravo-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to