Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/ElthonJohan/Sistema-MRP/llms.txt

Use this file to discover all available pages before exploring further.

Sistema MRP organises material flow in four sequential steps: a requirement is raised at a work-site warehouse, available stock is reserved in the principal warehouse, a dispatch moves that stock out with a Guía de Remisión, and a receipt confirms arrival at the obra. Every step is traceable through movement records, and pending requirements are automatically re-evaluated whenever new stock arrives.

The four-step cycle

Requirement → Stock Reservation → Dispatch (OUT movement) → Receipt at work site (IN movement)
Each arrow maps to a service call:
StepServiceMovement
Requirementrequirement_service.create_requirement()— (reservation only)
Dispatchdispatch_service.create_dispatch()OUT on principal warehouse
Receiptreceipt_service.create_receipt()IN on obra warehouse

Statuses

Requirement statuses

StatusMeaning
pendingCreated; no dispatch has been issued yet. Items may be reserved or pending.
partialAt least one dispatch exists but not all requested quantities have been dispatched.
fulfilledAll items have been fully dispatched.
cancelledCancelled manually; all reserved stock has been released.

RequirementItem statuses

StatusMeaning
reservedStock has been successfully reserved in the principal warehouse.
pendingInsufficient stock at reservation time; item is waiting for stock.
partialSome quantity has been dispatched but not the full amount.
fulfilledThe full requested quantity has been dispatched.

Stock invariant

At all times the following relationship holds for every Inventory record in the principal warehouse:
available = stock - reserved
reserve_stock() checks stock - reserved >= requested_qty before incrementing reserved. It does not commit — the caller commits after all items in the requirement are processed. This keeps the reservation atomic across multiple materials.

Step-by-step pages

Warehouses & Materials

Set up the principal warehouse and obra warehouses, then register materials with unit prices.

Inventory

Add stock to the principal warehouse, view reservations, and handle frozen records.

Requirements

Create material requirements linked to a project and monitor automatic stock reservation.

Dispatches

Generate dispatches from requirements, decrement stock, and download the Guía de Remisión PDF.

Receipts

Confirm material arrival at the obra warehouse and record the IN movement.
Whenever stock is added to the principal warehouse, inventory_service.add_stock() automatically calls reprocess_requirements(). This function scans all pending and partial requirements and attempts to reserve stock for any items still in pending status — no manual intervention is needed.

Build docs developers (and LLMs) love