Sage X3

Existencias por producto y centro — Pro

Centro y categoría; resumen de cantidades, ubicaciones/lotes, asignación y ficha actual del producto.

NO OFICIAL — NO VALIDADO EN UNA INSTALACIÓN ERP REAL.

Para almacén, compras, ventas y responsables: selecciona un centro y, opcionalmente, categoría. Consulta productos y cantidades por centro, incluidos productos-centro sin posiciones. La ficha distingue stock interno aceptado, en control y rechazado, otras posiciones y cantidades desconocidas; muestra stock de seguridad, umbral de reposición y máximo configurado. Dos sub-botones abren sus posiciones reales (ubicación, lote, sublote, lote proveedor, estado, cantidades/unidades, asignación, proceso, contenedor y entrada) y la ficha actual de producto (descripciones, códigos UPC/EAN y GTIN, estado, unidades, conversiones, peso y aptitudes).

¿Por qué Cifru? Adapta las configuraciones a tu forma de trabajar. Elige los campos, filtros y detalles que necesitas y lleva al móvil información que quizá no esté disponible en la aplicación móvil de tu software de gestión. Las opciones dependen de los datos accesibles en tu fuente autorizada y de tu plan Cifru.

Pro: una fuente SQL Server, tres listas y dos relaciones, SELECT explícitos, modo live sin actualización programada; máximo 2.000 filas por lista. Apertura nativa por centro antes del límite; posiciones delimitadas por producto y centro mediante parámetros, sin SQL de apertura obligatorio que bloquee descubrir centros. Las sumas se calculan en la fuente antes de limitar productos: el límite de filas NO limita el trabajo del GROUP BY ni garantiza una consulta barata. Verifica índices ITMREF/STOFCY, tiempo de consulta y volumen con el administrador. No demuestra completitud de posiciones si se alcanza el límite ni crea índices o vistas.

CANTIDADES: total de QTYSTU en todas las posiciones del producto-centro, en STU. Interno solo LOCCAT=1; familias A*, Q*, R* incluyen subestados por su primera letra. Otras posiciones incluyen muelle, cliente, subcontratación y categorías/estados desconocidos. No se denomina disponible: no resta asignaciones ni suma pedidos, tránsito, déficits o previsiones. Q/R pueden ser asignables según configuración; no se deduce que sean siempre bloqueadas. Cero sin posiciones no equivale a cantidad desconocida: si existe un QTYSTU NULL, su total/categoría queda vacío y aumenta Posiciones sin cantidad. No se transforma NULL en cero.

UNIDADES: QTYSTU/STU y QTYPCU/PCU se conservan por separado; PCUSTUCOE es el factor de esa posición. No se recalculan cantidades con factores actuales de compra/venta. La ficha de producto muestra valores maestros actuales, no históricos; peso por STU con su unidad. Los umbrales del producto-centro son valores configurados, no recomendación ni reposición calculada. No valoración monetaria ni precios sin moneda demostrada. No incluye cantidad activa/potencia, caducidades, historial de movimientos, todas las series o gestión de depósitos WRH. Centro no equivale a depósito; ubicación y lote no forman una clave única.

REQUISITO: Sage X3 v12 SQL Server. El administrador confirma base y carpeta empresarial autorizadas y prepara un usuario dedicado con esquema predeterminado igual a esa carpeta y solo SELECT autorizado. No se presupone dbo/SEED ni se usa sa/sysadmin. OBJECT_ID compara tablas con el esquema predeterminado y rechaza dbo/guest/sys/INFORMATION_SCHEMA; una lectura vacía no demuestra la carpeta correcta. SQL no hereda automáticamente permisos de rol/centro de X3; los filtros no son control de acceso. El paquete no modifica usuarios, permisos, esquemas ni tablas. Confirma esquema, tipos, versión y vista previa real al importar.

Diccionario v12 y regla SQL oficial campo_indice, no DDL ni esquema instalado. No se inventan PHYSTO/CTLSTO/REJSTO de pantallas como columnas ITMFACILIT, STU como columna STOCK, ni campos condicionados WRH/ECC/NUC. Códigos de menús desconocidos muestran Código N; estados de stock completos se conservan. Capturas Cifru nativas con transporte sintético y datos DEMO totalmente ficticios; no validadas en Sage X3 o SQL Server reales. Sin servidor, credenciales ni filas empresariales. No oficial, sin afiliación a Sage.

Fuentes primarias:
https://online-help.sagex3.com/erp/12/en-us/Content/MCD/STOCK.htm
https://online-help.sagex3.com/erp/12/en-us/Content/MCD/ITMMASTER.htm
https://online-help.sagex3.com/erp/12/en-us/Content/MCD/ITMFACILIT.htm
https://online-help.sagex3.com/erp/12/en-us/Content/MCD/MEN00246.htm
https://online-help.sagex3.com/erp/12/en-us/Content/MCD/MEN02710.htm
https://online-help.sagex3.com/erp/12/en-us/Content/MCD/MEN00001.htm
https://online-help.sagex3.com/erp/12/en-us/Content/FCT/CONSSDE.htm
https://online-help.sagex3.com/erp/12/en-us/Content/FCT/GESITF.htm
https://online-help.sagex3.com/erp/12/en-us/Content/FCT/GESITM.htm
https://online-help.sagex3.com/erp/12/en-us/Content/FCT/GESSTQ.htm
https://online-help.sagex3.com/erp/12/en-us/Content/FCT/GESALQ.htm

What this package creates

1 Home2 Details3 lists1 sources to map
  • Home: Existencias por producto y centro
  • Details: Posiciones de stock
  • Details: Ficha de producto
  • Sub-button: Posiciones de stock
  • Sub-button: Ficha de producto

Sources are mapped locally and verified before applying.

Custom queriesPRO3 SQL

Custom queries are a PRO feature. Cifru repeats read-only validation against the local source before execution.

Statically verified read-only$.components.workspaceSelection.datasets.0.sqlQuery
SELECT CONCAT(LEN(RTRIM(p.ITMREF_0)),N':',RTRIM(p.ITMREF_0),N':',RTRIM(f.STOFCY_0)) AS SiteProductKey, RTRIM(p.ITMREF_0) AS ITMREF_0, p.ITMDES1_0, RTRIM(f.STOFCY_0) AS STOFCY_0, p.STU_0, p.TCLCOD_0, CASE WHEN g.StockRows IS NULL THEN 0 ELSE g.TotalQty END AS TotalQty, CASE WHEN g.StockRows IS NULL THEN 0 ELSE g.AcceptedQty END AS AcceptedQty, CASE WHEN g.StockRows IS NULL THEN 0 ELSE g.QualityQty END AS QualityQty, CASE WHEN g.StockRows IS NULL THEN 0 ELSE g.RejectedQty END AS RejectedQty, CASE WHEN g.StockRows IS NULL THEN 0 ELSE g.OtherQty END AS OtherQty, CASE WHEN g.StockRows IS NULL THEN 0 ELSE g.StockRows END AS StockRows, CASE WHEN g.StockRows IS NULL THEN 0 ELSE g.MissingQtyRows END AS MissingQtyRows, f.SAFSTO_0, f.REOTSD_0, f.MAXSTO_0 FROM ITMFACILIT f JOIN ITMMASTER p ON p.ITMREF_0=f.ITMREF_0 LEFT JOIN (SELECT s.ITMREF_0, s.STOFCY_0, COUNT_BIG(1) AS StockRows, COUNT_BIG(CASE WHEN s.QTYSTU_0 IS NULL THEN 1 END) AS MissingQtyRows, CASE WHEN COUNT_BIG(CASE WHEN (1=1) AND s.QTYSTU_0 IS NULL THEN 1 END)>0 THEN NULL ELSE SUM(CASE WHEN (1=1) THEN s.QTYSTU_0 ELSE 0 END) END AS TotalQty, CASE WHEN COUNT_BIG(CASE WHEN (s.LOCCAT_0=1 AND LEFT(RTRIM(s.STA_0),1)=N'A') AND s.QTYSTU_0 IS NULL THEN 1 END)>0 THEN NULL ELSE SUM(CASE WHEN (s.LOCCAT_0=1 AND LEFT(RTRIM(s.STA_0),1)=N'A') THEN s.QTYSTU_0 ELSE 0 END) END AS AcceptedQty, CASE WHEN COUNT_BIG(CASE WHEN (s.LOCCAT_0=1 AND LEFT(RTRIM(s.STA_0),1)=N'Q') AND s.QTYSTU_0 IS NULL THEN 1 END)>0 THEN NULL ELSE SUM(CASE WHEN (s.LOCCAT_0=1 AND LEFT(RTRIM(s.STA_0),1)=N'Q') THEN s.QTYSTU_0 ELSE 0 END) END AS QualityQty, CASE WHEN COUNT_BIG(CASE WHEN (s.LOCCAT_0=1 AND LEFT(RTRIM(s.STA_0),1)=N'R') AND s.QTYSTU_0 IS NULL THEN 1 END)>0 THEN NULL ELSE SUM(CASE WHEN (s.LOCCAT_0=1 AND LEFT(RTRIM(s.STA_0),1)=N'R') THEN s.QTYSTU_0 ELSE 0 END) END AS RejectedQty, CASE WHEN COUNT_BIG(CASE WHEN (COALESCE(s.LOCCAT_0,0)<>1 OR COALESCE(LEFT(RTRIM(s.STA_0),1),N'') NOT IN (N'A',N'Q',N'R')) AND s.QTYSTU_0 IS NULL THEN 1 END)>0 THEN NULL ELSE SUM(CASE WHEN (COALESCE(s.LOCCAT_0,0)<>1 OR COALESCE(LEFT(RTRIM(s.STA_0),1),N'') NOT IN (N'A',N'Q',N'R')) THEN s.QTYSTU_0 ELSE 0 END) END AS OtherQty FROM STOCK s GROUP BY s.ITMREF_0,s.STOFCY_0) g ON g.ITMREF_0=f.ITMREF_0 AND g.STOFCY_0=f.STOFCY_0 WHERE SCHEMA_NAME() NOT IN (N'dbo',N'guest',N'sys',N'INFORMATION_SCHEMA') AND OBJECT_ID(N'STOCK',N'U') = OBJECT_ID(QUOTENAME(SCHEMA_NAME())+N'.STOCK',N'U') AND OBJECT_ID(N'ITMMASTER',N'U') = OBJECT_ID(QUOTENAME(SCHEMA_NAME())+N'.ITMMASTER',N'U') AND OBJECT_ID(N'ITMFACILIT',N'U') = OBJECT_ID(QUOTENAME(SCHEMA_NAME())+N'.ITMFACILIT',N'U')

static read-only checks passed

Statically verified read-only$.components.workspaceSelection.datasets.1.sqlQuery
SELECT CONCAT(LEN(RTRIM(s.STOFCY_0)),N':',RTRIM(s.STOFCY_0),N':',s.STOCOU_0) AS StockKey, s.STOCOU_0, RTRIM(s.ITMREF_0) AS ITMREF_0, p.ITMDES1_0 AS ITMDES1_0, RTRIM(s.STOFCY_0) AS STOFCY_0, s.LOC_0, s.LOCTYP_0, s.LOT_0, s.SLO_0, s.BPSLOT_0, s.STA_0, CASE WHEN s.LOCCAT_0=1 THEN N'Interna' WHEN s.LOCCAT_0=2 THEN N'Muelle' WHEN s.LOCCAT_0=3 THEN N'Cliente' WHEN s.LOCCAT_0=4 THEN N'Subcontratación' WHEN s.LOCCAT_0 IS NULL THEN N'' ELSE CONCAT(N'Código ',s.LOCCAT_0) END AS LOCCAT_0, s.QTYSTU_0, p.STU_0 AS STU_0, s.QTYPCU_0, s.PCU_0, s.PCUSTUCOE_0, s.CUMALLQTY_0, s.CUMWIPQTY_0, s.LPNNUM_0, s.RCPDAT_0, CASE WHEN s.CUNLOKFLG_0=1 THEN N'No' WHEN s.CUNLOKFLG_0=2 THEN N'Sí' WHEN s.CUNLOKFLG_0 IS NULL THEN N'' ELSE CONCAT(N'Código ',s.CUNLOKFLG_0) END AS CUNLOKFLG_0 FROM STOCK s JOIN ITMMASTER p ON p.ITMREF_0=s.ITMREF_0 WHERE s.ITMREF_0=:product AND s.STOFCY_0=:site AND SCHEMA_NAME() NOT IN (N'dbo',N'guest',N'sys',N'INFORMATION_SCHEMA') AND OBJECT_ID(N'STOCK',N'U') = OBJECT_ID(QUOTENAME(SCHEMA_NAME())+N'.STOCK',N'U') AND OBJECT_ID(N'ITMMASTER',N'U') = OBJECT_ID(QUOTENAME(SCHEMA_NAME())+N'.ITMMASTER',N'U') AND OBJECT_ID(N'ITMFACILIT',N'U') = OBJECT_ID(QUOTENAME(SCHEMA_NAME())+N'.ITMFACILIT',N'U')

static read-only checks passed

Statically verified read-only$.components.workspaceSelection.datasets.2.sqlQuery
SELECT RTRIM(p.ITMREF_0) AS ITMREF_0, p.ITMDES1_0, p.ITMDES2_0, p.ITMDES3_0, p.TCLCOD_0, p.EANCOD_0, p.GTIN_0, CASE WHEN p.ITMSTA_0=1 THEN N'Activo' WHEN p.ITMSTA_0=2 THEN N'En desarrollo' WHEN p.ITMSTA_0=3 THEN N'En escasez' WHEN p.ITMSTA_0=4 THEN N'No renovado' WHEN p.ITMSTA_0=5 THEN N'Obsoleto' WHEN p.ITMSTA_0=6 THEN N'No utilizable' WHEN p.ITMSTA_0 IS NULL THEN N'' ELSE CONCAT(N'Código ',p.ITMSTA_0) END AS ITMSTA_0, p.STU_0, p.SAU_0, p.PUU_0, p.SAUSTUCOE_0, p.PUUSTUCOE_0, p.ITMWEI_0, p.WEU_0, CASE WHEN p.SALFLG_0=1 THEN N'No' WHEN p.SALFLG_0=2 THEN N'Sí' WHEN p.SALFLG_0 IS NULL THEN N'' ELSE CONCAT(N'Código ',p.SALFLG_0) END AS SALFLG_0, CASE WHEN p.PURFLG_0=1 THEN N'No' WHEN p.PURFLG_0=2 THEN N'Sí' WHEN p.PURFLG_0 IS NULL THEN N'' ELSE CONCAT(N'Código ',p.PURFLG_0) END AS PURFLG_0, CASE WHEN p.DLVFLG_0=1 THEN N'No' WHEN p.DLVFLG_0=2 THEN N'Sí' WHEN p.DLVFLG_0 IS NULL THEN N'' ELSE CONCAT(N'Código ',p.DLVFLG_0) END AS DLVFLG_0 FROM ITMMASTER p WHERE p.ITMREF_0=:product AND SCHEMA_NAME() NOT IN (N'dbo',N'guest',N'sys',N'INFORMATION_SCHEMA') AND OBJECT_ID(N'STOCK',N'U') = OBJECT_ID(QUOTENAME(SCHEMA_NAME())+N'.STOCK',N'U') AND OBJECT_ID(N'ITMMASTER',N'U') = OBJECT_ID(QUOTENAME(SCHEMA_NAME())+N'.ITMMASTER',N'U') AND OBJECT_ID(N'ITMFACILIT',N'U') = OBJECT_ID(QUOTENAME(SCHEMA_NAME())+N'.ITMFACILIT',N'U')

static read-only checks passed

View the JSON being importedcollapsed by default

The exact portable content of this version.

{
    "components": {
        "sourceSlots": [
            {
                "displayName": "Sage X3 — SQL Server, carpeta autorizada del usuario",
                "id": "7184F66C-C029-51AB-A6BA-FE6517D9D3DB",
                "kind": "sqlServer",
                "requiredObjects": [
                    "STOCK",
                    "ITMMASTER",
                    "ITMFACILIT"
                ],
                "requiresCustomSQL": true
            }
        ],
        "workspaceSelection": {
            "commonFields": [],
            "datasets": [
                {
                    "cacheMode": "live",
                    "calculatedFields": [],
                    "customQueryIntegrationName": "",
                    "endpointPath": "",
                    "fetchSortRules": [
                        {
                            "direction": "ascending",
                            "id": "5DABC1F6-CF66-5E1B-8C0B-F65D21E6E363",
                            "key": "ITMREF_0",
                            "type": "text"
                        }
                    ],
                    "id": "8F71D99D-2C80-5BBB-B00E-D7AE2CCCAD54",
                    "mappings": [
                        {
                            "commonFieldKey": "",
                            "key": "SiteProductKey",
                            "label": "Clave interna producto-centro",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic",
                            "sourceColumn": "SiteProductKey",
                            "type": "text",
                            "visibleInDetail": false,
                            "visibleInList": false
                        },
                        {
                            "commonFieldKey": "",
                            "key": "ITMREF_0",
                            "label": "Código de producto",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic",
                            "sourceColumn": "ITMREF_0",
                            "type": "text",
                            "visibleInDetail": true,
                            "visibleInList": false
                        },
                        {
                            "commonFieldKey": "",
                            "key": "ITMDES1_0",
                            "label": "Producto",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic",
                            "sourceColumn": "ITMDES1_0",
                            "type": "text",
                            "visibleInDetail": true,
                            "visibleInList": false
                        },
                        {
                            "commonFieldKey": "",
                            "key": "STOFCY_0",
                            "label": "Centro de stock",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic",
                            "sourceColumn": "STOFCY_0",
                            "type": "text",
                            "visibleInDetail": true,
                            "visibleInList": true
                        },
                        {
                            "commonFieldKey": "",
                            "key": "STU_0",
                            "label": "Unidad de stock",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic",
                            "sourceColumn": "STU_0",
                            "type": "text",
                            "visibleInDetail": true,
                            "visibleInList": true
                        },
                        {
                            "commonFieldKey": "",
                            "key": "TCLCOD_0",
                            "label": "Categoría (código)",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic",
                            "sourceColumn": "TCLCOD_0",
                            "type": "text",
                            "visibleInDetail": true,
                            "visibleInList": true
                        },
                        {
                            "commonFieldKey": "",
                            "key": "TotalQty",
                            "label": "Cantidad total en posiciones",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic",
                            "sourceColumn": "TotalQty",
                            "type": "number",
                            "visibleInDetail": true,
                            "visibleInList": true
                        },
                        {
                            "commonFieldKey": "",
                            "key": "AcceptedQty",
                            "label": "Interno aceptado (A*)",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic",
                            "sourceColumn": "AcceptedQty",
                            "type": "number",
                            "visibleInDetail": true,
                            "visibleInList": true
                        },
                        {
                            "commonFieldKey": "",
                            "key": "QualityQty",
                            "label": "Interno en control (Q*)",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic",
                            "sourceColumn": "QualityQty",
                            "type": "number",
                            "visibleInDetail": true,
                            "visibleInList": true
                        },
                        {
                            "commonFieldKey": "",
                            "key": "RejectedQty",
                            "label": "Interno rechazado (R*)",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic",
                            "sourceColumn": "RejectedQty",
                            "type": "number",
                            "visibleInDetail": true,
                            "visibleInList": true
                        },
                        {
                            "commonFieldKey": "",
                            "key": "OtherQty",
                            "label": "Otras posiciones",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic",
                            "sourceColumn": "OtherQty",
                            "type": "number",
                            "visibleInDetail": true,
                            "visibleInList": true
                        },
                        {
                            "commonFieldKey": "",
                            "key": "StockRows",
                            "label": "Número de posiciones",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic",
                            "sourceColumn": "StockRows",
                            "type": "number",
                            "visibleInDetail": true,
                            "visibleInList": false
                        },
                        {
                            "commonFieldKey": "",
                            "key": "MissingQtyRows",
                            "label": "Posiciones sin cantidad",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic",
                            "sourceColumn": "MissingQtyRows",
                            "type": "number",
                            "visibleInDetail": true,
                            "visibleInList": true
                        },
                        {
                            "commonFieldKey": "",
                            "key": "SAFSTO_0",
                            "label": "Stock de seguridad",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic",
                            "sourceColumn": "SAFSTO_0",
                            "type": "number",
                            "visibleInDetail": true,
                            "visibleInList": false
                        },
                        {
                            "commonFieldKey": "",
                            "key": "REOTSD_0",
                            "label": "Umbral de reposición",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic",
                            "sourceColumn": "REOTSD_0",
                            "type": "number",
                            "visibleInDetail": true,
                            "visibleInList": false
                        },
                        {
                            "commonFieldKey": "",
                            "key": "MAXSTO_0",
                            "label": "Stock máximo configurado",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic",
                            "sourceColumn": "MAXSTO_0",
                            "type": "number",
                            "visibleInDetail": true,
                            "visibleInList": false
                        }
                    ],
                    "maxRows": 2000,
                    "name": "Existencias por producto y centro",
                    "primaryKey": "SiteProductKey",
                    "queryParameters": [],
                    "refreshPolicy": {
                        "enabled": false,
                        "intervalMinutes": 60
                    },
                    "rootArrayPath": "",
                    "rowLimitEnabled": true,
                    "searchKeys": [
                        "ITMREF_0",
                        "ITMDES1_0",
                        "STOFCY_0",
                        "STU_0",
                        "TCLCOD_0",
                        "TotalQty",
                        "AcceptedQty",
                        "QualityQty",
                        "RejectedQty",
                        "OtherQty",
                        "StockRows",
                        "MissingQtyRows",
                        "SAFSTO_0",
                        "REOTSD_0",
                        "MAXSTO_0"
                    ],
                    "sourceID": "7184F66C-C029-51AB-A6BA-FE6517D9D3DB",
                    "sqlQuery": "SELECT CONCAT(LEN(RTRIM(p.ITMREF_0)),N':',RTRIM(p.ITMREF_0),N':',RTRIM(f.STOFCY_0)) AS SiteProductKey, RTRIM(p.ITMREF_0) AS ITMREF_0, p.ITMDES1_0, RTRIM(f.STOFCY_0) AS STOFCY_0, p.STU_0, p.TCLCOD_0, CASE WHEN g.StockRows IS NULL THEN 0 ELSE g.TotalQty END AS TotalQty, CASE WHEN g.StockRows IS NULL THEN 0 ELSE g.AcceptedQty END AS AcceptedQty, CASE WHEN g.StockRows IS NULL THEN 0 ELSE g.QualityQty END AS QualityQty, CASE WHEN g.StockRows IS NULL THEN 0 ELSE g.RejectedQty END AS RejectedQty, CASE WHEN g.StockRows IS NULL THEN 0 ELSE g.OtherQty END AS OtherQty, CASE WHEN g.StockRows IS NULL THEN 0 ELSE g.StockRows END AS StockRows, CASE WHEN g.StockRows IS NULL THEN 0 ELSE g.MissingQtyRows END AS MissingQtyRows, f.SAFSTO_0, f.REOTSD_0, f.MAXSTO_0 FROM ITMFACILIT f JOIN ITMMASTER p ON p.ITMREF_0=f.ITMREF_0 LEFT JOIN (SELECT s.ITMREF_0, s.STOFCY_0, COUNT_BIG(1) AS StockRows, COUNT_BIG(CASE WHEN s.QTYSTU_0 IS NULL THEN 1 END) AS MissingQtyRows, CASE WHEN COUNT_BIG(CASE WHEN (1=1) AND s.QTYSTU_0 IS NULL THEN 1 END)>0 THEN NULL ELSE SUM(CASE WHEN (1=1) THEN s.QTYSTU_0 ELSE 0 END) END AS TotalQty, CASE WHEN COUNT_BIG(CASE WHEN (s.LOCCAT_0=1 AND LEFT(RTRIM(s.STA_0),1)=N'A') AND s.QTYSTU_0 IS NULL THEN 1 END)>0 THEN NULL ELSE SUM(CASE WHEN (s.LOCCAT_0=1 AND LEFT(RTRIM(s.STA_0),1)=N'A') THEN s.QTYSTU_0 ELSE 0 END) END AS AcceptedQty, CASE WHEN COUNT_BIG(CASE WHEN (s.LOCCAT_0=1 AND LEFT(RTRIM(s.STA_0),1)=N'Q') AND s.QTYSTU_0 IS NULL THEN 1 END)>0 THEN NULL ELSE SUM(CASE WHEN (s.LOCCAT_0=1 AND LEFT(RTRIM(s.STA_0),1)=N'Q') THEN s.QTYSTU_0 ELSE 0 END) END AS QualityQty, CASE WHEN COUNT_BIG(CASE WHEN (s.LOCCAT_0=1 AND LEFT(RTRIM(s.STA_0),1)=N'R') AND s.QTYSTU_0 IS NULL THEN 1 END)>0 THEN NULL ELSE SUM(CASE WHEN (s.LOCCAT_0=1 AND LEFT(RTRIM(s.STA_0),1)=N'R') THEN s.QTYSTU_0 ELSE 0 END) END AS RejectedQty, CASE WHEN COUNT_BIG(CASE WHEN (COALESCE(s.LOCCAT_0,0)<>1 OR COALESCE(LEFT(RTRIM(s.STA_0),1),N'') NOT IN (N'A',N'Q',N'R')) AND s.QTYSTU_0 IS NULL THEN 1 END)>0 THEN NULL ELSE SUM(CASE WHEN (COALESCE(s.LOCCAT_0,0)<>1 OR COALESCE(LEFT(RTRIM(s.STA_0),1),N'') NOT IN (N'A',N'Q',N'R')) THEN s.QTYSTU_0 ELSE 0 END) END AS OtherQty FROM STOCK s GROUP BY s.ITMREF_0,s.STOFCY_0) g ON g.ITMREF_0=f.ITMREF_0 AND g.STOFCY_0=f.STOFCY_0 WHERE SCHEMA_NAME() NOT IN (N'dbo',N'guest',N'sys',N'INFORMATION_SCHEMA') AND OBJECT_ID(N'STOCK',N'U') = OBJECT_ID(QUOTENAME(SCHEMA_NAME())+N'.STOCK',N'U') AND OBJECT_ID(N'ITMMASTER',N'U') = OBJECT_ID(QUOTENAME(SCHEMA_NAME())+N'.ITMMASTER',N'U') AND OBJECT_ID(N'ITMFACILIT',N'U') = OBJECT_ID(QUOTENAME(SCHEMA_NAME())+N'.ITMFACILIT',N'U')",
                    "tableName": ""
                },
                {
                    "cacheMode": "live",
                    "calculatedFields": [],
                    "customQueryIntegrationName": "",
                    "endpointPath": "",
                    "fetchSortRules": [
                        {
                            "direction": "ascending",
                            "id": "72362BAE-E77B-57EB-8622-1E599DA096BA",
                            "key": "LOC_0",
                            "type": "text"
                        },
                        {
                            "direction": "ascending",
                            "id": "356AF07C-DC99-5398-B018-3AC79898F39D",
                            "key": "LOT_0",
                            "type": "text"
                        },
                        {
                            "direction": "ascending",
                            "id": "46CEA833-9C46-5049-9AAC-6B9954A3385D",
                            "key": "STOCOU_0",
                            "type": "number"
                        }
                    ],
                    "id": "E5EB47F6-408C-5160-B595-FC596222CC58",
                    "mappings": [
                        {
                            "commonFieldKey": "",
                            "key": "StockKey",
                            "label": "Clave interna completa de posición",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic",
                            "sourceColumn": "StockKey",
                            "type": "text",
                            "visibleInDetail": false,
                            "visibleInList": false
                        },
                        {
                            "commonFieldKey": "",
                            "key": "STOCOU_0",
                            "label": "Contador interno",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic",
                            "sourceColumn": "STOCOU_0",
                            "type": "number",
                            "visibleInDetail": false,
                            "visibleInList": false
                        },
                        {
                            "commonFieldKey": "",
                            "key": "ITMREF_0",
                            "label": "Código de producto",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic",
                            "sourceColumn": "ITMREF_0",
                            "type": "text",
                            "visibleInDetail": true,
                            "visibleInList": false
                        },
                        {
                            "commonFieldKey": "",
                            "key": "ITMDES1_0",
                            "label": "Producto",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic",
                            "sourceColumn": "ITMDES1_0",
                            "type": "text",
                            "visibleInDetail": true,
                            "visibleInList": false
                        },
                        {
                            "commonFieldKey": "",
                            "key": "STOFCY_0",
                            "label": "Centro de stock",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic",
                            "sourceColumn": "STOFCY_0",
                            "type": "text",
                            "visibleInDetail": true,
                            "visibleInList": false
                        },
                        {
                            "commonFieldKey": "",
                            "key": "LOC_0",
                            "label": "Ubicación",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic",
                            "sourceColumn": "LOC_0",
                            "type": "text",
                            "visibleInDetail": true,
                            "visibleInList": true
                        },
                        {
                            "commonFieldKey": "",
                            "key": "LOCTYP_0",
                            "label": "Tipo de ubicación (código)",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic",
                            "sourceColumn": "LOCTYP_0",
                            "type": "text",
                            "visibleInDetail": true,
                            "visibleInList": false
                        },
                        {
                            "commonFieldKey": "",
                            "key": "LOT_0",
                            "label": "Lote",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic",
                            "sourceColumn": "LOT_0",
                            "type": "text",
                            "visibleInDetail": true,
                            "visibleInList": true
                        },
                        {
                            "commonFieldKey": "",
                            "key": "SLO_0",
                            "label": "Sublote",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic",
                            "sourceColumn": "SLO_0",
                            "type": "text",
                            "visibleInDetail": true,
                            "visibleInList": false
                        },
                        {
                            "commonFieldKey": "",
                            "key": "BPSLOT_0",
                            "label": "Lote del proveedor",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic",
                            "sourceColumn": "BPSLOT_0",
                            "type": "text",
                            "visibleInDetail": true,
                            "visibleInList": false
                        },
                        {
                            "commonFieldKey": "",
                            "key": "STA_0",
                            "label": "Estado y subestado (código)",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic",
                            "sourceColumn": "STA_0",
                            "type": "text",
                            "visibleInDetail": true,
                            "visibleInList": true
                        },
                        {
                            "commonFieldKey": "",
                            "key": "LOCCAT_0",
                            "label": "Categoría de ubicación",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic",
                            "sourceColumn": "LOCCAT_0",
                            "type": "text",
                            "visibleInDetail": true,
                            "visibleInList": false
                        },
                        {
                            "commonFieldKey": "",
                            "key": "QTYSTU_0",
                            "label": "Cantidad en unidad de stock",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic",
                            "sourceColumn": "QTYSTU_0",
                            "type": "number",
                            "visibleInDetail": true,
                            "visibleInList": true
                        },
                        {
                            "commonFieldKey": "",
                            "key": "STU_0",
                            "label": "Unidad de stock",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic",
                            "sourceColumn": "STU_0",
                            "type": "text",
                            "visibleInDetail": true,
                            "visibleInList": true
                        },
                        {
                            "commonFieldKey": "",
                            "key": "QTYPCU_0",
                            "label": "Cantidad en unidad de envase",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic",
                            "sourceColumn": "QTYPCU_0",
                            "type": "number",
                            "visibleInDetail": true,
                            "visibleInList": true
                        },
                        {
                            "commonFieldKey": "",
                            "key": "PCU_0",
                            "label": "Unidad de envase",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic",
                            "sourceColumn": "PCU_0",
                            "type": "text",
                            "visibleInDetail": true,
                            "visibleInList": true
                        },
                        {
                            "commonFieldKey": "",
                            "key": "PCUSTUCOE_0",
                            "label": "Factor envase → stock",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic",
                            "sourceColumn": "PCUSTUCOE_0",
                            "type": "number",
                            "visibleInDetail": true,
                            "visibleInList": false
                        },
                        {
                            "commonFieldKey": "",
                            "key": "CUMALLQTY_0",
                            "label": "Asignación detallada (cantidad)",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic",
                            "sourceColumn": "CUMALLQTY_0",
                            "type": "number",
                            "visibleInDetail": true,
                            "visibleInList": false
                        },
                        {
                            "commonFieldKey": "",
                            "key": "CUMWIPQTY_0",
                            "label": "Cantidad en proceso",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic",
                            "sourceColumn": "CUMWIPQTY_0",
                            "type": "number",
                            "visibleInDetail": true,
                            "visibleInList": false
                        },
                        {
                            "commonFieldKey": "",
                            "key": "LPNNUM_0",
                            "label": "Contenedor (código)",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic",
                            "sourceColumn": "LPNNUM_0",
                            "type": "text",
                            "visibleInDetail": true,
                            "visibleInList": false
                        },
                        {
                            "commonFieldKey": "",
                            "key": "RCPDAT_0",
                            "label": "Fecha de entrada",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic",
                            "sourceColumn": "RCPDAT_0",
                            "type": "date",
                            "visibleInDetail": true,
                            "visibleInList": false
                        },
                        {
                            "commonFieldKey": "",
                            "key": "CUNLOKFLG_0",
                            "label": "Inventario en curso",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic",
                            "sourceColumn": "CUNLOKFLG_0",
                            "type": "text",
                            "visibleInDetail": true,
                            "visibleInList": false
                        }
                    ],
                    "maxRows": 2000,
                    "name": "Posiciones de stock",
                    "primaryKey": "StockKey",
                    "queryParameters": [
                        {
                            "constantValue": "",
                            "dayOffset": 0,
                            "fieldKey": "ITMREF_0",
                            "id": "0F6833C2-8445-5AAC-AC93-C6260BC690FD",
                            "name": "product",
                            "source": "parentField",
                            "type": "text"
                        },
                        {
                            "constantValue": "",
                            "dayOffset": 0,
                            "fieldKey": "STOFCY_0",
                            "id": "DC20047D-2ECA-5E8A-ACA0-1BABAB27CC16",
                            "name": "site",
                            "source": "parentField",
                            "type": "text"
                        }
                    ],
                    "refreshPolicy": {
                        "enabled": false,
                        "intervalMinutes": 60
                    },
                    "rootArrayPath": "",
                    "rowLimitEnabled": true,
                    "searchKeys": [
                        "ITMREF_0",
                        "ITMDES1_0",
                        "STOFCY_0",
                        "LOC_0",
                        "LOCTYP_0",
                        "LOT_0",
                        "SLO_0",
                        "BPSLOT_0",
                        "STA_0",
                        "LOCCAT_0",
                        "QTYSTU_0",
                        "STU_0",
                        "QTYPCU_0",
                        "PCU_0",
                        "PCUSTUCOE_0",
                        "CUMALLQTY_0",
                        "CUMWIPQTY_0",
                        "LPNNUM_0",
                        "RCPDAT_0",
                        "CUNLOKFLG_0"
                    ],
                    "sourceID": "7184F66C-C029-51AB-A6BA-FE6517D9D3DB",
                    "sqlQuery": "SELECT CONCAT(LEN(RTRIM(s.STOFCY_0)),N':',RTRIM(s.STOFCY_0),N':',s.STOCOU_0) AS StockKey, s.STOCOU_0, RTRIM(s.ITMREF_0) AS ITMREF_0, p.ITMDES1_0 AS ITMDES1_0, RTRIM(s.STOFCY_0) AS STOFCY_0, s.LOC_0, s.LOCTYP_0, s.LOT_0, s.SLO_0, s.BPSLOT_0, s.STA_0, CASE WHEN s.LOCCAT_0=1 THEN N'Interna' WHEN s.LOCCAT_0=2 THEN N'Muelle' WHEN s.LOCCAT_0=3 THEN N'Cliente' WHEN s.LOCCAT_0=4 THEN N'Subcontratación' WHEN s.LOCCAT_0 IS NULL THEN N'' ELSE CONCAT(N'Código ',s.LOCCAT_0) END AS LOCCAT_0, s.QTYSTU_0, p.STU_0 AS STU_0, s.QTYPCU_0, s.PCU_0, s.PCUSTUCOE_0, s.CUMALLQTY_0, s.CUMWIPQTY_0, s.LPNNUM_0, s.RCPDAT_0, CASE WHEN s.CUNLOKFLG_0=1 THEN N'No' WHEN s.CUNLOKFLG_0=2 THEN N'Sí' WHEN s.CUNLOKFLG_0 IS NULL THEN N'' ELSE CONCAT(N'Código ',s.CUNLOKFLG_0) END AS CUNLOKFLG_0 FROM STOCK s JOIN ITMMASTER p ON p.ITMREF_0=s.ITMREF_0 WHERE s.ITMREF_0=:product AND s.STOFCY_0=:site AND SCHEMA_NAME() NOT IN (N'dbo',N'guest',N'sys',N'INFORMATION_SCHEMA') AND OBJECT_ID(N'STOCK',N'U') = OBJECT_ID(QUOTENAME(SCHEMA_NAME())+N'.STOCK',N'U') AND OBJECT_ID(N'ITMMASTER',N'U') = OBJECT_ID(QUOTENAME(SCHEMA_NAME())+N'.ITMMASTER',N'U') AND OBJECT_ID(N'ITMFACILIT',N'U') = OBJECT_ID(QUOTENAME(SCHEMA_NAME())+N'.ITMFACILIT',N'U')",
                    "tableName": ""
                },
                {
                    "cacheMode": "live",
                    "calculatedFields": [],
                    "customQueryIntegrationName": "",
                    "endpointPath": "",
                    "fetchSortRules": [
                        {
                            "direction": "ascending",
                            "id": "5DABC1F6-CF66-5E1B-8C0B-F65D21E6E363",
                            "key": "ITMREF_0",
                            "type": "text"
                        }
                    ],
                    "id": "58C78464-CA07-538D-8C45-3754326480E3",
                    "mappings": [
                        {
                            "commonFieldKey": "",
                            "key": "ITMREF_0",
                            "label": "Código de producto",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic",
                            "sourceColumn": "ITMREF_0",
                            "type": "text",
                            "visibleInDetail": true,
                            "visibleInList": false
                        },
                        {
                            "commonFieldKey": "",
                            "key": "ITMDES1_0",
                            "label": "Producto",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic",
                            "sourceColumn": "ITMDES1_0",
                            "type": "text",
                            "visibleInDetail": true,
                            "visibleInList": false
                        },
                        {
                            "commonFieldKey": "",
                            "key": "ITMDES2_0",
                            "label": "Descripción 2",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic",
                            "sourceColumn": "ITMDES2_0",
                            "type": "text",
                            "visibleInDetail": true,
                            "visibleInList": false
                        },
                        {
                            "commonFieldKey": "",
                            "key": "ITMDES3_0",
                            "label": "Descripción 3",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic",
                            "sourceColumn": "ITMDES3_0",
                            "type": "text",
                            "visibleInDetail": true,
                            "visibleInList": false
                        },
                        {
                            "commonFieldKey": "",
                            "key": "TCLCOD_0",
                            "label": "Categoría (código)",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic",
                            "sourceColumn": "TCLCOD_0",
                            "type": "text",
                            "visibleInDetail": true,
                            "visibleInList": true
                        },
                        {
                            "commonFieldKey": "",
                            "key": "EANCOD_0",
                            "label": "Código UPC / EAN",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic",
                            "sourceColumn": "EANCOD_0",
                            "type": "text",
                            "visibleInDetail": true,
                            "visibleInList": true
                        },
                        {
                            "commonFieldKey": "",
                            "key": "GTIN_0",
                            "label": "GTIN",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic",
                            "sourceColumn": "GTIN_0",
                            "type": "text",
                            "visibleInDetail": true,
                            "visibleInList": false
                        },
                        {
                            "commonFieldKey": "",
                            "key": "ITMSTA_0",
                            "label": "Estado del producto",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic",
                            "sourceColumn": "ITMSTA_0",
                            "type": "text",
                            "visibleInDetail": true,
                            "visibleInList": true
                        },
                        {
                            "commonFieldKey": "",
                            "key": "STU_0",
                            "label": "Unidad de stock",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic",
                            "sourceColumn": "STU_0",
                            "type": "text",
                            "visibleInDetail": true,
                            "visibleInList": true
                        },
                        {
                            "commonFieldKey": "",
                            "key": "SAU_0",
                            "label": "Unidad de venta",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic",
                            "sourceColumn": "SAU_0",
                            "type": "text",
                            "visibleInDetail": true,
                            "visibleInList": true
                        },
                        {
                            "commonFieldKey": "",
                            "key": "PUU_0",
                            "label": "Unidad de compra",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic",
                            "sourceColumn": "PUU_0",
                            "type": "text",
                            "visibleInDetail": true,
                            "visibleInList": true
                        },
                        {
                            "commonFieldKey": "",
                            "key": "SAUSTUCOE_0",
                            "label": "Factor venta → stock",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic",
                            "sourceColumn": "SAUSTUCOE_0",
                            "type": "number",
                            "visibleInDetail": true,
                            "visibleInList": false
                        },
                        {
                            "commonFieldKey": "",
                            "key": "PUUSTUCOE_0",
                            "label": "Factor compra → stock",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic",
                            "sourceColumn": "PUUSTUCOE_0",
                            "type": "number",
                            "visibleInDetail": true,
                            "visibleInList": false
                        },
                        {
                            "commonFieldKey": "",
                            "key": "ITMWEI_0",
                            "label": "Peso por unidad de stock",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic",
                            "sourceColumn": "ITMWEI_0",
                            "type": "number",
                            "visibleInDetail": true,
                            "visibleInList": false
                        },
                        {
                            "commonFieldKey": "",
                            "key": "WEU_0",
                            "label": "Unidad de peso",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic",
                            "sourceColumn": "WEU_0",
                            "type": "text",
                            "visibleInDetail": true,
                            "visibleInList": false
                        },
                        {
                            "commonFieldKey": "",
                            "key": "SALFLG_0",
                            "label": "Se vende",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic",
                            "sourceColumn": "SALFLG_0",
                            "type": "text",
                            "visibleInDetail": true,
                            "visibleInList": false
                        },
                        {
                            "commonFieldKey": "",
                            "key": "PURFLG_0",
                            "label": "Se compra",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic",
                            "sourceColumn": "PURFLG_0",
                            "type": "text",
                            "visibleInDetail": true,
                            "visibleInList": false
                        },
                        {
                            "commonFieldKey": "",
                            "key": "DLVFLG_0",
                            "label": "Se entrega",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic",
                            "sourceColumn": "DLVFLG_0",
                            "type": "text",
                            "visibleInDetail": true,
                            "visibleInList": false
                        }
                    ],
                    "maxRows": 2000,
                    "name": "Ficha de producto",
                    "primaryKey": "ITMREF_0",
                    "queryParameters": [
                        {
                            "constantValue": "",
                            "dayOffset": 0,
                            "fieldKey": "ITMREF_0",
                            "id": "0F6833C2-8445-5AAC-AC93-C6260BC690FD",
                            "name": "product",
                            "source": "parentField",
                            "type": "text"
                        }
                    ],
                    "refreshPolicy": {
                        "enabled": false,
                        "intervalMinutes": 60
                    },
                    "rootArrayPath": "",
                    "rowLimitEnabled": true,
                    "searchKeys": [
                        "ITMREF_0",
                        "ITMDES1_0",
                        "ITMDES2_0",
                        "ITMDES3_0",
                        "TCLCOD_0",
                        "EANCOD_0",
                        "GTIN_0",
                        "ITMSTA_0",
                        "STU_0",
                        "SAU_0",
                        "PUU_0",
                        "SAUSTUCOE_0",
                        "PUUSTUCOE_0",
                        "ITMWEI_0",
                        "WEU_0",
                        "SALFLG_0",
                        "PURFLG_0",
                        "DLVFLG_0"
                    ],
                    "sourceID": "7184F66C-C029-51AB-A6BA-FE6517D9D3DB",
                    "sqlQuery": "SELECT RTRIM(p.ITMREF_0) AS ITMREF_0, p.ITMDES1_0, p.ITMDES2_0, p.ITMDES3_0, p.TCLCOD_0, p.EANCOD_0, p.GTIN_0, CASE WHEN p.ITMSTA_0=1 THEN N'Activo' WHEN p.ITMSTA_0=2 THEN N'En desarrollo' WHEN p.ITMSTA_0=3 THEN N'En escasez' WHEN p.ITMSTA_0=4 THEN N'No renovado' WHEN p.ITMSTA_0=5 THEN N'Obsoleto' WHEN p.ITMSTA_0=6 THEN N'No utilizable' WHEN p.ITMSTA_0 IS NULL THEN N'' ELSE CONCAT(N'Código ',p.ITMSTA_0) END AS ITMSTA_0, p.STU_0, p.SAU_0, p.PUU_0, p.SAUSTUCOE_0, p.PUUSTUCOE_0, p.ITMWEI_0, p.WEU_0, CASE WHEN p.SALFLG_0=1 THEN N'No' WHEN p.SALFLG_0=2 THEN N'Sí' WHEN p.SALFLG_0 IS NULL THEN N'' ELSE CONCAT(N'Código ',p.SALFLG_0) END AS SALFLG_0, CASE WHEN p.PURFLG_0=1 THEN N'No' WHEN p.PURFLG_0=2 THEN N'Sí' WHEN p.PURFLG_0 IS NULL THEN N'' ELSE CONCAT(N'Código ',p.PURFLG_0) END AS PURFLG_0, CASE WHEN p.DLVFLG_0=1 THEN N'No' WHEN p.DLVFLG_0=2 THEN N'Sí' WHEN p.DLVFLG_0 IS NULL THEN N'' ELSE CONCAT(N'Código ',p.DLVFLG_0) END AS DLVFLG_0 FROM ITMMASTER p WHERE p.ITMREF_0=:product AND SCHEMA_NAME() NOT IN (N'dbo',N'guest',N'sys',N'INFORMATION_SCHEMA') AND OBJECT_ID(N'STOCK',N'U') = OBJECT_ID(QUOTENAME(SCHEMA_NAME())+N'.STOCK',N'U') AND OBJECT_ID(N'ITMMASTER',N'U') = OBJECT_ID(QUOTENAME(SCHEMA_NAME())+N'.ITMMASTER',N'U') AND OBJECT_ID(N'ITMFACILIT',N'U') = OBJECT_ID(QUOTENAME(SCHEMA_NAME())+N'.ITMFACILIT',N'U')",
                    "tableName": ""
                }
            ],
            "pages": [
                {
                    "actions": [
                        {
                            "id": "277887F1-432C-5BAC-8994-59B2DCB7B99B",
                            "kind": "showRelated",
                            "relatedInitiallyExpanded": false,
                            "relatedPresentation": "separate",
                            "relatedPreviewLimit": 12,
                            "relatedRowStyle": "cards",
                            "relatedShowsCount": true,
                            "relationID": "49C26CD2-DFBB-53AE-B38D-EF58F0E1B373",
                            "systemImage": "list.bullet.rectangle",
                            "targetDatasetID": "E5EB47F6-408C-5160-B595-FC596222CC58",
                            "title": "Posiciones de stock",
                            "urlKey": ""
                        },
                        {
                            "id": "7F5860E4-DB09-53FE-A344-698FAED0AEEB",
                            "kind": "showRelated",
                            "relatedInitiallyExpanded": false,
                            "relatedPresentation": "separate",
                            "relatedPreviewLimit": 12,
                            "relatedRowStyle": "cards",
                            "relatedShowsCount": true,
                            "relationID": "3B464D8E-4D3A-5F63-9DF9-AE857A175014",
                            "systemImage": "list.bullet.rectangle",
                            "targetDatasetID": "58C78464-CA07-538D-8C45-3754326480E3",
                            "title": "Ficha de producto",
                            "urlKey": ""
                        }
                    ],
                    "badgeKey": "",
                    "cardEnrichments": [],
                    "cardFieldLayout": [
                        {
                            "detailGroup": "",
                            "detailRole": "information",
                            "isVisible": true,
                            "key": "STOFCY_0",
                            "label": "Centro de stock",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic"
                        },
                        {
                            "detailGroup": "",
                            "detailRole": "information",
                            "isVisible": true,
                            "key": "STU_0",
                            "label": "Unidad de stock",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic"
                        },
                        {
                            "detailGroup": "",
                            "detailRole": "information",
                            "isVisible": true,
                            "key": "TCLCOD_0",
                            "label": "Categoría (código)",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic"
                        },
                        {
                            "detailGroup": "",
                            "detailRole": "information",
                            "isVisible": true,
                            "key": "TotalQty",
                            "label": "Cantidad total en posiciones",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic"
                        },
                        {
                            "detailGroup": "",
                            "detailRole": "information",
                            "isVisible": true,
                            "key": "AcceptedQty",
                            "label": "Interno aceptado (A*)",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic"
                        },
                        {
                            "detailGroup": "",
                            "detailRole": "information",
                            "isVisible": true,
                            "key": "QualityQty",
                            "label": "Interno en control (Q*)",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic"
                        },
                        {
                            "detailGroup": "",
                            "detailRole": "information",
                            "isVisible": true,
                            "key": "RejectedQty",
                            "label": "Interno rechazado (R*)",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic"
                        },
                        {
                            "detailGroup": "",
                            "detailRole": "information",
                            "isVisible": true,
                            "key": "OtherQty",
                            "label": "Otras posiciones",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic"
                        },
                        {
                            "detailGroup": "",
                            "detailRole": "information",
                            "isVisible": true,
                            "key": "MissingQtyRows",
                            "label": "Posiciones sin cantidad",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic"
                        }
                    ],
                    "datasetID": "8F71D99D-2C80-5BBB-B00E-D7AE2CCCAD54",
                    "dateFilterKey": "",
                    "dateFilterLastDays": 7,
                    "dateFilterPreset": "none",
                    "detailFieldLayout": [
                        {
                            "detailGroup": "",
                            "detailRole": "information",
                            "isVisible": true,
                            "key": "ITMREF_0",
                            "label": "Código de producto",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic"
                        },
                        {
                            "detailGroup": "",
                            "detailRole": "information",
                            "isVisible": true,
                            "key": "ITMDES1_0",
                            "label": "Producto",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic"
                        },
                        {
                            "detailGroup": "",
                            "detailRole": "information",
                            "isVisible": true,
                            "key": "STOFCY_0",
                            "label": "Centro de stock",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic"
                        },
                        {
                            "detailGroup": "",
                            "detailRole": "information",
                            "isVisible": true,
                            "key": "STU_0",
                            "label": "Unidad de stock",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic"
                        },
                        {
                            "detailGroup": "",
                            "detailRole": "information",
                            "isVisible": true,
                            "key": "TCLCOD_0",
                            "label": "Categoría (código)",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic"
                        },
                        {
                            "detailGroup": "",
                            "detailRole": "information",
                            "isVisible": true,
                            "key": "TotalQty",
                            "label": "Cantidad total en posiciones",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic"
                        },
                        {
                            "detailGroup": "",
                            "detailRole": "information",
                            "isVisible": true,
                            "key": "AcceptedQty",
                            "label": "Interno aceptado (A*)",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic"
                        },
                        {
                            "detailGroup": "",
                            "detailRole": "information",
                            "isVisible": true,
                            "key": "QualityQty",
                            "label": "Interno en control (Q*)",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic"
                        },
                        {
                            "detailGroup": "",
                            "detailRole": "information",
                            "isVisible": true,
                            "key": "RejectedQty",
                            "label": "Interno rechazado (R*)",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic"
                        },
                        {
                            "detailGroup": "",
                            "detailRole": "information",
                            "isVisible": true,
                            "key": "OtherQty",
                            "label": "Otras posiciones",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic"
                        },
                        {
                            "detailGroup": "",
                            "detailRole": "information",
                            "isVisible": true,
                            "key": "StockRows",
                            "label": "Número de posiciones",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic"
                        },
                        {
                            "detailGroup": "",
                            "detailRole": "information",
                            "isVisible": true,
                            "key": "MissingQtyRows",
                            "label": "Posiciones sin cantidad",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic"
                        },
                        {
                            "detailGroup": "",
                            "detailRole": "information",
                            "isVisible": true,
                            "key": "SAFSTO_0",
                            "label": "Stock de seguridad",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic"
                        },
                        {
                            "detailGroup": "",
                            "detailRole": "information",
                            "isVisible": true,
                            "key": "REOTSD_0",
                            "label": "Umbral de reposición",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic"
                        },
                        {
                            "detailGroup": "",
                            "detailRole": "information",
                            "isVisible": true,
                            "key": "MAXSTO_0",
                            "label": "Stock máximo configurado",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic"
                        }
                    ],
                    "detailLiveRefreshSeconds": 0,
                    "fixedFilters": [],
                    "id": "D3C6E554-19B5-532E-9F75-CC416FB17306",
                    "openFilters": [
                        {
                            "id": "F0537D4B-34BE-5B47-AD96-68187EECBA51",
                            "includeAllOption": false,
                            "key": "STOFCY_0",
                            "title": "Centro de stock",
                            "type": "text"
                        },
                        {
                            "id": "936EA125-964B-5F3C-A522-28793BDB010C",
                            "includeAllOption": true,
                            "key": "TCLCOD_0",
                            "title": "Categoría",
                            "type": "text"
                        }
                    ],
                    "pageSize": 100,
                    "requiresOpeningFilterSelection": true,
                    "showOnHome": true,
                    "sortRules": [
                        {
                            "direction": "ascending",
                            "id": "5DABC1F6-CF66-5E1B-8C0B-F65D21E6E363",
                            "key": "ITMREF_0",
                            "type": "text"
                        }
                    ],
                    "subtitle": "",
                    "subtitleKey": "ITMREF_0",
                    "systemImage": "shippingbox",
                    "title": "Existencias por producto y centro",
                    "titleKey": "ITMDES1_0"
                },
                {
                    "actions": [],
                    "badgeKey": "",
                    "cardEnrichments": [],
                    "cardFieldLayout": [
                        {
                            "detailGroup": "",
                            "detailRole": "information",
                            "isVisible": true,
                            "key": "LOC_0",
                            "label": "Ubicación",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic"
                        },
                        {
                            "detailGroup": "",
                            "detailRole": "information",
                            "isVisible": true,
                            "key": "LOT_0",
                            "label": "Lote",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic"
                        },
                        {
                            "detailGroup": "",
                            "detailRole": "information",
                            "isVisible": true,
                            "key": "STA_0",
                            "label": "Estado y subestado (código)",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic"
                        },
                        {
                            "detailGroup": "",
                            "detailRole": "information",
                            "isVisible": true,
                            "key": "QTYSTU_0",
                            "label": "Cantidad en unidad de stock",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic"
                        },
                        {
                            "detailGroup": "",
                            "detailRole": "information",
                            "isVisible": true,
                            "key": "STU_0",
                            "label": "Unidad de stock",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic"
                        },
                        {
                            "detailGroup": "",
                            "detailRole": "information",
                            "isVisible": true,
                            "key": "QTYPCU_0",
                            "label": "Cantidad en unidad de envase",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic"
                        },
                        {
                            "detailGroup": "",
                            "detailRole": "information",
                            "isVisible": true,
                            "key": "PCU_0",
                            "label": "Unidad de envase",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic"
                        }
                    ],
                    "datasetID": "E5EB47F6-408C-5160-B595-FC596222CC58",
                    "dateFilterKey": "",
                    "dateFilterLastDays": 7,
                    "dateFilterPreset": "none",
                    "detailFieldLayout": [
                        {
                            "detailGroup": "",
                            "detailRole": "information",
                            "isVisible": true,
                            "key": "ITMREF_0",
                            "label": "Código de producto",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic"
                        },
                        {
                            "detailGroup": "",
                            "detailRole": "information",
                            "isVisible": true,
                            "key": "ITMDES1_0",
                            "label": "Producto",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic"
                        },
                        {
                            "detailGroup": "",
                            "detailRole": "information",
                            "isVisible": true,
                            "key": "STOFCY_0",
                            "label": "Centro de stock",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic"
                        },
                        {
                            "detailGroup": "",
                            "detailRole": "information",
                            "isVisible": true,
                            "key": "LOC_0",
                            "label": "Ubicación",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic"
                        },
                        {
                            "detailGroup": "",
                            "detailRole": "information",
                            "isVisible": true,
                            "key": "LOCTYP_0",
                            "label": "Tipo de ubicación (código)",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic"
                        },
                        {
                            "detailGroup": "",
                            "detailRole": "information",
                            "isVisible": true,
                            "key": "LOT_0",
                            "label": "Lote",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic"
                        },
                        {
                            "detailGroup": "",
                            "detailRole": "information",
                            "isVisible": true,
                            "key": "SLO_0",
                            "label": "Sublote",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic"
                        },
                        {
                            "detailGroup": "",
                            "detailRole": "information",
                            "isVisible": true,
                            "key": "BPSLOT_0",
                            "label": "Lote del proveedor",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic"
                        },
                        {
                            "detailGroup": "",
                            "detailRole": "information",
                            "isVisible": true,
                            "key": "STA_0",
                            "label": "Estado y subestado (código)",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic"
                        },
                        {
                            "detailGroup": "",
                            "detailRole": "information",
                            "isVisible": true,
                            "key": "LOCCAT_0",
                            "label": "Categoría de ubicación",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic"
                        },
                        {
                            "detailGroup": "",
                            "detailRole": "information",
                            "isVisible": true,
                            "key": "QTYSTU_0",
                            "label": "Cantidad en unidad de stock",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic"
                        },
                        {
                            "detailGroup": "",
                            "detailRole": "information",
                            "isVisible": true,
                            "key": "STU_0",
                            "label": "Unidad de stock",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic"
                        },
                        {
                            "detailGroup": "",
                            "detailRole": "information",
                            "isVisible": true,
                            "key": "QTYPCU_0",
                            "label": "Cantidad en unidad de envase",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic"
                        },
                        {
                            "detailGroup": "",
                            "detailRole": "information",
                            "isVisible": true,
                            "key": "PCU_0",
                            "label": "Unidad de envase",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic"
                        },
                        {
                            "detailGroup": "",
                            "detailRole": "information",
                            "isVisible": true,
                            "key": "PCUSTUCOE_0",
                            "label": "Factor envase → stock",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic"
                        },
                        {
                            "detailGroup": "",
                            "detailRole": "information",
                            "isVisible": true,
                            "key": "CUMALLQTY_0",
                            "label": "Asignación detallada (cantidad)",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic"
                        },
                        {
                            "detailGroup": "",
                            "detailRole": "information",
                            "isVisible": true,
                            "key": "CUMWIPQTY_0",
                            "label": "Cantidad en proceso",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic"
                        },
                        {
                            "detailGroup": "",
                            "detailRole": "information",
                            "isVisible": true,
                            "key": "LPNNUM_0",
                            "label": "Contenedor (código)",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic"
                        },
                        {
                            "detailGroup": "",
                            "detailRole": "information",
                            "isVisible": true,
                            "key": "RCPDAT_0",
                            "label": "Fecha de entrada",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic"
                        },
                        {
                            "detailGroup": "",
                            "detailRole": "information",
                            "isVisible": true,
                            "key": "CUNLOKFLG_0",
                            "label": "Inventario en curso",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic"
                        }
                    ],
                    "detailLiveRefreshSeconds": 0,
                    "fixedFilters": [],
                    "id": "55EBF813-161F-50CB-B11E-A32B728CDA6C",
                    "openFilters": [],
                    "pageSize": 100,
                    "requiresOpeningFilterSelection": false,
                    "showOnHome": false,
                    "sortRules": [
                        {
                            "direction": "ascending",
                            "id": "72362BAE-E77B-57EB-8622-1E599DA096BA",
                            "key": "LOC_0",
                            "type": "text"
                        },
                        {
                            "direction": "ascending",
                            "id": "356AF07C-DC99-5398-B018-3AC79898F39D",
                            "key": "LOT_0",
                            "type": "text"
                        },
                        {
                            "direction": "ascending",
                            "id": "46CEA833-9C46-5049-9AAC-6B9954A3385D",
                            "key": "STOCOU_0",
                            "type": "number"
                        }
                    ],
                    "subtitle": "",
                    "subtitleKey": "ITMREF_0",
                    "systemImage": "shippingbox",
                    "title": "Posiciones de stock",
                    "titleKey": "ITMDES1_0"
                },
                {
                    "actions": [],
                    "badgeKey": "",
                    "cardEnrichments": [],
                    "cardFieldLayout": [
                        {
                            "detailGroup": "",
                            "detailRole": "information",
                            "isVisible": true,
                            "key": "TCLCOD_0",
                            "label": "Categoría (código)",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic"
                        },
                        {
                            "detailGroup": "",
                            "detailRole": "information",
                            "isVisible": true,
                            "key": "ITMSTA_0",
                            "label": "Estado del producto",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic"
                        },
                        {
                            "detailGroup": "",
                            "detailRole": "information",
                            "isVisible": true,
                            "key": "STU_0",
                            "label": "Unidad de stock",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic"
                        },
                        {
                            "detailGroup": "",
                            "detailRole": "information",
                            "isVisible": true,
                            "key": "SAU_0",
                            "label": "Unidad de venta",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic"
                        },
                        {
                            "detailGroup": "",
                            "detailRole": "information",
                            "isVisible": true,
                            "key": "PUU_0",
                            "label": "Unidad de compra",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic"
                        },
                        {
                            "detailGroup": "",
                            "detailRole": "information",
                            "isVisible": true,
                            "key": "EANCOD_0",
                            "label": "Código UPC / EAN",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic"
                        }
                    ],
                    "datasetID": "58C78464-CA07-538D-8C45-3754326480E3",
                    "dateFilterKey": "",
                    "dateFilterLastDays": 7,
                    "dateFilterPreset": "none",
                    "detailFieldLayout": [
                        {
                            "detailGroup": "",
                            "detailRole": "information",
                            "isVisible": true,
                            "key": "ITMREF_0",
                            "label": "Código de producto",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic"
                        },
                        {
                            "detailGroup": "",
                            "detailRole": "information",
                            "isVisible": true,
                            "key": "ITMDES1_0",
                            "label": "Producto",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic"
                        },
                        {
                            "detailGroup": "",
                            "detailRole": "information",
                            "isVisible": true,
                            "key": "ITMDES2_0",
                            "label": "Descripción 2",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic"
                        },
                        {
                            "detailGroup": "",
                            "detailRole": "information",
                            "isVisible": true,
                            "key": "ITMDES3_0",
                            "label": "Descripción 3",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic"
                        },
                        {
                            "detailGroup": "",
                            "detailRole": "information",
                            "isVisible": true,
                            "key": "TCLCOD_0",
                            "label": "Categoría (código)",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic"
                        },
                        {
                            "detailGroup": "",
                            "detailRole": "information",
                            "isVisible": true,
                            "key": "EANCOD_0",
                            "label": "Código UPC / EAN",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic"
                        },
                        {
                            "detailGroup": "",
                            "detailRole": "information",
                            "isVisible": true,
                            "key": "GTIN_0",
                            "label": "GTIN",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic"
                        },
                        {
                            "detailGroup": "",
                            "detailRole": "information",
                            "isVisible": true,
                            "key": "ITMSTA_0",
                            "label": "Estado del producto",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic"
                        },
                        {
                            "detailGroup": "",
                            "detailRole": "information",
                            "isVisible": true,
                            "key": "STU_0",
                            "label": "Unidad de stock",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic"
                        },
                        {
                            "detailGroup": "",
                            "detailRole": "information",
                            "isVisible": true,
                            "key": "SAU_0",
                            "label": "Unidad de venta",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic"
                        },
                        {
                            "detailGroup": "",
                            "detailRole": "information",
                            "isVisible": true,
                            "key": "PUU_0",
                            "label": "Unidad de compra",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic"
                        },
                        {
                            "detailGroup": "",
                            "detailRole": "information",
                            "isVisible": true,
                            "key": "SAUSTUCOE_0",
                            "label": "Factor venta → stock",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic"
                        },
                        {
                            "detailGroup": "",
                            "detailRole": "information",
                            "isVisible": true,
                            "key": "PUUSTUCOE_0",
                            "label": "Factor compra → stock",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic"
                        },
                        {
                            "detailGroup": "",
                            "detailRole": "information",
                            "isVisible": true,
                            "key": "ITMWEI_0",
                            "label": "Peso por unidad de stock",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic"
                        },
                        {
                            "detailGroup": "",
                            "detailRole": "information",
                            "isVisible": true,
                            "key": "WEU_0",
                            "label": "Unidad de peso",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic"
                        },
                        {
                            "detailGroup": "",
                            "detailRole": "information",
                            "isVisible": true,
                            "key": "SALFLG_0",
                            "label": "Se vende",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic"
                        },
                        {
                            "detailGroup": "",
                            "detailRole": "information",
                            "isVisible": true,
                            "key": "PURFLG_0",
                            "label": "Se compra",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic"
                        },
                        {
                            "detailGroup": "",
                            "detailRole": "information",
                            "isVisible": true,
                            "key": "DLVFLG_0",
                            "label": "Se entrega",
                            "locationLabelKey": "",
                            "locationLongitudeKey": "",
                            "presentation": "automatic"
                        }
                    ],
                    "detailLiveRefreshSeconds": 0,
                    "fixedFilters": [],
                    "id": "3D1D45AC-6DE9-550F-B8D2-8150AEBB48FA",
                    "openFilters": [],
                    "pageSize": 100,
                    "requiresOpeningFilterSelection": false,
                    "showOnHome": false,
                    "sortRules": [
                        {
                            "direction": "ascending",
                            "id": "5DABC1F6-CF66-5E1B-8C0B-F65D21E6E363",
                            "key": "ITMREF_0",
                            "type": "text"
                        }
                    ],
                    "subtitle": "",
                    "subtitleKey": "ITMREF_0",
                    "systemImage": "shippingbox",
                    "title": "Ficha de producto",
                    "titleKey": "ITMDES1_0"
                }
            ],
            "relations": [
                {
                    "childDatasetID": "E5EB47F6-408C-5160-B595-FC596222CC58",
                    "childKey": "ITMREF_0",
                    "id": "49C26CD2-DFBB-53AE-B38D-EF58F0E1B373",
                    "name": "Posiciones de stock",
                    "parentDatasetID": "8F71D99D-2C80-5BBB-B00E-D7AE2CCCAD54",
                    "parentKey": "ITMREF_0"
                },
                {
                    "childDatasetID": "58C78464-CA07-538D-8C45-3754326480E3",
                    "childKey": "ITMREF_0",
                    "id": "3B464D8E-4D3A-5F63-9DF9-AE857A175014",
                    "name": "Ficha de producto",
                    "parentDatasetID": "8F71D99D-2C80-5BBB-B00E-D7AE2CCCAD54",
                    "parentKey": "ITMREF_0"
                }
            ],
            "widgets": []
        }
    },
    "format": "cifru-configuration-package",
    "formatVersion": 1,
    "manifest": {
        "applicationName": "Sage X3",
        "configurationLanguages": [
            "es"
        ],
        "countries": [
            "ES"
        ],
        "createdAt": "2026-10-07T00:00:00Z",
        "description": "NO OFICIAL — NO VALIDADO EN UNA INSTALACIÓN ERP REAL.\n\nPara almacén, compras, ventas y responsables: selecciona un centro y, opcionalmente, categoría. Consulta productos y cantidades por centro, incluidos productos-centro sin posiciones. La ficha distingue stock interno aceptado, en control y rechazado, otras posiciones y cantidades desconocidas; muestra stock de seguridad, umbral de reposición y máximo configurado. Dos sub-botones abren sus posiciones reales (ubicación, lote, sublote, lote proveedor, estado, cantidades/unidades, asignación, proceso, contenedor y entrada) y la ficha actual de producto (descripciones, códigos UPC/EAN y GTIN, estado, unidades, conversiones, peso y aptitudes).\n\n¿Por qué Cifru? Adapta las configuraciones a tu forma de trabajar. Elige los campos, filtros y detalles que necesitas y lleva al móvil información que quizá no esté disponible en la aplicación móvil de tu software de gestión. Las opciones dependen de los datos accesibles en tu fuente autorizada y de tu plan Cifru.\n\nPro: una fuente SQL Server, tres listas y dos relaciones, SELECT explícitos, modo live sin actualización programada; máximo 2.000 filas por lista. Apertura nativa por centro antes del límite; posiciones delimitadas por producto y centro mediante parámetros, sin SQL de apertura obligatorio que bloquee descubrir centros. Las sumas se calculan en la fuente antes de limitar productos: el límite de filas NO limita el trabajo del GROUP BY ni garantiza una consulta barata. Verifica índices ITMREF/STOFCY, tiempo de consulta y volumen con el administrador. No demuestra completitud de posiciones si se alcanza el límite ni crea índices o vistas.\n\nCANTIDADES: total de QTYSTU en todas las posiciones del producto-centro, en STU. Interno solo LOCCAT=1; familias A*, Q*, R* incluyen subestados por su primera letra. Otras posiciones incluyen muelle, cliente, subcontratación y categorías/estados desconocidos. No se denomina disponible: no resta asignaciones ni suma pedidos, tránsito, déficits o previsiones. Q/R pueden ser asignables según configuración; no se deduce que sean siempre bloqueadas. Cero sin posiciones no equivale a cantidad desconocida: si existe un QTYSTU NULL, su total/categoría queda vacío y aumenta Posiciones sin cantidad. No se transforma NULL en cero.\n\nUNIDADES: QTYSTU/STU y QTYPCU/PCU se conservan por separado; PCUSTUCOE es el factor de esa posición. No se recalculan cantidades con factores actuales de compra/venta. La ficha de producto muestra valores maestros actuales, no históricos; peso por STU con su unidad. Los umbrales del producto-centro son valores configurados, no recomendación ni reposición calculada. No valoración monetaria ni precios sin moneda demostrada. No incluye cantidad activa/potencia, caducidades, historial de movimientos, todas las series o gestión de depósitos WRH. Centro no equivale a depósito; ubicación y lote no forman una clave única.\n\nREQUISITO: Sage X3 v12 SQL Server. El administrador confirma base y carpeta empresarial autorizadas y prepara un usuario dedicado con esquema predeterminado igual a esa carpeta y solo SELECT autorizado. No se presupone dbo/SEED ni se usa sa/sysadmin. OBJECT_ID compara tablas con el esquema predeterminado y rechaza dbo/guest/sys/INFORMATION_SCHEMA; una lectura vacía no demuestra la carpeta correcta. SQL no hereda automáticamente permisos de rol/centro de X3; los filtros no son control de acceso. El paquete no modifica usuarios, permisos, esquemas ni tablas. Confirma esquema, tipos, versión y vista previa real al importar.\n\nDiccionario v12 y regla SQL oficial campo_indice, no DDL ni esquema instalado. No se inventan PHYSTO/CTLSTO/REJSTO de pantallas como columnas ITMFACILIT, STU como columna STOCK, ni campos condicionados WRH/ECC/NUC. Códigos de menús desconocidos muestran Código N; estados de stock completos se conservan. Capturas Cifru nativas con transporte sintético y datos DEMO totalmente ficticios; no validadas en Sage X3 o SQL Server reales. Sin servidor, credenciales ni filas empresariales. No oficial, sin afiliación a Sage.\n\nFuentes primarias:\nhttps://online-help.sagex3.com/erp/12/en-us/Content/MCD/STOCK.htm\nhttps://online-help.sagex3.com/erp/12/en-us/Content/MCD/ITMMASTER.htm\nhttps://online-help.sagex3.com/erp/12/en-us/Content/MCD/ITMFACILIT.htm\nhttps://online-help.sagex3.com/erp/12/en-us/Content/MCD/MEN00246.htm\nhttps://online-help.sagex3.com/erp/12/en-us/Content/MCD/MEN02710.htm\nhttps://online-help.sagex3.com/erp/12/en-us/Content/MCD/MEN00001.htm\nhttps://online-help.sagex3.com/erp/12/en-us/Content/FCT/CONSSDE.htm\nhttps://online-help.sagex3.com/erp/12/en-us/Content/FCT/GESITF.htm\nhttps://online-help.sagex3.com/erp/12/en-us/Content/FCT/GESITM.htm\nhttps://online-help.sagex3.com/erp/12/en-us/Content/FCT/GESSTQ.htm\nhttps://online-help.sagex3.com/erp/12/en-us/Content/FCT/GESALQ.htm",
        "licenseCode": "Cifru-Community-1.0",
        "minimumCifruVersion": "1.1.0",
        "minimumPlan": "pro",
        "packageID": "C7BBEF87-4F72-5F3B-800C-E138A464BD81",
        "rootButtonCount": 1,
        "summary": "Centro y categoría; resumen de cantidades, ubicaciones/lotes, asignación y ficha actual del producto.",
        "tags": [
            "Sage X3",
            "SQL Server",
            "Stock",
            "Almacén",
            "Compras",
            "Productos",
            "Pro"
        ],
        "title": "Existencias por producto y centro — Pro"
    }
}

Tags

Reviews

There are no approved reviews for this version yet.

Write a review

Sign in to review

Similar templates

From the same application, then shared tags, in the same language and country.