Author: jacopoc
Date: Mon Dec 18 23:24:01 2006 New Revision: 488562 URL: http://svn.apache.org/viewvc?view=rev&rev=488562 Log: Applied patch from Anil Patel to combine ListFixedAssetStdCosts and EditFixedAssetStdCost defined in FixedAssetScreens.xml into one screen: OFBIZ-553 Modified: incubator/ofbiz/trunk/applications/accounting/config/AccountingUiLabels.properties incubator/ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/fixedasset/FixedAssetServices.xml incubator/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml incubator/ofbiz/trunk/applications/accounting/webapp/accounting/fixedasset/FixedAssetForms.xml incubator/ofbiz/trunk/applications/accounting/widget/FixedAssetScreens.xml incubator/ofbiz/trunk/applications/accounting/widget/Menus.xml Modified: incubator/ofbiz/trunk/applications/accounting/config/AccountingUiLabels.properties URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/accounting/config/AccountingUiLabels.properties?view=diff&rev=488562&r1=488561&r2=488562 ============================================================================== --- incubator/ofbiz/trunk/applications/accounting/config/AccountingUiLabels.properties (original) +++ incubator/ofbiz/trunk/applications/accounting/config/AccountingUiLabels.properties Mon Dec 18 23:24:01 2006 @@ -170,6 +170,7 @@ AccountingFixedAssetRollUp=RollUp AccountingFixedAssetStdCostTypeId=Standard Cost Type AccountingFixedAssetStdCosts=Standard Costs +AccountingFixedAssetStdCostAlreadyExists=Standard Cost already Exists AccountingFixedAssetTypeId=Asset Type AccountingFixedAssets=Fixed Assets AccountingFixedAssetIdents=Identifications @@ -447,6 +448,7 @@ PageTitleMain=Main Page PageTitlePaymentOverview=Payment Overview +PageTitleEditFixedAssetStdCosts=Edit Standard Cost PageTitleFindTaxAuthority=Find Tax Authority PageTitleEditTaxAuthority=Edit Tax Authority PageTitleEditTaxAuthorityCategories=Edit Tax Authority Product Categories Modified: incubator/ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/fixedasset/FixedAssetServices.xml URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/fixedasset/FixedAssetServices.xml?view=diff&rev=488562&r1=488561&r2=488562 ============================================================================== --- incubator/ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/fixedasset/FixedAssetServices.xml (original) +++ incubator/ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/fixedasset/FixedAssetServices.xml Mon Dec 18 23:24:01 2006 @@ -398,6 +398,14 @@ <check-errors/> <!-- TODO: we should cancel the existing costs of the same type --> <!-- create new entity and create all the fields --> + + <!-- Check, should not exist already --> + <entity-one entity-name="FixedAssetStdCost" value-name="fixedAssetStdCost"/> + <if-not-empty field-name="fixedAssetStdCost"> + <add-error><fail-property resource="AccountingUiLabels" property="AccountingFixedAssetStdCostAlreadyExists"/></add-error> + </if-not-empty> + <check-errors/> + <make-value value-name="newEntity" entity-name="FixedAssetStdCost"/> <set-nonpk-fields map-name="parameters" value-name="newEntity"/> <set-pk-fields map-name="parameters" value-name="newEntity"/> Modified: incubator/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml?view=diff&rev=488562&r1=488561&r2=488562 ============================================================================== --- incubator/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml (original) +++ incubator/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml Mon Dec 18 23:24:01 2006 @@ -598,23 +598,25 @@ </request-map> <!-- ================ FixedAsset Standard Costs Requests ================= --> <request-map uri="FixedAssetChildren"><security https="true" auth="true"/><response name="success" type="view" value="FixedAssetChildren"/></request-map> - <request-map uri="ListFixedAssetStdCosts"><security https="true" auth="true"/><response name="success" type="view" value="ListFixedAssetStdCosts"/></request-map> - <request-map uri="EditFixedAssetStdCost"><security https="true" auth="true"/><response name="success" type="view" value="EditFixedAssetStdCost"/></request-map> + <request-map uri="EditFixedAssetStdCosts"> + <security https="true" auth="true"/> + <response name="success" type="view" value="EditFixedAssetStdCosts"/> + </request-map> <request-map uri="createFixedAssetStdCost"> <security https="true" auth="true"/> <event type="service" path="" invoke="createFixedAssetStdCost"/> - <response name="success" type="view" value="ListFixedAssetStdCosts"/> + <response name="success" type="view" value="EditFixedAssetStdCosts"/> </request-map> <request-map uri="updateFixedAssetStdCost"> <security https="true" auth="true"/> <event type="service" path="" invoke="updateFixedAssetStdCost"/> - <response name="success" type="view" value="ListFixedAssetStdCosts"/> + <response name="success" type="view" value="EditFixedAssetStdCosts"/> </request-map> <request-map uri="cancelFixedAssetStdCost"> <security https="true" auth="true"/> <event type="service" path="" invoke="cancelFixedAssetStdCost"/> - <response name="success" type="view" value="ListFixedAssetStdCosts"/> + <response name="success" type="view" value="EditFixedAssetStdCosts"/> </request-map> <!-- =============== Agreement mapping =================--> <request-map uri="FindAgreement"><security https="true" auth="true"/><response name="success" type="view" value="FindAgreement"/></request-map> @@ -1251,8 +1253,7 @@ <view-map name="updateFixedAssetCalendar" type="screen" page="component://accounting/widget/FixedAssetScreens.xml#updateFixedAssetCalendar"/> <view-map name="ListFixedAssetParties" type="screen" page="component://accounting/widget/FixedAssetScreens.xml#ListFixedAssetParties"/> <view-map name="ListFixedAssetsRollUp" type="screen" page="component://accounting/widget/FixedAssetScreens.xml#ListFixedAssetRollUp"/> - <view-map name="ListFixedAssetStdCosts" type="screen" page="component://accounting/widget/FixedAssetScreens.xml#ListFixedAssetStdCosts"/> - <view-map name="EditFixedAssetStdCost" type="screen" page="component://accounting/widget/FixedAssetScreens.xml#EditFixedAssetStdCost"/> + <view-map name="EditFixedAssetStdCosts" type="screen" page="component://accounting/widget/FixedAssetScreens.xml#EditFixedAssetStdCosts"/> <view-map name="FixedAssetChildren" type="screen" page="component://accounting/widget/FixedAssetScreens.xml#FixedAssetChildren"/> <!-- agreements --> <view-map name="FindAgreement" type="screen" page="component://accounting/widget/AgreementScreens.xml#FindAgreement"/> Modified: incubator/ofbiz/trunk/applications/accounting/webapp/accounting/fixedasset/FixedAssetForms.xml URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/accounting/webapp/accounting/fixedasset/FixedAssetForms.xml?view=diff&rev=488562&r1=488561&r2=488562 ============================================================================== --- incubator/ofbiz/trunk/applications/accounting/webapp/accounting/fixedasset/FixedAssetForms.xml (original) +++ incubator/ofbiz/trunk/applications/accounting/webapp/accounting/fixedasset/FixedAssetForms.xml Mon Dec 18 23:24:01 2006 @@ -167,34 +167,44 @@ <field name="submitButton" title="${uiLabelMap.CommonUpdate}" widget-style="smallSubmit"><submit button-type="button"/></field> </form> - <form name="ListFixedAssetStdCosts" default-title-style="tableheadtext" - default-tooltip-style="tabletext" default-widget-style="tabletext" - list-name="fixedAssetStdCosts" target="" paginate-target="ListFixedAssetStdCosts" title="" type="list"> - <auto-fields-entity entity-name="FixedAssetStdCost" default-field-type="display"/> - <field name="fixedAssetId" title="${uiLabelMap.AccountingAgreementId}"><hidden/></field> + <form name="ListFixedAssetStdCosts" list-name="fixedAssetStdCosts" type="list" target="updateFixedAssetStdCost" paginate-target="EditFixedAssetStdCosts" + default-title-style="tableheadtext" default-widget-style="tabletext" default-tooltip-style="tabletext" title="" > + <actions> + <entity-condition entity-name="FixedAssetStdCost"> + <condition-expr field-name="fixedAssetId" env-name="fixedAssetId"/> + <order-by field-name="fromDate"/> + </entity-condition> + </actions> + <auto-fields-entity entity-name="FixedAssetStdCost"/> + <field name="fixedAssetId"><hidden/></field> + <field name="fromDate" title="${uiLabelMap.CommonFromDate}"><display/></field> <field name="fixedAssetStdCostTypeId" title="${uiLabelMap.AccountingFixedAssetStdCostTypeId}"> <display-entity entity-name="FixedAssetStdCostType" /> </field> - <field name="edit" title="" widget-style="buttontext"> - <hyperlink also-hidden="false" description="${uiLabelMap.CommonEdit}" target="EditFixedAssetStdCost?fixedAssetId=${fixedAssetId}&fixedAssetStdCostTypeId=${fixedAssetStdCostTypeId}&fromDate=${fromDate}"/> + <field name="amountUomId"> + <drop-down allow-empty="true"> + <entity-options description="${uomId} - ${description}" entity-name="Uom" key-field-name="uomId"> + <entity-constraint name="uomTypeId" operator="equals" value="CURRENCY_MEASURE"/> + <entity-order-by field-name="uomId"/> + </entity-options> + </drop-down> </field> <field name="cancel" title="" widget-style="buttontext"> <hyperlink also-hidden="false" description="${uiLabelMap.CommonCancel}" target="cancelFixedAssetStdCost?fixedAssetId=${fixedAssetId}&fixedAssetStdCostTypeId=${fixedAssetStdCostTypeId}&fromDate=${fromDate}"/> </field> + <field name="submitButton" title="${uiLabelMap.CommonUpdate}" widget-style="smallSubmit"><submit button-type="button"/></field> </form> <form name="EditFixedAssetStdCost" type="single" - target="updateFixedAssetStdCost" title="" default-map-name="fixedAssetStdCost" + target="createFixedAssetStdCost" title="" default-map-name="fixedAssetStdCost" default-title-style="tableheadtext" default-widget-style="inputBox" default-tooltip-style="tabletext"> - <alt-target use-when="fixedAssetStdCost==null" target="createFixedAssetStdCost"/> - <auto-fields-entity entity-name="FixedAssetStdCost" default-field-type="edit"/> + <auto-fields-service service-name="createFixedAssetStdCost" default-field-type="edit"/> <field name="fixedAssetId"><hidden/></field> - <field name="fixedAssetStdCostTypeId" use-when="fixedAssetStdCost!=null" title="${uiLabelMap.AccountingFixedAssetStdCostTypeId}"><display-entity entity-name="FixedAssetStdCostType" /></field> - <field name="fixedAssetStdCostTypeId" use-when="fixedAssetStdCost==null" title="${uiLabelMap.AccountingFixedAssetStdCostTypeId}"> + <field name="fixedAssetStdCostTypeId" title="${uiLabelMap.AccountingFixedAssetStdCostTypeId}"> <drop-down allow-empty="true"> <entity-options description="${description}" entity-name="FixedAssetStdCostType" key-field-name="fixedAssetStdCostTypeId"/> </drop-down> </field> - <field name="fromDate" use-when="fixedAssetStdCost!=null" title="${uiLabelMap.CommonFromDate}"><display/></field> + <field name="fromDate" title="${uiLabelMap.CommonFromDate}"/> <field name="amountUomId"> <drop-down allow-empty="true"> <entity-options description="${uomId} - ${description}" entity-name="Uom" key-field-name="uomId"> @@ -203,7 +213,7 @@ </entity-options> </drop-down> </field> - <field name="submitButton" title="${uiLabelMap.CommonSubmit}" widget-style="smallSubmit"><submit button-type="button"/></field> + <field name="submitButton" title="${uiLabelMap.CommonAdd}" widget-style="smallSubmit"><submit button-type="button"/></field> </form> <!-- list all assets in a tabular format --> Modified: incubator/ofbiz/trunk/applications/accounting/widget/FixedAssetScreens.xml URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/accounting/widget/FixedAssetScreens.xml?view=diff&rev=488562&r1=488561&r2=488562 ============================================================================== --- incubator/ofbiz/trunk/applications/accounting/widget/FixedAssetScreens.xml (original) +++ incubator/ofbiz/trunk/applications/accounting/widget/FixedAssetScreens.xml Mon Dec 18 23:24:01 2006 @@ -134,45 +134,20 @@ </section> </screen> - <screen name="ListFixedAssetStdCosts"> - <section> - <actions> - <set field="titleProperty" value="PageTitleListFixedAssetStdCosts"/> - <set field="tabButtonItem" value="ListFixedAssetStdCosts"/> - <set field="labelTitleProperty" value="AccountingFixedAssetStdCosts"/> - <set field="fixedAssetId" from-field="parameters.fixedAssetId"/> - <entity-one entity-name="FixedAsset" value-name="fixedAsset" auto-field-map="true"/> - <entity-and entity-name="FixedAssetStdCost" list-name="fixedAssetStdCosts"> - <field-map env-name="fixedAsset.fixedAssetId" field-name="fixedAssetId"/> - </entity-and> - </actions> - <widgets> - <decorator-screen name="CommonFixedAssetDecorator" location="${parameters.mainDecoratorLocation}"> - <decorator-section name="body"> - <container><link target="EditFixedAssetStdCost?fixedAssetId=${fixedAsset.fixedAssetId}" text="${uiLabelMap.AccountingNewFixedAssetStdCost}" style="buttontext"/></container> - <include-form name="ListFixedAssetStdCosts" location="component://accounting/webapp/accounting/fixedasset/FixedAssetForms.xml"/> - </decorator-section> - </decorator-screen> - </widgets> - </section> - </screen> - <screen name="EditFixedAssetStdCost"> + <screen name="EditFixedAssetStdCosts"> <section> <actions> <set field="titleProperty" value="PageTitleEditFixedAssetStdCost"/> - <set field="tabButtonItem" value="ListFixedAssetStdCosts"/> - + <set field="tabButtonItem" value="EditFixedAssetStdCosts"/> + <set field="labelTitleProperty" value="PageTitleEditFixedAssetStdCosts"/> <set field="fixedAssetId" from-field="parameters.fixedAssetId"/> - <set field="fixedAssetStdCostTypeId" from-field="parameters.fixedAssetStdCostTypeId"/> - <set field="fromDate" from-field="parameters.fromDate"/> <entity-one entity-name="FixedAsset" value-name="fixedAsset" auto-field-map="true"/> - <entity-one entity-name="FixedAssetStdCost" value-name="fixedAssetStdCost" auto-field-map="true"/> </actions> <widgets> <decorator-screen name="CommonFixedAssetDecorator" location="${parameters.mainDecoratorLocation}"> <decorator-section name="body"> - <container><link target="EditFixedAssetStdCost?fixedAssetId=${fixedAsset.fixedAssetId}" text="${uiLabelMap.AccountingNewFixedAssetStdCost}" style="buttontext"/></container> + <include-form name="ListFixedAssetStdCosts" location="component://accounting/webapp/accounting/fixedasset/FixedAssetForms.xml"/> <include-form name="EditFixedAssetStdCost" location="component://accounting/webapp/accounting/fixedasset/FixedAssetForms.xml"/> </decorator-section> </decorator-screen> Modified: incubator/ofbiz/trunk/applications/accounting/widget/Menus.xml URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/accounting/widget/Menus.xml?view=diff&rev=488562&r1=488561&r2=488562 ============================================================================== --- incubator/ofbiz/trunk/applications/accounting/widget/Menus.xml (original) +++ incubator/ofbiz/trunk/applications/accounting/widget/Menus.xml Mon Dec 18 23:24:01 2006 @@ -353,8 +353,8 @@ <menu-item name="ListFixedAssetCalendar" title="${uiLabelMap.AccountingFixedAssetCalendar}"> <link target="ListFixedAssetCalendar?fixedAssetId=${fixedAssetId}"/> </menu-item> - <menu-item name="ListFixedAssetStdCosts" title="${uiLabelMap.AccountingFixedAssetStdCosts}"> - <link target="ListFixedAssetStdCosts?fixedAssetId=${fixedAssetId}"/> + <menu-item name="EditFixedAssetStdCosts" title="${uiLabelMap.AccountingFixedAssetStdCosts}"> + <link target="EditFixedAssetStdCosts?fixedAssetId=${fixedAssetId}"/> </menu-item> <menu-item name="EditFixedAssetIdents" title="${uiLabelMap.AccountingFixedAssetIdents}"> <link target="EditFixedAssetIdents?fixedAssetId=${fixedAssetId}"/> |
Free forum by Nabble | Edit this page |