Tax Report Launcher(Technical Specification
TAX REPORT LAUNCHER: Technical Specifications
PURPOSE OF THE PROJECT:
Enabling a tax launcher that will allow to define reports and parameters associated to those reports so that tax rates and withholdings can be related to those reports defining this way the content needed to fulfill the report. Each of the report will have a java class assigned which implements a public interface and where all the business logic needed will be applied. This way business logics of each report will be isolated one from the other so that modifying a report will not affect the others.
INTRODUCTION:
This development will provide new window/tabs to be able to do the setup, but as well will provide a form from where all the reports will be able to be launched. The output of these reports will always be in electronic format.
To be able to explode the data directly from accounting info, some modifications to the accounting engine will be needed as well. To deliver this development a module is going to be created. Configuration data will be delivered as an additional module. As well, every report will be included in a particular module. This last one will be dependent from the launcher. Finally the configuration module will be dependent on the reports module and on the launcher.
TECHNICAL IMPLEMENTATION :
USER INTERFACE IMPLEMENTATION:
New windows and tabs:
[Financial Management || Accounting || Setup || Tributary key].
In this window tax report will define its configuration.
- Tabs:
- Tributary key.
- Related table:
- OBTL_Tributarykey (OBTL_: this will be the DB prefix of the launcher module)
Column
| Data Type
| Description
|
OBTL_TRIBUTARYKEY_ID
| VARCHAR(32)
| Identifier for tributary key
|
AD_CLIENT_ID
| VARCHAR(32)
| Audit data
|
AD_ORG_ID
| VARCHAR(32)
| Audit data
|
CREATED
| DATE
| Audit data
|
CREATEDBY
| VARCHAR(32)
| Audit data
|
UPDATED
| DATE
| Audit data
|
UPDATEDBY
| VARCHAR(32)
| Audit data
|
ISACTIVE
| CHAR(1 BYTE)
| Audit data
|
VALUE
| NVARCHAR2(60)
| Tributary key search key
|
NAME
| NVARCHAR2(255)
| Tributary key name
|
DESCRIPTION
| NVARCHAR2(255)
| Brief explanation of the Tributary key.
|
- Subtab:
- Tributary sub-key.
- Related table:
- OBTL_TributarySubkey (OBTL_: this will be the DB prefix of the launcher module)
Column
| Data Type
| Description
|
OBTL_TRIBUTARYSUBKEY_ID
| VARCHAR(32)
| Identifier for tributary sub-key
|
OBTL_TRIBUTARYKEY_ID
| VARCHAR(32)
| Identifier for tributary key
|
AD_CLIENT_ID
| VARCHAR(32)
| Audit data
|
AD_ORG_ID
| VARCHAR(32)
| Audit data
|
CREATED
| DATE
| Audit data
|
CREATEDBY
| VARCHAR(32)
| Audit data
|
UPDATED
| DATE
| Audit data
|
UPDATEDBY
| VARCHAR(32)
| Audit data
|
ISACTIVE
| CHAR(1 BYTE)
| Audit data
|
VALUE
| NVARCHAR2(60)
| Tributary sub-key search key
|
NAME
| NVARCHAR2(255)
| Tributary sub-key name
|
DESCRIPTION
| NVARCHAR2(255)
| Brief explanation of the Tributary sub-key.
|
[Financial Management || Accounting || Setup || Transaction code].
In this window tax report will define its configuration.
Column
| Data Type
| Description
|
OBTL_TRANSACTIONCODE_ID
| VARCHAR(32)
| Identifier for transaction code
|
AD_CLIENT_ID
| VARCHAR(32)
| Audit data
|
AD_ORG_ID
| VARCHAR(32)
| Audit data
|
CREATED
| DATE
| Audit data
|
CREATEDBY
| VARCHAR(32)
| Audit data
|
UPDATED
| DATE
| Audit data
|
UPDATEDBY
| VARCHAR(32)
| Audit data
|
ISACTIVE
| CHAR(1 BYTE)
| Audit data
|
VALUE
| NVARCHAR2(60)
| Transaction code search key
|
NAME
| NVARCHAR2(255)
| Transaction code name
|
DESCRIPTION
| NVARCHAR2(255)
| Brief explanation of the Transaction code.
|
[Financial Management || Accounting || Setup || Tax Report].
In this window tax report will define its configuration.
Column
| Data Type
| Description
|
OBTL_TAX_REPORT_ID
| VARCHAR(32)
| Identifier for tax Report
|
AD_CLIENT_ID
| VARCHAR(32)
| Audit data
|
AD_ORG_ID
| VARCHAR(32)
| Audit data
|
CREATED
| DATE
| Audit data
|
CREATEDBY
| VARCHAR(32)
| Audit data
|
UPDATED
| DATE
| Audit data
|
UPDATEDBY
| VARCHAR(32)
| Audit data
|
ISACTIVE
| CHAR(1 BYTE)
| Audit data
|
VALUE
| NVARCHAR2(60)
| Tax report search key
|
NAME
| NVARCHAR2(255)
| Tax report name
|
PERIOD
| VARCHAR(60)
| List containing the values: Monthly, quarterly, yearly.
|
DESCRIPTION
| NVARCHAR2(255)
| Brief description of the content of the report.
|
CLASSNAME
| NVARCHAR2(255)
| Full classname of the java class (containingpackage name + class name) where the business logic is defined.
|
Column
| Data Type
| Description
|
OBTL_TAX_REPORT_GROUP_ID
| VARCHAR(32)
| Identifier for tax Report Group
|
AD_CLIENT_ID
| VARCHAR(32)
| Audit data
|
AD_ORG_ID
| VARCHAR(32)
| Audit data
|
CREATED
| DATE
| Audit data
|
CREATEDBY
| VARCHAR(32)
| Audit data
|
UPDATED
| DATE
| Audit data
|
UPDATEDBY
| VARCHAR(32)
| Audit data
|
ISACTIVE
| CHAR(1 BYTE)
| Audit data
|
OBTL_TAX_REPORT_ID
| VARCHAR(32)
| Identifier for tax Report
|
VALUE
| NVARCHAR2(60)
| Tax report Parameter search key
|
NAME
| NVARCHAR2(255)
| Tax report name
|
SEQNO
| DECIMAL(10)
| Order criteria
|
DESCRIPTION
| NVARCHAR2(255)
| Brief description of the content of the report.
|
- Tax report Parameter.
- Related table:
- OBTL_Tax_Report_Parameter
Column
| Data Type
| Description
|
OBTL_TAX_REPORT_PARAMETER_ID
| VARCHAR(32)
| Identifier for tax Report Parameter
|
AD_CLIENT_ID
| VARCHAR(32)
| Audit data
|
AD_ORG_ID
| VARCHAR(32)
| Audit data
|
CREATED
| DATE
| Audit data
|
CREATEDBY
| VARCHAR(32)
| Audit data
|
UPDATED
| DATE
| Audit data
|
UPDATEDBY
| VARCHAR(32)
| Audit data
|
ISACTIVE
| CHAR(1 BYTE)
| Audit data
|
VALUE
| NVARCHAR2(60)
| Tax report Parameter search key
|
NAME
| NVARCHAR2(255)
| Tax report name
|
SEQNO
| DECIMAL(10)
| Order criteria
|
TYPE
| VARCHAR(60)
| List containing the values: IN, OUT, Constant.
|
INPUTTYPE
| VARCHAR(60)
| List containing the values: TEXT, CHECK-BOX. Only displayed when TYPE column is IN.
|
DESCRIPTION
| NVARCHAR2(255)
| Brief description of the content of the report.
|
OBTL_TAX_REPORT_GROUP_ID
| VARCHAR(32)
| Identifier for tax Report Group
|
OBTL_TRIBUTARYKEY_ID
| VARCHAR(32)
| Tributary key related to this parameter.
|
OBTL_TRIBUTARYSUBKEY_ID
| VARCHAR(32)
| Tributary sub-key related to this parameter.
|
OBTL_TRANSACTIONCODE_ID
| VARCHAR(32)
| Tributary key related to this parameter.
|
CONSTANTVALUE
| NVARCHAR(60)
| Value for the constant parameter. Only displayed when the type is constant
|
When user wants to launch a report, a window will be built dynamically according to the defined parameters (grouped into the defined groups), so user can enter the desired values for the parameters of type "input".
[Financial Management || Accounting || Setup || Tax Rate].
In this window another new tab will be added to relate tax rates with the parameters of the tax reports.
Column
| Data Type
| Description
|
OBTL_TAX_PARAMETER_ID
| VARCHAR(32)
| Identifier for tax Report
|
AD_CLIENT_ID
| VARCHAR(32)
| Audit data
|
AD_ORG_ID
| VARCHAR(32)
| Audit data
|
CREATED
| DATE
| Audit data
|
CREATEDBY
| VARCHAR(32)
| Audit data
|
UPDATED
| DATE
| Audit data
|
UPDATEDBY
| VARCHAR(32)
| Audit data
|
ISACTIVE
| CHAR(1 BYTE)
| Audit data
|
OBTL_TAX_REPORT_PARAMETER_ID
| VARCHAR(32)
| Identifier for tax Report
|
C_TAX_ID
| VARCHAR(32)
| Identifier for tax rate
|
[Master Data Management || Business Partner Setup || Withholding].
In this window another new tab will be added to relate withholdings with the parameters of the tax reports.
- New tab WithHolding parameter.
- Related table:
- OBTL_WithHolding_Parameter
Column
| Data Type
| Description
|
OBTL_WITHHOLDING_PARAMETER_ID
| VARCHAR(32)
| Identifier for withholding parameter
|
AD_CLIENT_ID
| VARCHAR(32)
| Audit data
|
AD_ORG_ID
| VARCHAR(32)
| Audit data
|
CREATED
| DATE
| Audit data
|
CREATEDBY
| VARCHAR(32)
| Audit data
|
UPDATED
| DATE
| Audit data
|
UPDATEDBY
| VARCHAR(32)
| Audit data
|
ISACTIVE
| CHAR(1 BYTE)
| Audit data
|
OBTL_TAX_REPORT_PARAMETER_ID
| VARCHAR(32)
| Identifier for tax Report Parameter
|
C_WITHHOLDING_ID
| VARCHAR(32)
| Identifier for withholding
|
ADDITIONAL DATABASE CHANGES:
[Financial Management || Accounting || Analysis Tools || Accounting Transaction Details].
- Existing tab Header.
- Related table:
- Fact_Acct (already exists)
Column
| Data Type
| Description
|
C_WITHHOLDING_ID
| VARCHAR(32)
| Identifier for withholding
|
[Financial Management || Accounting || Transactions || G/L Journal].
- Existing tab Lines.
- Related table:
- GL_JournalLine (already exists)
Column
| Data Type
| Description
|
C_WITHHOLDING_ID
| VARCHAR(32)
| Identifier for withholding
|
C_TAX_ID
| VARCHAR(32)
| Identifier for tax
|
[Financial Management || Accounting || Setup || GL Item].
- Existing tab Payment.
- Related table:
- GL Items (already exists)
Column
| Data Type
| Description
|
C_TAX_ID
| VARCHAR(32)
| Identifier for tax
|
C_WITHHOLDING_ID
| VARCHAR(32)
| Identifier for withholding
|
Source code changes:
- DocLine.java [org.openbravo.erpcommon.ad_forms]:
- Add a new attribute public String m_C_WithHolding_ID = "";
- Modify method loadAttributes to load "m_C_WithHolding_ID"
- Create corresponding getters/setters methods
- FactLine.java [org.openbravo.erpcommon.ad_forms]:
- Modify save method to include C_WithHolding_ID in the insert statement to the fact_acct table.
- DocPayment.java [org.openbravo.erpcommon.ad_forms]:
- Modify the file to include C_Tax_ID (in manual payments) and C_WithHolding_ID (in cancelled and paid payments) information.
- tax report launcher
- Data Access Object (DAO). Class created to define the data access of the report using hibernate.
- Utility class. Class used to define common methods for reports. It will help in report development.
- Apply mods to the launcher to handle INPUT parameters.Implement both INPUT types: text + check-box
- Define the interface to be implemented by each of the tax report, according to this definition:
/**
* Generates the electronic file (plain text) of the model.
*
* @param strOrgId
* organization's ID to generate the report
* @param strReportId
* report's ID of the model to generate
* @param strAcctSchemaId
* Accounting Schema used to calculate the report
* @param strYearId
* year's ID to calculate the report
* @param strPeriodId
* period's ID. In case of non-monthly basis report, this string must contain a
* comma-separated list of the period's ID
* @param inputParams
* Map containing all the input parameters manually introduced by the user when launching
* the report. The key String must be equals to the search key of the input parameter
* defined in the report
* @return a Map which contains:
* <ul>
* <li><b>fileName</b>: (String) File name that will have the created report. It must be
* introduced by the user as an input parameter</li>
* <li><b>file</b>: StringBuffer which contains the generated report</li>
* </ul>
* @throws OBException
* in case of something wrong in the structure of the report. Example, length validation
* for a field, error while converting an input parameter to a number...
* @throws Exception
* in case of other Exceptions
*/
public HashMap<String, Object> generateElectronicFile(String strOrgId, String strReportId,
String strAcctSchemaId, String strYearId, String strPeriodId, Map<String, String> inputParams)
throws OBException, Exception;
Reference data:
- Provide a module for:
- Definition of tributary keys
- Definition of tributary sub-keys
- definition of transaction codes
- Tax Reports: Reference data related to the definition of the tax reports + definition of parameters
- Taxes configuration: second version of the module containing the rates and the parameters related to those tax rates. (This may be more related to the report module itself)
- WithHolding configuration: Related reference data including withholding definition and associated parameters. (This may be more related to the report module itself)