svn commit: r900792 - in /ofbiz/trunk/applications/accounting: config/AccountingUiLabels.xml webapp/accounting/WEB-INF/controller.xml widget/AccountingMenus.xml widget/GlSetupForms.xml widget/GlSetupScreens.xml

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

svn commit: r900792 - in /ofbiz/trunk/applications/accounting: config/AccountingUiLabels.xml webapp/accounting/WEB-INF/controller.xml widget/AccountingMenus.xml widget/GlSetupForms.xml widget/GlSetupScreens.xml

jacopoc
Author: jacopoc
Date: Tue Jan 19 14:31:49 2010
New Revision: 900792

URL: http://svn.apache.org/viewvc?rev=900792&view=rev
Log:
Another step in the implementation of automatic transactions for fixed assets: implemented screen to setup global mappings for a specific asset


Modified:
    ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml
    ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml
    ofbiz/trunk/applications/accounting/widget/AccountingMenus.xml
    ofbiz/trunk/applications/accounting/widget/GlSetupForms.xml
    ofbiz/trunk/applications/accounting/widget/GlSetupScreens.xml

Modified: ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml?rev=900792&r1=900791&r2=900792&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml (original)
+++ ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml Tue Jan 19 14:31:49 2010
@@ -4213,6 +4213,10 @@
         <value xml:lang="th">ราคามาตรฐาน</value>
         <value xml:lang="zh">标准费用</value>
     </property>
+    <property key="AccountingFixedAssetTypeGlAccounts">
+        <value xml:lang="en">Fixed Asset Type Gl Mappings</value>
+        <value xml:lang="it">Mapping Contabili Per Cespiti</value>
+    </property>
     <property key="AccountingFixedAssetTypeId">
         <value xml:lang="ar">نوع الأصل</value>
         <value xml:lang="de">Anlagenart</value>

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=900792&r1=900791&r2=900792&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml Tue Jan 19 14:31:49 2010
@@ -2336,6 +2336,23 @@
         <response name="success" type="view" value="ShowFixedAssetDepreciation"/>
         <response name="error" type="view" value="ShowFixedAssetDepreciation"/>
     </request-map>
+    <request-map uri="FixedAssetTypeGlAccounts">
+        <security https="true" auth="true"/>
+        <response name="success" type="view" value="FixedAssetTypeGlAccounts"/>
+        <response name="error" type="view" value="FixedAssetTypeGlAccounts"/>
+    </request-map>
+    <request-map uri="createFixedAssetTypeGlAccount">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="createFixedAssetTypeGlAccount"/>
+        <response name="success" type="view" value="FixedAssetTypeGlAccounts"/>
+        <response name="error" type="view" value="FixedAssetTypeGlAccounts"/>
+    </request-map>
+    <request-map uri="deleteFixedAssetTypeGlAccount">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="deleteFixedAssetTypeGlAccount"/>
+        <response name="success" type="view" value="FixedAssetTypeGlAccounts"/>
+        <response name="error" type="view" value="FixedAssetTypeGlAccounts"/>
+    </request-map>
     <!-- Commented out for now WIP
     <request-map uri="taxAuthorityVATReport">
         <security https="true" auth="true"/>
@@ -2725,6 +2742,7 @@
     <view-map name="EditVarianceReasonGlAccounts" type="screen" page="component://accounting/widget/GlSetupScreens.xml#EditVarianceReasonGlAccounts"/>
     <view-map name="EditCreditCardTypeGlAccounts" type="screen" page="component://accounting/widget/GlSetupScreens.xml#EditCreditCardTypeGlAccounts"/>
     <view-map name="EditOrganizationTaxAuthorityGlAccounts" type="screen" page="component://accounting/widget/GlSetupScreens.xml#EditOrganizationTaxAuthorityGlAccounts"/>
+    <view-map name="FixedAssetTypeGlAccounts" type="screen" page="component://accounting/widget/GlSetupScreens.xml#FixedAssetTypeGlAccounts"/>
     <view-map name="ListGlAccountOrgPdf" type="screenfop" page="component://accounting/widget/GlSetupScreens.xml#ListGlAccountOrgPdf" content-type="application/pdf" encoding="none"/>
     <view-map name="ListGlAccountOrgCsv" type="screencsv" page="component://accounting/widget/GlSetupScreens.xml#ListGlAccountOrgCsv" content-type="text/csv" encoding="none"/>
 

Modified: ofbiz/trunk/applications/accounting/widget/AccountingMenus.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/AccountingMenus.xml?rev=900792&r1=900791&r2=900792&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/AccountingMenus.xml (original)
+++ ofbiz/trunk/applications/accounting/widget/AccountingMenus.xml Tue Jan 19 14:31:49 2010
@@ -928,6 +928,11 @@
                 <parameter param-name="organizationPartyId"/>
             </link>
         </menu-item>
+        <menu-item name="FixedAssetTypeGlAccounts" title="${uiLabelMap.AccountingFixedAssetTypeGlAccounts}">
+            <link target="FixedAssetTypeGlAccounts">
+                <parameter param-name="organizationPartyId"/>
+            </link>
+        </menu-item>
     </menu>
     <menu name="PartyAccountingChecksTabBar" extends="CommonTabBarMenu" extends-resource="component://common/widget/CommonMenus.xml"
           selected-menuitem-context-field-name="tabButtonItem2" default-menu-item-name="GlAccountSalInvoice">

Modified: ofbiz/trunk/applications/accounting/widget/GlSetupForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/GlSetupForms.xml?rev=900792&r1=900791&r2=900792&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/GlSetupForms.xml (original)
+++ ofbiz/trunk/applications/accounting/widget/GlSetupForms.xml Tue Jan 19 14:31:49 2010
@@ -1114,5 +1114,104 @@
         <field name="amountPercentage"><text/></field>
         <field name="submit" title="${uiLabelMap.CommonAdd}"><submit button-type="button"/></field>
     </form>
-
+    <form name="AddFixedAssetTypeGlAccount" type="single" target="createFixedAssetTypeGlAccount" title=""
+        header-row-style="header-row" default-table-style="basic-table">
+        <auto-fields-service service-name="createFixedAssetTypeGlAccount" default-field-type="edit"/>
+        <field name="fixedAssetId">
+            <drop-down allow-empty="false">
+                <option key="_NA_" description="${uiLabelMap.CommonAll}"/>
+                <entity-options entity-name="FixedAsset" description="${fixedAssetId} - ${fixedAssetName}">
+                    <entity-constraint name="partyId" operator="equals" env-name="organizationPartyId"/>
+                    <entity-order-by field-name="fixedAssetId"/>
+                </entity-options>
+            </drop-down>
+        </field>
+        <field name="fixedAssetTypeId">
+            <drop-down allow-empty="false">
+                <option key="_NA_" description="${uiLabelMap.CommonAll}"/>
+                <entity-options entity-name="FixedAssetType" description="${description}">
+                    <entity-order-by field-name="description"/>
+                </entity-options>
+            </drop-down>
+        </field>
+        <field name="organizationPartyId"><hidden/></field>
+        <field name="assetGlAccountId">
+            <drop-down allow-empty="true">
+                <entity-options entity-name="GlAccountOrganizationAndClass" key-field-name="glAccountId" description="${accountCode} - ${accountName} [${glAccountId}]">
+                    <entity-constraint name="organizationPartyId" operator="equals" value="${organizationPartyId}"/>
+                    <entity-constraint name="glAccountClassId" operator="equals" value="LONGTERM_ASSET"/>
+                    <entity-order-by field-name="accountCode"/>
+                </entity-options>
+            </drop-down>
+        </field>
+        <field name="accDepGlAccountId">
+            <drop-down allow-empty="true">
+                <entity-options entity-name="GlAccountOrganizationAndClass" key-field-name="glAccountId" description="${accountCode} - ${accountName} [${glAccountId}]">
+                    <entity-constraint name="organizationPartyId" operator="equals" value="${organizationPartyId}"/>
+                    <entity-constraint name="glAccountClassId" operator="equals" value="ACCUM_DEPRECIATION"/>
+                    <entity-order-by field-name="accountCode"/>
+                </entity-options>
+                <entity-options entity-name="GlAccountOrganizationAndClass" key-field-name="glAccountId" description="${accountCode} - ${accountName} [${glAccountId}]">
+                    <entity-constraint name="organizationPartyId" operator="equals" value="${organizationPartyId}"/>
+                    <entity-constraint name="glAccountClassId" operator="equals" value="ACCUM_AMORTIZATION"/>
+                    <entity-order-by field-name="accountCode"/>
+                </entity-options>
+            </drop-down>
+        </field>
+        <field name="depGlAccountId">
+            <drop-down allow-empty="true">
+                <entity-options entity-name="GlAccountOrganizationAndClass" key-field-name="glAccountId" description="${accountCode} - ${accountName} [${glAccountId}]">
+                    <entity-constraint name="organizationPartyId" operator="equals" value="${organizationPartyId}"/>
+                    <entity-constraint name="glAccountClassId" operator="equals" value="DEPRECIATION"/>
+                    <entity-order-by field-name="accountCode"/>
+                </entity-options>
+                <entity-options entity-name="GlAccountOrganizationAndClass" key-field-name="glAccountId" description="${accountCode} - ${accountName} [${glAccountId}]">
+                    <entity-constraint name="organizationPartyId" operator="equals" value="${organizationPartyId}"/>
+                    <entity-constraint name="glAccountClassId" operator="equals" value="AMORTIZATION"/>
+                    <entity-order-by field-name="accountCode"/>
+                </entity-options>
+            </drop-down>
+        </field>
+        <field name="profitGlAccountId">
+            <drop-down allow-empty="true">
+                <entity-options entity-name="GlAccountOrganizationAndClass" key-field-name="glAccountId" description="${accountCode} - ${accountName} [${glAccountId}]">
+                    <entity-constraint name="organizationPartyId" operator="equals" value="${organizationPartyId}"/>
+                    <entity-constraint name="glAccountClassId" operator="equals" value="CASH_INCOME"/>
+                    <entity-order-by field-name="accountCode"/>
+                </entity-options>
+            </drop-down>
+        </field>
+        <field name="lossGlAccountId">
+            <drop-down allow-empty="true">
+                <entity-options entity-name="GlAccountOrganizationAndClass" key-field-name="glAccountId" description="${accountCode} - ${accountName} [${glAccountId}]">
+                    <entity-constraint name="organizationPartyId" operator="equals" value="${organizationPartyId}"/>
+                    <entity-constraint name="glAccountClassId" operator="equals" value="SGA_EXPENSE"/>
+                    <entity-order-by field-name="accountCode"/>
+                </entity-options>
+            </drop-down>
+        </field>
+        <field name="submitButton" title="${uiLabelMap.CommonAdd}" widget-style="smallSubmit"><submit button-type="button"/></field>
+    </form>
+    <form name="FixedAssetTypeGlAccounts" type="list"
+        odd-row-style="alternate-row" header-row-style="header-row-2" default-table-style="basic-table hover-bar">
+        <actions>
+            <entity-condition entity-name="FixedAssetTypeGlAccount" list="fixedAssetTypeGlAccounts">
+                <condition-expr field-name="organizationPartyId" from-field="organizationPartyId"/>
+            </entity-condition>
+        </actions>
+        <field name="fixedAssetTypeId"><display-entity entity-name="FixedAssetType"/></field>
+        <field name="fixedAssetId"><display-entity entity-name="FixedAsset" description="${fixedAssetId} ${fixedAssetName}"/></field>
+        <field name="assetGlAccountId"><display-entity entity-name="GlAccount" key-field-name="glAccountId" description="${accountCode} - ${accountName} [${glAccountId}]"/></field>
+        <field name="accDepGlAccountId"><display-entity entity-name="GlAccount" key-field-name="glAccountId" description="${accountCode} - ${accountName} [${glAccountId}]"/></field>
+        <field name="depGlAccountId"><display-entity entity-name="GlAccount" key-field-name="glAccountId" description="${accountCode} - ${accountName} [${glAccountId}]"/></field>
+        <field name="profitGlAccountId"><display-entity entity-name="GlAccount" key-field-name="glAccountId" description="${accountCode} - ${accountName} [${glAccountId}]"/></field>
+        <field name="lossGlAccountId"><display-entity entity-name="GlAccount" key-field-name="glAccountId" description="${accountCode} - ${accountName} [${glAccountId}]"/></field>
+        <field name="deleteLink" title="${uiLabelMap.CommonEmptyHeader}" widget-style="buttontext">
+            <hyperlink target="deleteFixedAssetTypeGlAccount" description="${uiLabelMap.CommonDelete}" also-hidden="false">
+                <parameter param-name="fixedAssetTypeId"/>
+                <parameter param-name="fixedAssetId"/>
+                <parameter param-name="organizationPartyId"/>
+            </hyperlink>
+        </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=900792&r1=900791&r2=900792&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/GlSetupScreens.xml (original)
+++ ofbiz/trunk/applications/accounting/widget/GlSetupScreens.xml Tue Jan 19 14:31:49 2010
@@ -489,6 +489,28 @@
             </widgets>
         </section>
     </screen>
+    <screen name="FixedAssetTypeGlAccounts">
+        <section>
+            <actions>
+                <property-map resource="AccountingUiLabels" map-name="uiLabelMap" global="true"/>
+                <set field="titleProperty" value="FixedAssetTypeGlAccounts"/>
+                <set field="labelTitleProperty" value="${uiLabelMap.FixedAssetTypeGlAccounts}"/>
+                <set field="tabButtonItem" value="GlAccountAssignment"/>
+                <set field="tabButtonItem2" value="FixedAssetTypeGlAccounts"/>
+                <set field="organizationPartyId" from-field="parameters.organizationPartyId"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="CommonGlSetupDecorator" location="${parameters.commonGlSetupDecoratorLocation}">
+                    <decorator-section name="body">
+                        <screenlet id="FixedAssetTypeGlAccountPanel" title="${uiLabelMap.CommonAdd}" collapsible="true">
+                            <include-form name="AddFixedAssetTypeGlAccount" location="component://accounting/widget/GlSetupForms.xml"/>
+                        </screenlet>
+                        <include-form name="FixedAssetTypeGlAccounts" location="component://accounting/widget/GlSetupForms.xml"/>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
     <screen name="ListGlAccountOrgPdf">
         <section>
             <actions>