Skip to main content

Overview

The Reservations module allows you to allocate parts to accepted work orders before they’re consumed. This ensures parts are available when needed and provides accurate planning visibility.

Reservation Concept

Reservations create a “soft allocation” of inventory:
Before Reservation:
  On-Hand: 20 units
  Reserved: 0 units
  Available: 20 units

After Reserving 5 for Work Order #1234:
  On-Hand: 20 units (unchanged)
  Reserved: 5 units
  Available: 15 units (reduced)

After Issuing the 5 Reserved Units:
  On-Hand: 15 units (reduced)
  Reserved: 0 units (released)
  Available: 15 units (unchanged)
Reservations do not physically move parts. They only mark quantities as committed to specific work orders.

Accessing Reservations

Navigate to Inventory > Reservas por OT (/inventory/reservations) to manage work order reservations.
Requires inventory:read to view. Operations require inventory:work, inventory:create, or inventory:full_access.

Reservation Workflow

1

Work Order Accepted

Maintenance planner accepts a work request, creating a work order:
Ticket #1234: Monthly PM on Pump A
Status: ACCEPTED
Assigned: John Smith
Scheduled: 2024-03-15
2

Navigate to Reservations

Go to Inventory > Reservas por OT.
3

Select Work Order

Choose the accepted work order from the dropdown:
  • Filters to show only ACCEPTED status tickets
  • Displays ticket ID, title, requester
  • Shows current status and priority
4

Add Part Requirement

Click Agregar repuesto or similar:
  • Select part from catalog
  • Enter quantity needed
  • Choose warehouse
  • Select bin location
The system validates sufficient available stock before allowing reservation.
5

Reserve Part

Click Reservar to commit the allocation:
await inv().rpc('reserve_ticket_part', {
  p_ticket_id: ticketId,
  p_part_id: partId,
  p_warehouse_id: warehouseId,
  p_bin_id: binId,
  p_qty: quantity
});
System updates:
  • reserved_qty increases
  • available_qty decreases
  • Reservation record created
6

Repeat for All Parts

Add all parts needed for the work order.
7

Review Reservations

The panel shows all reserved parts:
  • Part code and name
  • Quantity reserved
  • Warehouse and bin
  • Reservation date
  • Actions (unreserve, issue)

Reservation States

Part Needed but Not ReservedPlanner has identified need but hasn’t reserved:
  • Part appears in work order plan
  • No inventory commitment
  • Available stock unchanged
Action: Reserve the part to commit stock

Issuing Reserved Parts

When technician is ready to use parts:
1

Start Work

Technician begins work order execution.
2

Access Reservations

Open Inventory > Reservas por OT and select the ticket.
3

Click Issue Button

For each reserved part, click Consumir or Issue:System creates ISSUE document:
Document Type: ISSUE
Status: DRAFT
Ticket ID: 1234
Warehouse: WH-MAIN

Lines:
- Part: Hydraulic Pump
- Qty: 1
- From Bin: A-01-05
4

Review and Post

System may auto-post or require manual posting:
  • Validates sufficient stock
  • Reduces on-hand quantity
  • Releases reservation
  • Updates available quantity
5

Partial Issue (Optional)

Can issue less than reserved:
Reserved: 10 filters
Issue: 8 filters
Remaining Reserved: 2 filters

Unreserving Parts

If plans change before consumption:
1

Access Reservation

Navigate to the work order in reservations page.
2

Click Unreserve

Click Liberar or Unreserve button.
3

Confirm Action

Confirm in dialog.
4

Stock Released

System updates:
Before:
  On-Hand: 20
  Reserved: 5 (for this ticket)
  Available: 15

After Unreserve:
  On-Hand: 20 (unchanged)
  Reserved: 0
  Available: 20 (increased)
Unreserving makes parts available for other work orders or general use.

Returning Parts

If parts weren’t used or were over-issued:
1

Create RETURN Document

Navigate to Inventory > Documentos de inventario.Click Nuevo documento → Select RETURN.
2

Fill Document Header

  • Warehouse: Where parts are returning
  • Ticket ID: Source work order (optional)
  • Reference: Return reason
  • Notes: Part condition
3

Add Lines

For each part:
  • Select part
  • Enter quantity
  • Choose destination bin
4

Post Document

Click Postear:
  • Increases on-hand quantity
  • Parts back in available stock
  • Ledger entry created

Service Functions

Reservation operations:
import { inv } from '@/services/inventory/inventoryClient';

// Reserve part for work order
await inv().rpc('reserve_ticket_part', {
  p_ticket_id: 1234,
  p_part_id: partId,
  p_warehouse_id: warehouseId,
  p_bin_id: binId,
  p_qty: 5
});

// List accepted work orders (for reservation)
import { listAcceptedWorkOrders } from '@/services/inventory/inventoryRequests';
const tickets = await listAcceptedWorkOrders(300);

// Get part requests for a ticket
import { listTicketPartRequests } from '@/services/inventory';
const requests = await listTicketPartRequests(ticketId);

Reservation Constraints

Work Order Status

Can only reserve parts for work orders in ACCEPTED status.
Status validation:
  • REQUESTED: Cannot reserve (not approved)
  • ACCEPTED: Can reserve ✓
  • IN_PROGRESS: Can reserve ✓
  • COMPLETED: Cannot reserve (work done)
  • CANCELLED: Cannot reserve

Stock Availability

Cannot reserve more than available quantity.
Validation:
IF (requested_qty > available_qty) THEN
  RAISE EXCEPTION 'Insufficient available stock. Available: %, Requested: %',
    available_qty, requested_qty;
END IF;
If insufficient:
  • Check current reservations
  • Review reorder suggestions
  • Create purchase order
  • Wait for receipt

Multi-Part Reservations

For complex work orders requiring multiple parts:
1

Identify All Parts

Review work order requirements:
  • Bill of materials (BOM)
  • Historical usage
  • Technician estimates
  • Preventive maintenance schedules
2

Check Availability

Verify stock for all parts:
Part A: Need 5, Available 20 ✓
Part B: Need 3, Available 2 ✗
Part C: Need 10, Available 15 ✓
3

Partial Reservation

Reserve what’s available:
  • Part A: Reserve 5
  • Part B: Order 1 more, reserve 2 now
  • Part C: Reserve 10
4

Complete Reservation

After receiving Part B:
  • Reserve remaining 1 unit
  • Work order fully prepared

Reservation Reports

Current Reservations by Work Order

View all active reservations:
SELECT 
  t.id AS ticket_id,
  t.title,
  p.code AS part_code,
  p.name AS part_name,
  tpr.qty_reserved,
  w.code AS warehouse,
  wb.code AS bin
FROM ticket_part_requests tpr
JOIN tickets t ON tpr.ticket_id = t.id
JOIN parts p ON tpr.part_id = p.id
JOIN warehouses w ON tpr.warehouse_id = w.id
LEFT JOIN warehouse_bins wb ON tpr.bin_id = wb.id
WHERE tpr.qty_reserved > 0
  AND t.status = 'ACCEPTED'
ORDER BY t.id, p.code;

Parts Reserved by Warehouse

See total reserved quantities:
SELECT 
  w.code AS warehouse,
  p.code AS part_code,
  p.name AS part_name,
  SUM(tpr.qty_reserved) AS total_reserved
FROM ticket_part_requests tpr
JOIN parts p ON tpr.part_id = p.id
JOIN warehouses w ON tpr.warehouse_id = w.id
WHERE tpr.qty_reserved > 0
GROUP BY w.code, p.code, p.name
ORDER BY total_reserved DESC;

Best Practices

Reserve Early

Reserve when work order accepted:
  • Ensures part availability
  • Improves planning accuracy
  • Reduces work delays
  • Triggers procurement if needed

Accurate Quantities

Reserve exactly what’s needed:
  • Review bill of materials
  • Consult with technicians
  • Include buffer (5-10%)
  • Don’t over-reserve (locks stock)

Timely Issues

Issue parts when work starts:
  • Don’t issue too early
  • Issue same day as work
  • Maintains stock accuracy
  • Releases reservations promptly

Return Unused

Always return excess:
  • Improves stock accuracy
  • Makes parts available
  • Maintains inventory value
  • Supports future planning

Common Scenarios

Scenario 1: Preventive Maintenance

Work Order: PM-Pump-A-2024-03
Scheduled: March 15, 2024

Parts Needed:
- Oil Filter × 2
- Hydraulic Oil × 5 gallons
- Seal Kit × 1

Workflow:
1. Accept work order (March 8)
2. Reserve all parts immediately
3. Verify reservation before scheduling
4. Technician picks up parts (March 15)
5. Issue parts during work
6. Return unused filter (1 extra)

Scenario 2: Emergency Repair

Work Order: EM-Motor-Failure-789
Status: ACCEPTED (emergency)
Priority: CRITICAL

Parts Needed:
- Motor Bearing × 1

Workflow:
1. Accept work order immediately
2. Attempt to reserve bearing
3. If unavailable:
   - Check other warehouses
   - Expedite procurement
   - Consider alternatives
4. Reserve when available
5. Issue immediately
6. Complete work

Scenario 3: Planned Shutdown

Work Order: SD-Annual-2024
Duration: 1 week
Multiple Assets

Parts Needed: 50+ items

Workflow:
1. Create comprehensive part list
2. Reserve all parts 2 weeks ahead
3. Identify shortages
4. Expedite procurement
5. Stage parts in designated area
6. Issue as consumed during shutdown
7. Return all unused to inventory
8. Cycle count after shutdown

Troubleshooting

Reservation Fails: Insufficient Stock

Error: “Cannot reserve 10 units. Only 5 available.” Solutions:
  1. Check current on-hand and reserved
  2. Review other reservations (may be over-allocated)
  3. Check reorder suggestions
  4. Create emergency purchase order
  5. Reserve partial quantity now, rest later

Ghost Reservations

Issue: Parts reserved but work order completed/cancelled Solution:
  1. Navigate to reservations page
  2. Select completed/cancelled work orders
  3. Unreserve all parts
  4. Create scheduled cleanup task

Over-Issue Without Reservation Release

Issue: Parts issued but reservation remains Cause: Manual ISSUE document without ticket_id link Solution:
  1. Manually unreserve from reservations page
  2. Or link ticket_id to ISSUE document before posting

Stock Management

Understand reserved vs. available quantities

Documents

Create ISSUE and RETURN documents

Work Orders

Manage work order lifecycle

Parts

View part details and usage