Author: jacopoc
Date: Fri Sep 8 01:55:29 2006 New Revision: 441441 URL: http://svn.apache.org/viewvc?view=rev&rev=441441 Log: Implemented searches by unassigned purchase requirements and added supplier id to requirement info. Modified: incubator/ofbiz/trunk/applications/order/entitydef/entitymodel_view.xml incubator/ofbiz/trunk/applications/order/script/org/ofbiz/order/requirement/RequirementServices.xml incubator/ofbiz/trunk/applications/order/servicedef/services_requirement.xml incubator/ofbiz/trunk/applications/order/webapp/ordermgr/requirement/RequirementForms.xml Modified: incubator/ofbiz/trunk/applications/order/entitydef/entitymodel_view.xml URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/order/entitydef/entitymodel_view.xml?view=diff&rev=441441&r1=441440&r2=441441 ============================================================================== --- incubator/ofbiz/trunk/applications/order/entitydef/entitymodel_view.xml (original) +++ incubator/ofbiz/trunk/applications/order/entitydef/entitymodel_view.xml Fri Sep 8 01:55:29 2006 @@ -1172,7 +1172,7 @@ <alias entity-alias="RQR" name="roleTypeId"/> <alias entity-alias="RQR" name="fromDate"/> <alias entity-alias="RQR" name="thruDate"/> - <view-link entity-alias="RQ" rel-entity-alias="RQR"> + <view-link entity-alias="RQ" rel-entity-alias="RQR" rel-optional="true"> <key-map field-name="requirementId"/> </view-link> <relation type="one-nofk" rel-entity-name="Requirement"> Modified: incubator/ofbiz/trunk/applications/order/script/org/ofbiz/order/requirement/RequirementServices.xml URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/order/script/org/ofbiz/order/requirement/RequirementServices.xml?view=diff&rev=441441&r1=441440&r2=441441 ============================================================================== --- incubator/ofbiz/trunk/applications/order/script/org/ofbiz/order/requirement/RequirementServices.xml (original) +++ incubator/ofbiz/trunk/applications/order/script/org/ofbiz/order/requirement/RequirementServices.xml Fri Sep 8 01:55:29 2006 @@ -65,15 +65,8 @@ <simple-method method-name="getRequirementsForSupplier" short-description="Get the requirements applicable to a given supplier"> <make-value value-name="newEntity" entity-name="Requirement"/> - <if-empty field-name="parameters.partyId"> - <entity-condition entity-name="Requirement" list-name="requirementsForSupplier"> - <condition-list> - <condition-object field-name="parameters.requirementConditions"/> - <condition-expr field-name="statusId" value="REQ_APPROVED"/> - <condition-expr field-name="requirementTypeId" value="PRODUCT_REQUIREMENT"/> - </condition-list> - </entity-condition> - <else> + <if-not-empty field-name="parameters.partyId"> + <!-- all the product requirements that are assigned to the given supplier are shown --> <entity-condition entity-name="RequirementAndRole" list-name="requirementsForSupplier"> <condition-list> <condition-object field-name="parameters.requirementConditions"/> @@ -83,8 +76,35 @@ <condition-expr field-name="partyId" env-name="parameters.partyId"/> </condition-list> </entity-condition> + <else> + <if-not-empty field-name="parameters.unassignedRequirements"> + <!-- only the product requirements that are not assigned to a supplier are shown --> + <entity-condition entity-name="RequirementAndRole" list-name="requirementsForSupplier"> + <condition-list> + <condition-object field-name="parameters.requirementConditions"/> + <condition-expr field-name="statusId" value="REQ_APPROVED"/> + <condition-expr field-name="requirementTypeId" value="PRODUCT_REQUIREMENT"/> + <condition-expr field-name="partyId" env-name="null"/> + </condition-list> + </entity-condition> + <else> + <!-- all the product requirements that are assigned to suppliers are shown --> + <entity-condition entity-name="RequirementAndRole" list-name="requirementsForSupplier"> + <condition-list> + <condition-object field-name="parameters.requirementConditions"/> + <condition-expr field-name="statusId" value="REQ_APPROVED"/> + <condition-expr field-name="requirementTypeId" value="PRODUCT_REQUIREMENT"/> + <condition-expr field-name="roleTypeId" value="SUPPLIER"/> + </condition-list> + </entity-condition> + </else> + </if-not-empty> + </else> + </if-not-empty> + <if-not-empty field-name="parameters.assignedRequirements"> + <else> </else> - </if-empty> + </if-not-empty> <field-to-result field-name="requirementsForSupplier" result-name="requirementsForSupplier"/> </simple-method> Modified: incubator/ofbiz/trunk/applications/order/servicedef/services_requirement.xml URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/order/servicedef/services_requirement.xml?view=diff&rev=441441&r1=441440&r2=441441 ============================================================================== --- incubator/ofbiz/trunk/applications/order/servicedef/services_requirement.xml (original) +++ incubator/ofbiz/trunk/applications/order/servicedef/services_requirement.xml Fri Sep 8 01:55:29 2006 @@ -95,6 +95,7 @@ <description>Retrieves requirements information for suppliers</description> <attribute mode="IN" name="requirementConditions" type="org.ofbiz.entity.condition.EntityCondition" optional="true"/> <attribute mode="IN" name="partyId" type="String" optional="true"/> + <attribute mode="IN" name="unassignedRequirements" type="String" optional="true"/> <attribute mode="IN" name="currencyUomId" type="String" optional="true"/> <attribute mode="OUT" name="requirementsForSupplier" type="java.util.List" optional="true"/> </service> Modified: incubator/ofbiz/trunk/applications/order/webapp/ordermgr/requirement/RequirementForms.xml URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/order/webapp/ordermgr/requirement/RequirementForms.xml?view=diff&rev=441441&r1=441440&r2=441441 ============================================================================== --- incubator/ofbiz/trunk/applications/order/webapp/ordermgr/requirement/RequirementForms.xml (original) +++ incubator/ofbiz/trunk/applications/order/webapp/ordermgr/requirement/RequirementForms.xml Fri Sep 8 01:55:29 2006 @@ -161,7 +161,7 @@ <field name="partyId" use-when="requirementRole==null"><lookup target-form-name="LookupPartyName"/></field> <field name="roleTypeId" use-when="requirementRole!=null"><display-entity entity-name="RoleType"/></field> <field name="roleTypeId" use-when="requirementRole==null"> - <drop-down allow-empty="false"> + <drop-down allow-empty="false" no-current-selected-key="SUPPLIER"> <entity-options entity-name="RoleType" description="${description}"/> </drop-down> </field> @@ -204,7 +204,7 @@ </service> </actions> <field name="requirementId" widget-style="buttontext"> - <hyperlink target-type="intra-app" also-hidden="true" description="${requirementId}" target="EditRequirement?requirementId=${requirementId}"/> + <hyperlink also-hidden="true" description="${requirementId}" target="EditRequirement?requirementId=${requirementId}"/> </field> <field name="requirementTypeId"> <display-entity entity-name="RequirementType" also-hidden="true"/> @@ -225,6 +225,7 @@ <field name="showList"><hidden value="Y"/></field> <field name="requirementId"><text-find/></field> <field name="partyId" title="${uiLabelMap.PartySupplier}"><lookup target-form-name="LookupPartyName"/></field> + <field name="unassignedRequirements"><check/></field> <field name="productId" title="${uiLabelMap.ProductProductId}"><lookup target-form-name="LookupProduct"/></field> <field name="requirementByDate"><date-find type="date"/></field> <field name="submitButton" title="${uiLabelMap.CommonLookup}" widget-style="smallSubmit"><submit button-type="button"/></field> @@ -240,13 +241,17 @@ <!--<field-map field-name="orderByList" env-name="resultConditions.orderByList"/>--> <field-map field-name="requirementConditions" env-name="resultConditions.entityConditionList"/> <field-map field-name="partyId" env-name="parameters.partyId"/> + <field-map field-name="unassignedRequirements" env-name="parameters.unassignedRequirements"/> </service> </actions> - <field name="requirementId"><display/></field> + <field name="requirementId" widget-style="buttontext"> + <hyperlink also-hidden="true" description="${requirementId}" target="EditRequirement?requirementId=${requirementId}"/> + </field> <field name="productId"><hidden value="${productId}"/></field> <field name="productId"> <display-entity entity-name="Product" key-field-name="productId" description="${productId} - ${internalName}"/> </field> + <field name="partyId"><display/></field> <field name="requiredByDate"><display/></field> <field name="quantity"><display/></field> </form> @@ -265,12 +270,13 @@ </actions> <field name="billToCustomerPartyId"><hidden value="Company"/></field> <field name="supplierPartyId"><hidden value="${parameters.partyId}"/></field> - <field name="requirementId"><display/></field> + <field name="requirementId" widget-style="buttontext"> + <hyperlink also-hidden="true" description="${requirementId}" target="EditRequirement?requirementId=${requirementId}"/> + </field> <field name="productId"><hidden value="${productId}"/></field> <field name="productId"> <display-entity entity-name="Product" key-field-name="productId" description="${productId} - ${internalName}"/> </field> - <field name="requiredByDate"><display/></field> <field name="quantity"><text/></field> <field name="_rowSubmit" title="${uiLabelMap.CommonSelect}"><check/></field> |
Free forum by Nabble | Edit this page |