Web Application Development by Applying the MVC and Table Data Gateway in the Annual Program Budget Management System

This paper is the result of the development of the Web application to register the Annual Work Program, in which goals and actions are assigned the financial resources to manage the annual work program identified. In this paper, we have identified five types of users: the first is the Administrator, in charge of monitoring the goals programmed in the period, as well as the resource assigned to reach those goals; the second corresponds to the purchasing department who is in charge of contacting the supplier and at the same time inform financial and warehouse of the acquisition through the system; the third corresponds to a warehouse in charge of validating the material and generate entry / exit official vouchers and send the purchase order to financiers; the fourth user corresponds to financial, this will identify through the system that all the procedure is completed to make the payment; and finally, the fifth user make up the set of all remaining departments. Finally, the system presents flexibility in case it is necessary to go adding departments. Keywords—WEB Applications; MVC; Data Gateway Table; Software engineering; incremental; iterative


INTRODUCTION
Now-a-days, the systems for administering the Annual Operational Program (AOP) are very useful systems that facilitate the programming, and administration of the financial resources assigned to each department, as well as establishing the following guidelines to reach what is scheduled in the year for an Institution.The AWP allows monthly activities to be monitored to meet the goals in the year [1], while the AOP is responsible for budgeting the financial resources necessary to fulfill the AWP [2,3].
Information systems allow you to manage and control a company.Whenever an efficient recording of the data is carried out, all the information necessary to prepare reports, records and, consequently, make a decision will be available and handy.Information systems are composed of computer equipment, human resources, data that are entered into the system, programs that are executed on the computer to produce results, telecommunications and procedures that include policies and operating rules, which interact between Yes to achieve the organization's objectives [4].
At the Technological Institute of Tuxtla, Gutierrez, the system was developed with the purpose of speeding up the purchase process, because there are projects and needs that must be addressed promptly [5], but due to the administrative process that must follow, implies that pass through several departments before completing the above procedure.The departments that are involved are: Planning, Material Resources and Services (in the Purchasing and Warehouse offices), financial Resources, as well as the department requesting the acquisition of the good or service.In each of these departments, formats are generated that are captured in Word or Excel as the case may be.In most of the cases, the data to be captured are redundant data that, although systematize, the retrieval of the document should be automatic.
Currently, in the Technological Institute of Tuxtla, Gutierrez, year by year he carries out the annual work program (AWP), through actions programmed by strategic and key processes.So, the purpose of this project is a web application that allows the registration of the AWP, the resources allocated each of the actions of the strategic process through the Annual Operational Program (AOP), the registration of the expenses to carry out such actions.The registration of purchases, the entry of material, product or service through warehouse and the notice to financial resources to release the payment, as well as a series of reports in each of the elements already mentioned.To develop the system, it was considered to each of the users that intervene to follow up a purchase process, the user (department) requesting a service or product must first have the resource to be able to prepare the corresponding requisition, it should be clarified that the user at all times manages to see the tracking of the acquisition from the moment he request until he arrives at the warehouse.This work has the purpose of optimizing the time in the release of the resource for the acquisition of the product or service, as well as the systematization of the entire process, so that in a future work can be made efficient decision making based on historical data.
To achieve this, an application with the Software engineering methodology has developed, in this case allowed www.ijacsa.thesai.org the development planning.As part of the analysis phase is used case of use of the UML (Unified Modeling Language) diagrams, to then define modeling of business processes via BPMN diagram to identify the workflow, as you can see more later.

II. METHODS
For the development of the system, the agile incremental Iterative methodology was used [6,7], see figure 1, where each increment or new feature added to the project consists of planning.Design, construction, testing and commissioning.The reason why this methodology was applied is because it presents a great flexibility to make changes and / or to add new characteristics, with witch it is possible that in each iteration a version of the fully functional system is generated (see Figure 2).

A. Collection of Data
As part of the first iteration, we reviewed how we work the Annual Work Plan (AWP), how departments are involved when defining their annual work plan; Base on the information obtained, the web interface that integrates with the ITTG Integral Information System (SII) was developed.In this interface, there is an Administrator who adds the goals to be met, can generate reports and view the information captured from each Department, there are also Departments represented by the department role they can select the goals to which they contribute.
In the second iteration, the Annual Operational Plan (AOP) was known which consist of making the department budget to consolidate each goal selected by each department.Based on the way operations for the AOP are performed in the current administration, a web interface has been developed that integrates with the SII which has two users identified.Administrator and Department, the administrator is in charge of establishing the limit Budget, generate reports an approve applications among other tasks, while the Department can in this section make the budget tor he current period, in addition to making the following request: Request for Requisition, Request for services an Request for Viaticum; Each request after being captured can be formatted in a PDF document for later printing.

B. Used tools
PHP is a programming language generally used in the programming of dynamic, open source and platform independent websites, fast, with a large library of functions and a lot of documentation [8].
For the development of the application Zend Framework 1.12 is used which is supported by the version of PHP that is used in the production server [9]; This framework uses the MVC (Model-View-Controller) methodology for the organization of the source code, in addition it uses the design pattern Table Data Gateway that allows a perfect separation of SQL code of the rest of the classes of the classes of the system [10,11].

C. MVC (Model-View-Controller)
The MVC considers there operating instances: the controller and the view, in figure 3 the operating scheme is presented [12].

D. Table Data Gateway
It is a pattern that usually provides sufficient separation, without the cost of using a proxy pattern; this is also known as Data Access Object (DAO), this pattern uses a specialized mask for each type of object that we want to store in the database [11].The corresponding abstract classes are presented in figure 4.  In order to make a purchase and/or payment to the supplier or service provider, the following activities were identified:  Department, make request.
 Administrator (Dept.planning, programming and budgeting), makes the assessment of the application and can authorize.
 Purchases (within the Department of Materials Resources) authorize, rejects and can print formats.
 Warehouse receives products if these have been requested from a supplier who seals the invoice received to pass the apartment.Of Material Resources and authorized the purchase.
 Financial Resources, check where the requisition is and wait for it to be in physical format in the department.
On the other hand, the administration for de Department was identified and developed.Resource Materials consisting of two parts:  The first one is Purchases, where the authorization of the Request is made, if there is a purchase of materials, the request is made to suppliers, if the is no need to turn to Financial Resources directly the payment order.
 The second is Warehouse, is responsible for receiving the materials requested from the supplier and seals the invoice received for delivery to purchase and can generate the purchase order for Warehouse to generate: entry /exit vouchers and offices payment.
A monitor was integrated to know in which department the office is located and the status (accepted, rejected or canceled) of the document, this is presented to all users with their respective permissions so a department will display the status of their accepted applications and Financial Resources will identify in which part of the process each application is located.
Finally, the Financial Resources department receives the payment order and invoice, in order to issue the payment and thus finalize the process.
As part of obtaining system requirements and analysis, it was also possible to identify the functionality of the system from the point of view of the user [14][15][16], as can be seen in figure 6 to 9.  As part of the process of identifying the process that are performed in the departments, when a request to the AOP was made, the following steps were identified in the diagram of figure 10 BPMN (Business Process Model and Notation) [17].In the design of the system the classes that would later intervene in the development of the system were identified, see appendix A.
For the storage of the information was created the Database that can be seen in the Appendix B.

IV. RESULTS
The main product that is obtained from this is obtained from this Project involves the following users: Client (Departments), Department of Planning, Purchasing Office, Office of Warehouse and financial resources.It is the customer who the request of a requisition (see Figure 11  The Department of Planning is responsible for performing the checking of feasibility and authorize the requisition, relying on the interface that is presented in Figure 12, the tables allows you to view the following information:  Folio Current: is the amount of requisitions that have already been approved so far.  Authorized budget (Planning): represents in money the authorizations of requisitions.
 Income (Financial Services): Displays the amount of money up to which you can exercise in the year, it should be noted that the latter data can be modified several times by the Department of financial resources, due to perceive income through the year.
 Available: reports the amount of money that you can still get to spend in the current fiscal year and is the result of real income (financial) -Authorized Budget (Planning).
Immediately after the table shows a list of departments with a number on the left side means the amount of requisitions that a department has requested and are still pending authorize.Once approved the requisition can be printed on the system, the customer will see the legend authorized to the select the print icon as shown in figure 11, to print the requisition as seen in Figure 13.On the other hand, the purchasing office, taking the requisition authorized access to view the detail of the requisition (see figure 14), where you can generate purchase www.ijacsa.thesai.orgorder to send to the supplier, as well as the payment order to send it to the Department of financial resources (see Figure 15).In the Store account is responsible for generating the vouchers input/output (see figure 16 and 17).Which does the person who delivers the well as well as for the one who receives it, sign.The systematization of the administration of the presupposed annual, has allowed have a better control in the expenditure, is has reduced in a 50% the time in that takes in authorize is a buy since this is requested, also allows get of way immediate indicators of the State of has of each Department, the budget concentrate by split budget and program institutional, breakdown of the budget of investment with charges to income own between others.

V. DISCUSSION
The importance of the development of this system allows the carrying out of proper control of the projects established by the Annual Operational Program, determine the goals and actions and consistently identify the allocation of financial resource, generate the requisition orders, authorization of the same and go after deducting the resources allocated by budget headings.
With specific records of dates, preparation authorization and monitoring within the purchasing process.
Concerning the results obtained by the development of the web application, the procedure of purchases that account the institute has been of great contribution, since that will allow for greater control and follow-up of the same, particularly stresses the importance of budgetary control that by law should be not to make expenditures outside the authorized budget; Take to the track in the whole process of shopping cart until the payment of the same enables all users to have knowledge of the times and to be able to identify if according to their responsibility and competence has been made.www.ijacsa.thesai.orgIt is considered as a comprehensive system that benefits thorough the adequate fulfilled, comparison of information in regard to the budget allocated and the authorized, generates information for the analysis of budgetary control and compare the financial information with the areas involved in the process of shopping, Department of Planning, authorizes and validates the requisition, Department of material resources that performs the quotations, runs the purchase, generates payment order and finally conclude the process with the payment of the purchase generated in the department of Financial Resources.
On the other hand, from the point of view of software engineering using BPMN diagrams in development, allows to express the process of business for the systematization of processes, MVC allows you to divide the logic of the design business doing more scalable to the project, while Table Data Gateway encapsulates the database access in a natural way, using an object that acts as gateway to a table of database, of this way a change of version in the database can help to the code source of the version previous follow running.

VI. CONCLUSIONS
The present work is very useful, allows to optimize the time in the process of the application until the acquisition and payment of the good or service.The system is intuitive and achieves the easy operation for each of the users, obtaining quickly a series of reports that are required in all administrative procedures, as well as, easily store and retrieve the registration of the procedures.
The Web application follows the process and notifies through flags in which status the acquisition process is.The application has the flexibility to add new department and users at the beginning of the period.Maintenance of this system in the future will be an easy task, since bases that will help to achieve it have been established from the beginning, through the division of the business logic to implement the model-view -controller together with the encapsulation of data by means of Table Data.
As part of a future work, is referred to include advanced electronic signature as part of automation and digitalization of processes.
On the other hand, must analyze historical data for optimization of expenditure, through "data warehouse" to improve the quality of decision-making.It earlier will allow identify what are the services or inputs that are bought and in what time of the year, it is acquired, as well as who are the departments that it requested.The data warehouse also will identify cross purchases that are made.Also, it aims to apply Dataminig with the purpose of identifying trends or predict the increase of the expenditure for the following exercise annual.

Fig. 3 .
Fig. 3. Representation of the operation of the MVC  Model: An object that represents some information about the domain.This is a non-visual object that contains all data and behaviors different from those used by the user interface.In its most pure OO (Object Oriented) form the model is an object within the Domain Model [13]  View: Defines exactly what is presented to the user.Normally the controllers pass the data to each view to be represented in the view with some format.Views also collect user data, with forms. Controller: The Controller integrates the pattern, always.Manipulate the model, decide what I will show based on the user's request and other factors.

Fig. 4 .
Fig. 4. Graph of increase of functionality III.DEVELOPMENT It began with the planning of activities in each of the phases of the Software Development Lifecycle, to the give way to the stage of requisition analysis and design.Here, the system's activities were identified from the point of view of each user, making it possible to clearly establish two users that are fundamental for the good operation of the system, on the one hand the administrator and on the other the clients of the system, in this case as the Heads of Department of ITTG.The figure 5 below shows the activities diagram for carrying out the AWP and the allocation of the corresponding financial resource.

Fig. 6 .Fig. 7 .
Fig. 6.Functionality of the System Represented with use case diagrams

Fig. 9 .
Fig. 9. Interaction between Financial Resources, Material Resources and the Supplier

Fig. 12 .
Fig. 12. Requisition information pending authorize, as well as the amount of money pending exercise

Fig. 14 .
Fig. 14.Detail of requisition in the account of the purchasing office