svn commit: r418539 - in /incubator/ofbiz/trunk/applications/accounting: script/org/ofbiz/accounting/agreement/ servicedef/ webapp/accounting/WEB-INF/ webapp/accounting/agreement/ webapp/accounting/fixedasset/ widget/

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r418539 - in /incubator/ofbiz/trunk/applications/accounting: script/org/ofbiz/accounting/agreement/ servicedef/ webapp/accounting/WEB-INF/ webapp/accounting/agreement/ webapp/accounting/fixedasset/ widget/

jonesde
Author: jonesde
Date: Sat Jul  1 18:05:50 2006
New Revision: 418539

URL: http://svn.apache.org/viewvc?rev=418539&view=rev
Log:
Applied patch from Anil Patel with some AgreementTerm screen cleanups and enhancements

Modified:
    incubator/ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/agreement/AgreementServices.xml
    incubator/ofbiz/trunk/applications/accounting/servicedef/services_agreement.xml
    incubator/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml
    incubator/ofbiz/trunk/applications/accounting/webapp/accounting/agreement/AgreementForms.xml
    incubator/ofbiz/trunk/applications/accounting/webapp/accounting/agreement/AgreementTabBar.ftl
    incubator/ofbiz/trunk/applications/accounting/webapp/accounting/fixedasset/FixedAssetForms.xml
    incubator/ofbiz/trunk/applications/accounting/widget/AgreementScreens.xml

Modified: incubator/ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/agreement/AgreementServices.xml
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/agreement/AgreementServices.xml?rev=418539&r1=418538&r2=418539&view=diff
==============================================================================
--- incubator/ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/agreement/AgreementServices.xml (original)
+++ incubator/ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/agreement/AgreementServices.xml Sat Jul  1 18:05:50 2006
@@ -175,11 +175,11 @@
         <check-errors/>
     </simple-method>
 
-    <!-- remove an existing AgreementTerm -->
-    <simple-method method-name="removeAgreementTerm" short-description="Remove an existing AgreementTerm">
+    <!-- delete an existing AgreementTerm -->
+    <simple-method method-name="deleteAgreementTerm" short-description="Delete an existing AgreementTerm">
         <check-permission permission="ACCOUNTING" action="_UPDATE">
             <alt-permission permission="ACCOUNTING_ROLE" action="_UPDATE"/>
-            <fail-message message="Security Error: to run removeAgreementTerm you must have the ACCOUNTING_UPDATE or ACCOUNTING_ADMIN permission, or the limited ACCOUNTING_ROLE_UPDATE permission"/>
+            <fail-message message="Security Error: to run deleteAgreementTerm you must have the ACCOUNTING_UPDATE or ACCOUNTING_ADMIN permission, or the limited ACCOUNTING_ROLE_UPDATE permission"/>
         </check-permission>
         <check-errors/>
         <entity-one entity-name="AgreementTerm" value-name="agreementTerm" auto-field-map="true"/>

Modified: incubator/ofbiz/trunk/applications/accounting/servicedef/services_agreement.xml
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/accounting/servicedef/services_agreement.xml?rev=418539&r1=418538&r2=418539&view=diff
==============================================================================
--- incubator/ofbiz/trunk/applications/accounting/servicedef/services_agreement.xml (original)
+++ incubator/ofbiz/trunk/applications/accounting/servicedef/services_agreement.xml Sat Jul  1 18:05:50 2006
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8" ?>
+?xml version="1.0" encoding="UTF-8" ?>
 <!--
  *  Copyright (c) 2001-2005 The Open For Business Project - www.ofbiz.org
  *
@@ -78,9 +78,9 @@
         <auto-attributes include="pk" mode="IN" optional="true"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
     </service>
-    <service name="removeAgreementTerm" default-entity-name="AgreementTerm" engine="simple"
-                location="org/ofbiz/accounting/agreement/AgreementServices.xml" invoke="removeAgreementTerm" auth="true">
-        <description>Remove an AgreementTerm</description>
+    <service name="deleteAgreementTerm" default-entity-name="AgreementTerm" engine="simple"
+                location="org/ofbiz/accounting/agreement/AgreementServices.xml" invoke="deleteAgreementTerm" auth="true">
+        <description>Delete an AgreementTerm</description>
         <auto-attributes include="pk" mode="IN" optional="true"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
     </service>

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?rev=418539&r1=418538&r2=418539&view=diff
==============================================================================
--- incubator/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml (original)
+++ incubator/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml Sat Jul  1 18:05:50 2006
@@ -652,28 +652,27 @@
         <response name="error" type="view" value="EditAgreementItem"/>
     </request-map>
     
-    <request-map uri="ListAgreementTerms"><security https="true" auth="true"/><response name="success" type="view" value="ListAgreementTerms"/></request-map>
-    <request-map uri="removeAgreementTerm">
-        <security https="true" auth="true"/>
-        <event type="service" path="" invoke="removeAgreementTerm"/>
-        <response name="success" type="view" value="ListAgreementTerms"/>
-        <response name="error" type="view" value="ListAgreementTerms"/>
-    </request-map>
-
-    <request-map uri="EditAgreementTerm"><security https="true" auth="true"/><response name="success" type="view" value="EditAgreementTerm"/></request-map>
+    <request-map uri="EditAgreementTerms"><security https="true" auth="true"/><response name="success" type="view" value="EditAgreementTerms"/></request-map>
     <request-map uri="createAgreementTerm">
         <security https="true" auth="true"/>
         <event type="service" path="" invoke="createAgreementTerm"/>
-        <response name="success" type="view" value="EditAgreementTerm"/>
-        <response name="error" type="view" value="EditAgreementTerm"/>
+        <response name="success" type="view" value="EditAgreementTerms"/>
+        <response name="error" type="view" value="EditAgreementTerms"/>
     </request-map>
     <request-map uri="updateAgreementTerm">
         <security https="true" auth="true"/>
         <event type="service" path="" invoke="updateAgreementTerm"/>
-        <response name="success" type="view" value="EditAgreementTerm"/>
-        <response name="error" type="view" value="EditAgreementTerm"/>
+        <response name="success" type="view" value="EditAgreementTerms"/>
+        <response name="error" type="view" value="EditAgreementTerms"/>
     </request-map>
-
+    <request-map uri="deleteAgreementTerm">
+        <security https="true" auth="true"/>
+        <event type="service" path="" invoke="deleteAgreementTerm"/>
+        <response name="success" type="view" value="EditAgreementTerms"/>
+        <response name="error" type="view" value="EditAgreementTerms"/>
+    </request-map>
+    
+    
     <request-map uri="ListAgreementPromoAppls"><security https="true" auth="true"/><response name="success" type="view" value="ListAgreementPromoAppls"/></request-map>
     <request-map uri="removeAgreementPromoAppl">
         <security https="true" auth="true"/>
@@ -1241,8 +1240,7 @@
     <view-map name="EditAgreement" type="screen" page="component://accounting/widget/AgreementScreens.xml#EditAgreement"/>
     <view-map name="ListAgreementItems" type="screen" page="component://accounting/widget/AgreementScreens.xml#ListAgreementItems"/>
     <view-map name="EditAgreementItem" type="screen" page="component://accounting/widget/AgreementScreens.xml#EditAgreementItem"/>
-    <view-map name="ListAgreementTerms" type="screen" page="component://accounting/widget/AgreementScreens.xml#ListAgreementTerms"/>
-    <view-map name="EditAgreementTerm" type="screen" page="component://accounting/widget/AgreementScreens.xml#EditAgreementTerm"/>
+    <view-map name="EditAgreementTerms" type="screen" page="component://accounting/widget/AgreementScreens.xml#EditAgreementTerms"/>
     <view-map name="ListAgreementPromoAppls" type="screen" page="component://accounting/widget/AgreementScreens.xml#ListAgreementPromoAppls"/>
     <view-map name="EditAgreementPromoAppl" type="screen" page="component://accounting/widget/AgreementScreens.xml#EditAgreementPromoAppl"/>
     <view-map name="ListAgreementItemTerms" type="screen" page="component://accounting/widget/AgreementScreens.xml#ListAgreementItemTerms"/>

Modified: incubator/ofbiz/trunk/applications/accounting/webapp/accounting/agreement/AgreementForms.xml
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/accounting/webapp/accounting/agreement/AgreementForms.xml?rev=418539&r1=418538&r2=418539&view=diff
==============================================================================
--- incubator/ofbiz/trunk/applications/accounting/webapp/accounting/agreement/AgreementForms.xml (original)
+++ incubator/ofbiz/trunk/applications/accounting/webapp/accounting/agreement/AgreementForms.xml Sat Jul  1 18:05:50 2006
@@ -157,44 +157,54 @@
         </field>
     </form>
 
-    <form name="ListAgreementTerms" default-title-style="tableheadtext"
+    <form name="ListAgreementItemTerms" default-title-style="tableheadtext"
             default-tooltip-style="tabletext" default-widget-style="tabletext" list-name="agreementTerms"
-            target="" paginate-target="ListAgreementTerms" title="" type="list">
+            target="" paginate-target="ListAgreementItemTerms" title="" type="list">
         <auto-fields-entity entity-name="AgreementTerm" default-field-type="display"/>
         <field name="agreementId" title="${uiLabelMap.AccountingAgreementId}"><hidden/></field>
         <field name="agreementItemSeqId" title="${uiLabelMap.AccountingAgreementItemSeqId}"><hidden/></field>
         <field name="agreementTermId" title="${uiLabelMap.CommonEdit}" widget-style="buttontext">
-            <hyperlink also-hidden="false" description="${agreementTermId}" target="EditAgreementTerm?agreementTermId=${agreementTermId}&amp;agreementId=${agreementId}"/>
+            <hyperlink also-hidden="false" description="${agreementTermId}" target="EditAgreementItemTerm?agreementTermId=${agreementTermId}&amp;agreementId=${agreementId}&amp;agreementItemSeqId=${agreementItemSeqId}"/>
         </field>
         <field name="termTypeId" title="${uiLabelMap.AccountingTermTypeId}">
             <display-entity entity-name="TermType"/>
         </field>
         <field name="deleteLink" title="" widget-style="buttontext">
-            <hyperlink target="removeAgreementTerm?agreementTermId=${agreementTermId}&amp;agreementId=${agreementId}" description="[${uiLabelMap.CommonRemove}]" also-hidden="false"/>
+            <hyperlink target="removeAgreementItemTerm?agreementTermId=${agreementTermId}&amp;agreementId=${agreementId}&amp;agreementItemSeqId=${agreementItemSeqId}" description="[${uiLabelMap.CommonRemove}]" also-hidden="false"/>
         </field>
     </form>
-    <form name="ListAgreementItemTerms" default-title-style="tableheadtext"
-            default-tooltip-style="tabletext" default-widget-style="tabletext" list-name="agreementTerms"
-            target="" paginate-target="ListAgreementItemTerms" title="" type="list">
-        <auto-fields-entity entity-name="AgreementTerm" default-field-type="display"/>
+    <form name="ListAgreementTerms" default-title-style="tableheadtext"
+        default-tooltip-style="tabletext" default-widget-style="tabletext" list-name="agreementTerms"
+        target="updateAgreementTerm" paginate-target="ListAgreementTerms" title="" type="list">
+        <actions>
+            <entity-condition entity-name="AgreementTerm">
+                <condition-expr field-name="agreementId" env-name="agreementId"/>
+            </entity-condition>
+        </actions>
+        <auto-fields-service service-name="updateAgreementTerm" />
         <field name="agreementId" title="${uiLabelMap.AccountingAgreementId}"><hidden/></field>
+        <field name="agreementTermId" ><hidden/></field>
         <field name="agreementItemSeqId" title="${uiLabelMap.AccountingAgreementItemSeqId}"><hidden/></field>
-        <field name="agreementTermId" title="${uiLabelMap.CommonEdit}" widget-style="buttontext">
-            <hyperlink also-hidden="false" description="${agreementTermId}" target="EditAgreementItemTerm?agreementTermId=${agreementTermId}&amp;agreementId=${agreementId}&amp;agreementItemSeqId=${agreementItemSeqId}"/>
-        </field>
         <field name="termTypeId" title="${uiLabelMap.AccountingTermTypeId}">
             <display-entity entity-name="TermType"/>
         </field>
+        <field name="invoiceItemTypeId" widget-style="selectBox">
+            <drop-down allow-empty="false">
+                <entity-options entity-name="InvoiceItemType" description="${description}">
+                    <entity-order-by field-name="description"/>
+                </entity-options>
+            </drop-down>
+        </field>
         <field name="deleteLink" title="" widget-style="buttontext">
-            <hyperlink target="removeAgreementItemTerm?agreementTermId=${agreementTermId}&amp;agreementId=${agreementId}&amp;agreementItemSeqId=${agreementItemSeqId}" description="[${uiLabelMap.CommonRemove}]" also-hidden="false"/>
+            <hyperlink target="deleteAgreementTerm?agreementTermId=${agreementTermId}&amp;agreementId=${agreementId}" description="[${uiLabelMap.CommonRemove}]" also-hidden="false"/>
         </field>
+        <field name="submitButton" title="${uiLabelMap.CommonUpdate}" widget-style="smallSubmit"><submit button-type="button"/></field>
     </form>
-    <form name="EditAgreementTerm" type="single"
-            target="updateAgreementTerm" title="" default-map-name="agreementTerm"
+    <form name="AddAgreementTerm" type="single"
+            target="createAgreementTerm" title="" default-map-name="agreementTerm"
             default-title-style="tableheadtext" default-widget-style="inputBox" default-tooltip-style="tabletext">
-        <alt-target use-when="agreementTerm==null" target="createAgreementTerm"/>
         <auto-fields-entity entity-name="AgreementTerm" default-field-type="edit"/>
-        <field name="agreementTermId" title="${uiLabelMap.AccountingAgreementTermId}"><display/></field>
+        <field name="agreementTermId" title="${uiLabelMap.AccountingAgreementTermId}"><hidden/></field>
         <field name="termTypeId" title="${uiLabelMap.AccountingTermTypeId}">
             <drop-down allow-empty="true">
                 <entity-options entity-name="TermType" description="${description}"/>
@@ -202,6 +212,13 @@
         </field>
         <field name="agreementId" title="${uiLabelMap.AccountingAgreementId}"><hidden/></field>
         <field name="agreementItemSeqId" title="${uiLabelMap.AccountingAgreementItemSeqId}"><hidden/></field>
+        <field name="invoiceItemTypeId" widget-style="selectBox">
+            <drop-down allow-empty="false">
+                <entity-options entity-name="InvoiceItemType" description="${description}">
+                    <entity-order-by field-name="description"/>
+                </entity-options>
+            </drop-down>
+        </field>
         <field name="submitButton" title="${uiLabelMap.CommonSubmit}" widget-style="smallSubmit">
             <submit button-type="button"/>
         </field>

Modified: incubator/ofbiz/trunk/applications/accounting/webapp/accounting/agreement/AgreementTabBar.ftl
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/accounting/webapp/accounting/agreement/AgreementTabBar.ftl?rev=418539&r1=418538&r2=418539&view=diff
==============================================================================
--- incubator/ofbiz/trunk/applications/accounting/webapp/accounting/agreement/AgreementTabBar.ftl (original)
+++ incubator/ofbiz/trunk/applications/accounting/webapp/accounting/agreement/AgreementTabBar.ftl Sat Jul  1 18:05:50 2006
@@ -30,7 +30,7 @@
 <#if agreement?has_content>
     <div class="tabContainer">
         <a href="<@ofbizUrl>EditAgreement?agreementId=${agreement.agreementId}</@ofbizUrl>" class="${selectedClassMap.EditAgreement?default(unselectedClassName)}">${uiLabelMap.AccountingAgreement}</a>
-        <a href="<@ofbizUrl>ListAgreementTerms?agreementId=${agreement.agreementId}</@ofbizUrl>" class="${selectedClassMap.ListAgreementTerms?default(unselectedClassName)}">${uiLabelMap.AccountingAgreementTerms}</a>
+        <a href="<@ofbizUrl>EditAgreementTerms?agreementId=${agreement.agreementId}</@ofbizUrl>" class="${selectedClassMap.EditAgreementTerms?default(unselectedClassName)}">${uiLabelMap.AccountingAgreementTerms}</a>
         <a href="<@ofbizUrl>ListAgreementItems?agreementId=${agreement.agreementId}</@ofbizUrl>" class="${selectedClassMap.ListAgreementItems?default(unselectedClassName)}">${uiLabelMap.AccountingAgreementItems}</a>
     </div>
 </#if>

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?rev=418539&r1=418538&r2=418539&view=diff
==============================================================================
--- incubator/ofbiz/trunk/applications/accounting/webapp/accounting/fixedasset/FixedAssetForms.xml (original)
+++ incubator/ofbiz/trunk/applications/accounting/webapp/accounting/fixedasset/FixedAssetForms.xml Sat Jul  1 18:05:50 2006
@@ -90,6 +90,8 @@
         <field name="parentFixedAssetId"><lookup target-form-name="LookupFixedAsset"/></field>
         <field name="locatedAtFacilityId" title=""><lookup target-form-name="LookupFacility"/></field>        
         <field name="locatedAtLocationSeqId" title=""><lookup target-form-name="LookupFacilityLocation"/></field>        
+        <field name="locatedAtFacilityId" title=""><lookup target-form-name="LookupFacility"/></field>        
+        <field name="locatedAtLocationSeqId" title=""><lookup target-form-name="LookupFacilityLocation"/></field>        
         
         <field name="submitButton" title="${uiLabelMap.CommonUpdate}" widget-style="smallSubmit"><submit button-type="button"/></field>
     </form>

Modified: incubator/ofbiz/trunk/applications/accounting/widget/AgreementScreens.xml
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/accounting/widget/AgreementScreens.xml?rev=418539&r1=418538&r2=418539&view=diff
==============================================================================
--- incubator/ofbiz/trunk/applications/accounting/widget/AgreementScreens.xml (original)
+++ incubator/ofbiz/trunk/applications/accounting/widget/AgreementScreens.xml Sat Jul  1 18:05:50 2006
@@ -156,53 +156,21 @@
             </widgets>
         </section>
     </screen>
-    <screen name="ListAgreementTerms">
+    <screen name="EditAgreementTerms">
         <section>
             <actions>
-                <set field="title" value="List Agreement Terms"/>
-                <set field="titleProperty" value="PageTitleListAgreementTerms"/>
-                <set field="headerItem" value="agreement"/>
-                <set field="tabButtonItem" value="ListAgreementTerms"/>
-    
-                <entity-one entity-name="Agreement" value-name="agreement" auto-field-map="true"/>
-                <entity-and entity-name="AgreementTerm" list-name="agreementTerms">
-                    <field-map env-name="agreement.agreementId" field-name="agreementId"/>
-                    <field-map env-name="null" field-name="agreementItemSeqId"/>
-                </entity-and>
-            </actions>
-            <widgets>
-                <decorator-screen name="CommonAgreementDecorator">
-                    <decorator-section name="body">
-                        <container>
-                            <link target="EditAgreementTerm?agreementId=${agreement.agreementId}" text="[${uiLabelMap.AccountingNewAgreementTerm}]" style="buttontext"/>
-                        </container>
-                        <include-form name="ListAgreementTerms" location="component://accounting/webapp/accounting/agreement/AgreementForms.xml"/>
-                    </decorator-section>
-                </decorator-screen>
-            </widgets>
-        </section>
-    </screen>
-    <screen name="EditAgreementTerm">
-        <section>
-            <actions>
-                <set field="title" value="Edit Agreement Term"/>
+                <set field="title" value="Edit Agreement Terms"/>
                 <set field="titleProperty" value="PageTitleEditAgreementTerm"/>
                 <set field="headerItem" value="agreement"/>
-                <set field="tabButtonItem" value="ListAgreementTerms"/>
-                
+                <set field="tabButtonItem" value="EditAgreementTerms"/>
                 <set field="agreementId" from-field="parameters.agreementId"/>
-                <set field="agreementTermId" from-field="parameters.agreementTermId"/>
-
                 <entity-one entity-name="Agreement" value-name="agreement" auto-field-map="true"/>
-                <entity-one entity-name="AgreementTerm" value-name="agreementTerm"/>
             </actions>
             <widgets>
                 <decorator-screen name="CommonAgreementDecorator">
                     <decorator-section name="body">
-                        <container>
-                            <link target="EditAgreementTerm?agreementId=${agreement.agreementId}" text="[${uiLabelMap.AccountingNewAgreementTerm}]" style="buttontext"/>
-                        </container>
-                        <include-form name="EditAgreementTerm" location="component://accounting/webapp/accounting/agreement/AgreementForms.xml"/>
+                        <include-form name="ListAgreementTerms" location="component://accounting/webapp/accounting/agreement/AgreementForms.xml"/>
+                        <include-form name="AddAgreementTerm" location="component://accounting/webapp/accounting/agreement/AgreementForms.xml"/>
                     </decorator-section>
                 </decorator-screen>
             </widgets>