Bank statement import and reconciliation for Dolibarr: Difference between revisions

Jump to navigation Jump to search
Mise à jour 1.6.3 : paiements divers, rattrapage, vidéo, bases de données
(Mise à jour des liens officiels : vidéo, fiche KSIDol, démo et notice)
(Mise à jour 1.6.3 : paiements divers, rattrapage, vidéo, bases de données)
Line 9: Line 9:
<div style="border:1px solid #d7e3f4; border-radius:14px; padding:22px; margin:12px 0 22px 0; background:linear-gradient(135deg,#f6faff,#ffffff); box-shadow:0 2px 10px rgba(20,60,110,0.08);">
<div style="border:1px solid #d7e3f4; border-radius:14px; padding:22px; margin:12px 0 22px 0; background:linear-gradient(135deg,#f6faff,#ffffff); box-shadow:0 2px 10px rgba(20,60,110,0.08);">
   <div style="font-size:28px; font-weight:700; color:#17365d; margin-bottom:8px;">Bank Import for Dolibarr</div>
   <div style="font-size:28px; font-weight:700; color:#17365d; margin-bottom:8px;">Bank Import for Dolibarr</div>
   <div style="font-size:18px; color:#345; margin-bottom:14px;">Import your bank statements, get scored matches against your invoices and create native Dolibarr payments — after human validation</div>
   <div style="font-size:18px; color:#345; margin-bottom:14px;">Import your bank statements, match each movement with its document or with a miscellaneous payment carrying the right accounting account, and create native Dolibarr payments — after human validation</div>
   <div style="display:flex; flex-wrap:wrap; gap:8px; margin-top:10px;">
   <div style="display:flex; flex-wrap:wrap; gap:8px; margin-top:10px;">
     <span style="background:#e8f1ff; color:#17365d; padding:6px 10px; border-radius:999px; font-weight:600;">Multi-format import</span>
     <span style="background:#e8f1ff; color:#17365d; padding:6px 10px; border-radius:999px; font-weight:600;">Multi-format import</span>
     <span style="background:#e8f1ff; color:#17365d; padding:6px 10px; border-radius:999px; font-weight:600;">Bank reconciliation</span>
     <span style="background:#e8f1ff; color:#17365d; padding:6px 10px; border-radius:999px; font-weight:600;">Bank reconciliation</span>
     <span style="background:#e8f1ff; color:#17365d; padding:6px 10px; border-radius:999px; font-weight:600;">Scored matches</span>
     <span style="background:#e8f1ff; color:#17365d; padding:6px 10px; border-radius:999px; font-weight:600;">Scored matches</span>
    <span style="background:#e8f1ff; color:#17365d; padding:6px 10px; border-radius:999px; font-weight:600;">Miscellaneous payments</span>
    <span style="background:#e8f1ff; color:#17365d; padding:6px 10px; border-radius:999px; font-weight:600;">Catch-up</span>
     <span style="background:#e8f1ff; color:#17365d; padding:6px 10px; border-radius:999px; font-weight:600;">Native payments</span>
     <span style="background:#e8f1ff; color:#17365d; padding:6px 10px; border-radius:999px; font-weight:600;">Native payments</span>
     <span style="background:#e8f1ff; color:#17365d; padding:6px 10px; border-radius:999px; font-weight:600;">Human validation</span>
     <span style="background:#e8f1ff; color:#17365d; padding:6px 10px; border-radius:999px; font-weight:600;">Human validation</span>
    <span style="background:#e8f1ff; color:#17365d; padding:6px 10px; border-radius:999px; font-weight:600;">Duplicate protection</span>
     <span style="background:#e8f1ff; color:#17365d; padding:6px 10px; border-radius:999px; font-weight:600;">CSV · OFX · QIF · CAMT.053 · MT940</span>
     <span style="background:#e8f1ff; color:#17365d; padding:6px 10px; border-radius:999px; font-weight:600;">CSV · OFX · QIF · CAMT.053 · MT940</span>
   </div>
   </div>
Line 25: Line 26:
'''Bank Import''' is an external module for '''Dolibarr ERP/CRM''' (publisher KSIDol) that automates bank reconciliation, from statement to payment.
'''Bank Import''' is an external module for '''Dolibarr ERP/CRM''' (publisher KSIDol) that automates bank reconciliation, from statement to payment.


It imports the entries of a bank statement (CSV, OFX, QIF, CAMT.053, MT940), proposes '''scored''' matches against your open invoices, down payments, salaries and taxes, then creates the '''native Dolibarr payments''' — only after your validation. The module proposes, the user decides: no payment is created automatically, no existing entry is modified or deleted.
It imports the movements of a bank statement (CSV, OFX, QIF, CAMT.053, MT940), proposes '''scored''' matches against your invoices, down payments, credit notes, salaries, charges, expense reports, donations and entries already recorded, then creates the '''native Dolibarr payments''' — only after your validation. Operations with no invoice (social security contributions, taxes, insurance, loans, bank fees) are settled with a '''miscellaneous payment''' carrying an accounting account proposed from your history.


The module does not modify any Dolibarr core file.
The bank entry is created at pointing time, with the operation date and value date of the statement, then reconciled on the month's statement. The module proposes, the user decides; it does not modify any entry already transferred to accounting and does not modify any Dolibarr core file.


== Publisher and support ==
== Publisher and support ==
Line 64: Line 65:
|-
|-
| '''Main use'''
| '''Main use'''
| Import bank statements and create Dolibarr payments after scored reconciliation
| Import bank statements, match each movement with its document or with a miscellaneous payment, and create Dolibarr payments after validation
|-
|-
| '''Type'''
| '''Type'''
Line 73: Line 74:
|-
|-
| '''Documented version'''
| '''Documented version'''
| 24.0.0
| 1.6.3
|-
|-
| '''Dolibarr compatibility'''
| '''Dolibarr compatibility'''
| Dolibarr 18.0 to 24.x
| Dolibarr 18.0 to 24.x (tested on 18, 19, 20, 21, 22, 23 and 24)
|-
|-
| '''PHP compatibility'''
| '''PHP compatibility'''
| PHP 8.0 or higher
| PHP 8.0 or higher
|-
| '''Databases'''
| MySQL/MariaDB and PostgreSQL 16 and 18
|-
|-
| '''Dolibarr core modification'''
| '''Dolibarr core modification'''
Line 92: Line 96:


== Official links ==
== Official links ==
* Demo video : [https://youtu.be/zm1yBnvbWJg Bank Import — demo (YouTube)]
* Demo video: [https://youtu.be/Le7w_xFOTBQ Bank Import — demo (YouTube)]
* Module page : [https://www.ksidol.io/en/modules/detail?module=main_module_bankimport Bank Import on KSIDol]
* Module page: [https://www.ksidol.io/en/modules/detail?module=main_module_bankimport Bank Import on KSIDol]
* Online demo : [https://www.ksidol.io/t/demo-erp/custom/bankimport/index.php?mainmenu=bank&leftmenu=bankimport Bank Import — open the demo]
* Online demo: [https://www.ksidol.io/t/demo-erp/custom/bankimport/index.php?mainmenu=bank&leftmenu=bankimport Bank Import — open the demo]
* Module user guide : [https://www.ksidol.io/notices/ksidol_notice_en/bankimport.html Bank Import — read the guide]
* Module user guide: [https://www.ksidol.io/notices/ksidol_notice_en/bankimport.html Bank Import — read the guide]
* K.S.I publisher page on DoliStore: [https://www.dolistore.com/index.php?controller=search&orderby=position&orderway=desc&website=marketplace&search_query=k.s.i&submit_search= K.S.I modules on DoliStore]
* K.S.I publisher page on DoliStore: [https://www.dolistore.com/index.php?controller=search&orderby=position&orderway=desc&website=marketplace&search_query=k.s.i&submit_search= K.S.I modules on DoliStore]


Line 103: Line 107:


* import a statement from any bank thanks to multi-format recognition;
* import a statement from any bank thanks to multi-format recognition;
* automatically match each entry against Dolibarr's open documents, with a score and reasons;
* automatically match each movement against Dolibarr's open documents, with a score and reasons;
* validate the correct match, choose the mode and date, then create the native Dolibarr payment;
* settle operations with no invoice with a miscellaneous payment carrying the right accounting account;
* never touch an existing entry: the module proposes, the human approves.
* catch up entries left without a document, without ever touching what is already in accounting;
* keep an accurate Dolibarr bank account: one entry per movement, created at pointing time.


== Who is it for? ==
== Who is it for? ==


* '''Micro-businesses, SMEs and associations''' still entering their receipts by hand.
* '''Micro-businesses, SMEs and associations''' still entering their receipts and direct debits by hand.
* '''Accountants and managers''' who want to reconcile a statement in a few minutes, without double entry.
* '''Accountants and managers''' who want to point a statement in a few minutes, without double entry or a suspense account.
* '''Dolibarr integrators''' looking for a reliable bank reconciliation that respects immutability.
* '''Dolibarr integrators''' looking for a reliable bank reconciliation that respects accounting immutability.


== Main features ==
== Main features ==


* '''Multi-format import''': CSV (delimiter and debit/credit columns detected, tolerant encoding), OFX (STMTTRN blocks), QIF, CAMT.053 XML (Ntry entries), MT940 (:61:/:86:). Format recognized automatically or chosen manually.
=== Statement import ===
* '''Duplicate protection''': fingerprint computed from the account, source, reference, dates, amount, normalized label and counterparty; lines already imported are never re-injected.
* '''Five formats''': CSV (delimiter and debit/credit columns detected), OFX, QIF, CAMT.053 XML, MT940; format recognized automatically or chosen manually.
* '''Scored reconciliation''': comparison of amount (exact, close, fee/rounding gap, partial payment), invoice reference (and its variants), third party (name, words, code), bank direction and date. Each candidate displays its '''score''' and its '''reasons'''.
* '''Encodings''': UTF-8, Windows-1252, ISO-8859-1/15 and UTF-16 converted; accented labels preserved.
* '''Match sources''': customer/supplier invoices and down payments, credit notes (link only), unpaid salaries and unpaid social/tax charges (can be enabled), and existing native bank entries (link only, without double payment).
* '''Balance rows''' ("Ancien solde", "Nouveau solde", "Closing balance"…) skipped and reported.
* '''Validation and payment''': approval of a line (or partial allocation), choice of mode and date, then creation of the '''native Dolibarr payment''' (invoice, salary or charge payment) and of the bank entry; reconciliation lock.
* '''Duplicate protection''': re-importing a statement creates nothing again; the same movement imported in two formats is detected and filed away in one click.
* '''Payment type detection''': cheque, card, transfer, direct debit, domiciled bill, cash.
* '''Import batches''': details, report, deletion of a batch or a line; pointed or settled lines are protected.
* '''Import batch management''': deletion of a batch or a line, reset of test sets; linked/paid/locked lines are protected; a Dolibarr payment already created is never deleted.
 
* '''Dashboard''': KPIs (transactions, candidates, approved, payments executed) and flow filter (to process, approved to pay, rejected, completed).
=== Reconciliation ===
* '''Sources''': customer and supplier invoices and down payments, credit notes, salaries, social and tax charges, approved expense reports (according to the user's permissions), received donations, bank entries already recorded.
* '''Explained score''': amount (exact, close, partial), invoice reference, third party, bank direction, date.
* '''Search as soon as the import runs''', then in successive passes on large volumes, with what remains to examine displayed.
* '''Third-party warning''' and detection of '''invoices already paid outside the module'''.
 
=== Payment and bank entry ===
* '''Human validation''': choice of the match, the mode and the date (operation date suggested), then creation of the '''native Dolibarr payment'''.
* '''Entry created at pointing time''': the import does not create any entry; the payment creates its own, dated as on the statement. A movement already keyed in by hand is reused without duplicate.
* '''One transfer, several invoices''': allocation across several documents, search by company name, number or amount.
* '''Native reconciliation''' set automatically on the month's statement when the line is fully settled.
* '''Undo''': unlocking, cancelling an allocation; a payment deleted in Dolibarr makes the line pointable again.
 
=== Miscellaneous payments and catch-up ===
* '''Operations with no invoice''': creation of a Dolibarr miscellaneous payment with its accounting account, at the statement dates.
* '''Proposed account''' based on the miscellaneous payments already recorded; marked "sure" only if the history is unambiguous; the suspense account is never proposed.
* '''Accounts validated through CSV''': export of the list, "Validated account" column filled in by the accountant, reload: only the validated lines are ticked.
* '''Catch-up''': entries from earlier imports left without a document are replaced by the miscellaneous payment (same amount, balance unchanged); never a reconciled entry, an entry transferred to accounting or an entry keyed in by hand.
* '''Export for the accountant''' of the entries without a document already transferred to accounting, to be reclassified.
 
=== Bulk processing (with preview) ===
* '''Proposed documents''': settlement in one go of the lines for which a single document is proposed with a high score, on an entry that is still free.
* '''Import duplicates''': deletion by Dolibarr of the duplicate entries left by a statement imported in two formats, then archiving.
* '''Lines already recorded''': archiving of historical statement lines whose movement is already in Dolibarr or whose period is already in accounting.
* Each line is checked again at the moment it is processed; no entry is created in a period already transferred to accounting.
 
=== Integration and lists ===
* Dolibarr '''Bank''' pages: "Import a statement" button, filterable "Pointing" column, "Point" action.
* Column filters, sorting, pagination up to 5000 lines, filter by action to do, archiving and bulk actions.


== Menus ==
== Menus ==
Line 128: Line 161:
Under the main '''Bank''' menu, the module adds:
Under the main '''Bank''' menu, the module adds:


* '''Dashboard''' — reconciliation indicators
* '''Dashboard''' — indicators and latest imports
* '''Bank import''' — upload of a statement file
* '''Bank import''' — upload of a statement file
* '''Bank matches''' — entries, scored candidates and validation
* '''Bank matches''' — movements, scored candidates, pointing and validation
* '''Import batches''' — detail, deletion, reset
* '''Miscellaneous payments and catch-up''' — operations with no invoice and bulk processing (also reachable through a button from the bank matches)
* '''Bank connectors''' — connector profiles (administrator)
* '''Bank connectors''' — connector profiles (administrator)
* '''Configuration''' — module settings
* '''Configuration''' — module settings
Line 139: Line 172:
From Home → Setup → Modules → Bank Import:
From Home → Setup → Modules → Bank Import:


* default bank account (<code>BANKIMPORT_DEFAULT_BANK_ACCOUNT_ID</code>);
* default bank account and payment mode;
* default payment mode (<code>BANKIMPORT_DEFAULT_PAYMENT_MODE_ID</code>);
* amount tolerance (<code>BANKIMPORT_AMOUNT_TOLERANCE</code>, default 0.02);
* amount tolerance (<code>BANKIMPORT_AMOUNT_TOLERANCE</code>, default 0.02);
* "strong candidate" score (<code>BANKIMPORT_AUTO_APPROVE_SCORE</code>, default 90);
* "strong candidate" score (<code>BANKIMPORT_AUTO_APPROVE_SCORE</code>, default 90), which is also the threshold for bulk payments;
* minimum match score (<code>BANKIMPORT_MATCH_MIN_SCORE</code>, default 40);
* minimum match score (<code>BANKIMPORT_MATCH_MIN_SCORE</code>, default 40);
* max. number of invoices analyzed per transaction (<code>BANKIMPORT_MATCH_SCAN_LIMIT</code>, default 1000);
* analysis limits and number of candidates per movement;
* max. candidates per transaction (<code>BANKIMPORT_MATCH_TOP_PER_TRANSACTION</code>, default 10);
* maximum size of an imported file (default 20 MB);
* maximum size of an imported file (<code>BANKIMPORT_IMPORT_MAX_FILESIZE_MB</code>, default 20 MB);
* search in salaries, charges, expense reports and donations (each can be enabled separately);
* also search in salaries / social and tax charges (enabled by default).
* integration into the native Bank pages.
 
The suspense account excluded from proposals is the one defined in Dolibarr's accounting setup.


== User permissions ==
== User permissions ==
Line 154: Line 188:


* '''Read''' Bank Import — dashboard and lists (read)
* '''Read''' Bank Import — dashboard and lists (read)
* '''Import''' bank statements — upload and read files (import)
* '''Import''' bank statements (import)
* '''Generate and validate''' matches — computation, approval/rejection, linking (match)
* '''Generate and validate''' matches (match)
* '''Create''' Dolibarr payments — native payments after validation (pay)
* '''Create''' payments and miscellaneous payments, catch-up and bulk processing (execute)
* '''Administer''' Bank Import — configuration, connectors, batches (admin)
* '''Administer''' Bank Import — configuration, connectors (admin)


== Typical flow ==
== Typical flow ==


# Import a statement file (Bank import).
# Import a statement file (Bank import): matches are searched for immediately.
# Generate the matches (Bank matches).
# In '''Bank matches''', check the score and reasons, choose the mode and date, validate: the native payment and its entry are created, and the line is reconciled.
# Check the score and reasons of each candidate.
# In '''Miscellaneous payments and catch-up''', settle the operations with no invoice: export the list, have the accounts validated, reload it, create the miscellaneous payments.
# Approve the correct match, choose the mode and receipt date.
# Use the bulk tabs to settle the sure documents, delete import duplicates and archive the lines already recorded.
# The '''native Dolibarr payment''' is created, the bank entry filled and the reconciliation locked.


== Technical note ==
== Technical note ==


* Tables: <code>llx_bankimport_transaction</code>, <code>llx_bankimport_import</code>, <code>llx_bankimport_match</code>, <code>llx_bankimport_connector</code>.
* Tables: <code>llx_bankimport_transaction</code>, <code>llx_bankimport_import</code>, <code>llx_bankimport_match</code>, <code>llx_bankimport_connector</code>.
* Dolibarr standards respected: permissions, CSRF tokens, <code>GETPOST</code>, escaping.
* Native objects used: payments of invoices, salaries, charges, expense reports and donations, miscellaneous payments, bank entries and bank reconciliation.
* Connector secrets are '''referenced''' (name of a secret managed outside the webroot), never stored in clear text.
* Dolibarr standards respected: permissions, CSRF tokens, <code>GETPOST</code>, escaping, table prefix.
* '''Immutability''': the module creates native payments after human validation; it neither modifies nor deletes an existing accounting entry, and never deletes a payment already created.
* '''Immutability''': no entry already transferred to accounting is modified or deleted; no existing payment is deleted; no entry is created in a period already transferred.
* '''No modification of the Dolibarr core.'''
* '''No modification of the Dolibarr core.'''


Line 185: Line 218:


# Replace the <code>htdocs/custom/bankimport/</code> folder with the new version.
# Replace the <code>htdocs/custom/bankimport/</code> folder with the new version.
# Reload an administration page: missing tables and constants are created automatically, in an idempotent way.
# Reload a page of the module: missing columns and constants are created automatically.
# To see the new "Miscellaneous payments and catch-up" menu entry, disable then re-enable the module; the screen remains reachable through the button in the bank matches.
# The update does not delete any existing data.
# The update does not delete any existing data.


== Troubleshooting ==
== Troubleshooting ==


* '''No line detected on CSV import''': check the separator and the presence of a header (date, label, amount, currency, third party columns).
* '''No line detected on CSV import''': check the separator and the presence of a header.
* '''File rejected''': the configured maximum size is exceeded (<code>BANKIMPORT_IMPORT_MAX_FILESIZE_MB</code>).
* '''No candidate''': lower the minimum score or check that the documents are actually open.
* '''No candidate''': lower the minimum score, increase the analysis limit, or check that the invoices are actually open.
* '''No account proposed''' for an operation with no invoice: the miscellaneous payment history contains no comparable operation; enter the account, it will be used for the next proposals.
* '''No payment mode''': enable at least one payment mode in Dolibarr.
* '''"Movement already in the account"''': an entry of the same amount already exists within a few days; link the line to that entry instead of creating a second one.
* '''"Period already in accounting"''': the line is earlier than the last entry transferred; check with your accountant.


== See also ==
== See also ==


* '''KSIDol Signature Terminal''': signature of all native Dolibarr records, compatible with all KSIDol modules.
* '''KSIDol Signature Terminal''': signature of native Dolibarr records, compatible with all KSIDol modules.
* Compatibility: Dolibarr 18.0 to 24.x — PHP 8.0+ — GPLv3 license — Publisher: KSIDol.
* Compatibility: Dolibarr 18.0 to 24.x — PHP 8.0+ — GPLv3 license — Publisher: KSIDol.


== Summary ==
== Summary ==


Bank Import imports your bank statements (CSV, OFX, QIF, CAMT.053, MT940), matches each entry against your open invoices and documents with a score and reasons, then creates the native Dolibarr payments after validation — without ever modifying an existing entry or breaking immutability.
Bank Import imports your bank statements (CSV, OFX, QIF, CAMT.053, MT940), matches each movement with its document using a score and reasons, settles operations with no invoice with a miscellaneous payment carrying the right accounting account, catches up old entries left without a document and creates native Dolibarr payments after validation — one entry per movement, without ever touching what is already in accounting.
417

edits

Navigation menu