This is an automated email from the ASF dual-hosted git repository.
golja pushed a commit to branch release24.09
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git
The following commit(s) were added to refs/heads/release24.09 by this push:
new 721c7e06bd Disable Quick Receive and Receive buttons on the Order View
page when a PO has multiple ship groups
721c7e06bd is described below
commit 721c7e06bd9f71a82846fab9c2a7bf12a22f4bf9
Author: Anahita Goljahani <[email protected]>
AuthorDate: Tue Jun 16 12:47:15 2026 +0200
Disable Quick Receive and Receive buttons on the Order View page when a PO
has multiple ship groups
The fix is needed because receive actions do not support multiple ship
groups and automatically generate multiple shipments, each duplicating all
items in the order
(cherry picked from commit d83c3fabd0abecb313a82639abe6471a98fe73dd)
---
.../order/template/order/OrderShippingInfo.ftl | 114 +++++++++++----------
1 file changed, 58 insertions(+), 56 deletions(-)
diff --git a/applications/order/template/order/OrderShippingInfo.ftl
b/applications/order/template/order/OrderShippingInfo.ftl
index 1772cae0ca..c0a92a0275 100644
--- a/applications/order/template/order/OrderShippingInfo.ftl
+++ b/applications/order/template/order/OrderShippingInfo.ftl
@@ -64,64 +64,66 @@ under the License.
<input type="hidden" name="orderId" value="${orderId}"/>
</form>
<a href="javascript:document.quickShipOrder.submit()"
class="buttontext">${uiLabelMap.OrderQuickShipEntireOrder}</a></li>
- <#else> <#-- PURCHASE_ORDER -->
+ <#else> <#-- PURCHASE_ORDER -->
<span class="label"> <#if "PURCHASE_ORDER" ==
orderHeader.orderTypeId>${uiLabelMap.ProductDestinationFacility}</#if></span>
<#if ownedFacilities?has_content>
- <#if !allShipments?has_content>
- <li>
- <form
action="/facility/control/quickReceivePurchaseOrder?externalLoginKey=${externalLoginKey}"
method="post">
- <input type="hidden" name="initialSelected" value="Y"/>
- <input type="hidden" name="orderId" value="${orderId}"/>
- <#-- destination form
(/facility/control/ReceiveInventory) wants purchaseOrderId instead of orderId,
so we set it here as a workaround -->
- <input type="hidden" name="purchaseOrderId"
value="${orderId}"/>
- <select name="facilityId">
- <#list ownedFacilities as facility>
- <option
value="${facility.facilityId}">${facility.facilityName}</option>
- </#list>
- </select>
- <input type="submit" class="smallSubmit"
value="${uiLabelMap.OrderQuickReceivePurchaseOrder}"/>
- </form>
- </li>
- <li>
- <form name="receivePurchaseOrderForm"
action="/facility/control/quickReceivePurchaseOrder?externalLoginKey=${externalLoginKey}"
method="post">
- <input type="hidden" name="initialSelected" value="Y"/>
- <input type="hidden" name="orderId" value="${orderId}"/>
- <input type="hidden" name="purchaseOrderId"
value="${orderId}"/>
- <input type="hidden" name="partialReceive" value="Y"/>
- <select name="facilityId">
- <#list ownedFacilities as facility>
- <option
value="${facility.facilityId}">${facility.facilityName}</option>
- </#list>
- </select>
- </form>
- <a
href="javascript:document.receivePurchaseOrderForm.submit()"
class="buttontext">${uiLabelMap.CommonReceive}</a>
- </li>
- <#else>
- <li>
- <form name="receiveInventoryForm"
action="/facility/control/ReceiveInventory" method="post">
- <input type="hidden" name="initialSelected" value="Y"/>
- <input type="hidden" name="purchaseOrderId"
value="${orderId!}"/>
- <select name="facilityId">
- <#list ownedFacilities as facility>
- <option
value="${facility.facilityId}">${facility.facilityName}</option>
- </#list>
- </select>
- </form>
- <a
href="javascript:document.receiveInventoryForm.submit()"
class="buttontext">${uiLabelMap.OrderQuickReceivePurchaseOrder}</a>
- </li>
- <li>
- <form name="partialReceiveInventoryForm"
action="/facility/control/ReceiveInventory" method="post">
- <input type="hidden" name="initialSelected" value="Y"/>
- <input type="hidden" name="purchaseOrderId"
value="${orderId!}"/>
- <input type="hidden" name="partialReceive" value="Y"/>
- <select name="facilityId">
- <#list ownedFacilities as facility>
- <option
value="${facility.facilityId}">${facility.facilityName}</option>
- </#list>
- </select>
- </form>
- <a
href="javascript:document.partialReceiveInventoryForm.submit()"
class="buttontext">${uiLabelMap.CommonReceive}</a>
- </li>
+ <#if shipGroups?size <= 1>
+ <#if !allShipments?has_content>
+ <li>
+ <form
action="/facility/control/quickReceivePurchaseOrder?externalLoginKey=${externalLoginKey}"
method="post">
+ <input type="hidden" name="initialSelected"
value="Y"/>
+ <input type="hidden" name="orderId"
value="${orderId}"/>
+ <#-- destination form
(/facility/control/ReceiveInventory) wants purchaseOrderId instead of orderId,
so we set it here as a workaround -->
+ <input type="hidden" name="purchaseOrderId"
value="${orderId}"/>
+ <select name="facilityId">
+ <#list ownedFacilities as facility>
+ <option
value="${facility.facilityId}">${facility.facilityName}</option>
+ </#list>
+ </select>
+ <input type="submit" class="smallSubmit"
value="${uiLabelMap.OrderQuickReceivePurchaseOrder}"/>
+ </form>
+ </li>
+ <li>
+ <form name="receivePurchaseOrderForm"
action="/facility/control/quickReceivePurchaseOrder?externalLoginKey=${externalLoginKey}"
method="post">
+ <input type="hidden" name="initialSelected"
value="Y"/>
+ <input type="hidden" name="orderId"
value="${orderId}"/>
+ <input type="hidden" name="purchaseOrderId"
value="${orderId}"/>
+ <input type="hidden" name="partialReceive"
value="Y"/>
+ <select name="facilityId">
+ <#list ownedFacilities as facility>
+ <option
value="${facility.facilityId}">${facility.facilityName}</option>
+ </#list>
+ </select>
+ </form>
+ <a
href="javascript:document.receivePurchaseOrderForm.submit()"
class="buttontext">${uiLabelMap.CommonReceive}</a>
+ </li>
+ <#else>
+ <li>
+ <form name="receiveInventoryForm"
action="/facility/control/ReceiveInventory" method="post">
+ <input type="hidden" name="initialSelected"
value="Y"/>
+ <input type="hidden" name="purchaseOrderId"
value="${orderId!}"/>
+ <select name="facilityId">
+ <#list ownedFacilities as facility>
+ <option
value="${facility.facilityId}">${facility.facilityName}</option>
+ </#list>
+ </select>
+ </form>
+ <a
href="javascript:document.receiveInventoryForm.submit()"
class="buttontext">${uiLabelMap.OrderQuickReceivePurchaseOrder}</a>
+ </li>
+ <li>
+ <form name="partialReceiveInventoryForm"
action="/facility/control/ReceiveInventory" method="post">
+ <input type="hidden" name="initialSelected"
value="Y"/>
+ <input type="hidden" name="purchaseOrderId"
value="${orderId!}"/>
+ <input type="hidden" name="partialReceive"
value="Y"/>
+ <select name="facilityId">
+ <#list ownedFacilities as facility>
+ <option
value="${facility.facilityId}">${facility.facilityName}</option>
+ </#list>
+ </select>
+ </form>
+ <a
href="javascript:document.partialReceiveInventoryForm.submit()"
class="buttontext">${uiLabelMap.CommonReceive}</a>
+ </li>
+ </#if>
</#if>
<#if orderHeader.statusId != "ORDER_COMPLETED">
<li>