ilscipio/scipio-erp

View on GitHub
applications/product/widget/facility/InventoryForms.xml

Summary

Maintainability
Test Coverage
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is subject to the terms and conditions defined in the
files 'LICENSE' and 'NOTICE', which are part of this source
code package.
-->

<forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
        xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-form.xsd">
    <form name="EditInventoryItem" type="single" target="UpdateInventoryItem" title=""
        header-row-style="header-row"> <!-- orig: default-table-style=-style="basic-table" -->
        <actions>
            <set field="inventoryItemTypeId" from-field="inventoryItem.inventoryItemTypeId"/>
            <set field="productId" from-field="inventoryItem.productId"/>
            <set field="facilityId" from-field="inventoryItem.facilityId"/>
            <set field="locationSeqId" from-field="inventoryItem.locationSeqId"/>
            <set field="statusId" from-field="inventoryItem.statusId"/>
            <entity-one entity-name="FacilityLocation" value-field="facilityLocation">
                <field-map field-name="locationSeqId" from-field="locationSeqId"/>
                <field-map field-name="facilityId" from-field="facilityId"/>
            </entity-one>
        </actions>
        <alt-target use-when="inventoryItem==null" target="CreateInventoryItem"/>
        <auto-fields-service service-name="updateInventoryItem" map-name="inventoryItem"/>        

        <field use-when="inventoryItem==null" name="isCreate"><hidden value="true"/></field><!-- SCIPIO: new -->

        <!-- ignored fields -->
        <field name="oldAvailableToPromise"><ignored/></field>
        <field name="oldQuantityOnHand"><ignored/></field>
        
        <!-- custom formatted fields -->
        <field name="inventoryItemId" tooltip="${uiLabelMap.ProductNotModificationRecrationInventoryItem}" use-when="inventoryItem!=null"><display/></field>
        <field name="inventoryItemId" use-when="inventoryItem==null"><ignored/></field>
        <field name="inventoryItemTypeId" title="${uiLabelMap.ProductInventoryItemTypeId}">
            <drop-down allow-empty="false">
                <entity-options entity-name="InventoryItemType" description="${description}" key-field-name="inventoryItemTypeId"/>
            </drop-down>
        </field>
        <field name="productId" required-field="true" position="1" use-when="productId!=null">
            <lookup target-form-name="LookupProduct">
                <sub-hyperlink target="/catalog/control/ViewProduct" target-type="inter-app" description="${uiLabelMap.ProductEditProduct} [${productId}]">
                    <parameter param-name="productId"/>
                </sub-hyperlink>
            </lookup>
        </field>
        <field name="productId" required-field="true" position="1" use-when="productId==null">
            <lookup target-form-name="LookupProduct"/>
        </field>
        <field name="statusId" title="${uiLabelMap.CommonStatus}" use-when="inventoryItem==null">
            <drop-down allow-empty="true">
                <entity-options entity-name="StatusItem" description="${description}" key-field-name="statusId">
                    <entity-constraint name="statusTypeId" operator="equals" value="INV_NON_SER_STTS"/>
                </entity-options>
                <entity-options entity-name="StatusItem" description="${description}" key-field-name="statusId">
                    <entity-constraint name="statusTypeId" operator="equals" value="INV_SERIALIZED_STTS"/>
                </entity-options>
            </drop-down>
        </field>
        <field name="statusId" title="${uiLabelMap.CommonStatus}" use-when="inventoryItem!=null&amp;&amp;&quot;SERIALIZED_INV_ITEM&quot;.equals(inventoryItem.getString(&quot;inventoryItemTypeId&quot;))">
            <drop-down allow-empty="false">
                <entity-options entity-name="StatusItem" description="${description}" key-field-name="statusId">
                    <entity-constraint name="statusTypeId" operator="equals" value="INV_SERIALIZED_STTS"/>
                </entity-options>
            </drop-down>
        </field>
        <field name="statusId" title="${uiLabelMap.CommonStatus}" use-when="inventoryItem!=null&amp;&amp;&quot;NON_SERIAL_INV_ITEM&quot;.equals(inventoryItem.getString(&quot;inventoryItemTypeId&quot;))">
            <drop-down allow-empty="true">
                <entity-options entity-name="StatusItem" description="${description}" key-field-name="statusId">
                    <entity-constraint name="statusTypeId" operator="equals" value="INV_NON_SER_STTS"/>
                </entity-options>
            </drop-down>
        </field>
        <field name="expireDate" title="${uiLabelMap.ProductExpireDate}"/>
        <field name="facilityId">
            <drop-down allow-empty="true">
                <entity-options entity-name="Facility" description="${facilityName}" key-field-name="facilityId">
                    <entity-order-by field-name="facilityName"/>
                </entity-options>
                <sub-hyperlink use-when="facilityId!=null" target="EditFacility" description="${uiLabelMap.ProductEditFacility} [${facilityId}]">
                <parameter param-name="facilityId"/>
            </sub-hyperlink>
            </drop-down>
        </field>
        <field name="lotId" title="${uiLabelMap.ProductLotId}"/>
        <field name="uomId" title="${uiLabelMap.ProductUomId}"/>
        <field name="binNumber" title="${uiLabelMap.ProductBinNumber}"/>
        <field name="locationSeqId" title="${uiLabelMap.ProductFacilityLocation}">
            <lookup target-form-name="LookupFacilityLocation">
                <sub-hyperlink use-when="locationSeqId!=null" target="EditFacilityLocation">
                <parameter param-name="facilityId"/>
                <parameter param-name="locationSeqId"/>
            </sub-hyperlink>
            </lookup>
        </field>
        <field name="partyId">
            <lookup target-form-name="LookupPartyName"/>
        </field>
        <field name="ownerPartyId">
            <lookup target-form-name="LookupPartyName"/>
        </field>
        <field name="unitCost"><text/></field>

        <field name="accountingQuantityTotal" use-when="inventoryItem!=null">
            <display/>
        </field>
        <field name="accountingQuantityTotal" use-when="inventoryItem==null">
            <ignored/>
        </field>
        <field name="totals" use-when="inventoryItem!=null" title="${uiLabelMap.ProductAvailablePromiseQuantityHand}">
            <display description="${inventoryItem.availableToPromiseTotal} / ${inventoryItem.quantityOnHandTotal}"/>
        </field>

        <field use-when="inventoryItem!=null" name="submit" title="${uiLabelMap.CommonUpdate}" widget-style="${styles.link_run_sys} ${styles.action_update}">
            <submit/>
        </field>
        <field use-when="inventoryItem==null" name="submit" title="${uiLabelMap.CommonCreate}" widget-style="${styles.link_run_sys} ${styles.action_add}">
            <submit/>
        </field>
        <sort-order>
            <sort-field name="inventoryItemId"/>
            <sort-field name="inventoryItemTypeId"/>
            <sort-field name="productId"/>
            <sort-field name="totals"/>
            <sort-field name="accountingQuantityTotal"/>
            <sort-field name="partyId"/>
            <sort-field name="ownerPartyId"/>
            <sort-field name="statusId"/>
            <sort-field name="datetimeReceived"/>
            <sort-field name="datetimeManufactured"/>
            <sort-field name="expireDate"/>
            <sort-field name="facilityId"/>
            <sort-field name="containerId"/>
            <sort-field name="lotId"/>
            <sort-field name="uomId"/>
            <sort-field name="binNumber"/>
            <sort-field name="locationSeqId"/>
            <sort-field name="comments"/>
            <sort-field name="serialNumber"/>
            <sort-field name="softIdentifier"/>
            <sort-field name="activationNumber"/>
            <sort-field name="activationValidThru"/>
            <sort-field name="unitCost"/>
            <sort-field name="currencyUomId"/>
            <sort-field name="fixedAssetId"/>
            <sort-field name="submit"/>
        </sort-order>
    </form>

    <form name="CreatePhysicalInventoryAndVariance" type="single" target="createPhysicalInventoryAndVariance" title=""
       > <!-- orig: default-table-style=-style="basic-table" -->
        <auto-fields-service service-name="createPhysicalInventoryAndVariance"/>
        <field name="physicalInventoryId"><ignored/></field>
        <field name="physicalInventoryDate"><ignored/></field>
        <field name="partyId"><ignored/></field>
        <field name="generalComments"><ignored/></field>
        <field name="inventoryItemId" map-name="inventoryItem"><hidden/></field>
        <field name="varianceReasonId">
            <drop-down>
                <entity-options entity-name="VarianceReason" description="${description}">
                    <entity-order-by field-name="description"/>
                </entity-options>
            </drop-down>
        </field>
        <field name="comments"/>
        <field name="submitAction" title="${uiLabelMap.CommonAdd}" widget-style="${styles.link_run_sys} ${styles.action_add}"><submit button-type="button"/></field>
    </form>
    <form name="ViewPhysicalInventoryAndVariance" type="list" target="" title="" list-name="physicalInventoryAndVarianceDatas"
        header-row-style="header-row-2" odd-row-style="alternate-row"> <!-- orig: default-table-style=-style="basic-table hover-bar" -->
        <auto-fields-entity entity-name="PhysicalInventoryAndVariance" map-name="physicalInventoryAndVariance" default-field-type="display"/>
        <field name="inventoryItemId"><hidden/></field>
        <field name="partyId"><display description="${person.firstName} ${person.lastName} ${partyGroup.groupName} [${physicalInventoryAndVariance.partyId}]"/></field>
        <field name="varianceReasonId"><display description="${varianceReason.description}"/></field>
    </form>
    <form name="ViewInventoryItemShipmentReceipts" type="list" target="" title="" list-name="shipmentReceiptList"
        odd-row-style="alternate-row"> <!-- orig: default-table-style=-style="basic-table hover-bar" -->
        <actions>
            <entity-and entity-name="ShipmentReceipt" list="shipmentReceiptList">
                <field-map field-name="inventoryItemId"/>
            </entity-and>
        </actions>
        <auto-fields-entity entity-name="ShipmentReceipt" map-name="shipmentReceipt" default-field-type="display"/>
        <field name="inventoryItemId"><hidden/></field>
    </form>

    <form name="ListInventoryItemDetail" type="list" target="" title="" list-name="inventoryItemDetails"
        odd-row-style="alternate-row"> <!-- orig: default-table-style=-style="basic-table hover-bar" -->
        <auto-fields-entity entity-name="InventoryItemDetail" map-name="inventoryItemDetail" default-field-type="display"/>
        <field name="inventoryItemId"><hidden/></field> <!-- this field is redundant -->
        <field name="orderId" widget-style="${styles.link_nav_info_id}">
            <hyperlink target="/ordermgr/control/orderview" target-type="inter-app" description="${orderId}" >
                <parameter param-name="orderId"/>
            </hyperlink>
        </field>
        <field name="shipmentId" widget-style="${styles.link_nav_info_id}">
            <hyperlink target="EditShipment" description="${shipmentId}" >
                <parameter param-name="shipmentId"/>
            </hyperlink>
        </field>
        <field name="reasonEnumId">
            <display-entity entity-name="Enumeration" key-field-name="enumId" description="${description}"/>
        </field>
        <!-- workEffortId - not sure if it's better to show manufacturing or workeffort app
        itemIssuanceId, receiptId, physicalInventoryId - no natural screens to show these -->
    </form>
    <form name="InventoryItemReservations" type="list" target="" title="" list-name="inventoryItemReservations"
        header-row-style="header-row-2" odd-row-style="alternate-row"> <!-- orig: default-table-style=-style="basic-table hover-bar" -->
        <auto-fields-entity entity-name="OrderItemShipGrpInvRes" default-field-type="display"/>
        <field name="inventoryItemId"><hidden/></field>
        <field name="orderId" widget-style="${styles.link_nav_info_id}">
            <hyperlink target="/ordermgr/control/orderview" target-type="inter-app" description="${orderId}" >
                <parameter param-name="orderId"/>
            </hyperlink>
        </field>
    </form>
    <!-- Inventory Item Labels -->
    <form name="UpdateInventoryItemLabelAppls" type="list" target="updateInventoryItemLabelApplFromItem" title="" list-name="inventoryItemLabelAppls"
        odd-row-style="alternate-row" header-row-style="header-row-2"> <!-- orig: default-table-style=-style="basic-table hover-bar" -->
        <auto-fields-service service-name="updateInventoryItemLabelAppl"/>
        <field name="inventoryItemLabelId" title=" " widget-style="${styles.link_nav_info_id}">
            <hyperlink target="EditInventoryItemLabel" description="${inventoryItemLabelId}" also-hidden="true">
                <parameter param-name="inventoryItemLabelId"/>
            </hyperlink>
        </field>
        <field name="facilityId"><hidden/></field>
        <field name="inventoryItemId"><hidden/></field>
        <field name="inventoryItemLabelTypeId">
            <display-entity entity-name="InventoryItemLabelType" description="${description} [${inventoryItemLabelTypeId}]"/>
        </field>
        <field name="submitAction" title="${uiLabelMap.CommonUpdate}" widget-style="${styles.link_run_sys} ${styles.action_update}"><submit button-type="button"/></field>
        <field name="deleteAction" title=" " widget-style="${styles.link_run_sys} ${styles.action_remove}">
            <hyperlink target="deleteInventoryItemLabelApplFromItem" description="${uiLabelMap.CommonDelete}" also-hidden="false">
                <parameter param-name="inventoryItemId"/>
                <parameter param-name="inventoryItemLabelTypeId"/>
                <parameter param-name="inventoryItemLabelId"/>
                <parameter param-name="facilityId"/>
            </hyperlink>
        </field>
    </form>
    <form name="AddInventoryItemLabelAppl" type="single" target="createInventoryItemLabelApplFromItem" title=""
        header-row-style="header-row"> <!-- orig: default-table-style=-style="basic-table" -->
        <auto-fields-service service-name="createInventoryItemLabelAppl"/>
        <field name="facilityId"><hidden/></field>
        <field name="inventoryItemId"><hidden/></field>
        <field name="inventoryItemLabelId">
            <drop-down allow-empty="false">
                <entity-options entity-name="InventoryItemLabel" description="${inventoryItemLabelTypeId} ${inventoryItemLabelId} ${description}">
                    <entity-order-by field-name="inventoryItemLabelTypeId"/>
                    <entity-order-by field-name="inventoryItemLabelId"/>
                </entity-options>
            </drop-down>
        </field>
        <field name="submitAction" title="${uiLabelMap.CommonCreate}" widget-style="${styles.link_run_sys} ${styles.action_add}"><submit button-type="button"/></field>
    </form>

</forms>