Author: apatel
Date: Sun Aug 9 06:37:01 2009 New Revision: 802494 URL: http://svn.apache.org/viewvc?rev=802494&view=rev Log: Tools reconcile financial account. Patch from OFBIZ-2816. Thanks Rishi, Sumit and Parimal for contribution. Also Thanks for Vince and Eva for help in designing tools. Modified: ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml ofbiz/trunk/applications/accounting/data/DemoFinAccountData.xml ofbiz/trunk/applications/accounting/data/DemoGlSetupData.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/WEB-INF/controller.xml ofbiz/trunk/applications/accounting/webapp/accounting/finaccounttrans/FinAccountTrans.ftl ofbiz/trunk/applications/accounting/webapp/accounting/finaccounttrans/GlReconciledFinAccountTrans.ftl ofbiz/trunk/applications/accounting/widget/FinAccountForms.xml ofbiz/trunk/applications/accounting/widget/FinAccountScreens.xml Modified: ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml?rev=802494&r1=802493&r2=802494&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml (original) +++ ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml Sun Aug 9 06:37:01 2009 @@ -1097,6 +1097,10 @@ <value xml:lang="th">à¸à¸³à¸«à¸à¸à¸à¸£à¸°à¹à¸ à¸à¹à¸à¹à¸ªà¸£à¹à¸à¸à¸²à¸£à¸à¸²à¸¢à¹à¸à¸·à¹à¸à¸¢à¸à¹à¸¥à¸´à¸à¸«à¸¡à¸²à¸¢à¹à¸¥à¸à¸à¸±à¸à¸à¸µà¸à¸£à¸°à¹à¸ à¸à¸à¸±à¹à¸§à¹à¸</value> <value xml:lang="zh">为æ¶å ¥æ»è´¦è´¦æ·ç¼å·æå®éå®å票类å</value> </property> + <property key="AccountingAssignToReconciliation"> + <value xml:lang="en">Assign to Reconciliation</value> + <value xml:lang="hi_IN">पà¥à¤¨à¤°à¥à¤®à¤¿à¤²à¤¨ à¤à¥ लिठनिरà¥à¤¦à¤¿à¤·à¥à¤ à¤à¤°à¥</value> + </property> <property key="AccountingAuthorize"> <value xml:lang="ar">اÙس٠اØ</value> <value xml:lang="de">Autorisieren</value> @@ -3205,6 +3209,10 @@ <value xml:lang="th">à¸à¸à¸à¸³à¹à¸£à¸ªà¸°à¸ªà¸¡à¹à¸¥à¸°à¸à¸à¹à¸ªà¸à¸à¸à¸²à¸£à¹à¸à¸¥à¸µà¹à¸¢à¸à¹à¸à¸¥à¸à¸à¸²à¸à¸°à¸à¸²à¸£à¹à¸à¸´à¸</value> <value xml:lang="zh">éèè´¦æ·</value> </property> + <property key="AccountingFinAcctTransAssociatedToGlReconciliation"> + <value xml:lang="en">Fin Account Trans Associated To Gl Reconciliation</value> + <value xml:lang="hi_IN">Gl मिलान सॠà¤à¥à¤¡à¤¼à¥ Fin à¤à¤¾à¤¤à¤¾</value> + </property> <property key="AccountingFindApInvoices"> <value xml:lang="en">Find AP Invoices</value> <value xml:lang="hi_IN">à¤à¤ªà¥ (AP) à¤à¤¾à¤²à¤¾à¤¨ à¤à¥à¤à¥à¤</value> @@ -5952,6 +5960,10 @@ <value xml:lang="th">à¹à¸¡à¹à¸à¸à¸à¸µà¹à¸à¸¢à¸¹à¹à¹à¸à¸´à¸¡à¹à¸à¹à¸à¹à¸ªà¸£à¹à¸à¸ªà¸³à¸«à¸£à¸±à¸à¸à¸¹à¹à¹à¸à¹</value> <value xml:lang="zh">没æ为账æ·æ¾å°éç¨/å¯è´¦åå°åï¼</value> </property> + <property key="AccountingNoGlReconciliationExists"> + <value xml:lang="en">No Gl Reconciliation Exists, To Create New Gl Reconciliation</value> + <value xml:lang="hi_IN">Gl मिलान मà¥à¤à¥à¤¦ नहà¥à¤ हॠ, नठGl मिलान बनानॠà¤à¥ लिà¤</value> + </property> <property key="AccountingNoInvoicesFound"> <value xml:lang="ar">Ùا ÙÙاتÙر Ù ÙجÙدة</value> <value xml:lang="de">Keine Rechnungen gefunden</value> @@ -6111,6 +6123,10 @@ <property key="AccountingNotAdjustmentFinAccountTrans"> <value xml:lang="en">Not a adjustment financial account transaction.</value> </property> + <property key="AccountingNotAssigned"> + <value xml:lang="en">Not Assigned</value> + <value xml:lang="hi_IN">निरà¥à¤¦à¤¿à¤·à¥à¤ नहà¥à¤ </value> + </property> <property key="AccountingNotDepositFinAccountTrans"> <value xml:lang="en">Not a deposit financial account transaction.</value> </property> Modified: ofbiz/trunk/applications/accounting/data/DemoFinAccountData.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/data/DemoFinAccountData.xml?rev=802494&r1=802493&r2=802494&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/data/DemoFinAccountData.xml (original) +++ ofbiz/trunk/applications/accounting/data/DemoFinAccountData.xml Sun Aug 9 06:37:01 2009 @@ -29,8 +29,8 @@ organizationPartyId="Company" ownerPartyId="Company" postToGlAccountId="111000" isRefundable="Y" replenishLevel="0.00" actualBalance="0.00" availableBalance="0.00"/> <FinAccountStatus finAccountId="9001" statusId="FNACT_ACTIVE" statusDate="2009-04-01 00:00:01.000"/> <FinAccountTrans finAccountTransId="9101" finAccountTransTypeId="DEPOSIT" finAccountId="9001" amount="75000.00" - partyId="Company" transactionDate="2009-04-01 00:00:01.000" entryDate="2009-04-01 00:00:01.000" performedByPartyId="admin" statusId="FINACT_TRNS_APPROVED"/> + partyId="Company" glReconciliationId="9000" transactionDate="2009-04-01 00:00:01.000" entryDate="2009-04-01 00:00:01.000" performedByPartyId="admin" statusId="FINACT_TRNS_APPROVED"/> <FinAccountTrans finAccountTransId="9102" finAccountTransTypeId="DEPOSIT" finAccountId="9001" amount="500.00" partyId="Company" transactionDate="2009-07-18 00:00:01.000" entryDate="2009-07-18 00:00:01.000" performedByPartyId="admin" statusId="FINACT_TRNS_CREATED" paymentId="8001"/> <Payment paymentId="8001" finAccountTransId="9102"/> -</entity-engine-xml> \ No newline at end of file +</entity-engine-xml> Modified: ofbiz/trunk/applications/accounting/data/DemoGlSetupData.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/data/DemoGlSetupData.xml?rev=802494&r1=802493&r2=802494&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/data/DemoGlSetupData.xml (original) +++ ofbiz/trunk/applications/accounting/data/DemoGlSetupData.xml Sun Aug 9 06:37:01 2009 @@ -398,5 +398,8 @@ <CustomTimePeriod organizationPartyId="Company" customTimePeriodId="6019" periodTypeId="FISCAL_QUARTER" fromDate="2010-10-01" thruDate="2011-01-01" isClosed="N" periodNum="4" periodName="2010/Q4" parentPeriodId="6015"/> <UomConversionDated uomId="USD" uomIdTo="EUR" fromDate="2001-01-01 00:00:00.0" conversionFactor="0.7"/><!-- to convert demo invoice --> + + <!-- Gl Reconciliation --> + <GlReconciliation glReconciliationId="9000" glReconciliationName="demoGlReconciliation" glAccountId="111000" organizationPartyId="Company" reconciledBalance="75000.00" reconciledDate="2009-08-08 20:03:14.000"/> </entity-engine-xml> 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=802494&r1=802493&r2=802494&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 Sun Aug 9 06:37:01 2009 @@ -553,17 +553,39 @@ </else> </if-compare> </iterate> - <entity-condition entity-name="FinAccountTrans" list="finAccountTransList"> - <condition-list combine="and"> - <condition-expr field-name="finAccountId" from-field="parameters.finAccountId"/> - <condition-expr field-name="finAccountTransTypeId" from-field="parameters.finAccountTransTypeId" ignore-if-empty="true"/> - <condition-expr field-name="statusId" from-field="parameters.statusId" ignore-if-empty="true"/> - <condition-expr field-name="transactionDate" operator="greater-equals" from-field="parameters.fromTransactionDate" ignore-if-empty="true"/> - <condition-expr field-name="transactionDate" operator="less-equals" from-field="parameters.thruTransactionDate" ignore-if-empty="true"/> - <condition-expr field-name="entryDate" operator="greater-equals" from-field="parameters.fromEntryDate" ignore-if-empty="true"/> - <condition-expr field-name="entryDate" operator="less-equals" from-field="parameters.thruEntryDate" ignore-if-empty="true"/> - </condition-list> - </entity-condition> + <if-compare field="parameters.glReconciliationId" operator="equals" value="_NA_"> + <set field="isConditionalStatusId" value="${parameters.statusId == null @or parameters.statusId != 'FINACT_TRNS_CANCELED'}" type="Boolean"/> + <if-compare field="isConditionalStatusId" operator="equals" value="true" type="Boolean"> + <set field="conditionalStatusId" value="FINACT_TRNS_CANCELED"/> + </if-compare> + <entity-condition entity-name="FinAccountTrans" list="finAccountTransList"> + <condition-list combine="and"> + <condition-expr field-name="finAccountId" from-field="parameters.finAccountId"/> + <condition-expr field-name="finAccountTransTypeId" from-field="parameters.finAccountTransTypeId" ignore-if-empty="true"/> + <condition-expr field-name="statusId" operator="not-equals" from-field="conditionalStatusId" ignore-if-empty="true"/> + <condition-expr field-name="statusId" operator="equals" from-field="parameters.statusId" ignore-if-empty="true"/> + <condition-expr field-name="glReconciliationId" operator="equals" from-field="nullField"/> + <condition-expr field-name="transactionDate" operator="greater-equals" from-field="parameters.fromTransactionDate" ignore-if-empty="true"/> + <condition-expr field-name="transactionDate" operator="less-equals" from-field="parameters.thruTransactionDate" ignore-if-empty="true"/> + <condition-expr field-name="entryDate" operator="greater-equals" from-field="parameters.fromEntryDate" ignore-if-empty="true"/> + <condition-expr field-name="entryDate" operator="less-equals" from-field="parameters.thruEntryDate" ignore-if-empty="true"/> + </condition-list> + </entity-condition> + <else> + <entity-condition entity-name="FinAccountTrans" list="finAccountTransList"> + <condition-list combine="and"> + <condition-expr field-name="finAccountId" from-field="parameters.finAccountId"/> + <condition-expr field-name="finAccountTransTypeId" from-field="parameters.finAccountTransTypeId" ignore-if-empty="true"/> + <condition-expr field-name="statusId" from-field="parameters.statusId" ignore-if-empty="true"/> + <condition-expr field-name="glReconciliationId" from-field="parameters.glReconciliationId" ignore-if-empty="true"/> + <condition-expr field-name="transactionDate" operator="greater-equals" from-field="parameters.fromTransactionDate" ignore-if-empty="true"/> + <condition-expr field-name="transactionDate" operator="less-equals" from-field="parameters.thruTransactionDate" ignore-if-empty="true"/> + <condition-expr field-name="entryDate" operator="greater-equals" from-field="parameters.fromEntryDate" ignore-if-empty="true"/> + <condition-expr field-name="entryDate" operator="less-equals" from-field="parameters.thruEntryDate" ignore-if-empty="true"/> + </condition-list> + </entity-condition> + </else> + </if-compare> <iterate list="finAccountTransList" entry="finAccountTrans"> <if-compare field="finAccountTrans.finAccountTransTypeId" operator="equals" value="WITHDRAWAL"> <set field="grandTotal" value="${grandTotal - finAccountTrans.amount}" type="BigDecimal"/> @@ -815,4 +837,10 @@ <set field="grandTotal" value="${grandTotal + reconciledBalance}" type="BigDecimal"/> <field-to-result field="grandTotal"/> </simple-method> + + <simple-method method-name="assignGlRecToFinAccTrans" short-description="Assignment of Gl Reconciliation to Fin Account Trans"> + <entity-one entity-name="FinAccountTrans" value-field="finAccountTrans"/> + <set field="finAccountTrans.glReconciliationId" from-field="parameters.glReconciliationId"/> + <store-value value-field="finAccountTrans"/> + </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=802494&r1=802493&r2=802494&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/servicedef/services_finaccount.xml (original) +++ ofbiz/trunk/applications/accounting/servicedef/services_finaccount.xml Sun Aug 9 06:37:01 2009 @@ -212,6 +212,7 @@ <attribute name="finAccountId" type="String" mode="IN" optional="false"/> <attribute name="finAccountTransTypeId" type="String" mode="IN" optional="true"/> <attribute name="statusId" type="String" mode="IN" optional="true"/> + <attribute name="glReconciliationId" type="String" mode="IN" optional="true"/> <attribute name="fromTransactionDate" type="Timestamp" mode="IN" optional="true"/> <attribute name="thruTransactionDate" type="Timestamp" mode="IN" optional="true"/> <attribute name="fromEntryDate" type="Timestamp" mode="IN" optional="true"/> @@ -486,4 +487,11 @@ <attribute name="glReconciliationId" type="String" mode="IN" optional="false"/> <attribute name="grandTotal" type="BigDecimal" mode="OUT" optional="true"/> </service> + + <service name="assignGlRecToFinAccTrans" engine="simple" + location="component://accounting/script/org/ofbiz/accounting/finaccount/FinAccountServices.xml" invoke="assignGlRecToFinAccTrans"> + <description>Assignment of Gl Reconciliation to Fin Account Trans</description> + <attribute name="finAccountTransId" type="String" mode="IN" optional="false"/> + <attribute name="glReconciliationId" type="String" mode="IN" optional="false"/> + </service> </services> 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=802494&r1=802493&r2=802494&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml (original) +++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml Sun Aug 9 06:37:01 2009 @@ -1973,6 +1973,12 @@ <response name="success" type="view" value="ViewGlReconciliationWithTransaction"/> <response name="error" type="view" value="ViewGlReconciliationWithTransaction"/> </request-map> + <request-map uri="assignGlRecToFinAccTrans"> + <security https="true" auth="false"/> + <event type="service-multi" invoke="assignGlRecToFinAccTrans"/> + <response name="success" type="view" value="FindFinAccountTrans"/> + <response name="error" type="view" value="FindFinAccountTrans"/> + </request-map> <!-- Fin Account Authority--> <request-map uri="EditFinAccountAuths"> Modified: ofbiz/trunk/applications/accounting/webapp/accounting/finaccounttrans/FinAccountTrans.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/finaccounttrans/FinAccountTrans.ftl?rev=802494&r1=802493&r2=802494&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/webapp/accounting/finaccounttrans/FinAccountTrans.ftl (original) +++ ofbiz/trunk/applications/accounting/webapp/accounting/finaccounttrans/FinAccountTrans.ftl Sun Aug 9 06:37:01 2009 @@ -53,15 +53,19 @@ } if (!isSingle) { $('submitButton').disabled = false; - new Ajax.Request('getFinAccountTransRunningTotal', { - asynchronous: false, - onSuccess: function(transport) { - var data = transport.responseText.evalJSON(true); - $('showFinAccountTransRunningTotal').update(data.finAccountTransRunningTotal); - }, parameters: $('listFinAccTra').serialize(), requestHeaders: {Accept: 'application/json'} - }); + if ($('showFinAccountTransRunningTotal')) { + new Ajax.Request('getFinAccountTransRunningTotal', { + asynchronous: false, + onSuccess: function(transport) { + var data = transport.responseText.evalJSON(true); + $('showFinAccountTransRunningTotal').update(data.finAccountTransRunningTotal); + }, parameters: $('listFinAccTra').serialize(), requestHeaders: {Accept: 'application/json'} + }); + } } else { - $('showFinAccountTransRunningTotal').update(""); + if ($('showFinAccountTransRunningTotal')) { + $('showFinAccountTransRunningTotal').update(""); + } $('submitButton').disabled = true; } } @@ -75,164 +79,193 @@ <span class="label">${uiLabelMap.AccountingRunningTotal} :</span> <span class="label" id="showFinAccountTransRunningTotal"></span> </div> - <form id="listFinAccTra" name="selectAllForm" method="post" action="<@ofbizUrl>reconcileFinAccountTrans?clearAll=Y</@ofbizUrl>"> - <input name="_useRowSubmit" type="hidden" value="Y"/> - <input name="finAccountId" type="hidden" value="${parameters.finAccountId}"/> - <input name="statusId" type="hidden" value="${parameters.statusId?if_exists}"> </#if> - <table class="basic-table hover-bar" cellspacing="0"> - <#-- Header Begins --> - <tr class="header-row-2"> - <th>${uiLabelMap.FormFieldTitle_finAccountTransId}</th> - <th>${uiLabelMap.FormFieldTitle_finAccountTransTypeId}</th> - <th>${uiLabelMap.PartyParty}</th> - <th>${uiLabelMap.FormFieldTitle_transactionDate}</th> - <th>${uiLabelMap.FormFieldTitle_entryDate}</th> - <th>${uiLabelMap.CommonAmount}</th> - <th>${uiLabelMap.FormFieldTitle_paymentId}</th> - <th>${uiLabelMap.OrderPaymentType}</th> - <th>${uiLabelMap.FormFieldTitle_paymentMethodTypeId}</th> - <th>${uiLabelMap.CommonStatus}</th> - <th>${uiLabelMap.CommonComments}</th> - <#if grandTotal?exists> - <th>${uiLabelMap.AccountingCancelTransactionStatus}</th> - <#else> - <th> - ${uiLabelMap.CommonSelectAll} <input name="selectAll" type="checkbox" value="N" id="checkAllTransactions" onclick="javascript:togglefinAccountTransId(this);"/> - </th> - </#if> - </tr> - <#-- Header Ends--> - <#assign alt_row = false> - <#list finAccountTransList as finAccountTrans> - <#assign payment = ""> - <#assign payments = ""> - <#if finAccountTrans.paymentId?has_content> - <#assign payment = delegator.findOne("Payment", {"paymentId" : finAccountTrans.paymentId}, true)> + <form id="listFinAccTra" name="selectAllForm" method="post" action="<@ofbizUrl><#if !grandTotal?exists>reconcileFinAccountTrans?clearAll=Y<#else>assignGlRecToFinAccTrans?clearAll=Y</#if></@ofbizUrl>"> + <input name="_useRowSubmit" type="hidden" value="Y"/> + <input name="finAccountId" type="hidden" value="${parameters.finAccountId}"/> + <input name="statusId" type="hidden" value="${parameters.statusId?if_exists}"/> + <#assign glReconciliations = delegator.findByAnd("GlReconciliation", {"glAccountId" : finAccount.postToGlAccountId, "reconciledBalance" : null}, Static["org.ofbiz.base.util.UtilMisc"].toList("reconciledDate DESC"))> + <#if (glReconciliationId?has_content && (glReconciliationId == "_NA_" && finAccountTransList?has_content)) || !grandTotal?exists> + <div align="right"> + <#if grandTotal?exists> + <#if glReconciliations?has_content> + <select name="glReconciliationId"> + <option value="">--${uiLabelMap.CommonSelect}--</option> + <#list glReconciliations as glReconciliation> + <option value="${glReconciliation.glReconciliationId}">${glReconciliation.glReconciliationName?if_exists}[[${glReconciliation.glReconciliationId}] [${glReconciliation.reconciledDate?if_exists}] [${glReconciliation.reconciledBalance?if_exists}]]</option> + </#list> + </select> + <input id="submitButton" type="submit" onclick="javascript:document.selectAllForm.submit();" value="${uiLabelMap.AccountingAssignToReconciliation}" disabled/> <#else> - <#assign payments = delegator.findByAnd("Payment", {"finAccountTransId" : finAccountTrans.finAccountTransId})> - </#if> - <#assign finAccountTransType = delegator.findOne("FinAccountTransType", {"finAccountTransTypeId" : finAccountTrans.finAccountTransTypeId}, true)> - <#if finAccountTrans.statusId?has_content> - <#assign status = delegator.findOne("StatusItem", {"statusId" : finAccountTrans.statusId}, true)> - </#if> - <#if payment?has_content && payment.paymentTypeId?has_content> - <#assign paymentType = delegator.findOne("PaymentType", {"paymentTypeId" : payment.paymentTypeId}, true)> - </#if> - <#if payment?has_content && payment.paymentMethodTypeId?has_content> - <#assign paymentMethodType = delegator.findOne("PaymentMethodType", {"paymentMethodTypeId" : payment.paymentMethodTypeId}, true)> - </#if> - <#if finAccountTrans.partyId?has_content> - <#assign partyName = (delegator.findOne("PartyNameView", {"partyId" : finAccountTrans.partyId}, true))!> + <span class="tooltip">${uiLabelMap.AccountingNoGlReconciliationExists} <a href="<@ofbizUrl>EditFinAccountReconciliations?finAccountId=${parameters.finAccountId?if_exists}</@ofbizUrl>">${uiLabelMap.CommonClickHere}</a></span> </#if> - <tr valign="middle"<#if alt_row> class="alternate-row"</#if>> - <td> - <#if payments?has_content> - <a id="togglePayment_${finAccountTrans.finAccountTransId}" href="javascript:void(0)"><img src="<@ofbizContentUrl>/images/expand.gif</@ofbizContentUrl>"/></a> ${finAccountTrans.finAccountTransId} - <div id="displayPayments_${finAccountTrans.finAccountTransId}" class="popup" style="display: none;width: 500px;"> - <div align="right"> - <input class="popup_closebox buttontext" type="button" value="X"/> - </div> - <table class="basic-table hover-bar" cellspacing="0" style"width :"> - <tr class="header-row-2"> - <th>${uiLabelMap.FormFieldTitle_paymentId}</th> - <th>${uiLabelMap.OrderPaymentType}</th> - <th>${uiLabelMap.FormFieldTitle_paymentMethodTypeId}</th> - <th>${uiLabelMap.CommonAmount}</th> - <th>${uiLabelMap.PartyPartyFrom}</th> - <th>${uiLabelMap.PartyPartyTo}</th> - </tr> - <#list payments as payment> - <#if payment?exists && payment.paymentTypeId?has_content> - <#assign paymentType = delegator.findOne("PaymentType", {"paymentTypeId" : payment.paymentTypeId}, true)> - </#if> - <#if payment?has_content && payment.paymentMethodTypeId?has_content> - <#assign paymentMethodType = delegator.findOne("PaymentMethodType", {"paymentMethodTypeId" : payment.paymentMethodTypeId}, true)> - </#if> - <tr valign="middle"<#if alt_row> class="alternate-row"</#if>> - <td>${payment.paymentId?if_exists}</td> - <td><#if paymentType?has_content>${paymentType.description?if_exists}</#if></td> - <td><#if paymentMethodType?has_content>${paymentMethodType.description?if_exists}</#if></td> - <td>${payment.amount?if_exists}</td> - <td>${payment.partyIdFrom?if_exists}</td> - <td>${payment.partyIdTo?if_exists}</td> - </tr> - </#list> - </table> + <#else> + <input id="submitButton" type="submit" onclick="javascript:document.selectAllForm.submit();" value="${uiLabelMap.AccountingReconcile}" disabled/> + </#if> + </div> + </#if> + <table class="basic-table hover-bar" cellspacing="0"> + <#-- Header Begins --> + <tr class="header-row-2"> + <th>${uiLabelMap.FormFieldTitle_finAccountTransId}</th> + <th>${uiLabelMap.FormFieldTitle_finAccountTransTypeId}</th> + <th>${uiLabelMap.PartyParty}</th> + <th>${uiLabelMap.FormFieldTitle_glReconciliationName}</th> + <th>${uiLabelMap.FormFieldTitle_transactionDate}</th> + <th>${uiLabelMap.FormFieldTitle_entryDate}</th> + <th>${uiLabelMap.CommonAmount}</th> + <th>${uiLabelMap.FormFieldTitle_paymentId}</th> + <th>${uiLabelMap.OrderPaymentType}</th> + <th>${uiLabelMap.FormFieldTitle_paymentMethodTypeId}</th> + <th>${uiLabelMap.CommonStatus}</th> + <th>${uiLabelMap.CommonComments}</th> + <#if grandTotal?exists> + <th>${uiLabelMap.AccountingCancelTransactionStatus}</th> + </#if> + <#if ((glReconciliationId?has_content && glReconciliationId == "_NA_") && (glReconciliations?has_content && finAccountTransList?has_content)) || !grandTotal?exists> + <th>${uiLabelMap.CommonSelectAll} <input name="selectAll" type="checkbox" value="N" id="checkAllTransactions" onclick="javascript:togglefinAccountTransId(this);"/></th> + </#if> + </tr> + <#-- Header Ends--> + <#assign alt_row = false> + <#list finAccountTransList as finAccountTrans> + <#assign payment = ""> + <#assign payments = ""> + <#assign status = ""> + <#assign paymentType = ""> + <#assign paymentMethodType = ""> + <#assign glReconciliation = ""> + <#assign partyName = ""> + <#if finAccountTrans.paymentId?has_content> + <#assign payment = delegator.findOne("Payment", {"paymentId" : finAccountTrans.paymentId}, true)> + <#else> + <#assign payments = delegator.findByAnd("Payment", {"finAccountTransId" : finAccountTrans.finAccountTransId})> + </#if> + <#assign finAccountTransType = delegator.findOne("FinAccountTransType", {"finAccountTransTypeId" : finAccountTrans.finAccountTransTypeId}, true)> + <#if finAccountTrans.statusId?has_content> + <#assign status = delegator.findOne("StatusItem", {"statusId" : finAccountTrans.statusId}, true)> + </#if> + <#if payment?has_content && payment.paymentTypeId?has_content> + <#assign paymentType = delegator.findOne("PaymentType", {"paymentTypeId" : payment.paymentTypeId}, true)> + </#if> + <#if payment?has_content && payment.paymentMethodTypeId?has_content> + <#assign paymentMethodType = delegator.findOne("PaymentMethodType", {"paymentMethodTypeId" : payment.paymentMethodTypeId}, true)> + </#if> + <#if finAccountTrans.glReconciliationId?has_content> + <#assign glReconciliation = delegator.findOne("GlReconciliation", {"glReconciliationId" : finAccountTrans.glReconciliationId}, true)> + </#if> + <#if finAccountTrans.partyId?has_content> + <#assign partyName = (delegator.findOne("PartyNameView", {"partyId" : finAccountTrans.partyId}, true))!> + </#if> + <tr valign="middle"<#if alt_row> class="alternate-row"</#if>> + <td> + <#if payments?has_content> + <a id="togglePayment_${finAccountTrans.finAccountTransId}" href="javascript:void(0)"><img src="<@ofbizContentUrl>/images/expand.gif</@ofbizContentUrl>"/></a> ${finAccountTrans.finAccountTransId} + <div id="displayPayments_${finAccountTrans.finAccountTransId}" class="popup" style="display: none;width: 500px;"> + <div align="right"> + <input class="popup_closebox buttontext" type="button" value="X"/> </div> - <script type="text/javascript"> - new Popup('displayPayments_${finAccountTrans.finAccountTransId}','togglePayment_${finAccountTrans.finAccountTransId}', {modal: true, position: 'center', trigger: 'click'}) - </script> - <a href="<@ofbizUrl>DepositSlip.pdf?finAccountTransId=${finAccountTrans.finAccountTransId}</@ofbizUrl>" class="buttontext">${uiLabelMap.AccountingDepositSlip}</a> - <#else> - ${finAccountTrans.finAccountTransId} - </#if> - </td> - <td>${finAccountTransType.description?if_exists}</td> - <td>${(partyName.firstName)!} ${(partyName.lastName)!} ${(partyName.groupName)!}</td> - <td>${finAccountTrans.transactionDate?if_exists}</td> - <td>${finAccountTrans.entryDate?if_exists}</td> - <td>${finAccountTrans.amount?if_exists}</td> + <table class="basic-table hover-bar" cellspacing="0" style"width :"> + <tr class="header-row-2"> + <th>${uiLabelMap.FormFieldTitle_paymentId}</th> + <th>${uiLabelMap.OrderPaymentType}</th> + <th>${uiLabelMap.FormFieldTitle_paymentMethodTypeId}</th> + <th>${uiLabelMap.CommonAmount}</th> + <th>${uiLabelMap.PartyPartyFrom}</th> + <th>${uiLabelMap.PartyPartyTo}</th> + </tr> + <#list payments as payment> + <#if payment?exists && payment.paymentTypeId?has_content> + <#assign paymentType = delegator.findOne("PaymentType", {"paymentTypeId" : payment.paymentTypeId}, true)> + </#if> + <#if payment?has_content && payment.paymentMethodTypeId?has_content> + <#assign paymentMethodType = delegator.findOne("PaymentMethodType", {"paymentMethodTypeId" : payment.paymentMethodTypeId}, true)> + </#if> + <tr valign="middle"<#if alt_row> class="alternate-row"</#if>> + <td>${payment.paymentId?if_exists}</td> + <td><#if paymentType?has_content>${paymentType.description?if_exists}</#if></td> + <td><#if paymentMethodType?has_content>${paymentMethodType.description?if_exists}</#if></td> + <td>${payment.amount?if_exists}</td> + <td>${payment.partyIdFrom?if_exists}</td> + <td>${payment.partyIdTo?if_exists}</td> + </tr> + </#list> + </table> + </div> + <script type="text/javascript"> + new Popup('displayPayments_${finAccountTrans.finAccountTransId}','togglePayment_${finAccountTrans.finAccountTransId}', {modal: true, position: 'center', trigger: 'click'}) + </script> + <a href="<@ofbizUrl>DepositSlip.pdf?finAccountTransId=${finAccountTrans.finAccountTransId}</@ofbizUrl>" class="buttontext">${uiLabelMap.AccountingDepositSlip}</a> + <#else> + ${finAccountTrans.finAccountTransId} + </#if> + </td> + <td>${finAccountTransType.description?if_exists}</td> + <td><#if partyName?has_content>${(partyName.firstName)!} ${(partyName.lastName)!} ${(partyName.groupName)!}<a href="/partymgr/control/viewprofile?partyId=${partyName.partyId}">[${(partyName.partyId)!}]</a></#if></td> + <td><#if glReconciliation?has_content>${glReconciliation.glReconciliationName?if_exists}<a href="ViewGlReconciliationWithTransaction?glReconciliationId=${glReconciliation.glReconciliationId?if_exists}&finAccountId=${parameters.finAccountId?if_exists}">[${glReconciliation.glReconciliationId?if_exists}]</a></#if></td> + <td>${finAccountTrans.transactionDate?if_exists}</td> + <td>${finAccountTrans.entryDate?if_exists}</td> + <td>${finAccountTrans.amount?if_exists}</td> + <td> + <#if finAccountTrans.paymentId?has_content> + <a href="<@ofbizUrl>paymentOverview?paymentId=${finAccountTrans.paymentId}</@ofbizUrl>">${finAccountTrans.paymentId}</a> + </#if> + </td> + <td><#if paymentType?has_content>${paymentType.description?if_exists}</#if></td> + <td><#if paymentMethodType?has_content>${paymentMethodType.description?if_exists}</#if></td> + <td><#if status?has_content>${status.description?if_exists}</#if></td> + <td>${finAccountTrans.comments?if_exists}</td> + <#if grandTotal?exists> <td> - <#if finAccountTrans.paymentId?has_content> - <a href="<@ofbizUrl>paymentOverview?paymentId=${finAccountTrans.paymentId}</@ofbizUrl>">${finAccountTrans.paymentId}</a> + <#if finAccountTrans.statusId?has_content && finAccountTrans.statusId == 'FINACT_TRNS_CREATED'> + <a href="javascript:document.cancelFinAccountTrans_${finAccountTrans.finAccountTransId}.submit();" class="buttontext">${uiLabelMap.CommonCancel}</a> </#if> </td> - <td><#if paymentType?has_content>${paymentType.description?if_exists}</#if></td> - <td><#if paymentMethodType?has_content>${paymentMethodType.description?if_exists}</#if></td> - <td><#if status?has_content>${status.description?if_exists}</#if></td> - <td>${finAccountTrans.comments?if_exists}</td> - <#if grandTotal?exists> + </#if> + <input name="finAccountTransId_o_${finAccountTrans_index}" type="hidden" value="${finAccountTrans.finAccountTransId}"/> + <input name="organizationPartyId_o_${finAccountTrans_index}" type="hidden" value="${defaultOrganizationPartyId}"/> + <#if glReconciliationId?has_content && glReconciliationId != "_NA_"> + <input name="glReconciliationId_o_${finAccountTrans_index}" type="hidden" value="${glReconciliationId}"/> + </#if> + <#if ((glReconciliationId?has_content && glReconciliationId == "_NA_") && (glReconciliations?has_content && finAccountTransList?has_content)) || !grandTotal?exists> + <td><input id="finAccountTransId_${finAccountTrans_index}" name="_rowSubmit_o_${finAccountTrans_index}" type="checkbox" value="Y" onclick="javascript:getFinAccountTransRunningTotal();"/></td> + </#if> + <#if !grandTotal?exists> + <#if finAccountTrans.finAccountTransTypeId="ADJUSTMENT"> + </tr> + <tr> <td> - <#if finAccountTrans.statusId?has_content && finAccountTrans.statusId == 'FINACT_TRNS_CREATED'> - <form name="cancelFinAccountTrans_${finAccountTrans.finAccountTransId}" method="post" action="<@ofbizUrl>setFinAccountTransStatus</@ofbizUrl>"> - <input name="noConditionFind" type="hidden" value="Y"/> - <input name="finAccountTransId" type="hidden" value="${finAccountTrans.finAccountTransId}"/> - <input name="finAccountId" type="hidden" value="${finAccountTrans.finAccountId}"/> - <input name="statusId" type="hidden" value="FINACT_TRNS_CANCELED"/> - <input class="buttontext" type="submit" value="${uiLabelMap.CommonCancel}"/> - </form> - </#if> + <select name="debitCreditFlag_o_${finAccountTrans_index}"> + <option value="D">${uiLabelMap.FormFieldTitle_debit}</option> + <option value="C">${uiLabelMap.FormFieldTitle_credit}</option> + </select> </td> - <#else> - <input name="finAccountTransId_o_${finAccountTrans_index}" type="hidden" value="${finAccountTrans.finAccountTransId}"/> - <input name="organizationPartyId_o_${finAccountTrans_index}" type="hidden" value="${defaultOrganizationPartyId}"/> <td> - <input id="finAccountTransId_${finAccountTrans_index}" name="_rowSubmit_o_${finAccountTrans_index}" type="checkbox" value="Y" onclick="javascript:getFinAccountTransRunningTotal();"/> + <select name="glAccountId_o_${finAccountTrans_index}" style="width: 50%"> + <#list glAccountOrgAndClassList as glAccountOrgAndClass> + <option value="${glAccountOrgAndClass.glAccountId}">${glAccountOrgAndClass.accountCode} - ${glAccountOrgAndClass.accountName} [${glAccountOrgAndClass.glAccountId}]</option> + </#list> + </select> </td> - <#if finAccountTrans.finAccountTransTypeId="ADJUSTMENT"> - </tr> - <tr> - <td> - <select name="debitCreditFlag_o_${finAccountTrans_index}"> - <option value="D">${uiLabelMap.FormFieldTitle_debit}</option> - <option value="C">${uiLabelMap.FormFieldTitle_credit}</option> - </select> - </td> - <td> - <select name="glAccountId_o_${finAccountTrans_index}" style="width: 50%"> - <#list glAccountOrgAndClassList as glAccountOrgAndClass> - <option value="${glAccountOrgAndClass.glAccountId}">${glAccountOrgAndClass.accountCode} - ${glAccountOrgAndClass.accountName} [${glAccountOrgAndClass.glAccountId}]</option> - </#list> - </select> - </td> - </#if> </#if> - </tr> - - <#-- toggle the row color --> - <#assign alt_row = !alt_row> - </#list> - <#if !grandTotal?exists> - <div align="right"> - <input id="submitButton" type="submit" onclick="javascript:document.selectAllForm.submit();" value="${uiLabelMap.AccountingReconcile}" disabled/> - <div> - </table> - </form> - <#else> - </table> - </#if> + </#if> + </tr> + <#-- toggle the row color --> + <#assign alt_row = !alt_row> + </#list> + </table> + </form> <#if grandTotal?exists> + <#list finAccountTransList as finAccountTrans> + <#if finAccountTrans.statusId?has_content && finAccountTrans.statusId == 'FINACT_TRNS_CREATED'> + <form name="cancelFinAccountTrans_${finAccountTrans.finAccountTransId}" method="post" action="<@ofbizUrl>setFinAccountTransStatus</@ofbizUrl>"> + <input name="noConditionFind" type="hidden" value="Y"/> + <input name="finAccountTransId" type="hidden" value="${finAccountTrans.finAccountTransId}"/> + <input name="finAccountId" type="hidden" value="${finAccountTrans.finAccountId}"/> + <input name="statusId" type="hidden" value="FINACT_TRNS_CANCELED"/> + </form> + </#if> + </#list> <table border="1" class="basic-table"> <tr> <th>${uiLabelMap.FormFieldTitle_grandTotal} / ${uiLabelMap.AccountingNumberOfTransaction}</th> 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=802494&r1=802493&r2=802494&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/webapp/accounting/finaccounttrans/GlReconciledFinAccountTrans.ftl (original) +++ ofbiz/trunk/applications/accounting/webapp/accounting/finaccounttrans/GlReconciledFinAccountTrans.ftl Sun Aug 9 06:37:01 2009 @@ -70,7 +70,7 @@ </div> <div class="screenlet"> <div class="screenlet-title-bar"> - <span class="label">${uiLabelMap.AccountingAcctgTrans}</span> + <span class="label">${uiLabelMap.AccountingFinAcctTransAssociatedToGlReconciliation}</span> </div> <div class="screenlet-body"> <#if finAccountTransList?has_content> @@ -79,7 +79,6 @@ <th>${uiLabelMap.FormFieldTitle_finAccountTransId}</th> <th>${uiLabelMap.FormFieldTitle_finAccountTransType}</th> <th>${uiLabelMap.PartyParty}</th> - <th>${uiLabelMap.FormFieldTitle_glReconciliationId}</th> <th>${uiLabelMap.FormFieldTitle_transactionDate}</th> <th>${uiLabelMap.FormFieldTitle_entryDate}</th> <th>${uiLabelMap.CommonAmount}</th> @@ -96,6 +95,10 @@ <input id="finAccountTransId_${finAccountTrans_index}" name="_rowSubmit_o_${finAccountTrans_index}" type="hidden" value="Y"/> <#assign payment = ""> <#assign payments = ""> + <#assign status = ""> + <#assign paymentType = ""> + <#assign paymentMethodType = ""> + <#assign partyName = ""> <#if finAccountTrans.paymentId?has_content> <#assign payment = delegator.findOne("Payment", {"paymentId" : finAccountTrans.paymentId}, true)> </#if> @@ -115,12 +118,15 @@ <tr valign="middle"<#if alt_row> class="alternate-row"</#if>> <td>${finAccountTrans.finAccountTransId?if_exists}</td> <td>${finAccountTransType.description?if_exists}</td> - <td>${(partyName.firstName)!} ${(partyName.lastName)!} ${(partyName.groupName)!}</td> - <td>${finAccountTrans.glReconciliationId?if_exists}</td> + <td><#if partyName?has_content>${(partyName.firstName)!} ${(partyName.lastName)!} ${(partyName.groupName)!}<a href="/partymgr/control/viewprofile?partyId=${partyName.partyId}">[${(partyName.partyId)!}]</a></#if></td> <td>${finAccountTrans.transactionDate?if_exists}</td> <td>${finAccountTrans.entryDateId?if_exists}</td> <td>${finAccountTrans.amount?if_exists}</td> - <td><#if finAccountTrans.paymentId?has_content>${finAccountTrans.paymentId?if_exists}</#if></td> + <td> + <#if finAccountTrans.paymentId?has_content> + <a href="<@ofbizUrl>paymentOverview?paymentId=${finAccountTrans.paymentId}</@ofbizUrl>">${finAccountTrans.paymentId}</a> + </#if> + </td> <td><#if paymentType?has_content>${paymentType.description?if_exists}</#if></td> <td><#if paymentMethodType?has_content>${paymentMethodType.description?if_exists}</#if></td> <td><#if status?has_content>${status.description?if_exists}</#if></td> Modified: ofbiz/trunk/applications/accounting/widget/FinAccountForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/FinAccountForms.xml?rev=802494&r1=802493&r2=802494&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/widget/FinAccountForms.xml (original) +++ ofbiz/trunk/applications/accounting/widget/FinAccountForms.xml Sun Aug 9 06:37:01 2009 @@ -283,8 +283,14 @@ <field name="searchButton" widget-style="smallSubmit"><submit button-type="button"/></field> </form> <form name="FindFinAccountTransactions" type="single" target="FindFinAccountTrans"> + <actions> + <entity-and entity-name="GlReconciliation" list="glReconciliations"> + <field-map field-name="glAccountId" from-field="finAccount.postToGlAccountId"/> + <order-by field-name="reconciledDate DESC"/> + </entity-and> + </actions> <field name="noConditionFind"><hidden value="Y"/><!-- if this isn't there then with all fields empty no query will be done --></field> - <field name="finAccountId"><hidden/></field> + <field name="finAccountId"><hidden value="${finAccountId}"/></field> <field name="finAccountTransTypeId"> <drop-down allow-empty="true"> <entity-options description="${description}" entity-name="FinAccountTransType"> @@ -299,6 +305,13 @@ </entity-options> </drop-down> </field> + <field name="glReconciliationId" position="2"> + <drop-down allow-empty="true"> + <option key="_NA_" description="${uiLabelMap.AccountingNotAssigned}"/> + <list-options list-name="glReconciliations" key-name="glReconciliationId" + description="${glReconciliationName}[[${glReconciliationId}] [${reconciledDate}] [${reconciledBalance}]]"/> + </drop-down> + </field> <field name="fromTransactionDate" position="1"><date-time/></field> <field name="thruTransactionDate" position="2"><date-time/></field> <field name="fromEntryDate" position="1"><date-time/></field> @@ -364,14 +377,24 @@ <submit button-type="button"/> </field> </form> - <form name="ListFinAccountReconciliations" type="list" list-name="glReconciliations" separate-columns="true" + <form name="ListFinAccountReconciliations" type="list" list-name="glReconciliations" list-entry-name="glReconciliation" separate-columns="true" odd-row-style="alternate-row" header-row-style="header-row-2" default-table-style="basic-table hover-bar"> - <auto-fields-service service-name="updateGlReconciliation" default-field-type="display"/> + <row-actions> + <entity-one entity-name="PartyNameView" value-field="partyName"> + <field-map field-name="partyId" from-field="glReconciliation.organizationPartyId"/> + </entity-one> + </row-actions> + <auto-fields-service service-name="updateGlReconciliation" default-field-type="display" map-name="glReconciliation"/> <field name="glReconciliationId"> - <hyperlink description="${glReconciliationId}" target="ViewGlReconciliationWithTransaction"> - <parameter param-name="glReconciliationId"/> + <hyperlink target="ViewGlReconciliationWithTransaction" description="${glReconciliation.glReconciliationId}"> + <parameter param-name="glReconciliationId" from-field="glReconciliation.glReconciliationId"/> <parameter param-name="finAccountId"/> </hyperlink> </field> + <field name="organizationPartyId" title="${uiLabelMap.PartyParty}"> + <hyperlink target="/partymgr/control/viewprofile" target-type="inter-app" description="${partyName.firstName} ${partyName.lastName}${partyName.groupName} [${partyName.partyId}]"> + <parameter param-name="partyId" from-field="partyName.partyId"/> + </hyperlink> + </field> </form> </forms> Modified: ofbiz/trunk/applications/accounting/widget/FinAccountScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/FinAccountScreens.xml?rev=802494&r1=802493&r2=802494&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/widget/FinAccountScreens.xml (original) +++ ofbiz/trunk/applications/accounting/widget/FinAccountScreens.xml Sun Aug 9 06:37:01 2009 @@ -422,6 +422,7 @@ <set field="totalCreatedApprovedTransactions" type="Long" from-field="finAccountTransListAndTotals.totalCreatedApprovedTransactions"/> <set field="finAccountId" from-field="parameters.finAccountId"/> <entity-one entity-name="FinAccount" value-field="finAccount"/> + <set field="glReconciliationId" from-field="parameters.glReconciliationId"/> <set field="finAccountTransId" from-field="parameters.finAccountTransId"/> </actions> <widgets> |
Free forum by Nabble | Edit this page |