mirror of
https://github.com/christianvidalwolf-prog/Craze-Data-check.git
synced 2026-08-03 14:15:24 +02:00
feat: detect NW > GW weight errors in Pricing Units tab
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
a1b046feb1
commit
4460213da3
@@ -230,6 +230,15 @@ export function PricingView({ data, headers, onSaveRow, onCaptureState, onEdit,
|
||||
else if (v === 1) unitErrors.push(`${name}: value is 1`);
|
||||
});
|
||||
|
||||
// NW > GW check
|
||||
if (nwIdx >= 0 && gwIdx >= 0) {
|
||||
const nw = parseFloat(String(row[nwIdx] ?? '').replace(',', '.'));
|
||||
const gw = parseFloat(String(row[gwIdx] ?? '').replace(',', '.'));
|
||||
if (!isNaN(nw) && !isNaN(gw) && nw > gw) {
|
||||
unitErrors.push(`NW (${nw}) > GW (${gw})`);
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
row,
|
||||
dataIndex,
|
||||
|
||||
Reference in New Issue
Block a user