Permalink
Browse files

Merges trunk HEAD

  • Loading branch information...
2 parents 6943831 + 18b7344 commit 552f7768c19ad551a5fd06263c34d809e11b2fa0 @JacquesLeRoux JacquesLeRoux committed Feb 4, 2014
Showing with 6,824 additions and 6,247 deletions.
  1. +15 −15 .project
  2. +0 −7 applications/content/ofbiz-component.xml
  3. +1 −1 applications/content/widget/CommonScreens.xml
  4. +37 −37 applications/manufacturing/data/ManufacturingHelpData_EN.xml
  5. +74 −110 applications/manufacturing/data/ManufacturingHelpData_NL.xml
  6. 0 applications/manufacturing/data/helpdata/{EN → }/Help_MFG.xml
  7. 0 applications/manufacturing/data/helpdata/{EN → }/Help_MFG_BomSimulation.xml
  8. 0 ...tions/manufacturing/data/helpdata/{NL/Help_MFG_BomSimulation.xml → Help_MFG_BomSimulation_NL.xml}
  9. 0 applications/manufacturing/data/helpdata/{EN → }/Help_MFG_CreateProductionRun.xml
  10. 0 ...cturing/data/helpdata/{NL/Help_MFG_CreateProductionRun.xml → Help_MFG_CreateProductionRun_NL.xml}
  11. 0 applications/manufacturing/data/helpdata/{EN → }/Help_MFG_EditCalendar.xml
  12. 0 applications/manufacturing/data/helpdata/{EN → }/Help_MFG_EditCalendarExceptionDay.xml
  13. 0 ...ta/helpdata/{NL/Help_MFG_EditCalendarExceptionDay.xml → Help_MFG_EditCalendarExceptionDay_NL.xml}
  14. 0 applications/manufacturing/data/helpdata/{EN → }/Help_MFG_EditCalendarExceptionWeek.xml
  15. 0 .../helpdata/{NL/Help_MFG_EditCalendarExceptionWeek.xml → Help_MFG_EditCalendarExceptionWeek_NL.xml}
  16. 0 applications/manufacturing/data/helpdata/{EN → }/Help_MFG_EditCalendarWeek.xml
  17. 0 ...manufacturing/data/helpdata/{NL/Help_MFG_EditCalendarWeek.xml → Help_MFG_EditCalendarWeek_NL.xml}
  18. 0 ...cations/manufacturing/data/helpdata/{NL/Help_MFG_EditCalendar.xml → Help_MFG_EditCalendar_NL.xml}
  19. 0 applications/manufacturing/data/helpdata/{EN → }/Help_MFG_EditCostCalcs.xml
  20. 0 ...tions/manufacturing/data/helpdata/{NL/Help_MFG_EditCostCalcs.xml → Help_MFG_EditCostCalcs_NL.xml}
  21. 0 applications/manufacturing/data/helpdata/{EN → }/Help_MFG_EditProductBom.xml
  22. 0 ...ons/manufacturing/data/helpdata/{NL/Help_MFG_EditProductBom.xml → Help_MFG_EditProductBom_NL.xml}
  23. +2 −1 applications/manufacturing/data/helpdata/{EN → }/Help_MFG_EditProductManufacturingRules.xml
  24. 0 ...a/{NL/Help_MFG_EditProductManufacturingRules.xml → Help_MFG_EditProductManufacturingRules_NL.xml}
  25. 0 applications/manufacturing/data/helpdata/{EN → }/Help_MFG_EditProductionRun.xml
  26. 0 ...nufacturing/data/helpdata/{NL/Help_MFG_EditProductionRun.xml → Help_MFG_EditProductionRun_NL.xml}
  27. 0 applications/manufacturing/data/helpdata/{EN → }/Help_MFG_EditRouting.xml
  28. 0 applications/manufacturing/data/helpdata/{EN → }/Help_MFG_EditRoutingProductLink.xml
  29. 0 ...g/data/helpdata/{NL/Help_MFG_EditRoutingProductLink.xml → Help_MFG_EditRoutingProductLink_NL.xml}
  30. 0 applications/manufacturing/data/helpdata/{EN → }/Help_MFG_EditRoutingTask.xml
  31. 0 applications/manufacturing/data/helpdata/{EN → }/Help_MFG_EditRoutingTaskAssoc.xml
  32. 0 ...uring/data/helpdata/{NL/Help_MFG_EditRoutingTaskAssoc.xml → Help_MFG_EditRoutingTaskAssoc_NL.xml}
  33. 0 applications/manufacturing/data/helpdata/{EN → }/Help_MFG_EditRoutingTaskCost.xml
  34. 0 ...cturing/data/helpdata/{NL/Help_MFG_EditRoutingTaskCost.xml → Help_MFG_EditRoutingTaskCost_NL.xml}
  35. 0 applications/manufacturing/data/helpdata/{EN → }/Help_MFG_EditRoutingTaskFixedAsset.xml
  36. 0 .../helpdata/{NL/Help_MFG_EditRoutingTaskFixedAsset.xml → Help_MFG_EditRoutingTaskFixedAsset_NL.xml}
  37. 0 applications/manufacturing/data/helpdata/{EN → }/Help_MFG_EditRoutingTaskProduct.xml
  38. 0 ...g/data/helpdata/{NL/Help_MFG_EditRoutingTaskProduct.xml → Help_MFG_EditRoutingTaskProduct_NL.xml}
  39. 0 ...s/manufacturing/data/helpdata/{NL/Help_MFG_EditRoutingTask.xml → Help_MFG_EditRoutingTask_NL.xml}
  40. 0 applications/manufacturing/data/helpdata/{NL/Help_MFG_EditRouting.xml → Help_MFG_EditRouting_NL.xml}
  41. 0 applications/manufacturing/data/helpdata/{EN → }/Help_MFG_FindBom.xml
  42. 0 applications/manufacturing/data/helpdata/{NL/Help_MFG_FindBom.xml → Help_MFG_FindBom_NL.xml}
  43. 0 applications/manufacturing/data/helpdata/{EN → }/Help_MFG_FindCalendar.xml
  44. 0 ...cations/manufacturing/data/helpdata/{NL/Help_MFG_FindCalendar.xml → Help_MFG_FindCalendar_NL.xml}
  45. 0 applications/manufacturing/data/helpdata/{EN → }/Help_MFG_FindInventoryEventPlan.xml
  46. 0 ...g/data/helpdata/{NL/Help_MFG_FindInventoryEventPlan.xml → Help_MFG_FindInventoryEventPlan_NL.xml}
  47. 0 applications/manufacturing/data/helpdata/{EN → }/Help_MFG_FindProductionRun.xml
  48. 0 ...nufacturing/data/helpdata/{NL/Help_MFG_FindProductionRun.xml → Help_MFG_FindProductionRun_NL.xml}
  49. 0 applications/manufacturing/data/helpdata/{EN → }/Help_MFG_FindRouting.xml
  50. 0 applications/manufacturing/data/helpdata/{EN → }/Help_MFG_FindRoutingTask.xml
  51. 0 ...s/manufacturing/data/helpdata/{NL/Help_MFG_FindRoutingTask.xml → Help_MFG_FindRoutingTask_NL.xml}
  52. 0 applications/manufacturing/data/helpdata/{NL/Help_MFG_FindRouting.xml → Help_MFG_FindRouting_NL.xml}
  53. 0 applications/manufacturing/data/helpdata/{EN → }/Help_MFG_ListCalendarWeek.xml
  54. 0 ...manufacturing/data/helpdata/{NL/Help_MFG_ListCalendarWeek.xml → Help_MFG_ListCalendarWeek_NL.xml}
  55. 0 applications/manufacturing/data/helpdata/{EN → }/Help_MFG_ListRoutingTaskProducts.xml
  56. 0 ...data/helpdata/{NL/Help_MFG_ListRoutingTaskProducts.xml → Help_MFG_ListRoutingTaskProducts_NL.xml}
  57. 0 applications/manufacturing/data/helpdata/{EN → }/Help_MFG_ManufacturingReports.xml
  58. 0 ...uring/data/helpdata/{NL/Help_MFG_ManufacturingReports.xml → Help_MFG_ManufacturingReports_NL.xml}
  59. 0 applications/manufacturing/data/helpdata/{NL/Help_MFG.xml → Help_MFG_NL.xml}
  60. 0 applications/manufacturing/data/helpdata/{EN → }/Help_MFG_ProductionRunAssocs.xml
  61. 0 ...cturing/data/helpdata/{NL/Help_MFG_ProductionRunAssocs.xml → Help_MFG_ProductionRunAssocs_NL.xml}
  62. 0 applications/manufacturing/data/helpdata/{EN → }/Help_MFG_ProductionRunComponents.xml
  63. 0 ...data/helpdata/{NL/Help_MFG_ProductionRunComponents.xml → Help_MFG_ProductionRunComponents_NL.xml}
  64. 0 applications/manufacturing/data/helpdata/{EN → }/Help_MFG_ProductionRunContent.xml
  65. 0 ...uring/data/helpdata/{NL/Help_MFG_ProductionRunContent.xml → Help_MFG_ProductionRunContent_NL.xml}
  66. 0 applications/manufacturing/data/helpdata/{EN → }/Help_MFG_ProductionRunCosts.xml
  67. 0 ...facturing/data/helpdata/{NL/Help_MFG_ProductionRunCosts.xml → Help_MFG_ProductionRunCosts_NL.xml}
  68. 0 applications/manufacturing/data/helpdata/{EN → }/Help_MFG_ProductionRunFixedAssets.xml
  69. 0 ...ta/helpdata/{NL/Help_MFG_ProductionRunFixedAssets.xml → Help_MFG_ProductionRunFixedAssets_NL.xml}
  70. 0 applications/manufacturing/data/helpdata/{EN → }/Help_MFG_ProductionRunTasks.xml
  71. 0 ...facturing/data/helpdata/{NL/Help_MFG_ProductionRunTasks.xml → Help_MFG_ProductionRunTasks_NL.xml}
  72. 0 applications/manufacturing/data/helpdata/{EN → }/Help_MFG_RunMRP.xml
  73. 0 applications/manufacturing/data/helpdata/{NL/Help_MFG_RunMRP.xml → Help_MFG_RunMRP_NL.xml}
  74. 0 applications/manufacturing/data/helpdata/{EN → }/Help_MFG_ShowProductionRun.xml
  75. 0 ...nufacturing/data/helpdata/{NL/Help_MFG_ShowProductionRun.xml → Help_MFG_ShowProductionRun_NL.xml}
  76. 0 applications/manufacturing/data/helpdata/{EN → }/Help_MFG_WorkWithShipmentPlans.xml
  77. 0 ...ing/data/helpdata/{NL/Help_MFG_WorkWithShipmentPlans.xml → Help_MFG_WorkWithShipmentPlans_NL.xml}
  78. 0 applications/manufacturing/data/helpdata/{EN → }/Help_MFG_main.xml
  79. 0 applications/manufacturing/data/helpdata/{NL/Help_MFG_main.xml → Help_MFG_main_NL.xml}
  80. +33 −7 applications/manufacturing/documents/manufacturing.xml
  81. +35 −6 applications/manufacturing/widget/manufacturing/ProductionRunForms.xml
  82. +25 −7 applications/order/src/org/ofbiz/order/order/OrderReturnServices.java
  83. +11 −2 build.xml
  84. +7 −16 framework/common/webcommon/includes/htmlTemplate.ftl
  85. +1 −1 framework/common/webcommon/includes/lookup.ftl
  86. +2 −2 framework/common/widget/CommonScreens.xml
  87. +0 −6 framework/images/webapp/images/jquery/jquery-1.10.2.min.js
  88. +0 −1 framework/images/webapp/images/jquery/jquery-1.10.2.min.map
  89. +6,567 −6,019 framework/images/webapp/images/jquery/{jquery-1.10.2.js → jquery-1.11.0.js}
  90. +4 −0 framework/images/webapp/images/jquery/jquery-1.11.0.min.js
  91. +1 −1 specialpurpose/cmssite/template/cms/HtmlHead.ftl
  92. +1 −1 specialpurpose/ecommerce/data/EcommerceTypeData.xml
  93. +2 −2 specialpurpose/ecommerce/widget/CommonScreens.xml
  94. +6 −5 specialpurpose/example/data/ExampleHelpData.xml
View
@@ -1,18 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>ofbiz</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.groovy.core.groovyNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
+ <name>webhelp-2012-12-07</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.groovy.core.groovyNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
</projectDescription>
@@ -70,13 +70,6 @@ under the License.
location="webapp/content"
base-permission="CONTENTMGR"
mount-point="/content"/>
-
- <webapp name="contentimages"
- title="Content Images"
- server="default-server"
- location="webapp/content/images"
- mount-point="/contentimages/"
- app-bar-display="false"/>
<webapp name="ofbizhelp"
title="OFBiz Help"
@@ -32,7 +32,7 @@ under the License.
<property-map resource="ProductUiLabels" map-name="uiLabelMap" global="true"/>
<set field="layoutSettings.companyName" from-field="uiLabelMap.ContentCompanyName" global="true"/>
<set field="layoutSettings.companySubtitle" from-field="uiLabelMap.ContentCompanySubtitle" global="true"/>
- <set field="layoutSettings.styleSheets[]" value="/contentimages/contentForum.css" global="true"/>
+ <set field="layoutSettings.styleSheets[]" value="/content/images/contentForum.css" global="true"/>
<set field="layoutSettings.javaScripts[]" value="/images/selectall.js" global="true"/>
<set field="activeApp" value="contentmgr" global="true"/>
<set field="applicationMenuName" value="ContentAppBar" global="true"/>

Large diffs are not rendered by default.

Oops, something went wrong.

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -32,7 +32,8 @@
<section>
<title>Create new manufacturing rule</title>
<para>
- WIP
+ This form enables you to define replacing materials for the BoM components.
+ In the second part of the screen the overview of replacement rules is shown.
</para>
</section>
</section>
@@ -25,14 +25,40 @@
xmlns="http://docbook.org/ns/docbook">
<title>Manufacturing</title>
<xi:include href="../data/helpdata/Help_MFG.xml"/>
- <xi:include href="../data/helpdata/Help_MFG_main.xml"/>
+ <xi:include href="../data/helpdata/Help_MFG_BomSimulation.xml"/>
+ <xi:include href="../data/helpdata/Help_MFG_CreateProductionRun.xml"/>
+ <xi:include href="../data/helpdata/Help_MFG_EditCalendar.xml"/>
+ <xi:include href="../data/helpdata/Help_MFG_EditCalendarExceptionDay.xml"/>
+ <xi:include href="../data/helpdata/Help_MFG_EditCalendarExceptionWeek.xml"/>
+ <xi:include href="../data/helpdata/Help_MFG_EditCalendarWeek.xml"/>
+ <xi:include href="../data/helpdata/Help_MFG_EditCostCalcs.xml"/>
+ <xi:include href="../data/helpdata/Help_MFG_EditProductBom.xml"/>
+ <xi:include href="../data/helpdata/Help_MFG_EditProductManufacturingRules.xml"/>
+ <xi:include href="../data/helpdata/Help_MFG_EditProductionRun.xml"/>
+ <xi:include href="../data/helpdata/Help_MFG_EditRouting.xml"/>
+ <xi:include href="../data/helpdata/Help_MFG_EditRoutingProductLink.xml"/>
+ <xi:include href="../data/helpdata/Help_MFG_EditRoutingTask.xml"/>
+ <xi:include href="../data/helpdata/Help_MFG_EditRoutingTaskAssoc.xml"/>
+ <xi:include href="../data/helpdata/Help_MFG_EditRoutingTaskCost.xml"/>
+ <xi:include href="../data/helpdata/Help_MFG_EditRoutingTaskFixedAsset.xml"/>
+ <xi:include href="../data/helpdata/Help_MFG_EditRoutingTaskProduct.xml"/>
+ <xi:include href="../data/helpdata/Help_MFG_FindBom.xml"/>
+ <xi:include href="../data/helpdata/Help_MFG_FindCalendar.xml"/>
+ <xi:include href="../data/helpdata/Help_MFG_FindInventoryEventPlan.xml"/>
<xi:include href="../data/helpdata/Help_MFG_FindProductionRun.xml"/>
<xi:include href="../data/helpdata/Help_MFG_FindRouting.xml"/>
<xi:include href="../data/helpdata/Help_MFG_FindRoutingTask.xml"/>
- <xi:include href="../data/helpdata/Help_MFG_FindCalendar.xml"/>
- <xi:include href="../data/helpdata/Help_MFG_EditCostCalc.xml"/>
- <xi:include href="../data/helpdata/Help_MFG_FindBom.xml"/>
- <xi:include href="../data/helpdata/Help_MFG_FindInventoryEventPlan.xml"/>
- <xi:include href="../data/helpdata/Help_MFG_WorkWithShipmentPlans.xml"/>
+ <xi:include href="../data/helpdata/Help_MFG_ListCalendarWeek.xml"/>
+ <xi:include href="../data/helpdata/Help_MFG_ListRoutingTaskProducts.xml"/>
<xi:include href="../data/helpdata/Help_MFG_ManufacturingReports.xml"/>
-</chapter>
+ <xi:include href="../data/helpdata/Help_MFG_ProductionRunAssocs.xml"/>
+ <xi:include href="../data/helpdata/Help_MFG_ProductionRunComponents.xml"/>
+ <xi:include href="../data/helpdata/Help_MFG_ProductionRunContent.xml"/>
+ <xi:include href="../data/helpdata/Help_MFG_ProductionRunCosts.xml"/>
+ <xi:include href="../data/helpdata/Help_MFG_ProductionRunFixedAssets.xml"/>
+ <xi:include href="../data/helpdata/Help_MFG_ProductionRunTasks.xml"/>
+ <xi:include href="../data/helpdata/Help_MFG_RunMRP.xml"/>
+ <xi:include href="../data/helpdata/Help_MFG_ShowProductionRun.xml"/>
+ <xi:include href="../data/helpdata/Help_MFG_WorkWithShipmentPlans.xml"/>
+ <xi:include href="../data/helpdata/Help_MFG_main.xml"/>
+</chapter>
@@ -22,9 +22,9 @@ under the License.
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-form.xsd">
<form name="CreateProductionRun" target="createProductionRun" title="" type="single"
header-row-style="header-row" default-table-style="basic-table">
- <field name="productId" title="${uiLabelMap.ProductProductId}"><lookup target-form-name="LookupProduct" size="16"/></field>
- <field name="quantity" title="${uiLabelMap.ManufacturingQuantity}"><text size="6"/></field>
- <field name="startDate" title="${uiLabelMap.ManufacturingStartDate}"><date-time/></field>
+ <field name="productId" title="${uiLabelMap.ProductProductId}" required-field="true"><lookup target-form-name="LookupProduct" size="16"/></field>
+ <field name="quantity" title="${uiLabelMap.ManufacturingQuantity}" required-field="true"><text size="6"/></field>
+ <field name="startDate" title="${uiLabelMap.ManufacturingStartDate}" required-field="true"><date-time/></field>
<field name="facilityId">
<drop-down allow-empty="false">
<entity-options entity-name="Facility" description="${facilityName} [${facilityId}]">
@@ -69,7 +69,7 @@ under the License.
<field name="submitButton" title="${uiLabelMap.CommonFind}"><submit button-type="button"/></field>
</form>
- <form name="listFindProductionRun" list-name="listIt" title="" type="list" paginate-target="/FindProductionRun"
+ <form name="listFindProductionRun" list-name="listIt" title="" type="list" paginate-target="FindProductionRun"
odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
<actions>
<service service-name="performFind" result-map="result" result-map-list="listIt">
@@ -825,10 +825,39 @@ under the License.
<submit button-type="button"/>
</field>
</form>
+ <form name="linkProductionRun" type="single" target="createProductionRunAssoc" title=""
+ header-row-style="header-row" default-table-style="basic-table">
+ <field name="productionRunId"><hidden/></field>
+ <field name="workEffortAssocTypeId"><hidden value="WORK_EFF_PRECEDENCY"/></field>
+ <field name="productionRunIdTo">
+ <drop-down allow-empty="false">
+ <entity-options entity-name="WorkEffort" key-field-name="workEffortId" description="[ID: ${workEffortId}] - ${workEffortName}">
+ <entity-constraint name="workEffortPurposeTypeId" value="WEPT_PRODUCTION_RUN"/>
+ <entity-order-by field-name="workEffortId"/>
+ </entity-options>
+ </drop-down>
+ </field>
+ <!--
+ <field name="productionRunLookup">
+ <lookup target-form-name="LookupProductRun"/>
+ </field>
+ -->
+ <field name="workFlowSequenceTypeId">
+ <drop-down allow-empty="false">
+ <entity-options entity-name="Enumeration" key-field-name="enumId" description="${description}">
+ <entity-constraint name="enumTypeId" value="WORKFLOW"/>
+ <entity-order-by field-name="sequenceId"/>
+ </entity-options>
+ </drop-down>
+ </field>
+ <field name="submitButton" title="${uiLabelMap.CommonSubmit}">
+ <submit button-type="button"/>
+ </field>
+ </form>
<form name="mandatoryWorkEfforts" type="list" target="" title="" list-name="mandatoryWorkEfforts"
odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
<field name="workEffortIdFrom" title=" " widget-style="buttontext">
- <hyperlink target="ShowProductionRun" description="${workEffortIdFrom}" also-hidden="false">
+ <hyperlink target="ShowProductionRun" description="${workEffortIdFrom}" also-hidden="false" link-type="anchor">
<parameter param-name="productionRunId" from-field="workEffortIdFrom"/>
</hyperlink>
</field>
@@ -857,7 +886,7 @@ under the License.
<form name="dependentWorkEfforts" type="list" target="" title="" list-name="dependentWorkEfforts"
odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
<field name="workEffortIdTo" title=" " widget-style="buttontext">
- <hyperlink target="ShowProductionRun" description="${workEffortIdTo}" also-hidden="false">
+ <hyperlink target="ShowProductionRun" description="${workEffortIdTo}" also-hidden="false" link-type="anchor">
<parameter param-name="productionRunId" from-field="workEffortIdTo"/>
</hyperlink>
</field>
@@ -1383,6 +1383,7 @@ public static BigDecimal getBillingAccountBalance(String billingAccountId, Dispa
Map<String, Object> orderPaymentPrefDetails = pmtppit.next();
GenericValue orderPaymentPreference = (GenericValue) orderPaymentPrefDetails.get("orderPaymentPreference");
BigDecimal orderPaymentPreferenceAvailable = (BigDecimal) orderPaymentPrefDetails.get("availableTotal");
+ GenericValue refundOrderPaymentPreference=null;
// Refund up to the maxAmount for the paymentPref, or whatever is left to refund if that's less than the maxAmount
BigDecimal amountToRefund = orderPaymentPreferenceAvailable.min(amountLeftToRefund);
@@ -1394,23 +1395,36 @@ public static BigDecimal getBillingAccountBalance(String billingAccountId, Dispa
// Call the refund service to refund the payment
if (electronicTypes.contains(paymentMethodTypeId)) {
try {
- // for electronic types such as CREDIT_CARD and EFT_ACCOUNT, use refundPayment service
- serviceResult = dispatcher.runSync("refundPayment", UtilMisc.<String, Object>toMap("orderPaymentPreference", orderPaymentPreference, "refundAmount", amountToRefund.setScale(decimals, rounding), "userLogin", userLogin));
+ Map<String, Object> serviceContext = UtilMisc.toMap("orderId", orderId,"userLogin", context.get("userLogin"));
+ serviceContext.put("paymentMethodId", orderPaymentPreference.getString("paymentMethodId"));
+ serviceContext.put("paymentMethodTypeId", orderPaymentPreference.getString("paymentMethodTypeId"));
+ serviceContext.put("statusId", orderPaymentPreference.getString("statusId"));
+ serviceContext.put("maxAmount", amountToRefund.setScale(decimals, rounding));
+ String orderPaymentPreferenceNewId = null;
+ Map<String, Object> result = dispatcher.runSync("createOrderPaymentPreference", serviceContext);
+ orderPaymentPreferenceNewId = (String) result.get("orderPaymentPreferenceId");
+ try {
+ refundOrderPaymentPreference = delegator.findOne("OrderPaymentPreference", false, "orderPaymentPreferenceId", orderPaymentPreferenceNewId);
+ } catch (GenericEntityException e) {
+ return ServiceUtil.returnError(UtilProperties.getMessage(resource_error,"OrderProblemsWithTheRefundSeeLogs", locale));
+ }
+ serviceResult = dispatcher.runSync("refundPayment", UtilMisc.<String, Object>toMap("orderPaymentPreference", refundOrderPaymentPreference, "refundAmount", amountToRefund.setScale(decimals, rounding), "userLogin", userLogin));
if (ServiceUtil.isError(serviceResult) || ServiceUtil.isFailure(serviceResult)) {
Debug.logError("Error in refund payment: " + ServiceUtil.getErrorMessage(serviceResult), module);
continue;
}
+ // for electronic types such as CREDIT_CARD and EFT_ACCOUNT, use refundPayment service
paymentId = (String) serviceResult.get("paymentId");
amountRefunded = (BigDecimal) serviceResult.get("refundAmount");
} catch (GenericServiceException e) {
- Debug.logError(e, "Problem running the refundPayment service", module);
- return ServiceUtil.returnError(UtilProperties.getMessage(resource_error,
- "OrderProblemsWithTheRefundSeeLogs", locale));
+ return ServiceUtil.returnError(UtilProperties.getMessage(resource_error,"OrderProblemsWithTheRefundSeeLogs", locale));
}
} else if (paymentMethodTypeId.equals("EXT_BILLACT")) {
try {
// for Billing Account refunds
- serviceResult = dispatcher.runSync("refundBillingAccountPayment", UtilMisc.<String, Object>toMap("orderPaymentPreference", orderPaymentPreference, "refundAmount", amountToRefund.setScale(decimals, rounding), "userLogin", userLogin));
+ serviceResult = dispatcher.runSync("refundBillingAccountPayment",
+ UtilMisc.<String, Object> toMap("orderPaymentPreference", orderPaymentPreference, "refundAmount",
+ amountToRefund.setScale(decimals, rounding), "userLogin", userLogin));
if (ServiceUtil.isError(serviceResult) || ServiceUtil.isFailure(serviceResult)) {
Debug.logError("Error in refund payment: " + ServiceUtil.getErrorMessage(serviceResult), module);
continue;
@@ -1447,7 +1461,11 @@ public static BigDecimal getBillingAccountBalance(String billingAccountId, Dispa
// Fill out the data for the new ReturnItemResponse
Map<String, Object> response = FastMap.newInstance();
- response.put("orderPaymentPreferenceId", orderPaymentPreference.getString("orderPaymentPreferenceId"));
+ if (UtilValidate.isNotEmpty(refundOrderPaymentPreference)) {
+ response.put("orderPaymentPreferenceId", refundOrderPaymentPreference.getString("orderPaymentPreferenceId"));
+ } else {
+ response.put("orderPaymentPreferenceId", orderPaymentPreference.getString("orderPaymentPreferenceId"));
+ }
response.put("responseAmount", amountRefunded.setScale(decimals, rounding));
response.put("responseDate", now);
response.put("userLogin", userLogin);
View
@@ -1155,16 +1155,22 @@ under the License.
<ivy:cleancache/>
</target>
- <target name="download-activemq" description="Download activemq for DCC (Distributed Cache Clearing)">
+ <target name="download-activemq" description="Download activemq for DCC (Distributed Cache Clearing">
<ivy:retrieve pattern="framework/base/lib/[artifact]-[revision].[ext]" conf="activemq"/>
+ <echo> </echo>
+ <echo>======================================================</echo>
+ <echo>Please check that this version is appropriate for you!</echo>
</target>
<target name="download-cobertura" description="Download cobertura related files">
<ivy:retrieve pattern="framework/base/lib/[artifact]-[revision].[ext]" conf="cobertura"/>
</target>
- <target name="download-PG-JDBC" description="Download postgres jdbc driver">
+ <target name="download-PG-JDBC" description="Download postgres jdbc driver">
<ivy:retrieve pattern="framework/entity/lib/jdbc/[artifact]-[revision].[ext]" conf="postgres"/>
+ <echo> </echo>
+ <echo>======================================================</echo>
+ <echo>Please check that this version is appropriate for you!</echo>
</target>
<target name="download-sonar-ant-task" description="Download sonar related files">
@@ -1173,6 +1179,9 @@ under the License.
<target name="download-mySQL-JDBC" description="Download mySQL jdbc driver">
<ivy:retrieve pattern="framework/entity/lib/jdbc/[artifact]-[revision].[ext]" conf="mysql"/>
+ <echo> </echo>
+ <echo>======================================================</echo>
+ <echo>Please check that this version is appropriate for you!</echo>
</target>
<!-- ================================================================== -->
Oops, something went wrong.

0 comments on commit 552f776

Please sign in to comment.