SnelStart Advanced Ledger Mapping for Magento 2
The standard ledger configuration maps ledgers by tax rate category (Hoog, Laag, etc.). Advanced Ledger Mapping lets you override this with rules based on line item type, tax rule, and country — giving you fine-grained control over which ledger account is used per invoice line.
Use cases:
- Different types of sales (e.g., shipping to Germany vs. products to Belgium) need different ledger accounts, even when they share the same tax rate
- Payment fees (iDEAL, Klarna, credit card surcharges) need to be booked to a separate ledger from regular product sales
Location: Stores → Configuration → Accounting → SnelStart → Advanced Settings → Advanced Ledgers
Prerequisites
Before configuring advanced ledger mapping:
- Ledgers synced — Click "Sync Ledger & Costs from SnelStart" in the Ledger Accounts section
- Tax Rate Mapping configured — See the Tax Rate Mapping documentation
- Standard ledgers configured — Advanced mapping overrides standard mapping, but falls back to it when no rule matches
Enable Advanced Ledger Mapping
- Go to Stores → Configuration → Accounting → SnelStart → Advanced Settings
- Set Enable Advanced Ledger Mapping to Yes
- The mapping table appears below
Mapping Table
Each row in the mapping table is a rule. When an invoice or credit memo is synced, the module checks each rule against every line item.
| Column | Description | Required |
|---|---|---|
| Type | Line item type: Product, Shipping, Adjustment Fee, or Payment/Extra Fee | No (empty = all types) |
| Tax Rule | Magento tax rule code (from Tax Rate Mapping) | No (empty = all tax rules) |
| Country | Customer billing country | No (empty = all countries) |
| Ledger | SnelStart ledger account to use | Yes |
Wildcard Behavior
Leave a column empty to match all values for that column. This acts as a wildcard:
- Empty Type + Empty Tax Rule +
DE+ Ledger 8010 → All line types with any tax rule for Germany use ledger 8010 Product+ Empty Tax Rule + Empty Country + Ledger 8020 → All products regardless of tax rule or country use ledger 8020- Empty Type +
BTW-21+ Empty Country + Ledger 8030 → Everything with tax rule BTW-21 uses ledger 8030
Type Values
| Type | Applies to |
|---|---|
| Product | Regular product line items |
| Shipping | Shipping costs |
| Adjustment Fee | Order adjustments and modifications |
| Payment/Extra Fee | Payment surcharges and additional fees |
How Matching Works
The module processes rules top to bottom. The first matching rule wins.
For each invoice/credit memo line item:
- Check if Advanced Ledger Mapping is enabled
- Loop through mapping rules in order
- A rule matches when all non-empty columns match the line item
- First match → use that ledger, stop checking
- No match → fall back to standard tax-rate ledger mapping
Important: Rule order matters. Place more specific rules above general ones.
Examples
Example 1: Separate shipping ledger for German orders
| Type | Tax Rule | Country | Ledger |
|---|---|---|---|
| Shipping | DE | 8085 |
All other lines fall back to standard mapping.
Example 2: Different product ledgers by country
| Type | Tax Rule | Country | Ledger |
|---|---|---|---|
| Product | DE | 8010 | |
| Product | BE | 8011 | |
| Product | FR | 8012 |
Products for DE/BE/FR go to specific ledgers; all other products use the standard product ledger.
Example 3: Payment fees on a separate ledger
| Type | Tax Rule | Country | Ledger |
|---|---|---|---|
| Payment/Extra Fee | 4900 |
All payment surcharges (iDEAL, Klarna, credit card fees, etc.) are booked to ledger 4900 instead of the default product ledger. Products, shipping, and adjustments still use standard mapping.
Example 4: Catch-all with specific overrides
| Type | Tax Rule | Country | Ledger |
|---|---|---|---|
| Product | BTW-21 | DE | 8090 |
| Product | 8000 | ||
| Shipping | 8100 |
- 21% products for Germany → 8090
- All other products → 8000
- All shipping → 8100
- Adjustment/Extra fees → standard mapping (no rule defined)
Applying Changes to Existing Invoices
After updating your advanced ledger mapping rules, existing invoices in the queue are not automatically recalculated. You need to trigger a recalculation so the module re-evaluates which ledger each line item belongs to.
Steps
- Update your mapping rules in Stores → Configuration → Accounting → SnelStart → Advanced Settings
- Save the configuration
- Go to the order in Sales → Orders → select the order
- Open the Accounting tab
- Click the Recalculate button — this re-evaluates all invoice lines against the updated mapping rules
- Sync the invoice to push the corrected data to SnelStart
When to use Recalculate
- You changed advanced ledger mapping rules and need existing invoices to pick up the new configuration
- An invoice was synced with the wrong ledger and you corrected the mapping
- You enabled or disabled advanced ledger mapping after invoices were already queued
Important notes
- The Recalculate button is only available when the invoice has not yet been synced (status is not
SYNCED) - If the invoice was already synced to SnelStart, you need to remove it from SnelStart first (via the grid action), then recalculate and re-sync
- For bulk corrections, use the mass actions in the Accounting → Invoices grid
Relationship to Standard Ledger Configuration
When determining the ledger account for an invoice line item, the module checks the following sources in order of priority:
| Priority | Source | Used when |
|---|---|---|
| 1 (highest) | Advanced Ledger Mapping | Enabled and a rule matches the line item |
| 2 | Product attribute ledger | A ledger account is configured on the product |
| 3 (lowest) | Standard configuration | Product Hoog, Laag, etc. from the SnelStart settings |
The first source that returns a result is used. If advanced mapping finds no match, the system automatically falls back to the next step.
Troubleshooting
Rule not matching as expected
- Verify the tax rule code matches exactly (check Tax Rate Mapping grid)
- Confirm the correct country is selected in the dropdown
- Remember: rules are evaluated top-to-bottom, first match wins
- Check that the rule's Type matches the line item type
Ledger not available in dropdown
- Sync ledgers first: Ledger Accounts section → "Sync Ledger & Costs from SnelStart"
- Ensure you are on the correct store view scope
Changes not reflected in SnelStart
- Advanced mapping only applies to new syncs
- Re-queue existing invoices/credit memos to apply updated rules
- Check debug logs at
var/log/snelstart/debug.log
Need More Help?
Documentation:
- All Help Articles - Complete documentation overview
Support:
- Contact Support - Get help from our team