Készlet és beszerzés
Elválasztja a fizikai készletet, foglalást és beérkezést, rögzített mozgásokkal követve beszerzést és visszárut.
inventory-procurement
Nézd meg, miben segítMikor hasznos?
Akkor használd, ha az elérhető készlet vagy beszállítói számla eltér a nyilvántartástól.
Miben segít neked?
- Megkülönbözteti a meglévő, foglalt, elérhető, bejövő és zárolt mennyiséget.
- Előzményátírás nélkül rögzíti a készletmozgásokat.
- Összekapcsolja a rendelést, bevételezést, számlát és visszáru sorsát.
Például ezt kérheted
Modellezz részleges beszállítást és sérült visszárut úgy, hogy a zárolt termék ne legyen eladható. Tízből hat egységet vételezz be, két visszaküldöttet zárolj. Mozgásokból vezesd le a szabad készletet, a zárolt tétel ne teljesíthessen új rendelést.
Részletes dokumentáció
Itt a skill eredeti útmutatóját, példáit és ellenőrzési szempontjait olvashatod az eredeti nyelven.
Összecsukás
Inventory & Procurement
When to Use
Use when designing or implementing product stock management, warehouse locations, order reservations, purchase orders, supplier goods receipts, stock adjustments, or customer/vendor returns.
1. Separate Physical Stock, Reservations, and Available-to-Promise
Never track inventory with a single mutable stock_count integer! Maintain distinct, auditable buckets per (tenant_id, warehouse_id, product_id):
- On-Hand (
qty_on_hand): Physical units currently sitting in the warehouse shelf/bin. - Reserved / Allocated (
qty_reserved): Units committed to confirmed, unshipped Sales Orders or active production/pick jobs. - Available / Available-to-Promise (
qty_available = qty_on_hand - qty_reserved): What can safely be promised/allocated to a new customer order right now without overselling. - Incoming / On-Order (
qty_incoming): Units on confirmed Supplier Purchase Orders not yet received. - Quarantined / Damaged (
qty_quarantined): Returned or damaged units awaiting inspection—excluded fromqty_available!
2. Append-Only Inventory Movement Ledger
Every change to qty_on_hand or qty_reserved must be backed by an immutable inventory_movements ledger entry—never allow ad-hoc UPDATE inventory SET qty_on_hand = 50 without a movement record:
- Required Movement Fields:
id,tenant_id,product_id,warehouse_id,movement_type(purchase_receipt,sales_reservation,sales_reservation_release,sales_shipment,customer_return,transfer_out,transfer_in,cycle_count_adjustment),qty_delta,reference_type(sales_order,purchase_order,fulfillment,rma,stock_count),reference_id,actor_id, andcreated_at. - Concurrency & Non-Negative Stock Guard:
- Lock the
(warehouse_id, product_id)stock balance row (SELECT ... FOR UPDATE) when reserving or shipping stock, and enforceqty_on_hand >= 0andqty_available >= 0(unless explicit backorder/negative-stock policy is enabled for that SKU).
- Lock the
3. Procure-to-Pay (Purchase Orders & Three-Way Match)
- Purchase Order (
PO) Lifecycle:draft$\rightarrow$pending_approval$\rightarrow$issued_to_vendor$\rightarrow$partially_received$\rightarrow$received$\rightarrow$closed. - Goods Receipt Note (
GRN): Receiving goods against aPOline incrementsqty_receivedon thePOline, decreasesqty_incoming, and posts apurchase_receiptmovement incrementingqty_on_hand. - Three-Way Match Readiness: Track
qty_ordered(PO) vs.qty_received(Goods Receipt) vs.qty_billed(Vendor Bill) per line so finance can detect over-billing or short deliveries.
4. Customer Returns (RMA) & Restocking Disposition
When a customer returns goods against a delivered order/fulfillment:
- Validate
qty_returned <= qty_delivered - qty_already_returned. - Require an explicit Disposition Decision on receipt:
restock$\rightarrow$ incrementsqty_on_hand(sellable).quarantine/scrap$\rightarrow$ routes toqty_quarantinedor posts a write-off movement without inflating sellable stock.
Csomagban lévő fájlok 1
SKILL.md
A skillcsomag bemutatása
inventory-procurement
inventory-procurement: Összehangolt ügyfél-, rendelés-, készlet- és riportadatokkal kapcsolja össze a CRM és ERP üzleti folyamatait.
Összecsukás
inventory-procurement
inventory-procurement: Összehangolt ügyfél-, rendelés-, készlet- és riportadatokkal kapcsolja össze a CRM és ERP üzleti folyamatait.
A teljes skillt és a hozzá tartozó fájlokat tartalmazza (1 fájl). Az alábbi eredeti leírás rögzíti a pontos alkalmazási területét.
A skill eredeti leírása (a forrás nyelvén)
Use when modeling ledger-backed inventory balances (on_hand, reserved, available, incoming), stock reservations, warehouse transfers, purchase orders (Procure-to-Pay), goods receipts, and returns (RMA).
Telepítsd a skillt, nézd át a forrását és a megbízhatósági beállításait, majd engedélyezd a megfelelő projektben vagy ügynöknél.
Előfeltételek
- A számítógépedre telepített Orqestria.
