You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Ashish Vijaywargiya (JIRA)" <ji...@apache.org> on 2008/01/06 03:53:34 UTC
[jira] Closed: (OFBIZ-1492) Auto posting: Implement an automatic GL
posting service for payment applications
[ https://issues.apache.org/jira/browse/OFBIZ-1492?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ashish Vijaywargiya closed OFBIZ-1492.
--------------------------------------
Resolution: Fixed
Thanks to all contributed in this work.
Patch is in rev # 609252.
--
Ashish
> Auto posting: Implement an automatic GL posting service for payment applications
> --------------------------------------------------------------------------------
>
> Key: OFBIZ-1492
> URL: https://issues.apache.org/jira/browse/OFBIZ-1492
> Project: OFBiz
> Issue Type: Sub-task
> Components: accounting
> Affects Versions: SVN trunk
> Reporter: Jacopo Cappellato
> Assignee: Ashish Vijaywargiya
> Attachments: ofBiz1492.patch
>
>
> Name of the service: "createAcctgTransAndEntriesForPaymentApplication" or similar
> Service definition:
> <service name="createAcctgTransAndEntriesForPaymentApplication" engine="simple" auth="true"
> location="org/ofbiz/accounting/ledger/GeneralLedgerServices.xml" invoke="createAcctgTransAndEntriesForPaymentApplication">
> <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>
> 1) get the PaymentApplication and Payment records
> if (UtilAccounting.isReceipt(payment)) then {
> 2) prepare the debit AcctgTransEntry entry:
> debitCreditFlag=D
> organizationPartyId=payment.partyIdTo
> partyId=payment.partyIdFrom
> roleTypeId=BILL_TO_CUSTOMER
> origAmount=paymentApplication.amountApplied
> origCurrencyUomId=payment.currencyUomId
> glAccountId=payment.overrideGlAccountId
> glAccountTypeId=get the PaymentGlAccountTypeMap for the given Payment.paymentTypeId and organizationPartyId
> and use the PaymentGlAccountTypeMap.glAccountTypeId
> 3) prepare the credit AcctgTransEntry entry:
> debitCreditFlag=C
> organizationPartyId=payment.partyIdTo
> partyId=payment.partyIdFrom
> roleTypeId=BILL_TO_CUSTOMER
> origAmount=paymentApplication.amountApplied
> origCurrencyUomId=payment.currencyUomId
> glAccountTypeId=ACCOUNTS_RECEIVABLE
> }
> else {
> 4) prepare the credit AcctgTransEntry entry:
> debitCreditFlag=C
> organizationPartyId=payment.partyIdFrom
> partyId=payment.partyIdTo
> roleTypeId=BILL_FROM_VENDOR
> origAmount=paymentApplication.amountApplied
> origCurrencyUomId=payment.currencyUomId
> glAccountId=payment.overrideGlAccountId
> glAccountTypeId=get the PaymentGlAccountTypeMap for the given Payment.paymentTypeId and organizationPartyId
> and use the PaymentGlAccountTypeMap.glAccountTypeId
> 5) prepare the debit AcctgTransEntry entry:
> debitCreditFlag=D
> organizationPartyId=payment.partyIdFrom
> partyId=payment.partyIdTo
> roleTypeId=BILL_FROM_VENDOR
> origAmount=paymentApplication.amountApplied
> origCurrencyUomId=payment.currencyUomId
> glAccountTypeId=ACCOUNTS_PAYABLE
> }
> 6) call the createAcctgTransAndEntries with the following fields
> acctgTransEntries= entries prepared at points 2 and 3 or 4 and 5
> acctgTransTypeId="PAYMENT_APPL"
> paymentId=paymentApplication.paymentId
> invoiceId=paymentApplication.invoiceId
> if (UtilAccounting.isReceipt(payment)) then {
> partyId=payment.partyIdFrom
> roleTypeId=BILL_TO_CUSTOMER
> } else{
> partyId=payment.partyIdTo
> roleTypeId=BILL_FROM_VENDOR
> }
> The service is triggered by the following seca:
> <eca service="createPaymentApplication" event="commit">
> <condition field-name="invoiceId" operator="is-not-empty" />
> <action service="createAcctgTransAndEntriesForPaymentApplication" mode="sync"/>
> </eca>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.