Misc enhancements to the "shipment plan" screen.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@884592 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jacopo Cappellato
2009-11-26 15:38:37 +00:00
parent c0ccc25289
commit eee2746ed7
2 changed files with 27 additions and 7 deletions
@@ -17,6 +17,7 @@
* under the License.
*/
import org.ofbiz.manufacturing.jobshopmgt.ProductionRun;
// **************************************
// ShipmentPlan list form
@@ -144,18 +145,22 @@ if (shipmentPlans) {
widthUom.abbreviation + "x" +
depthUom.abbreviation;
}
rows.add(oneRow);
// Select the production runs, if available
productionRuns = delegator.findByAnd("WorkOrderItemFulfillment", [orderId : shipmentPlan.orderId , orderItemSeqId : shipmentPlan.orderItemSeqId],["workEffortId"]); // TODO: add shipmentId
if (productionRuns) {
workInProgress = "true";
productionRunsId = "";
productionRuns.each { productionRun ->
productionRunsId = productionRun.workEffortId + " " + productionRunsId;
productionRunRow = new HashMap();
productionRunRow.put("productionRunId", productionRun.workEffortId);
ProductionRun productionRunWrapper = new ProductionRun(productionRun.workEffortId, delegator, dispatcher);
productionRunRow.put("productionRunEstimatedCompletionDate", productionRunWrapper.getEstimatedCompletionDate());
productionRunRow.put("productionRunStatusId", productionRunWrapper.getGenericValue().currentStatusId);
productionRunRow.put("productionRunQuantityProduced", productionRunWrapper.getGenericValue().quantityProduced);
rows.add(productionRunRow);
}
oneRow.productionRuns = productionRunsId;
}
rows.add(oneRow);
}
context.workInProgress = workInProgress;
context.shipmentPlan = rows;
@@ -738,7 +738,11 @@ under the License.
<!-- List for Shipment Plan -->
<form name="listShipmentPlan" type="list" target="" title="" list-name="shipmentPlan"
odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
<field name="orderId" title="${uiLabelMap.ProductOrderId}"><display/></field>
<field name="orderId" widget-style="buttontext">
<hyperlink target="/ordermgr/control/orderview" target-type="inter-app" description="${orderId}">
<parameter param-name="orderId" from-field="orderId"/>
</hyperlink>
</field>
<field name="orderItemSeqId" title="${uiLabelMap.ProductOrderItem}"><display/></field>
<field name="productId" title="${uiLabelMap.ProductProductId}"><display/></field>
<!-- quantity planned in this shipment -->
@@ -753,12 +757,23 @@ under the License.
<field name="totPlannedQuantity"><display/></field>
<!-- total issued quantity -->
<field name="totIssuedQuantity"><display/></field>
<field name="productionRuns"><display/></field>
<field name="productionRunId" widget-style="buttontext">
<hyperlink target="ShowProductionRun" description="${productionRunId}" also-hidden="false">
<parameter param-name="productionRunId" from-field="productionRunId"/>
</hyperlink>
</field>
<field name="productionRunStatusId"><display-entity entity-name="StatusItem" key-field-name="statusId"/></field>
<field name="productionRunEstimatedCompletionDate"><display/></field>
<field name="productionRunQuantityProduced"><display/></field>
</form>
<form name="listShipmentPlans" type="list" target="" title="" list-name="shipmentPlans"
odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
<field name="shipmentId"><display/></field>
<field name="shipmentId" widget-style="buttontext">
<hyperlink target="/facility/control/ViewShipment" target-type="inter-app" description="${shipmentId}">
<parameter param-name="shipmentId" from-field="shipmentId"/>
</hyperlink>
</field>
<field name="statusId">
<display-entity entity-name="StatusItem" key-field-name="statusId" description="${description}"/>
</field>