If you’re seeing an error like:
“The total amount in the sales order from ‘Shopify’ differs from the calculated amount in Odoo…”
this usually means there’s a small mismatch in how Odoo and your e-commerce platform (Shopify, Magento, PrestaShop, etc.) calculate totals – typically caused by rounding rules, tax discrepancies, or decimal precision differences.
In this article, you’ll learn:
-
Why these mismatches occur
-
How our connector handles them using the Order Total Correction feature
-
What to do if you prefer not to modify imported orders
-
What else could cause the issue
Why Do Order Total Differences Happen?
There are several reasons for mismatches between your e-commerce platform’s order total and the one recalculated in Odoo.
1. Rounding Differences in Tax Calculations
Different platforms round numbers at different stages – per line, per tax, or at the order total level. Even tiny differences can add up across multiple lines.
Example
|
E-Commerce System (rounding per line) |
Odoo (rounding total tax) |
Results |
|
|---|---|---|---|
|
3 items at $9.99 with 10% tax |
$0.999 tax/line → $1 $1.00 tax/line × 3 → $3 |
$0.999 tax/line (no rounding) $2.997 → $3.00 |
No Difference |
|
7 items at $8.49 with 21% tax |
$1.7829 tax/line → $1.78 $1.78 tax/line × 7 → $12.46 |
$1.7829 tax/line (no rounding) $12.483 → rounded to $12.48 |
Difference: $0.02 |
2. Decimal Precision Mismatch
Some e-commerce platforms, like PrestaShop, use up to 6 decimal places for internal price calculations. In contrast, Odoo typically uses 2 decimal places for product pricing and tax computations. This discrepancy can cause rounding differences that accumulate at the order total level.
Example
|
PrestaShop (6 decimals) |
Odoo (2 decimals) |
Results |
|
|---|---|---|---|
|
Product Price |
$12.345678 |
$12.35 |
Price difference: $0.0043 |
|
Subtotal (5 items) |
$12.345678 × 5 = $61.72839 |
$12.35 × 5 = $61.75 |
Subtotal difference: $0.02161 |
|
Tax (e.g. 21%) |
$12.345678 × 5 × 21% = $12.9629619 |
$12.35 × 5 × 21% = $12.9675 → rounded to $12.97 |
Tax difference: ≈ $0.0070 |
|
Total with Tax |
$61.72839 + $12.96296 = $74.69135 ≈ $74.690000 |
$61.75 + $12.97 = $74.72 |
Total difference: ≈ $0.03 |
Key takeaway: Even when the difference per line is very small (fractions of a cent), over multiple lines or quantities, the mismatch in decimal precision can lead to final total differences that impact accounting or validation during import.
Solution: match decimal precision between systems
Set the decimal precision in your e-commerce platform to match Odoo’s setting (usually 2 decimal places). Doing this ensures that:
-
Prices and taxes are calculated similarly in both systems
-
Order totals match exactly, or with minimal differences
3. Customizations
Changes to pricing, discount, or tax logic – whether in Odoo or your e-commerce system – may also result in mismatched totals.
Examples:
-
Custom tax rounding logic
-
Promotional rules
-
Post-processing hooks in cart or checkout
4. Connector Misconfiguration
Configuration mismatches like the following can trigger this error:
-
Tax “price included” vs “excluded” mismatch
-
Incorrect fiscal positions
-
“Behavior on Empty Taxes” configuration
How the Connector Handles It: Order Total Correction Feature
To avoid stopping imports due to minor differences, our connectors include a built-in Order Total Correction mechanism:
How It Works
If a mismatch is detected:
-
The connector adds a price difference line to the Sales Order in Odoo
-
This line uses a configurable “price difference” product
-
The amount equals the difference (positive or negative)
You can even assign different products for positive and negative corrections for better accounting control.
What If I Don’t Want to Auto-Correct Orders?
You can disable this behavior, it is enough to simply uncheck: Order Total Difference Correction (see screenshot above).
In this case:
-
No correction line will be added
-
The Sales Order will be created with a warning message
-
You’ll need to manually review any discrepancies
Need Help?
If the totals still don’t match and you suspect a different issue contact our support team: support.ventor.tech. We’ll help investigate and find the best solution.