Using Drupal to create financial applications

June 18, 2021

Tags: IT Staff EN 2024
Share

Table of contents

Quick Access

drupal

 

In recent months, we have been working on a project that we are proud to present. Using Drupal 7, we developed a system to import, view, and download financial reports in various Excel formats, including macros. This project involved extensive planning to ensure a scalable structure for content management, allowing the project to grow easily over time.

 

drupal

Key Features of the Project

Data Importing

To facilitate data import, we created a form that processes XML files with multiple records, generating nodes for each record in the XML. For each data record, we referenced fields from the XSD structure designed for each financial report.

 

The import process includes three stages of validation:

  1. XSD Validation: Compares the XML structure to the XSD statement for each report.
  2. Code Validation: Validates code numbers in the XML against taxonomy codes (e.g., a "Country" code for Panama is verified against a taxonomy of countries).
  3. Logical Validation: Performs a logical check of sums and subtractions, using a taxonomy with a parent-child hierarchy.

 

All validation messages—whether errors or successes—are logged in Watchdog to create a comprehensive validation record. Additionally, the import system includes a versioning module, enabling historical reporting and reversible versions. We implemented complex field collection logic to track changes, detect new records, and identify removed records to create new versions when needed.

 

Report Viewing

To display reports, we developed custom formats for each type of content. This involved modifying TPL files and processing data before rendering it, allowing each report format to meet specific requirements. Some reports required data manipulation with formulas or rearranged information for clarity.

 

drupal

 

Report Downloading

We developed a form for report downloads, allowing users to select various views that are managed in code. Views were chosen for their future scalability, as these queries will likely grow over time. We used PHP Views with static variables, enabling PHP code to interact with data dynamically.

 

To download reports in Excel format, we utilized the PHPExcel library, which enabled us to interact with and inject data into Excel files. With PHPExcel, we incorporated macros for data manipulation within specific sheets. While we encountered initial challenges using macros with the library, we resolved these issues to achieve the desired functionality.

 

Additional Features

This project includes additional features, such as:

  • Role-based Delegation: A role hierarchy system for user management.
  • Mass Data Deletion: Tools for efficient data cleanup.
  • Management Console: A centralized interface for managing system functionalities.

 

This project represents a unique development with Drupal, showcasing a versatile, scalable approach to financial report management with robust import, view, and download capabilities.

 

We recommend you this video