Usar PDN1.OpenInvQty en la consulta FIFO y ajustar el despliegue
- DP_EntradasAbiertas (v3) lee OpenInvQty en lugar de OpenQty. - publicar: la release no contiene enlaces simbólicos (copia real de @dp/shared). - DEPLOY.md y CLAUDE.md actualizados. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
699dd983d0
commit
2873fd3bc6
6 files changed
+40
-10
No files matched your search
@@ -42,7 +42,7 @@ function crear(anterior: ReturnType<typeof udo>, opciones: { stock?: unknown[];
|
||||
const sql = {
|
||||
consultar: vi.fn(async (_s: unknown, consulta: { codigo: string }) => {
|
||||
if (consulta.codigo === 'DP_Stock') return opciones.stock ?? [{ ItemCode: 'A1', ItemName: 'Libro', OnHand: 100 }];
|
||||
return [{ DocNum: 101, CardCode: 'P1', CardName: 'Prov', DocDate: '2026-01-31T00:00:00Z', DocEntry: 15, LineNum: 0, OpenQty: 10 }];
|
||||
return [{ DocNum: 101, CardCode: 'P1', CardName: 'Prov', DocDate: '2026-01-31T00:00:00Z', DocEntry: 15, LineNum: 0, OpenInvQty: 10 }];
|
||||
}),
|
||||
};
|
||||
const catalogos = { series: vi.fn(async () => [{ series: 15, name: 'Primario', nextNumber: 1, esPorDefecto: true }]) };
|
||||
|
||||
@@ -48,7 +48,7 @@ interface FilaEntrada {
|
||||
DocDate: string;
|
||||
DocEntry: number;
|
||||
LineNum: number;
|
||||
OpenQty: number | string;
|
||||
OpenInvQty: number | string;
|
||||
}
|
||||
|
||||
interface DocumentoCreado {
|
||||
@@ -242,7 +242,7 @@ export class PlanificacionesService {
|
||||
docDate: fechaIso(String(f.DocDate)),
|
||||
cardCode: f.CardCode,
|
||||
cardName: f.CardName,
|
||||
openQty: Math.floor(Number(f.OpenQty)),
|
||||
openQty: Math.floor(Number(f.OpenInvQty)),
|
||||
})),
|
||||
);
|
||||
},
|
||||
|
||||
@@ -30,17 +30,17 @@ export const CONSULTA_STOCK: ConsultaGuardada = {
|
||||
|
||||
export const CONSULTA_ENTRADAS_ABIERTAS: ConsultaGuardada = {
|
||||
codigo: 'DP_EntradasAbiertas',
|
||||
version: 2,
|
||||
version: 3,
|
||||
mssql:
|
||||
'SELECT T0.[DocNum], T0.[CardCode], T0.[CardName], T0.[DocDate], ' +
|
||||
'T1.[DocEntry], T1.[LineNum], T1.[OpenQty] ' +
|
||||
'T1.[DocEntry], T1.[LineNum], T1.[OpenInvQty] ' +
|
||||
'FROM OPDN T0 INNER JOIN PDN1 T1 ON T1.[DocEntry] = T0.[DocEntry] ' +
|
||||
"WHERE T0.[U_DOT_TipoRecepcion] = 'C' AND T1.[LineStatus] = 'O' " +
|
||||
'AND T1.[ItemCode] = :item AND T1.[WhsCode] = :whs ' +
|
||||
'ORDER BY T0.[DocDate], T1.[DocEntry], T1.[LineNum]',
|
||||
hana:
|
||||
'SELECT T0."DocNum", T0."CardCode", T0."CardName", T0."DocDate", ' +
|
||||
'T1."DocEntry", T1."LineNum", T1."OpenQty" ' +
|
||||
'T1."DocEntry", T1."LineNum", T1."OpenInvQty" ' +
|
||||
'FROM OPDN T0 INNER JOIN PDN1 T1 ON T1."DocEntry" = T0."DocEntry" ' +
|
||||
"WHERE T0.\"U_DOT_TipoRecepcion\" = 'C' AND T1.\"LineStatus\" = 'O' " +
|
||||
'AND T1."ItemCode" = :item AND T1."WhsCode" = :whs ' +
|
||||
|
||||
Reference in new issue
Block a user