svn commit: r792595 - in /ofbiz/trunk/applications/accounting: config/AccountingUiLabels.xml webapp/accounting/WEB-INF/controller.xml webapp/accounting/reports/DepositSlip.fo.ftl widget/Menus.xml widget/PaymentGroupScreens.xml

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

svn commit: r792595 - in /ofbiz/trunk/applications/accounting: config/AccountingUiLabels.xml webapp/accounting/WEB-INF/controller.xml webapp/accounting/reports/DepositSlip.fo.ftl widget/Menus.xml widget/PaymentGroupScreens.xml

ashish-18
Author: ashish
Date: Thu Jul  9 16:14:24 2009
New Revision: 792595

URL: http://svn.apache.org/viewvc?rev=792595&view=rev
Log:
Applied patch from jira issue OFBIZ-2699 - Create Payment Batches for Ar Payment
Following things are covered in this patch:
--Generated DepositSlip for payment group(Batch)
--The Deposit link will only be visible for PaymentGroups of type "BATCH_PAYMENT".

Thanks Awdesh & Rishi for your contribution.

Added:
    ofbiz/trunk/applications/accounting/webapp/accounting/reports/DepositSlip.fo.ftl   (with props)
Modified:
    ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml
    ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml
    ofbiz/trunk/applications/accounting/widget/Menus.xml
    ofbiz/trunk/applications/accounting/widget/PaymentGroupScreens.xml

Modified: ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml?rev=792595&r1=792594&r2=792595&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml (original)
+++ ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml Thu Jul  9 16:14:24 2009
@@ -5974,9 +5974,15 @@
     <property key="AccountingPaymentGroup">
         <value xml:lang="en">Payment Group</value>
     </property>
+    <property key="AccountingPaymentGroupId">
+        <value xml:lang="en">Payment Group Id</value>
+    </property>
     <property key="AccountingPaymentGroupMember">
         <value xml:lang="en">Group Member</value>
     </property>
+    <property key="AccountingPaymentGroupName">
+        <value xml:lang="en">Payment Group Name</value>
+    </property>
     <property key="AccountingPaymentGroupOverview">
         <value xml:lang="en">Payment Group Overview</value>
     </property>

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=792595&r1=792594&r2=792595&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml Thu Jul  9 16:14:24 2009
@@ -437,6 +437,12 @@
         <response name="success" type="view" value="PaymentGroupOverview"/>
         <response name="error" type="view" value="PaymentGroupOverview"/>
     </request-map>
+    
+    <request-map uri="DepositSlip.pdf">
+        <security https="true" auth="true"/>
+        <response name="success" type="view" value="DepositSlipPdf"/>
+        <response name="error" type="view" value="PaymentGroupOverview"/>
+    </request-map>
 
     <!-- transaction page requests -->
     <request-map uri="FindGatewayResponses">
@@ -2195,6 +2201,7 @@
     <view-map name="EditPaymentGroup" type="screen" page="component://accounting/widget/PaymentGroupScreens.xml#EditPaymentGroup"/>
     <view-map name="EditPaymentGroupMember" type="screen" page="component://accounting/widget/PaymentGroupScreens.xml#EditPaymentGroupMember"/>
     <view-map name="PaymentGroupOverview" type="screen" page="component://accounting/widget/PaymentGroupScreens.xml#PaymentGroupOverview"/>
+    <view-map name="DepositSlipPdf" type="screenfop" page="component://accounting/widget/PaymentGroupScreens.xml#DepositSlipPdf" content-type="application/pdf" encoding="none"/>
     <!-- Party Accounts -->
     <view-map name="PartyAccountsSummary" type="screen" page="component://accounting/widget/GlScreens.xml#PartyAccountsSummary"/>
     <view-map name="FindAcctgTrans" type="screen" page="component://accounting/widget/GlScreens.xml#FindAcctgTrans"/>

Added: ofbiz/trunk/applications/accounting/webapp/accounting/reports/DepositSlip.fo.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/reports/DepositSlip.fo.ftl?rev=792595&view=auto
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/reports/DepositSlip.fo.ftl (added)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/reports/DepositSlip.fo.ftl Thu Jul  9 16:14:24 2009
@@ -0,0 +1,118 @@
+<#--
+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.
+-->
+
+<#escape x as x?xml>
+    <fo:block font-size="14pt" font-weight="bold" text-align="center">${uiLabelMap.AccountingDepositSlip}</fo:block>
+    <fo:block font-size="12pt" text-align="left"  font-weight="bold">
+        ${uiLabelMap.AccountingPaymentGroupId} : ${paymentGroup.paymentGroupId?if_exists}
+    </fo:block>
+    <fo:block font-size="12pt" text-align="left">
+        ${uiLabelMap.AccountingPaymentGroupName} : ${paymentGroup.paymentGroupName?if_exists}
+    </fo:block>
+    <fo:block><fo:leader/></fo:block>
+    <fo:block space-after.optimum="10pt" font-size="10pt">
+        <fo:table>
+            <fo:table-column column-width="100pt"/>
+            <fo:table-column column-width="100pt"/>
+            <fo:table-column column-width="100pt"/>
+            <fo:table-column column-width="100pt"/>
+            <fo:table-column column-width="100pt"/>
+            <fo:table-header>
+                <fo:table-row font-weight="bold">
+                    <fo:table-cell padding="2pt" background-color="#D4D0C8" border="1pt solid" border-width=".1mm">
+                        <fo:block>${uiLabelMap.FormFieldTitle_paymentId}</fo:block>
+                    </fo:table-cell>
+                    <fo:table-cell padding="2pt" background-color="#D4D0C8" border="1pt solid" border-width=".1mm">
+                        <fo:block text-align="center">${uiLabelMap.AccountingPaymentType}</fo:block>
+                    </fo:table-cell>
+                    <fo:table-cell padding="2pt" background-color="#D4D0C8" border="1pt solid" border-width=".1mm">
+                        <fo:block text-align="right">${uiLabelMap.AccountingPaymentMethod}</fo:block>
+                    </fo:table-cell>
+                    <fo:table-cell padding="2pt" background-color="#D4D0C8" border="1pt solid" border-width=".1mm">
+                        <fo:block text-align="right">${uiLabelMap.AccountingFromParty}</fo:block>
+                    </fo:table-cell>
+                    <fo:table-cell padding="2pt" background-color="#D4D0C8" border="1pt solid" border-width=".1mm">
+                        <fo:block text-align="right">${uiLabelMap.AccountingAmount}</fo:block>
+                    </fo:table-cell>
+                </fo:table-row>
+            </fo:table-header>
+            <fo:table-body>
+                <#if paymentGroupMembers?has_content>
+                    <#assign totalAmount = 0>
+                    <#list paymentGroupMembers as paymentGroupMember>
+                        <#assign payment = delegator.findOne("Payment", {"paymentId" : paymentGroupMember.paymentId}, false)/>
+                        <#if payment.paymentTypeId?has_content>
+                            <#assign paymentType = delegator.findOne("PaymentType", {"paymentTypeId" : payment.paymentTypeId}, false)/>
+                        </#if>
+                        <#if payment.partyIdFrom?has_content>
+                            <#assign partyName = delegator.findOne("PartyNameView", {"partyId" : payment.partyIdFrom}, false)/>
+                        </#if>
+                        <#if payment.paymentMethodTypeId?has_content>
+                            <#assign paymentMethodType = delegator.findOne("PaymentMethodType", {"paymentMethodTypeId" : payment.paymentMethodTypeId}, false)/>
+                        </#if>
+                        <fo:table-row>
+                            <fo:table-cell padding="2pt" border="1pt solid" border-width=".1mm">
+                                <fo:block>${payment.paymentId?if_exists}</fo:block>
+                            </fo:table-cell>
+                            <fo:table-cell padding="2pt" border="1pt solid" border-width=".1mm">
+                                <fo:block text-align="center">
+                                    ${paymentType.description?if_exists}
+                                </fo:block>
+                            </fo:table-cell>
+                            <fo:table-cell padding="2pt" border="1pt solid" border-width=".1mm">
+                                <fo:block text-align="right">${paymentMethodType.description?if_exists}</fo:block>
+                            </fo:table-cell>
+                            <fo:table-cell padding="2pt" border="1pt solid" border-width=".1mm">
+                                <fo:block text-align="right">
+                                    <#if partyName?has_content>
+                                        <#if partyName.partyTypeId == "PERSON">
+                                            ${(partyName.firstName)!} ${(partyName.lastName)!}
+                                        <#elseif (partyName.partyTypeId)! == "PARTY_GROUP">
+                                            ${(partyName.groupName)!}
+                                        </#if>
+                                    </#if>
+                                </fo:block>
+                            </fo:table-cell>
+                            <fo:table-cell padding="2pt" border="1pt solid" border-width=".1mm">
+                                <fo:block text-align="right">
+                                    <@ofbizCurrency amount=payment.amount?if_exists isoCode=payment.currencyUomId?if_exists/>
+                                    <#assign totalAmount = totalAmount + payment.amount?if_exists/>
+                                    <#assign currencyUomId = payment.currencyUomId?if_exists/>
+                                </fo:block>
+                            </fo:table-cell>
+                        </fo:table-row>
+                    </#list>
+                    <fo:table-row>
+                        <fo:table-cell number-columns-spanned="3"/>
+                        <fo:table-cell padding="4pt" background-color="#D4D0C8" font-weight="bold">
+                            <fo:block text-align="right">
+                                ${uiLabelMap.FormFieldTitle_totalAmount}
+                            </fo:block>
+                        </fo:table-cell>
+                        <fo:table-cell padding="4pt" background-color="#D4D0C8">
+                            <fo:block text-align="right">
+                                <@ofbizCurrency amount=totalAmount?if_exists isoCode=currencyUomId?if_exists/>
+                            </fo:block>
+                        </fo:table-cell>
+                    </fo:table-row>
+                </#if>
+            </fo:table-body>
+        </fo:table>
+    </fo:block>
+</#escape>
\ No newline at end of file

Propchange: ofbiz/trunk/applications/accounting/webapp/accounting/reports/DepositSlip.fo.ftl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/applications/accounting/webapp/accounting/reports/DepositSlip.fo.ftl
------------------------------------------------------------------------------
    svn:keywords = Date Rev Author URL Id

Propchange: ofbiz/trunk/applications/accounting/webapp/accounting/reports/DepositSlip.fo.ftl
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: ofbiz/trunk/applications/accounting/widget/Menus.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/Menus.xml?rev=792595&r1=792594&r2=792595&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/Menus.xml (original)
+++ ofbiz/trunk/applications/accounting/widget/Menus.xml Thu Jul  9 16:14:24 2009
@@ -491,8 +491,7 @@
             </condition>
             <link target="EditPaymentGroup"/>
         </menu-item>
-        <!-- To Do -->
-        <!--<menu-item name="depositSlip" title="${uiLabelMap.AccountingDepositSlip}">
+        <menu-item name="depositSlip" title="${uiLabelMap.AccountingDepositSlip}">
             <condition>
                 <and>
                     <if-compare field="display" operator="equals" value="true"/>
@@ -502,7 +501,7 @@
             <link target="DepositSlip.pdf">
                 <parameter param-name="paymentGroupId" from-field="paymentGroup.paymentGroupId"/>
             </link>
-        </menu-item>-->
+        </menu-item>
         <menu-item name="cancelpaymentGroup" title="${uiLabelMap.CommonCancel}">
             <condition>
                 <and>

Modified: ofbiz/trunk/applications/accounting/widget/PaymentGroupScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/PaymentGroupScreens.xml?rev=792595&r1=792594&r2=792595&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/PaymentGroupScreens.xml (original)
+++ ofbiz/trunk/applications/accounting/widget/PaymentGroupScreens.xml Thu Jul  9 16:14:24 2009
@@ -122,4 +122,26 @@
             </widgets>
         </section>
     </screen>
+    <screen name="DepositSlipPdf">
+        <section>
+            <actions>
+                <property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/>
+                <property-map resource="AccountingUiLabels" map-name="uiLabelMap" global="true"/>
+                <set field="paymentGroupId" from-field="parameters.paymentGroupId"/>
+                <entity-one entity-name="PaymentGroup" value-field="paymentGroup"/>
+                <entity-and entity-name="PaymentGroupMember" list="paymentGroupMembers" filter-by-date="true">
+                    <field-map field-name="paymentGroupId"/>
+                </entity-and>
+            </actions>
+            <widgets>
+                <decorator-screen name="SimpleDecorator" location="component://common/widget/CommonScreens.xml">
+                    <decorator-section name="body">
+                        <platform-specific>
+                            <xsl-fo><html-template location="component://accounting/webapp/accounting/reports/DepositSlip.fo.ftl"/></xsl-fo>
+                        </platform-specific>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
 </screens>
\ No newline at end of file