Projects:Directdebit/Technical Documentation
Contents |
Direct Debt Payment
Module
This new functionality requires the creation of new module named "Direct Debit form of payment". Also the OBX file should be registered and also available in openbravo forge. http://forge.openbravo.com/projects/directdebit
Module Specifications
Name: Direct Debit form of payment
- Version: 1.0.0.
- Java package: org.openbravo.documents.directDebitPayment.
- Dependency: Yes with core
- License: Openbravo Public License
- License Text: The Openbravo Public License Version 1.1 ("OBPL") consists of the Mozilla Public License Version 1.1, modified to be specific to Openbravo, with the * * Additional Terms in Exhibit B. The original Mozilla Public License 1.1 can be found at: http://www.mozilla.org/MPL/MPL-1.1.html
- Author: Openbravo S.L.U.
New Reference Data
In order to manage this new functionality it is needed to have a new reference data available for the user. This reference data should be related to the existing "All_Payment Rule". The new entry is going to be used to mark the payment rule named "Direct Debit".
New Process
A new Process should be created to managed this new functionality. This process could be created in a standard way using wad. Also many user would like to run this process automatically using " Process Request" under General Setup || Process Scheduling. In that case since it is not possible to run it in this way using parameters, the process should run without any, this means that all the payments mark as "direct debit" will have the bank statement created after running it.
Process Definition
- Search key: ProceesDirectDebit
- Name: Process Direct Debit
- Data access level: Client/organization
- UI pattern: Manual
The parameter of this process are the following
- Organization
- Bank Account
- Business partner
- Date From
- Date To
The process should check all of the matching receivable and payables payments under the table C_DEBT_PAYMENT and create for each one a new bank statement Using to it the amount of the payment, the business partner and selected bank account. Once the bank statement is created it has to be processed.
If the parameters are not specified, the process will consider all payment in that dimension. For instance, if no organization is specified, direct debits are processed in all organizations in the current client.
The process should search in the table C_DEBT_PAYMENT for:
- Check the payment rule to be "direct Debit"
- Check not to be a bank statement associated. (It is not paid)
The Process will create a new bank Statement with a bank statement line.
- Should reflect the same amount that the debt payment.
- TRXAMT.
- STMTAMT.
- Almost the other columns in the C_BANKSTATEMENT and C_BANKSTATEMENTLINE should get all of the information from the line in C_DEBT_PAYMENT.
To process the created Bank Statement call the C_BankStatement_Post procedure.
Lines at Bank Statement
- C_BANKSTATEMENT_ID: getUUID();
- AD_CLIENT_ID: Client from C_DEBT_PAYMENT
- AD_ORG_ID: Organization from C_DEBT_PAYMENT
- ISACTIVE: Y (default value)
- CREATED: Now() only on insert only in the first insert
- CREATEDBY: The user who runs the process.
- UPDATED: Now(); every time the row is updated
- UPDATEDBY: The user who runs the process.
- C_BANKACCOUNT_ID: Get data from the payment
- NAME: Use 'Direct Debit ' || now() for the name.
- DESCRIPTION: NULL.
- ISMANUAL: N
- STATEMENTDATE: The date in which the Statement is created. Now()
- BEGINNINGBALANCE: NULL
- ENDINGBALANCE: Get the data from the AMOUNT column in C_DEBT_PAYMENT
- STATEMENTDIFFERENCE: Get the data from the AMOUNT column in C_DEBT_PAYMENT
- CREATEFROM: N
- PROCESSING: N
- PROCESSED: N
- POSTED: N
Lines at Bank Statement Line
- C_BANKSTATEMENTLINE_ID: GetUUID()
- AD_CLIENT_ID: Get the client from the payment.
- AD_ORG_ID: Get the client from the payment.
- ISACTIVE: Y.
- CREATED: Now() only on insert only in the first insert
- CREATEDBY: The user who runs the process.
- UPDATED: Now(); every time the row is updated
- UPDATEDBY: The user who runs the process.
- C_BANKSTATEMENT_ID: The UUID of the recently create bank statement row.
- LINE: 10.
- DESCRIPTION: NULL
- VALUTADATE: NOW()
- DATEACCT: NOW()
- C_CURRENCY_ID: Get the Currency ID from the debt payment.
- TRXAMT: Get the data from the amount of the debt payment.
- STMTAMT:Get the data from the amount of the debt payment.
- C_CHARGE_ID: NULL.
- CHARGEAMT: 0
- MEMO: NULL.
- REFERENCENO: NULL
- C_DEBT_PAYMENT_ID: Get the UUID from the C_DEBT_PAYMENT
- CONVERTCHARGEAMT: 0
- C_DEBT_PAYMENT_CREATE: N
- C_DP_MANAGEMENT_ID: NULL
- C_GLITEM_ID: NULL
To handle this process a new menu entry should be created in the General setup.
Menu entry specification
This new menu entry should be under (Financial Management || Receivables & Payables || Transactions)
- Search Key: ProceesDirectDebit
- Name: Process Direct Debit.
- Description: Creates Bank Statements for the pending receivable and payables payments.
- Active: Checked.
- Action: Process.
- Process: Select here the recently created Process Direct Debit process.