You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by as...@apache.org on 2007/12/17 23:55:53 UTC

svn commit: r605032 - in /ofbiz/trunk/applications/accounting: config/ script/org/ofbiz/accounting/invoice/ servicedef/ webapp/accounting/WEB-INF/ webapp/accounting/includes/ widget/

Author: ashish
Date: Mon Dec 17 14:55:52 2007
New Revision: 605032

URL: http://svn.apache.org/viewvc?rev=605032&view=rev
Log:
Applied patch from JIRA Issue # OFBIZ-1504.

Thanks to Alok Agnihotri for your patch.

We are also thankful to Pranay Pandey,Rishi Solanki,Alok Agnihotri and others for helping him in the implementation of this work.

Added:
    ofbiz/trunk/applications/accounting/widget/InvoiceItemTypeForms.xml   (with props)
    ofbiz/trunk/applications/accounting/widget/InvoiceItemTypeScreens.xml   (with props)
Modified:
    ofbiz/trunk/applications/accounting/config/AccountingUiLabels.properties
    ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml
    ofbiz/trunk/applications/accounting/servicedef/services_invoice.xml
    ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml
    ofbiz/trunk/applications/accounting/webapp/accounting/includes/appheader.ftl

Modified: ofbiz/trunk/applications/accounting/config/AccountingUiLabels.properties
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/config/AccountingUiLabels.properties?rev=605032&r1=605031&r2=605032&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/config/AccountingUiLabels.properties (original)
+++ ofbiz/trunk/applications/accounting/config/AccountingUiLabels.properties Mon Dec 17 14:55:52 2007
@@ -243,6 +243,7 @@
 AccountingInvoiceItem=Invoice Item
 AccountingInvoiceItemAdd=Add a new invoice Item
 AccountingInvoiceItemSeqId=Item Nr
+AccountingInvoiceItemType=Invoice Item Type
 AccountingInvoiceItems=Items
 AccountingInvoiceOverview=Overview
 AccountingInvoicePaid=Paid
@@ -272,6 +273,7 @@
 AccountingLiabilities=Liabilities
 AccountingListPaymentMethodType=Payment Method Type List
 AccountingListInvoicesNotYetApplied=Possible invoices to apply
+AccountingListInvoiceItemType=Invoice Item Type List
 AccountingListPaymentsNotYetApplied=Possible payments to apply
 AccountingLineTotal=Line Total
 AccountingLeaveEmptyForMaximumAmount=Leave empty for maximum amount
@@ -485,6 +487,7 @@
 PageTitleFindGlobalGlAccount=Find Global GL Account
 PageTitleFindInvoice=Find Invoice
 PageTitleFindPayment=Find Payment
+PageTitleInvoiceItemType=List Invoice Item Type
 PageTitleInvoiceOverview=Invoice Overview
 PageTitleListAccounts=List Accounts
 PageTitleListAgreementGeographicalApplic=List Agreement Geographical Applic

Modified: ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml?rev=605032&r1=605031&r2=605032&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml (original)
+++ ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml Mon Dec 17 14:55:52 2007
@@ -506,4 +506,10 @@
         <create-value value-name="invoiceContactMech"/>
         <field-to-result field-name="contactMechId" map-name="invoiceContactMech"/>
     </simple-method>
-</simple-methods>
+    
+    <simple-method method-name="updateInvoiceItemType"  short-description="Updates a InvoiceItemType Record">
+        <entity-one entity-name="InvoiceItemType" value-name="lookedUpValue"/>
+        <set-nonpk-fields value-name="lookedUpValue" map-name="parameters"/>
+        <store-value value-name="lookedUpValue"/>
+   </simple-method>
+</simple-methods>
\ No newline at end of file

Modified: ofbiz/trunk/applications/accounting/servicedef/services_invoice.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/servicedef/services_invoice.xml?rev=605032&r1=605031&r2=605032&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/servicedef/services_invoice.xml (original)
+++ ofbiz/trunk/applications/accounting/servicedef/services_invoice.xml Mon Dec 17 14:55:52 2007
@@ -267,4 +267,11 @@
         <description>Accounting Invoice Permission Checking Logic</description>
         <implements service="permissionInterface"/>
     </service>
-</services>
+    <!-- Update InvoiceItemType -->
+    <service name="updateInvoiceItemType" engine="simple" default-entity-name="InvoiceItemType"
+        location="org/ofbiz/accounting/invoice/InvoiceServices.xml" invoke="updateInvoiceItemType">
+        <description>Update Invoice Item Type Record</description>
+        <auto-attributes mode="IN" include="pk" optional="false"/>
+        <auto-attributes mode="IN" include="nonpk" optional="true"/>
+    </service>
+</services>
\ No newline at end of file

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=605032&r1=605031&r2=605032&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml Mon Dec 17 14:55:52 2007
@@ -277,6 +277,18 @@
         <response name="error" type="view" value="invoiceOverview"/>
     </request-map>
     
+     <!-- Request EditInvoiceItemType -->
+    <request-map uri="editInvoiceItemType">
+        <security https="true" auth="true"/>
+        <response name="success" type="view" value="EditInvoiceItemType"/>
+    </request-map>
+    <request-map uri="updateInvoiceItemType">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="updateInvoiceItemType"/>
+        <response name="success" type="view" value="EditInvoiceItemType"/>
+        <response name="error" type="view" value="EditInvoiceItemType"/>
+    </request-map>
+    
     <!-- payment requests -->
     <request-map uri="findPayments">
         <security https="true" auth="true"/>
@@ -1688,6 +1700,7 @@
     <view-map name="editInvoiceApplications" type="screen" page="component://accounting/widget/InvoiceScreens.xml#EditInvoiceApplications"/>
     <view-map name="invoiceRoles" type="screen" page="component://accounting/widget/InvoiceScreens.xml#InvoiceRoles"/>
     <view-map name="sendPerEmail" type="screen" page="component://accounting/widget/InvoiceScreens.xml#SendPerEmail"/>
+    <view-map name="EditInvoiceItemType" type="screen" page="component://accounting/widget/InvoiceItemTypeScreens.xml#EditInvoiceItemType"/>
     
     <!-- Payment -->
     <view-map name="findPayments" type="screen" page="component://accounting/widget/PaymentScreens.xml#FindPayments"/>

Modified: ofbiz/trunk/applications/accounting/webapp/accounting/includes/appheader.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/includes/appheader.ftl?rev=605032&r1=605031&r2=605032&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/includes/appheader.ftl (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/includes/appheader.ftl Mon Dec 17 14:55:52 2007
@@ -37,6 +37,7 @@
     <li<#if selected == "companies"> class="selected"</#if>><a href="<@o...@ofbizUrl>">${uiLabelMap.AccountingGeneralLedger}</a></li>
     <li<#if selected == "costs"> class="selected"</#if>><a href="<@o...@ofbizUrl>">${uiLabelMap.ManufacturingCostCalcs}</a></li>
     <li<#if selected == "PaymentMethodTypes"> class="selected"</#if>><a href="<@o...@ofbizUrl>">${uiLabelMap.AccountingPaymentMethodType}</a></li>
+    <li<#if selected == "InvoiceItemTypes"> class="selected"</#if>><a href="<@o...@ofbizUrl>">${uiLabelMap.AccountingInvoiceItemType}</a></li>
     <#if userLogin?has_content>
       <li class="opposed"><a href="<@o...@ofbizUrl>">${uiLabelMap.CommonLogout}</a></li>
     <#else>

Added: ofbiz/trunk/applications/accounting/widget/InvoiceItemTypeForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/InvoiceItemTypeForms.xml?rev=605032&view=auto
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/InvoiceItemTypeForms.xml (added)
+++ ofbiz/trunk/applications/accounting/widget/InvoiceItemTypeForms.xml Mon Dec 17 14:55:52 2007
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-form.xsd">
+    
+     <form name="ListInvoiceItemType" type="list" target="updateInvoiceItemType" list-name="invoiceItemTypes">
+        <field name="invoiceItemTypeId" title="InvoiceItemTypeId"><display/></field>
+        <field name="description"><display/></field>
+        <field name="defaultGlAccountId" title="${uiLabelMap.ProductGlAccount}" parameter-name="defaultGlAccountId">
+            <drop-down allow-empty="true">
+                <entity-options description="${glAccountId} : ${accountName}" entity-name="GlAccount" key-field-name="glAccountId">
+                    <entity-order-by field-name="glAccountId"/>
+                </entity-options>
+            </drop-down>
+        </field>
+        <field name="submitButton" title="${uiLabelMap.CommonUpdate}" widget-style="smallSubmit"><submit button-type="button"/></field>
+    </form>
+    
+</forms>
\ No newline at end of file

Propchange: ofbiz/trunk/applications/accounting/widget/InvoiceItemTypeForms.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/applications/accounting/widget/InvoiceItemTypeForms.xml
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/trunk/applications/accounting/widget/InvoiceItemTypeForms.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: ofbiz/trunk/applications/accounting/widget/InvoiceItemTypeScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/InvoiceItemTypeScreens.xml?rev=605032&view=auto
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/InvoiceItemTypeScreens.xml (added)
+++ ofbiz/trunk/applications/accounting/widget/InvoiceItemTypeScreens.xml Mon Dec 17 14:55:52 2007
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<screens xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+    xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-screen.xsd">
+    
+    <screen name="EditInvoiceItemType">
+        <section>
+            <actions>
+                <set field="titleProperty" value="PageTitleInvoiceItemType"/>
+                <set field="headerItem" value="InvoiceItemTypes"/>
+                <set field="viewIndex" from-field="parameters.VIEW_INDEX" type="Integer" default-value="0"/>
+                <set field="viewSize" from-field="parameters.VIEW_SIZE" type="Integer" default-value="10"/>
+                <entity-condition entity-name="InvoiceItemType" list-name="invoiceItemTypes">
+                    <order-by field-name="invoiceItemTypeId"/>
+                </entity-condition>    
+            </actions>
+            <widgets>
+                <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <container><label style="head1">${uiLabelMap.AccountingListInvoiceItemType}</label></container>
+                        <include-form name="ListInvoiceItemType" location="component://accounting/widget/InvoiceItemTypeForms.xml"/>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+    
+</screens>
\ No newline at end of file

Propchange: ofbiz/trunk/applications/accounting/widget/InvoiceItemTypeScreens.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/applications/accounting/widget/InvoiceItemTypeScreens.xml
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/trunk/applications/accounting/widget/InvoiceItemTypeScreens.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml