View source | View content page | Page history | Printable version   
Toolbox
Main Page
Upload file
What links here
Recent changes
Help

PDF Books
Show collection (0 pages)
Collections help

Search

Projects:Asset Report Depreciation Schedule/Technical Specifications

Contents

TECHNICAL SPECIFICATION OF ASSET REPORT FOR DEPRECIATION SCHEDULE

PURPOSE OF THE PROJECT

The Depreciation Schedule Fixed Assets report is a new report which will show the depreciation schedule for a specific fixed asset or a specific fixed asset category.

INTRODUCTION

This technical specifications document outlines the implementation of asset report for Depreciation Schedule.

TECHNICAL IMPLEMENTATION :

REQUIRED FILES

The needed files for our "Asset Report for Depreciation Schedule" development


Report Creation in Application Dictionary

Menu Creation in Application Dictionary

Controller:JAVA file

The controller java file should have the appropriate methods for generating the appropriate output format. The Asset report for Depreciate Schedule has different output formats.

1. Search (HTML). 2. PDF.

Controller servlet should have two methods as printPageDataSheet() and printPageDataPdf() to generate the html output and pdf output respectively which is called from "doPost" based on user selection. The Asset Report is initially loaded by clicking the "Depreciation Schedule" menu element, and the "DEFAULT" block inside the java controller will be executed. If the user clicks on the "Search" Button, the "FIND" method will be executed and result will be displayed on the bottom of the page in html format. If the user clicks on the "PDF Format" button, the result of the search will be displayed in pdf format in pop up window.

Java condition blocks

public void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException,ServletException {

   VariablesSecureApp vars = new VariablesSecureApp(request);    
   if (vars.commandIn("DEFAULT")) { 
   } else if (vars.commandIn("FIND")) {
   }  else if (vars.commandIn("PRINT_PDF")) {    	
   } else
     pageError(response);
 }

USER INTERFACE IMPLEMENTATION:

[Financial Management || Assets || Analysis Tools || Asset || Asset ]

The result is display on html & PDF file based on the filter condition.

Model: Create XSQL file

Next step is the creation of the xsql file in order to retrieve the data that will be shown in the report.

<SqlClass name="ReportAssetDepreciationScheduleData" package="org.openbravo.erpCommon.ad_reports">
<SqlClassComment>Report for asset depreciation schedule</SqlClassComment>
  <SqlMethod name="select" type="preparedStatement" return="multiple">
    <SqlMethodComment>Method used for search(HTML) and PDF </SqlMethodComment>
    <Sql><![CDATA[
    SELECT A.NAME AS ASSETNAME,A.DESCRIPTION AS ASSETDESCRIPTION,Y.YEAR AS FIELDFISCALYEAR,AM.STARTDATE AS STARTDATE,
    AM.ENDDATE AS ENDDATE,F.AMTACCTDR AS AMOUNT,C.ISO_CODE AS CURRENCY
    FROM A_ASSET_GROUP AG, A_ASSET A, A_AMORTIZATION AM,A_AMORTIZATIONLINE AML,FACT_ACCT F,C_CURRENCY C,C_PERIOD P,C_YEAR Y,C_ACCTSCHEMA S
    WHERE AG.A_ASSET_GROUP_ID = A.A_ASSET_GROUP_ID AND A.A_ASSET_ID=AML.A_ASSET_ID AND AM.A_AMORTIZATION_ID=AML.A_AMORTIZATION_ID
    AND AML.A_AMORTIZATION_ID=F.RECORD_ID AND F.A_ASSET_ID=A.A_ASSET_ID AND F.AMTACCTDR<>'0' AND C.C_CURRENCY_ID= F.C_CURRENCY_ID
    AND P.C_PERIOD_ID = F.C_PERIOD_ID AND P.C_YEAR_ID = Y.C_YEAR_ID
    AND S.C_ACCTSCHEMA_ID=F.C_ACCTSCHEMA_ID
    AND A.AD_CLIENT_ID = ?
    AND 1=1
    AND A.AD_ORG_ID IN ('1')
    ORDER BY A.NAME, Y.YEAR, AM.STARTDATE, AM.ENDDATE]]></Sql>
    <Parameter name="client"></Parameter>    
    <Parameter name="DateFrom" optional="true" after="AND 1=1"><![CDATA[ AND AM.STARTDATE >= TO_DATE(?)]]></Parameter> 
    <Parameter name="DateTo" optional="true" after="AND 1=1"><![CDATA[ AND AM.ENDDATE <= TO_DATE(?)]]></Parameter> 
    <Parameter name="assetSeaKey" ignoreValue="%" optional="true" after="AND 1=1"><![CDATA[ AND UPPER(A.VALUE) LIKE UPPER(?)]]></Parameter>       
    <Parameter name="assetDescription" ignoreValue="%" optional="true" after="AND 1=1"><![CDATA[ AND UPPER(A.DESCRIPTION) LIKE UPPER(?)]]></Parameter>
    <Parameter name="cAssetCategoryId" optional="true" after="AND 1=1"><![CDATA[  AND AG.A_ASSET_GROUP_ID = ?]]></Parameter>
    <Parameter name="cAcctSchemaId" optional="true" after="AND 1=1"><![CDATA[ AND S.C_ACCTSCHEMA_ID = ?]]></Parameter>
    <Parameter name="Org" type="replace" optional="true" after="AND A.AD_ORG_ID IN (" text="'1'"/>
  </SqlMethod>
  <SqlMethod name="set" type="constant" return="multiple">
    <SqlMethodComment></SqlMethodComment>
     <Sql></Sql>
  </SqlMethod>

Database Information


To test the Depreciation Schedule report

OPEN DISCUSSION ITEMS

The other report in system has other options as below.

Export to Excel. Printer Icon to print the report and so on.

what are all the options we need to have on "Asset Report for depreciation schedule" should have ?.

CLOSED DISCUSSION ITEMS

Retrieved from "http://wiki.openbravo.com/wiki/Projects:Asset_Report_Depreciation_Schedule/Technical_Specifications"

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