El modelo de inventario de Netzo se basa en una regla fundamental:
El sistema no existe para ajustar saldos, sino para registrar hechos reales y derivar el inventario a partir de ellos.
flowchart LR
%% ===== Tabla-T SIMPLE CON COLORES, NOTAS E ICONOS =====
%% Ledger
subgraph T["📘 Ledger (libro historico) de inventario"]
direction LR
IN["➕ Entradas"]
OUT["➖ Salidas"]
end
%% Total físico
IN ---> TOTAL["📊 En Existencia
(Total físico en almacén)"]
OUT ---> TOTAL
%% Segmentos
TOTAL --> DISP["🟢 Disponible
(Puede utilizarse)"]
TOTAL --> RES["🟡 Reservado
(Comprometido por operaciones en curso)"]
TOTAL --> BLOQ["🔴 Bloqueado
(Bloqueado por motivos operativos)"]
%% Notas
T -.-> N1["ℹ️ Hechos físicos: recepciones, producción, devoluciones, despachos, consumos, eliminaciones"]
TOTAL -.-> N3["ℹ️ El inventario no se edita. Se deriva del ledger (libro historico)."]
%% Colores
classDef ledger fill:#EEF2FF,stroke:#4F46E5,stroke-width:1px;
classDef total fill:#E0F2FE,stroke:#0284C7,stroke-width:1px;
classDef available fill:#ECFDF5,stroke:#16A34A,stroke-width:1px;
classDef reserved fill:#FEF3C7,stroke:#D97706,stroke-width:1px;
classDef blocked fill:#FEE2E2,stroke:#DC2626,stroke-width:1px;
classDef note fill:#F8FAFC,stroke:#94A3B8,stroke-dasharray: 3 3;
class IN,OUT ledger;
class TOTAL total;
class DISP available;
class RES reserved;
class BLOQ blocked;
class N1,N2,N3 note;
Cada almacén mantiene una Tabla-T, un ledger (libro historico) compuesto únicamente por dos tipos de registros:
No existen otros mecanismos válidos para modificar inventario.
flowchart LR
%% =====================================================
%% OPERACIONES DE INVENTARIO - ENTRADAS Y SALIDAS
%% MODELO Tabla-T / LEDGER POR ALMACÉN
%% =====================================================
%% ===== LEDGER =====
subgraph L["📘 Ledger (libro historico) de inventario"]
direction LR
IN["➕ Entradas"]
OUT["➖ Salidas"]
end
%% ===== ENTRADAS =====
subgraph EIN["📥 Operaciones de Entrada"]
E_PROV["🛒 Entrada por Proveedor"]
E_PROD["🏭 Entrada por Producción"]
E_DEV_CLI["↩️ Devolución de Cliente"]
E_TRASP["🔁 Entrada por Traspaso"]
E_CROSS["⚡ Cross-Docking"]
end
%% ===== SALIDAS =====
subgraph EOUT["📤 Operaciones de Salida"]
S_VTA["🧾 Salida por Venta"]
S_PROD["🏭 Salida a Producción"]
S_DEV_PROD["↩️ Devolución a Producción"]
S_DEV_PROV["↩️ Devolución a Proveedor"]
S_TRASP["🔁 Salida por Traspaso"]
end
%% ===== CONEXIONES AL LEDGER =====
E_PROV --> IN
E_PROD --> IN
E_DEV_CLI --> IN
E_TRASP --> IN
E_CROSS --> IN
OUT --> S_VTA
OUT --> S_PROD
OUT --> S_DEV_PROD
OUT --> S_DEV_PROV
OUT --> S_TRASP
%% ===== RESULTADO =====
IN --> TOTAL["📊 Total físico
(en existencia)"]
OUT --> TOTAL
%% ===== NOTAS CONCEPTUALES =====
IN -.-> N1["ℹ️ Todas las entradas representan inventario que INGRESA físicamente al almacén"]
OUT -.-> N2["ℹ️ Todas las salidas representan inventario que SALE físicamente del almacén"]
TOTAL -.-> N3["ℹ️ El inventario no se edita, se deriva automaticamente del ledger"]
%% ===== ESTILOS =====
classDef ledger fill:#EEF2FF,stroke:#4F46E5,stroke-width:1px;
classDef entry fill:#ECFDF5,stroke:#16A34A,stroke-width:1px;
classDef exit fill:#FEE2E2,stroke:#DC2626,stroke-width:1px;
classDef total fill:#E0F2FE,stroke:#0284C7,stroke-width:1px;
classDef note fill:#F8FAFC,stroke:#94A3B8,stroke-dasharray: 3 3;
%% Estilo del subgraph (ledger)
classDef ledger fill:#E0F2FE,stroke:#0284C7,stroke-width:2px;
class L ledger;
class IN,OUT ledger;
class E_PROV,E_PROD,E_DEV_CLI,E_TRASP,E_CROSS entry;
class S_VTA,S_PROD,S_DEV_PROD,S_DEV_PROV,S_TRASP exit;
class TOTAL total;
class N1,N2,N3 note;
El total físico es el saldo neto del ledger (libro historico):
Este valor:
El total físico derivado se clasifica operativamente para indicar su disponibilidad.
| Segmento | Indica |
|---|---|
| Disponible | Puede utilizarse o despacharse |
| Reservado | Comprometido para una operación futura |
| Bloqueado | Temporalmente no utilizable |
Los segmentos:
El almacén es el contexto del ledger (libro historico).
Cada almacén tiene:
No existe inventario fuera de un almacén.
Un traspaso no mueve inventario entre almacenes como un solo evento.
Se representa como dos hechos físicos independientes:
Cada hecho se registra en su propio ledger (libro historico).