Debug mode
Describe the bug
When exporting assets from the Assets list page (/hardware) using the built-in "Export" button, numeric values stored in a text-based custom field are inconsistently corrupted: the decimal point (.) is stripped from some rows but not others, with no dot or comma remaining in the affected cells (e.g. 79.99 becomes 7999).
This does not happen when exporting the exact same data through Reports > Custom Report, which correctly preserves the decimal point. This strongly suggests the bug is in the client-side JS export (Bootstrap Table / tableExport plugin) rather than in the server-side PHP export code.
Reproduction steps
- Create a custom field (e.g. "Prix TTC") with:
- Element:
text
- Format:
regex:/^[0-9]+([.,][0-9]{1,2})?$/ (allows both . and , as decimal separator)
- Set
digit_separator in Settings to 1.234,56 (EU format: dot = thousands separator, comma = decimal separator).
- Populate several assets with values in this custom field using a dot as decimal separator, e.g.
79.99, 44.76, 621.17.
- Go to Assets (
/hardware), and click the Export button (CSV, Excel, or SQL export options all show the same issue).
- Open the exported file (inspect the raw file content directly, not through Excel, to rule out spreadsheet auto-formatting).
Expected behavior
The exported value should match what's stored in the database, e.g. 79.99.
Actual behavior
Some values lose their decimal point entirely: 79.99 → 7999, 40.91 → 4091, 621.17 → 62117.
Interestingly, this doesn't happen to every row — some values with the same format export correctly (e.g. 44.76, 54.12, 27.28 stayed intact), while others in the same column, same export, get corrupted. The corruption pattern seems related to how the client-side table library auto-detects the column as numeric and re-formats it using the locale's thousands separator (dot), stripping it as if it were a thousands separator rather than a decimal point.
What I've already ruled out
- Database value is correct and intact (verified via direct SQL
SELECT and via App\Models\Asset::find() in Tinker, both return 79.99).
- The custom field's
format regex and field_encrypted settings are correctly configured and don't affect this.
Settings::digit_separator and default_currency are consistent and don't directly control this export path.
Helper::ParseCurrency() is only called on purchase_cost, not on custom fields, so it isn't responsible here.
- League\Csv's
EscapeFormula class only prefixes fields that start with =, -, +, @, tab, or CR — it doesn't touch 79.99.
- The PHP export path in
ReportsController::postCustom() (used by Reports > Custom Report) returns the value correctly untouched, confirming the corruption happens only in the client-side JS export of the Assets list table.
Workaround
Using Reports > Custom Report instead of the Assets list "Export" button produces a correctly formatted export.
Screenshots
(attach a screenshot of the Assets list export result if possible)
Server (please complete the following information)
- OS: Synology DSM (Container Manager) / also reproduced on macOS (Docker Desktop)
- Docker image:
snipe/snipe-it:latest, pulled 2026-08-26 (also reproduced on an older image pulled 2026-07-23, though the corruption pattern/affected rows differ slightly between the two builds, suggesting the underlying JS export code changed between these versions)
- Database: MariaDB 10.11
- Locale:
fr-FR
digit_separator: 1.234,56 (EU format)
Debug mode
Describe the bug
When exporting assets from the Assets list page (
/hardware) using the built-in "Export" button, numeric values stored in a text-based custom field are inconsistently corrupted: the decimal point (.) is stripped from some rows but not others, with no dot or comma remaining in the affected cells (e.g.79.99becomes7999).This does not happen when exporting the exact same data through Reports > Custom Report, which correctly preserves the decimal point. This strongly suggests the bug is in the client-side JS export (Bootstrap Table / tableExport plugin) rather than in the server-side PHP export code.
Reproduction steps
textregex:/^[0-9]+([.,][0-9]{1,2})?$/(allows both.and,as decimal separator)digit_separatorin Settings to1.234,56(EU format: dot = thousands separator, comma = decimal separator).79.99,44.76,621.17./hardware), and click the Export button (CSV, Excel, or SQL export options all show the same issue).Expected behavior
The exported value should match what's stored in the database, e.g.
79.99.Actual behavior
Some values lose their decimal point entirely:
79.99→7999,40.91→4091,621.17→62117.Interestingly, this doesn't happen to every row — some values with the same format export correctly (e.g.
44.76,54.12,27.28stayed intact), while others in the same column, same export, get corrupted. The corruption pattern seems related to how the client-side table library auto-detects the column as numeric and re-formats it using the locale's thousands separator (dot), stripping it as if it were a thousands separator rather than a decimal point.What I've already ruled out
SELECTand viaApp\Models\Asset::find()in Tinker, both return79.99).formatregex andfield_encryptedsettings are correctly configured and don't affect this.Settings::digit_separatoranddefault_currencyare consistent and don't directly control this export path.Helper::ParseCurrency()is only called onpurchase_cost, not on custom fields, so it isn't responsible here.EscapeFormulaclass only prefixes fields that start with=,-,+,@, tab, or CR — it doesn't touch79.99.ReportsController::postCustom()(used by Reports > Custom Report) returns the value correctly untouched, confirming the corruption happens only in the client-side JS export of the Assets list table.Workaround
Using Reports > Custom Report instead of the Assets list "Export" button produces a correctly formatted export.
Screenshots
(attach a screenshot of the Assets list export result if possible)
Server (please complete the following information)
snipe/snipe-it:latest, pulled 2026-08-26 (also reproduced on an older image pulled 2026-07-23, though the corruption pattern/affected rows differ slightly between the two builds, suggesting the underlying JS export code changed between these versions)fr-FRdigit_separator:1.234,56(EU format)