|
Author: apatel
Date: Mon Sep 27 18:16:06 2010 New Revision: 1001850 URL: http://svn.apache.org/viewvc?rev=1001850&view=rev Log: Applied fix from trunk for revision: 1001849 === Modified: ofbiz/branches/release10.04/ (props changed) ofbiz/branches/release10.04/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml ofbiz/branches/release10.04/applications/accounting/script/org/ofbiz/accounting/payment/PaymentServices.xml ofbiz/branches/release10.04/applications/accounting/servicedef/secas_ledger.xml ofbiz/branches/release10.04/applications/accounting/servicedef/services_ledger.xml ofbiz/branches/release10.04/applications/accounting/servicedef/services_payment.xml Propchange: ofbiz/branches/release10.04/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Mon Sep 27 18:16:06 2010 @@ -1,3 +1,3 @@ /ofbiz/branches/addbirt:831210-885099,885686-886087 /ofbiz/branches/multitenant20100310:921280-927264 -/ofbiz/trunk:939988,939990,939999,940025,940053,940234,940248,940309,940401,940410,940425,940779,940815,940849,940851,941007,941047,941109,941177,941199,941261,941440,941600,941999,942084,942406,942414,942671,942883-942884,943168,943271-943272,944614,944621,944623,944647,944669,944797,944895,945010,945018,945026,945118,945573,945578,945580,945582,945610,945619,945848,945852,945857,946061,946066,946073,946075,946080,946309,946313,946320,946322,946596,947004-947005,947392,947424,947679,947988,948017,948694,949174,949710,949844,950866,950870,950893,951005,951062,951098,951251,951367,951381,951672,952232,952249,952270,953294,953671,954135,954583,954733,954956,955568,956022,956206,956340,957160,958343,958514,958521,958752,958758,958769,958953,959456,960143,960491,960997,963610,964558,965470,965916,966525,966785,967098,978806,978893,978939,979104,980641-980642,980935,981051,981104,981123,981288,983920,983930,985163,985473,985718,985856,985902,987841,989166,990127,990339,990539,991 485,993344,993387,995384,995686,996069,996078-996079,996563,997418-997420,997423-997425,997431,997440,997526,997990,998061,998412,998557,1000621,1000725,1000998,1001099,1001131,1001185,1001574 +/ofbiz/trunk:939988,939990,939999,940025,940053,940234,940248,940309,940401,940410,940425,940779,940815,940849,940851,941007,941047,941109,941177,941199,941261,941440,941600,941999,942084,942406,942414,942671,942883-942884,943168,943271-943272,944614,944621,944623,944647,944669,944797,944895,945010,945018,945026,945118,945573,945578,945580,945582,945610,945619,945848,945852,945857,946061,946066,946073,946075,946080,946309,946313,946320,946322,946596,947004-947005,947392,947424,947679,947988,948017,948694,949174,949710,949844,950866,950870,950893,951005,951062,951098,951251,951367,951381,951672,952232,952249,952270,953294,953671,954135,954583,954733,954956,955568,956022,956206,956340,957160,958343,958514,958521,958752,958758,958769,958953,959456,960143,960491,960997,963610,964558,965470,965916,966525,966785,967098,978806,978893,978939,979104,980641-980642,980935,981051,981104,981123,981288,983920,983930,985163,985473,985718,985856,985902,987841,989166,990127,990339,990539,991 485,993344,993387,995384,995686,996069,996078-996079,996563,997418-997420,997423-997425,997431,997440,997526,997990,998061,998412,998557,1000621,1000725,1000998,1001099,1001131,1001185,1001574,1001849 Modified: ofbiz/branches/release10.04/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/release10.04/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml?rev=1001850&r1=1001849&r2=1001850&view=diff ============================================================================== --- ofbiz/branches/release10.04/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml (original) +++ ofbiz/branches/release10.04/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml Mon Sep 27 18:16:06 2010 @@ -2396,9 +2396,16 @@ under the License. </entity-and> <iterate list="paymentApplications" entry="paymentApplication"> <set field="createAcctgTransAndEntriesForPaymentApplicationInMap.paymentApplicationId" from-field="paymentApplication.paymentApplicationId"/> - <call-service service-name="createAcctgTransAndEntriesForPaymentApplication" in-map-name="createAcctgTransAndEntriesForPaymentApplicationInMap"> - <result-to-field result-name="acctgTransId"/> - </call-service> + <if-compare field="payment.paymentTypeId" operator="equals" value="CUSTOMER_REFUND"> + <call-service service-name="createAcctgTransAndEntriesForCustomerRefundPaymentApplication" in-map-name="createAcctgTransAndEntriesForPaymentApplicationInMap"> + <result-to-field result-name="acctgTransId"/> + </call-service> + <else> + <call-service service-name="createAcctgTransAndEntriesForPaymentApplication" in-map-name="createAcctgTransAndEntriesForPaymentApplicationInMap"> + <result-to-field result-name="acctgTransId"/> + </call-service> + </else> + </if-compare> <log level="info" message="Accounting transaction ${acctgTransId} created for payment application ${paymentApplication.paymentApplicationId}"/> </iterate> </if-compare> @@ -2444,7 +2451,64 @@ under the License. <call-service service-name="createAcctgTransEntry" in-map-name="createAcctgTransAndEntryInMap"/> </iterate> </simple-method> - + + <!--service to create AcctgTransAndEntries For Customer Refund Payment Application--> + <simple-method method-name="createAcctgTransAndEntriesForCustomerRefundPaymentApplication" short-description="create AcctgTransAndEntries For Customer Refund PaymentApplication"> + <entity-one entity-name="PaymentApplication" value-field="paymentApplication"> + <field-map field-name="paymentApplicationId" from-field="parameters.paymentApplicationId"/> + </entity-one> + <get-related-one value-field="paymentApplication" relation-name="Payment" to-value-field="payment"/> + <!-- if the payment transaction has not been already posted to gl then don't do nothing; the transaction for the payment application will be posted together with the payment --> + <if-compare field="payment.statusId" operator="equals" value="PMNT_NOT_PAID"> + <return/> + </if-compare> + <!-- if the payment Debited account is already "accounts payable" then don't do nothing --> + <entity-one entity-name="PaymentGlAccountTypeMap" value-field="paymentGlAccountTypeMap"> + <field-map field-name="paymentTypeId" from-field="payment.paymentTypeId"/> + <field-map field-name="organizationPartyId" from-field="payment.partyIdFrom"/> + </entity-one> + <if-compare field="paymentGlAccountTypeMap.glAccountTypeId" operator="equals" value="ACCOUNTS_RECEIVABLE"> + <return/> + </if-compare> + <!--Credit --> + <make-value entity-name="AcctgTransEntry" value-field="creditEntry"/> + <set field="creditEntry.debitCreditFlag" value="C"/> + <set field="creditEntry.organizationPartyId" from-field="payment.partyIdFrom"/> + <set field="creditEntry.partyId" from-field="payment.partyIdTo"/> + <set field="creditEntry.roleTypeId" value="BILL_TO_CUSTOMER"/> + <set field="creditEntry.origAmount" from-field="paymentApplication.amountApplied"/> + <set field="creditEntry.origCurrencyUomId" from-field="payment.currencyUomId"/> + <set field="creditEntry.glAccountId" from-field="payment.overrideGlAccountId"/> + <set field="creditEntry.glAccountTypeId" from-field="paymentGlAccountTypeMap.glAccountTypeId"/> + <!-- Debit --> + <make-value entity-name="AcctgTransEntry" value-field="debitEntry"/> + <set field="debitEntry.debitCreditFlag" value="D"/> + <set field="debitEntry.organizationPartyId" from-field="payment.partyIdFrom"/> + <set field="debitEntry.partyId" from-field="payment.partyIdTo"/> + <set field="debitEntry.roleTypeId" value="BILL_TO_CUSTOMER"/> + <set field="debitEntry.origAmount" from-field="paymentApplication.amountApplied"/> + <set field="debitEntry.origCurrencyUomId" from-field="payment.currencyUomId"/> + <set field="debitEntry.glAccountTypeId" value="ACCOUNTS_RECEIVABLE"/> + <if-not-empty field="paymentApplication.overrideGlAccountId"> + <set field="debitEntry.glAccountId" from-field="paymentApplication.overrideGlAccountId"/> + </if-not-empty> + + <set field="acctgTransEntries[]" from-field="debitEntry" type="Object"/> + <set field="acctgTransEntries[]" from-field="creditEntry" type="Object"/> + <set field="createAcctgTransAndEntriesInMap.acctgTransEntries" from-field="acctgTransEntries"/> + <set field="createAcctgTransAndEntriesInMap.acctgTransTypeId" value="PAYMENT_APPL"/> + <set field="createAcctgTransAndEntriesInMap.glFiscalTypeId" value="ACTUAL"/> + <set field="createAcctgTransAndEntriesInMap.paymentId" from-field="paymentApplication.paymentId"/> + <set field="createAcctgTransAndEntriesInMap.invoiceId" from-field="paymentApplication.invoiceId"/> + <set field="createAcctgTransAndEntriesInMap.partyId" from-field="payment.partyIdTo"/> + <set field="createAcctgTransAndEntriesInMap.roleTypeId" value="BILL_TO_CUSTOMER"/> + <call-service service-name="createAcctgTransAndEntries" in-map-name="createAcctgTransAndEntriesInMap"> + <result-to-field result-name="acctgTransId"/> + </call-service> + <field-to-result field="acctgTransId" result-name="acctgTransId"/> + + </simple-method> + <!--service to create AcctgTransAndEntries For Payment Application--> <simple-method method-name="createAcctgTransAndEntriesForPaymentApplication" short-description="create AcctgTransAndEntries For PaymentApplication"> <entity-one entity-name="PaymentApplication" value-field="paymentApplication"> Modified: ofbiz/branches/release10.04/applications/accounting/script/org/ofbiz/accounting/payment/PaymentServices.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/release10.04/applications/accounting/script/org/ofbiz/accounting/payment/PaymentServices.xml?rev=1001850&r1=1001849&r2=1001850&view=diff ============================================================================== --- ofbiz/branches/release10.04/applications/accounting/script/org/ofbiz/accounting/payment/PaymentServices.xml (original) +++ ofbiz/branches/release10.04/applications/accounting/script/org/ofbiz/accounting/payment/PaymentServices.xml Mon Sep 27 18:16:06 2010 @@ -178,6 +178,9 @@ under the License. <field-to-result field="paymentAppl.paymentApplicationId" result-name="paymentApplicationId"/> <create-value value-field="paymentAppl"/> + <entity-one value-field="payment" entity-name="Payment"/> + <field-to-result field="payment.paymentTypeId" result-name="paymentTypeId"/> + </simple-method> <simple-method method-name="setPaymentStatus" short-description="Set The Payment Status"> Modified: ofbiz/branches/release10.04/applications/accounting/servicedef/secas_ledger.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/release10.04/applications/accounting/servicedef/secas_ledger.xml?rev=1001850&r1=1001849&r2=1001850&view=diff ============================================================================== --- ofbiz/branches/release10.04/applications/accounting/servicedef/secas_ledger.xml (original) +++ ofbiz/branches/release10.04/applications/accounting/servicedef/secas_ledger.xml Mon Sep 27 18:16:06 2010 @@ -133,8 +133,14 @@ under the License. <eca service="createPaymentApplication" event="commit"> <condition field-name="invoiceId" operator="is-not-empty"/> + <condition field-name="paymentTypeId" operator="not-equals" value="CUSTOMER_REFUND"/> <action service="createAcctgTransAndEntriesForPaymentApplication" mode="sync"/> </eca> + <eca service="createPaymentApplication" event="commit"> + <condition field-name="invoiceId" operator="is-not-empty"/> + <condition field-name="paymentTypeId" operator="equals" value="CUSTOMER_REFUND"/> + <action service="createAcctgTransAndEntriesForCustomerRefundPaymentApplication" mode="sync"/> + </eca> <!-- set GlReconciliation status after creating GlReconciliation Entries --> <eca service="createGlReconciliationEntry" event="commit"> Modified: ofbiz/branches/release10.04/applications/accounting/servicedef/services_ledger.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/release10.04/applications/accounting/servicedef/services_ledger.xml?rev=1001850&r1=1001849&r2=1001850&view=diff ============================================================================== --- ofbiz/branches/release10.04/applications/accounting/servicedef/services_ledger.xml (original) +++ ofbiz/branches/release10.04/applications/accounting/servicedef/services_ledger.xml Mon Sep 27 18:16:06 2010 @@ -501,6 +501,13 @@ under the License. <attribute name="acctgTransId" type="String" mode="OUT" optional="true"/> </service> + <service name="createAcctgTransAndEntriesForCustomerRefundPaymentApplication" engine="simple" auth="true" + location="component://accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml" invoke="createAcctgTransAndEntriesForCustomerRefundPaymentApplication"> + <description>Create an accounting transaction for a payment application</description> + <attribute name="paymentApplicationId" type="String" mode="IN" optional="false"/> + <attribute name="acctgTransId" type="String" mode="OUT" optional="true"/> + </service> + <!-- Party GlAccount services --> <service name="createPartyGlAccount" default-entity-name="PartyGlAccount" engine="simple" location="component://accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml" invoke="createPartyGlAccount" auth="true"> Modified: ofbiz/branches/release10.04/applications/accounting/servicedef/services_payment.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/release10.04/applications/accounting/servicedef/services_payment.xml?rev=1001850&r1=1001849&r2=1001850&view=diff ============================================================================== --- ofbiz/branches/release10.04/applications/accounting/servicedef/services_payment.xml (original) +++ ofbiz/branches/release10.04/applications/accounting/servicedef/services_payment.xml Mon Sep 27 18:16:06 2010 @@ -77,6 +77,7 @@ under the License. <attribute name="taxAuthGeoId" type="String" mode="IN" optional="true"/> <attribute name="amountApplied" type="BigDecimal" mode="IN" optional="false"/> <attribute name="paymentApplicationId" type="String" mode="OUT" optional="false"/> + <attribute name="paymentTypeId" type="String" mode="OUT" optional="false"/> </service> <service name="updatePaymentApplication" default-entity-name="PaymentApplication" engine="java" location="org.ofbiz.accounting.invoice.InvoiceServices" invoke="updatePaymentApplication"> |
| Free forum by Nabble | Edit this page |
