Skip to main content

Introduction

The P.FLEX Inventory Management module provides complete lifecycle tracking and warehouse organization for manufacturing assets and finished products:

Clisés (Clichés)

Flexographic printing plates with usage metrics and maintenance tracking

Dies (Troqueles)

Cutting dies and tooling with compatibility management

Finished Goods

Quality-released product ready for dispatch

Architecture

Inventory data flows through Angular services with RxJS state management:
// inventory.service.ts - Core service
export class InventoryService {
  private _cliseItems = new BehaviorSubject<CliseItem[]>([]);
  private _dieItems = new BehaviorSubject<DieItem[]>([]);
  private _stockItems = new BehaviorSubject<StockItem[]>([]);
  private _layoutData = new BehaviorSubject<RackConfig[]>([]);

  get cliseItems$() { return this._cliseItems.asObservable(); }
  get dieItems$() { return this._dieItems.asObservable(); }
  get stockItems$() { return this._stockItems.asObservable(); }
  get layoutData$() { return this._layoutData.asObservable(); }
}
Reference: ~/workspace/source/src/features/inventory/services/inventory.service.ts:9-233

Key Features

Every item is mapped to physical warehouse racks using numeric range-based positioning:
  • Clisé Racks: CL-1 through CL-4 (ranges 861-2180)
  • Die Racks: TRQ-1 through TRQ-2 (ranges 1-200)
  • Finished Goods: Dispatch zones (DES-A, DES-B)
Visual rack layout mapping automatically updates as items are imported or relocated.
All inventory items maintain complete operation history:
export interface CliseHistory {
  date: string;
  type: 'Producción' | 'Mantenimiento' | 'Reparación' | 
        'Cambio Versión' | 'Creación' | 'Baja' | 'Otro';
  description: string;
  user: string;
  machine?: string;
  amount?: number;
}
Reference: ~/workspace/source/src/features/inventory/models/inventory.models.ts:2-9
Smart column mapping handles varied spreadsheet formats:
  • Flexible column names: Maps “ubicación”, “ubicacion”, “location” → same field
  • Validation: Flags missing required fields (código, cliente)
  • Preview modal: Review before committing changes
  • Conflict resolution: Manual review of incomplete records
Column mappings defined in inventory.service.ts:183-218
Dies and clisés can be explicitly linked for production planning:
  • Search and attach compatible dies to clisés
  • Auto-suggest based on Z-value (gear teeth) matching
  • Bidirectional references via linkedDies and linkedClises arrays
  • Visual compatibility indicators in detail modals

Components

Each inventory type has dedicated Angular components:
ComponentRoutePurpose
InventoryCliseComponent/inventory/cliseCliché management
InventoryDieComponent/inventory/dieDie/tooling management
InventoryStockComponent/inventory/stockFinished goods control
InventoryMapComponent/inventory/mapWarehouse visualization
All components are standalone and use the InventoryService for state management via observables.

Data Flow

Best Practices

1

Use Structured Locations

Follow naming conventions: CL-1-A-01 (Rack-Level-Zone-Position)
2

Maintain History Records

Log all operations (production runs, maintenance, repairs) in the history array
3

Regular Usage Updates

Update mtl_acum (accumulated meters) after production to trigger maintenance alerts
4

Link Compatible Tooling

Cross-reference dies with clisés to enable production planning

Status Indicators

Inventory items display real-time status:
OK
status
Item is production-ready with no issues
MANT.
status
Maintenance required (e.g., clisé exceeds 500,000 meters usage)
REVISAR
status
Data conflict or validation issue requiring manual review
Desgaste
status
Die showing wear, may need replacement soon
Dañado
status
Item damaged and unavailable for production

Next Steps

Cliché Management

Learn about printing plate inventory

Die Management

Manage cutting tools and troqueles

Stock Control

Track finished goods inventory

Rack Layout

Visualize warehouse organization

Build docs developers (and LLMs) love