ImportBank Module User Guide

Table of Contents

  1. Introduction
  2. Installation
  3. Configuration
  4. Usage
    1. Step 1: Uploading the CSV File
    2. Step 2: Column Mapping
    3. Step 3: Preview and Edit Data
    4. Step 4: Importing Data
  5. Advanced Features
    1. Automatic Cleaning of Special Characters
    2. Highlighting Rows with Empty Amounts
    3. Import Order Selection
    4. Debug Mode
  6. Troubleshooting
  7. FAQ

1. Introduction

The ImportBank module is designed to facilitate the import of bank operations into Dolibarr from CSV files. It allows you to import bank statements into Dolibarr bank accounts, offering advanced features such as:

2. Installation

To install the ImportBank module:

  1. Download the module from the official Dolibarr website or from the marketplace.
  2. Extract the archive into the htdocs/custom/ directory of your Dolibarr installation.
  3. Log in to Dolibarr as an administrator.
  4. Go to Home > Setup > Modules.
  5. Find the "ImportBank" module in the list and click the "Enable" button.

3. Configuration

No specific configuration is required to use the ImportBank module. However, make sure that:

4. Usage

Step 1: Uploading the CSV File

To start the import process:

  1. Go to the Banks > Bank Import menu.
  2. Select the bank account into which you want to import operations.
  3. Click the "Browse" button to select your CSV file.
  4. Configure the import options:
    • CSV Separator: Choose the character that separates columns in your file (usually ";" or ",").
    • Decimal Separator: Choose the character used as the decimal separator (usually "," or ".").
    • Date Format: Select the date format used in your file.
    • Header Lines: Indicate the number of header lines to skip.
    • Encoding: Select the file encoding.
  5. Click the "Upload" button to upload the file.

Note: The module accepts CSV files with different formats. If you encounter problems during import, try modifying the import options to match your file format.

Step 2: Column Mapping

After uploading the file, you need to indicate which column in the CSV corresponds to each type of data:

  1. For each data type (Date, Label, Debit, Credit), select the corresponding column in your CSV file.
  2. The module tries to automatically detect the mapping, but you should verify that it is correct.
  3. Click "Save Mapping" to confirm your selection.

Tip: If your CSV file contains a single column for the amount (positive for credits, negative for debits), you can select the same column for both "Debit" and "Credit". The module will automatically handle positive and negative values.

Step 3: Preview and Edit Data

After configuring the column mapping, you will see a preview of the data to be imported:

  1. Check that the data is correctly interpreted.
  2. You can edit the data directly in the interface:
    • Modify dates if they are not correctly formatted.
    • Adjust labels for clarity.
    • Correct amounts if necessary.
  3. Check or uncheck the boxes on the left to select the rows to import.
  4. Empty rows or rows with zero amounts are automatically deselected and highlighted in pink.

Step 4: Importing Data

Once you are satisfied with the preview:

  1. Select the import order (oldest to newest or newest to oldest).
  2. Click the "Import" button to import the selected rows into Dolibarr.
  3. A confirmation message will appear, indicating the number of rows successfully imported.

Warning: The import is final. Once operations are imported, they cannot be automatically removed. You will need to delete them manually if necessary.

5. Advanced Features

Automatic Cleaning of Special Characters

The module includes an automatic special character cleaning feature that is enabled by default. This feature allows you to:

A blue information message appears at the top of the import page when this feature is enabled.

To enable or disable this feature:

  1. Go to Home > Setup > Modules > ImportBank > Configuration
  2. Check or uncheck the "Automatically clean special characters" option
  3. Click "Save"

Note: If you encounter problems when importing CSV files containing special characters or particular number formats, make sure this option is enabled.

Automatic Cleaning of Description Field

The module also includes an automatic description field cleaning feature that is enabled by default. This feature allows you to:

This feature is particularly useful when descriptions in the CSV file contain complex formatting or control characters that can make reading difficult.

To enable or disable this feature:

  1. Go to Home > Setup > Modules > ImportBank > Configuration
  2. Check or uncheck the "Automatically clean description field" option
  3. Click "Save"

Note: This feature is particularly useful for CSV files exported from certain banks that include line breaks or tabs in the operation descriptions.

Highlighting Rows with Empty Amounts

The module automatically highlights (with a pink background) rows where both the Debit and Credit columns are empty or zero. This feature allows you to quickly identify rows that might require special attention before importing.

Import Order Selection

You can choose the order in which operations will be imported:

This option is particularly useful if you are importing a large number of operations and want to see the most recent ones appear first in Dolibarr.

Debug Mode

Debug mode displays additional information about the imported data. To enable debug mode, check the "Debug Mode" box in the top right of the preview screen. This will display the raw values of each row, which can be useful for diagnosing import problems.

6. Troubleshooting

Common Problems and Solutions

Problem Possible Cause Solution
File does not upload Permission issues or file size too large
  • Check that the temp directory is writable
  • Check the maximum upload size in your PHP configuration
Dates are not correctly interpreted Incorrect date format
  • Select the correct date format in the import options
  • Manually edit the dates in the preview screen
Amounts are incorrect Incorrect decimal separator or formatting issues
  • Select the correct decimal separator in the import options
  • Check that amounts do not contain non-numeric characters (such as spaces or currency symbols)
Some rows are not imported Rows not selected or invalid data
  • Check that the checkboxes are checked for the rows you want to import
  • Check that the data is valid (dates, amounts, etc.)

7. FAQ

Can I import the same file multiple times?

Yes, but the module does not automatically check for duplicates. If you import the same file multiple times, you risk having duplicate operations in your bank account. It is recommended to manually check existing operations before importing.

What file formats are supported?

The module only supports CSV (Comma-Separated Values) files. If your bank statement is in another format (XLS, PDF, etc.), you will need to convert it to CSV first.

How do I convert an Excel file to CSV?

In Excel, go to "File > Save As" and select the format "CSV (semicolon delimited)" or "CSV (comma delimited)" depending on the separator you want to use.

Can I save my import settings for reuse?

Currently, the module does not allow saving import settings. You will need to reconfigure them for each import.

How do I handle operations with negative amounts?

If your CSV file contains negative amounts, the module will automatically interpret them as debits. If the amounts are positive, they will be interpreted as credits.

What if my CSV file has a special format?

If your CSV file has a special format (for example, additional columns or special formatting), you can still import it by using the column mapping to indicate which columns correspond to the required data (date, label, debit, credit).