fix(web): ventas y compras envían la unidad de medida del artículo (UoMEntry)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
GeorgeandClaude Sonnet 5.5 committed 2026-10-14 16:05:25 -05:00
1 parent 0d5a3074c8
commit d3ab97cd2e
7 files changed
+71 -20

No files matched your search

@@ -91,7 +91,11 @@ export function linesPayload(lines: readonly GridLine[], spec: LinesSpec = MARKE
.filter((l) => !isBlankLine(l))
.map((l) => {
const out: DocRecord = {};
for (const f of spec.fields) if (!isEmpty(l[f])) out[f] = l[f];
for (const f of spec.fields) {
if (isEmpty(l[f])) continue;
if (f === 'UoMEntry' && !(Number(l[f]) > 0)) continue; // -1 = unidad manual: SAP no admite enviarla
out[f] = l[f];
}
if (spec.base && hasBase(l)) for (const f of BASE_FIELDS) out[f] = l[f];
return out;
});