|
Author: erwan
Date: Tue Jun 19 20:24:36 2012 New Revision: 1351838 URL: http://svn.apache.org/viewvc?rev=1351838&view=rev Log: merging from 1307082 to 1307606 Added: ofbiz/branches/20120329_portletWidget/framework/webapp/src/org/ofbiz/webapp/ftl/SetContextFieldTransform.java - copied unchanged from r1307606, ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/ftl/SetContextFieldTransform.java Modified: ofbiz/branches/20120329_portletWidget/ (props changed) ofbiz/branches/20120329_portletWidget/applications/order/script/org/ofbiz/order/customer/CheckoutMapProcs.xml (props changed) ofbiz/branches/20120329_portletWidget/applications/order/servicedef/services.xml ofbiz/branches/20120329_portletWidget/applications/order/src/org/ofbiz/order/order/OrderLookupServices.java ofbiz/branches/20120329_portletWidget/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java ofbiz/branches/20120329_portletWidget/applications/order/webapp/ordermgr/WEB-INF/actions/order/FindOrders.groovy ofbiz/branches/20120329_portletWidget/applications/order/webapp/ordermgr/order/companyHeader.fo.ftl ofbiz/branches/20120329_portletWidget/applications/order/webapp/ordermgr/order/findOrders.ftl ofbiz/branches/20120329_portletWidget/applications/order/webapp/ordermgr/order/ordercontactinfo.ftl ofbiz/branches/20120329_portletWidget/applications/order/webapp/ordermgr/quote/quoteReportContactMechs.fo.ftl ofbiz/branches/20120329_portletWidget/applications/party/webapp/partymgr/WEB-INF/actions/party/GetPostalAddressTemplate.groovy ofbiz/branches/20120329_portletWidget/applications/party/webapp/partymgr/WEB-INF/actions/party/PartyFinancialHistory.groovy (props changed) ofbiz/branches/20120329_portletWidget/applications/party/webapp/partymgr/party/profileblocks/Contact.ftl ofbiz/branches/20120329_portletWidget/applications/product/script/org/ofbiz/product/test/InventoryTests.xml (props changed) ofbiz/branches/20120329_portletWidget/applications/workeffort/widget/CalendarForms.xml ofbiz/branches/20120329_portletWidget/framework/base/src/org/ofbiz/base/util/ObjectType.java ofbiz/branches/20120329_portletWidget/framework/base/src/org/ofbiz/base/util/test/ObjectTypeTests.java ofbiz/branches/20120329_portletWidget/framework/common/config/general.properties ofbiz/branches/20120329_portletWidget/framework/common/widget/HelpScreens.xml (props changed) ofbiz/branches/20120329_portletWidget/framework/security/data/PasswordSecurityData.xml (props changed) ofbiz/branches/20120329_portletWidget/framework/webapp/config/freemarkerTransforms.properties ofbiz/branches/20120329_portletWidget/framework/webapp/src/org/ofbiz/webapp/ftl/OfbizCurrencyTransform.java ofbiz/branches/20120329_portletWidget/specialpurpose/ebaystore/lib/ (props changed) ofbiz/branches/20120329_portletWidget/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/Facilities.groovy (props changed) ofbiz/branches/20120329_portletWidget/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/ProductList.groovy (props changed) ofbiz/branches/20120329_portletWidget/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/ProductStockTake.groovy (props changed) ofbiz/branches/20120329_portletWidget/specialpurpose/projectmgr/widget/ProjectScreens.xml ofbiz/branches/20120329_portletWidget/tools/mergefromtrunk.bat (props changed) ofbiz/branches/20120329_portletWidget/tools/mergefromtrunk.sh (props changed) Propchange: ofbiz/branches/20120329_portletWidget/ ------------------------------------------------------------------------------ Merged /ofbiz/trunk:r1307083-1307606 Propchange: ofbiz/branches/20120329_portletWidget/applications/order/script/org/ofbiz/order/customer/CheckoutMapProcs.xml ------------------------------------------------------------------------------ Merged /ofbiz/trunk/applications/order/script/org/ofbiz/order/customer/CheckoutMapProcs.xml:r1307083-1307606 Modified: ofbiz/branches/20120329_portletWidget/applications/order/servicedef/services.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/order/servicedef/services.xml?rev=1351838&r1=1351837&r2=1351838&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/applications/order/servicedef/services.xml (original) +++ ofbiz/branches/20120329_portletWidget/applications/order/servicedef/services.xml Tue Jun 19 20:24:36 2012 @@ -829,6 +829,7 @@ under the License. <attribute name="finAccountId" type="String" mode="IN" optional="true"/> <attribute name="cardNumber" type="String" mode="IN" optional="true"/> <attribute name="accountNumber" type="String" mode="IN" optional="true"/> + <attribute name="paymentStatusId" type="String" mode="IN" optional="true"/> <!-- shipment/inventory fields --> <attribute name="inventoryItemId" type="String" mode="IN" optional="true"/> Modified: ofbiz/branches/20120329_portletWidget/applications/order/src/org/ofbiz/order/order/OrderLookupServices.java URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/order/src/org/ofbiz/order/order/OrderLookupServices.java?rev=1351838&r1=1351837&r2=1351838&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/applications/order/src/org/ofbiz/order/order/OrderLookupServices.java (original) +++ ofbiz/branches/20120329_portletWidget/applications/order/src/org/ofbiz/order/order/OrderLookupServices.java Tue Jun 19 20:24:36 2012 @@ -411,11 +411,17 @@ public class OrderLookupServices { String finAccountId = (String) context.get("finAccountId"); String cardNumber = (String) context.get("cardNumber"); String accountNumber = (String) context.get("accountNumber"); + String paymentStatusId = (String) context.get("paymentStatusId"); - if (finAccountId != null || cardNumber != null || accountNumber != null) { + if (UtilValidate.isNotEmpty(paymentStatusId)) { + paramList.add("paymentStatusId=" + paymentStatusId); + conditions.add(makeExpr("paymentStatusId", paymentStatusId)); + } + if (finAccountId != null || cardNumber != null || accountNumber != null || paymentStatusId != null) { dve.addMemberEntity("OP", "OrderPaymentPreference"); dve.addAlias("OP", "finAccountId"); dve.addAlias("OP", "paymentMethodId"); + dve.addAlias("OP", "paymentStatusId", "statusId", null, false, false, null); dve.addViewLink("OH", "OP", Boolean.FALSE, UtilMisc.toList(new ModelKeyMap("orderId", "orderId"))); } Modified: ofbiz/branches/20120329_portletWidget/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java?rev=1351838&r1=1351837&r2=1351838&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java (original) +++ ofbiz/branches/20120329_portletWidget/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java Tue Jun 19 20:24:36 2012 @@ -2593,7 +2593,7 @@ public class OrderReadHelper { List<GenericValue> newOrderAdjustmentsList = FastList.newInstance(); if (UtilValidate.isNotEmpty(adjustments)) { - for(GenericValue orderAdjustment : newOrderAdjustmentsList) { + for(GenericValue orderAdjustment : adjustments) { boolean includeAdjustment = false; if ("SALES_TAX".equals(orderAdjustment.getString("orderAdjustmentTypeId")) || Modified: ofbiz/branches/20120329_portletWidget/applications/order/webapp/ordermgr/WEB-INF/actions/order/FindOrders.groovy URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/order/webapp/ordermgr/WEB-INF/actions/order/FindOrders.groovy?rev=1351838&r1=1351837&r2=1351838&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/applications/order/webapp/ordermgr/WEB-INF/actions/order/FindOrders.groovy (original) +++ ofbiz/branches/20120329_portletWidget/applications/order/webapp/ordermgr/WEB-INF/actions/order/FindOrders.groovy Tue Jun 19 20:24:36 2012 @@ -53,7 +53,7 @@ carrierShipmentMethods = delegator.findL context.carrierShipmentMethods = carrierShipmentMethods; // get the Payment Status -paymentStatusList = delegator.findByAnd("StatusItem", [statusTypeId : "PAYMENT_PREF_STATUS"], ["description"], false); +paymentStatusList = delegator.findByAnd("StatusItem", [statusTypeId : "PAYMENT_PREF_STATUS"], ["description"]); context.paymentStatusList = paymentStatusList; // current role type Modified: ofbiz/branches/20120329_portletWidget/applications/order/webapp/ordermgr/order/companyHeader.fo.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/order/webapp/ordermgr/order/companyHeader.fo.ftl?rev=1351838&r1=1351837&r2=1351838&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/applications/order/webapp/ordermgr/order/companyHeader.fo.ftl (original) +++ ofbiz/branches/20120329_portletWidget/applications/order/webapp/ordermgr/order/companyHeader.fo.ftl Tue Jun 19 20:24:36 2012 @@ -26,7 +26,7 @@ under the License. <fo:block>${companyName}</fo:block> <#if postalAddress?exists> <#if postalAddress?has_content> - ${setRequestAttribute("postalAddress", postalAddress)} + ${setContextField("postalAddress", postalAddress)} ${screens.render("component://party/widget/partymgr/PartyScreens.xml#postalAddressPdfFormatter")} </#if> <#else> Modified: ofbiz/branches/20120329_portletWidget/applications/order/webapp/ordermgr/order/findOrders.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/order/webapp/ordermgr/order/findOrders.ftl?rev=1351838&r1=1351837&r2=1351838&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/applications/order/webapp/ordermgr/order/findOrders.ftl (original) +++ ofbiz/branches/20120329_portletWidget/applications/order/webapp/ordermgr/order/findOrders.ftl Tue Jun 19 20:24:36 2012 @@ -458,6 +458,18 @@ function toggleOrderIdList() { </select> </td> </tr> + <tr> + <td width='25%' align='right' class='label'>${uiLabelMap.AccountingPaymentStatus}</td> + <td width="5%"> </td> + <td> + <select name="paymentStatusId"> + <option value="">${uiLabelMap.CommonAll}</option> + <#list paymentStatusList as paymentStatus> + <option value="${paymentStatus.statusId}">${paymentStatus.get("description", locale)}</option> + </#list> + </select> + </td> + </tr> <tr><td colspan="3"><hr /></td></tr> <tr> <td width='25%' align='right'> </td> Modified: ofbiz/branches/20120329_portletWidget/applications/order/webapp/ordermgr/order/ordercontactinfo.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/order/webapp/ordermgr/order/ordercontactinfo.ftl?rev=1351838&r1=1351837&r2=1351838&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/applications/order/webapp/ordermgr/order/ordercontactinfo.ftl (original) +++ ofbiz/branches/20120329_portletWidget/applications/order/webapp/ordermgr/order/ordercontactinfo.ftl Tue Jun 19 20:24:36 2012 @@ -117,7 +117,7 @@ under the License. <#assign postalAddress = orderContactMechValueMap.postalAddress> <#if postalAddress?has_content> <div> - ${setRequestAttribute("postalAddress", postalAddress)} + ${setContextField("postalAddress", postalAddress)} ${screens.render("component://party/widget/partymgr/PartyScreens.xml#postalAddressHtmlFormatter")} </div> <@updateOrderContactMech orderHeader=orderHeader?if_exists contactMechTypeId=contactMech.contactMechTypeId contactMechList=postalContactMechList?if_exists contactMechPurposeTypeId=contactMechPurpose.contactMechPurposeTypeId?if_exists contactMechAddress=postalAddress?if_exists /> Modified: ofbiz/branches/20120329_portletWidget/applications/order/webapp/ordermgr/quote/quoteReportContactMechs.fo.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/order/webapp/ordermgr/quote/quoteReportContactMechs.fo.ftl?rev=1351838&r1=1351837&r2=1351838&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/applications/order/webapp/ordermgr/quote/quoteReportContactMechs.fo.ftl (original) +++ ofbiz/branches/20120329_portletWidget/applications/order/webapp/ordermgr/quote/quoteReportContactMechs.fo.ftl Tue Jun 19 20:24:36 2012 @@ -39,8 +39,8 @@ under the License. <fo:table-cell> <fo:block> <#if toPostalAddress?exists> - ${setRequestAttribute("postalAddress", toPostalAddress)} - ${screens.render("component://party/widget/partymgr/PartyScreens.xml#postalAddressPdfFormatter")} + ${setContextField("postalAddress", toPostalAddress)} + ${screens.render("component://party/widget/partymgr/PartyScreens.xml#postalAddressPdfFormatter")} </#if> </fo:block> </fo:table-cell> Modified: ofbiz/branches/20120329_portletWidget/applications/party/webapp/partymgr/WEB-INF/actions/party/GetPostalAddressTemplate.groovy URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/party/webapp/partymgr/WEB-INF/actions/party/GetPostalAddressTemplate.groovy?rev=1351838&r1=1351837&r2=1351838&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/applications/party/webapp/partymgr/WEB-INF/actions/party/GetPostalAddressTemplate.groovy (original) +++ ofbiz/branches/20120329_portletWidget/applications/party/webapp/partymgr/WEB-INF/actions/party/GetPostalAddressTemplate.groovy Tue Jun 19 20:24:36 2012 @@ -17,7 +17,7 @@ * under the License. */ -postalAddressForTemplate = request.getAttribute("postalAddress"); +postalAddressForTemplate = context.postalAddress; postalAddressTemplateSuffix = context.postalAddressTemplateSuffix; if (!postalAddressTemplateSuffix) { Propchange: ofbiz/branches/20120329_portletWidget/applications/party/webapp/partymgr/WEB-INF/actions/party/PartyFinancialHistory.groovy ------------------------------------------------------------------------------ Merged /ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/PartyFinancialHistory.groovy:r1307083-1307606 Modified: ofbiz/branches/20120329_portletWidget/applications/party/webapp/partymgr/party/profileblocks/Contact.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/party/webapp/partymgr/party/profileblocks/Contact.ftl?rev=1351838&r1=1351837&r2=1351838&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/applications/party/webapp/partymgr/party/profileblocks/Contact.ftl (original) +++ ofbiz/branches/20120329_portletWidget/applications/party/webapp/partymgr/party/profileblocks/Contact.ftl Tue Jun 19 20:24:36 2012 @@ -58,9 +58,9 @@ under the License. </#list> <#if "POSTAL_ADDRESS" = contactMech.contactMechTypeId> <#if contactMechMap.postalAddress?has_content> - <#assign postalAddress = contactMechMap.postalAddress> - ${setContextField("postalAddress", postalAddress)} - ${screens.render("component://party/widget/partymgr/PartyScreens.xml#postalAddressHtmlFormatter")} + <#assign postalAddress = contactMechMap.postalAddress> + ${setContextField("postalAddress", postalAddress)} + ${screens.render("component://party/widget/partymgr/PartyScreens.xml#postalAddressHtmlFormatter")} <#if postalAddress.geoPointId?has_content> <#if contactMechPurposeType?has_content> <#assign popUptitle = contactMechPurposeType.get("description", locale) + uiLabelMap.CommonGeoLocation> Propchange: ofbiz/branches/20120329_portletWidget/applications/product/script/org/ofbiz/product/test/InventoryTests.xml ------------------------------------------------------------------------------ Merged /ofbiz/trunk/applications/product/script/org/ofbiz/product/test/InventoryTests.xml:r1307083-1307606 Modified: ofbiz/branches/20120329_portletWidget/applications/workeffort/widget/CalendarForms.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/workeffort/widget/CalendarForms.xml?rev=1351838&r1=1351837&r2=1351838&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/applications/workeffort/widget/CalendarForms.xml (original) +++ ofbiz/branches/20120329_portletWidget/applications/workeffort/widget/CalendarForms.xml Tue Jun 19 20:24:36 2012 @@ -72,12 +72,8 @@ under the License. <form name="editCalEvent" type="single" default-map-name="workEffort"> <actions> - <entity-condition entity-name="StatusItem" list="statusItemList"> - <condition-list combine="or"> - <condition-expr field-name="statusTypeId" value="EVENT_STATUS" /> - <condition-expr field-name="statusTypeId" value="CALENDAR_STATUS" /> - </condition-list> - </entity-condition> + <set field="statusTypeIds[]" value="EVENT_STATUS"/> + <set field="statusTypeIds[]" value="CALENDAR_STATUS"/> <!-- Allow containing screens to specify the create and update URLs --> <set field="createCalEventUrl" from-field="createCalEventUrl" default-value="createWorkEffortAndPartyAssign" /> <set field="updateCalEventUrl" from-field="updateCalEventUrl" default-value="updateWorkEffort" /> @@ -110,7 +106,9 @@ under the License. </field> <field name="currentStatusId" title="${uiLabelMap.CommonStatus}"> <drop-down no-current-selected-key="CAL_TENTATIVE"> - <list-options key-name="statusId" list-name="statusItemList" description="${description}" /> + <entity-options entity-name="StatusItem" description="${description}" key-field-name="statusId"> + <entity-constraint name="statusTypeId" operator="in" env-name="statusTypeIds"/> + </entity-options> </drop-down> </field> <field name="scopeEnumId"> Modified: ofbiz/branches/20120329_portletWidget/framework/base/src/org/ofbiz/base/util/ObjectType.java URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/framework/base/src/org/ofbiz/base/util/ObjectType.java?rev=1351838&r1=1351837&r2=1351838&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/framework/base/src/org/ofbiz/base/util/ObjectType.java (original) +++ ofbiz/branches/20120329_portletWidget/framework/base/src/org/ofbiz/base/util/ObjectType.java Tue Jun 19 20:24:36 2012 @@ -471,28 +471,12 @@ public class ObjectType { @SourceMonitored @SuppressWarnings("unchecked") public static Object simpleTypeConvert(Object obj, String type, String format, TimeZone timeZone, Locale locale, boolean noTypeFail) throws GeneralException { - if (obj == null || UtilValidate.isEmpty(type) || "Object".equals(type) || "java.lang.Object".equals(type)) { + if (obj == null || type == null || "Object".equals(type) || "java.lang.Object".equals(type)) { return obj; } - - int genericsStart = type.indexOf("<"); - if (genericsStart != -1) { - type = type.substring(0, genericsStart); - } - if ("PlainString".equals(type)) { return obj.toString(); } - Class<?> sourceClass = obj.getClass(); - if (sourceClass.getName().equals(type)) { - return obj; - } - if ("Object".equals(type) || "java.lang.Object".equals(type)) { - return obj; - } - if (obj instanceof String && UtilValidate.isEmpty(obj)) { - return null; - } if (obj instanceof Node) { Node node = (Node) obj; String nodeValue = node.getTextContent(); @@ -502,13 +486,24 @@ public class ObjectType { return simpleTypeConvert(nodeValue, type, format, timeZone, locale, noTypeFail); } } + int genericsStart = type.indexOf("<"); + if (genericsStart != -1) { + type = type.substring(0, genericsStart); + } + Class<?> sourceClass = obj.getClass(); Class<?> targetClass = null; try { targetClass = loadClass(type); } catch (ClassNotFoundException e) { throw new GeneralException("Conversion from " + sourceClass.getName() + " to " + type + " not currently supported", e); } - Converter<Object,Object> converter = null; + if (sourceClass.equals(targetClass)) { + return obj; + } + if (obj instanceof String && ((String) obj).length() == 0) { + return null; + } + Converter<Object, Object> converter = null; try { converter = (Converter<Object, Object>) Converters.getConverter(sourceClass, targetClass); } catch (ClassNotFoundException e) {} Modified: ofbiz/branches/20120329_portletWidget/framework/base/src/org/ofbiz/base/util/test/ObjectTypeTests.java URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/framework/base/src/org/ofbiz/base/util/test/ObjectTypeTests.java?rev=1351838&r1=1351837&r2=1351838&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/framework/base/src/org/ofbiz/base/util/test/ObjectTypeTests.java (original) +++ ofbiz/branches/20120329_portletWidget/framework/base/src/org/ofbiz/base/util/test/ObjectTypeTests.java Tue Jun 19 20:24:36 2012 @@ -94,7 +94,8 @@ public class ObjectTypeTests extends Gen public static void simpleTypeConvertTest(String label, Object toConvert, String type, Object wanted) throws GeneralException { basicTest(label, toConvert); - assertEquals(label + ":null", (Object) null, simpleTypeConvert(null, type, null, null, null, true)); + assertEquals(label + ":null target type", toConvert, simpleTypeConvert(toConvert, null, null, null, null, true)); + assertEquals(label + ":null source object", (Object) null, simpleTypeConvert(null, type, null, null, null, true)); assertEquals(label, wanted, simpleTypeConvert(toConvert, type, null, null, null, true)); if (toConvert instanceof String) { String str = (String) toConvert; @@ -208,7 +209,6 @@ public class ObjectTypeTests extends Gen simpleTypeConvertTest("String->String", "one", "String", "one"); simpleTypeConvertTest("String->String", "one", "java.lang.String", "one"); simpleTypeConvertTestSingleMulti("empty-String->anything", "", new String[] {"List", "Map"}, null); - simpleTypeConvertTestSingleMulti("empty-String->bad-class", "", new String[] {"no-class"}, null); simpleTypeConvertTestError("String->error", "one", new String[] {}); simpleTypeConvertTestMultiMulti("String->Boolean(true)", new String[] {"true", " true ", " TrUe"}, new String[] {"Boolean", "java.lang.Boolean"}, Boolean.TRUE); simpleTypeConvertTestMultiMulti("String->Boolean(false)", new String[] {"false", " false ", " FaLsE"}, new String[] {"Boolean", "java.lang.Boolean"}, Boolean.FALSE); Modified: ofbiz/branches/20120329_portletWidget/framework/common/config/general.properties URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/framework/common/config/general.properties?rev=1351838&r1=1351837&r2=1351838&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/framework/common/config/general.properties (original) +++ ofbiz/branches/20120329_portletWidget/framework/common/config/general.properties Tue Jun 19 20:24:36 2012 @@ -35,6 +35,12 @@ currency.decimal.format=#,##0.00 # -- the default rounding for currency (used in OfbizCurrencyTransform.java) currency.rounding.default=10 +# -- the default check scale for integer currency enabled (Y|N) (used in OfbizCurrencyTransform.java) +#When decimals are '00' +# -- Y if you want to display only x , example : 10 +# -- N if you want to display x.00 , example : 10.00 +currency.scale.enabled=N + # -- Properties fallback locale. Change this setting with caution. If you # start getting "resource not found" exceptions, then there are # properties missing in the locale you specified. This property does not Propchange: ofbiz/branches/20120329_portletWidget/framework/common/widget/HelpScreens.xml ------------------------------------------------------------------------------ Merged /ofbiz/trunk/framework/common/widget/HelpScreens.xml:r1307083-1307606 Propchange: ofbiz/branches/20120329_portletWidget/framework/security/data/PasswordSecurityData.xml ------------------------------------------------------------------------------ Merged /ofbiz/trunk/framework/security/data/PasswordSecurityData.xml:r1307083-1307606 Modified: ofbiz/branches/20120329_portletWidget/framework/webapp/config/freemarkerTransforms.properties URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/framework/webapp/config/freemarkerTransforms.properties?rev=1351838&r1=1351837&r2=1351838&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/framework/webapp/config/freemarkerTransforms.properties (original) +++ ofbiz/branches/20120329_portletWidget/framework/webapp/config/freemarkerTransforms.properties Tue Jun 19 20:24:36 2012 @@ -27,3 +27,4 @@ ofbizCurrency=org.ofbiz.webapp.ftl.Ofbiz ofbizAmount=org.ofbiz.webapp.ftl.OfbizAmountTransform setRequestAttribute=org.ofbiz.webapp.ftl.SetRequestAttributeMethod renderWrappedText=org.ofbiz.webapp.ftl.RenderWrappedTextTransform +setContextField=org.ofbiz.webapp.ftl.SetContextFieldTransform Modified: ofbiz/branches/20120329_portletWidget/framework/webapp/src/org/ofbiz/webapp/ftl/OfbizCurrencyTransform.java URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/framework/webapp/src/org/ofbiz/webapp/ftl/OfbizCurrencyTransform.java?rev=1351838&r1=1351837&r2=1351838&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/framework/webapp/src/org/ofbiz/webapp/ftl/OfbizCurrencyTransform.java (original) +++ ofbiz/branches/20120329_portletWidget/framework/webapp/src/org/ofbiz/webapp/ftl/OfbizCurrencyTransform.java Tue Jun 19 20:24:36 2012 @@ -128,6 +128,7 @@ public class OfbizCurrencyTransform impl // rounding should be handled by the code, however some times the numbers are coming from // someplace else (i.e. an integration) Integer roundingNumber = getInteger(args, "rounding"); + String scaleEnabled = "N"; Environment env = Environment.getCurrentEnvironment(); BeanModel req = null; try { @@ -141,12 +142,18 @@ public class OfbizCurrencyTransform impl // Get rounding from SystemProperty if (UtilValidate.isNotEmpty(delegator)) { String roundingString = EntityUtilProperties.getPropertyValue("general.properties", "currency.rounding.default", "10", delegator); + scaleEnabled = EntityUtilProperties.getPropertyValue("general.properties", "currency.scale.enabled", "N", delegator); if (UtilValidate.isInteger(roundingString)) roundingNumber = Integer.parseInt(roundingString); } } if (roundingNumber == null) roundingNumber = 10; + if ("Y".equals(scaleEnabled)) { + if (amount.stripTrailingZeros().scale() <= 0) { + roundingNumber = 0; + } + } final int rounding = roundingNumber; - + return new Writer(out) { @Override public void write(char cbuf[], int off, int len) { Propchange: ofbiz/branches/20120329_portletWidget/specialpurpose/ebaystore/lib/ ------------------------------------------------------------------------------ Merged /ofbiz/trunk/specialpurpose/ebaystore/lib:r1307083-1307606 Propchange: ofbiz/branches/20120329_portletWidget/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/Facilities.groovy ------------------------------------------------------------------------------ Merged /ofbiz/trunk/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/Facilities.groovy:r1307083-1307606 Propchange: ofbiz/branches/20120329_portletWidget/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/ProductList.groovy ------------------------------------------------------------------------------ Merged /ofbiz/trunk/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/ProductList.groovy:r1307083-1307606 Propchange: ofbiz/branches/20120329_portletWidget/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/ProductStockTake.groovy ------------------------------------------------------------------------------ Merged /ofbiz/trunk/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/ProductStockTake.groovy:r1307083-1307606 Modified: ofbiz/branches/20120329_portletWidget/specialpurpose/projectmgr/widget/ProjectScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/specialpurpose/projectmgr/widget/ProjectScreens.xml?rev=1351838&r1=1351837&r2=1351838&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/specialpurpose/projectmgr/widget/ProjectScreens.xml (original) +++ ofbiz/branches/20120329_portletWidget/specialpurpose/projectmgr/widget/ProjectScreens.xml Tue Jun 19 20:24:36 2012 @@ -610,12 +610,17 @@ under the License. <set field="tabButtonItem" value="listResourcesTask"/> <set field="titleProperty" value="PageTitleListTaskByParty"/> <set field="workEffortId" from-field="parameters.projectId"/> - <entity-and entity-name="WorkEffortAndPartyAssign" list="tasks"> - <field-map field-name="partyId" from-field="parameters.partyId"/> - <field-map field-name="workEffortTypeId" value="TASK"/> - <field-map field-name="statusId" value="PRTYASGN_ASSIGNED"/> + <entity-condition entity-name="WorkEffortAndPartyAssign" list="tasks"> + <condition-list combine="and"> + <condition-expr field-name="partyId" from-field="parameters.partyId"/> + <condition-expr field-name="workEffortTypeId" value="TASK"/> + <condition-list combine="or"> + <condition-expr field-name="statusId" value="PRTYASGN_ASSIGNED"/> + <condition-expr field-name="statusId" value="PAS_ASSIGNED"/> + </condition-list> + </condition-list> <order-by field-name="workEffortId"/> - </entity-and> + </entity-condition> <set field="projectId" from-field="parameters.projectId" default-value="${parameters.workEffortId}"/> <set field="partyId" from-field="parameters.partyId"/> </actions> Propchange: ofbiz/branches/20120329_portletWidget/tools/mergefromtrunk.bat ------------------------------------------------------------------------------ Merged /ofbiz/trunk/tools/mergefromtrunk.bat:r1307083-1307606 Propchange: ofbiz/branches/20120329_portletWidget/tools/mergefromtrunk.sh ------------------------------------------------------------------------------ Merged /ofbiz/trunk/tools/mergefromtrunk.sh:r1307083-1307606 |
| Free forum by Nabble | Edit this page |
