Author: apatel
Date: Wed Jul 29 06:26:13 2009 New Revision: 798790 URL: http://svn.apache.org/viewvc?rev=798790&view=rev Log: Patch from OFBIZ-2727 with minor improvements. Thanks Chirag, Surya, Sumit, Rishi and all who worked on it. Added: ofbiz/trunk/applications/accounting/webapp/accounting/finaccounttrans/ ofbiz/trunk/applications/accounting/webapp/accounting/finaccounttrans/FinAccountTrans.ftl (with props) Modified: ofbiz/trunk/applications/accounting/config/AccountingUiLabels.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/widget/FinAccountForms.xml ofbiz/trunk/applications/accounting/widget/FinAccountScreens.xml ofbiz/trunk/applications/accounting/widget/Menus.xml Modified: ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml?rev=798790&r1=798789&r2=798790&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml (original) +++ ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml Wed Jul 29 06:26:13 2009 @@ -889,6 +889,9 @@ <value xml:lang="th">à¸à¸³à¸£à¸²à¸¢à¸à¸²à¸£à¹à¸à¸à¸³à¸à¸±à¸à¸ªà¸´à¸à¸à¹à¸²à¹à¸à¹à¸à¹</value> <value xml:lang="zh">æ¯ä»çå票æç»</value> </property> + <property key="AccountingApprovedGrandTotal"> + <value xml:lang="en">Approved Grand Total</value> + </property> <property key="AccountingAr"> <value xml:lang="de">Hauptseite Debitorenbuchhaltung</value> <value xml:lang="en">Main Page Account Receivable</value> @@ -1115,6 +1118,9 @@ <value xml:lang="th">à¸à¸·à¹à¸à¸à¸à¸²à¸à¸²à¸£</value> <value xml:lang="zh">é¶è¡å称</value> </property> + <property key="AccountingBankReconciliation"> + <value xml:lang="en">Bank Reconciliation</value> + </property> <property key="AccountingBillToAddress1"> <value xml:lang="ar">Ùضع اÙ٠ستØÙات عÙ٠اÙعÙÙا٠1</value> <value xml:lang="de">Rechnung an Addresse1</value> @@ -1912,6 +1918,12 @@ <value xml:lang="nl">Maak nieuwe calculatie voor kostencomponent</value> <value xml:lang="th">Create New Cost Component Calc</value> </property> + <property key="AccountingCreatedApprovedGrandTotal"> + <value xml:lang="en">Created/Approved Grand Total</value> + </property> + <property key="AccountingCreatedGrandTotal"> + <value xml:lang="en">Created Grand Total</value> + </property> <property key="AccountingCreateFixedAssetMaintOrderPermissionError"> <value xml:lang="en">Security Error: to run createFixedAssetMaintOrder you must have the ACCOUNTING_CREATEUPDATE or ACCOUNTING_ADMIN permission, or the limited ACCOUNTING_ROLE_CREATE permission</value> <value xml:lang="fr">Erreur de sécurité: pour exécuter createFixedAssetMaintOrder vous devez avoir les autorisations ACCOUNTING_CREATEUPDATE ou ACCOUNTING_ADMIN, ou bien la autorisation limitée ACCOUNTING_ROLE_CREATE</value> @@ -5436,6 +5448,12 @@ <property key="AccountingNoRecordFound"> <value xml:lang="en">No Record Found.</value> </property> + <property key="AccountingNotAdjustmentFinAccountTrans"> + <value xml:lang="en">Not a adjustment financial account transaction.</value> + </property> + <property key="AccountingNotDepositFinAccountTrans"> + <value xml:lang="en">Not a deposit financial account transaction.</value> + </property> <property key="AccountingNotModificationRecrationGlAccount"> <value xml:lang="ar">Ùا ÙÙ Ù٠تعÙÙر Ùذا دÙ٠إعادة إستØداث Øساب اÙÙ ØاسبÙ</value> <value xml:lang="en">This cannot be changed without re-creating the GL Account.</value> @@ -5448,6 +5466,9 @@ <value xml:lang="th">à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¹à¸à¸¥à¸µà¹à¸¢à¸à¹à¸à¸¢à¸à¸£à¸²à¸¨à¸à¸²à¸à¸à¸²à¸£à¸ªà¸£à¹à¸²à¸à¸à¸±à¸à¸à¸µà¹à¸¢à¸à¸à¸£à¸°à¹à¸ à¸à¸à¸±à¹à¸§à¹à¸à¸à¸µà¸à¸à¸£à¸±à¹à¸.</value> <value xml:lang="zh">åªæéæ°æ°å»ºæ»è´¦è´¦æ·æè½æ¹åè¿ä¸ªæ°æ®é¡¹ã</value> </property> + <property key="AccountingNotWithdrawlFinAccountTrans"> + <value xml:lang="en">Not a withdrawl financial account transaction.</value> + </property> <property key="AccountingNumber"> <value xml:lang="cs">ÄÃslo</value> <value xml:lang="de">Nummer</value> @@ -6848,6 +6869,9 @@ <value xml:lang="th">à¹à¸à¹à¸£à¸±à¸à¸à¸²à¸£à¸à¸³à¸£à¸°à¹à¸à¸´à¸</value> <value xml:lang="zh">æ¥æ¶æ¯ä»</value> </property> + <property key="AccountingReconcile"> + <value xml:lang="en">Reconcile</value> + </property> <property key="AccountingReferenceNumber"> <value xml:lang="ar">رÙ٠اÙ٠رجع</value> <value xml:lang="en">Reference Number</value> @@ -10956,6 +10980,9 @@ <value xml:lang="ru">ÐоиÑк ÑинанÑовÑÑ ÑÑеÑов</value> <value xml:lang="th">à¸à¹à¸à¸«à¸²à¸à¸à¸à¸³à¹à¸£à¸ªà¸°à¸ªà¸¡à¹à¸¥à¸°à¸à¸à¹à¸ªà¸à¸à¸à¸²à¸£à¹à¸à¸¥à¸µà¹à¸¢à¸à¹à¸à¸¥à¸à¸à¸²à¸à¸°à¸à¸²à¸£à¹à¸à¸´à¸</value> </property> + <property key="PageTitleFindFinAccountTrans"> + <value xml:lang="en">Find Financial Account Transactions</value> + </property> <property key="PageTitleFindPaymentGatewayConfig"> <value xml:lang="en">Find Payment Gateway Config</value> <value xml:lang="it">Ricerca configurazioni gateway pagamenti</value> Modified: ofbiz/trunk/applications/accounting/data/DemoGlSetupData.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/data/DemoGlSetupData.xml?rev=798790&r1=798789&r2=798790&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/data/DemoGlSetupData.xml (original) +++ ofbiz/trunk/applications/accounting/data/DemoGlSetupData.xml Wed Jul 29 06:26:13 2009 @@ -215,6 +215,7 @@ <!-- Chart Of Accounts --> <GlAccountOrganization organizationPartyId="Company" glAccountId="100000" fromDate="2001-01-01 00:00:00.0"/> + <GlAccountOrganization organizationPartyId="Company" glAccountId="111000" fromDate="2001-01-01 00:00:00.0"/> <GlAccountOrganization organizationPartyId="Company" glAccountId="111100" fromDate="2001-01-01 00:00:00.0"/> <GlAccountOrganization organizationPartyId="Company" glAccountId="112000" fromDate="2001-01-01 00:00:00.0"/> <GlAccountOrganization organizationPartyId="Company" glAccountId="120000" fromDate="2001-01-01 00:00:00.0"/> 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=798790&r1=798789&r2=798790&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 Jul 29 06:26:13 2009 @@ -512,4 +512,256 @@ </if-not-empty> </iterate> </simple-method> + + <simple-method method-name="getFinAccountTransListAndTotals" short-description="Retrieve Financial Account Transaction List and Totals"> + <entity-condition entity-name="FinAccountTrans" list="finAccountTransactions"> + <condition-expr field-name="finAccountId" from-field="parameters.finAccountId"/> + <use-iterator/> + </entity-condition> + <set field="grandTotal" type="BigDecimal" value="0"/> + <set field="createdGrandTotal" type="BigDecimal" value="0"/> + <set field="approvedGrandTotal" type="BigDecimal" value="0"/> + <set field="createdApprovedGrandTotal" type="BigDecimal" value="0"/> + <iterate list="finAccountTransactions" entry="finAccountTransaction"> + <if-compare field="finAccountTransaction.finAccountTransTypeId" operator="equals" value="WITHDRAWAL"> + <if-compare field="finAccountTransaction.statusId" operator="equals" value="FINACT_TRNS_CREATED"> + <set field="createdGrandTotal" value="${createdGrandTotal - finAccountTransaction.amount}" type="BigDecimal"/> + <set field="createdApprovedGrandTotal" value="${createdApprovedGrandTotal - finAccountTransaction.amount}" type="BigDecimal"/> + </if-compare> + <if-compare field="finAccountTransaction.statusId" operator="equals" value="FINACT_TRNS_APPROVED"> + <set field="approvedGrandTotal" value="${approvedGrandTotal - finAccountTransaction.amount}" type="BigDecimal"/> + <set field="createdApprovedGrandTotal" value="${createdApprovedGrandTotal - finAccountTransaction.amount}" type="BigDecimal"/> + </if-compare> + <else> + <if-compare field="finAccountTransaction.statusId" operator="equals" value="FINACT_TRNS_CREATED"> + <set field="createdGrandTotal" value="${createdGrandTotal + finAccountTransaction.amount}" type="BigDecimal"/> + <set field="createdApprovedGrandTotal" value="${createdApprovedGrandTotal + finAccountTransaction.amount}" type="BigDecimal"/> + </if-compare> + <if-compare field="finAccountTransaction.statusId" operator="equals" value="FINACT_TRNS_APPROVED"> + <set field="approvedGrandTotal" value="${approvedGrandTotal + finAccountTransaction.amount}" type="BigDecimal"/> + <set field="createdApprovedGrandTotal" value="${createdApprovedGrandTotal + finAccountTransaction.amount}" type="BigDecimal"/> + </if-compare> + </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> + <iterate list="finAccountTransList" entry="finAccountTrans"> + <if-compare field="finAccountTrans.finAccountTransTypeId" operator="equals" value="WITHDRAWAL"> + <set field="grandTotal" value="${grandTotal - finAccountTrans.amount}" type="BigDecimal"/> + <else> + <set field="grandTotal" value="${grandTotal + finAccountTrans.amount}" type="BigDecimal"/> + </else> + </if-compare> + </iterate> + <field-to-result field="finAccountTransList"/> + <field-to-result field="grandTotal"/> + <field-to-result field="createdGrandTotal"/> + <field-to-result field="approvedGrandTotal"/> + <field-to-result field="createdApprovedGrandTotal"/> + </simple-method> + + <simple-method method-name="getFinAccountTransRunningTotal" short-description="Calculate running total of Financial Account Transactions"> + <set field="runningTotal" type="BigDecimal" from-field="parameters.runningTotal" default-value="0"/> + <entity-one entity-name="FinAccountTrans" value-field="finAccountTrans" auto-field-map="true"/> + <set field="runningTotal" value="${runningTotal + finAccountTrans.amount}" type="BigDecimal"/> + <field-to-result field="runningTotal"/> + <set-service-fields service-name="getPartyAccountingPreferences" map="parameters" to-map="getPartyAccountingPreferencesMap"/> + <call-service service-name="getPartyAccountingPreferences" in-map-name="getPartyAccountingPreferencesMap"> + <result-to-field result-name="partyAccountingPreference"/> + </call-service> + <set field="currencyUomId" from-field="partyAccountingPreference.baseCurrencyUomId"/> + <if-empty field="currencyUomId"> + <property-to-field resource="general" property="currency.uom.id.default" field="currencyUomId"/> + </if-empty> + <set field="finAccountTransRunningTotal" value="${groovy:org.ofbiz.base.util.UtilFormatOut.formatCurrency(runningTotal, currencyUomId, parameters.locale)}"/> + <field-to-result field="finAccountTransRunningTotal"/> + </simple-method> + + <simple-method method-name="reconcileFinAccountTrans" short-description="Reconcile Financial Accounting Transaction"> + <now-timestamp field="nowTimestamp"/> + <entity-one entity-name="FinAccountTrans" value-field="finAccountTrans" auto-field-map="true"/> + <if-compare field="finAccountTrans.finAccountTransTypeId" operator="equals" value="ADJUSTMENT"> + <set-service-fields service-name="reconcileAdjustmentFinAcctgTrans" map="parameters" to-map="reconcileAdjustmentFinAcctgTransMap"/> + <set field="reconcileAdjustmentFinAcctgTransMap.finAccountTrans" from-field="finAccountTrans"/> + <set field="reconcileAdjustmentFinAcctgTransMap.organizationPartyId" from-field="parameters.organizationPartyId"/> + <call-service service-name="reconcileAdjustmentFinAcctgTrans" in-map-name="reconcileAdjustmentFinAcctgTransMap"/> + </if-compare> + <if-compare field="finAccountTrans.finAccountTransTypeId" operator="equals" value="DEPOSIT"> + <set-service-fields service-name="reconcileDepositFinAcctgTrans" map="parameters" to-map="reconcileDepositFinAcctgTransMap"/> + <set field="reconcileDepositFinAcctgTransMap.finAccountTrans" from-field="finAccountTrans"/> + <call-service service-name="reconcileDepositFinAcctgTrans" in-map-name="reconcileDepositFinAcctgTransMap"/> + </if-compare> + <if-compare field="finAccountTrans.finAccountTransTypeId" operator="equals" value="WITHDRAWAL"> + <set-service-fields service-name="reconcileWithdrawalFinAcctgTrans" map="parameters" to-map="reconcileWithdrawalFinAcctgTransMap"/> + <set field="reconcileWithdrawalFinAcctgTransMap.finAccountTrans" from-field="finAccountTrans"/> + <call-service service-name="reconcileWithdrawalFinAcctgTrans" in-map-name="reconcileWithdrawalFinAcctgTransMap"/> + </if-compare> + + <set-service-fields service-name="setFinAccountTransStatus" map="finAccountTrans" to-map="setFinAccountTransStatusMap"/> + <set field="setFinAccountTransStatusMap.statusId" value="FINACT_TRNS_APPROVED"/> + <call-service service-name="setFinAccountTransStatus" in-map-name="setFinAccountTransStatusMap"/> + </simple-method> + + <simple-method method-name="reconcileAdjustmentFinAcctgTrans" short-description="Reconcile financial accounting transaction of type adjustment"> + <set field="finAccountTrans" from-field="parameters.finAccountTrans"/> + <if-compare field="finAccountTrans.finAccountTransTypeId" operator="equals" value="ADJUSTMENT"> + <get-related-one relation-name="FinAccount" value-field="parameters.finAccountTrans" to-value-field="finAccount"/> + <set-service-fields service-name="quickCreateAcctgTransAndEntries" map="parameters.finAccountTrans" to-map="quickCreateAcctgTransAndEntriesMap"/> + <set field="quickCreateAcctgTransAndEntriesMap.glFiscalTypeId" value="ACTUAL"/> + <set field="quickCreateAcctgTransAndEntriesMap.organizationPartyId" from-field="parameters.organizationPartyId"/> + <if-compare field="finAccountTrans.amount" operator="less" value="0"> + <set field="quickCreateAcctgTransAndEntriesMap.acctgTransTypeId" value="INCOMING_PAYMENT"/> + <else> + <set field="quickCreateAcctgTransAndEntriesMap.acctgTransTypeId" value="OUTGOING_PAYMENT"/> + </else> + </if-compare> + <set field="quickCreateAcctgTransAndEntriesMap.reconcileStatusId" value="AES_RECONCILED"/> + <set field="quickCreateAcctgTransAndEntriesMap.isPosted" value="Y"/> + <if-compare field="parameters.debitCreditFlag" operator="equals" value="D"> + <set field="quickCreateAcctgTransAndEntriesMap.debitGlAccountId" from-field="parameters.glAccountId"/> + <set field="quickCreateAcctgTransAndEntriesMap.creditGlAccountId" from-field="finAccount.postToGlAccountId"/> + <else> + <set field="quickCreateAcctgTransAndEntriesMap.debitGlAccountId" from-field="finAccount.postToGlAccountId"/> + <set field="quickCreateAcctgTransAndEntriesMap.creditGlAccountId" from-field="parameters.glAccountId"/> + </else> + </if-compare> + <call-service service-name="quickCreateAcctgTransAndEntries" in-map-name="quickCreateAcctgTransAndEntriesMap"/> + <else> + <property-to-field property="AccountingNotAdjustmentFinAccountTrans" resource="AccountingUiLabels" field="errorMessage"/> + <field-to-result field="errorMessage" result-name="errorMessage"/> + </else> + </if-compare> + </simple-method> + + <simple-method method-name="reconcileDepositFinAcctgTrans" short-description="Reconcile financial accounting transaction of type deposit"> + <now-timestamp field="nowTimestamp"/> + <set field="finAccountTrans" from-field="parameters.finAccountTrans"/> + <get-related-one relation-name="FinAccount" value-field="finAccountTrans" to-value-field="finAccount"/> + <if-compare field="finAccountTrans.finAccountTransTypeId" operator="equals" value="DEPOSIT"> + <set field="finAccountTrans" from-field="parameters.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> + <get-related-one relation-name="Payment" value-field="finAccountTrans" to-value-field="payment"/> + <field-to-list field="payment" list="payments"/> + </else> + </if-empty> + <iterate list="payments" entry="payment"> + <clear-field field="createAcctgTransAndEntriesMap"/> + <set field="partyIdTo" from-field="payment.partyIdTo"/> + <set field="partyIdFrom" from-field="payment.partyIdFrom"/> + <get-related relation-name="AcctgTrans" list="acctgTransList" value-field="payment"/> + <iterate list="acctgTransList" entry="acctgTrans"> + <get-related relation-name="AcctgTransEntry" list="acctgTransEntries" value-field="acctgTrans"/> + <set-service-fields service-name="createAcctgTransAndEntries" map="acctgTrans" to-map="createAcctgTransAndEntriesMap"/> + </iterate> + <clear-field field="createAcctgTransAndEntries.acctgTransId"/> + <set field="createAcctgTransAndEntries.transactionDate" from-field="nowTimestamp"/> + <set field="createAcctgTransAndEntries.postedDate" from-field="nowTimestamp"/> + <set field="entryAmount" type="BigDecimal" value="0"/> + <iterate list="acctgTransEntries" entry="oldAcctgTransEntry"> + <if-compare field="oldAcctgTransEntry.debitCreditFlag" operator="equals" value="D"> + <make-value value-field="newAcctgTransEntry" entity-name="AcctgTransEntry"/> + <set field="newAcctgTransEntry.glAccountId" from-field="oldAcctgTransEntry.glAccountId"/> + <set field="organizationPartyId" from-field="oldAcctgTransEntry.organizationPartyId"/> + <set field="newAcctgTransEntry.organizationPartyId" from-field="organizationPartyId"/> + <set field="newAcctgTransEntry.partyId" from-field="oldAcctgTransEntry.ownerPartyId"/> + <set field="newAcctgTransEntry.amount" from-field="oldAcctgTransEntry.amount"/> + <set field="newAcctgTransEntry.acctgTransEntryTypeId" from-field="oldAcctgTransEntry.acctgTransEntryTypeId"/> + <set field="newAcctgTransEntry.debitCreditFlag" value="C"/> + <set field="newAcctgTransEntry.reconcileStatusId" value="AES_RECONCILED"/> + <set field="entryAmount" type="BigDecimal" value="${entryAmount + newAcctgTransEntry.amount}"/> + <field-to-list field="newAcctgTransEntry" list="createAcctgTransAndEntriesMap.acctgTransEntries"/> + </if-compare> + </iterate> + <make-value value-field="newAcctgTransEntry" entity-name="AcctgTransEntry"/> + <set field="newAcctgTransEntry.glAccountId" from-field="finAccount.postToGlAccountId"/> + <set field="newAcctgTransEntry.organizationPartyId" from-field="organizationPartyId"/> + <set field="newAcctgTransEntry.partyId" from-field="oldAcctgTransEntry.ownerPartyId"/> + <set field="newAcctgTransEntry.amount" from-field="entryAmount"/> + <set field="newAcctgTransEntry.acctgTransEntryTypeId" value="_NA_"/> + <set field="newAcctgTransEntry.debitCreditFlag" value="D"/> + <set field="newAcctgTransEntry.reconcileStatusId" value="AES_RECONCILED"/> + <field-to-list field="newAcctgTransEntry" list="createAcctgTransAndEntriesMap.acctgTransEntries"/> + <call-service service-name="createAcctgTransAndEntries" in-map-name="createAcctgTransAndEntriesMap"/> + </iterate> + <else> + <property-to-field property="AccountingNotDepositFinAccountTrans" resource="AccountingUiLabels" field="errorMessage"/> + <field-to-result field="errorMessage" result-name="errorMessage"/> + </else> + </if-compare> + </simple-method> + + <simple-method method-name="reconcileWithdrawalFinAcctgTrans" short-description="Reconcile financial accounting transaction of type withdrawl"> + <now-timestamp field="nowTimestamp"/> + <set field="finAccountTrans" from-field="parameters.finAccountTrans"/> + <get-related-one relation-name="FinAccount" value-field="finAccountTrans" to-value-field="finAccount"/> + <if-compare field="finAccountTrans.finAccountTransTypeId" operator="equals" value="WITHDRAWAL"> + <set field="finAccountTrans" from-field="parameters.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> + <get-related-one relation-name="Payment" value-field="finAccountTrans" to-value-field="payment"/> + <field-to-list field="payment" list="payments"/> + </else> + </if-empty> + <iterate list="payments" entry="payment"> + <clear-field field="createAcctgTransAndEntriesMap"/> + <set field="partyIdTo" from-field="payment.partyIdTo"/> + <set field="partyIdFrom" from-field="payment.partyIdFrom"/> + <get-related relation-name="AcctgTrans" list="acctgTransList" value-field="payment"/> + <iterate list="acctgTransList" entry="acctgTrans"> + <get-related relation-name="AcctgTransEntry" list="acctgTransEntries" value-field="acctgTrans"/> + <set-service-fields service-name="createAcctgTransAndEntries" map="acctgTrans" to-map="createAcctgTransAndEntriesMap"/> + </iterate> + <clear-field field="createAcctgTransAndEntries.acctgTransId"/> + <set field="createAcctgTransAndEntries.transactionDate" from-field="nowTimestamp"/> + <set field="createAcctgTransAndEntries.postedDate" from-field="nowTimestamp"/> + <set field="entryAmount" type="BigDecimal" value="0"/> + <iterate list="acctgTransEntries" entry="oldAcctgTransEntry"> + <if-compare field="oldAcctgTransEntry.debitCreditFlag" operator="equals" value="C"> + <make-value value-field="newAcctgTransEntry" entity-name="AcctgTransEntry"/> + <set field="newAcctgTransEntry.glAccountId" from-field="oldAcctgTransEntry.glAccountId"/> + <set field="organizationPartyId" from-field="oldAcctgTransEntry.organizationPartyId"/> + <set field="newAcctgTransEntry.organizationPartyId" from-field="organizationPartyId"/> + <set field="newAcctgTransEntry.partyId" from-field="oldAcctgTransEntry.ownerPartyId"/> + <set field="newAcctgTransEntry.amount" from-field="oldAcctgTransEntry.amount"/> + <set field="newAcctgTransEntry.acctgTransEntryTypeId" from-field="oldAcctgTransEntry.acctgTransEntryTypeId"/> + <set field="newAcctgTransEntry.debitCreditFlag" value="D"/> + <set field="newAcctgTransEntry.reconcileStatusId" value="AES_RECONCILED"/> + <set field="entryAmount" type="BigDecimal" value="${entryAmount + newAcctgTransEntry.amount}"/> + <field-to-list field="newAcctgTransEntry" list="createAcctgTransAndEntriesMap.acctgTransEntries"/> + </if-compare> + </iterate> + <make-value value-field="newAcctgTransEntry" entity-name="AcctgTransEntry"/> + <set field="newAcctgTransEntry.glAccountId" from-field="finAccount.postToGlAccountId"/> + <set field="newAcctgTransEntry.organizationPartyId" from-field="organizationPartyId"/> + <set field="newAcctgTransEntry.partyId" from-field="oldAcctgTransEntry.ownerPartyId"/> + <set field="newAcctgTransEntry.amount" from-field="entryAmount"/> + <set field="newAcctgTransEntry.acctgTransEntryTypeId" value="_NA_"/> + <set field="newAcctgTransEntry.debitCreditFlag" value="C"/> + <set field="newAcctgTransEntry.reconcileStatusId" value="AES_RECONCILED"/> + <field-to-list field="newAcctgTransEntry" list="createAcctgTransAndEntriesMap.acctgTransEntries"/> + <call-service service-name="createAcctgTransAndEntries" in-map-name="createAcctgTransAndEntriesMap"/> + </iterate> + <else> + <property-to-field property="AccountingNotWithdrawlFinAccountTrans" resource="AccountingUiLabels" field="errorMessage"/> + <field-to-result field="errorMessage" result-name="errorMessage"/> + </else> + </if-compare> + </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=798790&r1=798789&r2=798790&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/servicedef/services_finaccount.xml (original) +++ ofbiz/trunk/applications/accounting/servicedef/services_finaccount.xml Wed Jul 29 06:26:13 2009 @@ -206,6 +206,59 @@ <attribute name="finAccountAuthId" type="String" mode="IN" optional="true"/> <attribute name="finAccountId" type="String" mode="IN" optional="true"/> </service> + <service name="getFinAccountTransListAndTotals" engine="simple" + location="component://accounting/script/org/ofbiz/accounting/finaccount/FinAccountServices.xml" invoke="getFinAccountTransListAndTotals"> + <description>Financial Account Transaction List and Totals</description> + <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="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"/> + <attribute name="thruEntryDate" type="Timestamp" mode="IN" optional="true"/> + <attribute name="finAccountTransList" type="List" mode="OUT" optional="true"/> + <attribute name="grandTotal" type="BigDecimal" mode="OUT" optional="true"/> + <attribute name="createdGrandTotal" type="BigDecimal" mode="OUT" optional="true"/> + <attribute name="approvedGrandTotal" type="BigDecimal" mode="OUT" optional="true"/> + <attribute name="createdApprovedGrandTotal" type="BigDecimal" mode="OUT" optional="true"/> + </service> + <service name="getFinAccountTransRunningTotal" engine="simple" + location="component://accounting/script/org/ofbiz/accounting/finaccount/FinAccountServices.xml" invoke="getFinAccountTransRunningTotal"> + <description>Financial Account Running Total</description> + <attribute name="finAccountTransId" type="String" mode="IN" optional="false"/> + <attribute name="organizationPartyId" type="String" mode="IN" optional="false"/> + <attribute name="runningTotal" type="BigDecimal" mode="INOUT" optional="true"/> + <attribute name="finAccountTransRunningTotal" type="String" mode="OUT" optional="true"/> + </service> + <service name="reconcileFinAccountTrans" engine="simple" + location="component://accounting/script/org/ofbiz/accounting/finaccount/FinAccountServices.xml" invoke="reconcileFinAccountTrans"> + <description>Reconcile Financial Accounting Financial Transactions</description> + <attribute name="finAccountTransId" type="String" mode="IN" optional="false"/> + <attribute name="organizationPartyId" type="String" mode="IN" optional="false"/> + <attribute name="glAccountId" type="String" mode="IN" optional="true"/> + <attribute name="debitCreditFlag" type="String" mode="IN" optional="true"/> + </service> + <service name="reconcileAdjustmentFinAcctgTrans" engine="simple" + location="component://accounting/script/org/ofbiz/accounting/finaccount/FinAccountServices.xml" invoke="reconcileAdjustmentFinAcctgTrans"> + <description>Reconcile Financial Accounting Financial Transactions</description> + <attribute name="finAccountTrans" type="org.ofbiz.entity.GenericValue" mode="IN" optional="false"/> + <attribute name="organizationPartyId" type="String" mode="IN" optional="false"/> + <attribute name="glAccountId" type="String" mode="IN" optional="false"/> + <attribute name="debitCreditFlag" type="String" mode="IN" optional="false"/> + <attribute name="errorMessage" type="String" mode="OUT" optional="true"/> + </service> + <service name="reconcileDepositFinAcctgTrans" engine="simple" + location="component://accounting/script/org/ofbiz/accounting/finaccount/FinAccountServices.xml" invoke="reconcileDepositFinAcctgTrans"> + <description>Reconcile Financial Accounting Financial Transactions</description> + <attribute name="finAccountTrans" type="org.ofbiz.entity.GenericValue" mode="IN" optional="false"/> + <attribute name="errorMessage" type="String" mode="OUT" optional="true"/> + </service> + <service name="reconcileWithdrawalFinAcctgTrans" engine="simple" + location="component://accounting/script/org/ofbiz/accounting/finaccount/FinAccountServices.xml" invoke="reconcileWithdrawalFinAcctgTrans"> + <description>Reconcile Financial Accounting Financial Transactions</description> + <attribute name="finAccountTrans" type="org.ofbiz.entity.GenericValue" mode="IN" optional="false"/> + <attribute name="errorMessage" type="String" mode="OUT" optional="true"/> + </service> <!-- service credit account w/ transaction --> <service name="createServiceCredit" engine="java" 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=798790&r1=798789&r2=798790&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml (original) +++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml Wed Jul 29 06:26:13 2009 @@ -1899,15 +1899,33 @@ <request-map uri="createFinAccountTrans"> <security https="true" auth="true"/> <event type="service" path="" invoke="createFinAccountTrans"/> - <response name="success" type="view" value="EditFinAccountTrans"/> + <response name="success" type="view" value="FindFinAccountTrans"/> <response name="error" type="view" value="EditFinAccountTrans"/> </request-map> - + <request-map uri="FindFinAccountTrans"> + <security https="true" auth="true"/> + <response name="success" type="view" value="FindFinAccountTrans"/> + </request-map> <request-map uri="setFinAccountTransStatus"> <security https="true" auth="true"/> <event type="service" path="" invoke="setFinAccountTransStatus"/> - <response name="success" type="view" value="EditFinAccountTrans"/> - <response name="error" type="view" value="EditFinAccountTrans"/> + <response name="success" type="view" value="FindFinAccountTrans"/> + <response name="error" type="view" value="FindFinAccountTrans"/> + </request-map> + <request-map uri="BankReconciliation"> + <security https="true" auth="true"/> + <response name="success" type="view" value="BankReconciliation"/> + </request-map> + <request-map uri="getFinAccountTransRunningTotal"> + <event type="jsonservice-multi" invoke="getFinAccountTransRunningTotal"/> + <response name="success" type="none"/> + <response name="error" type="none"/> + </request-map> + <request-map uri="reconcileFinAccountTrans"> + <security https="true" auth="false"/> + <event type="service-multi" invoke="reconcileFinAccountTrans"/> + <response name="success" type="view" value="BankReconciliation"/> + <response name="error" type="view" value="BankReconciliation"/> </request-map> <!-- Fin Account Authority--> @@ -2394,6 +2412,8 @@ <view-map name="EditFinAccountTrans" type="screen" page="component://accounting/widget/FinAccountScreens.xml#EditFinAccountTrans"/> <view-map name="EditFinAccountAuths" type="screen" page="component://accounting/widget/FinAccountScreens.xml#EditFinAccountAuths"/> <view-map name="EditFinAccountTypeGlAccounts" type="screen" page="component://accounting/widget/GlSetupScreens.xml#EditFinAccountTypeGlAccounts"/> + <view-map name="FindFinAccountTrans" type="screen" page="component://accounting/widget/FinAccountScreens.xml#FindFinAccountTrans"/> + <view-map name="BankReconciliation" type="screen" page="component://accounting/widget/FinAccountScreens.xml#BankReconciliation"/> <!-- FixedAsset --> <view-map name="ListFixedAssets" type="screen" page="component://accounting/widget/FixedAssetScreens.xml#ListFixedAssets"/> Added: 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=798790&view=auto ============================================================================== --- ofbiz/trunk/applications/accounting/webapp/accounting/finaccounttrans/FinAccountTrans.ftl (added) +++ ofbiz/trunk/applications/accounting/webapp/accounting/finaccounttrans/FinAccountTrans.ftl Wed Jul 29 06:26:13 2009 @@ -0,0 +1,259 @@ +<#-- +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. +--> + +<script language="JavaScript" type="text/javascript"> +<!-- +function togglefinAccountTransId(master) { + var form = document.selectAllForm; + var finAccountTransList = form.elements.length; + for (var i = 0; i < finAccountTransList; i++) { + var element = form.elements[i]; + if (element.type == "checkbox") { + element.checked = master.checked; + } + } + getFinAccountTransRunningTotal(master); +} + +function getFinAccountTransRunningTotal(e) { + var form = document.selectAllForm; + var finAccountTransList = form.elements.length; + var isSingle = true; + var isAllSelected = true; + for (var i = 0; i < finAccountTransList; i++) { + var element = form.elements[i]; + if (element.name.startsWith("_rowSubmit_o_")) { + if (element.checked) { + isSingle = false; + } else { + isAllSelected = false; + } + } + } + if (!($(e).checked)) { + $('checkAllTransactions').checked = false; + } else if (isAllSelected) { + $('checkAllTransactions').checked = true; + } + if (!isSingle) { + 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(""); + } +} +--> +</script> + +<div class="screenlet screenlet-body"> + <#if finAccountTransList?has_content && parameters.noConditionFind?exists && parameters.noConditionFind == 'Y'> + <#if !grandTotal?exists> + <div> + <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.FormFieldTitle_partyId}</th> + <th>${uiLabelMap.FormFieldTitle_transactionDate}</th> + <th>${uiLabelMap.FormFieldTitle_entryDate}</th> + <th>${uiLabelMap.CommonAmount}</th> + <th>${uiLabelMap.FormFieldTitle_paymentId}</th> + <th>${uiLabelMap.FormFieldTitle_orderId}</th> + <th>${uiLabelMap.FormFieldTitle_orderItemSeqId}</th> + <th>${uiLabelMap.FormFieldTitle_performedByPartyId}</th> + <th>${uiLabelMap.FormFieldTitle_reasonEnumId}</th> + <th>${uiLabelMap.CommonComments}</th> + <th>${uiLabelMap.CommonStatus}</th> + <th>${uiLabelMap.OrderPaymentType}</th> + <th>${uiLabelMap.FormFieldTitle_paymentMethodTypeId}</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)> + <#else> + <#assign payments = delegator.findByAnd("Payment", {"finAccountTransId" : finAccountTrans.finAccountTransId})> + </#if> + <#assign finAccountTransType = delegator.findOne("FinAccountTransType", {"finAccountTransTypeId" : finAccountTrans.finAccountTransTypeId}, true)> + <#if finAccountTrans.reasonEnumId?has_content> + <#assign enumeration = delegator.findOne("Enumeration", {"enumId" : finAccountTrans.reasonEnumId}, true)> + </#if> + <#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> + <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.CommonAmount}</th> + <th>${uiLabelMap.PartyPartyFrom}</th> + <th>${uiLabelMap.PartyPartyTo}</th> + <th>${uiLabelMap.OrderPaymentType}</th> + <th>${uiLabelMap.FormFieldTitle_paymentMethodTypeId}</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>${payment.amount?if_exists}</td> + <td>${payment.partyIdFrom?if_exists}</td> + <td>${payment.partyIdTo?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> + </tr> + </#list> + </table> + </div> + <script type="text/javascript"> + new Popup('displayPayments_${finAccountTrans.finAccountTransId}','togglePayment_${finAccountTrans.finAccountTransId}', {modal: true, position: 'center', trigger: 'click'}) + </script> + <#else> + ${finAccountTrans.finAccountTransId} + </#if> + </td> + <td>${finAccountTransType.description?if_exists}</td> + <td>${finAccountTrans.partyId?if_exists}</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>${finAccountTrans.orderId?if_exists}</td> + <td>${finAccountTrans.orderItemSeqId?if_exists}</td> + <td>${finAccountTrans.performedByPartyId?if_exists}</td> + <td><#if enumeration?has_content>${enumeration.description?if_exists}</#if></td> + <td>${finAccountTrans.comments?if_exists}</td> + <td><#if status?has_content>${status.description?if_exists}</#if></td> + <td><#if paymentType?has_content>${paymentType.description?if_exists}</#if></td> + <td><#if paymentMethodType?has_content>${paymentMethodType.description?if_exists}</#if></td> + <#if grandTotal?exists> + <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> + </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('finAccountTransId_${finAccountTrans_index}');"/> + </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}"/> + <div> + </table> + </form> + <#else> + </table> + </#if> + <#if grandTotal?exists> + <table border="1" class="basic-table"> + <tr> + <th>${uiLabelMap.FormFieldTitle_grandTotal}</th> + <th>${uiLabelMap.AccountingCreatedGrandTotal}</th> + <th>${uiLabelMap.AccountingApprovedGrandTotal}</th> + <th>${uiLabelMap.AccountingCreatedApprovedGrandTotal}</th> + </tr> + <tr> + <td>${grandTotal}</td> + <td>${createdGrandTotal}</td> + <td>${approvedGrandTotal}</td> + <td>${createdApprovedGrandTotal}</td> + </tr> + </table> + </#if> + <#else> + <h2>${uiLabelMap.AccountingNoRecordFound}</h2> + </#if> +</div> Propchange: ofbiz/trunk/applications/accounting/webapp/accounting/finaccounttrans/FinAccountTrans.ftl ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/applications/accounting/webapp/accounting/finaccounttrans/FinAccountTrans.ftl ------------------------------------------------------------------------------ svn:keywords = Date Rev Author URL Id Propchange: ofbiz/trunk/applications/accounting/webapp/accounting/finaccounttrans/FinAccountTrans.ftl ------------------------------------------------------------------------------ svn:mime-type = text/plain Modified: ofbiz/trunk/applications/accounting/widget/FinAccountForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/FinAccountForms.xml?rev=798790&r1=798789&r2=798790&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/widget/FinAccountForms.xml (original) +++ ofbiz/trunk/applications/accounting/widget/FinAccountForms.xml Wed Jul 29 06:26:13 2009 @@ -166,25 +166,6 @@ <field name="submitButton" title="${uiLabelMap.CommonAdd}" widget-style="smallSubmit"><submit button-type="button"/></field> </form> - <form name="ListFinAccountTransactions" type="list" list-name="finAccountTransactions" separate-columns="true" - odd-row-style="alternate-row" header-row-style="header-row-2" default-table-style="basic-table hover-bar"> - <actions> - <entity-condition entity-name="FinAccountTrans"> - <condition-expr field-name="finAccountId" from-field="finAccountId"/> - </entity-condition> - </actions> - <auto-fields-entity entity-name="FinAccountTrans" default-field-type="display"/> - <field name="finAccountId"><hidden/></field> - <field name="finAccountTransId"><display/></field> - <field name="finAccountTransTypeId"><display-entity entity-name="FinAccountTransType" description="${description}"/></field> - <field name="cancelLink" title="${uiLabelMap.AccountingCancelTransactionStatus}" use-when="${statusId=='FINACT_TRNS_CREATED'}" widget-style="buttontext"> - <hyperlink target="setFinAccountTransStatus" description="${uiLabelMap.CommonCancel}" also-hidden="false"> - <parameter param-name="finAccountTransId"/> - <parameter param-name="finAccountId"/> - <parameter param-name="statusId" value="FINACT_TRNS_CANCELED"/> - </hyperlink> - </field> - </form> <form name="AddFinAccountTrans" type="single" target="createFinAccountTrans" header-row-style="header-row" default-table-style="basic-table"> <auto-fields-service service-name="createFinAccountTrans"/> @@ -294,4 +275,31 @@ <field name="noConditionFind"><hidden value="Y"/><!-- if this isn't there then with all fields empty no query will be done --></field> <field name="searchButton" widget-style="smallSubmit"><submit button-type="button"/></field> </form> + <form name="FindFinAccountTransactions" type="single" target="FindFinAccountTrans"> + <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="finAccountTransTypeId"> + <drop-down allow-empty="true"> + <entity-options description="${description}" entity-name="FinAccountTransType"> + <entity-order-by field-name="description"/> + </entity-options> + </drop-down> + </field> + <field name="statusId" title="${uiLabelMap.CommonStatus}"> + <drop-down allow-empty="true"> + <entity-options entity-name="StatusItem" description="${description}"> + <entity-constraint name="statusTypeId" value="FINACT_TRNS_STATUS"/> + </entity-options> + </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> + <field name="thruEntryDate" position="2"><date-time/></field> + <field name="searchButton" widget-style="smallSubmit"><submit button-type="button"/></field> + </form> + <form name="FindBankReconciliationFinAcctTrans" target="BankReconciliation" + extends="FindFinAccountTransactions"> + <field name="statusId" title="${uiLabelMap.CommonStatus}"><display-entity entity-name="StatusItem" description="${description}"/></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=798790&r1=798789&r2=798790&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/widget/FinAccountScreens.xml (original) +++ ofbiz/trunk/applications/accounting/widget/FinAccountScreens.xml Wed Jul 29 06:26:13 2009 @@ -171,7 +171,7 @@ <section> <actions> <set field="titleProperty" value="PageTitleEditFinAccountTrans"/> - <set field="tabButtonItem" value="EditFinAccountTrans"/> + <set field="tabButtonItem" value="FinAccountTrans"/> <set field="finAccountId" from-field="parameters.finAccountId"/> <entity-one entity-name="FinAccount" value-field="finAccount"/> <set field="finAccountTransId" from-field="parameters.finAccountTransId"/> @@ -182,7 +182,6 @@ <screenlet id="FinAccountTransPanel" title="${uiLabelMap.PageTitleEditFinAccountTrans} ${uiLabelMap.CommonFor} ${finAccount.finAccountName} [${finAccountId}]" collapsible="true"> <include-form name="AddFinAccountTrans" location="component://accounting/widget/FinAccountForms.xml"/> </screenlet> - <include-form name="ListFinAccountTransactions" location="component://accounting/widget/FinAccountForms.xml"/> </decorator-section> </decorator-screen> </widgets> @@ -385,4 +384,89 @@ </widgets> </section> </screen> + <screen name="FindFinAccountTrans"> + <section> + <actions> + <set field="titleProperty" value="PageTitleFindFinAccountTrans"/> + <set field="tabButtonItem" value="FinAccountTrans"/> + <set field="layoutSettings.javaScripts[]" value="/images/prototypejs/popup.js" global="true"/> + <set field="layoutSettings.styleSheets[+0]" value="/images/prototypejs/popup.css" global="true"/> + <service service-name="getFinAccountTransListAndTotals" result-map="finAccountTransListAndTotals" auto-field-map="true"/> + <set field="finAccountTransList" type="List" from-field="finAccountTransListAndTotals.finAccountTransList"/> + <set field="grandTotal" type="BigDecimal" from-field="finAccountTransListAndTotals.grandTotal"/> + <set field="createdGrandTotal" type="BigDecimal" from-field="finAccountTransListAndTotals.createdGrandTotal"/> + <set field="approvedGrandTotal" type="BigDecimal" from-field="finAccountTransListAndTotals.approvedGrandTotal"/> + <set field="createdApprovedGrandTotal" type="BigDecimal" from-field="finAccountTransListAndTotals.createdApprovedGrandTotal"/> + <set field="finAccountId" from-field="parameters.finAccountId"/> + <entity-one entity-name="FinAccount" value-field="finAccount"/> + <set field="finAccountTransId" from-field="parameters.finAccountTransId"/> + </actions> + <widgets> + <decorator-screen name="CommonFinAccountDecorator" location="${parameters.finAccountDecoratorLocation}"> + <decorator-section name="body"> + <link target="EditFinAccountTrans" text="${uiLabelMap.CommonCreateNew}" style="buttontext"> + <parameter param-name="finAccountId" from-field="finAccountId"/> + </link> + <section> + <condition> + <if-compare field="finAccount.finAccountTypeId" operator="equals" value="BANK_ACCOUNT"/> + </condition> + <widgets> + <link target="BankReconciliation" text="${uiLabelMap.AccountingBankReconciliation}" style="buttontext"> + <parameter param-name="finAccountId" from-field="finAccountId"/> + <parameter param-name="statusId" value="FINACT_TRNS_CREATED"/> + </link> + </widgets> + </section> + <screenlet id="FinAccountTransPanel" collapsible="true"> + <include-form name="FindFinAccountTransactions" location="component://accounting/widget/FinAccountForms.xml"/> + </screenlet> + <platform-specific> + <html><html-template location="component://accounting/webapp/accounting/finaccounttrans/FinAccountTrans.ftl"/></html> + </platform-specific> + </decorator-section> + </decorator-screen> + </widgets> + </section> + </screen> + <screen name="BankReconciliation"> + <section> + <actions> + <set field="titleProperty" value="AccountingBankReconciliation"/> + <set field="tabButtonItem" value="FinAccountTrans"/> + <set field="layoutSettings.javaScripts[]" value="/images/prototypejs/popup.js" global="true"/> + <set field="layoutSettings.styleSheets[+0]" value="/images/prototypejs/popup.css" global="true"/> + <service service-name="getFinAccountTransListAndTotals" result-map="finAccountTransListAndTotals" auto-field-map="true"/> + <set field="finAccountTransList" type="List" from-field="finAccountTransListAndTotals.finAccountTransList"/> + <set field="createdApprovedGrandTotal" type="BigDecimal" from-field="finAccountTransListAndTotals.createdApprovedGrandTotal"/> + <set field="finAccountId" from-field="parameters.finAccountId"/> + <entity-one entity-name="FinAccount" value-field="finAccount"/> + </actions> + <widgets> + <decorator-screen name="CommonFinAccountDecorator" location="${parameters.finAccountDecoratorLocation}"> + <decorator-section name="body"> + <link target="EditFinAccountTrans" text="${uiLabelMap.CommonCreateNew}" style="buttontext"> + <parameter param-name="finAccountId" from-field="finAccountId"/> + </link> + <section> + <actions> + <entity-condition entity-name="GlAccountOrganizationAndClass" list="glAccountOrgAndClassList"> + <condition-expr field-name="organizationPartyId" from-field="defaultOrganizationPartyId"/> + <order-by field-name="glAccountId"/> + </entity-condition> + </actions> + <widgets> + <screenlet id="FinAccountTransPanel" collapsible="true"> + <include-form name="FindBankReconciliationFinAcctTrans" location="component://accounting/widget/FinAccountForms.xml"/> + </screenlet> + <platform-specific> + <html><html-template location="component://accounting/webapp/accounting/finaccounttrans/FinAccountTrans.ftl"/></html> + </platform-specific> + </widgets> + </section> + </decorator-section> + </decorator-screen> + </widgets> + </section> + </screen> </screens> Modified: ofbiz/trunk/applications/accounting/widget/Menus.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/Menus.xml?rev=798790&r1=798789&r2=798790&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/widget/Menus.xml (original) +++ ofbiz/trunk/applications/accounting/widget/Menus.xml Wed Jul 29 06:26:13 2009 @@ -643,8 +643,8 @@ <parameter param-name="finAccountId"/> </link> </menu-item> - <menu-item name="EditFinAccountTrans" title="${uiLabelMap.AccountingFinAccountTransations}"> - <link target="EditFinAccountTrans"> + <menu-item name="FinAccountTrans" title="${uiLabelMap.AccountingFinAccountTransations}"> + <link target="FindFinAccountTrans"> <parameter param-name="finAccountId"/> </link> </menu-item> |
Free forum by Nabble | Edit this page |