feat(web): lotes y series en las líneas de entradas, salidas y transferencias de stock
Una ventana por línea con tabla editable; validación de suma de lotes y una serie por unidad. Probado contra SBODemoCL: entrada de inventario 156 con SU01 y su lote. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
a5592fac76
commit
abc1cc4ac6
16 files changed
+752
-10
No files matched your search
@@ -1,5 +1,6 @@
|
||||
import type { GridLine } from '../../shared/grid/grid.types';
|
||||
import { hasBaseRef } from './document-objects';
|
||||
import { DETAIL_KEYS, detailRowsPayload } from './line-details';
|
||||
|
||||
/** Documento tal como lo devuelve / recibe el Service Layer. */
|
||||
export type DocRecord = Record<string, unknown>;
|
||||
@@ -139,6 +140,11 @@ export function linesPayload(lines: readonly GridLine[], spec: LinesSpec = MARKE
|
||||
.map((l) => {
|
||||
const out: DocRecord = {};
|
||||
for (const f of spec.fields) {
|
||||
if (DETAIL_KEYS.includes(f)) {
|
||||
const rows = detailRowsPayload(f, l[f]);
|
||||
if (rows.length) out[f] = rows;
|
||||
continue;
|
||||
}
|
||||
if (isEmpty(l[f])) continue;
|
||||
if (f === 'UoMEntry' && !(Number(l[f]) > 0)) continue; // -1 = unidad manual: SAP no admite enviarla
|
||||
out[f] = l[f];
|
||||
|
||||
Reference in new issue
Block a user