Advanced Matching in FlexiBee
TL;DR β¨
The author presents one of the genuinely useful pieces of work created by Vitex Software for ABRA FlexiBee.
The problem is simple: payment matching in standard FlexiBee tends to be too weak for messy real-world accounting.
π― The Problem¶
The author presents one of the genuinely useful pieces of work created by Vitex Software for ABRA FlexiBee.
The problem is simple: payment matching in standard FlexiBee tends to be too weak for messy real-world accounting.
The built-in options are limited:
Very often you end up in one of two states:
- either the built-in matching simply does not work well enough
- or it works so vaguely that you still finish the job manually
That is where php-flexibee-matcher becomes interesting.
Project: https://github.com/VitexSoftware/php-flexibee-matcher
π§ What the Matcher Does¶
The package creates helper labels such as NEIDENTIFIKOVANO and CHYBIFAKTURA and provides two main scripts:
[ParujFakturyNew2Old.php](src/ParujFakturyNew2Old.php) - matches invoices day by day, going backwards for up to 3 months
[ParujFaktury.php](src/ParujFaktury.php) - tries to match all unmatched documents
The algorithm roughly works like this:
- bank statements are pulled into FlexiBee
- all unmatched incoming bank items are processed
- payments are handled one by one
- the program first tries to find a matching unpaid, non-cancelled document by variable symbol
- then it falls back to specific symbol logic
- duplicates are normalized against the bank movement number
- items without a valid counterpart are labeled accordingly
The handling then differs by document type:
FAKTURA - payment is matched with the invoice and the paid invoice is emailed to the client
ZALOHA - advance invoice is matched and the corresponding tax document is created
DOBR - credit note deduction is processed
Other - a warning is logged with a link to the FlexiBee web UI
π§ Debian and Ubuntu Installation¶
The original project offered .deb packages via a repository:
wget -O - http://v.s.cz/info@vitexsoftware.cz.gpg.key|sudo apt-key add -
echo deb http://v.s.cz/ stable main > /etc/apt/sources.list.d/ease.list
apt update
apt install php-flexibee-matcher
After installation, two commands should be available:
php-flexibee-matcher- matches everything that can be matchedphp-flexibee-matcher-new2old- processes day by day from newer payments towards older ones
βοΈ Configuration¶
The key config files were:
/etc/flexibee/client.json- shared connection settings to the FlexiBee server/etc/flexibee/matcher.json- matcher behavior
Example settings:
"EASE_APPNAME": "InvoiceMatcher",
"EASE_MAILTO": "info@yourdomain.net",
"EASE_LOGGER": "syslog|mail|console",
"PULL_BANK": "false",
"DAYS_BACK": "7"
π§ͺ What the Author Wanted from It¶
For the author's testing, the main expectation was simple: let documents be matched according to more useful criteria than the default built-in path.
Typical matching goals:
- Match by variable symbol.
- Match by variable symbol + specific symbol.
- Match by specific symbol only.
- Match inside a chosen date tolerance, for example
+/- 20 days.
That is the practical value here. Not "automation for the sake of automation", but less manual accounting pain.
π§° Local Test Lab Recipe¶
For testing at home, the author used this rough process:
- Download the source ZIP from GitHub: https://github.com/VitexSoftware/php-flexibee-matcher/archive/master.zip
- Install Vagrant: https://www.vagrantup.com/downloads.html
- Install VirtualBox: https://www.virtualbox.org/wiki/Downloads
- Unzip the source, enter the project directory, and run:
vagrant up
- Wait for the Debian VM to build, then connect with:
vagrant ssh
- Edit
client.jsonin/vagrantso it contains your FlexiBee URL, login, password, and company name.
Example:
{
"FLEXIBEE_URL": "https://MyCompany.flexibee.eu:5434",
"FLEXIBEE_LOGIN": "flexiuser",
"FLEXIBEE_PASSWORD": "secretPassword",
"FLEXIBEE_COMPANY": "demo"
}
- Edit
matcher.json, for example:
{
"EASE_APPNAME": "InvoiceMatcher",
"EASE_MAILTO": "yourMail@connectica.cz",
"EASE_LOGGER": "mail|console",
"PULL_BANK": "false",
"DAYS_BACK": "14"
}
- Start the matcher:
/usr/bin/php-flexibee-matcher
Then watch what happens and start tuning.
π§ Reality Check¶
Once you do all this, the real phase begins: adjustment and debugging.
Every business has its own document habits, bank formats, payment symbols, and exceptions. A matcher can save a lot of time, but only after you teach it enough of your operational reality.
And yes, if you get stuck badly enough, contacting VΓΕ₯a was part of the original survival strategy.
If you already have this working and want to continue, the next level mentioned in the original article was the reminder tool: https://github.com/VitexSoftware/php-flexibee-reminder
