Transport Accounting – Route, Country VAT & Invoice Calculator
Installation, configuration, daily use, administration, updates and technical reference
Joomla 6 extension suite · Module 2.0.0 · Component 2.0.0 · Update-key plugin 2.0.0
Accounting responsibility
This package assists with distance allocation, VAT calculations and exports. Verify tax rates, registrations, invoice wording, account mappings and fiscal-confirmation duties with your accountant or tax adviser before production use. A payment confirmation does not replace any legally required fiscal confirmation.
1. Overview
Simplify accounting for your transport business. Transport Accounting is a Joomla 6 package for taxi, cargo and passenger-transfer invoicing. It calculates Google Maps driving routes, estimates kilometres by country, allocates the selling price and VAT, stores customers and documents, applies country-specific tax rules, generates invoice descriptions and Unicode PDFs, and exports accounting data in XML for supported accounting software.
Site module
The working calculator, customer browser, invoice/pro forma workflow, PDF generator and Minimax exporter.
Admin component
Shared options, filtered document management, bulk deletion, payment recording and payment-confirmation PDFs.
Installer plugin
Adds the shared subscriber key only to approved package downloads from the configured update server.
Slovenia, Italy, Croatia, Austria, Germany and Hungary are selectable as the base country. Boundary data is bundled for those countries. Country names, VAT registration numbers, VAT rates, PDF notes and Minimax account mappings remain editable. Additional countries require suitable border data and configuration.
2. Requirements
| Item | Requirement |
|---|---|
| CMS | Joomla 6 |
| Server | A PHP version supported by Joomla 6; MySQL or MariaDB supported by Joomla 6 |
| Browser | A current JavaScript-enabled browser; network access to Google Maps services |
| Google Cloud | A billing-enabled project, restricted API key, Maps JavaScript API, Routes API and Places API. Enable Geocoding API only if the reverse-geocoding split is used. |
| Joomla user access | A restricted frontend menu/module access level is strongly recommended. Administrator users need component ACL rights appropriate to their work. |
3. Installation and upgrade
New installation
- Back up the Joomla files and database.
- In Joomla Administrator open System → Install → Extensions.
- Upload
pkg_transport_accounting_v2.0.0.zip. Use the combined package ZIP, not an enclosed individual extension ZIP. - Open Components → Transport Accounting → Options and configure the shared settings.
- Open Content → Site Modules, create or open Transport Accounting, assign a position and restricted access level, then publish it on the intended menu item.
- If subscribed to updates, enable and configure the installer update-key plugin.
- Test a domestic and a cross-border route, a PDF, a pro forma conversion, and a Minimax import in a non-production accounting environment.
Migration from the former extension
Future Transport Accounting releases can be installed through Joomla Update or over the existing Transport Accounting package. Do not update the module, component, or plugin separately: their versions are released as one compatibility set.
Post-upgrade checks
- Clear Joomla and browser caches if the embedded calculator appears stale.
- Confirm the module and global configuration sources still point to the intended values.
- Open an older saved invoice and verify route, stop, country, adjustment and customer restoration.
- Verify the package version under System → Manage → Extensions.
4. Quick start
Configure
Add the Google key, legal company identity, PDF branding, base country, VAT data and Minimax accounts in component Options.
Calculate
Enter pickup, drop-off, optional stops/return, selling price and VAT rate; calculate and review the editable country split.
Identify the customer
Select an existing customer or enter a new customer, then choose the issue date, service date, and due date. Save reusable customer details.
Issue and export
Review both invoice-text languages, then create a pro forma or invoice PDF. Export an issued invoice to Minimax after validation.
5. Configuration reference
Global settings live at Components → Transport Accounting → Options. Each module independently chooses Global or Module values for Google Maps, company/PDF, Minimax and countries. This permits shared accounting settings while allowing language-specific modules to override PDF text or other selected groups.
Google Maps API key: used by the embedded calculator for address completion, route calculation and map display. Restrict the key in Google Cloud to the production HTTPS referrer(s) and only required APIs. Never place a real key in source control.
The key can come from global component Options or the module instance. A missing key prevents map and route loading.
| Field | Use |
|---|---|
| Company name, address, postcode/city | Supplier identity printed on generated documents. |
| Tax and registration numbers | Legal/tax identifiers printed in the PDF. |
| IBAN, email, phone | Payment and contact information. |
| Issue city | Place of issue. |
| PDF logo | Joomla Media selection; accepts common Joomla-relative paths and resolved URLs. |
| PDF footer text | Centered footer; useful for legal notices or translated module-specific text. |
| Signature image | Signature/stamp image, defaulting to bundled podpis-transparent.png. |
Replace every example value before production. PDF generation uses bundled jsPDF and Noto Sans fonts for Slovenian and other Unicode characters.
- Base country: SI, IT, HR, AT, DE or HU.
- Default foreign passenger VAT rate: fallback for a foreign country without a row-specific rate; an explicit zero is supported.
- Country rows: two-letter ISO code, display name, VAT registration number, VAT rate and PDF note.
- PDF note placeholders:
{countryName},{vatNumber}and{vatRate}.
Keep rows aligned with actual foreign VAT registrations. A detected unknown country falls back to an editable Other/custom row; review it before issuing a document.
- Customer receivable account: receivable/control account for the invoice total.
- Base-country standard-rate VAT account: VAT liability used for standard-rated additional costs.
- Default foreign revenue account: fallback foreign passenger-transport revenue account.
- Country account rows: two-letter country code, revenue account and VAT-liability account. Configure every country that can appear on an export.
The administrator component exposes Joomla ACL actions core.manage, core.edit, core.delete and core.admin. Grant only what each staff group needs. Edit controls payment recording; Delete controls document deletion; Admin controls component configuration/permissions.
6. Calculator workflow
Route input
- Enter pickup and drop-off using Google Places suggestions.
- Add up to 25 additional places and arrange them in travel order.
- Select Return trip to pickup when appropriate.
- Enter either the transport gross price or net price. The paired value is recalculated.
- Add costs such as parking if needed. Cost rows accept a gross amount and a VAT preset (22% S, 9.5% Z or 0% N). By default they are added on top of the entered gross price. Select Included in entered gross price when the costs are already part of that price.
- Choose a country-split method and sampling accuracy, then select Calculate route and VAT split.
Country split methods
| Method | Behavior | Use when |
|---|---|---|
| Fast boundary split | Samples route geometry against bundled country polygons. It does not consume reverse-geocoding requests. | Normal production use. The default 2 km sample balances detail and speed. |
| Google reverse geocoding | Samples points and asks Google which country contains them. Requires Geocoding API. | Cross-checking complex border routes when the added API use is acceptable. |
How amounts are allocated
The route portion of the selling price is allocated among country rows in proportion to kilometres. Each row’s configured VAT rate determines its net base and VAT. Additional-cost rows are calculated by their own VAT preset. The results show total kilometres, base/foreign kilometres, net price, taxable bases, VAT by country, additional costs, total VAT and final invoice amount.
After calculation you may edit a country’s kilometres, VAT rate, revenue account and PDF note, then select Recalculate country VAT split. The calculator adjusts the remaining country distance to match the route total.
7. Customers, drafts and documents
Customers
Customer records store the name, optional unique customer code, address, postcode, city, two-letter country code, VAT ID and reusable message/configuration details. The name is required. The code can be empty for local storage, but Minimax export requires a current valid code.
- The customer code is unique when non-empty and can be generated from the VAT ID or edited.
- For Minimax, use no more than 10 characters from
A–Z,a–z, digits,#, period, underscore and hyphen. - Use Customers to search and paginate saved customers (25/50/100 per page).
- Deleting a customer does not delete historical documents. Document payloads preserve their issued customer snapshot.
Draft invoice lines
Add to draft Invoice saves the current calculated service as a draft line for a customer/project. Draft lines can combine several transfers into a later invoice. Review service dates, labels and totals before final generation.
Invoice
- Calculate and review the route and amounts.
- Select or save the customer; set the issue, service, and due dates.
- Generate the next number or supply an allowed unique number.
- Review/edit English and Slovenian invoice text.
- Select Generate Invoice PDF / Save. Saving and PDF generation are one workflow.
Generated invoice numbers follow TA-YY-NNNN. Allocation retries protect automatic numbering from simultaneous unique-number conflicts.
Pro forma invoice
Use Generate Pro forma invoice / Save to create a document numbered PR-TA-YY-NNNN. A pro forma is stored as open, omits the signature/stamp and cannot be exported to Minimax. Use Create Invoice to convert it once into a separately numbered invoice. The source and converted document remain linked.
Load and update
The invoice browser filters by number, document type and date. Loading a saved document restores the route, stops, return-trip flag, country rows, kilometres, VAT, Minimax accounts, PDF notes, additional costs, dates, customer and text. It can generate PDF/XML without recalculating. For a correction, load an invoice, change and recalculate it, then use Update Invoice; the original invoice number, creation time, conversion links and payments are preserved. Historical records without an explicit issue date fall back to their original creation date, and records created before the additional-cost mode was introduced retain the former included-in-gross calculation.
8. Payment tracking
Payments are recorded in the administrator component against issued invoices only. Supported methods are bank transfer, cash, card and other.
- Open Components → Transport Accounting.
- Find an invoice with a remaining amount and select Add payment.
- Enter a valid date, positive amount, method, optional reference and note.
- Save. The transaction locks the invoice while validating the remaining amount and rejects overpayment.
| Status | Rule |
|---|---|
| Unpaid | No recorded payment. |
| Partially paid | Recorded total is positive and below the invoice total. |
| Paid | Recorded total reaches the invoice total (within rounding tolerance). |
A Unicode payment-confirmation PDF includes supplier/customer information, invoice reference, payment history, paid and remaining totals, footer, signature and a prominent PAID/PLAČANO label when settled. It does not consume an invoice number.
9. Minimax XML export
Only an invoice can be exported. The exporter writes customer master data before journal entries, uses passenger-transport VAT accounting type PP, includes the invoice reference on the receivable line, and separates revenue from VAT liabilities.
Pre-export checklist
- ✓The current saved customer has a Minimax-compatible code of 1–10 supported characters. The current customer record overrides stale values in an older invoice payload.
- ✓Customer name/address fields fit Minimax limits and the country is a two-letter code.
- ✓The receivable account and base-country VAT account are configured.
- ✓Every used country has a VAT rate, revenue account and—when VAT applies—VAT-liability account.
- ✓Additional costs use supported S (22%), Z (9.5%) or N (0%) treatment.
- ✓Debit and credit totals balance and the selected base-country/VAT treatment matches the accountant’s instructions.
Foreign net bases remain outside Slovenian VAT when Slovenia is the base country; foreign VAT posts to the configured foreign liability account. The exporter blocks missing rates/accounts, unsupported customer codes and incompatible VAT mixtures instead of producing a knowingly incomplete file.
10. Administrator document management
The component list is server-side paginated and supports search, document-type/status filters, sortable columns and page sizes of 25, 50 or 100. It displays number, status, customer, total, payment status, date and actions.
Deletion rules
- Deletion is administrator-only, POST-only, CSRF protected and requires
core.delete. - A converted pro forma cannot be deleted alone while its linked invoice remains. Select both when deletion is genuinely required.
- Deleting only a converted invoice reopens its source pro forma and clears the conversion link.
- Deleting an invoice also deletes its payment records in the same management transaction.
- Deletion is permanent; take a backup and follow legal document-retention obligations.
Payment recording requires core.edit. Component access requires core.manage. Configuration and permission changes should be reserved for users with core.admin.
11. Subscriber updates
- Install the combined package so the installer plugin is present.
- Open System → Manage → Plugins.
- Find Installer – Transport Accounting update key and enable it.
- Open Components → Transport Accounting → Options, enter the shared subscriber update key, and save.
- Use Joomla Update normally. The plugin adds the key only to an approved Transport Accounting package download URL.
The update feed advertises the combined package and SHA-256 checksum. The server endpoint accepts only approved package filename patterns, compares SHA-256 key hashes with constant-time matching, confines files to the downloads directory and returns ZIP downloads with nosniff.
DOWNLOAD_KEY_HASHES (comma-separated) or an untracked download-keys.local.php. Generate a hash with php -r "echo hash('sha256', 'subscriber-key-here') . PHP_EOL;". Never store plaintext subscriber keys in the repository.12. Security, privacy and backup
Restrict frontend access
Frontend AJAX writes validate Joomla session tokens, but the calculator is a staff application. Apply a Joomla Registered/Special/custom access level to both its menu item and module. Do not publish it to Guest/Public users.
Protect personal data
Customer identities, addresses, tax IDs, routes, invoice payloads and payments are stored in the Joomla database. Apply privacy, retention, access-control and breach procedures required in your jurisdiction.
- Use HTTPS for Joomla and Google Maps referrer restrictions.
- Grant administrator ACL rights by least privilege and review them periodically.
- Do not commit Google API keys, subscriber keys or
download-keys.local.php. - Patch Joomla, PHP, the database and this package promptly; test updates on staging.
- Back up the entire Joomla database and files before upgrades, bulk deletion or uninstall.
- Test restore procedures. The four
#__transport_accounting_*tables are the core business data but a full Joomla backup is safer because configuration and extension state live elsewhere. - Keep PDFs/XML files in controlled storage; browser downloads are outside Joomla’s access control after generation.
13. Troubleshooting
| Symptom | Checks and resolution |
|---|---|
| Map does not load | Confirm the selected global/module API key, billing, HTTPS referrer, Maps JavaScript API and Places API. Check the browser console for Google’s specific key error. |
| Route calculation fails | Enable Routes API, verify pickup/drop-off suggestions, reduce stops to 25 or fewer, and confirm the key permits the current hostname. |
| Reverse-geocoding split fails | Enable Geocoding API or return to the fast boundary method. Manually correct country rows and recalculate. |
| Country kilometres look wrong | Inspect the map; choose a smaller sampling interval; try the other method; edit country kilometres. Pay special attention to border-following routes. |
| Database request failed | Confirm the page is rendered by the Joomla module (not opening calculator.html directly), the session has not expired, and Joomla com_ajax is reachable. Re-login and reload. |
| Customer will not save | A name is required. Non-empty codes must be unique and ≤64 characters. Check field limits and use exactly two letters for the country code. |
| Minimax export is blocked | Check the current customer code (≤10 supported characters), receivable/VAT accounts, every used country rate/account, supported additional-cost VAT and invoice—not pro forma—type. |
| PDF has missing image/font | Check the logo/signature path and same-origin/CORS access. Clear caches. Confirm bundled Noto Sans files and jsPDF assets were installed. |
| Cannot delete converted pro forma | Delete the linked invoice at the same time, or retain both. Deleting the invoice alone reopens the pro forma. |
| Update download returns 403 | Enable the installer plugin, save a valid subscriber key, verify the update URL/filename and confirm the key hash is configured on the download server. |
| Old interface after upgrade | Clear Joomla cache, CDN/proxy cache and browser cache. Calculator asset URLs use file modification time for cache busting. |
| All issues / Bugs | Please report all issues on GitHub. |
14. Technical reference
Package layout
| Path | Purpose |
|---|---|
transport-accounting/ |
Joomla site module, calculator, assets, language files, forms and SQL. |
administrator-component-transport-accounting/ |
Administrator component, ACL, shared settings, document/payment management and migration script. |
transport-accounting-update-key-plugin/ |
Installer plugin for authenticated update URLs. |
transport-accounting-package/ |
Combined package manifest and generated enclosed ZIPs. |
updates/ |
Joomla package update feed with version, download URL and SHA-256. |
downloads/ |
Built release artifacts and protected download endpoint copy. |
scripts/build-release.sh |
Repeatable package builder and validator. |
Runtime architecture
The module template embeds media/calculator.html in an iframe, injects translated strings and selected configuration, and supplies a Joomla com_ajax URL plus session token. Google Maps performs route/place work in the browser. PDF and Minimax XML generation also occur in the browser. Customer/document persistence uses JSON POST requests to the module helper.
Frontend AJAX operations
saveCustomer, saveInvoice, updateInvoice, nextInvoiceNumber, addDraftLine, listDraftLines, deleteDraftLine, clearDraftLines, loadCustomer, listCustomers and listInvoices. Public/module invoice deletion is intentionally disabled; use the administrator component.
Database tables
| Table | Contents / important keys |
|---|---|
#__transport_accounting_customers |
Reusable customer data; primary key id; unique nullable customer_code; audit timestamps/user. |
#__transport_accounting_invoices |
Invoices and pro formas, monetary summary and full JSON snapshot; unique document number; unique pro-forma source link; conversion links and status. |
#__transport_accounting_invoice_draft_lines |
Customer/project service lines with dates, labels, totals and payload snapshots. |
#__transport_accounting_invoice_payments |
Invoice payment date, amount, method, reference, note and audit fields. |
Tables use InnoDB, utf8mb4 and utf8mb4_unicode_ci. Joomla’s configured database prefix replaces #__. Version 2.0.0 does not automatically copy records from the former table names; migrate required historical data manually after comparing the live table columns.
Bundled third-party/data assets
- Bootstrap 5 frontend assets.
- jsPDF for client-side PDFs.
- Noto Sans Regular/Bold for Unicode PDF text.
- Country polygon/GeoJSON boundary data for supported fast splitting.
- Google Maps JavaScript services are loaded externally with the configured key.
15. Developer release process
Before building, update package, module, component and plugin versions as appropriate, update enclosed filenames in the package manifest, and add a concise entry to VERSION_SUMMARY.md.
scripts/build-release.sh
The script validates semantic manifest versions and package references; creates module, component and plugin ZIPs; assembles the package ZIP; updates the feed download URL and SHA-256; ensures the advertised package ZIP is trackable; and verifies every archive with unzip -t.
Release verification checklist
- Install the combined ZIP into a clean Joomla 6 test site and test a future Transport Accounting upgrade separately.
- Verify manual migration from the former identifiers and preserve a copy of the original data.
- Run domestic/cross-border route, PDF, pro forma conversion, invoice update, payment and Minimax test cases.
- Confirm the update XML version, filename and SHA-256 match the generated package ZIP.
- Commit the advertised package ZIP with its update-feed change so deployment never advertises a missing file.
- Never commit local download-key configuration or real Google/subscriber keys.
16. Current release notes
- Renamed the complete Joomla suite and all internal identifiers to Transport Accounting.
- Changed new invoice numbers to
TA-YY-NNNNand pro forma numbers toPR-TA-YY-NNNN. - Added a selectable invoice issue date and configurable additional-cost treatment while preserving legacy behavior for migrated records.
- Added JED-recognizable GPL notices to every packaged PHP file reported by the checker.
- Includes package, module, administrator component, and installer update-key plugin version 2.0.0.
For the complete historical changelog, see VERSION_SUMMARY.md in the source repository.
Support, license and document information
- Author
- Darko Fatur / topoweryou.com
- Contact
This email address is being protected from spambots. You need JavaScript enabled to view it. - Configuration service
- https://topoweryou.com/services
- Demo
- builder.topoweryou.com/routecalculationhelp/
- GitHub
- https://github.com/Darko-F/Route-calculation-help-for-accounting
- License
- GNU General Public License version 2 or later. See
LICENSEandTHIRD_PARTY_NOTICES.md. - Documentation basis
- Source tree and manifests for Transport Accounting 2.0.0, reviewed 25 August 2026.