Author: adrianc
Date: Fri Aug 21 14:59:16 2009 New Revision: 806581 URL: http://svn.apache.org/viewvc?rev=806581&view=rev Log: Synchronized branch with trunk. Added: ofbiz/branches/executioncontext20090812/applications/accounting/webapp/accounting/images/ - copied from r806576, ofbiz/trunk/applications/accounting/webapp/accounting/images/ ofbiz/branches/executioncontext20090812/applications/accounting/webapp/accounting/images/costCenters.js - copied unchanged from r806576, ofbiz/trunk/applications/accounting/webapp/accounting/images/costCenters.js Removed: ofbiz/branches/executioncontext20090812/framework/testtools/lib/ofbiz-testtools.jar Modified: ofbiz/branches/executioncontext20090812/ (props changed) ofbiz/branches/executioncontext20090812/.classpath ofbiz/branches/executioncontext20090812/applications/accounting/config/AccountingUiLabels.xml ofbiz/branches/executioncontext20090812/applications/accounting/script/org/ofbiz/accounting/finaccount/FinAccountGlPostServices.xml ofbiz/branches/executioncontext20090812/applications/accounting/script/org/ofbiz/accounting/finaccount/FinAccountServices.xml ofbiz/branches/executioncontext20090812/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml ofbiz/branches/executioncontext20090812/applications/accounting/script/org/ofbiz/accounting/test/AutoPaymentTests.xml ofbiz/branches/executioncontext20090812/applications/accounting/servicedef/secas.xml ofbiz/branches/executioncontext20090812/applications/accounting/servicedef/services_finaccount.xml ofbiz/branches/executioncontext20090812/applications/accounting/servicedef/services_ledger.xml ofbiz/branches/executioncontext20090812/applications/accounting/testdef/paymenttests.xml ofbiz/branches/executioncontext20090812/applications/accounting/webapp/accounting/WEB-INF/controller.xml ofbiz/branches/executioncontext20090812/applications/accounting/webapp/accounting/finaccounttrans/FinAccountTrans.ftl ofbiz/branches/executioncontext20090812/applications/accounting/webapp/accounting/finaccounttrans/GlReconciledFinAccountTrans.ftl ofbiz/branches/executioncontext20090812/applications/accounting/webapp/accounting/ledger/CostCenters.ftl ofbiz/branches/executioncontext20090812/applications/accounting/webapp/accounting/payment/PaymentForms.xml ofbiz/branches/executioncontext20090812/applications/accounting/webapp/ap/WEB-INF/controller.xml ofbiz/branches/executioncontext20090812/applications/accounting/webapp/ar/WEB-INF/actions/BatchPayments.groovy ofbiz/branches/executioncontext20090812/applications/accounting/webapp/ar/WEB-INF/controller.xml ofbiz/branches/executioncontext20090812/applications/accounting/webapp/ar/payment/batchPayments.ftl ofbiz/branches/executioncontext20090812/applications/accounting/widget/FinAccountForms.xml ofbiz/branches/executioncontext20090812/applications/accounting/widget/FinAccountScreens.xml ofbiz/branches/executioncontext20090812/applications/accounting/widget/GlobalGlAccountsScreens.xml ofbiz/branches/executioncontext20090812/applications/accounting/widget/Menus.xml ofbiz/branches/executioncontext20090812/applications/accounting/widget/PaymentGroupForms.xml ofbiz/branches/executioncontext20090812/applications/accounting/widget/PaymentScreens.xml ofbiz/branches/executioncontext20090812/applications/accounting/widget/ar/ArMenus.xml ofbiz/branches/executioncontext20090812/applications/accounting/widget/ar/ArPaymentScreens.xml ofbiz/branches/executioncontext20090812/applications/accounting/widget/ar/forms/ArPaymentForms.xml ofbiz/branches/executioncontext20090812/applications/content/config/forum.properties ofbiz/branches/executioncontext20090812/applications/content/template/email/servicenotification.ftl ofbiz/branches/executioncontext20090812/applications/humanres/config/HumanResUiLabels.xml ofbiz/branches/executioncontext20090812/applications/order/servicedef/services.xml ofbiz/branches/executioncontext20090812/applications/order/src/org/ofbiz/order/OrderManagerEvents.java ofbiz/branches/executioncontext20090812/applications/order/src/org/ofbiz/order/order/OrderServices.java ofbiz/branches/executioncontext20090812/applications/party/script/org/ofbiz/party/communication/CommunicationEventServices.xml ofbiz/branches/executioncontext20090812/applications/product/script/org/ofbiz/shipment/issuance/IssuanceServices.xml ofbiz/branches/executioncontext20090812/applications/product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml ofbiz/branches/executioncontext20090812/applications/product/servicedef/services_shipment.xml ofbiz/branches/executioncontext20090812/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductInventoryItems.groovy ofbiz/branches/executioncontext20090812/framework/base/src/org/ofbiz/base/util/string/UelUtil.java ofbiz/branches/executioncontext20090812/framework/example/entitydef/entitymodel_view.xml ofbiz/branches/executioncontext20090812/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java ofbiz/branches/executioncontext20090812/framework/widget/templates/csvFormMacroLibrary.ftl ofbiz/branches/executioncontext20090812/specialpurpose/cmssite/webapp/ofbizsite/images/ofbws.css ofbiz/branches/executioncontext20090812/specialpurpose/ecommerce/webapp/ecommerce/customer/changepassword.ftl ofbiz/branches/executioncontext20090812/specialpurpose/ecommerce/webapp/ecommerce/customer/editcontactmech.ftl ofbiz/branches/executioncontext20090812/specialpurpose/ecommerce/webapp/ecommerce/customer/editcreditcard.ftl ofbiz/branches/executioncontext20090812/specialpurpose/ecommerce/webapp/ecommerce/customer/editperson.ftl ofbiz/branches/executioncontext20090812/specialpurpose/ecommerce/webapp/ecommerce/customer/newcustomer.ftl ofbiz/branches/executioncontext20090812/specialpurpose/ecommerce/webapp/ecommerce/customer/viewprofile.ftl ofbiz/branches/executioncontext20090812/specialpurpose/pos/src/org/ofbiz/pos/screen/NumericKeypad.java Propchange: ofbiz/branches/executioncontext20090812/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Fri Aug 21 14:59:16 2009 @@ -1 +1 @@ -/ofbiz/trunk:803908-805009 +/ofbiz/trunk:803908-805009,805456-806576 Modified: ofbiz/branches/executioncontext20090812/.classpath URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/.classpath?rev=806581&r1=806580&r2=806581&view=diff ============================================================================== --- ofbiz/branches/executioncontext20090812/.classpath (original) +++ ofbiz/branches/executioncontext20090812/.classpath Fri Aug 21 14:59:16 2009 @@ -183,7 +183,6 @@ <classpathentry kind="lib" path="framework/webslinger/lib/webslinger-extension-velocity-20090630-3606-466aec2fb8ad.jar"/> <classpathentry kind="lib" path="framework/webslinger/lib/webslinger-extension-wiki-20090630-3606-466aec2fb8ad.jar"/> <classpathentry kind="lib" path="framework/webslinger/lib/webslinger-launcher-20090630-3606-466aec2fb8ad.jar"/> - <classpathentry kind="lib" path="framework/testtools/lib/selenium-server.jar"/> <classpathentry kind="lib" path="framework/testtools/lib/selenium-java-client-driver.jar"/> <classpathentry kind="output" path="bin"/> </classpath> Modified: ofbiz/branches/executioncontext20090812/applications/accounting/config/AccountingUiLabels.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/applications/accounting/config/AccountingUiLabels.xml?rev=806581&r1=806580&r2=806581&view=diff ============================================================================== --- ofbiz/branches/executioncontext20090812/applications/accounting/config/AccountingUiLabels.xml (original) +++ ofbiz/branches/executioncontext20090812/applications/accounting/config/AccountingUiLabels.xml Fri Aug 21 14:59:16 2009 @@ -2199,9 +2199,13 @@ <value xml:lang="en">Create New Deposit Payment</value> <value xml:lang="hi_IN">नठà¤à¤®à¤¾ à¤à¥à¤à¤¤à¤¾à¤¨ बनाà¤à¤</value> </property> + <property key="AccountingCreateNewDepositPaymentFor"> + <value xml:lang="en">Create New Deposit Payment For Financial Account : ${finAccount.finAccountName} [${finAccountId}]</value> + <value xml:lang="hi_IN">${finAccount.finAccountName} [${finAccountId}] वितà¥à¤¤à¥à¤¯ à¤à¤¾à¤¤à¥ à¤à¥ लिठनठà¤à¤®à¤¾ à¤à¥à¤à¤¤à¤¾à¤¨ बनाà¤à¤</value> + </property> <property key="AccountingCreateNewDepositSlipForFinancialAccount"> - <value xml:lang="en">Create New Deposit Slip for Financial Account: ${finAccountId}</value> - <value xml:lang="hi_IN">नठà¤à¤®à¤¾ परà¥à¤à¥ वितà¥à¤¤à¥à¤¯ à¤à¤¾à¤¤à¥ ${finAccountId} à¤à¥ लिठबनाà¤à¤</value> + <value xml:lang="en">Create New Deposit Slip for Financial Account: ${finAccount.finAccountName} [${finAccountId}]</value> + <value xml:lang="hi_IN">नठà¤à¤®à¤¾ परà¥à¤à¥ वितà¥à¤¤à¥à¤¯ à¤à¤¾à¤¤à¥ ${finAccount.finAccountName} [${finAccountId}] à¤à¥ लिठबनाà¤à¤</value> </property> <property key="AccountingCreateNewEftAccount"> <value xml:lang="ar">استØداث Øساب EFT جدÙد</value> @@ -2276,6 +2280,10 @@ <value xml:lang="en">Create New Withdrawal Payment</value> <value xml:lang="hi_IN">नठवापसॠà¤à¥à¤à¤¤à¤¾à¤¨ बनाà¤à¤</value> </property> + <property key="AccountingCreateNewWithdrawalPaymentFor"> + <value xml:lang="en">Create New Withdrawal Payment For Financial Account : ${finAccount.finAccountName} [${finAccountId}]</value> + <value xml:lang="hi_IN">${finAccount.finAccountName} [${finAccountId}] वितà¥à¤¤à¥à¤¯ à¤à¤¾à¤¤à¥ à¤à¥ लिठनठवापसॠà¤à¥à¤à¤¤à¤¾à¤¨ बनाà¤à¤</value> + </property> <property key="AccountingCreatePayment"> <value xml:lang="ar">تسدÙد جدÙد</value> <value xml:lang="de">Zahlung durchführen</value> @@ -2664,8 +2672,8 @@ <value xml:lang="hi_IN">à¤à¤®à¤¾/वापस</value> </property> <property key="AccountingDepositOrWithdrawPayments"> - <value xml:lang="en">Deposit Or Withdraw Payments for Financial Account: ${finAccountId}</value> - <value xml:lang="hi_IN"> ${finAccountId} वितà¥à¤¤à¥à¤¯ à¤à¤¾à¤¤à¥ à¤à¥ लिठà¤à¤®à¤¾ à¤à¥à¤à¤¤à¤¾à¤¨ या à¤à¥à¤à¤¤à¤¾à¤¨ वापस à¤à¤°à¥</value> + <value xml:lang="en">Deposit Or Withdraw Payments for Financial Account: ${finAccount.finAccountName} [${finAccountId}]</value> + <value xml:lang="hi_IN">${finAccount.finAccountName} [${finAccountId}] वितà¥à¤¤à¥à¤¯ à¤à¤¾à¤¤à¥ à¤à¥ लिठà¤à¤®à¤¾ à¤à¥à¤à¤¤à¤¾à¤¨ या à¤à¥à¤à¤¤à¤¾à¤¨ वापस à¤à¤°à¥</value> </property> <property key="AccountingDescr"> <value xml:lang="ar">ÙصÙ</value> @@ -2793,9 +2801,9 @@ </property> <property key="AccountingEditFinAccount"> <value xml:lang="de">Finanzkonto bearbeiten</value> - <value xml:lang="en">Create/Update Financial Account</value> + <value xml:lang="en">Create/Update Financial Account ${finAccount.finAccountName} [${finAccountId}]</value> <value xml:lang="fr">Créer/ mettre à jour un compte financier</value> - <value xml:lang="hi_IN">वितà¥à¤¤à¥à¤¯ à¤à¤¾à¤¤à¤¾ बनाà¤à¤/समà¥à¤ªà¤¾à¤¦à¤¿à¤¤ à¤à¤°à¥</value> + <value xml:lang="hi_IN">${finAccount.finAccountName} [${finAccountId}] वितà¥à¤¤à¥à¤¯ à¤à¤¾à¤¤à¤¾ बनाà¤à¤/समà¥à¤ªà¤¾à¤¦à¤¿à¤¤ à¤à¤°à¥</value> <value xml:lang="it">Crea/Aggiorna Conto Finanziario</value> <value xml:lang="nl">Maak/wijzig financiele rekening</value> <value xml:lang="ru">СоздаÑÑ/обновиÑÑ ÑинанÑовÑй ÑÑеÑ</value> @@ -2807,8 +2815,8 @@ <value xml:lang="hi_IN">वितà¥à¤¤à¥à¤¯ à¤à¤¾à¤¤à¤¾ पà¥à¤°à¤¾à¤§à¤¿à¤à¤°à¤£ ${finAccount.finAccountName} [${finAccountId}] à¤à¥ लिठसमà¥à¤ªà¤¾à¤¦à¤¿à¤¤ à¤à¤°à¥</value> </property> <property key="AccountingEditFinAccountReconciliations"> - <value xml:lang="en">Edit Financial Account Reconciliations</value> - <value xml:lang="hi_IN">वितà¥à¤¤à¥à¤¯ लà¥à¤à¤¾ मिलाप समà¥à¤ªà¤¾à¤¦à¤¿à¤¤ à¤à¤°à¥</value> + <value xml:lang="en">Edit Financial Account Reconciliations for Financial Account : ${finAccount.finAccountName} [${finAccountId}]</value> + <value xml:lang="hi_IN">${finAccount.finAccountName} [${finAccountId}] वितà¥à¤¤à¥à¤¯ à¤à¤¾à¤¤à¥ à¤à¥ लिठवितà¥à¤¤à¥à¤¯ लà¥à¤à¤¾ मिलाप समà¥à¤ªà¤¾à¤¦à¤¿à¤¤ à¤à¤°à¥</value> </property> <property key="AccountingEditFinAccountRoleFor"> <value xml:lang="en">Edit Financial Account Role For ${finAccount.finAccountName} [${finAccountId}]</value> @@ -3204,6 +3212,10 @@ <value xml:lang="th">à¸à¸²à¸£à¸à¸à¸¸à¸à¸²à¸</value> <value xml:lang="zh">ææ</value> </property> + <property key="AccountingFinAccountTransaction"> + <value xml:lang="en">Financial Account Transaction</value> + <value xml:lang="hi_IN">वितà¥à¤¤à¥à¤¯ à¤à¤¾à¤¤à¤¾ लà¥à¤¨-दà¥à¤¨</value> + </property> <property key="AccountingFinAccountTransations"> <value xml:lang="de">Transaktionen</value> <value xml:lang="en">Transactions</value> @@ -3215,6 +3227,10 @@ <value xml:lang="th">รายà¸à¸²à¸£</value> <value xml:lang="zh">交æ</value> </property> + <property key="AccountingFinAccountTransInvalidStatusError"> + <value xml:lang="en">FinAccountTrans must be in created status.</value> + <value xml:lang="hi_IN">FinAccountTrans निरà¥à¤®à¤¿à¤¤ सà¥à¤¥à¤¿à¤¤à¤¿ मà¥à¤ हà¥à¤¨à¤¾ à¤à¤¾à¤¹à¤¿à¤</value> + </property> <property key="AccountingFinAccountTypeGlAccount"> <value xml:lang="de">Finanzkonto-Buchungskonto</value> <value xml:lang="en">FinAccount Type Gl Account</value> @@ -3258,8 +3274,8 @@ <value xml:lang="hi_IN">लà¥à¤à¤¾ पà¥à¤°à¤¾à¤ªà¥à¤¯ à¤à¥à¤à¤¤à¤¾à¤¨ à¤à¥à¤à¥à¤</value> </property> <property key="AccountingFindDepositSlip"> - <value xml:lang="en">Find Deposit Slips for finAccount ${finAccountId}</value> - <value xml:lang="hi_IN">वितà¥à¤¤à¥à¤¯ à¤à¤¾à¤¤à¤¾ ${finAccountId} à¤à¥ लिठà¤à¤®à¤¾ परà¥à¤à¥à¤¯à¤¾à¤ ढà¥à¤à¤¢à¥à¤</value> + <value xml:lang="en">Find Deposit Slips for Financial Account : ${finAccount.finAccountName} [${finAccountId}]</value> + <value xml:lang="hi_IN">वितà¥à¤¤à¥à¤¯ à¤à¤¾à¤¤à¤¾ ${finAccount.finAccountName} [${finAccountId}] à¤à¥ लिठà¤à¤®à¤¾ परà¥à¤à¥à¤¯à¤¾à¤ ढà¥à¤à¤¢à¥à¤</value> </property> <property key="AccountingFindFixedAssets"> <value xml:lang="de">Suche Anlagen</value> @@ -4436,6 +4452,10 @@ <value xml:lang="th">à¸à¸²à¸£à¸à¸³à¸«à¸à¸à¸à¸±à¸à¸à¸µà¹à¸¢à¸à¸à¸£à¸°à¹à¸ à¸à¸à¸±à¹à¸§à¹à¸</value> <value xml:lang="zh">å ¨å±æ»è´¦è®¾ç½®</value> </property> + <property key="AccountingGlReconciliationFor"> + <value xml:lang="en">Gl Reconciliation For : ${finAccount.finAccountName} [${finAccountId}]</value> + <value xml:lang="hi_IN">${finAccount.finAccountName} [${finAccountId}] à¤à¥ लिठपà¥à¤¨à¤°à¥à¤®à¤¿à¤²à¤¾à¤¨</value> + </property> <property key="AccountingGroupInOneTransaction"> <value xml:lang="en">Group in one Transaction</value> <value xml:lang="hi_IN">लà¥à¤¨-दà¥à¤¨ à¤à¤ समà¥à¤¹ मà¥à¤</value> @@ -6927,6 +6947,10 @@ <value xml:lang="en">Selected payments ${batchPaymentIds} is already assigned in a batch</value> <value xml:lang="hi_IN">à¤à¥à¤¨à¥ हà¥à¤ à¤à¥à¤à¤¤à¤¾à¤¨ $(batchPaymentIds) पहलॠहॠà¤à¤ बà¥à¤ मà¥à¤ सà¥à¤à¤ªà¤¾ हॠ</value> </property> + <property key="AccountingPaymentsAssociateWithFinAccountHasInvalidStatusError"> + <value xml:lang="en">Associated Payments with FinAccountTrans has invalid status</value> + <value xml:lang="hi_IN">FinAccountTrans à¤à¥ साथ à¤à¥à¤¡à¤¼à¥ à¤à¥à¤à¤¤à¤¾à¤¨ ठमानà¥à¤¯ सà¥à¤¥à¤¿à¤¤à¤¿ मà¥à¤ हà¥</value> + </property> <property key="AccountingPaymentCancelled"> <value xml:lang="en">Payment [${paymentId}] is cancelled and cannot be applied</value> <value xml:lang="es">Pago [${paymentId}] ha sido concelado y no puede ser aplicado</value> @@ -7958,6 +7982,10 @@ <value xml:lang="en">Reconcile</value> <value xml:lang="hi_IN">मिलान</value> </property> + <property key="AccountingReconcileFinAccountTransFor"> + <value xml:lang="en">Reconcile Financial Accounting Transaction For : ${finAccount.finAccountName} [${finAccountId}]</value> + <value xml:lang="hi_IN">${finAccount.finAccountName} [${finAccountId}] à¤à¥ लिठवितà¥à¤¤à¥à¤¯ लà¥à¤à¤¾ à¤à¤¤à¤¿à¤µà¤¿à¤§à¤¿ à¤à¤¾ पà¥à¤¨à¤°à¥à¤®à¤¿à¤²à¤¾à¤¨</value> + </property> <property key="AccountingReconciliation"> <value xml:lang="en">Reconciliation</value> <value xml:lang="hi_IN">मिलाप</value> @@ -7975,6 +8003,10 @@ <value xml:lang="th">หมายà¹à¸¥à¸à¸à¹à¸²à¸à¸à¸´à¸</value> <value xml:lang="zh">ä¼å æ¹æ³ç¼å·</value> </property> + <property key="AccountingRemoveFromGlReconciliation"> + <value xml:lang="en">Remove From GlReconciliation</value> + <value xml:lang="hi_IN">GlReconciliation सॠहà¤à¤¾à¤¯à¥</value> + </property> <property key="AccountingReports"> <value xml:lang="ar">تÙارÙر</value> <value xml:lang="de">Berichte</value> @@ -10932,6 +10964,10 @@ <value xml:lang="it">Non applicata</value> <value xml:lang="zh">æªä½¿ç¨</value> </property> + <property key="FormFieldTitle_notValidTotal"> + <value xml:lang="en">Not valid total</value> + <value xml:lang="hi_IN">à¤à¥à¤² वà¥à¤§ नहà¥à¤ हà¥</value> + </property> <property key="FormFieldTitle_notifyUrl"> <value xml:lang="en">Notify Url</value> <value xml:lang="hi_IN">सà¥à¤à¤¿à¤¤ यà¥à¤à¤°à¤à¤²(Url)</value> @@ -12162,6 +12198,10 @@ <value xml:lang="it">Nome utente</value> <value xml:lang="zh">ç¨æ·å</value> </property> + <property key="FormFieldTitle_validTotal"> + <value xml:lang="en">Valid total</value> + <value xml:lang="hi_IN">à¤à¥à¤² वà¥à¤§ हà¥</value> + </property> <property key="FormFieldTitle_vendor"> <value xml:lang="en">Vendor</value> <value xml:lang="hi_IN">विà¤à¥à¤°à¥à¤¤à¤¾</value> @@ -12290,6 +12330,10 @@ <value xml:lang="th">à¸à¸±à¸à¸¥à¸à¸à¸ªà¸±à¸à¸à¸²</value> <value xml:lang="zh">å¤å¶åå</value> </property> + <property key="PageTitleDepositPaymentsAndCreateBatch"> + <value xml:lang="en">Deposit Payments And Create Batch</value> + <value xml:lang="hi_IN">à¤à¥à¤à¤¤à¤¾à¤¨ à¤à¤®à¤¾ à¤à¤°à¥à¤ तथा बà¥à¤ बनाà¤à¤</value> + </property> <property key="PageTitleEditAgreement"> <value xml:lang="de">Vereinbarung ändern</value> <value xml:lang="en">Edit Agreement</value> @@ -12806,8 +12850,8 @@ <value xml:lang="zh">æ¥æ¾éèè´¦æ·</value> </property> <property key="PageTitleFindFinAccountTrans"> - <value xml:lang="en">Find Financial Account Transactions</value> - <value xml:lang="hi_IN">वितà¥à¤¤à¥à¤¯ à¤à¤¾à¤¤à¤¾ à¤à¤¤à¤¿à¤µà¤¿à¤§à¤¿à¤¯à¤¾à¤ à¤à¥à¤à¥à¤</value> + <value xml:lang="en">Find Transactions for Financial Account: ${finAccount.finAccountName} [${finAccountId}]</value> + <value xml:lang="hi_IN">${finAccount.finAccountName} [${finAccountId}] वितà¥à¤¤à¥à¤¯ à¤à¤¾à¤¤à¥ à¤à¥ लिठवितà¥à¤¤à¥à¤¯ à¤à¤¾à¤¤à¤¾ à¤à¤¤à¤¿à¤µà¤¿à¤§à¤¿à¤¯à¤¾à¤ à¤à¥à¤à¥à¤</value> </property> <property key="PageTitleFindPaymentGatewayConfig"> <value xml:lang="en">Find Payment Gateway Config</value> Modified: ofbiz/branches/executioncontext20090812/applications/accounting/script/org/ofbiz/accounting/finaccount/FinAccountGlPostServices.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/applications/accounting/script/org/ofbiz/accounting/finaccount/FinAccountGlPostServices.xml?rev=806581&r1=806580&r2=806581&view=diff ============================================================================== --- ofbiz/branches/executioncontext20090812/applications/accounting/script/org/ofbiz/accounting/finaccount/FinAccountGlPostServices.xml (original) +++ ofbiz/branches/executioncontext20090812/applications/accounting/script/org/ofbiz/accounting/finaccount/FinAccountGlPostServices.xml Fri Aug 21 14:59:16 2009 @@ -24,20 +24,14 @@ <!-- FinAccountTrans Services --> <simple-method method-name="postFinAccountTransToGl" short-description="Post a Financial Account Transaction to the General Ledger"> <!-- NOTE: this is not yet complete --> - <!-- NOTE: this will behave differently depending on how the FinAccount is used, see comments on different GlAccounts for trans entries below --> - <now-timestamp field="nowTimestamp"/> - <entity-one entity-name="FinAccountTrans" value-field="finAccountTrans"/> <set field="finAccountId" from-field="finAccountTrans.finAccountId"/> <entity-one entity-name="FinAccount" value-field="finAccount"/> - <set field="organizationPartyId" from-field="finAccount.organizationPartyId"/> - <!-- Figure out which GlAccount to post to using finAccount.postToGlAccountId or if not specified then use FinAccountTypeGlAccount --> <if-not-empty field="finAccount.postToGlAccountId"> <set field="glAccountId" from-field="finAccount.postToGlAccountId"/> - <else> <entity-one entity-name="FinAccountTypeGlAccount" value-field="finAccountTypeGlAccount" auto-field-map="false"> <field-map field-name="organizationPartyId"/> @@ -49,28 +43,17 @@ </else> </if-not-empty> - <!-- set initial values for AcctgTrans --> - <set field="createAcctgTransAndEntriesMap.finAccountTransId" from-field="parameters.finAccountTransId"/> - <set field="createAcctgTransAndEntriesMap.transactionDate" from-field="nowTimestamp"/> - <set field="createAcctgTransAndEntriesMap.glFiscalTypeId" value="ACTUAL"/> - <set field="createAcctgTransAndEntriesMap.partyId" from-field="finAccount.ownerPartyId"/> - - <!-- set initial values for Main AcctgTransEntry --> - <make-value value-field="mainAcctgTransEntry" entity-name="AcctgTransEntry"/> - <set field="mainAcctgTransEntry.glAccountId" from-field="glAccountId"/> - <set field="mainAcctgTransEntry.organizationPartyId" from-field="finAccount.organizationPartyId"/> - <set field="mainAcctgTransEntry.partyId" from-field="finAccount.ownerPartyId"/> - <set field="mainAcctgTransEntry.amount" from-field="finAccountTrans.amount"/> - <set field="mainAcctgTransEntry.acctgTransEntryTypeId" value="_NA_"/> - <set field="mainAcctgTransEntry.acctgTransEntrySeqId" value="01"/> - - <!-- set initial values for Offset AcctgTransEntry --> - <make-value value-field="offsetAcctgTransEntry" entity-name="AcctgTransEntry"/> - <set field="offsetAcctgTransEntry.organizationPartyId" from-field="finAccount.organizationPartyId"/> - <set field="offsetAcctgTransEntry.partyId" from-field="finAccount.ownerPartyId"/> - <set field="offsetAcctgTransEntry.amount" from-field="finAccountTrans.amount"/> - <set field="offsetAcctgTransEntry.acctgTransEntryTypeId" value="_NA_"/> - <set field="offsetAcctgTransEntry.acctgTransEntrySeqId" value="02"/> + <!-- set values for AcctgTrans --> + <set field="quickCreateAcctgTransAndEntries.finAccountTransId" from-field="parameters.finAccountTransId"/> + <set field="quickCreateAcctgTransAndEntries.transactionDate" from-field="nowTimestamp"/> + <set field="quickCreateAcctgTransAndEntries.glFiscalTypeId" value="ACTUAL"/> + <set field="quickCreateAcctgTransAndEntries.partyId" from-field="finAccountTrans.partyId"/> + <set field="quickCreateAcctgTransAndEntries.isPosted" value="N"/> + + <!-- set values for AcctgTransEntry --> + <set field="quickCreateAcctgTransAndEntries.organizationPartyId" from-field="finAccount.organizationPartyId"/> + <set field="quickCreateAcctgTransAndEntries.amount" from-field="finAccountTrans.amount"/> + <set field="quickCreateAcctgTransAndEntries.acctgTransEntryTypeId" value="_NA_"/> <!-- Find the other side to post to/from - if payment directory to account do from Payment; @@ -80,63 +63,56 @@ <condition><if-compare field="finAccountTrans.finAccountTransTypeId" operator="equals" value="DEPOSIT"/></condition> <then> <!-- TODO: somehow check to see if the deposit was not from a product, or didn't get into the general CUSTOMER CREDITS 213000 account --> - <!-- Handle the case where a product is purchased to deposit to account. The Product should be setup so that funds go to the general CUSTOMER CREDITS account, 213000. This will simply transfer from that account to the configured account above. --> - <set field="offsetAcctgTransEntry.glAccountId" value="213000"/> - - <set field="mainAcctgTransEntry.debitCreditFlag" value="D"/> - <set field="offsetAcctgTransEntry.debitCreditFlag" value="C"/> - <set field="createAcctgTransAndEntriesMap.acctgTransTypeId" value="RECEIPT"/> + <set field="quickCreateAcctgTransAndEntries.creditGlAccountId" from-field="parameters.glAccountId"/> + <set field="quickCreateAcctgTransAndEntries.debitGlAccountId" from-field="glAccountId"/> + <set field="quickCreateAcctgTransAndEntries.acctgTransTypeId" value="RECEIPT"/> </then> <else-if> <condition><if-compare field="finAccountTrans.finAccountTransTypeId" operator="equals" value="WITHDRAWAL"/></condition> <then> <!-- TODO: somehow determine if this is an order placed against the account or some other type of withdrawal --> - <!-- TODO: handle order placed against (paid for with) the account --> - <set field="mainAcctgTransEntry.debitCreditFlag" value="C"/> - <set field="offsetAcctgTransEntry.debitCreditFlag" value="D"/> - <set field="createAcctgTransAndEntriesMap.acctgTransTypeId" value="PAYMENT_ACCTG_TRANS"/> + <set field="quickCreateAcctgTransAndEntries.debitGlAccountId" from-field="glAccountId"/> + <set field="quickCreateAcctgTransAndEntries.creditGlAccountId" from-field="parameters.glAccountId"/> + <set field="quickCreateAcctgTransAndEntries.acctgTransTypeId" value="PAYMENT_ACCTG_TRANS"/> </then> </else-if> <else-if> <condition><if-compare field="finAccountTrans.finAccountTransTypeId" operator="equals" value="ADJUSTMENT"/></condition> <then> - <!-- TODO: what to do for an adjustment? for now nothing, will error out below --> - <!-- if positive will go to one account for write-off, if negative will go to another account for a fee --> - <!-- these will reverse depending on positive/negative amount --> - <set field="mainAcctgTransEntry.debitCreditFlag" value="D"/> - <set field="offsetAcctgTransEntry.debitCreditFlag" value="C"/> + <if-compare field="finAccountTrans.amount" operator="less" value="0"> + <set field="quickCreateAcctgTransAndEntries.debitGlAccountId" from-field="parameters.glAccountId"/> + <set field="quickCreateAcctgTransAndEntries.creditGlAccountId" from-field="glAccountId"/> + <set field="quickCreateAcctgTransAndEntries.acctgTransTypeId" value="OUTGOING_PAYMENT"/> + <else> + <set field="quickCreateAcctgTransAndEntries.creditGlAccountId" from-field="parameters.glAccountId"/> + <set field="quickCreateAcctgTransAndEntries.debitGlAccountId" from-field="glAccountId"/> + <set field="quickCreateAcctgTransAndEntries.acctgTransTypeId" value="INCOMING_PAYMENT"/> + </else> + </if-compare> </then> </else-if> </if> <!-- Make sure we have the glAccountId, glAccountIdOffset, organizationPartyId --> - <if-empty field="mainAcctgTransEntry.glAccountId"> - <add-error><fail-message message="Cannot post FinAccountTrans with ID [${parameters.finAccountTransId}] to GL, could not find Main glAccountId"/></add-error> + <if-empty field="quickCreateAcctgTransAndEntries.debitGlAccountId"> + <add-error><fail-message message="Cannot post FinAccountTrans with ID [${parameters.finAccountTransId}] to GL, could not find Debit glAccountId"/></add-error> </if-empty> - <if-empty field="offsetAcctgTransEntry.glAccountId"> - <add-error><fail-message message="Cannot post FinAccountTrans with ID [${parameters.finAccountTransId}] to GL, could not find Offset glAccountId"/></add-error> + <if-empty field="quickCreateAcctgTransAndEntries.creditGlAccountId"> + <add-error><fail-message message="Cannot post FinAccountTrans with ID [${parameters.finAccountTransId}] to GL, could not find credit glAccountId"/></add-error> </if-empty> <if-empty field="organizationPartyId"> <add-error><fail-message message="Cannot post FinAccountTrans with ID [${parameters.finAccountTransId}] to GL, could not find organizationPartyId"/></add-error> </if-empty> <check-errors/> - - <!-- Post the finAccountTrans.amount to/from the given GlAccounts --> - <set field="createAcctgTransAndEntriesMap.acctgTransEntries[]" from-field="mainAcctgTransEntry"/> - <set field="createAcctgTransAndEntriesMap.acctgTransEntries[]" from-field="offsetAcctgTransEntry"/> - <!-- TODO: un-comment this once ready for real use - <call-service service-name="createAcctgTransAndEntries" in-map-name="createAcctgTransAndEntriesMap" include-user-login="true"> - </call-service> - --> - <!-- TODO: do anything with return values from service? --> + <call-service service-name="quickCreateAcctgTransAndEntries" in-map-name="quickCreateAcctgTransAndEntries" include-user-login="true"/> </simple-method> </simple-methods> Modified: ofbiz/branches/executioncontext20090812/applications/accounting/script/org/ofbiz/accounting/finaccount/FinAccountServices.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/applications/accounting/script/org/ofbiz/accounting/finaccount/FinAccountServices.xml?rev=806581&r1=806580&r2=806581&view=diff ============================================================================== --- ofbiz/branches/executioncontext20090812/applications/accounting/script/org/ofbiz/accounting/finaccount/FinAccountServices.xml (original) +++ ofbiz/branches/executioncontext20090812/applications/accounting/script/org/ofbiz/accounting/finaccount/FinAccountServices.xml Fri Aug 21 14:59:16 2009 @@ -424,6 +424,10 @@ <call-service service-name="updatePayment" in-map-name="updatePaymentCtx"/> <clear-field field="updatePaymentCtx"/> </iterate> + <set-service-fields service-name="checkAndCreateBatchForValidPayments" map="parameters" to-map="checkAndCreateBatchForValidPaymentsMap"/> + <call-service service-name="checkAndCreateBatchForValidPayments" in-map-name="checkAndCreateBatchForValidPaymentsMap"> + <result-to-result result-name="paymentGroupId"/> + </call-service> <else> <iterate list="payments" entry="payment"> <set field="isReceipt" value="${groovy:org.ofbiz.accounting.util.UtilAccounting.isReceipt(payment)}" type="Boolean"/> @@ -618,7 +622,12 @@ <simple-method method-name="getFinAccountTransRunningTotalAndBalances" short-description="Calculate running total and Balances 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"/> + <if-compare field="finAccountTrans.finAccountTransTypeId" operator="equals" value="WITHDRAWAL"> + <set field="runningTotal" value="${runningTotal - finAccountTrans.amount}" type="BigDecimal"/> + <else> + <set field="runningTotal" value="${runningTotal + finAccountTrans.amount}" type="BigDecimal"/> + </else> + </if-compare> <field-to-result field="runningTotal"/> <set field="numberOfTransactions" type="Long" from-field="parameters.numberOfTransactions" default-value="0"/> <set field="numberOfTransactions" type="Long" value="${numberOfTransactions + 1}"/> @@ -683,37 +692,22 @@ <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.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"> - <result-to-field result-name="acctgTransId"/> - </call-service> - <entity-and entity-name="AcctgTransEntry" list="acctgTransEntries"> - <field-map field-name="acctgTransId"/> + <entity-and entity-name="AcctgTrans" list="acctgTransList"> + <field-map field-name="finAccountTransId" from-field="finAccountTrans.finAccountTransId"/> </entity-and> - <iterate list="acctgTransEntries" entry="acctgTransEntry"> - <set-service-fields service-name="createGlReconciliationEntry" map="acctgTransEntry" to-map="createGlReconciliationEntryMap"/> - <set field="createGlReconciliationEntryMap.glReconciliationId" from-field="finAccountTrans.glReconciliationId"/> - <set field="createGlReconciliationEntryMap.reconciledAmount" from-field="acctgTransEntry.amount"/> - <call-service service-name="createGlReconciliationEntry" in-map-name="createGlReconciliationEntryMap"/> - </iterate> + <if-not-empty field="acctgTransList"> + <first-from-list list="acctgTransList" entry="acctgTrans"/> + <if-compare field="acctgTrans.isPosted" operator="equals" value="N"> + <set-service-fields service-name="postAcctgTrans" map="acctgTrans" to-map="postAcctgTransMap"/> + <call-service service-name="postAcctgTrans" in-map-name="postAcctgTransMap"/> + </if-compare> + <get-related relation-name="AcctgTransEntry" list="acctgTransEntries" value-field="acctgTrans"/> + <iterate list="acctgTransEntries" entry="acctgTransEntry"> + <set-service-fields service-name="updateAcctgTransEntry" map="acctgTransEntry" to-map="updateAcctgTransEntryMap"/> + <set field="updateAcctgTransEntryMap.reconcileStatusId" value="AES_RECONCILED"/> + <call-service service-name="updateAcctgTransEntry" in-map-name="updateAcctgTransEntryMap"/> + </iterate> + </if-not-empty> <else> <property-to-field property="AccountingNotAdjustmentFinAccountTrans" resource="AccountingUiLabels" field="errorMessage"/> <field-to-result field="errorMessage" result-name="errorMessage"/> @@ -735,6 +729,16 @@ <field-to-list field="payment" list="payments"/> </else> </if-empty> + <if-empty field="payments"> + <entity-and entity-name="AcctgTrans" list="acctgTransList"> + <field-map field-name="finAccountTransId" from-field="finAccountTrans.finAccountTransId"/> + </entity-and> + <first-from-list list="acctgTransList" entry="acctgTrans"/> + <if-compare field="acctgTrans.isPosted" operator="equals" value="N"> + <set-service-fields service-name="postAcctgTrans" map="acctgTrans" to-map="postAcctgTransMap"/> + <call-service service-name="postAcctgTrans" in-map-name="postAcctgTransMap"/> + </if-compare> + </if-empty> <iterate list="payments" entry="payment"> <clear-field field="createAcctgTransAndEntriesMap"/> <get-related relation-name="AcctgTrans" list="acctgTransList" value-field="payment"/> @@ -808,6 +812,16 @@ <field-to-list field="payment" list="payments"/> </else> </if-empty> + <if-empty field="payments"> + <entity-and entity-name="AcctgTrans" list="acctgTransList"> + <field-map field-name="finAccountTransId" from-field="finAccountTrans.finAccountTransId"/> + </entity-and> + <first-from-list list="acctgTransList" entry="acctgTrans"/> + <if-compare field="acctgTrans.isPosted" operator="equals" value="N"> + <set-service-fields service-name="postAcctgTrans" map="acctgTrans" to-map="postAcctgTransMap"/> + <call-service service-name="postAcctgTrans" in-map-name="postAcctgTransMap"/> + </if-compare> + </if-empty> <iterate list="payments" entry="payment"> <clear-field field="createAcctgTransAndEntriesMap"/> <get-related relation-name="AcctgTrans" list="acctgTransList" value-field="payment"/> @@ -871,15 +885,21 @@ <call-service service-name="createPayment" in-map-name="createPaymentMap"> <result-to-field result-name="paymentId"/> </call-service> - <if-compare field="parameters.isDepositWithDrawPayment" operator="equals" value="Y"> - <set-service-fields service-name="createFinAccountTrans" map="parameters" to-map="createFinAccountTransMap"/> - <set field="createFinAccountTransMap.paymentId" from-field="paymentId"/> - <set field="createFinAccountTransMap.statusId" value="FINACT_TRNS_CREATED"/> - <set field="createFinAccountTransMap.partyId" from-field="parameters.partyIdFrom"/> - <call-service service-name="createFinAccountTrans" in-map-name="createFinAccountTransMap"/> - </if-compare> - <field-to-list field="paymentId" list="paymentIds"/> - <field-to-result field="paymentIds"/> + <if-not-empty field="parameters.finAccountId"> + <if-compare field="parameters.isDepositWithDrawPayment" operator="equals" value="Y"> + <set-service-fields service-name="createFinAccountTrans" map="parameters" to-map="createFinAccountTransMap"/> + <set field="createFinAccountTransMap.paymentId" from-field="paymentId"/> + <set field="createFinAccountTransMap.statusId" value="FINACT_TRNS_CREATED"/> + <set field="createFinAccountTransMap.partyId" from-field="parameters.partyIdFrom"/> + <call-service service-name="createFinAccountTrans" in-map-name="createFinAccountTransMap"> + <result-to-field result-name="finAccountTransId"/> + </call-service> + <set field="updatePaymentCtx.paymentId" from-field="paymentId"/> + <set field="updatePaymentCtx.finAccountTransId" from-field="finAccountTransId"/> + <call-service service-name="updatePayment" in-map-name="updatePaymentCtx"/> + </if-compare> + </if-not-empty> + <field-to-result field="paymentId"/> </simple-method> <simple-method method-name="getTransactionTotalByGlReconcileId" short-description="Transaction Total By GlReconcile Id"> @@ -914,5 +934,33 @@ <store-value value-field="finAccountTrans"/> </else> </if-compare> + <if-empty field="finAccountTrans.paymentId"> + <entity-and entity-name="Payment" list="payments"> + <field-map field-name="finAccountTransId" from-field="finAccountTrans.finAccountTransId"/> + </entity-and> + <else> + <entity-one entity-name="Payment" value-field="payment"> + <field-map field-name="paymentId" from-field="finAccountTrans.paymentId"/> + </entity-one> + <field-to-list field="payment" list="payments"/> + </else> + </if-empty> + <iterate list="payments" entry="payment"> + <if-compare field="${payment.statusId == 'PMNT_SENT' @or payment.statusId == 'PMNT_RECEIVED' @or payment.statusId == 'PMNT_CONFIRMED'}" operator="equals" value="false"> + <add-error><fail-property resource="AccountingUiLabels" property="AccountingPaymentsAssociateWithFinAccountHasInvalidStatusError"/></add-error> + <check-errors/> + </if-compare> + </iterate> + </simple-method> + <simple-method method-name="removeFinAccountTransFromReconciliation" short-description="Remove finAccountTrans from reconciliation"> + <entity-one entity-name="FinAccountTrans" value-field="finAccountTrans"/> + <if-compare field="finAccountTrans.statusId" operator="equals" value="FINACT_TRNS_CREATED"> + <clear-field field="finAccountTrans.glReconciliationId"/> + <store-value value-field="finAccountTrans"/> + <else> + <add-error><fail-property resource="AccountingUiLabel" property="AccountingFinAccountTransInvalidStatusError"/></add-error> + <check-errors/> + </else> + </if-compare> </simple-method> </simple-methods> Modified: ofbiz/branches/executioncontext20090812/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml?rev=806581&r1=806580&r2=806581&view=diff ============================================================================== --- ofbiz/branches/executioncontext20090812/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml (original) +++ ofbiz/branches/executioncontext20090812/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml Fri Aug 21 14:59:16 2009 @@ -1361,6 +1361,7 @@ <set field="createAcctgTransAndEntriesInMap.glFiscalTypeId" value="ACTUAL"/> <set field="createAcctgTransAndEntriesInMap.acctgTransTypeId" value="SALES_SHIPMENT"/> <set field="createAcctgTransAndEntriesInMap.shipmentId" from-field="itemIssuance.shipmentId"/> + <set field="createAcctgTransAndEntriesInMap.transactionDate" from-field="itemIssuance.issuedDateTime"/> <set field="createAcctgTransAndEntriesInMap.acctgTransEntries" from-field="acctgTransEntries"/> <call-service service-name="createAcctgTransAndEntries" in-map-name="createAcctgTransAndEntriesInMap"> <result-to-field result-name="acctgTransId"/> @@ -1941,6 +1942,7 @@ <set field="createAcctgTransAndEntriesInMap.roleTypeId" value="BILL_TO_CUSTOMER"/> <set field="createAcctgTransAndEntriesInMap.paymentId" from-field="paymentId"/> <set field="createAcctgTransAndEntriesInMap.acctgTransTypeId" value="INCOMING_PAYMENT"/> + <set field="createAcctgTransAndEntriesInMap.transactionDate" from-field="payment.effectiveDate"/> <set field="createAcctgTransAndEntriesInMap.acctgTransEntries" from-field="acctgTransEntries"/> <call-service service-name="createAcctgTransAndEntries" in-map-name="createAcctgTransAndEntriesInMap"> <result-to-field result-name="acctgTransId"/> @@ -2422,28 +2424,24 @@ <set field="glAccountCategoryId" from-field="parameters.glAccountCategoryId"/> <set field="amountPercentage" from-field="parameters.amountPercentage" type="BigDecimal"/> - <set field="totalAmountPercentage" type="BigDecimal" value="0"/> - - <entity-and entity-name="GlAccountCategoryMember" list="glAccountCategoryMembers" filter-by-date="true"> + <set-service-fields service-name="calculateCostCenterTotal" map="parameters" to-map="calculateCostCenterTotalMap"/> + <call-service service-name="calculateCostCenterTotal" in-map-name="calculateCostCenterTotalMap"/> + <check-errors/> + <entity-and entity-name="GlAccountCategoryMember" list="glAccountCategoryMemberList" filter-by-date="true"> <field-map field-name="glAccountId" from-field="glAccountId"/> + <field-map field-name="glAccountCategoryId" from-field="glAccountCategoryId"/> </entity-and> - <if-not-empty field="glAccountCategoryMembers"> - <iterate list="glAccountCategoryMembers" entry="glAccountCategoryMember"> - <if-compare-field field="glAccountCategoryMember.glAccountCategoryId" operator="not-equals" to-field="glAccountCategoryId"> - <set field="totalAmountPercentage" value="${totalAmountPercentage + glAccountCategoryMember.amountPercentage}" type="BigDecimal"/> - </if-compare-field> - </iterate> - </if-not-empty> - <if-not-empty field="amountPercentage"> - <set field="totalAmountPercentage" value="${totalAmountPercentage + amountPercentage}" type="BigDecimal"/> - <if-compare field="totalAmountPercentage" operator="less-equals" value="100" type="BigDecimal"> - <entity-and entity-name="GlAccountCategoryMember" list="glAccountCategoryMemberList" filter-by-date="true"> - <field-map field-name="glAccountId" from-field="glAccountId"/> - <field-map field-name="glAccountCategoryId" from-field="glAccountCategoryId"/> - </entity-and> - <filter-list-by-date list="glAccountCategoryMemberList"/> - <first-from-list list="glAccountCategoryMemberList" entry="glAccountCategoryMember"/> - <if-compare field="glAccountCategoryMember.amountPercentage" operator="not-equals" value="" type="BigDecimal"> + <first-from-list list="glAccountCategoryMemberList" entry="glAccountCategoryMember"/> + <if-empty field="glAccountCategoryMember"> + <set field="createGlAccountCategoryMemberMap.amountPercentage" from-field="amountPercentage" type="BigDecimal"/> + <set field="createGlAccountCategoryMemberMap.glAccountCategoryId" from-field="glAccountCategoryId"/> + <set field="createGlAccountCategoryMemberMap.glAccountId" from-field="glAccountId"/> + <now-timestamp field="createGlAccountCategoryMemberMap.fromDate"/> + <call-service service-name="createGlAccountCategoryMember" in-map-name="createGlAccountCategoryMemberMap"/> + <log level="info" message="GlAccountCategoryMember created for [${glAccountCategoryId}] and [${glAccountId}]"/> + <else> + <if-compare field="amountPercentage" operator="not-equals" value="0" type="BigDecimal"> + <if-compare-field field="glAccountCategoryMember.amountPercentage" operator="not-equals" to-field="nullfield"> <set-service-fields service-name="updateGlAccountCategoryMember" to-map="updateGlAccountCategoryMemberMap" map="glAccountCategoryMember"/> <set field="updateGlAccountCategoryMemberMap.amountPercentage" from-field="amountPercentage" type="BigDecimal"/> <call-service service-name="updateGlAccountCategoryMember" in-map-name="updateGlAccountCategoryMemberMap"/> @@ -2455,15 +2453,14 @@ <call-service service-name="createGlAccountCategoryMember" in-map-name="createGlAccountCategoryMemberMap"/> <log level="info" message="GlAccountCategoryMember created for [${glAccountCategoryId}] and [${glAccountId}]"/> </else> - </if-compare> - <set field="amountPercentage" value="0" type="BigDecimal"/> - <set field="totalAmountPercentage" value="0" type="BigDecimal"/> + </if-compare-field> <else> - <add-error><fail-property resource="AccountingUiLabels" property="AccountingTotalAmountPercentageIsGreaterThenOneHundred"/></add-error> - <check-errors/> + <now-timestamp field="glAccountCategoryMember.thruDate"/> + <store-value value-field="glAccountCategoryMember"/> </else> </if-compare> - </if-not-empty> + </else> + </if-empty> </simple-method> <simple-method method-name="updateGlAccountCategoryMember" short-description="Update GL Account Category Member"> @@ -2477,7 +2474,7 @@ <set field="newLookedUpValue.amountPercentage" from-field="parameters.amountPercentage" type="BigDecimal"/> <now-timestamp field="newLookedUpValue.fromDate"/> <create-value value-field="newLookedUpValue"/> - <log level="info" message="GlAccountCategoryMember updated for [${glAccountCategoryId}] and [${glAccountId}]"/> + <log level="info" message="GlAccountCategoryMember updated for [${parameters.glAccountCategoryId}] and [${parameters.glAccountId}]"/> </if-compare-field> </if-not-empty> </simple-method> @@ -2638,4 +2635,36 @@ <property-to-field resource="arithmetic" property="ledger.rounding" field="roundingMode" default="HalfUp"/> <log level="info" message="Got settings from arithmetic.properties: ledgerDecimals=${ledgerDecimals}, roundingMode=${roundingMode}"/> </simple-method> + + <simple-method method-name="calculateCostCenterTotal" short-description="Calculate cost center total"> + <set field="amountPercentage" from-field="parameters.amountPercentage" type="BigDecimal"/> + <if-not-empty field="amountPercentage"> + <if-compare field="amountPercentage" operator="greater" value="100" type="BigDecimal"> + <add-error><fail-property resource="AccountingUiLabels" property="AccountingTotalAmountPercentageIsGreaterThenOneHundred"/></add-error> + <check-errors/> + <else> + <entity-condition entity-name="GlAccountCategoryMember" list="glAccountCategoryMembers" filter-by-date="true"> + <condition-list> + <condition-expr field-name="glAccountId" from-field="parameters.glAccountId"/> + </condition-list> + <order-by field-name="glAccountCategoryId DESC"/> + </entity-condition> + <set field="totalAmountPercentage" value="0" type="BigDecimal"/> + <iterate list="glAccountCategoryMembers" entry="glAccountCategoryMember"> + <if-compare-field field="glAccountCategoryMember.glAccountCategoryId" operator="not-equals" to-field="parameters.glAccountCategoryId"> + <set field="totalAmountPercentage" value="${groovy:totalAmountPercentage.add(glAccountCategoryMember.amountPercentage)}" type="BigDecimal"/> + </if-compare-field> + </iterate> + <first-from-list list="glAccountCategoryMembers" entry="glAccountCategoryMember"/> + <set field="totalAmountPercentage" value="${groovy:totalAmountPercentage.add(amountPercentage)}" type="BigDecimal"/> + <if-compare field="totalAmountPercentage" operator="not-equals" value="100" type="BigDecimal"> + <if-compare-field field="glAccountCategoryMember.glAccountCategoryId" operator="equals" to-field="parameters.glAccountCategoryId"> + <add-error><fail-property resource="AccountingUiLabels" property="AccountingTotalAmountPercentageIsGreaterThenOneHundred"/></add-error> + <check-errors/> + </if-compare-field> + </if-compare> + </else> + </if-compare> + </if-not-empty> + </simple-method> </simple-methods> Modified: ofbiz/branches/executioncontext20090812/applications/accounting/script/org/ofbiz/accounting/test/AutoPaymentTests.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/applications/accounting/script/org/ofbiz/accounting/test/AutoPaymentTests.xml?rev=806581&r1=806580&r2=806581&view=diff ============================================================================== --- ofbiz/branches/executioncontext20090812/applications/accounting/script/org/ofbiz/accounting/test/AutoPaymentTests.xml (original) +++ ofbiz/branches/executioncontext20090812/applications/accounting/script/org/ofbiz/accounting/test/AutoPaymentTests.xml Fri Aug 21 14:59:16 2009 @@ -320,4 +320,152 @@ <check-errors/> </if-not-empty> </simple-method> + + <simple-method method-name="testGlPostingsOnVoidPayment" short-description="Test case to verify GL postings for Void Payment Process" login-required="false"> + <!-- Precondition : + * Payment is in sent status so accounting transaction is already posted to the GL + * GL Account associated with Payment :8003 are ACCOUNTS RECEVABLE and UNDEPOSITED RECEIPTS + * Credit in account 120000 - ACCOUNTS RECEVABLE ;debitTotal :$754.17 ; creditTotal:$274.18 ; debitCreditDifference : $479.99 + * Debit in account 112000 UNDEPOSITED RECEIPTS ;debitTotal :$136.85 ; creditTotal:$116.85 ; debitCreditDifference : $20 + --> + + <!-- Post condition : When status is set to void, an reverse accounting transaction is automatically posted to the GL. + * Payment status changes to void. + * Credit in account 112000- UNDEPOSITED RECEIPTS ;debitTotal :$136.85 ; creditTotal: $136.85 ; debitCreditDifference : $0 + * Debit in account 120000 - ACCOUNTS RECEVABLE debitTotal :$774.17 ; creditTotal: $274.18 ; debitCreditDifference : $ 499.99 + --> + <entity-one entity-name="UserLogin" value-field="userLogin"> + <field-map field-name="userLoginId" value="system"/> + </entity-one> + <set field="getAcctgTransEntriesAndTransTotalMap.userLogin" from-field="userLogin"/> + <set field="getAcctgTransEntriesAndTransTotalMap.organizationPartyId" value="Company"/> + <set field="getAcctgTransEntriesAndTransTotalMap.customTimePeriodStartDate" value="2009-01-01 16:55:01.0" type="Timestamp"/> + <set field="getAcctgTransEntriesAndTransTotalMap.customTimePeriodEndDate" value="2009-12-31 16:55:01.0" type="Timestamp"/> + <set field="getAcctgTransEntriesAndTransTotalMap.glAccountId" value="120000"/> + <call-service service-name="getAcctgTransEntriesAndTransTotal" in-map-name="getAcctgTransEntriesAndTransTotalMap"> + <result-to-field result-name="debitTotal" field="receivableDebitTotal"/> + <result-to-field result-name="creditTotal" field="receivableCreditTotal"/> + <result-to-field result-name="debitCreditDifference" field="receivableDebitCreditDifference"/> + </call-service> + <set field="getAcctgTransEntriesAndTransTotalMap.glAccountId" value="112000"/> + <call-service service-name="getAcctgTransEntriesAndTransTotal" in-map-name="getAcctgTransEntriesAndTransTotalMap"> + <result-to-field result-name="debitTotal" field="undepositedDebitTotal"/> + <result-to-field result-name="creditTotal" field="undepositedCreditTotal"/> + <result-to-field result-name="debitCreditDifference" field="undepositedDebitCreditDifference"/> + </call-service> + <log level="info" message="BEFORE RUNNING VOID PAYMENT : ACCOUNTS RECEVABLE ;debitTotal :${receivableDebitTotal} ; creditTotal:${receivableCreditTotal} ; debitCreditDifference : ${receivableDebitCreditDifference}"/> + <log level="info" message="BEFORE RUNNING VOID PAYMENT : UNDEPOSITED RECEIPTS ;debitTotal :${undepositedDebitTotal} ; creditTotal:${undepositedCreditTotal} ; debitCreditDifference : ${undepositedDebitCreditDifference}"/> + <set field="paymentId" value="8003"/> + <set field="voidPaymentMap.userLogin" from-field="userLogin"/> + <set field="voidPaymentMap.paymentId" from-field="paymentId"/> + <call-service service-name="voidPayment" in-map-name="voidPaymentMap"/> + <set field="totalReceivableDebitAmount" value="${receivableDebitTotal + 20.00}" type="BigDecimal"/> + <set field="totalReceivableDebitCreditDifference" value="${receivableDebitCreditDifference + 20.00}" type="BigDecimal"/> + <set field="getAcctgTransEntriesAndTransTotalMap.glAccountId" value="120000"/> + <call-service service-name="getAcctgTransEntriesAndTransTotal" in-map-name="getAcctgTransEntriesAndTransTotalMap"> + <result-to-field result-name="debitTotal" field="receivableDebitTotal"/> + <result-to-field result-name="creditTotal" field="receivableCreditTotal"/> + <result-to-field result-name="debitCreditDifference" field="receivableDebitCreditDifference"/> + </call-service> + <assert> + <if-compare-field field="totalReceivableDebitAmount" operator="equals" to-field="receivableDebitTotal" type="BigDecimal"/> + <if-compare-field field="totalReceivableDebitCreditDifference" operator="equals" to-field="receivableDebitCreditDifference" type="BigDecimal"/> + </assert> + <check-errors/> + <set field="totalUndepositedCreditAmount" value="${undepositedCreditTotal + 20.00}" type="BigDecimal"/> + <set field="totalUndepositedDebitCreditDifference" value="${undepositedDebitCreditDifference - 20.00}" type="BigDecimal"/> + <set field="getAcctgTransEntriesAndTransTotalMap.glAccountId" value="112000"/> + <call-service service-name="getAcctgTransEntriesAndTransTotal" in-map-name="getAcctgTransEntriesAndTransTotalMap"> + <result-to-field result-name="debitTotal" field="undepositedDebitTotal"/> + <result-to-field result-name="creditTotal" field="undepositedCreditTotal"/> + <result-to-field result-name="debitCreditDifference" field="undepositedDebitCreditDifference"/> + </call-service> + <assert> + <if-compare-field field="totalUndepositedCreditAmount" operator="equals" to-field="undepositedCreditTotal" type="BigDecimal"/> + <if-compare-field field="totalUndepositedDebitCreditDifference" operator="equals" to-field="undepositedDebitCreditDifference" type="BigDecimal"/> + </assert> + <check-errors/> + <log level="info" message="AFTER RUNNING VOID PAYMENT : ACCOUNTS RECEVABLE ;debitTotal :${receivableDebitTotal} ; creditTotal:${receivableCreditTotal}; debitCreditDifference : ${receivableDebitCreditDifference}"/> + <log level="info" message="AFTER RUNNING VOID PAYMENT : UNDEPOSITED RECEIPTS ;debitTotal :${undepositedDebitTotal} ; creditTotal:${undepositedCreditTotal} ; debitCreditDifference : ${undepositedDebitCreditDifference}"/> + </simple-method> + + <simple-method method-name="testGlPostingOnCheckRun" short-description="Test case to verify GL postings for Check Run functionality" login-required="false"> + <!-- Precondition : + * Invoice is in ready status so accounting transaction is already posted to the GL + * GL Accounts associated with Invoice :8007 are ACCOUNTS PAYABLE and UNINVOICED ITEM RECEIPTS + * Credit in account 210000 - ACCOUNTS PAYABLE ;debitTotal $430 ; creditTotal:$1955.4 ; debitCreditDifference : $ -1524.85 + * Debit in account 214000 - UNINVOICED ITEM RECEIPTS;debitTotal :$408 ; creditTotal:$48 ; debitCreditDifference : $360 + * UNDEPOSITED RECEIPTS 112000 - debitTotal :$136.85 ; creditTotal:$136.85 ; debitCreditDifference : $0 + --> + + <!-- Post condition : After Check Run process accounting transactions are automatically posted to the GL. + * Payment get associated with invoice. + * GL Accounts associated with Payment are ACCOUNTS PAYABLE and UNDEPOSITED RECEIPTS. + * ACCOUNTS PAYABLE 210000(for Invoice and Payment) - debitTotal $503.41 ; creditTotal:$1991.83 ; debitCreditDifference : $ -1488.42 + * UNINVOICED ITEM RECEIPTS 214000 - debitTotal :$408 ; creditTotal:$48 ; debitCreditDifference : $360 + * UNDEPOSITED RECEIPTS 112000 (for payment)- debitTotal :$136.85 ; creditTotal:$173.28 ; debitCreditDifference : $ -36.43 + --> + <entity-one entity-name="UserLogin" value-field="userLogin"> + <field-map field-name="userLoginId" value="system"/> + </entity-one> + <set field="getAcctgTransEntriesAndTransTotalMap.userLogin" from-field="userLogin"/> + <set field="getAcctgTransEntriesAndTransTotalMap.organizationPartyId" value="Company"/> + <set field="getAcctgTransEntriesAndTransTotalMap.customTimePeriodStartDate" value="2009-01-01 16:55:01.0" type="Timestamp"/> + <set field="getAcctgTransEntriesAndTransTotalMap.customTimePeriodEndDate" value="2009-12-31 16:55:01.0" type="Timestamp"/> + <set field="getAcctgTransEntriesAndTransTotalMap.glAccountId" value="210000"/> + <call-service service-name="getAcctgTransEntriesAndTransTotal" in-map-name="getAcctgTransEntriesAndTransTotalMap"> + <result-to-field result-name="debitTotal" field="payableDebitTotal"/> + <result-to-field result-name="creditTotal" field="payableCreditTotal"/> + <result-to-field result-name="debitCreditDifference" field="payableDebitCreditDifference"/> + </call-service> + <set field="getAcctgTransEntriesAndTransTotalMap.glAccountId" value="112000"/> + <call-service service-name="getAcctgTransEntriesAndTransTotal" in-map-name="getAcctgTransEntriesAndTransTotalMap"> + <result-to-field result-name="debitTotal" field="undepositedDebitTotal"/> + <result-to-field result-name="creditTotal" field="undepositedCreditTotal"/> + <result-to-field result-name="debitCreditDifference" field="undepositedDebitCreditDifference"/> + </call-service> + <log level="info" message="BEFORE RUNNING CHECK RUN : ACCOUNTS PAYABLE ;debitTotal :${payableDebitTotal} ; creditTotal:${payableCreditTotal} ; debitCreditDifference : ${payableDebitCreditDifference}"/> + <log level="info" message="BEFORE RUNNING VOID PAYMENT : UNDEPOSITED RECEIPTS ;debitTotal :${undepositedDebitTotal} ; creditTotal:${undepositedCreditTotal} ; debitCreditDifference : ${undepositedDebitCreditDifference}"/> + <clear-field field="invoiceIds"/> + <string-to-list string="8007" list="invoiceIds"/> + <set field="createPaymentAndPaymentGroupForInvoicesMap.userLogin" from-field="userLogin"/> + <set field="createPaymentAndPaymentGroupForInvoicesMap.organizationPartyId" value="Company"/> + <set field="createPaymentAndPaymentGroupForInvoicesMap.checkStartNumber" type="Long" value="100100"/> + <set field="createPaymentAndPaymentGroupForInvoicesMap.invoiceIds" from-field="invoiceIds"/> + <set field="createPaymentAndPaymentGroupForInvoicesMap.paymentMethodTypeId" value="COMPANY_CHECK"/> + <call-service service-name="createPaymentAndPaymentGroupForInvoices" in-map-name="createPaymentAndPaymentGroupForInvoicesMap"> + <result-to-field result-name="paymentGroupId"/> + </call-service> + <set field="totalPayableDebitAmount" value="${payableDebitTotal + 72.86}" type="BigDecimal"/> + <set field="totalPayableCreditAmount" value="${payableCreditTotal + 36.43}" type="BigDecimal"/> + <set field="totalPayableDebitCreditDifference" value="${payableDebitCreditDifference + 36.43}" type="BigDecimal"/> + <set field="getAcctgTransEntriesAndTransTotalMap.glAccountId" value="210000"/> + <call-service service-name="getAcctgTransEntriesAndTransTotal" in-map-name="getAcctgTransEntriesAndTransTotalMap"> + <result-to-field result-name="debitTotal" field="payableDebitTotal"/> + <result-to-field result-name="creditTotal" field="payableCreditTotal"/> + <result-to-field result-name="debitCreditDifference" field="payableDebitCreditDifference"/> + </call-service> + <assert> + <if-compare-field field="totalPayableDebitAmount" operator="equals" to-field="payableDebitTotal" type="BigDecimal"/> + <if-compare-field field="totalPayableCreditAmount" operator="equals" to-field="payableCreditTotal" type="BigDecimal"/> + <if-compare-field field="totalPayableDebitCreditDifference" operator="equals" to-field="payableDebitCreditDifference" type="BigDecimal"/> + </assert> + <check-errors/> + <set field="totalUndepositedCreditAmount" value="${undepositedCreditTotal + 36.43}" type="BigDecimal"/> + <set field="totalUndepositedDebitCreditDifference" value="${undepositedDebitCreditDifference - 36.43}" type="BigDecimal"/> + <set field="getAcctgTransEntriesAndTransTotalMap.glAccountId" value="112000"/> + <call-service service-name="getAcctgTransEntriesAndTransTotal" in-map-name="getAcctgTransEntriesAndTransTotalMap"> + <result-to-field result-name="debitTotal" field="undepositedDebitTotal"/> + <result-to-field result-name="creditTotal" field="undepositedCreditTotal"/> + <result-to-field result-name="debitCreditDifference" field="undepositedDebitCreditDifference"/> + </call-service> + <assert> + <if-compare-field field="totalUndepositedCreditAmount" operator="equals" to-field="undepositedCreditTotal" type="BigDecimal"/> + <if-compare-field field="totalUndepositedDebitCreditDifference" operator="equals" to-field="undepositedDebitCreditDifference" type="BigDecimal"/> + </assert> + <check-errors/> + <log level="info" message="AFTER RUNNING CHECK RUN : ACCOUNTS PAYABLE ;debitTotal :${payableDebitTotal} ; creditTotal:${payableCreditTotal} ; debitCreditDifference : ${payableDebitCreditDifference}"/> + <log level="info" message="AFTER RUNNING VOID PAYMENT : UNDEPOSITED RECEIPTS ;debitTotal :${undepositedDebitTotal} ; creditTotal:${undepositedCreditTotal} ; debitCreditDifference : ${undepositedDebitCreditDifference}"/> + </simple-method> + </simple-methods> \ No newline at end of file Modified: ofbiz/branches/executioncontext20090812/applications/accounting/servicedef/secas.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/applications/accounting/servicedef/secas.xml?rev=806581&r1=806580&r2=806581&view=diff ============================================================================== --- ofbiz/branches/executioncontext20090812/applications/accounting/servicedef/secas.xml (original) +++ ofbiz/branches/executioncontext20090812/applications/accounting/servicedef/secas.xml Fri Aug 21 14:59:16 2009 @@ -128,13 +128,11 @@ <condition field-name="replenishPaymentId" operator="is-not-empty"/> <action service="finAccountReplenish" mode="sync" run-as-user="system"/> </eca> - - <!-- + <eca service="createFinAccountTrans" event="commit"> - <condition-field field-name="statusId" operator="equals" value="FINACT_TRNS_APPROVED"/> + <condition field-name="glAccountId" operator="is-not-empty"/> <action service="postFinAccountTransToGl" mode="sync"/> </eca> - --> <!-- sample ECA rules for the sampleInvoiceAffiliateCommission service triggering <eca service="createPayment" event="commit"> @@ -168,8 +166,4 @@ <action service="checkInvoicePaymentApplications" mode="sync"/> <action service="capturePaymentsByInvoice" mode="sync"/> </eca> - <eca service="depositWithdrawPayments" event="commit"> - <condition field-name="groupInOneTransaction" operator="equals" value="Y"/> - <action service="checkAndCreateBatchForValidPayments" mode="sync"/> - </eca> </service-eca> Modified: ofbiz/branches/executioncontext20090812/applications/accounting/servicedef/services_finaccount.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/applications/accounting/servicedef/services_finaccount.xml?rev=806581&r1=806580&r2=806581&view=diff ============================================================================== --- ofbiz/branches/executioncontext20090812/applications/accounting/servicedef/services_finaccount.xml (original) +++ ofbiz/branches/executioncontext20090812/applications/accounting/servicedef/services_finaccount.xml Fri Aug 21 14:59:16 2009 @@ -80,11 +80,13 @@ <auto-attributes mode="IN" optional="true" include="nonpk"> <exclude field-name="performedByPartyId"/> </auto-attributes> + <attribute name="glAccountId" type="String" mode="IN" optional="true"/> </service> <service name="postFinAccountTransToGl" engine="simple" location="component://accounting/script/org/ofbiz/accounting/finaccount/FinAccountGlPostServices.xml" invoke="postFinAccountTransToGl"> <description>Post a Financial Account Transaction to the General Ledger; meant to be called as an SECA</description> <attribute name="finAccountTransId" type="String" mode="IN" optional="false"/> + <attribute name="glAccountId" type="String" mode="IN" optional="false"/> </service> <service name="createFinAccountRole" engine="simple" default-entity-name="FinAccountRole" @@ -252,21 +254,16 @@ <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 --> @@ -469,6 +466,7 @@ <attribute name="paymentGroupTypeId" type="String" mode="IN" optional="true"/> <attribute name="paymentGroupName" type="String" mode="IN" optional="true"/> <attribute name="finAccountTransId" type="String" mode="OUT" optional="true"/> + <attribute name="paymentGroupId" type="String" mode="OUT" optional="true"/> </service> <service name="expirePaymentAssociationsOnFinAccountTransCancel" engine="simple" location="component://accounting/script/org/ofbiz/accounting/finaccount/FinAccountServices.xml" invoke="expirePaymentAssociationsOnFinAccountTransCancel"> <description>expire payment associations with paymentGroup on finAccountTrans cancel</description> @@ -480,10 +478,10 @@ <description>create new payment and associate with respective financial account in FinAccountTrans Entity.</description> <implements service="createPayment"/> <attribute name="isDepositWithDrawPayment" type="String" mode="IN" optional="true"/> - <attribute name="finAccountId" type="String" mode="IN" optional="false"/> + <attribute name="finAccountId" type="String" mode="IN" optional="true"/> <attribute name="finAccountTransTypeId" type="String" mode="IN" optional="false"/> <attribute name="paymentGroupTypeId" type="String" mode="IN" optional="true"/> - <attribute name="paymentIds" type="List" mode="OUT" optional="false"/> + <attribute name="paymentId" type="String" mode="OUT" optional="true"/> </service> <service name="getTransactionTotalByGlReconcileId" engine="simple" @@ -499,4 +497,9 @@ <attribute name="finAccountTransId" type="String" mode="IN" optional="false"/> <attribute name="glReconciliationId" type="String" mode="IN" optional="false"/> </service> + <service name="removeFinAccountTransFromReconciliation" engine="simple" + location="component://accounting/script/org/ofbiz/accounting/finaccount/FinAccountServices.xml" invoke="removeFinAccountTransFromReconciliation"> + <description>Remove finaAccountTrans association with gl reconciliation</description> + <attribute name="finAccountTransId" type="String" mode="IN" optional="false"/> + </service> </services> Modified: ofbiz/branches/executioncontext20090812/applications/accounting/servicedef/services_ledger.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/applications/accounting/servicedef/services_ledger.xml?rev=806581&r1=806580&r2=806581&view=diff ============================================================================== --- ofbiz/branches/executioncontext20090812/applications/accounting/servicedef/services_ledger.xml (original) +++ ofbiz/branches/executioncontext20090812/applications/accounting/servicedef/services_ledger.xml Fri Aug 21 14:59:16 2009 @@ -675,4 +675,12 @@ <attribute name="inventoryValuationList" type="List" mode="OUT" optional="true"/> </service> + <service name="calculateCostCenterTotal" engine="simple" auth="true" + location="component://accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml" invoke="calculateCostCenterTotal"> + <description>Calculate Cost Center total with respect to the glAccountId</description> + <attribute name="glAccountId" mode="IN" type="String"/> + <attribute name="glAccountCategoryId" mode="IN" type="String"/> + <attribute name="amountPercentage" mode="IN" type="BigDecimal" optional="true"/> + </service> + </services> Modified: ofbiz/branches/executioncontext20090812/applications/accounting/testdef/paymenttests.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/applications/accounting/testdef/paymenttests.xml?rev=806581&r1=806580&r2=806581&view=diff ============================================================================== --- ofbiz/branches/executioncontext20090812/applications/accounting/testdef/paymenttests.xml (original) +++ ofbiz/branches/executioncontext20090812/applications/accounting/testdef/paymenttests.xml Fri Aug 21 14:59:16 2009 @@ -58,4 +58,15 @@ <test-case case-name="auto-tests-setFinAccountTransStatus"> <simple-method-test location="component://accounting/script/org/ofbiz/accounting/test/AutoPaymentTests.xml" name="testSetFinAccountTransStatus"/> </test-case> + + <!--Test case to verify GL postings for Void Payment process--> + <test-case case-name="auto-test-glPostingsOnVoidPayment"> + <simple-method-test location="component://accounting/script/org/ofbiz/accounting/test/AutoPaymentTests.xml" name="testGlPostingsOnVoidPayment"/> + </test-case> + + <!---Test case to verify GL postings for Check Run process--> + <test-case case-name="auto-tests-glPostingOnCheckRun"> + <simple-method-test location="component://accounting/script/org/ofbiz/accounting/test/AutoPaymentTests.xml" name="testGlPostingOnCheckRun"/> + </test-case> + </test-suite> \ No newline at end of file Modified: ofbiz/branches/executioncontext20090812/applications/accounting/webapp/accounting/WEB-INF/controller.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/applications/accounting/webapp/accounting/WEB-INF/controller.xml?rev=806581&r1=806580&r2=806581&view=diff ============================================================================== --- ofbiz/branches/executioncontext20090812/applications/accounting/webapp/accounting/WEB-INF/controller.xml (original) +++ ofbiz/branches/executioncontext20090812/applications/accounting/webapp/accounting/WEB-INF/controller.xml Fri Aug 21 14:59:16 2009 @@ -306,7 +306,7 @@ </request-map> <request-map uri="createPayment"> <security https="true" auth="true"/> - <event type="service" invoke="createPayment"/> + <event type="service" invoke="createPaymentAndFinAccountTrans"/> <response name="success" type="view" value="editPayment"/> <response name="error" type="view" value="newPayment"/> </request-map> @@ -1981,6 +1981,18 @@ <response name="error" type="view" value="FindFinAccountTrans"/> </request-map> + <request-map uri="removeFinAccountTransFromReconciliation"> + <security auth="true" https="true"/> + <event type="service" invoke="removeFinAccountTransFromReconciliation"/> + <response name="success" type="view" value="BankReconciliation"/> + <response name="error" type="view" value="BankReconciliation"/> + </request-map> + <request-map uri="reomveFinAccountTransAssociation"> + <security auth="true" https="true"/> + <event type="service" invoke="removeFinAccountTransFromReconciliation"/> + <response name="success" type="view" value="ViewGlReconciliationWithTransaction"/> + <response name="error" type="view" value="ViewGlReconciliationWithTransaction"/> + </request-map> <!-- Fin Account Authority--> <request-map uri="EditFinAccountAuths"> <security https="true" auth="true"/> @@ -2418,9 +2430,9 @@ <request-map uri="createGlAcctCatMemFromCostCenters"> <security https="true" auth="true"/> - <event type="service-multi" invoke="createGlAcctCatMemFromCostCenters"/> - <response name="success" type="view" value="CostCenters"/> - <response name="error" type="view" value="CostCenters"/> + <event type="jsonservice" invoke="createGlAcctCatMemFromCostCenters"/> + <response name="success" type="none"/> + <response name="error" type="none"/> </request-map> <request-map uri="CostCenterReport"> Modified: ofbiz/branches/executioncontext20090812/applications/accounting/webapp/accounting/finaccounttrans/FinAccountTrans.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/applications/accounting/webapp/accounting/finaccounttrans/FinAccountTrans.ftl?rev=806581&r1=806580&r2=806581&view=diff ============================================================================== --- ofbiz/branches/executioncontext20090812/applications/accounting/webapp/accounting/finaccounttrans/FinAccountTrans.ftl (original) +++ ofbiz/branches/executioncontext20090812/applications/accounting/webapp/accounting/finaccounttrans/FinAccountTrans.ftl Fri Aug 21 14:59:16 2009 @@ -132,6 +132,11 @@ <#if grandTotal?exists> <th>${uiLabelMap.AccountingCancelTransactionStatus}</th> </#if> + <#if !grandTotal?exists> + <#if (parameters.glReconciliationId?has_content && parameters.glReconciliationId != "_NA_")> + <th>${uiLabelMap.AccountingRemoveFromGlReconciliation}</th> + </#if> + </#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> @@ -237,26 +242,16 @@ <#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:getFinAccountTransRunningTotalAndBalances();"/></td> + <#if !(grandTotal?exists)> + <#if (parameters.glReconciliationId?has_content && parameters.glReconciliationId != "_NA_")> + <#if finAccountTrans.statusId == "FINACT_TRNS_CREATED"> + <td><a href="javascript:document.removeFinAccountTransFromReconciliation_${finAccountTrans.finAccountTransId}.submit();" class="buttontext">${uiLabelMap.CommonRemove}</a></td> + </#if> + </#if> </#if> - <#if !grandTotal?exists> - <#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 ((glReconciliationId?has_content && glReconciliationId == "_NA_") && (glReconciliations?has_content && finAccountTransList?has_content)) || !grandTotal?exists> + <#if finAccountTrans.statusId == "FINACT_TRNS_CREATED"> + <td><input id="finAccountTransId_${finAccountTrans_index}" name="_rowSubmit_o_${finAccountTrans_index}" type="checkbox" value="Y" onclick="javascript:getFinAccountTransRunningTotalAndBalances();"/></td> </#if> </#if> </tr> @@ -265,6 +260,12 @@ </#list> </table> </form> + <#list finAccountTransList as finAccountTrans> + <form name="removeFinAccountTransFromReconciliation_${finAccountTrans.finAccountTransId}" method="post" action="<@ofbizUrl>removeFinAccountTransFromReconciliation</@ofbizUrl>"> + <input name="finAccountTransId" type="hidden" value="${finAccountTrans.finAccountTransId}"/> + <input name="finAccountId" type="hidden" value="${finAccountTrans.finAccountId}"/> + </form> + </#list> <#if grandTotal?exists> <#list finAccountTransList as finAccountTrans> <#if finAccountTrans.statusId?has_content && finAccountTrans.statusId == 'FINACT_TRNS_CREATED'> |
Free forum by Nabble | Edit this page |