svn commit: r812742 - in /ofbiz/trunk: applications/accounting/config/ applications/accounting/script/org/ofbiz/accounting/finaccount/ applications/accounting/servicedef/ applications/accounting/webapp/accounting/finaccounttrans/ applications/accountin...

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

svn commit: r812742 - in /ofbiz/trunk: applications/accounting/config/ applications/accounting/script/org/ofbiz/accounting/finaccount/ applications/accounting/servicedef/ applications/accounting/webapp/accounting/finaccounttrans/ applications/accountin...

apatel-2
Author: apatel
Date: Wed Sep  9 01:21:58 2009
New Revision: 812742

URL: http://svn.apache.org/viewvc?rev=812742&view=rev
Log:
Now use can see all account trans related to bank reconciliation. Patch from OFBIZ-2893.
Thanks Ratnesh for implementation.

Added:
    ofbiz/trunk/applications/accounting/webapp/accounting/finaccounttrans/ShowGlTransactions.ftl   (with props)
Modified:
    ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml
    ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/finaccount/FinAccountServices.xml
    ofbiz/trunk/applications/accounting/servicedef/services_finaccount.xml
    ofbiz/trunk/applications/accounting/webapp/accounting/finaccounttrans/GlReconciledFinAccountTrans.ftl
    ofbiz/trunk/applications/accounting/widget/FinAccountScreens.xml
    ofbiz/trunk/framework/images/webapp/images/prototypejs/popup.css

Modified: ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml?rev=812742&r1=812741&r2=812742&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml (original)
+++ ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml Wed Sep  9 01:21:58 2009
@@ -10965,6 +10965,9 @@
         <value xml:lang="en">GL Account Category Type Id</value>
         <value xml:lang="hi_IN">जीएल(Gl) खाता श्रेणी प्रकार क्रमांक</value>
     </property>
+    <property key="FormFieldTitle_glTransactions">
+        <value xml:lang="en">Gl Transactions</value>
+    </property>
     <property key="FormFieldTitle_newGlAccountCategory">
         <value xml:lang="en">New GL Account Category</value>
         <value xml:lang="hi_IN">नई जीएल(Gl) खाता श्रेणी</value>

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=812742&r1=812741&r2=812742&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 Wed Sep  9 01:21:58 2009
@@ -1011,4 +1011,27 @@
             </iterate>
         </if-not-empty>
     </simple-method>
+    
+    <simple-method method-name="getAssociatedAcctgTransEntriesWithFinAccountTrans" short-description="Get associated acctgTransEntries with finAccountTrans">
+        <set field="finAccountTransId" from-field="parameters.finAccountTransId"/>
+        <entity-one entity-name="FinAccountTrans" value-field="finAccountTrans"/>
+        <if-empty field="finAccountTrans.paymentId">
+            <entity-and entity-name="Payment" list="payments">
+                <field-map field-name="finAccountTransId" from-field="finAccountTrans.finAccountTransId"/>
+            </entity-and>
+        <else>
+            <entity-one entity-name="Payment" value-field="payment">
+                <field-map field-name="paymentId" from-field="finAccountTrans.paymentId"/>
+            </entity-one>
+            <field-to-list field="payment" list="payments"/>
+        </else>
+        </if-empty>
+        <set field="paymentIds" value="${groovy:org.ofbiz.entity.util.EntityUtil.getFieldListFromEntityList(payments, 'paymentId', true);}" type="List"/>
+        <entity-condition entity-name="AcctgTransAndEntries" list="acctgTransAndEntries">
+            <condition-expr field-name="paymentId" operator="in" from-field="paymentIds"/>
+            <order-by field-name="acctgTransId"/>
+            <order-by field-name="acctgTransEntrySeqId"/>
+        </entity-condition>
+        <field-to-result field="acctgTransAndEntries"/>
+    </simple-method>
 </simple-methods>

Modified: ofbiz/trunk/applications/accounting/servicedef/services_finaccount.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/servicedef/services_finaccount.xml?rev=812742&r1=812741&r2=812742&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/servicedef/services_finaccount.xml (original)
+++ ofbiz/trunk/applications/accounting/servicedef/services_finaccount.xml Wed Sep  9 01:21:58 2009
@@ -506,4 +506,11 @@
         <description>Cancel bank reconciliation.</description>
         <attribute name="glReconciliationId" type="String" mode="IN" optional="false"/>
     </service>
+    
+    <service name="getAssociatedAcctgTransEntriesWithFinAccountTrans" engine="simple"
+            location="component://accounting/script/org/ofbiz/accounting/finaccount/FinAccountServices.xml" invoke="getAssociatedAcctgTransEntriesWithFinAccountTrans">
+        <description>Get associated acctgTransEntries with finAccountTrans</description>
+        <attribute name="finAccountTransId" type="String" mode="IN" optional="false"/>
+        <attribute name="acctgTransAndEntries" type="List" mode="OUT" optional="true"/>
+    </service>
 </services>

Modified: ofbiz/trunk/applications/accounting/webapp/accounting/finaccounttrans/GlReconciledFinAccountTrans.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/finaccounttrans/GlReconciledFinAccountTrans.ftl?rev=812742&r1=812741&r2=812742&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/finaccounttrans/GlReconciledFinAccountTrans.ftl (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/finaccounttrans/GlReconciledFinAccountTrans.ftl Wed Sep  9 01:21:58 2009
@@ -101,6 +101,7 @@
             <th>${uiLabelMap.CommonComments}</th>
             <#if finAccountTransactions?has_content>
               <th>${uiLabelMap.AccountingRemoveFromGlReconciliation}</th>
+              <th>${uiLabelMap.FormFieldTitle_glTransactions}</th>
             </#if>
           </tr>
           <#assign alt_row = false/>
@@ -151,6 +152,17 @@
               <#else>
                 <td/>
               </#if>
+              <#if finAccountTrans.paymentId?has_content>
+                <td align="center">
+                  <a id="toggleGlTransactions_${finAccountTrans.finAccountTransId}" href="javascript:void(0)" class="buttontext">${uiLabelMap.FormFieldTitle_glTransactions}</a>
+                  <#include "ShowGlTransactions.ftl"/>
+                  <script type="text/javascript">
+                    new Popup('displayGlTransactions_${finAccountTrans.finAccountTransId}','toggleGlTransactions_${finAccountTrans.finAccountTransId}', {modal: true, position: 'none', trigger: 'click', cursor_margin:0})
+                  </script>
+                </td>  
+              <#else>
+                </td>
+              </#if>
             </tr>
             <#assign alt_row = !alt_row/>
           </#list>

Added: ofbiz/trunk/applications/accounting/webapp/accounting/finaccounttrans/ShowGlTransactions.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/finaccounttrans/ShowGlTransactions.ftl?rev=812742&view=auto
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/finaccounttrans/ShowGlTransactions.ftl (added)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/finaccounttrans/ShowGlTransactions.ftl Wed Sep  9 01:21:58 2009
@@ -0,0 +1,119 @@
+<#--
+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.
+-->
+
+<div id="displayGlTransactions_${finAccountTrans.finAccountTransId}" class="popup" style="display: none;width: 1150px;">
+  <div align="right">
+    <input class="popup_closebox buttontext" type="button" value="X"/>
+  </div>
+  <#assign acctgTransAndEntries = dispatcher.runSync("getAssociatedAcctgTransEntriesWithFinAccountTrans", Static["org.ofbiz.base.util.UtilMisc"].toMap("finAccountTransId", finAccountTrans.finAccountTransId, "userLogin", userLogin))/>
+  <#assign acctgTransAndEntries = acctgTransAndEntries.acctgTransAndEntries>
+   <table class="basic-table hover-bar" cellspacing="0" style"width :">
+     <tr class="header-row-2">
+       <th>${uiLabelMap.FormFieldTitle_acctgTransId}</th>
+       <th>${uiLabelMap.FormFieldTitle_acctgTransEntrySeqId}</th>
+       <th>${uiLabelMap.FormFieldTitle_isPosted}</th>
+       <th>${uiLabelMap.FormFieldTitle_glFiscalTypeId}</th>
+       <th>${uiLabelMap.FormFieldTitle_acctgTransType}</th>
+       <th>${uiLabelMap.FormFieldTitle_transactionDate}</th>
+       <th>${uiLabelMap.FormFieldTitle_postedDate}</th>
+       <th>${uiLabelMap.FormFieldTitle_glJournal}</th>
+       <th>${uiLabelMap.FormFieldTitle_transTypeDescription}</th>
+       <th>${uiLabelMap.FormFieldTitle_invoiceId}</th>
+       <th>${uiLabelMap.FormFieldTitle_glAccountId}</th>
+       <th>${uiLabelMap.FormFieldTitle_produtId}</th>
+       <th>${uiLabelMap.FormFieldTitle_debitCreditFlag}</th>
+       <th>${uiLabelMap.AccountingAmount}</th>
+       <th>${uiLabelMap.FormFieldTitle_origAmount}</th>
+       <th>${uiLabelMap.FormFieldTitle_organizationPartyId}</th>
+       <th>${uiLabelMap.FormFieldTitle_glAccountType}</th>
+       <th>${uiLabelMap.FormFieldTitle_accountCode}</th>
+       <th>${uiLabelMap.FormFieldTitle_accountName}</th>
+       <th>${uiLabelMap.AccountingGlAccountClass}</th>
+       <th>${uiLabelMap.PartyParty}</th>
+       <th>${uiLabelMap.FormFieldTitle_reconcileStatusId}</th>
+       <th>${uiLabelMap.FormFieldTitle_acctgTransEntryTypeId}</th>
+     </tr>
+     <#list acctgTransAndEntries as acctgTransEntry>
+     <tr>
+       <td>${acctgTransEntry.acctgTransId?if_exists}</td>
+       <td>${acctgTransEntry.acctgTransEntrySeqId?if_exists}</td>
+       <td>${acctgTransEntry.isPosted?if_exists}</td>
+       <td>
+         <#if acctgTransEntry.glFiscalTypeId?has_content>
+           <#assign glFiscalType = delegator.findOne("GlFiscalType", {"glFiscalTypeId" : acctgTransEntry.glFiscalTypeId}, false)/>
+             ${glFiscalType.description?if_exists}
+         </#if>
+       </td>
+       <td>
+         <#if acctgTransEntry.acctgTransTypeId?has_content>
+           <#assign acctgTransType = delegator.findOne("AcctgTransType", {"acctgTransTypeId" : acctgTransEntry.acctgTransTypeId}, false)/>
+             ${acctgTransType.description?if_exists}
+         </#if>
+       </td>
+       <td>${acctgTransEntry.transactionDate?if_exists}</td>
+       <td>${acctgTransEntry.postedDate?if_exists}</td>
+       <td>${acctgTransEntry.glJournal?if_exists}</td>
+       <td>${acctgTransEntry.transTypeDescription?if_exists}</td>
+       <td>${acctgTransEntry.invoiceId?if_exists}</td>
+       <td>${acctgTransEntry.glAccountId?if_exists}</td>
+       <td>${acctgTransEntry.productId?if_exists}</td>
+       <td>${acctgTransEntry.debitCreditFlag?if_exists}</td>
+       <td>${acctgTransEntry.amount?if_exists}</td>
+       <td>${acctgTransEntry.origAmount?if_exists}</td>
+       <td>
+         <#if acctgTransEntry.organizationPartyId?has_content>
+           <#assign partyName = delegator.findOne("PartyNameView", {"partyId" : acctgTransEntry.organizationPartyId}, false)>
+           <#if partyName.partyTypeId == "PERSON">
+             ${partyName.firstName?if_exists} ${partyName.lastName?if_exists}
+           <#elseif (partyName.partyTypeId) != "PARTY_GROUP">
+             ${partyName.groupName?if_exists}
+           </#if>
+         </#if>
+       </td>
+       <td>
+         <#if (acctgTransEntry.glAccountTypeId)?has_content>
+           <#assign glAccountType = delegator.findOne("GlAccountType", {"glAccountTypeId" : acctgTransEntry.glAccountTypeId}, false)>
+             ${glAccountType.description?if_exists}
+         </#if>
+       </td>
+       <td>${acctgTransEntry.accountCode?if_exists}</td>
+       <td>${acctgTransEntry.accountName?if_exists}</td>
+       <td>
+         <#if acctgTransEntry.glAccountClassId?has_content>
+           <#assign glAccountClass = delegator.findOne("GlAccountClass", {"glAccountClassId" : acctgTransEntry.glAccountClassId}, false)/>
+             ${glAccountClass.description?if_exists}
+         </#if>
+       </td>
+       <td>${acctgTransEntry.partyId?if_exists}</td>
+       <td>
+         <#if acctgTransEntry.reconcileStatusId?has_content>
+           <#assign status = delegator.findOne("StatusItem", {"statusId" : finAccountTrans.statusId}, true)>
+             ${status.description?if_exists}
+         </#if>
+       </td>
+       <td>
+         <#if acctgTransEntry.acctgTransEntryTypeId?has_content>
+           <#assign acctgTransEntryType = delegator.findOne("AcctgTransEntryType", {"acctgTransEntryTypeId" : acctgTransEntry.acctgTransEntryTypeId}, true)>
+             ${acctgTransEntryType.description?if_exists}
+         </#if>
+       </td>
+     </tr>
+   </#list>
+  </table>
+</div>      

Propchange: ofbiz/trunk/applications/accounting/webapp/accounting/finaccounttrans/ShowGlTransactions.ftl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/applications/accounting/webapp/accounting/finaccounttrans/ShowGlTransactions.ftl
------------------------------------------------------------------------------
    svn:keywords = Date Rev Author URL Id

Propchange: ofbiz/trunk/applications/accounting/webapp/accounting/finaccounttrans/ShowGlTransactions.ftl
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: ofbiz/trunk/applications/accounting/widget/FinAccountScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/FinAccountScreens.xml?rev=812742&r1=812741&r2=812742&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/FinAccountScreens.xml (original)
+++ ofbiz/trunk/applications/accounting/widget/FinAccountScreens.xml Wed Sep  9 01:21:58 2009
@@ -615,6 +615,8 @@
     <screen name="ViewGlReconciliationWithTransaction">
         <section>
             <actions>
+                <set field="layoutSettings.javaScripts[]" value="/images/prototypejs/popup.js" global="true"/>
+                <set field="layoutSettings.styleSheets[+0]" value="/images/prototypejs/popup.css" global="true"/>
                 <set field="titleProperty" value="AccountingEditFinAccountReconciliations"/>
                 <set field="tabButtonItem" value="EditFinAccountReconciliations"/>
                 <set field="finAccountId" from-field="parameters.finAccountId"/>

Modified: ofbiz/trunk/framework/images/webapp/images/prototypejs/popup.css
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/images/webapp/images/prototypejs/popup.css?rev=812742&r1=812741&r2=812742&view=diff
==============================================================================
--- ofbiz/trunk/framework/images/webapp/images/prototypejs/popup.css (original)
+++ ofbiz/trunk/framework/images/webapp/images/prototypejs/popup.css Wed Sep  9 01:21:58 2009
@@ -2,7 +2,7 @@
  popup.js
 */
 div.popup {
-  max-width: 600px;
+  max-width: 1200px;
   width: 250px;
   border: 1px solid red;
   padding: 5px;