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:
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;
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user