The issue to look for
A numeric-looking cost is not automatically comparable across rows. Currency, case quantity and unit labels are separate facts, and a syntactically valid number does not establish a per-unit amount.
What this check can tell you
The fixture shows $1,234.50 passing while 12,50 fails; both source strings remain unchanged. MAP, MSRP and Unit are demonstrably pass-through fields.
A transparent review
- Confirm currency and whether the source cost is per case, pack or each.
- Run the two-row file and inspect the single invalid-cost finding.
- Check that the case label and original formatted cost were not rewritten.
- Document any externally verified unit conversion separately before exporting a changed value.
How to read the result
- The numeric checker accepts non-negative decimals with up to four fractional digits, an optional leading dollar sign, and correctly grouped US thousands separators. Quantity uses whole numbers. Neither rule converts currencies or pack sizes.
- MAP and MSRP fields may help recognize a header but are not price-validated or interpreted here. This educational check makes no margin calculation, compliance judgment, ranking or purchasing recommendation.
Limits to keep in view
- A dollar sign is accepted syntax, not proof of currency.
- Decimal-comma localization is not automatically converted.
- Never infer pack size or a floor-price policy from column names alone.
Synthetic fixture: synthetic-cost-units.csv
This small synthetic example makes the transformation and observation visible. It is an educational illustration, not a claim that a supplier file or external registry was verified.
Input
SKU,Cost,Qty,Unit,MAP,MSRP UNIT-1,"$1,234.50",2,case,1300,1400 UNIT-2,"12,50",3,each,15,20
Output
{
"checks": {
"invalidCosts": 1,
"invalidQuantities": 0
},
"cleanedRows": [
{
"SKU": "UNIT-1",
"Cost": "$1,234.50",
"Qty": "2",
"Unit": "case",
"MAP": "1300",
"MSRP": "1400"
},
{
"SKU": "UNIT-2",
"Cost": "12,50",
"Qty": "3",
"Unit": "each",
"MAP": "15",
"MSRP": "20"
}
]
}Observation: US thousands formatting passes cost validation; decimal-comma text does not. Costs remain their original strings. Unit, MAP and MSRP are preserved but not interpreted.
Download synthetic fixture