Author: arunpatidar
Date: Sat Jul 8 09:15:03 2017 New Revision: 1801268 URL: http://svn.apache.org/viewvc?rev=1801268&view=rev Log: Improved: Inconsistent String Comparisons. (OFBIZ-9254). Thanks Devanshu Vyas for your contribution Modified: ofbiz/ofbiz-framework/trunk/applications/manufacturing/template/mrp/FindInventoryEventPlan.ftl ofbiz/ofbiz-framework/trunk/applications/order/template/order/OrderContactInfo.ftl ofbiz/ofbiz-framework/trunk/applications/order/template/order/OrderPaymentInfo.ftl ofbiz/ofbiz-framework/trunk/applications/order/template/order/OrderShippingInfo.ftl ofbiz/ofbiz-framework/trunk/applications/party/template/party/EditShoppingList.ftl ofbiz/ofbiz-framework/trunk/applications/product/template/category/EditCategoryParties.ftl ofbiz/ofbiz-framework/trunk/applications/product/template/inventory/TransferInventoryItem.ftl ofbiz/ofbiz-framework/trunk/applications/product/template/promo/EditProductPromoRules.ftl ofbiz/ofbiz-framework/trunk/applications/product/template/shipment/VerifyPick.ftl ofbiz/ofbiz-framework/trunk/framework/webtools/template/datafile/ViewDataFile.ftl Modified: ofbiz/ofbiz-framework/trunk/applications/manufacturing/template/mrp/FindInventoryEventPlan.ftl URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/manufacturing/template/mrp/FindInventoryEventPlan.ftl?rev=1801268&r1=1801267&r2=1801268&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/applications/manufacturing/template/mrp/FindInventoryEventPlan.ftl (original) +++ ofbiz/ofbiz-framework/trunk/applications/manufacturing/template/mrp/FindInventoryEventPlan.ftl Sat Jul 8 09:15:03 2017 @@ -150,7 +150,7 @@ document.lookupinventory.productId.focus <#assign product = inven.getRelatedOne("Product", false)> <#if facilityId?has_content> </#if> - <#if ! product.equals( productTmp )> + <#if !product == productTmp> <#assign quantityAvailableAtDate = 0> <#assign errorEvents = delegator.findByAnd("MrpEvent", Static["org.apache.ofbiz.base.util.UtilMisc"].toMap("mrpEventTypeId", "ERROR", "productId", inven.productId), null, false)> <#assign qohEvents = delegator.findByAnd("MrpEvent", Static["org.apache.ofbiz.base.util.UtilMisc"].toMap("mrpEventTypeId", "INITIAL_QOH", "productId", inven.productId), null, false)> Modified: ofbiz/ofbiz-framework/trunk/applications/order/template/order/OrderContactInfo.ftl URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/order/template/order/OrderContactInfo.ftl?rev=1801268&r1=1801267&r2=1801268&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/applications/order/template/order/OrderContactInfo.ftl (original) +++ ofbiz/ofbiz-framework/trunk/applications/order/template/order/OrderContactInfo.ftl Sat Jul 8 09:15:03 2017 @@ -18,7 +18,7 @@ under the License. --> <#macro updateOrderContactMech orderHeader contactMechTypeId contactMechList contactMechPurposeTypeId contactMechAddress> - <#if (!orderHeader.statusId.equals("ORDER_COMPLETED")) && !(orderHeader.statusId.equals("ORDER_REJECTED")) && !(orderHeader.statusId.equals("ORDER_CANCELLED"))> + <#if (!"ORDER_COMPLETED" == orderHeader.statusId) && !("ORDER_REJECTED" == orderHeader.statusId) && !("ORDER_CANCELLED" == orderHeader.statusId)> <form name="updateOrderContactMech" method="post" action="<@ofbizUrl>updateOrderContactMech</@ofbizUrl>"> <input type="hidden" name="orderId" value="${orderId!}" /> <input type="hidden" name="contactMechPurposeTypeId" value="${contactMechPurpose.contactMechPurposeTypeId!}" /> Modified: ofbiz/ofbiz-framework/trunk/applications/order/template/order/OrderPaymentInfo.ftl URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/order/template/order/OrderPaymentInfo.ftl?rev=1801268&r1=1801267&r2=1801268&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/applications/order/template/order/OrderPaymentInfo.ftl (original) +++ ofbiz/ofbiz-framework/trunk/applications/order/template/order/OrderPaymentInfo.ftl Sat Jul 8 09:15:03 2017 @@ -155,7 +155,7 @@ under the License. </table> </td> <td width="10%"> - <#if (!orderHeader.statusId.equals("ORDER_COMPLETED")) && !(orderHeader.statusId.equals("ORDER_REJECTED")) && !(orderHeader.statusId.equals("ORDER_CANCELLED"))> + <#if (!"ORDER_COMPLETED" == orderHeader.statusId) && !("ORDER_REJECTED" == orderHeader.statusId) && !("ORDER_CANCELLED" == orderHeader.statusId)> <#if orderPaymentPreference.statusId != "PAYMENT_SETTLED"> <div> <a href="javascript:document.CancelOrderPaymentPreference_${orderPaymentPreference.orderPaymentPreferenceId}.submit()" class="buttontext">${uiLabelMap.CommonCancel}</a> @@ -224,7 +224,7 @@ under the License. </#if> </td> <td width="10%"> - <#if (!orderHeader.statusId.equals("ORDER_COMPLETED")) && !(orderHeader.statusId.equals("ORDER_REJECTED")) && !(orderHeader.statusId.equals("ORDER_CANCELLED"))> + <#if (!"ORDER_COMPLETED" == orderHeader.statusId) && !("ORDER_REJECTED" == orderHeader.statusId) && !("ORDER_CANCELLED" == orderHeader.statusId)> <#if orderPaymentPreference.statusId != "PAYMENT_SETTLED"> <div> <a href="javascript:document.CancelOrderPaymentPreference_${orderPaymentPreference.orderPaymentPreferenceId}.submit()" class="buttontext">${uiLabelMap.CommonCancel}</a> @@ -280,7 +280,7 @@ under the License. </td> </#if> <td width="10%"> - <#if (!orderHeader.statusId.equals("ORDER_COMPLETED")) && !(orderHeader.statusId.equals("ORDER_REJECTED")) && !(orderHeader.statusId.equals("ORDER_CANCELLED"))> + <#if (!"ORDER_COMPLETED" == orderHeader.statusId) && !("ORDER_REJECTED" == orderHeader.statusId) && !("ORDER_CANCELLED" == orderHeader.statusId)> <#if orderPaymentPreference.statusId != "PAYMENT_SETTLED"> <div> <a href="javascript:document.CancelOrderPaymentPreference_${orderPaymentPreference.orderPaymentPreferenceId}.submit()" class="buttontext">${uiLabelMap.CommonCancel}</a> @@ -380,7 +380,7 @@ under the License. </#if> </td> <td width="10%"> - <#if (!orderHeader.statusId.equals("ORDER_COMPLETED")) && !(orderHeader.statusId.equals("ORDER_REJECTED")) && !(orderHeader.statusId.equals("ORDER_CANCELLED"))> + <#if (!"ORDER_COMPLETED" == orderHeader.statusId) && !("ORDER_REJECTED" == orderHeader.statusId) && !("ORDER_CANCELLED" == orderHeader.statusId)> <#if orderPaymentPreference.statusId != "PAYMENT_SETTLED"> <a href="javascript:document.CancelOrderPaymentPreference_${orderPaymentPreference.orderPaymentPreferenceId}.submit()" class="buttontext">${uiLabelMap.CommonCancel}</a> <form name="CancelOrderPaymentPreference_${orderPaymentPreference.orderPaymentPreferenceId}" method="post" action="<@ofbizUrl>updateOrderPaymentPreference</@ofbizUrl>"> @@ -420,7 +420,7 @@ under the License. </div> </td> <td width="10%"> - <#if (!orderHeader.statusId.equals("ORDER_COMPLETED")) && !(orderHeader.statusId.equals("ORDER_REJECTED")) && !(orderHeader.statusId.equals("ORDER_CANCELLED"))> + <#if (!"ORDER_COMPLETED" == orderHeader.statusId) && !("ORDER_REJECTED" == orderHeader.statusId) && !("ORDER_CANCELLED" == orderHeader.statusId)> <#if orderPaymentPreference.statusId != "PAYMENT_SETTLED"> <a href="javascript:document.CancelOrderPaymentPreference_${orderPaymentPreference.orderPaymentPreferenceId}.submit()" class="buttontext">${uiLabelMap.CommonCancel}</a> <form name="CancelOrderPaymentPreference_${orderPaymentPreference.orderPaymentPreferenceId}" method="post" action="<@ofbizUrl>updateOrderPaymentPreference</@ofbizUrl>"> @@ -479,7 +479,7 @@ under the License. </div> </td> <td width="10%"> - <#if (!orderHeader.statusId.equals("ORDER_COMPLETED")) && !(orderHeader.statusId.equals("ORDER_REJECTED")) && !(orderHeader.statusId.equals("ORDER_CANCELLED"))> + <#if (!"ORDER_COMPLETED" == orderHeader.statusId) && !("ORDER_REJECTED" == orderHeader.statusId) && !("ORDER_CANCELLED" == orderHeader.statusId)> <#if orderPaymentPreference.statusId != "PAYMENT_SETTLED"> <a href="javascript:document.CancelOrderPaymentPreference_${orderPaymentPreference.orderPaymentPreferenceId}.submit()" class="buttontext">${uiLabelMap.CommonCancel}</a> <form name="CancelOrderPaymentPreference_${orderPaymentPreference.orderPaymentPreferenceId}" method="post" action="<@ofbizUrl>updateOrderPaymentPreference</@ofbizUrl>"> @@ -575,7 +575,7 @@ under the License. <td colspan="4" align="center">${uiLabelMap.OrderNoOrderPaymentPreferences}</td> </tr> </#if> - <#if (!orderHeader.statusId.equals("ORDER_COMPLETED")) && !(orderHeader.statusId.equals("ORDER_REJECTED")) && !(orderHeader.statusId.equals("ORDER_CANCELLED")) && (paymentMethodValueMaps?has_content)> + <#if (!"ORDER_COMPLETED" == orderHeader.statusId) && !("ORDER_REJECTED" == orderHeader.statusId) && !("ORDER_CANCELLED" == orderHeader.statusId) && (paymentMethodValueMaps?has_content)> <tr><td colspan="4"><hr /></td></tr> <tr><td colspan="4"> <form name="addPaymentMethodToOrder" method="post" action="<@ofbizUrl>addPaymentMethodToOrder</@ofbizUrl>"> Modified: ofbiz/ofbiz-framework/trunk/applications/order/template/order/OrderShippingInfo.ftl URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/order/template/order/OrderShippingInfo.ftl?rev=1801268&r1=1801267&r2=1801268&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/applications/order/template/order/OrderShippingInfo.ftl (original) +++ ofbiz/ofbiz-framework/trunk/applications/order/template/order/OrderShippingInfo.ftl Sat Jul 8 09:15:03 2017 @@ -652,7 +652,7 @@ under the License. </td> <td width="5"> </td> <td align="left" valign="top" width="80%"> - <#if (!orderHeader.statusId.equals("ORDER_COMPLETED")) && !(orderHeader.statusId.equals("ORDER_REJECTED")) && !(orderHeader.statusId.equals("ORDER_CANCELLED"))> + <#if (!"ORDER_COMPLETED" == orderHeader.statusId) && !("ORDER_REJECTED" == orderHeader.statusId) && !("ORDER_CANCELLED" == orderHeader.statusId)> <form id="updateShippingInstructionsForm_${shipGroup.shipGroupSeqId}" name="updateShippingInstructionsForm" method="post" action="<@ofbizUrl>setShippingInstructions</@ofbizUrl>"> <input type="hidden" name="orderId" value="${orderHeader.orderId}"/> <input type="hidden" name="shipGroupSeqId" value="${shipGroup.shipGroupSeqId}"/> Modified: ofbiz/ofbiz-framework/trunk/applications/party/template/party/EditShoppingList.ftl URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/party/template/party/EditShoppingList.ftl?rev=1801268&r1=1801267&r2=1801268&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/applications/party/template/party/EditShoppingList.ftl (original) +++ ofbiz/ofbiz-framework/trunk/applications/party/template/party/EditShoppingList.ftl Sat Jul 8 09:15:03 2017 @@ -197,7 +197,7 @@ under the License. <#assign unitPrice = shoppingListItemData.unitPrice> <#assign totalPrice = shoppingListItemData.totalPrice> <#assign productVariantAssocs = shoppingListItemData.productVariantAssocs!> - <#assign isVirtual = product.isVirtual?? && product.isVirtual.equals("Y")> + <#assign isVirtual = product.isVirtual?? && "Y" == product.isVirtual> <tr valign="middle"<#if alt_row> class="alternate-row"</#if>> <td><a href="/catalog/control/EditProduct?productId=${shoppingListItem.productId}&externalLoginKey=${requestAttributes.externalLoginKey}">${shoppingListItem.productId} - ${productContentWrapper.get("PRODUCT_NAME", "html")?default("No Name")}</a> : ${productContentWrapper.get("DESCRIPTION", "html")!} Modified: ofbiz/ofbiz-framework/trunk/applications/product/template/category/EditCategoryParties.ftl URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/product/template/category/EditCategoryParties.ftl?rev=1801268&r1=1801267&r2=1801268&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/applications/product/template/category/EditCategoryParties.ftl (original) +++ ofbiz/ofbiz-framework/trunk/applications/product/template/category/EditCategoryParties.ftl Sat Jul 8 09:15:03 2017 @@ -89,7 +89,7 @@ under the License. <@htmlTemplate.lookupField value="${parameters.partyId!}" formName="addNewForm" name="partyId" id="partyId" fieldFormName="LookupPartyName"/> <select name="roleTypeId" size="1"> <#list roleTypes as roleType> - <option value="${(roleType.roleTypeId)!}" <#if roleType.roleTypeId.equals("_NA_")> selected="selected"</#if>>${(roleType.get("description",locale))!}</option> + <option value="${(roleType.roleTypeId)!}" <#if "_NA_" == roleType.roleTypeId> selected="selected"</#if>>${(roleType.get("description",locale))!}</option> </#list> </select> Modified: ofbiz/ofbiz-framework/trunk/applications/product/template/inventory/TransferInventoryItem.ftl URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/product/template/inventory/TransferInventoryItem.ftl?rev=1801268&r1=1801267&r2=1801268&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/applications/product/template/inventory/TransferInventoryItem.ftl (original) +++ ofbiz/ofbiz-framework/trunk/applications/product/template/inventory/TransferInventoryItem.ftl Sat Jul 8 09:15:03 2017 @@ -97,12 +97,12 @@ under the License. <td width="14%"> </td> <td width="6%" align="right" nowrap="nowrap"><span class="label">${uiLabelMap.ProductSerialAtpQoh}</span></td> <td width="6%"> </td> - <#if inventoryItem?? && inventoryItem.inventoryItemTypeId.equals("NON_SERIAL_INV_ITEM")> + <#if inventoryItem?? && "NON_SERIAL_INV_ITEM" == inventoryItem.inventoryItemTypeId> <td width="74%"> ${(inventoryItem.availableToPromiseTotal)!} / ${(inventoryItem.quantityOnHandTotal)!} </td> - <#elseif inventoryItem?? && inventoryItem.inventoryItemTypeId.equals("SERIALIZED_INV_ITEM")> + <#elseif inventoryItem?? && "SERIALIZED_INV_ITEM" == inventoryItem.inventoryItemTypeId> <td width="74%">${(inventoryItem.serialNumber)!}</td> <#elseif inventoryItem??> <td class="alert" width="74%">${uiLabelMap.ProductErrorType} ${(inventoryItem.inventoryItemTypeId)!} ${uiLabelMap.ProductUnknownSpecifyType}.</td> @@ -177,9 +177,9 @@ under the License. <td width="6%" align="right" nowrap="nowrap"><span class="label">${uiLabelMap.ProductQuantityToTransfer}</span></td> <td width="6%"> </td> <td width="74%"> - <#if inventoryItem?? && inventoryItem.inventoryItemTypeId.equals("NON_SERIAL_INV_ITEM")> + <#if inventoryItem?? && "SERIALIZED_INV_ITEM" == inventoryItem.inventoryItemTypeId> <input type="text" size="5" name="xferQty" value="${(inventoryItem.availableToPromiseTotal)!}" /> - <#elseif inventoryItem?? && inventoryItem.inventoryItemTypeId.equals("SERIALIZED_INV_ITEM")> + <#elseif inventoryItem?? && "SERIALIZED_INV_ITEM" == inventoryItem.inventoryItemTypeId> <input type="hidden" name="xferQty" value="1" /> 1 <#elseif inventoryItem??> Modified: ofbiz/ofbiz-framework/trunk/applications/product/template/promo/EditProductPromoRules.ftl URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/product/template/promo/EditProductPromoRules.ftl?rev=1801268&r1=1801267&r2=1801268&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/applications/product/template/promo/EditProductPromoRules.ftl (original) +++ ofbiz/ofbiz-framework/trunk/applications/product/template/promo/EditProductPromoRules.ftl Sat Jul 8 09:15:03 2017 @@ -309,7 +309,7 @@ under the License. <select name="useCartQuantity"> <#if (productPromoAction.useCartQuantity)??> <#assign productPromoActionCurEnum = productPromoAction.getRelatedOne("ActionEnumeration", true)> - <option value="${(productPromoAction.useCartQuantity)!}"><#if (productPromoAction.useCartQuantity.equals("Y"))>${uiLabelMap.CommonY}<#else>${uiLabelMap.CommonN}</#if></option> + <option value="${(productPromoAction.useCartQuantity)!}"><#if ("Y" == productPromoAction.useCartQuantity)>${uiLabelMap.CommonY}<#else>${uiLabelMap.CommonN}</#if></option> <option value="${(productPromoAction.useCartQuantity)!}"> </option> <#else> <option value=""> </option> Modified: ofbiz/ofbiz-framework/trunk/applications/product/template/shipment/VerifyPick.ftl URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/product/template/shipment/VerifyPick.ftl?rev=1801268&r1=1801267&r2=1801268&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/applications/product/template/shipment/VerifyPick.ftl (original) +++ ofbiz/ofbiz-framework/trunk/applications/product/template/shipment/VerifyPick.ftl Sat Jul 8 09:15:03 2017 @@ -341,7 +341,7 @@ under the License. <td> </td> </tr> <#list pickRows as pickRow> - <#if (pickRow.getOrderId()!).equals(orderId)> + <#if (pickRow.getOrderId()! == orderId)> <tr> <td>${pickRow.getOrderItemSeqId()!}</td> <td>${pickRow.getProductId()!}</td> Modified: ofbiz/ofbiz-framework/trunk/framework/webtools/template/datafile/ViewDataFile.ftl URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/webtools/template/datafile/ViewDataFile.ftl?rev=1801268&r1=1801267&r2=1801268&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/webtools/template/datafile/ViewDataFile.ftl (original) +++ ofbiz/ofbiz-framework/trunk/framework/webtools/template/datafile/ViewDataFile.ftl Sat Jul 8 09:15:03 2017 @@ -81,7 +81,7 @@ under the License. <#list records as record> <#assign modelRecord = record.getModelRecord()> <#-- if record is different than the last displayed, make a new table and header row --> - <#if !modelRecord.name.equals(lastRecordName)> + <#if !modelRecord.name == lastRecordName> <#if lastRecordName??> </table><br /> </#if> |
Free forum by Nabble | Edit this page |