View source | View content page | Page history | Printable version   

Projects:Madv/Technical Documentation

Contents

Artifact List

The development of this module involves the creation of the following items:

New module

A module must be created with the following parameters:

In the dependency tab:

In the prefix tab: Prefix=MADV

In the datapackage tab: org.openbravo.massadvancedpayments

New Table - Columns - Elements

To maintain and store advanced payment templates a new table is created. This table must be created in the database and also registered in the application via Application Dictionary -> Tables and Columns.

The necessary elements will be created by clicking on synchronize terminology button.

New Window - Tab - Fields

A window named Payment Template must be created for the previous table. A tab and the corresponding fields must be created. The field sequence can be seen in the image below:

Madv template.png

New Process - Form

This development involves the creation of a manual process called: Advanced Payment Wizard. It is composed of:

The following tasks must be performed:

New Menu Entries

A new menu entry must be created for the above described...

New Messages

The following messages will be created in the table AD_Message.

Message
Name Message Type Message Text Explanation Importance
MADV_PROCESS_RESULT Success "The system has generated @number@ payment(s). Click on of the link(s) below for the payment details." Must have
MADV_MIN_ONE_BP Error "At least one business partner must be selected" Must have
MADV_WRONG_DATE_FORMAT Error "The invoice date has a wrong format, the expected format is this: @format@ Must have
MADV_WRONG_FORMAT Error The value @value@ is in an invalid format. Must have
MADV_unique_name Error There is already another template with the same name for this client. Error for unique contraint Must have
MADV_ Error Must have
MADV_ Error Must have

Mass Advanced Payments Process

MassAdvancedPayments.java

Description: For each payment to be created, a settlement with two payments is created. The back statement has to be created manually (Direct Debit form of payment will automate this).

Extends: HttpSecureAppServlet

Validations:

In step 1:


Action: This servlet implements the following logic in DoPost function.

In default command -> Print Window 1()

In window2 command (step 1 to step 2) ->

In pop1 command (generate button pressed) ->

In window3 command (step 2 to step 3)->

Results:

For each proposed payment:

See in the tables below the values this new records must have.

Settlement

A settlement is created with the following data. Some of this data is set in the SettlementPropertySetter. Any other nullable column not explicitly mentioned should be set to null.

Column Attribute Name Value
c_settlement_id id created by DAL
AD_client_ID client retrieved from user
AD_org_ID organization the organization selected in step 1
isactive Active Y
created, createdby, updated, updatedby current user, current date
documentno will be computed
datetrx current date
c_doctype_id documenttype the ID corresponding to document type "Debt/Payment Settlement"
processing N
processed N
posted N
c_campaign_id, c_project_id, c_activity_id null
user1_id, user2_id null
createfrom null
c_currency_id currency set to the value specified in step 1 of the wizard
description set from the order template


cancelednotchargedamt 0
generatedamt 0
chargedamt 0
createfile N
settlementtype C
copyfrom N
isgenerated N
istemplate N

Payments

Two payments will be created in the table c_debtpayment instead of the (view) c_debt_payment_generate, as DAL does not support insertion on views at the moment. The following data will be inserted:

Column Attribute Name Value
c_debt_payment_id id created by DAL
AD_client_ID client retrieved from user
AD_org_ID organization the organization selected in step 1
isactive Active Y
created, createdby, updated, updatedby current user, current date
c_settlement_id id of the settlement
description description from template
isreceipt from template
c_invoice_id null
c_bpartner_id the business partner for which the payment is generated
c_currency_id set to the value specified in step 1 of the wizard
c_cashline_id, c_bankstatementline_id null
c_bank_account_id set to the value specified in step 1 of the wizard; if no value is specified there, then set to the value specified in the payment template
c_cashbook_id null
paymentrule from the payment template
ispaid N
amount value specified in step 2 of the wizard
writeoffamt 0
dateplanned the due date specified in step 1 of the wizard
ismanual N
isvalid Y
generate_processed N
c_glitem_id null
isdirectposting N
status from the payment template
c_project_id null
c_withholding_id null
withholdingamount null

Settlementpropertysetter.java

Description: Sets the properties of a settlement and payment

Methods:

IntercompanyPayment.java

Description: Creates the corresponding payment in the organization of the business partner.

Triggered: When the advanced payment template has the field create matching inter-company payment checked.

Method createPayments

Input Settlement - Original settlement , matching will be created.

Action:

Checks:

If any of this validations fails the corresponding error will be thrown. See message section. The error will be displayed in the wizards window and the process will stop till the validation does not fail.

Result:

The corresponding payment is created in table: c_debtpayment

Parameters:

massAdvancedPayment_W1.html

Description: Window correponding to Wizard Step 1

Interface: See image in Functional Specs.

Default values:

Validations on drop downs

Reload

Checks on client-side

If any validation fails a message is displayed in this window.

Actions on buttons

massAdvancedPayment_W2.html

Description: Window corresponding to Wizard Step 2

Interface: See image in Functional Specs.

Default

Check:

Actions on buttons

massAdvancedPayment_P1.html

Description: Window corresponding to pop up window

Interface: See image in Functional Specs.

Actions on buttons

massAdvancedPayment_W3.html

Description: Window corresponding to Wizard Step 3

Interface: See image in Functional Specs.

Bold text

Retrieved from "http://wiki.openbravo.com/wiki/Projects:Madv/Technical_Documentation"

This page has been accessed 3,362 times. This page was last modified on 8 June 2012, at 05:32. Content is available under Creative Commons Attribution-ShareAlike 2.5 Spain License.