Author: jonesde
Date: Tue Dec 9 23:31:39 2008 New Revision: 725022 URL: http://svn.apache.org/viewvc?rev=725022&view=rev Log: Various cleanups dones while reviewing functionality including formatting, refactoring, better descriptions and consistent defaults. In general no functionality change, though did add a default of N for the require return receive setting on the ProductStore Modified: ofbiz/trunk/applications/accounting/widget/BillingAccountForms.xml ofbiz/trunk/applications/content/src/org/ofbiz/content/email/EmailServices.java ofbiz/trunk/applications/ecommerce/data/DemoProduct.xml ofbiz/trunk/applications/order/script/org/ofbiz/order/order/OrderReturnServices.xml ofbiz/trunk/applications/order/servicedef/secas.xml ofbiz/trunk/applications/order/webapp/ordermgr/order/ordershippinginfo.ftl ofbiz/trunk/applications/party/script/org/ofbiz/party/communication/CommunicationEventServices.xml ofbiz/trunk/applications/party/script/org/ofbiz/party/party/PartyServices.xml ofbiz/trunk/applications/product/data/ProductTypeData.xml ofbiz/trunk/applications/product/entitydef/entitymodel.xml ofbiz/trunk/applications/product/webapp/catalog/store/ProductStoreForms.xml Modified: ofbiz/trunk/applications/accounting/widget/BillingAccountForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/BillingAccountForms.xml?rev=725022&r1=725021&r2=725022&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/widget/BillingAccountForms.xml (original) +++ ofbiz/trunk/applications/accounting/widget/BillingAccountForms.xml Tue Dec 9 23:31:39 2008 @@ -55,7 +55,7 @@ <entity-condition entity-name="Invoice" list-name="billingAccountInvoices"> <condition-list> <condition-expr field-name="billingAccountId" env-name="billingAccountId"/> - <condition-expr field-name="statusId" env-name="parameters.statusId"/> + <condition-expr field-name="statusId" env-name="parameters.statusId" ignore-if-empty="true"/> </condition-list> </entity-condition> </actions> Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/email/EmailServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/email/EmailServices.java?rev=725022&r1=725021&r2=725022&view=diff ============================================================================== --- ofbiz/trunk/applications/content/src/org/ofbiz/content/email/EmailServices.java (original) +++ ofbiz/trunk/applications/content/src/org/ofbiz/content/email/EmailServices.java Tue Dec 9 23:31:39 2008 @@ -992,7 +992,7 @@ communicationEventId = (String)result.get("communicationEventId"); if (messageContent instanceof Multipart) { - Debug.logInfo("===message has attachments=====", module); + Debug.logInfo("===message has attachments=====", module); int attachmentCount = EmailWorker.addAttachmentsToCommEvent((Multipart) messageContent, subject, communicationEventId, dispatcher, userLogin); if (Debug.infoOn()) Debug.logInfo(attachmentCount + " attachments added to CommunicationEvent:" + communicationEventId,module); } @@ -1022,33 +1022,28 @@ } private static void createCommEventRoles(GenericValue userLogin, GenericDelegator delegator, LocalDispatcher dispatcher, String communicationEventId, List parties, String roleTypeId) { - // It's not clear what the "role" of this communication event should be, so we'll just put _NA_ - // check and see if this role was already created and ignore if true - try { - Iterator it = parties.iterator(); - while (it.hasNext()) { - Map result = (Map) it.next(); - String partyId = (String) result.get("partyId"); - GenericValue commEventRole = delegator.findByPrimaryKey("CommunicationEventRole", - UtilMisc.toMap("communicationEventId", communicationEventId, "partyId", partyId, "roleTypeId", roleTypeId)); - if (commEventRole == null) { - // Check if the role exists for the partyId. If not, then first associate that role with the partyId - GenericValue partyRole = delegator.findByPrimaryKey("PartyRole", UtilMisc.toMap("partyId", partyId, "roleTypeId", roleTypeId)); - if (partyRole == null) { - dispatcher.runSync("createPartyRole", UtilMisc.<String, Object>toMap("partyId", partyId, "roleTypeId", roleTypeId, "userLogin", userLogin)); - } - Map input = UtilMisc.toMap("communicationEventId", communicationEventId, - "partyId", partyId, "roleTypeId", roleTypeId, "userLogin", userLogin, - "contactMechId", (String) result.get("contactMechId"), - "statusId", "COM_ROLE_CREATED"); - dispatcher.runSync("createCommunicationEventRole", input); - } - } - } catch (GenericServiceException e) { - Debug.logError(e, module); - } catch (Exception e) { - Debug.logError(e, module); - } + // It's not clear what the "role" of this communication event should be, so we'll just put _NA_ + // check and see if this role was already created and ignore if true + try { + Iterator it = parties.iterator(); + while (it.hasNext()) { + Map result = (Map) it.next(); + String partyId = (String) result.get("partyId"); + GenericValue commEventRole = delegator.findByPrimaryKey("CommunicationEventRole", + UtilMisc.toMap("communicationEventId", communicationEventId, "partyId", partyId, "roleTypeId", roleTypeId)); + if (commEventRole == null) { + Map input = UtilMisc.toMap("communicationEventId", communicationEventId, + "partyId", partyId, "roleTypeId", roleTypeId, "userLogin", userLogin, + "contactMechId", (String) result.get("contactMechId"), + "statusId", "COM_ROLE_CREATED"); + dispatcher.runSync("createCommunicationEventRole", input); + } + } + } catch (GenericServiceException e) { + Debug.logError(e, module); + } catch (Exception e) { + Debug.logError(e, module); + } } } Modified: ofbiz/trunk/applications/ecommerce/data/DemoProduct.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/data/DemoProduct.xml?rev=725022&r1=725021&r2=725022&view=diff ============================================================================== --- ofbiz/trunk/applications/ecommerce/data/DemoProduct.xml (original) +++ ofbiz/trunk/applications/ecommerce/data/DemoProduct.xml Tue Dec 9 23:31:39 2008 @@ -45,7 +45,7 @@ <ProductStore productStoreId="9000" storeName="OFBiz E-Commerce Store" companyName="Open For Business" title="Open For Commerce" subtitle="Part of the Open For Business Family of Open Source Software" payToPartyId="Company" daysToCancelNonPay="30" prorateShipping="Y" prorateTaxes="Y" inventoryFacilityId="WebStoreWarehouse" oneInventoryFacility="Y" checkInventory="Y" reserveInventory="Y" balanceResOnOrderCreation="Y" reserveOrderEnumId="INVRO_FIFO_REC" requireInventory="N" - defaultLocaleString="en_US" defaultCurrencyUomId="USD" defaultSalesChannelEnumId="WEB_SALES_CHANNEL" allowPassword="Y" explodeOrderItems="N" retryFailedAuths="Y" + defaultLocaleString="en_US" defaultCurrencyUomId="USD" defaultSalesChannelEnumId="WEB_SALES_CHANNEL" allowPassword="Y" explodeOrderItems="N" retryFailedAuths="Y" reqReturnInventoryReceive="N" headerApprovedStatus="ORDER_APPROVED" itemApprovedStatus="ITEM_APPROVED" digitalItemApprovedStatus="ITEM_APPROVED" headerDeclinedStatus="ORDER_REJECTED" itemDeclinedStatus="ITEM_REJECTED" headerCancelStatus="ORDER_CANCELLED" itemCancelStatus="ITEM_CANCELLED" orderNumberPrefix="WS" authDeclinedMessage="There has been a problem with your method of payment. Please try a different method or call customer service." Modified: ofbiz/trunk/applications/order/script/org/ofbiz/order/order/OrderReturnServices.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/script/org/ofbiz/order/order/OrderReturnServices.xml?rev=725022&r1=725021&r2=725022&view=diff ============================================================================== --- ofbiz/trunk/applications/order/script/org/ofbiz/order/order/OrderReturnServices.xml (original) +++ ofbiz/trunk/applications/order/script/org/ofbiz/order/order/OrderReturnServices.xml Tue Dec 9 23:31:39 2008 @@ -69,7 +69,7 @@ </if-empty> <check-errors/> - <!-- check the needs (auto) inventory receive flag (default to no) --> + <!-- check the needs (auto) inventory receive flag (default to N, meaning that return won't automatically be considered Received when Accepted) --> <if-empty field="parameters.needsInventoryReceive"> <set field="parameters.needsInventoryReceive" value="N"/> </if-empty> Modified: ofbiz/trunk/applications/order/servicedef/secas.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/servicedef/secas.xml?rev=725022&r1=725021&r2=725022&view=diff ============================================================================== --- ofbiz/trunk/applications/order/servicedef/secas.xml (original) +++ ofbiz/trunk/applications/order/servicedef/secas.xml Tue Dec 9 23:31:39 2008 @@ -170,6 +170,7 @@ <action service="createTrackingCodeOrderReturns" mode="sync" run-as-user="system"/> <action service="sendReturnAcceptNotification" mode="async" persist="true"/> </eca> + <eca service="updateReturnHeader" event="commit"> <condition field-name="statusId" operator="equals" value="RETURN_RECEIVED"/> <condition field-name="currentStatusId" operator="not-equals" value="RETURN_RECEIVED"/> @@ -178,6 +179,14 @@ <action service="processCreditReturn" mode="sync"/> <action service="processRefundReturn" mode="sync"/> </eca> + <eca service="updateReturnStatusFromReceipt" event="global-commit"> + <condition field-name="returnHeaderStatus" operator="equals" value="RETURN_RECEIVED"/> + <action service="processWaitReplacementReturn" mode="sync"/> + <action service="processRepairReplacementReturn" mode="sync"/> + <action service="processCreditReturn" mode="sync"/> + <action service="processRefundReturn" mode="sync"/> + </eca> + <eca service="updateReturnHeader" event="commit"> <condition field-name="statusId" operator="equals" value="RETURN_COMPLETED"/> <condition field-name="currentStatusId" operator="not-equals" value="RETURN_COMPLETED"/> @@ -202,14 +211,6 @@ <action service="cancelReplacementOrderItems" mode="sync"/> </eca> - <eca service="updateReturnStatusFromReceipt" event="global-commit"> - <condition field-name="returnHeaderStatus" operator="equals" value="RETURN_RECEIVED"/> - <action service="processWaitReplacementReturn" mode="sync"/> - <action service="processRepairReplacementReturn" mode="sync"/> - <action service="processCreditReturn" mode="sync"/> - <action service="processRefundReturn" mode="sync"/> - </eca> - <eca service="processReplacementReturn" event="commit"> <action service="checkReturnComplete" mode="sync"/> </eca> Modified: ofbiz/trunk/applications/order/webapp/ordermgr/order/ordershippinginfo.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/order/ordershippinginfo.ftl?rev=725022&r1=725021&r2=725022&view=diff ============================================================================== --- ofbiz/trunk/applications/order/webapp/ordermgr/order/ordershippinginfo.ftl (original) +++ ofbiz/trunk/applications/order/webapp/ordermgr/order/ordershippinginfo.ftl Tue Dec 9 23:31:39 2008 @@ -70,7 +70,7 @@ <#if security.hasEntityPermission("ORDERMGR", "_RETURN", session) && orderHeader.statusId == "ORDER_COMPLETED"> <#if returnableItems?has_content> <li><a href="<@ofbizUrl>quickRefundOrder?orderId=${orderId}&receiveReturn=true&returnHeaderTypeId=${returnHeaderTypeId}</@ofbizUrl>" class="buttontext">${uiLabelMap.OrderQuickRefundEntireOrder}</a></li> - <li><a href="<@ofbizUrl>quickreturn?orderId=${orderId}&party_id=${partyId?if_exists}&returnHeaderTypeId=${returnHeaderTypeId}&needsInventoryReceive=${needsInventoryReceive?default("Y")}</@ofbizUrl>" class="buttontext">${uiLabelMap.OrderCreateReturn}</a></li> + <li><a href="<@ofbizUrl>quickreturn?orderId=${orderId}&party_id=${partyId?if_exists}&returnHeaderTypeId=${returnHeaderTypeId}&needsInventoryReceive=${needsInventoryReceive?default("N")}</@ofbizUrl>" class="buttontext">${uiLabelMap.OrderCreateReturn}</a></li> </#if> </#if> Modified: ofbiz/trunk/applications/party/script/org/ofbiz/party/communication/CommunicationEventServices.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/script/org/ofbiz/party/communication/CommunicationEventServices.xml?rev=725022&r1=725021&r2=725022&view=diff ============================================================================== --- ofbiz/trunk/applications/party/script/org/ofbiz/party/communication/CommunicationEventServices.xml (original) +++ ofbiz/trunk/applications/party/script/org/ofbiz/party/communication/CommunicationEventServices.xml Tue Dec 9 23:31:39 2008 @@ -279,6 +279,7 @@ <set-service-fields service-name="createPartyRole" map-name="parameters" to-map-name="partyRole"/> <set field="partyRole.userLogin" from-field="sysUserLogin"/> <call-service service-name="createPartyRole" in-map-name="partyRole" include-user-login="false"/> + <make-value value-name="newEntity" entity-name="CommunicationEventRole" /> <set-pk-fields map-name="parameters" value-name="newEntity" /> <set-nonpk-fields map-name="parameters" value-name="newEntity" /> Modified: ofbiz/trunk/applications/party/script/org/ofbiz/party/party/PartyServices.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/script/org/ofbiz/party/party/PartyServices.xml?rev=725022&r1=725021&r2=725022&view=diff ============================================================================== --- ofbiz/trunk/applications/party/script/org/ofbiz/party/party/PartyServices.xml (original) +++ ofbiz/trunk/applications/party/script/org/ofbiz/party/party/PartyServices.xml Tue Dec 9 23:31:39 2008 @@ -21,19 +21,14 @@ <simple-methods xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/simple-methods.xsd"> - - <!-- create PartyRole --> <simple-method method-name="createPartyRole" short-description="Create Party Role"> - <make-value value-name="partyRolePK" entity-name="PartyRole"/> - <set-pk-fields value-name="partyRolePK" map-name="parameters"/> - <find-by-primary-key entity-name="PartyRole" map-name="partyRolePK" value-name="partyRole"/> + <entity-one entity-name="PartyRole" value-name="partyRole"/> <if-empty field="partyRole"> - <make-value entity-name="PartyRole" map-name="partyRolePK" value-name="partyRole"/> - <create-value value-name="partyRole"/> + <make-value entity-name="PartyRole" value-name="newEntity"/> + <set-pk-fields map-name="parameters" value-name="newEntity"/> + <create-value value-name="newEntity"/> </if-empty> - <check-errors/> </simple-method> - <simple-method method-name="deletePartyRole" short-description="Delete a PartyRole"> <entity-one entity-name="PartyRole" value-name="partyRole"/> <remove-value value-name="partyRole"/> Modified: ofbiz/trunk/applications/product/data/ProductTypeData.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/data/ProductTypeData.xml?rev=725022&r1=725021&r2=725022&view=diff ============================================================================== --- ofbiz/trunk/applications/product/data/ProductTypeData.xml (original) +++ ofbiz/trunk/applications/product/data/ProductTypeData.xml Tue Dec 9 23:31:39 2008 @@ -526,7 +526,9 @@ <VarianceReason varianceReasonId="VAR_DAMAGED" description="Damaged"/> <VarianceReason varianceReasonId="VAR_INTEGR" description="Integration"/> <VarianceReason varianceReasonId="VAR_SAMPLE" description="Sample (Giveaway)"/> - + <VarianceReason varianceReasonId="VAR_MISSHIP_ORDERED" description="Mis-shipped Item Ordered (+)"/> + <VarianceReason varianceReasonId="VAR_MISSHIP_SHIPPED" description="Mis-shipped Item Shipped (-)"/> + <!-- Supplier preference order for SupplierProduct entries --> <SupplierPrefOrder supplierPrefOrderId="10_MAIN_SUPPL" description="Main Supplier"/> <SupplierPrefOrder supplierPrefOrderId="90_ALT_SUPPL" description="Alternative Supplier"/> Modified: ofbiz/trunk/applications/product/entitydef/entitymodel.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/entitydef/entitymodel.xml?rev=725022&r1=725021&r2=725022&view=diff ============================================================================== --- ofbiz/trunk/applications/product/entitydef/entitymodel.xml (original) +++ ofbiz/trunk/applications/product/entitydef/entitymodel.xml Tue Dec 9 23:31:39 2008 @@ -3487,7 +3487,7 @@ <field name="autoApproveOrder" type="indicator"><description>If N, orders will not be automatically approved when payment is authorized.</description></field> <field name="shipIfCaptureFails" type="indicator"><description>If N, the captureOrderPayments will cause a service error if credit card capture fails.</description></field> <field name="setOwnerUponIssuance" type="indicator"><description>If Y or empty, set the inventory item owner upon issuance.</description></field> - <field name="reqReturnInventoryReceive" type="indicator"><description>This is the default value for the ReturnHeader.needsInventoryReceive field.</description></field> + <field name="reqReturnInventoryReceive" type="indicator"><description>Default N. This is the default value for the ReturnHeader.needsInventoryReceive field. If set to Y return will automatically go to the Received status when Accepted instead of waiting for actual receipt of the return.</description></field> <field name="addToCartRemoveIncompat" type="indicator"><description>Default N. If Y then on add to cart remove all products in cart with a ProductAssoc record related to or from the product and with the PRODUCT_INCOMPATABLE type.</description></field> <field name="addToCartReplaceUpsell" type="indicator"><description>Default N. If Y then on add to cart remove all products in cart with a ProductAssoc record related from the product and with the PRODUCT_UPGRADE type.</description></field> <field name="splitPayPrefPerShpGrp" type="indicator"><description>Default N. If Y then before the order is stored the OrderPaymentPreference record will be split, one for each OrderItemShipGroup.</description></field> Modified: ofbiz/trunk/applications/product/webapp/catalog/store/ProductStoreForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/store/ProductStoreForms.xml?rev=725022&r1=725021&r2=725022&view=diff ============================================================================== --- ofbiz/trunk/applications/product/webapp/catalog/store/ProductStoreForms.xml (original) +++ ofbiz/trunk/applications/product/webapp/catalog/store/ProductStoreForms.xml Tue Dec 9 23:31:39 2008 @@ -295,9 +295,11 @@ <sort-field name="oneInventoryFacility"/> <sort-field name="isImmediatelyFulfilled"/> <sort-field name="checkInventory"/> - <sort-field name="reserveInventory"/> <sort-field name="requireInventory"/> <sort-field name="requirementMethodEnumId"/> + <sort-field name="reserveInventory"/> + <sort-field name="reserveOrderEnumId"/> + <sort-field name="balanceResOnOrderCreation"/> </field-group> <field-group title="${uiLabelMap.CommonShoppingCart}" collapsible="true" initially-collapsed="true"> <sort-field name="viewCartOnAdd"/> @@ -327,8 +329,6 @@ <sort-field name="setOwnerUponIssuance"/> </field-group> <field-group title="${uiLabelMap.CommonOrders}" collapsible="true" initially-collapsed="true"> - <sort-field name="reserveOrderEnumId"/> - <sort-field name="balanceResOnOrderCreation"/> <sort-field name="orderNumberPrefix"/> <sort-field name="defaultSalesChannelEnumId"/> <sort-field name="explodeOrderItems"/> |
Free forum by Nabble | Edit this page |