svn commit: r599710 - in /ofbiz/trunk/applications/accounting: config/ script/org/ofbiz/accounting/finaccount/ servicedef/ webapp/accounting/WEB-INF/ widget/

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

svn commit: r599710 - in /ofbiz/trunk/applications/accounting: config/ script/org/ofbiz/accounting/finaccount/ servicedef/ webapp/accounting/WEB-INF/ widget/

apatel-2
Author: apatel
Date: Thu Nov 29 23:21:15 2007
New Revision: 599710

URL: http://svn.apache.org/viewvc?rev=599710&view=rev
Log:
New setup screen and CRUD services for managing organization's VarianceReasonGlAccount entries

Vikas, thanks for your contribution.

Modified:
    ofbiz/trunk/applications/accounting/config/AccountingUiLabels.properties
    ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/finaccount/FinAccountServices.xml
    ofbiz/trunk/applications/accounting/servicedef/services_ledger.xml
    ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml
    ofbiz/trunk/applications/accounting/widget/GlSetupForms.xml
    ofbiz/trunk/applications/accounting/widget/GlSetupScreens.xml
    ofbiz/trunk/applications/accounting/widget/Menus.xml

Modified: ofbiz/trunk/applications/accounting/config/AccountingUiLabels.properties
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/config/AccountingUiLabels.properties?rev=599710&r1=599709&r2=599710&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/config/AccountingUiLabels.properties (original)
+++ ofbiz/trunk/applications/accounting/config/AccountingUiLabels.properties Thu Nov 29 23:21:15 2007
@@ -432,6 +432,7 @@
 AccountingFX=Foreign Exchange Rates
 AccountingDataSourceError=Data source error
 AccountingPaymentMethodIdPaymentMethodTypeIdNullError=No values are passed for paymentMethodId or paymentMethodTypeId. At least pass paymentMethodId.
+VarianceReasonGlAccounts=Variance Reason Gl Accounts
 
 AccountingNewFixedAssetIdents=Create Fixed Asset Identification
 AccountingNewFixedAssetIdentsType=Create Fixed Asset Identification Type

Modified: ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/finaccount/FinAccountServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/finaccount/FinAccountServices.xml?rev=599710&r1=599709&r2=599710&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/finaccount/FinAccountServices.xml (original)
+++ ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/finaccount/FinAccountServices.xml Thu Nov 29 23:21:15 2007
@@ -343,4 +343,23 @@
         <entity-one entity-name="FinAccountTypeGlAccount" value-name="lookedUpValue"/>
         <remove-value value-name="lookedUpValue"/>
     </simple-method>
+    
+    <!-- VarianceReasonGlAccount methods -->
+    <simple-method method-name="createVarianceReasonGlAccount" short-description="Create a Variance Reason Gl Account">
+        <make-value entity-name="VarianceReasonGlAccount" value-name="newEntity" />
+        <set-nonpk-fields map-name="parameters" value-name="newEntity"/>
+        <set-pk-fields map-name="parameters" value-name="newEntity"/>
+        <create-value value-name="newEntity"/>
+    </simple-method>
+    
+    <simple-method method-name="updateVarianceReasonGlAccount" short-description="Update an Variance Reason Gl Account">
+        <entity-one entity-name="VarianceReasonGlAccount" value-name="lookedUpValue"/>
+        <set-nonpk-fields value-name="lookedUpValue" map-name="parameters"/>
+        <store-value value-name="lookedUpValue"/>
+    </simple-method>
+    
+    <simple-method method-name="deleteVarianceReasonGlAccount" short-description="Delete an Variance Reason Gl Account">
+        <entity-one entity-name="VarianceReasonGlAccount" value-name="lookedUpValue"/>
+        <remove-value value-name="lookedUpValue"/>
+    </simple-method>
 </simple-methods>

Modified: ofbiz/trunk/applications/accounting/servicedef/services_ledger.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/servicedef/services_ledger.xml?rev=599710&r1=599709&r2=599710&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/servicedef/services_ledger.xml (original)
+++ ofbiz/trunk/applications/accounting/servicedef/services_ledger.xml Thu Nov 29 23:21:15 2007
@@ -338,4 +338,23 @@
         <auto-attributes include="pk" mode="IN" optional="false"/>
     </service>
     
+    <!-- VarianceReasonGlAccount Services -->
+    <service name="createVarianceReasonGlAccount" default-entity-name="VarianceReasonGlAccount" engine="simple"
+                location="org/ofbiz/accounting/finaccount/FinAccountServices.xml" invoke="createVarianceReasonGlAccount" auth="true">
+        <description>create a Variance Reason Gl Account</description>
+        <auto-attributes include="pk" mode="IN" optional="false"/>
+        <auto-attributes include="nonpk" mode="IN" optional="false"/>
+    </service>
+    <service name="updateVarianceReasonGlAccount" default-entity-name="VarianceReasonGlAccount" engine="simple"
+                location="org/ofbiz/accounting/finaccount/FinAccountServices.xml" invoke="updateVarianceReasonGlAccount" auth="true">
+        <description>Update a Variance Reason Gl Account</description>
+        <auto-attributes include="pk" mode="IN" optional="false"/>
+        <auto-attributes include="nonpk" mode="IN" optional="false"/>
+    </service>
+    <service name="deleteVarianceReasonGlAccount" default-entity-name="VarianceReasonGlAccount" engine="simple"
+                location="org/ofbiz/accounting/finaccount/FinAccountServices.xml" invoke="deleteVarianceReasonGlAccount" auth="true">
+        <description>delete a Variance Reason Gl Account</description>
+        <auto-attributes include="pk" mode="IN" optional="false"/>
+    </service>
+    
 </services>

Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml?rev=599710&r1=599709&r2=599710&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml Thu Nov 29 23:21:15 2007
@@ -496,7 +496,8 @@
     <request-map uri="EditGlobalGlAccount">
         <security https="true" auth="true"/>
         <response name="success" type="view" value="EditGlobalGlAccount"/>
-    </request-map>
+    </request-map>
+    
     <request-map uri="createGlAccount">
         <security https="true" auth="true"/>
         <event type="service" invoke="createGlAccount"/>
@@ -1321,6 +1322,34 @@
         <response name="success" type="view" value="EditProductCategoryGlAccounts"/>
         <response name="error" type="view" value="EditProductCategoryGlAccounts"/>
     </request-map>
+  
+   <!--request-uri VarianceReasonGlAccount -->
+    
+    <request-map uri="editVarianceReasonGlAccounts">
+         <security https="true" auth="true"/>
+         <response name="success" type="view" value="EditVarianceReasonGlAccounts"/>
+    </request-map>
+    
+     <request-map uri="createVarianceReasonGlAccount">
+         <security https="true" auth="true"/>
+         <event type="service" invoke="createVarianceReasonGlAccount"/>
+         <response name="success" type="view" value="EditVarianceReasonGlAccounts"/>
+         <response name="error" type="view" value="EditVarianceReasonGlAccounts"/>
+     </request-map>
+    
+    <request-map uri="updateVarianceReasonGlAccount">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="updateVarianceReasonGlAccount"/>
+        <response name="success" type="view" value="EditVarianceReasonGlAccounts"/>
+        <response name="error" type="view" value="EditVarianceReasonGlAccounts"/>
+    </request-map>
+    
+    <request-map uri="deleteVarianceReasonGlAccount">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="deleteVarianceReasonGlAccount"/>
+        <response name="success" type="view" value="EditVarianceReasonGlAccounts"/>
+        <response name="error" type="view" value="EditVarianceReasonGlAccounts"/>
+    </request-map>
     
     <!-- Actually reconcile account -->
     <request-map uri="reconcileGlAccount">
@@ -1671,7 +1700,8 @@
     <view-map name="GlAccountNrPaymentMethod" type="screen" page="component://accounting/widget/GlSetupScreens.xml#GlAccountNrPaymentMethod"/>
     <view-map name="EditProductGlAccounts" type="screen" page="component://accounting/widget/GlSetupScreens.xml#EditProductGlAccounts"/>
     <view-map name="EditProductCategoryGlAccounts" type="screen" page="component://accounting/widget/GlSetupScreens.xml#EditProductCategoryGlAccounts"/>    
-    
+    <view-map name="EditVarianceReasonGlAccounts" type="screen" page="component://accounting/widget/GlSetupScreens.xml#EditVarianceReasonGlAccounts"/>
+        
     <!-- Manual Credit Card Transaction -->
     <view-map name="FindGatewayResponses" page="component://accounting/widget/TransactionScreens.xml#FindGatewayResponses" type="screen"/>
     <view-map name="ViewGatewayResponse" page="component://accounting/widget/TransactionScreens.xml#ViewGatewayResponse" type="screen"/>

Modified: ofbiz/trunk/applications/accounting/widget/GlSetupForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/GlSetupForms.xml?rev=599710&r1=599709&r2=599710&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/GlSetupForms.xml (original)
+++ ofbiz/trunk/applications/accounting/widget/GlSetupForms.xml Thu Nov 29 23:21:15 2007
@@ -582,4 +582,36 @@
         <field name="submitButton" title="${uiLabelMap.CommonAdd}"><submit button-type="button"/></field>
     </form>
     
+    <form name="ListVarianceReasonGlAccounts" type="list" target="updateVarianceReasonGlAccount" list-name="varianceReasonGlAccounts">
+        <auto-fields-service service-name="updateVarianceReasonGlAccount" default-field-type="display"/>
+        <field name="organizationPartyId"><hidden/></field>
+        <field name="varianceReasonId"><display-entity entity-name="VarianceReason"/></field>
+        <field name="glAccountId" title="${uiLabelMap.AccountingGlAccountId}">
+            <drop-down allow-empty="false">                
+                <list-options key-name="accountCode" list-name="glAccounts" description="${accountCode} ${accountName}"/>
+            </drop-down>
+        </field>    
+        <field name="deleteLink" title="${uiLabelMap.CommonEmptyHeader}" widget-style="buttontext">
+            <hyperlink target="deleteVarianceReasonGlAccount?organizationPartyId=${organizationPartyId}&amp;varianceReasonId=${varianceReasonId}" description="${uiLabelMap.CommonRemove}"/>
+        </field>
+        <field name="submitButton" title="${uiLabelMap.CommonUpdate}" widget-style="smallSubmit"><submit button-type="button"/></field>
+    </form>
+    
+    <form name="AddVarianceReasonGlAccount" type="single" target="createVarianceReasonGlAccount">
+        <field name="organizationPartyId"><hidden/></field>
+        <field name="varianceReasonId" title="${uiLabelMap.FormFieldTitle_varianceReasonId}">
+            <drop-down allow-empty="false">
+                <entity-options entity-name="VarianceReason" description="${description}">
+                    <entity-order-by field-name="varianceReasonId"/>
+                </entity-options>
+            </drop-down>
+        </field>
+        <field name="glAccountId" title="${uiLabelMap.FormFieldTitle_glAccountTypeId}">
+            <drop-down allow-empty="false">
+                <list-options key-name="accountCode" list-name="glAccounts" description="${accountCode} ${accountName}"/>
+            </drop-down>
+        </field>
+        <field name="submitButton" title="${uiLabelMap.CommonAdd}"><submit button-type="button"/></field>
+    </form>
+  
 </forms>

Modified: ofbiz/trunk/applications/accounting/widget/GlSetupScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/GlSetupScreens.xml?rev=599710&r1=599709&r2=599710&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/GlSetupScreens.xml (original)
+++ ofbiz/trunk/applications/accounting/widget/GlSetupScreens.xml Thu Nov 29 23:21:15 2007
@@ -405,4 +405,38 @@
         </section>
     </screen>
     
+    <screen name="EditVarianceReasonGlAccounts">
+        <section>
+            <actions>
+                <property-map resource="AccountingUiLabels" map-name="uiLabelMap" global="true"/>
+                <set field="titleProperty" value="VarianceReasonGlAccount"/>
+                <set field="tabButtonItem" value="GlAccountAssignment"/>
+                <set field="tabButtonItem2" value="VarianceReasonGlAccounts"/>
+                <set field="labelTitleProperty" value="${uiLabelMap.VarianceReasonGlAccount}"/>                
+                <set field="organizationPartyId" from-field="parameters.organizationPartyId" />
+                
+                <entity-condition entity-name="VarianceReasonGlAccount" list-name="varianceReasonGlAccounts">
+                    <condition-expr field-name="organizationPartyId" env-name="organizationPartyId"/>
+                    <order-by field-name="glAccountId"/>
+                </entity-condition>
+                <entity-condition entity-name="GlAccountOrganizationAndClass" list-name="glAccounts" use-cache="true">
+                    <condition-expr field-name="organizationPartyId" env-name="organizationPartyId"/>
+                    <order-by field-name="accountCode"/>
+                </entity-condition>
+            </actions>
+            <widgets>
+                <decorator-screen name="CommonAdminDecorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <container>
+                            <include-form name="ListVarianceReasonGlAccounts" location="component://accounting/widget/GlSetupForms.xml"/>
+                            <container>
+                                <label style="head2">${uiLabelMap.VarianceReasonGlAccount}</label>
+                            </container>
+                            <include-form name="AddVarianceReasonGlAccount" location="component://accounting/widget/GlSetupForms.xml"/>
+                        </container>
+                    </decorator-section>
+                </decorator-screen>        
+            </widgets>    
+        </section>
+    </screen>
 </screens>

Modified: ofbiz/trunk/applications/accounting/widget/Menus.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/Menus.xml?rev=599710&r1=599709&r2=599710&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/Menus.xml (original)
+++ ofbiz/trunk/applications/accounting/widget/Menus.xml Thu Nov 29 23:21:15 2007
@@ -475,6 +475,9 @@
         <menu-item name="GlAccountNrPaymentMethod" title="${uiLabelMap.AccountingPaymentMethodId}/${uiLabelMap.AccountingGlAccountId}">
             <link target="GlAccountNrPaymentMethod?organizationPartyId=${organizationPartyId}"/>
         </menu-item>
+        <menu-item name="VarianceReasonGlAccounts" title="${uiLabelMap.VarianceReasonGlAccounts}">
+            <link target="editVarianceReasonGlAccounts?organizationPartyId=${organizationPartyId}"/>
+        </menu-item>
     </menu>
     <menu name="PartyAccountingChecksTabBar" selected-menuitem-context-field-name="tabButtonItem2" default-menu-item-name="GlAccountSalInvoice" default-selected-style="selected"
         menu-container-style="button-bar tab-bar" type="simple">