|
Modified: ofbiz/branches/jquery/applications/order/config/OrderErrorUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/order/config/OrderErrorUiLabels.xml?rev=960512&r1=960511&r2=960512&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/order/config/OrderErrorUiLabels.xml (original) +++ ofbiz/branches/jquery/applications/order/config/OrderErrorUiLabels.xml Mon Jul 5 10:07:56 2010 @@ -4128,7 +4128,7 @@ <value xml:lang="de">FEHLER: Keine Produkte für den Auftrag vorhanden</value> <value xml:lang="en">ERROR: There are no items to order</value> <value xml:lang="es">ERROR: No hay artÃculos a pedir</value> - <value xml:lang="fr">ERREUR : Il n'y a pas d'article à commander</value> + <value xml:lang="fr">ERREUR : aucun article à commander</value> <value xml:lang="it">ERRORE: Non ci sono articoli nell'ordine</value> <value xml:lang="nl">ERROR: There are no items to bestelling</value> <value xml:lang="pt_BR">ERRO: não há itens para o pedido</value> Modified: ofbiz/branches/jquery/applications/order/entitydef/entitymodel_view.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/order/entitydef/entitymodel_view.xml?rev=960512&r1=960511&r2=960512&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/order/entitydef/entitymodel_view.xml (original) +++ ofbiz/branches/jquery/applications/order/entitydef/entitymodel_view.xml Mon Jul 5 10:07:56 2010 @@ -1160,7 +1160,12 @@ under the License. <alias entity-alias="OH" name="orderTypeId" group-by="false"/> <alias entity-alias="RL" name="partyId" group-by="false"/> <alias entity-alias="RL" name="roleTypeId" group-by="false"/> - <alias entity-alias="OI" name="quantity" function="sum"/> + <alias entity-alias="OI" name="quantityOrdered" function="sum"> + <complex-alias operator="-"> + <complex-alias-field entity-alias="OI" field="quantity" default-value="0"/> + <complex-alias-field entity-alias="OI" field="cancelQuantity" default-value="0"/> + </complex-alias> + </alias> <alias entity-alias="OI" name="unitPrice" function="sum"/> <view-link entity-alias="OH" rel-entity-alias="OI"> <key-map field-name="orderId"/> Modified: ofbiz/branches/jquery/applications/order/script/org/ofbiz/order/order/CheckoutServices.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/order/script/org/ofbiz/order/order/CheckoutServices.xml?rev=960512&r1=960511&r2=960512&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/order/script/org/ofbiz/order/order/CheckoutServices.xml (original) +++ ofbiz/branches/jquery/applications/order/script/org/ofbiz/order/order/CheckoutServices.xml Mon Jul 5 10:07:56 2010 @@ -36,7 +36,7 @@ under the License. </if-compare> <set-service-fields service-name="createUpdatePerson" map="parameters" to-map="createUpdatePersonCtx"/> <set field="createUpdatePersonCtx.userLogin" from-field="userLogin"/> - <set field="createUpdatePersonCtx.partyId" from-field="userLogin.partyId"/> + <set field="createUpdatePersonCtx.partyId" from-field="partyId"/> <call-service service-name="createUpdatePerson" in-map-name="createUpdatePersonCtx"> <result-to-field result-name="partyId"/> </call-service> @@ -180,7 +180,7 @@ under the License. <result-to-result result-name="paymentMethodId"/> </call-service> <!-- Set Payment Method--> - <set field="cardSecurityCode" from-field="parameters.cardSecurityCode"/> + <set field="cardSecurityCode" from-field="parameters.billToCardSecurityCode"/> <create-object class-name="org.ofbiz.order.shoppingcart.CheckOutHelper" field="checkOutHelper"> <field field="dispatcher" type="org.ofbiz.service.LocalDispatcher"/> <field field="delegator" type="org.ofbiz.entity.Delegator"/> Modified: ofbiz/branches/jquery/applications/order/script/org/ofbiz/order/order/OrderServices.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/order/script/org/ofbiz/order/order/OrderServices.xml?rev=960512&r1=960511&r2=960512&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/order/script/org/ofbiz/order/order/OrderServices.xml (original) +++ ofbiz/branches/jquery/applications/order/script/org/ofbiz/order/order/OrderServices.xml Mon Jul 5 10:07:56 2010 @@ -479,28 +479,32 @@ under the License. <!-- try to find PartyAcctgPreference for parameters.partyId, see if we need any special order number sequencing --> <entity-one entity-name="PartyAcctgPreference" value-field="partyAcctgPreference"/> <log level="info" message="In getNextOrderId partyId is [${parameters.partyId}], partyAcctgPreference: ${partyAcctgPreference}"/> + + <if-not-empty field="partyAcctgPreference"> + <get-related-one relation-name="OrderCustomMethod" value-field="partyAcctgPreference" to-value-field="customMethod"/> + <else> + <property-to-field field="errorPartyPerf" resource="AccountingErrorUiLabels" property="AccountingPartyAcctgPreferenceNotDefine"/> + <log level="warning" message="errorPartyPerf" /> + </else> + </if-not-empty> - <if> - <condition> - <if-compare field="partyAcctgPreference.orderSequenceEnumId" operator="equals" value="ODRSQ_ENF_SEQ"/> - </condition> - <then> - <!-- <log level="info" message="In getNextOrderId sequence enum ODRSQ_ENF_SEQ"/> --> - <!-- this is sequential sequencing, we can't skip a number, also it must be a unique sequence per partyIdFrom --> - <if-not-empty field="partyAcctgPreference.lastOrderNumber"> - <calculate field="partyAcctgPreference.lastOrderNumber" type="Long"> - <calcop operator="add" field="partyAcctgPreference.lastOrderNumber"/> - <number value="1"/> - </calculate> - <else> - <calculate field="partyAcctgPreference.lastOrderNumber" type="Long"><number value="1"/></calculate> - </else> - </if-not-empty> - <store-value value-field="partyAcctgPreference"/> - <set from-field="partyAcctgPreference.lastOrderNumber" field="orderIdTemp"/> - </then> + <if-not-empty field="customMethod"> + <set field="customMethodName" from-field="customMethod.customMethodName"/> + <else><!-- retreive service from deprecated enumeration --> + <if-compare operator="equals" value="ORDSQ_ENF_SEQ" field="partyAcctgPreference.oldOrderSequenceEnumId"> + <set field="customMethodName" value="orderSequence-enforced"/> + </if-compare> + </else> + </if-not-empty> + + <if-not-empty field="customMethodName"> + <set-service-fields service-name="${customMethodName}" map="parameters" to-map="customMethodMap"/> + <set field="customMethodMap.partyAcctgPreference" from-field="partyAcctgPreference"/> + <call-service service-name="${customMethodName}" in-map-name="customMethodMap"> + <result-to-field result-name="orderId" field="orderIdTemp"/> + </call-service> <else> - <!-- <log level="info" message="In getNextOrderId sequence enum ODRSQ_STANDARD"/> --> + <!-- <log level="info" message="In getNextOrderId sequence by Standard"/> --> <!-- default to the default sequencing: ODRSQ_STANDARD --> <set from-field="parameters.orderId" field="orderIdTemp"/> <if-empty field="orderIdTemp"> @@ -512,8 +516,8 @@ under the License. </else> </if-empty> </else> - </if> - + </if-not-empty> + <if-not-empty field="parameters.productStoreId"> <entity-one entity-name="ProductStore" value-field="productStore"/> </if-not-empty> @@ -523,6 +527,26 @@ under the License. <field-to-result field="orderId" result-name="orderId"/> </simple-method> + <simple-method method-name="orderSequence-enforced" short-description="Enforced Sequence (no gaps, per organization)"> + <log level="info" message="In getNextOrderId sequence enum Enforced"/> + <set field="partyAcctgPreference" from-field="parameters.partyAcctgPreference"/> + <!-- this is sequential sequencing, we can't skip a number, also it must be a unique sequence per partyIdFrom --> + + <if-not-empty field="partyAcctgPreference.lastOrderNumber"> + <calculate field="partyAcctgPreference.lastOrderNumber" type="Long"> + <calcop operator="add" field="partyAcctgPreference.lastOrderNumber"/> + <number value="1"/> + </calculate> + <else> + <calculate field="partyAcctgPreference.lastOrderNumber" type="Long"><number value="1"/></calculate> + </else> + </if-not-empty> + + <store-value value-field="partyAcctgPreference"/> + <set from-field="partyAcctgPreference.lastOrderNumber" field="orderId"/> + <field-to-result field="orderId" result-name="orderId"/> + </simple-method> + <simple-method method-name="createOrderHeader" short-description="Create OrderHeader"> <now-timestamp field="nowTimestamp"/> Modified: ofbiz/branches/jquery/applications/order/script/org/ofbiz/order/quote/QuoteServices.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/order/script/org/ofbiz/order/quote/QuoteServices.xml?rev=960512&r1=960511&r2=960512&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/order/script/org/ofbiz/order/quote/QuoteServices.xml (original) +++ ofbiz/branches/jquery/applications/order/script/org/ofbiz/order/quote/QuoteServices.xml Mon Jul 5 10:07:56 2010 @@ -30,27 +30,32 @@ under the License. <entity-one entity-name="PartyAcctgPreference" value-field="partyAcctgPreference"/> <log level="info" message="In getNextQuoteId partyId is [${parameters.partyId}], partyAcctgPreference: ${partyAcctgPreference}"/> - <if> - <condition> - <if-compare field="partyAcctgPreference.quoteSequenceEnumId" operator="equals" value="QTESQ_ENF_SEQ"/> - </condition> - <then> - <!-- <log level="info" message="In getNextQuoteId sequence enum QTESQ_ENF_SEQ"/> --> - <!-- this is sequential sequencing, we can't skip a number, also it must be a unique sequence per partyIdFrom --> - <if-not-empty field="partyAcctgPreference.lastQuoteNumber"> - <calculate field="partyAcctgPreference.lastQuoteNumber" type="Long"> - <calcop operator="add" field="partyAcctgPreference.lastQuoteNumber"/> - <number value="1"/> - </calculate> - <else> - <calculate field="partyAcctgPreference.lastQuoteNumber" type="Long"><number value="1"/></calculate> - </else> - </if-not-empty> - <store-value value-field="partyAcctgPreference"/> - <set from-field="partyAcctgPreference.lastQuoteNumber" field="quoteIdTemp"/> - </then> + <if-not-empty field="partyAcctgPreference"> + <get-related-one relation-name="QuoteCustomMethod" value-field="partyAcctgPreference" to-value-field="customMethod"/> + <else> + <property-to-field field="errorPartyPerf" resource="AccountingErrorUiLabels" property="AccountingPartyAcctgPreferenceNotDefine"/> + <log level="warning" message="errorPartyPerf" /> + </else> + </if-not-empty> + + <if-not-empty field="customMethod"> + <set field="customMethodName" from-field="customMethod.customMethodName"/> + <else><!-- retreive service from deprecated enumeration --> + <if-compare operator="equals" value="QUOSQ_ENF_SEQ" field="partyAcctgPreference.oldQuoteSequenceEnumId"> + <set field="customMethodName" value="quoteSequence-enforced"/> + </if-compare> + </else> + </if-not-empty> + + <if-not-empty field="customMethod"> + <set-service-fields service-name="${customMethodName}" map="parameters" to-map="customMethodMap"/> + <set field="customMethodMap.partyId" from-field="parameters.partyId"/> + <set field="customMethodMap.partyAcctgPreference" from-field="partyAcctgPreference"/> + <call-service service-name="${customMethodName}" in-map-name="customMethodMap"> + <result-to-field result-name="quoteId" field="quoteIdTemp"/> + </call-service> <else> - <!-- <log level="info" message="In getNextQuoteId sequence enum QTESQ_STANDARD"/> --> + <!-- <log level="info" message="In getNextQuoteId sequence by Standard"/> --> <!-- default to the default sequencing: QTESQ_STANDARD --> <set from-field="parameters.quoteId" field="quoteIdTemp"/> <if-empty field="quoteIdTemp"> @@ -62,13 +67,33 @@ under the License. </else> </if-empty> </else> - </if> + </if-not-empty> <!-- use quoteIdTemp along with the quoteIdPrefix to create the real ID --> <set field="quoteId" value="${partyAcctgPreference.quoteIdPrefix}${quoteIdTemp}"/> <field-to-result field="quoteId" result-name="quoteId"/> </simple-method> + <simple-method method-name="quoteSequence-enforced" short-description="Enforced Sequence (no gaps, per organization)"> + <log level="info" message="In getNextQuoteId sequence enum Enforced"/> + <set field="partyAcctgPreference" from-field="parameters.partyAcctgPreference"/> + <!-- this is sequential sequencing, we can't skip a number, also it must be a unique sequence per partyIdFrom --> + + <if-not-empty field="partyAcctgPreference.lastQuoteNumber"> + <calculate field="partyAcctgPreference.lastQuoteNumber" type="Long"> + <calcop operator="add" field="partyAcctgPreference.lastQuoteNumber"/> + <number value="1"/> + </calculate> + <else> + <calculate field="partyAcctgPreference.lastQuoteNumber" type="Long"><number value="1"/></calculate> + </else> + </if-not-empty> + + <store-value value-field="partyAcctgPreference"/> + <set from-field="partyAcctgPreference.lastQuoteNumber" field="quoteId"/> + <field-to-result field="quoteId" result-name="quoteId"/> + </simple-method> + <!-- create a new Quote --> <simple-method method-name="createQuote" short-description="Create a Quote"> <if> @@ -94,6 +119,7 @@ under the License. <!-- create a non existing ID; if we have a productStoreId do it for the payToPartyId of that ProductStore according to PartyAcctgPreferences, otherwise get from standard sequence --> <entity-one entity-name="ProductStore" value-field="productStore"/> <if-not-empty field="productStore.payToPartyId"> + <set-service-fields service-name="getNextQuoteId" to-map="getNextQuoteIdContext" map="parameters"/> <set field="getNextQuoteIdContext.partyId" from-field="productStore.payToPartyId"/> <call-service service-name="getNextQuoteId" in-map-name="getNextQuoteIdContext"> <result-to-field result-name="quoteId" field="newEntity.quoteId"/> Modified: ofbiz/branches/jquery/applications/order/servicedef/services.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/order/servicedef/services.xml?rev=960512&r1=960511&r2=960512&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/order/servicedef/services.xml (original) +++ ofbiz/branches/jquery/applications/order/servicedef/services.xml Mon Jul 5 10:07:56 2010 @@ -630,11 +630,19 @@ under the License. <service name="getNextOrderId" engine="simple" location="component://order/script/org/ofbiz/order/order/OrderServices.xml" invoke="getNextOrderId"> <description>Get the Next Order ID According to Settings on the PartyAcctgPreference Entity for the given Party</description> + <implements service="storeOrder" optional="true"/> <attribute name="partyId" type="String" mode="IN" optional="false"/> <attribute name="productStoreId" type="String" mode="IN" optional="true"/> <attribute name="orderId" type="String" mode="OUT" optional="false"/> </service> + <service name="orderSequence-enforced" engine="simple" + location="component://order/script/org/ofbiz/order/order/OrderServices.xml" invoke="orderSequence-enforced"> + <implements service="getNextOrderId"/> + <attribute name="partyAcctgPreference" type="org.ofbiz.entity.GenericValue" mode="IN"/> + <override name="orderId" type="Long" mode="OUT"/> + </service> + <!-- OrderHeader --> <service name="createOrderHeader" default-entity-name="OrderHeader" engine="simple" location="component://order/script/org/ofbiz/order/order/OrderServices.xml" invoke="createOrderHeader" auth="true"> Modified: ofbiz/branches/jquery/applications/order/servicedef/services_quote.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/order/servicedef/services_quote.xml?rev=960512&r1=960511&r2=960512&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/order/servicedef/services_quote.xml (original) +++ ofbiz/branches/jquery/applications/order/servicedef/services_quote.xml Mon Jul 5 10:07:56 2010 @@ -28,10 +28,18 @@ under the License. <service name="getNextQuoteId" engine="simple" location="component://order/script/org/ofbiz/order/quote/QuoteServices.xml" invoke="getNextQuoteId"> <description>Get the Next Quote ID According to Settings on the PartyAcctgPreference Entity for the given Party</description> + <implements service="createQuote"/> <attribute name="partyId" type="String" mode="IN" optional="false"/> <attribute name="quoteId" type="String" mode="OUT" optional="false"/> </service> + <service name="quoteSequence-enforced" engine="simple" + location="component://order/script/org/ofbiz/order/quote/QuoteServices.xml" invoke="quoteSequence-enforced"> + <implements service="getNextQuoteId" optional="true"/> + <attribute name="partyAcctgPreference" type="org.ofbiz.entity.GenericValue" mode="IN"/> + <override name="quoteId" type="Long" mode="OUT"/> + </service> + <service name="createQuote" default-entity-name="Quote" engine="simple" location="component://order/script/org/ofbiz/order/quote/QuoteServices.xml" invoke="createQuote" auth="true"> <description>Create an Quote</description> Modified: ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java?rev=960512&r1=960511&r2=960512&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java (original) +++ ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java Mon Jul 5 10:07:56 2010 @@ -2077,7 +2077,17 @@ public class OrderReturnServices { return ServiceUtil.returnError(ServiceUtil.getErrorMessage(serviceResult)); } } else { - OrderChangeHelper.approveOrder(dispatcher, userLogin, createdOrderId); + if ("CUSTOMER_RETURN".equals(returnHeaderTypeId)) { + OrderChangeHelper.approveOrder(dispatcher, userLogin, createdOrderId); + } else { + try { + OrderChangeHelper.orderStatusChanges(dispatcher, userLogin, createdOrderId, "ORDER_APPROVED", null, "ITEM_APPROVED", null); + } catch (GenericServiceException e) { + String errorMessage = "Service invocation error, status changes were not updated for order #" + createdOrderId; + Debug.logError(e, errorMessage, module); + return ServiceUtil.returnError(errorMessage); + } + } } // create a ReturnItemResponse and attach to each ReturnItem Modified: ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/order/OrderServices.java URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/order/OrderServices.java?rev=960512&r1=960511&r2=960512&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/order/OrderServices.java (original) +++ ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/order/OrderServices.java Mon Jul 5 10:07:56 2010 @@ -426,13 +426,17 @@ public class OrderServices { } if (UtilValidate.isNotEmpty(orgPartyId)) { - Map getNextOrderIdContext = UtilMisc.toMap("partyId", orgPartyId, "userLogin", userLogin); + Map getNextOrderIdContext = FastMap.newInstance(); + getNextOrderIdContext.putAll(context); + getNextOrderIdContext.put("partyId", orgPartyId); + getNextOrderIdContext.put("userLogin", userLogin); if ((orderTypeId.equals("SALES_ORDER")) || (productStoreId != null)) { getNextOrderIdContext.put("productStoreId", productStoreId); } if (UtilValidate.isEmpty(orderId)) { try { + getNextOrderIdContext = ctx.makeValidContext("getNextOrderId", "IN", getNextOrderIdContext); Map getNextOrderIdResult = dispatcher.runSync("getNextOrderId", getNextOrderIdContext); if (ServiceUtil.isError(getNextOrderIdResult)) { String errMsg = UtilProperties.getMessage(resource_error, "OrderErrorGettingNextOrderIdWhileCreatingOrder", locale); Modified: ofbiz/branches/jquery/applications/order/webapp/ordermgr/WEB-INF/actions/entry/cart/LookupBulkAddSupplierProducts.groovy URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/order/webapp/ordermgr/WEB-INF/actions/entry/cart/LookupBulkAddSupplierProducts.groovy?rev=960512&r1=960511&r2=960512&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/order/webapp/ordermgr/WEB-INF/actions/entry/cart/LookupBulkAddSupplierProducts.groovy (original) +++ ofbiz/branches/jquery/applications/order/webapp/ordermgr/WEB-INF/actions/entry/cart/LookupBulkAddSupplierProducts.groovy Mon Jul 5 10:07:56 2010 @@ -128,7 +128,8 @@ for (supplierProduct in supplierProducts productInfoMap.supplierProductId = supplierProduct.supplierProductId; productInfoMap.lastPrice = supplierProduct.lastPrice; productInfoMap.orderQtyIncrements = supplierProduct.orderQtyIncrements; - + productInfoMap.minimumOrderQuantity = supplierProduct.minimumOrderQuantity; + productInfoMap.minimumStock = productFacility.minimumStock; newProductList.add(productInfoMap); Modified: ofbiz/branches/jquery/applications/order/webapp/ordermgr/WEB-INF/actions/order/CompanyHeader.groovy URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/order/webapp/ordermgr/WEB-INF/actions/order/CompanyHeader.groovy?rev=960512&r1=960511&r2=960512&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/order/webapp/ordermgr/WEB-INF/actions/order/CompanyHeader.groovy (original) +++ ofbiz/branches/jquery/applications/order/webapp/ordermgr/WEB-INF/actions/order/CompanyHeader.groovy Mon Jul 5 10:07:56 2010 @@ -59,15 +59,15 @@ if (quoteId) { } // defaults: -logoImageUrl = null; // the default value, "/images/ofbiz_powered.gif", is set in the screen decorators -partyId = null; +def logoImageUrl = null; // the default value, "/images/ofbiz_powered.gif", is set in the screen decorators +def partyId = null; // get the logo partyId from order or invoice - note that it is better to do comparisons this way in case the there are null values if (orderHeader) { orh = new OrderReadHelper(orderHeader); // for sales order, the logo party is the "BILL_FROM_VENDOR" of the order. If that's not available, we'll use the OrderHeader's ProductStore's payToPartyId if ("SALES_ORDER".equals(orderHeader.orderTypeId)) { - if (orh.getBillToParty()) { + if (orh.getBillFromParty()) { partyId = orh.getBillFromParty().partyId; } else { productStore = orderHeader.getRelatedOne("ProductStore"); @@ -77,10 +77,14 @@ if (orderHeader) { } // purchase orders - use the BILL_TO_CUSTOMER of the order } else if ("PURCHASE_ORDER".equals(orderHeader.orderTypeId)) { - partyId = orh.getBillToParty().partyId; - billToCustomer = EntityUtil.getFirst(orderHeader.getRelatedByAnd("OrderRole", [roleTypeId : "BILL_TO_CUSTOMER"])); - if (billToCustomer) { - partyId = billToCustomer.partyId; + def billToParty = orh.getBillToParty(); + if (billToParty) { + partyId = billToParty.partyId; + } else { + def billToCustomer = EntityUtil.getFirst(orderHeader.getRelatedByAnd("OrderRole", [roleTypeId : "BILL_TO_CUSTOMER"])); + if (billToCustomer) { + partyId = billToCustomer.partyId; + } } } } else if (invoice) { @@ -120,7 +124,7 @@ if (partyGroup?.logoImageUrl) { context.logoImageUrl = logoImageUrl; // the company name -companyName = "not found"; +companyName = "Default Company"; if (partyGroup?.groupName) { companyName = partyGroup.groupName; } @@ -200,3 +204,19 @@ selPayments = EntityUtil.filterByDate(pa if (selPayments) { context.eftAccount = delegator.findByPrimaryKey("EftAccount", [paymentMethodId : selPayments[0].paymentMethodId]); } + +// Tax ID Info +partyTaxAuthInfoList = delegator.findByAnd("PartyTaxAuthInfo", [partyId : partyId]); +if (partyTaxAuthInfoList) { + if (address.countryGeoId) { + // if we have an address with country filter by that + partyTaxAuthInfoList.eachWithIndex { partyTaxAuthInfo, i -> + if (partyTaxAuthInfo.taxAuthGeoId.equals(address.countryGeoId)) { + context.sendingPartyTaxId = partyTaxAuthInfo.partyTaxId; + } + } + } else { + // otherwise just grab the first one + context.sendingPartyTaxId = partyTaxAuthInfoList[0].partyTaxId; + } +} Modified: ofbiz/branches/jquery/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderView.groovy URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderView.groovy?rev=960512&r1=960511&r2=960512&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderView.groovy (original) +++ ofbiz/branches/jquery/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderView.groovy Mon Jul 5 10:07:56 2010 @@ -50,7 +50,7 @@ context.assignRoleTypeId = assignRoleTyp context.fromDate = fromDate; context.delegate = delegate; context.todayDate = new java.sql.Date(System.currentTimeMillis()).toString(); - +def partyId = null; orderHeader = null; orderItems = null; @@ -286,22 +286,24 @@ if (orderHeader) { // to the same contact mech of the ship group. if ("PURCHASE_ORDER".equals(orderType)) { facilitiesForShipGroup = [:]; - ownerPartyId = orderReadHelper.getBillToParty().partyId; - Map ownedFacilities = FastMap.newInstance(); - shipGroups.each { shipGroup -> - lookupMap = [ownerPartyId : ownerPartyId]; - if (shipGroup.contactMechId) { - lookupMap.contactMechId = shipGroup.contactMechId; - } - facilities = delegator.findByAndCache("FacilityAndContactMech", lookupMap); - facilitiesForShipGroup[shipGroup.shipGroupSeqId] = facilities; - facilities.each { facility -> - ownedFacilities[facility.facilityId] = facility; + if (orderReadHelper.getBillToParty()) { + ownerPartyId = orderReadHelper.getBillToParty().partyId; + Map ownedFacilities = FastMap.newInstance(); + shipGroups.each { shipGroup -> + lookupMap = [ownerPartyId : ownerPartyId]; + if (shipGroup.contactMechId) { + lookupMap.contactMechId = shipGroup.contactMechId; + } + facilities = delegator.findByAndCache("FacilityAndContactMech", lookupMap); + facilitiesForShipGroup[shipGroup.shipGroupSeqId] = facilities; + facilities.each { facility -> + ownedFacilities[facility.facilityId] = facility; + } } + context.facilitiesForShipGroup = facilitiesForShipGroup; + // Now get the list of all the facilities owned by the bill-to-party + context.ownedFacilities = ownedFacilities.values(); } - context.facilitiesForShipGroup = facilitiesForShipGroup; - // Now get the list of all the facilities owned by the bill-to-party - context.ownedFacilities = ownedFacilities.values(); } // set the type of return based on type of order Modified: ofbiz/branches/jquery/applications/order/webapp/ordermgr/WEB-INF/web.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/order/webapp/ordermgr/WEB-INF/web.xml?rev=960512&r1=960511&r2=960512&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/order/webapp/ordermgr/WEB-INF/web.xml (original) +++ ofbiz/branches/jquery/applications/order/webapp/ordermgr/WEB-INF/web.xml Mon Jul 5 10:07:56 2010 @@ -61,7 +61,7 @@ under the License. </init-param> <init-param> <param-name>allowedPaths</param-name> - <param-value>/control:/products:/select:/index.html:/index.jsp:/default.html:/default.jsp:/images:/includes/maincss.css</param-value> + <param-value>/error:/control:/products:/select:/index.html:/index.jsp:/default.html:/default.jsp:/images:/includes/maincss.css</param-value> </init-param> <init-param> <param-name>errorCode</param-name> Modified: ofbiz/branches/jquery/applications/order/webapp/ordermgr/entry/cart/showcartitems.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/order/webapp/ordermgr/entry/cart/showcartitems.ftl?rev=960512&r1=960511&r2=960512&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/order/webapp/ordermgr/entry/cart/showcartitems.ftl (original) +++ ofbiz/branches/jquery/applications/order/webapp/ordermgr/entry/cart/showcartitems.ftl Mon Jul 5 10:07:56 2010 @@ -156,7 +156,7 @@ under the License. <span style="color: red; font-size: 15px;">[${backOrdered?if_exists} ${uiLabelMap.OrderBackOrdered}]</span> </#if> </#if> - <#if (availableToPromiseMap.get(cartLine.getProductId()) <= 0) && (shoppingCart.getOrderType() == 'SALES_ORDER') && product.productTypeId != "DIGITAL_GOOD" && product.productTypeId != "MARKETING_PKG_AUTO" && product.productTypeId != "MARKETING_PKG_PICK"> + <#if (availableToPromiseMap.get(cartLine.getProductId()) <= 0) && (shoppingCart.getOrderType() == 'SALES_ORDER') && product.productTypeId! != "DIGITAL_GOOD" && product.productTypeId! != "MARKETING_PKG_AUTO" && product.productTypeId! != "MARKETING_PKG_PICK"> <span style="color: red;">[${cartLine.getQuantity()} ${uiLabelMap.OrderBackOrdered}]</span> <#else> <#if (availableToPromiseMap.get(cartLine.getProductId()) < cartLine.getQuantity()) && (shoppingCart.getOrderType() == 'SALES_ORDER') && product.productTypeId != "DIGITAL_GOOD" && product.productTypeId != "MARKETING_PKG_AUTO" && product.productTypeId != "MARKETING_PKG_PICK"> Modified: ofbiz/branches/jquery/applications/order/webapp/ordermgr/entry/catalog/breadcrumbs.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/order/webapp/ordermgr/entry/catalog/breadcrumbs.ftl?rev=960512&r1=960511&r2=960512&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/order/webapp/ordermgr/entry/catalog/breadcrumbs.ftl (original) +++ ofbiz/branches/jquery/applications/order/webapp/ordermgr/entry/catalog/breadcrumbs.ftl Mon Jul 5 10:07:56 2010 @@ -23,15 +23,13 @@ under the License. <#-- looping macro --> <#macro categoryList parentCategory category> <#if parentCategory.productCategoryId != category.productCategoryId> - <#assign categoryUrl = Static["org.ofbiz.product.category.CatalogUrlServlet"].makeCatalogUrl(request, "", category.productCategoryId, parentCategory.productCategoryId) /> - <#else> - <#assign categoryUrl = Static["org.ofbiz.product.category.CatalogUrlServlet"].makeCatalogUrl(request, "", category.productCategoryId, "") /> + <#local previousCategoryId = parentCategory.productCategoryId /> </#if> <#if (Static["org.ofbiz.product.category.CategoryWorker"].checkTrailItem(request, category.getString("productCategoryId"))) || (curCategoryId?exists && curCategoryId == category.productCategoryId)> <li> <#if catContentWrappers?exists && catContentWrappers[category.productCategoryId]?exists> - <a href="${categoryUrl}" class="<#if curCategoryId?exists && curCategoryId == category.productCategoryId>buttontextdisabled<#else>linktext</#if>"> + <a href="<@ofbizCatalogUrl currentCategoryId=category.productCategoryId previousCategoryId=previousCategoryId!""/>" class="<#if curCategoryId?exists && curCategoryId == category.productCategoryId>buttontextdisabled<#else>linktext</#if>"> <#if catContentWrappers[category.productCategoryId].get("CATEGORY_NAME")?exists> ${catContentWrappers[category.productCategoryId].get("CATEGORY_NAME")} <#elseif catContentWrappers[category.productCategoryId].get("DESCRIPTION")?exists> Modified: ofbiz/branches/jquery/applications/order/webapp/ordermgr/entry/catalog/compareproducts.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/order/webapp/ordermgr/entry/catalog/compareproducts.ftl?rev=960512&r1=960511&r2=960512&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/order/webapp/ordermgr/entry/catalog/compareproducts.ftl (original) +++ ofbiz/branches/jquery/applications/order/webapp/ordermgr/entry/catalog/compareproducts.ftl Mon Jul 5 10:07:56 2010 @@ -24,7 +24,7 @@ under the License. <#assign productData = productDataMap[product.productId]/> <#assign productContentWrapper = productData.productContentWrapper/> <#assign price = productData.priceMap/> - <#assign productUrl = StringUtil.wrapString(Static["org.ofbiz.product.category.CatalogUrlServlet"].makeCatalogUrl(request, product.productId, categoryId, ""))/> + <#assign productUrl><@ofbizCatalogUrl productId=product.productId currentCategoryId=categoryId/></#assign> <#assign smallImageUrl = productContentWrapper.get("SMALL_IMAGE_URL")/> <#if smallImageUrl!?length == 0> <#assign smallImageUrl = "/images/defaultImage.jpg"/> Modified: ofbiz/branches/jquery/applications/order/webapp/ordermgr/entry/catalog/productsummary.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/order/webapp/ordermgr/entry/catalog/productsummary.ftl?rev=960512&r1=960511&r2=960512&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/order/webapp/ordermgr/entry/catalog/productsummary.ftl (original) +++ ofbiz/branches/jquery/applications/order/webapp/ordermgr/entry/catalog/productsummary.ftl Mon Jul 5 10:07:56 2010 @@ -18,7 +18,7 @@ under the License. --> <#if product?exists> <#-- variable setup --> - <#assign productUrl = Static["org.ofbiz.product.category.CatalogUrlServlet"].makeCatalogUrl(request, product.productId, categoryId, "")/> + <#assign productUrl><@ofbizCatalogUrl productId=product.productId currentCategoryId=categoryId/></#assign> <#if requestAttributes.productCategoryMember?exists> <#assign prodCatMem = requestAttributes.productCategoryMember> Modified: ofbiz/branches/jquery/applications/order/webapp/ordermgr/order/ordershippinginfo.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/order/webapp/ordermgr/order/ordershippinginfo.ftl?rev=960512&r1=960511&r2=960512&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/order/webapp/ordermgr/order/ordershippinginfo.ftl (original) +++ ofbiz/branches/jquery/applications/order/webapp/ordermgr/order/ordershippinginfo.ftl Mon Jul 5 10:07:56 2010 @@ -48,7 +48,7 @@ under the License. } </script> -<#if (security.hasEntityPermission("ORDERMGR", "_UPDATE", session) || security.hasRolePermission("ORDERMGR", "_UPDATE", "", "", session)) && orderHeader.salesChannelEnumId != "POS_SALES_CHANNEL"> +<#if (security.hasEntityPermission("ORDERMGR", "_UPDATE", session) || security.hasRolePermission("ORDERMGR", "_UPDATE", "", "", session)) && (!orderHeader.salesChannelEnumId?exists || orderHeader.salesChannelEnumId != "POS_SALES_CHANNEL")> <div class="screenlet"> <div class="screenlet-title-bar"> <ul><li class="h3"> ${uiLabelMap.OrderActions}</li></ul> @@ -183,7 +183,7 @@ under the License. </div> </#if> -<#if shipGroups?has_content && orderHeader.salesChannelEnumId != "POS_SALES_CHANNEL"> +<#if shipGroups?has_content && (!orderHeader.salesChannelEnumId?exists || orderHeader.salesChannelEnumId != "POS_SALES_CHANNEL")> <#list shipGroups as shipGroup> <#assign shipmentMethodType = shipGroup.getRelatedOne("ShipmentMethodType")?if_exists> <#assign shipGroupAddress = shipGroup.getRelatedOne("PostalAddress")?if_exists> Modified: ofbiz/branches/jquery/applications/order/webapp/ordermgr/reports/SalesByStoreReport.fo.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/order/webapp/ordermgr/reports/SalesByStoreReport.fo.ftl?rev=960512&r1=960511&r2=960512&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/order/webapp/ordermgr/reports/SalesByStoreReport.fo.ftl (original) +++ ofbiz/branches/jquery/applications/order/webapp/ordermgr/reports/SalesByStoreReport.fo.ftl Mon Jul 5 10:07:56 2010 @@ -66,6 +66,7 @@ under the License. <fo:table-body> <#assign rowColor = "white"> <#list productReportList as productReport> + <#if productReport.quantityOrdered?exists && (productReport.quantityOrdered > 0)> <fo:table-row> <#if showProductStore> <fo:table-cell padding="2pt" background-color="${rowColor}"> @@ -76,7 +77,7 @@ under the License. <fo:block>${productReport.internalName?default("")} (${productReport.productId?if_exists})</fo:block> </fo:table-cell> <fo:table-cell padding="2pt" background-color="${rowColor}"> - <fo:block>${productReport.quantity?if_exists}</fo:block> + <fo:block>${productReport.quantityOrdered?if_exists}</fo:block> </fo:table-cell> <fo:table-cell padding="2pt" background-color="${rowColor}"> <fo:block>${productReport.unitPrice?if_exists}</fo:block> @@ -88,6 +89,7 @@ under the License. <#else> <#assign rowColor = "white"> </#if> + </#if> </#list> </fo:table-body> </fo:table> Modified: ofbiz/branches/jquery/applications/order/widget/ordermgr/ReportScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/order/widget/ordermgr/ReportScreens.xml?rev=960512&r1=960511&r2=960512&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/order/widget/ordermgr/ReportScreens.xml (original) +++ ofbiz/branches/jquery/applications/order/widget/ordermgr/ReportScreens.xml Mon Jul 5 10:07:56 2010 @@ -226,7 +226,7 @@ under the License. <select-field field-name="storeName"/> <select-field field-name="productId"/> <select-field field-name="internalName"/> - <select-field field-name="quantity"/> + <select-field field-name="quantityOrdered"/> <select-field field-name="unitPrice"/> <order-by field-name="storeName"/> <order-by field-name="internalName"/> Modified: ofbiz/branches/jquery/applications/party/config/PartyUiLabels.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/party/config/PartyUiLabels.xml?rev=960512&r1=960511&r2=960512&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/party/config/PartyUiLabels.xml (original) +++ ofbiz/branches/jquery/applications/party/config/PartyUiLabels.xml Mon Jul 5 10:07:56 2010 @@ -7485,7 +7485,7 @@ <value xml:lang="de">Finde keine Akteur-Information für den aktuellen Nutzer mit Nutzernamen</value> <value xml:lang="en">No party found for current user with user name</value> <value xml:lang="es">No hay un actor associado a este nombre de usuario</value> - <value xml:lang="fr">Il n'y a pas d'acteur associé au nom d'utilisateur</value> + <value xml:lang="fr">Aucun acteur associé au nom d'utilisateur</value> <value xml:lang="hi_IN">à¤à¤¸ नाम सॠà¤à¥à¤ पारà¥à¤à¥ नहॠहà¥</value> <value xml:lang="it">Nessun soggetto associato al nome dell'utente</value> <value xml:lang="ja">No party found for current user with user name</value> Modified: ofbiz/branches/jquery/applications/party/data/PartyPortletData.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/party/data/PartyPortletData.xml?rev=960512&r1=960511&r2=960512&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/party/data/PartyPortletData.xml (original) +++ ofbiz/branches/jquery/applications/party/data/PartyPortletData.xml Mon Jul 5 10:07:56 2010 @@ -20,116 +20,116 @@ <entity-engine-xml> <!-- party --> - <PortletCategory portletCategoryId="PROFILE" description="Profiles"/> + <PortletCategory portletCategoryId="PARTY_PROFILE" description="Profiles"/> <PortalPortlet portalPortletId="party" portletName="Party Info" screenName="Party" screenLocation="component://party/widget/partymgr/ProfileScreens.xml" description="General information about a person or party group" screenshot="/images/portlets/party.png"/> - <PortletPortletCategory portalPortletId="party" portletCategoryId="PROFILE"/> + <PortletPortletCategory portalPortletId="party" portletCategoryId="PARTY_PROFILE"/> <PortalPortlet portalPortletId="Attributes" portletName="Attributes" screenName="Attributes" screenLocation="component://party/widget/partymgr/ProfileScreens.xml" description="Attributes of a party" screenshot="/images/portlets/Attributes.png"/> - <PortletPortletCategory portalPortletId="Attributes" portletCategoryId="PROFILE"/> + <PortletPortletCategory portalPortletId="Attributes" portletCategoryId="PARTY_PROFILE"/> <PortalPortlet portalPortletId="PartyIdentifications" portletName="Party Identification" screenName="PartyIdentifications" screenLocation="component://party/widget/partymgr/ProfileScreens.xml" description="Identification associate to a party" screenshot=""/> - <PortletPortletCategory portalPortletId="PartyIdentifications" portletCategoryId="PROFILE"/> + <PortletPortletCategory portalPortletId="PartyIdentifications" portletCategoryId="PARTY_PROFILE"/> <PortalPortlet portalPortletId="AvsSettings" portletName="Avs Settings" screenName="AvsSettings" screenLocation="component://party/widget/partymgr/ProfileScreens.xml" description="Avs Settings of a party" screenshot="/images/portlets/AvsSettings.png"/> - <PortletPortletCategory portalPortletId="AvsSettings" portletCategoryId="PROFILE"/> + <PortletPortletCategory portalPortletId="AvsSettings" portletCategoryId="PARTY_PROFILE"/> <PortalPortlet portalPortletId="Content" portletName="Content" screenName="Content" screenLocation="component://party/widget/partymgr/ProfileScreens.xml" description="Attached Content of a party" screenshot="/images/portlets/Content.png"/> - <PortletPortletCategory portalPortletId="Content" portletCategoryId="PROFILE"/> + <PortletPortletCategory portalPortletId="Content" portletCategoryId="PARTY_PROFILE"/> <PortalPortlet portalPortletId="LoyaltyPoints" portletName="Loyalty Points" screenName="LoyaltyPoints" screenLocation="component://party/widget/partymgr/ProfileScreens.xml" description="Loyalty Points of a party" screenshot="/images/portlets/LoyaltyPoints.png"/> - <PortletPortletCategory portalPortletId="LoyaltyPoints" portletCategoryId="PROFILE"/> + <PortletPortletCategory portalPortletId="LoyaltyPoints" portletCategoryId="PARTY_PROFILE"/> <PortalPortlet portalPortletId="MYTASKSPARTY" portletName="My Tasks From Party" screenName="mytasks" screenLocation="component://party/widget/partymgr/ProfileScreens.xml" description="Assigned Tasks of a party" screenshot="/images/portlets/MYTASKSPARTY.png"/> - <PortletPortletCategory portalPortletId="MYTASKSPARTY" portletCategoryId="PROFILE"/> + <PortletPortletCategory portalPortletId="MYTASKSPARTY" portletCategoryId="PARTY_PROFILE"/> <PortalPortlet portalPortletId="Notes" portletName="Notes" screenName="Notes" screenLocation="component://party/widget/partymgr/ProfileScreens.xml" description="Notes of a party" screenshot="/images/portlets/Notes.png"/> - <PortletPortletCategory portalPortletId="Notes" portletCategoryId="PROFILE"/> + <PortletPortletCategory portalPortletId="Notes" portletCategoryId="PARTY_PROFILE"/> <PortalPortlet portalPortletId="PaymentMethods" portletName="Payment Methods" screenName="PaymentMethods" screenLocation="component://party/widget/partymgr/ProfileScreens.xml" description="PaymentMethods of a party" screenshot="/images/portlets/PaymentMethods.png"/> - <PortletPortletCategory portalPortletId="PaymentMethods" portletCategoryId="PROFILE"/> + <PortletPortletCategory portalPortletId="PaymentMethods" portletCategoryId="PARTY_PROFILE"/> <PortalPortlet portalPortletId="ShipperAccount" portletName="Shipper Account" screenName="ShipperAccount" screenLocation="component://party/widget/partymgr/ProfileScreens.xml" description="Shipper Accounts of a party" screenshot="/images/portlets/ShipperAccount.png"/> - <PortletPortletCategory portalPortletId="ShipperAccount" portletCategoryId="PROFILE"/> + <PortletPortletCategory portalPortletId="ShipperAccount" portletCategoryId="PARTY_PROFILE"/> <PortalPortlet portalPortletId="UserLogin" portletName="User Login" screenName="UserLogin" screenLocation="component://party/widget/partymgr/ProfileScreens.xml" description="User Logins of a party" screenshot="/images/portlets/UserLogin.png"/> - <PortletPortletCategory portalPortletId="UserLogin" portletCategoryId="PROFILE"/> + <PortletPortletCategory portalPortletId="UserLogin" portletCategoryId="PARTY_PROFILE"/> <PortalPortlet portalPortletId="Visits" portletName="Visits" screenName="Visits" screenLocation="component://party/widget/partymgr/ProfileScreens.xml" description="Visits of a certain party" screenshot="/images/portlets/Visits.png"/> - <PortletPortletCategory portalPortletId="Visits" portletCategoryId="PROFILE"/> + <PortletPortletCategory portalPortletId="Visits" portletCategoryId="PARTY_PROFILE"/> <PortalPortlet portalPortletId="ProductStores" portletName="ProductStores" screenName="ProductStores" screenLocation="component://party/widget/partymgr/ProfileScreens.xml" description="ProductStores of a certain party"/> - <PortletPortletCategory portalPortletId="ProductStores" portletCategoryId="PROFILE"/> + <PortletPortletCategory portalPortletId="ProductStores" portletCategoryId="PARTY_PROFILE"/> <PortalPortlet portalPortletId="contact" portletName="Contact" screenName="Contact" screenLocation="component://party/widget/partymgr/ProfileScreens.xml" description="contact methods of a party" screenshot="/images/portlets/contact.png"/> - <PortletPortletCategory portalPortletId="contact" portletCategoryId="PROFILE"/> + <PortletPortletCategory portalPortletId="contact" portletCategoryId="PARTY_PROFILE"/> <PortalPortlet portalPortletId="partyRelContacts" portletName="Account Related Contacts" screenName="partyRelContacts" screenLocation="component://party/widget/partymgr/ProfileScreens.xml" description="Related contacts of an account"/> - <PortletPortletCategory portalPortletId="partyRelContacts" portletCategoryId="PROFILE"/> + <PortletPortletCategory portalPortletId="partyRelContacts" portletCategoryId="PARTY_PROFILE"/> <PortalPortlet portalPortletId="partyRelAccounts" portletName="Contact Related Accounts" screenName="partyRelAccounts" screenLocation="component://party/widget/partymgr/ProfileScreens.xml" description="Related accounts of an contact"/> - <PortletPortletCategory portalPortletId="partyRelAccounts" portletCategoryId="PROFILE"/> + <PortletPortletCategory portalPortletId="partyRelAccounts" portletCategoryId="PARTY_PROFILE"/> <!-- communications --> <PortletCategory portletCategoryId="COMMUNICATIONS" description="Communication(s)"/> Modified: ofbiz/branches/jquery/applications/party/script/org/ofbiz/party/communication/CommunicationEventServices.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/party/script/org/ofbiz/party/communication/CommunicationEventServices.xml?rev=960512&r1=960511&r2=960512&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/party/script/org/ofbiz/party/communication/CommunicationEventServices.xml (original) +++ ofbiz/branches/jquery/applications/party/script/org/ofbiz/party/communication/CommunicationEventServices.xml Mon Jul 5 10:07:56 2010 @@ -545,8 +545,8 @@ under the License. <else> <set field="communicationEvent.statusId" from-field="parameters.statusId"/> <store-value value-field="communicationEvent"/> - <if-compare operator="equals" value="Y" field="parameters.setRoleStatusToComplete"> - <if-compare operator="equals" value="COM_COMPLETE" field="parameters.statusId"> + <if-compare operator="equals" value="COM_COMPLETE" field="parameters.statusId"> + <if-compare operator="equals" value="Y" field="parameters.setRoleStatusToComplete"> <!-- if the status of the communicationevent is set to complete, all roles need to be set to complete, which means the commevent was dealt with and no further action is required by any of the other participants/addressees --> <get-related relation-name="CommunicationEventRole" list="roles" value-field="communicationEvent"/> @@ -556,6 +556,21 @@ under the License. <store-value value-field="role"/> </if-compare-field> </iterate> + <else><!-- make sure at least the senders role is set to complete --> + <entity-one entity-name="CommunicationEventRole" value-field="communicationEventRole"> + <field-map field-name="communicationEventId" from-field="communicationEvent.communicationEventId"/> + <field-map field-name="partyId" from-field="communicationEvent.partyIdFrom"/> + <field-map field-name="roleTypeId" value="ORIGINATOR"/> + </entity-one> + <if-not-empty field="communicationEventRole"> + <if-compare operator="not-equals" value="COM_ROLE_COMPLETED" field="comunnicationEventRole.statusId"> + <set-service-fields service-name="updateCommunicationEventRole" to-map="updateRole" map="communicationEventRole"/> + <set field="updateRole.statusId" value="COM_ROLE_COMPLETED"/> + + <call-service service-name="updateCommunicationEventRole" in-map-name="updateRole"/> + </if-compare> + </if-not-empty> + </else> </if-compare> </if-compare> </else> Modified: ofbiz/branches/jquery/applications/party/script/org/ofbiz/party/contact/PartyContactMechServices.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/party/script/org/ofbiz/party/contact/PartyContactMechServices.xml?rev=960512&r1=960511&r2=960512&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/party/script/org/ofbiz/party/contact/PartyContactMechServices.xml (original) +++ ofbiz/branches/jquery/applications/party/script/org/ofbiz/party/contact/PartyContactMechServices.xml Mon Jul 5 10:07:56 2010 @@ -71,11 +71,10 @@ under the License. </simple-method> <simple-method method-name="updatePartyContactMech" short-description="Update a PartyContactMech"> - <make-value entity-name="PartyContactMech" value-field="newPartyContactMech"/> <if-empty field="parameters.partyId"> <set field="parameters.partyId" from-field="userLogin.partyId"/> </if-empty> - + <!-- Find old value --> <make-value entity-name="PartyContactMech" value-field="partyContactMechMap"/> <set-pk-fields value-field="partyContactMechMap" map="parameters"/> @@ -85,11 +84,10 @@ under the License. <if-empty field="partyContactMech"> <add-error><fail-property resource="PartyUiLabels" property="PartyCannotUpdateContactBecauseNotWithSpecifiedParty"/></add-error> </if-empty> - <check-errors/> <clone-value value-field="partyContactMech" new-value-field="newPartyContactMech"/> - + <!-- If we already have a new contactMechId don't update ContactMech --> <if-empty field="parameters.newContactMechId"> <set-service-fields service-name="updateContactMech" map="parameters" to-map="updateContactMechMap"/> @@ -102,12 +100,11 @@ under the License. <log level="info" message="Using supplied new contact mech id: ${newPartyContactMech.contactMechId}"/> </else> </if-empty> - - <set-nonpk-fields value-field="newPartyContactMech" map="parameters"/> - <now-timestamp field="newPartyContactMech.fromDate"/> - <now-timestamp field="partyContactMech.thruDate"/> - + <if-compare-field to-field="newPartyContactMech.contactMechId" field="parameters.contactMechId" operator="not-equals"> + <set-nonpk-fields value-field="newPartyContactMech" map="parameters"/> + <now-timestamp field="newPartyContactMech.fromDate"/> + <now-timestamp field="partyContactMech.thruDate"/> <store-value value-field="partyContactMech"/> <create-value value-field="newPartyContactMech"/> <get-related value-field="partyContactMech" relation-name="PartyContactMechPurpose" list="partyContactMechPurposes"/> @@ -127,11 +124,21 @@ under the License. <create-value value-field="partyContactMechPurpose"/> </if-empty> </iterate> + <log level="info" message="Setting id to result: ${newPartyContactMech.contactMechId}"/> + <field-to-result field="newPartyContactMech.contactMechId" result-name="contactMechId"/> + <field-to-request field="newPartyContactMech.contactMechId" request-name="contactMechId"/> + <else> + <if-compare-field field="parameters.extension" operator="not-equals" to-field="partyContactMech.extension"> + <set field="partyContactMech.extension" from-field="parameters.extension"/> + <set field="partyContactMech.thruDate" value=""/> + <store-value value-field="partyContactMech"/> + </if-compare-field> + <log level="info" message="Setting id to result: ${partyContactMech.contactMechId}"/> + <field-to-result field="partyContactMech.contactMechId" result-name="contactMechId"/> + <field-to-request field="partyContactMech.contactMechId" request-name="contactMechId"/> + </else> </if-compare-field> - <log level="info" message="Setting id to result: ${newPartyContactMech.contactMechId}"/> - <field-to-result field="newPartyContactMech.contactMechId" result-name="contactMechId"/> - <field-to-request field="newPartyContactMech.contactMechId" request-name="contactMechId"/> </simple-method> <simple-method method-name="deletePartyContactMech" short-description="Delete a PartyContactMech"> @@ -635,7 +642,7 @@ under the License. </call-service> <log level="info" message="Phone Contact created phoneContactMechId is ${contactMechId}"/> <else> - <set-service-fields service-name="createPartyTelecomNumber" map="parameters" to-map="phoneContext"/> + <set-service-fields service-name="updatePartyTelecomNumber" map="parameters" to-map="phoneContext"/> <call-service service-name="updatePartyTelecomNumber" in-map-name="phoneContext"> <result-to-field result-name="contactMechId" field="contactMechId"/> </call-service> @@ -653,11 +660,11 @@ under the License. </call-service> <log level="info" message="Postal address created, contactMechId is ${contactMechId}"></log> <else> - <set-service-fields service-name="createPartyPostalAddress" map="parameters" to-map="postalAddressContext"/> + <set-service-fields service-name="updatePartyPostalAddress" map="parameters" to-map="postalAddressContext"/> <call-service service-name="updatePartyPostalAddress" in-map-name="postalAddressContext"> <result-to-field result-name="contactMechId" field="contactMechId"/> </call-service> - <log level="info" message="Postal address contact updated, contactMechId is ${contactMechId}"></log> + <log level="info" message="Postal address updated, contactMechId is ${contactMechId}"></log> </else> </if-empty> <field-to-result field="contactMechId"/> Modified: ofbiz/branches/jquery/applications/party/script/org/ofbiz/party/party/PartyServices.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/party/script/org/ofbiz/party/party/PartyServices.xml?rev=960512&r1=960511&r2=960512&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/party/script/org/ofbiz/party/party/PartyServices.xml (original) +++ ofbiz/branches/jquery/applications/party/script/org/ofbiz/party/party/PartyServices.xml Mon Jul 5 10:07:56 2010 @@ -1061,7 +1061,7 @@ under the License. <field-to-list list="stateList" field="stateName"/> </iterate> <if-empty field="stateList"> - <set field="noOption" value="No States/Provinces exist: _NA_"/> + <property-to-field resource="CommonUiLabels" property="CommonNoStatesProvinces" field="noOption"/> <field-to-list list="stateList" field="noOption"/> </if-empty> <field-to-result field="stateList"/> Modified: ofbiz/branches/jquery/applications/party/src/org/ofbiz/party/party/PartyRelationshipHelper.java URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/party/src/org/ofbiz/party/party/PartyRelationshipHelper.java?rev=960512&r1=960511&r2=960512&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/party/src/org/ofbiz/party/party/PartyRelationshipHelper.java (original) +++ ofbiz/branches/jquery/applications/party/src/org/ofbiz/party/party/PartyRelationshipHelper.java Mon Jul 5 10:07:56 2010 @@ -19,14 +19,21 @@ package org.ofbiz.party.party; +import java.sql.Timestamp; import java.util.List; import java.util.Map; +import javolution.util.FastList; + import org.ofbiz.base.util.Debug; +import org.ofbiz.base.util.UtilDateTime; +import org.ofbiz.base.util.UtilMisc; +import org.ofbiz.base.util.UtilValidate; import org.ofbiz.entity.Delegator; import org.ofbiz.entity.GenericEntityException; import org.ofbiz.entity.GenericValue; -import org.ofbiz.entity.util.EntityUtil; +import org.ofbiz.entity.condition.EntityCondition; +import org.ofbiz.entity.condition.EntityOperator; /** * PartyRelationshipHelper @@ -35,48 +42,44 @@ public class PartyRelationshipHelper { public static final String module = PartyRelationshipHelper.class.getName(); - /** - * Return A List of the active Party Relationships - * - * @param delegator - * @param partyRelationshipValues Map containing the input parameters - * @return List of the active Party Relationships + /** Return A List of the active Party Relationships (ie with valid from and thru dates) + *@param delegator needed Delegator + *@param partyRelationshipValues Map containing the input parameters (primaries keys + partyRelationshipTypeId) + *@return List of the active Party Relationships */ - public static List<GenericValue> getPartyRelationships(Delegator delegator, Map<String, ?> partyRelationshipValues) { - return getPartyRelationships(delegator, partyRelationshipValues, true); - } + public static List<GenericValue> getActivePartyRelationships(Delegator delegator, Map<String, ?> partyRelationshipValues) { + String partyIdFrom = (String) partyRelationshipValues.get("partyIdFrom") ; + String partyIdTo = (String) partyRelationshipValues.get("partyIdTo") ; + String roleTypeIdFrom = (String) partyRelationshipValues.get("roleTypeIdFrom") ; + String roleTypeIdTo = (String) partyRelationshipValues.get("roleTypeIdTo") ; + String partyRelationshipTypeId = (String) partyRelationshipValues.get("partyRelationshipTypeId") ; + Timestamp fromDate = UtilDateTime.nowTimestamp(); + + List<EntityCondition> condList = FastList.newInstance(); + condList.add(EntityCondition.makeCondition("partyIdFrom", partyIdFrom)); + condList.add(EntityCondition.makeCondition("partyIdTo", partyIdTo)); + condList.add(EntityCondition.makeCondition("roleTypeIdFrom", roleTypeIdFrom)); + condList.add(EntityCondition.makeCondition("roleTypeIdTo", roleTypeIdTo)); + condList.add(EntityCondition.makeCondition("partyRelationshipTypeId", partyRelationshipTypeId)); + condList.add(EntityCondition.makeCondition("fromDate", EntityOperator.LESS_THAN_EQUAL_TO, fromDate)); + EntityCondition thruCond = EntityCondition.makeCondition(UtilMisc.toList( + EntityCondition.makeCondition("thruDate", null), + EntityCondition.makeCondition("thruDate", EntityOperator.GREATER_THAN, fromDate)), + EntityOperator.OR); + condList.add(thruCond); + EntityCondition condition = EntityCondition.makeCondition(condList); - /** - * Return A List of the Party Relationships - * - * @param delegator - * @param partyRelationshipValues Map containing the input parameters - * @param activeOnly - * @return List of the active Party Relationships - */ - public static List<GenericValue> getPartyRelationships(Delegator delegator, Map<String, ?> partyRelationshipValues, boolean activeOnly) { List<GenericValue> partyRelationships = null; try { - partyRelationships = delegator.findByAndCache("PartyRelationship", partyRelationshipValues); - if (activeOnly){ - partyRelationships = EntityUtil.filterByDate(partyRelationships); - } + partyRelationships = delegator.findList("PartyRelationship", condition, null, null, null, false); } catch (GenericEntityException e) { Debug.logError(e, "Problem finding PartyRelationships. ", module); + return null; + } + if (UtilValidate.isNotEmpty(partyRelationships)) { + return partyRelationships; + } else { + return null; } - - return partyRelationships; - } - - @Deprecated - /** - * Return A List of the active Party Relationships (ie with valid from and thru dates) - * - * @param delegator needed Delegator - * @param partyRelationshipValues Map containing the input parameters (primaries keys + partyRelationshipTypeId) - * @return List of the active Party Relationships - */ - public static List<GenericValue> getActivePartyRelationships(Delegator delegator, Map<String, ?> partyRelationshipValues) { - return getPartyRelationships(delegator, partyRelationshipValues, true); } } Modified: ofbiz/branches/jquery/applications/party/webapp/partymgr/WEB-INF/actions/party/GetPaymentMethods.groovy URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/party/webapp/partymgr/WEB-INF/actions/party/GetPaymentMethods.groovy?rev=960512&r1=960511&r2=960512&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/party/webapp/partymgr/WEB-INF/actions/party/GetPaymentMethods.groovy (original) +++ ofbiz/branches/jquery/applications/party/webapp/partymgr/WEB-INF/actions/party/GetPaymentMethods.groovy Mon Jul 5 10:07:56 2010 @@ -19,7 +19,7 @@ import org.ofbiz.accounting.payment.PaymentWorker; -partyId = parameters.partyId ? parameters.partyId : userLogin.partyId; +partyId = parameters.partyId ?: userLogin.partyId; showOld = "true".equals(parameters.SHOW_OLD); context.showOld = showOld; context.partyId = partyId; Modified: ofbiz/branches/jquery/applications/party/webapp/partymgr/WEB-INF/web.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/party/webapp/partymgr/WEB-INF/web.xml?rev=960512&r1=960511&r2=960512&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/party/webapp/partymgr/WEB-INF/web.xml (original) +++ ofbiz/branches/jquery/applications/party/webapp/partymgr/WEB-INF/web.xml Mon Jul 5 10:07:56 2010 @@ -65,7 +65,7 @@ under the License. </init-param> <init-param> <param-name>allowedPaths</param-name> - <param-value>/control:/select:/index.html:/index.jsp:/default.html:/default.jsp:/images:/static:/js</param-value> + <param-value>/error:/control:/select:/index.html:/index.jsp:/default.html:/default.jsp:/images:/static:/js</param-value> </init-param> <init-param> <param-name>errorCode</param-name> Modified: ofbiz/branches/jquery/applications/product/config/ProductEntityLabels.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/product/config/ProductEntityLabels.xml?rev=960512&r1=960511&r2=960512&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/product/config/ProductEntityLabels.xml (original) +++ ofbiz/branches/jquery/applications/product/config/ProductEntityLabels.xml Mon Jul 5 10:07:56 2010 @@ -550,7 +550,7 @@ <value xml:lang="de">hat ebenfalls eingekauft</value> <value xml:lang="en">Also Bought</value> <value xml:lang="es">También compró</value> - <value xml:lang="fr">Achat simple</value> + <value xml:lang="fr">Egalement acheté</value> <value xml:lang="it">Anche comprato</value> <value xml:lang="ro">Si Cumparate</value> <value xml:lang="ru">СопÑÑÑÑвÑÑÑаÑ</value> Modified: ofbiz/branches/jquery/applications/product/config/ProductUiLabels.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/product/config/ProductUiLabels.xml?rev=960512&r1=960511&r2=960512&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/product/config/ProductUiLabels.xml (original) +++ ofbiz/branches/jquery/applications/product/config/ProductUiLabels.xml Mon Jul 5 10:07:56 2010 @@ -7263,7 +7263,7 @@ <value xml:lang="en">Add To Compare</value> <value xml:lang="fr">Comparer</value> <value xml:lang="it">Confronta</value> - <value xml:lang="nl">Voeg toe aan vergelijklijst</value> + <value xml:lang="nl">Voeg toe aan vergelijklijst</value> </property> <property key="ProductAddToCompareListSuccess"> <value xml:lang="de">${name} wurde erfolgreich zum Produktvergleich hinzugefügt</value> @@ -14203,7 +14203,7 @@ <value xml:lang="de">Es sind keine Positionen auf diesem Beschaffungsauftrag bereit zum Eingang</value> <value xml:lang="en">There are no items in the PO to receive</value> <value xml:lang="es">No existen artÃculos en el pedido de compra</value> - <value xml:lang="fr">Il n'y a pas de ligne dans la commande d'achat reçue</value> + <value xml:lang="fr">Aucune ligne dans la commande d'achat reçue</value> <value xml:lang="it">Non ci sono righe nel OA da ricevere</value> <value xml:lang="ro">Nu sunt linii in OA de primit</value> <value xml:lang="ru">РзакÑпоÑном заказе Ð½ÐµÑ Ð¿Ð¾Ð·Ð¸Ñий Ð´Ð»Ñ Ð¿Ð¾Ð»ÑÑениÑ</value> @@ -14225,7 +14225,7 @@ <value xml:lang="de">Keine Positionen zum Empfangen vorhanden</value> <value xml:lang="en">There are no items to receive</value> <value xml:lang="es">No hay artÃculos para recibir</value> - <value xml:lang="fr">Il n'y a pas de ligne à recevoir</value> + <value xml:lang="fr">Aucune ligne à recevoir</value> <value xml:lang="it">Non ci sono righe da ricevere</value> <value xml:lang="ro">Nu sunt linii de primit</value> <value xml:lang="ru">ÐÐµÑ Ð¿Ð¾Ð·Ð¸Ñий Ð´Ð»Ñ Ð¿Ð¾Ð»ÑÑениÑ</value> @@ -14332,11 +14332,21 @@ <value xml:lang="it">Nessun prodotto trovato</value> <value xml:lang="nl">Geen producten gevonden</value> </property> + <property key="ProductNoProducts"> + <value xml:lang="de">Keine Produkte: _NA_</value> + <value xml:lang="en">No products: _NA_</value> + <value xml:lang="es">No existen productos: _NA_</value> + <value xml:lang="fr">Aucun article: _NA_</value> + <value xml:lang="it">Nessun prodotto: _NA_</value> + <value xml:lang="ru">РкаÑегоÑии пÑодÑкÑов неÑ: _NA_</value> + <value xml:lang="th">à¹à¸¡à¹à¸¡à¸µà¸ªà¸´à¸à¸à¹à¸²à¹à¸à¸«à¸¡à¸§à¸à¸«à¸¡à¸¹à¹: _NA_</value> + <value xml:lang="zh">åç±»ä¸æ²¡æäº§å: _NA_</value> + </property> <property key="ProductNoProductsInCategory"> <value xml:lang="de">Keine Produkte in der Kategorie</value> <value xml:lang="en">No products in category</value> <value xml:lang="es">No existen productos en la categorÃa</value> - <value xml:lang="fr">Pas d'article dans la catégorie</value> + <value xml:lang="fr">Aucun article dans la catégorie</value> <value xml:lang="it">Nessun prodotto nella categoria</value> <value xml:lang="ru">РкаÑегоÑии пÑодÑкÑов неÑ</value> <value xml:lang="th">à¹à¸¡à¹à¸¡à¸µà¸ªà¸´à¸à¸à¹à¸²à¹à¸à¸«à¸¡à¸§à¸à¸«à¸¡à¸¹à¹</value> @@ -14347,7 +14357,7 @@ <value xml:lang="de">Es gibt keine Produkte in dieser Produktgruppe</value> <value xml:lang="en">There are no products in this category</value> <value xml:lang="es">No hay productos en esta categorÃa</value> - <value xml:lang="fr">Il n'y a pas d'article dans cette catégorie</value> + <value xml:lang="fr">Aucun article dans cette catégorie</value> <value xml:lang="hi_IN">à¤à¤¸ सà¥à¤à¥ मॠà¤à¥à¤ सामान नहॠहà¥</value> <value xml:lang="it">Non ci sono prodotti in questa categoria</value> <value xml:lang="ja">There are no products in this category</value> Modified: ofbiz/branches/jquery/applications/product/data/ProductTypeData.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/product/data/ProductTypeData.xml?rev=960512&r1=960511&r2=960512&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/product/data/ProductTypeData.xml (original) +++ ofbiz/branches/jquery/applications/product/data/ProductTypeData.xml Mon Jul 5 10:07:56 2010 @@ -494,6 +494,7 @@ under the License. <StatusItem description="Defective" sequenceId="21" statusCode="DEFECTIVE" statusId="INV_DEFECTIVE" statusTypeId="INV_SERIALIZED_STTS"/> <StatusItem description="On Hold (Non-Serialized)" sequenceId="01" statusCode="ON_HOLD_NS" statusId="INV_NS_ON_HOLD" statusTypeId="INV_NON_SER_STTS"/> <StatusItem description="Defective (Non-Serialized)" sequenceId="02" statusCode="DEFECTIVE_NS" statusId="INV_NS_DEFECTIVE" statusTypeId="INV_NON_SER_STTS"/> + <StatusItem description="Returned (Non-Serialized)" sequenceId="02" statusCode="RETURNED_NS" statusId="INV_NS_RETURNED" statusTypeId="INV_NON_SER_STTS"/> <StatusValidChange condition="" statusId="INV_ON_ORDER" statusIdTo="INV_AVAILABLE" transitionName="Order Arrived"/> <StatusValidChange condition="" statusId="INV_AVAILABLE" statusIdTo="INV_PROMISED" transitionName="Promise"/> <StatusValidChange condition="" statusId="INV_AVAILABLE" statusIdTo="INV_ON_HOLD" transitionName="Hold"/> @@ -516,6 +517,8 @@ under the License. <StatusValidChange condition="" statusId="INV_ACTIVATED" statusIdTo="INV_RETURNED" transitionName="Return Status Pending"/> <StatusValidChange condition="" statusId="INV_DEACTIVATED" statusIdTo="INV_ON_HOLD" transitionName="Hold Inactive"/> <StatusValidChange condition="" statusId="INV_DEACTIVATED" statusIdTo="INV_RETURNED" transitionName="Return Inactive"/> + <StatusValidChange condition="" statusId="INV_NS_RETURNED" statusIdTo="INV_NS_ON_HOLD" transitionName="Make Return Held"/> + <StatusValidChange condition="" statusId="INV_NS_RETURNED" statusIdTo="INV_NS_DEFECTIVE" transitionName="Mark Return Defective"/> <!-- inventory transfer status --> <StatusType description="Inventory Transfer" hasTable="N" parentTypeId="" statusTypeId="INVENTORY_XFER_STTS"/> Modified: ofbiz/branches/jquery/applications/product/script/org/ofbiz/product/category/CategoryServices.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/product/script/org/ofbiz/product/category/CategoryServices.xml?rev=960512&r1=960511&r2=960512&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/product/script/org/ofbiz/product/category/CategoryServices.xml (original) +++ ofbiz/branches/jquery/applications/product/script/org/ofbiz/product/category/CategoryServices.xml Mon Jul 5 10:07:56 2010 @@ -840,4 +840,29 @@ under the License. <field-to-result field="hasPermission"/> <field-to-result field="failMessage"/> </simple-method> + + <!-- To help dynamically populate a products dropdown given a product category id from a change in another dropdown, possibly sorted on sequenceNum --> + <simple-method method-name="getAssociatedProductsList" short-description="Set the product options for selected product category" login-required="false"> + <set field="parameters.categoryId" from-field="parameters.productCategoryId"/> + <set-service-fields service-name="getProductCategoryMembers" map="parameters" to-map="getProductCategoryMembersMap"/> + <call-service service-name="getProductCategoryMembers" in-map-name="getProductCategoryMembersMap"> + <result-to-field result-name="categoryMembers" field="productsList"/> + </call-service> + <order-map-list list="productsList"> + <order-by field-name="sequenceNum"/> + </order-map-list> + <iterate list="productsList" entry="productMember"> + <entity-one entity-name="Product" value-field="product"> + <field-map field-name="productId" from-field="productMember.productId"/> + </entity-one> + <set field="productName" value="${product.internalName}: ${product.productId}"/> + <field-to-list list="products" field="productName"/> + </iterate> + <if-empty field="products"> + <property-to-field resource="ProductUiLabels" property="ProductNoProducts" field="noOption"/> + <field-to-list list="products" field="noOption"/> + </if-empty> + <field-to-result field="products"/> + </simple-method> + </simple-methods> Modified: ofbiz/branches/jquery/applications/product/script/org/ofbiz/product/inventory/InventoryReserveServices.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/product/script/org/ofbiz/product/inventory/InventoryReserveServices.xml?rev=960512&r1=960511&r2=960512&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/product/script/org/ofbiz/product/inventory/InventoryReserveServices.xml (original) +++ ofbiz/branches/jquery/applications/product/script/org/ofbiz/product/inventory/InventoryReserveServices.xml Mon Jul 5 10:07:56 2010 @@ -88,6 +88,8 @@ under the License. <condition-expr field-name="containerId" from-field="parameters.containerId" ignore-if-empty="true" ignore-if-null="true"/> <condition-expr field-name="quantityOnHandTotal" operator="greater" value="0.0"/> <condition-expr field-name="locationTypeEnumId" operator="equals" value="FLT_PICKLOC"/> + <condition-expr field-name="statusId" operator="not-equals" value="INV_NS_DEFECTIVE"/> + <condition-expr field-name="statusId" operator="not-equals" value="INV_DEFECTIVE"/> </condition-list> <order-by field-name="${orderByString}"/> </entity-condition> @@ -108,6 +110,8 @@ under the License. <condition-expr field-name="containerId" from-field="parameters.containerId" ignore-if-empty="true" ignore-if-null="true"/> <condition-expr field-name="quantityOnHandTotal" operator="greater" value="0.0"/> <condition-expr field-name="locationTypeEnumId" operator="equals" value="FLT_BULK"/> + <condition-expr field-name="statusId" operator="not-equals" value="INV_NS_DEFECTIVE"/> + <condition-expr field-name="statusId" operator="not-equals" value="INV_DEFECTIVE"/> </condition-list> <order-by field-name="${orderByString}"/> </entity-condition> @@ -129,6 +133,8 @@ under the License. <condition-expr field-name="containerId" from-field="parameters.containerId" ignore-if-empty="true" ignore-if-null="true"/> <condition-expr field-name="quantityOnHandTotal" operator="greater" value="0.0"/> <condition-expr field-name="locationSeqId" operator="equals" from-field="nullField"/> + <condition-expr field-name="statusId" operator="not-equals" value="INV_NS_DEFECTIVE"/> + <condition-expr field-name="statusId" operator="not-equals" value="INV_DEFECTIVE"/> </condition-list> <order-by field-name="${orderByString}"/> </entity-condition> Modified: ofbiz/branches/jquery/applications/product/script/org/ofbiz/product/inventory/InventoryServices.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/product/script/org/ofbiz/product/inventory/InventoryServices.xml?rev=960512&r1=960511&r2=960512&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/product/script/org/ofbiz/product/inventory/InventoryServices.xml (original) +++ ofbiz/branches/jquery/applications/product/script/org/ofbiz/product/inventory/InventoryServices.xml Mon Jul 5 10:07:56 2010 @@ -628,6 +628,7 @@ under the License. <or> <if-empty field="inventoryItem.statusId"/> <if-compare field="inventoryItem.statusId" operator="equals" value="INV_AVAILABLE"/> + <if-compare field="inventoryItem.statusId" operator="equals" value="INV_NS_RETURNED"/> <if-compare field="inventoryItem.inventoryItemTypeId" operator="equals" value="SERIALIZED_INV_ITEM"/><!-- status is reflected in total fields --> </or> </and> Modified: ofbiz/branches/jquery/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml?rev=960512&r1=960511&r2=960512&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml (original) +++ ofbiz/branches/jquery/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml Mon Jul 5 10:07:56 2010 @@ -103,6 +103,11 @@ under the License. <else> <if-compare field="parameters.statusId" operator="equals" value="INV_ON_HOLD"> <set field="parameters.statusId" value="INV_NS_ON_HOLD"/> + <else> + <if-compare field="parameters.statusId" operator="equals" value="INV_RETURNED"> + <set field="parameters.statusId" value="INV_NS_RETURNED"/> + </if-compare> + </else> </if-compare> </else> </if-compare> @@ -112,6 +117,7 @@ under the License. <and> <not><if-compare field="parameters.statusId" operator="equals" value="INV_NS_DEFECTIVE"/></not> <not><if-compare field="parameters.statusId" operator="equals" value="INV_NS_ON_HOLD"/></not> + <not><if-compare field="parameters.statusId" operator="equals" value="INV_NS_RETURNED"/></not> </and> </condition> <then> Modified: ofbiz/branches/jquery/applications/product/servicedef/services_view.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/product/servicedef/services_view.xml?rev=960512&r1=960511&r2=960512&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/product/servicedef/services_view.xml (original) +++ ofbiz/branches/jquery/applications/product/servicedef/services_view.xml Mon Jul 5 10:07:56 2010 @@ -116,6 +116,13 @@ under the License. <attribute name="category" type="org.ofbiz.entity.GenericValue" mode="OUT"/> <attribute name="categoryMembers" type="java.util.Collection" mode="OUT"/> </service> + + <service name="getAssociatedProductsList" engine="simple" auth="false" + location="component://product/script/org/ofbiz/product/category/CategoryServices.xml" invoke="getAssociatedProductsList"> + <attribute name="productCategoryId" mode="IN" type="String" optional="false"/> + <attribute name="products" mode="OUT" type="java.util.List"/> + </service> + <service name="getPreviousNextProducts" engine="java" location="org.ofbiz.product.category.CategoryServices" invoke="getPreviousNextProducts"> <description>Gets the previous and next product Ids.</description> Modified: ofbiz/branches/jquery/applications/product/src/org/ofbiz/product/product/ProductWorker.java URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/product/src/org/ofbiz/product/product/ProductWorker.java?rev=960512&r1=960511&r2=960512&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/product/src/org/ofbiz/product/product/ProductWorker.java (original) +++ ofbiz/branches/jquery/applications/product/src/org/ofbiz/product/product/ProductWorker.java Mon Jul 5 10:07:56 2010 @@ -648,7 +648,7 @@ public class ProductWorker { BigDecimal rating = productReview.getBigDecimal("productRating"); if (rating != null) { ratingTally = ratingTally.add(rating); - numRatings.add(BigDecimal.ONE); + numRatings = numRatings.add(BigDecimal.ONE); } } } |
| Free forum by Nabble | Edit this page |
