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 22:20:04 UTC

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

Author: ashish
Date: Mon Dec 17 13:20:03 2007
New Revision: 605007

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

Thanks to Brajesh Patel 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/PaymentMethodTypeForms.xml   (with props)
    ofbiz/trunk/applications/accounting/widget/PaymentMethodTypeScreens.xml   (with props)
Modified:
    ofbiz/trunk/applications/accounting/config/AccountingUiLabels.properties
    ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/payment/PaymentMethodServices.xml
    ofbiz/trunk/applications/accounting/servicedef/services_paymentmethod.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=605007&r1=605006&r2=605007&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/config/AccountingUiLabels.properties (original)
+++ ofbiz/trunk/applications/accounting/config/AccountingUiLabels.properties Mon Dec 17 13:20:03 2007
@@ -270,6 +270,7 @@
 AccountingItemNr=ItemNr
 AccountingLastNameCard=Last Name on Card
 AccountingLiabilities=Liabilities
+AccountingListPaymentMethodType=Payment Method Type List
 AccountingListInvoicesNotYetApplied=Possible invoices to apply
 AccountingListPaymentsNotYetApplied=Possible payments to apply
 AccountingLineTotal=Line Total
@@ -342,6 +343,7 @@
 AccountingPaymentIdTo=PaymentID to apply
 AccountingPaymentInformation=Payment Information
 AccountingPaymentMethodId=Payment Method Id
+AccountingPaymentMethodType=Payment Method Type
 AccountingPaymentPreferenceId=Payment Preference Id
 AccountingPayments=Payments
 AccountingPaymentApplRemoved=PaymentID [${paymentApplication.paymentId}] with amount ${paymentApplication.amountApplied?currency(${payment.currencyUomId})} removed from

Modified: ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/payment/PaymentMethodServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/payment/PaymentMethodServices.xml?rev=605007&r1=605006&r2=605007&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/payment/PaymentMethodServices.xml (original)
+++ ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/payment/PaymentMethodServices.xml Mon Dec 17 13:20:03 2007
@@ -119,4 +119,11 @@
         <entity-one entity-name="CreditCardTypeGlAccount" value-name="lookedUpValue"/>
         <remove-value value-name="lookedUpValue"/>
     </simple-method>
+    
+    <!-- Updates a Payment Method Type default glAccountId -->
+    <simple-method method-name="updatePaymentMethodType" short-description="Updates a Payment Method Type default glAccountId">
+        <entity-one entity-name="PaymentMethodType" value-name="lookedUpValue"/>
+        <set-nonpk-fields value-name="lookedUpValue" map-name="parameters"/>
+        <store-value value-name="lookedUpValue"/>
+    </simple-method>
 </simple-methods>

Modified: ofbiz/trunk/applications/accounting/servicedef/services_paymentmethod.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/servicedef/services_paymentmethod.xml?rev=605007&r1=605006&r2=605007&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/servicedef/services_paymentmethod.xml (original)
+++ ofbiz/trunk/applications/accounting/servicedef/services_paymentmethod.xml Mon Dec 17 13:20:03 2007
@@ -698,4 +698,11 @@
         <auto-attributes include="pk" mode="IN" optional="false"/>
     </service>
     
-</services>
+    <!-- Update updatePaymentMethodType -->
+    <service name="updatePaymentMethodType" default-entity-name="PaymentMethodType" engine="simple"
+                location="org/ofbiz/accounting/payment/PaymentMethodServices.xml" invoke="updatePaymentMethodType" auth="true">
+        <description>Update a Payment Method Type</description>
+        <auto-attributes include="pk" mode="IN" optional="false"/>
+        <auto-attributes include="nonpk" mode="IN" 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=605007&r1=605006&r2=605007&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 13:20:03 2007
@@ -1609,6 +1609,19 @@
         <response name="error" type="view" value="EditCostCalcs"/>
     </request-map>
     
+    <!-- payment method type requests -->
+    <request-map uri="editPaymentMethodType">
+        <security https="true" auth="true"/>
+        <response name="success" type="view" value="EditPaymentMethodType"/>
+    </request-map>
+    
+    <request-map uri="updatePaymentMethodType">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="updatePaymentMethodType"/>
+        <response name="success" type="view" value="EditPaymentMethodType"/>
+        <response name="error" type="view" value="EditPaymentMethodType"/>         
+    </request-map>
+    
     <!-- ================ Entity Lookup Requests ================= -->
     <request-map uri="LookupProduct"><security auth="true" https="true"/><response name="success" type="view" value="LookupProduct"/></request-map>
     <request-map uri="LookupProductFeature"><security auth="true" https="true"/><response name="success" type="view" value="LookupProductFeature"/></request-map>
@@ -1840,6 +1853,9 @@
     
     <!-- Cost request mapping-->
     <view-map name="EditCostCalcs" type="screen" page="component://accounting/widget/CostScreens.xml#EditCostCalcs"/>
+    
+    <!-- Payment Method Type   -->
+    <view-map name="EditPaymentMethodType" type="screen" page="component://accounting/widget/PaymentMethodTypeScreens.xml#EditPaymentMethodType"/>
     
     <!-- end of view mappings -->
 </site-conf>

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=605007&r1=605006&r2=605007&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/includes/appheader.ftl (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/includes/appheader.ftl Mon Dec 17 13:20:03 2007
@@ -36,6 +36,7 @@
     <li<#if selected == "chartofaccounts"> class="selected"</#if>><a href="<@o...@ofbizUrl>">${uiLabelMap.AccountingChartOfAcctsMenu}</a></li>
     <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>
     <#if userLogin?has_content>
       <li class="opposed"><a href="<@o...@ofbizUrl>">${uiLabelMap.CommonLogout}</a></li>
     <#else>

Added: ofbiz/trunk/applications/accounting/widget/PaymentMethodTypeForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/PaymentMethodTypeForms.xml?rev=605007&view=auto
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/PaymentMethodTypeForms.xml (added)
+++ ofbiz/trunk/applications/accounting/widget/PaymentMethodTypeForms.xml Mon Dec 17 13:20:03 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="ListPaymentMethodType" type="list" target="updatePaymentMethodType" list-name="paymentMethodTypes">
+        <field name="paymentMethodTypeId"><display/></field>
+        <field name="description"><display/></field>
+        <field name="defaultGlAccountId" 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/PaymentMethodTypeForms.xml
------------------------------------------------------------------------------
    svn:eol-style = native

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

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

Added: ofbiz/trunk/applications/accounting/widget/PaymentMethodTypeScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/PaymentMethodTypeScreens.xml?rev=605007&view=auto
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/PaymentMethodTypeScreens.xml (added)
+++ ofbiz/trunk/applications/accounting/widget/PaymentMethodTypeScreens.xml Mon Dec 17 13:20:03 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="EditPaymentMethodType">
+        <section>
+            <actions>
+                <set field="titleProperty" value="AccountingPaymentMethodType"/>
+                <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"/>
+                <set field="headerItem" value="PaymentMethodTypes"/>
+                <entity-condition entity-name="PaymentMethodType" list-name="paymentMethodTypes">
+                    <order-by field-name="paymentMethodTypeId"/>
+                </entity-condition>   
+            </actions>
+            <widgets>
+                <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <container style="head1"><label text="${uiLabelMap.AccountingListPaymentMethodType}"/></container>
+                        <include-form name="ListPaymentMethodType" location="component://accounting/widget/PaymentMethodTypeForms.xml"/>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+     
+</screens>
\ No newline at end of file

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

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

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