v1
Materials
Materials

Allocate Stock To Project

Changed on

Claim shop stock for a project - the financial event, split by lot.

ONE MIRRORED BOM ROW PER LOT CONSUMED, never one row for the whole claim. A part restocked three times is three lots at three prices under three INY- POs. Collapsing 12 units into a single row at an averaged price destroys the only thing that makes a claim auditable: which purchase order the metal on this job actually came from, and what it truly cost. That trace runs from a finished weld back to a dock inspection and an MTR, and an average has no MTR behind it.

So each row carries its OWN lot's po_number and unit_price, and the project materials table groups them by PO exactly like a vendor purchase - which is what makes "click through to the receiving log" work with no new screen.

FIFO, oldest lot first: the shop consumes what it bought first, and the cost it books is the cost that lot was bought at.

post/api/v1/materials/inventory/allocate

Request

  • Base URL
    https://api.jeevyfabrication.com (the document declares no server; this is the origin it was published from)
  • Auth
    none declared

Request body

AllocateStockBody required
material_item_id, integer required
project_id, integer required
material_list_id, integer nullable
qty, number required
task_id, integer nullable
bom_node_id, string nullable
serial_ids, string[] nullable
lot_picks, LotPickBody[] nullable
new_lot_number, string nullable

Response

Successful Response

object required

Changes

    • info

      added the new optional request property lot_picks

    • info

      added the new optional request property new_lot_number

    • info

      added the new optional request property serial_ids