feat(web): copiar de / a entre movimientos de inventario (solicitud de traslado → transferencia de stock)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
fdc042ddcd
commit
a5592fac76
10 files changed
+282
-18
No files matched your search
@@ -247,12 +247,19 @@ export class DocumentFormPage {
|
||||
const card = text(this.header()['CardCode']);
|
||||
return [`DocumentStatus eq 'bost_Open'`, `Cancelled eq 'tNO'`, ...(card ? [`CardCode eq '${card.replace(/'/g, "''")}'`] : [])].join(' and ');
|
||||
});
|
||||
protected readonly copyListColumns = [
|
||||
docNum,
|
||||
{ key: 'CardCode', title: this.partner?.label ?? 'Socio', width: '120px', mono: true },
|
||||
{ key: 'CardName', title: 'Nombre' },
|
||||
{ key: 'DocDate', title: 'Fecha', type: 'date', align: 'center', width: '105px' },
|
||||
] as const;
|
||||
protected readonly copyListColumns = this.partner
|
||||
? ([
|
||||
docNum,
|
||||
{ key: 'CardCode', title: this.partner.label, width: '120px', mono: true },
|
||||
{ key: 'CardName', title: 'Nombre' },
|
||||
{ key: 'DocDate', title: 'Fecha', type: 'date', align: 'center', width: '105px' },
|
||||
] as const)
|
||||
: ([
|
||||
docNum,
|
||||
{ key: 'FromWarehouse', title: 'Almacén origen', width: '130px', mono: true },
|
||||
{ key: 'ToWarehouse', title: 'Almacén destino', width: '130px', mono: true },
|
||||
{ key: 'DocDate', title: 'Fecha', type: 'date', align: 'center', width: '105px' },
|
||||
] as const);
|
||||
|
||||
protected copyTo(path: string): void {
|
||||
const docEntry = this.docEntry();
|
||||
@@ -278,7 +285,7 @@ export class DocumentFormPage {
|
||||
if (!source) return;
|
||||
try {
|
||||
const doc = await this.api.get(source.resource, origin.docEntry);
|
||||
const copied = copyFromDocument(doc, origin.path, menuLabel(origin.path));
|
||||
const copied = copyFromDocument(doc, origin.path, menuLabel(origin.path), source.layout.lines.key);
|
||||
const card = text(this.header()['CardCode']);
|
||||
if (card && card !== text(copied.header['CardCode'])) {
|
||||
this.message.set({ kind: 'warn', text: `El documento es de ${text(copied.header['CardCode'])}; este es de ${card}.` });
|
||||
|
||||
Reference in new issue
Block a user