Receive a purchase order
In this tutorial you buy 100 units from a supplier. The supplier delivers 60 units first and 40 units later. You see how each receipt changes the stock and the average cost.
What you need
- A location that receives stock, for example a warehouse.
- A product that you can purchase. Read Add products and prices.
- A permission to manage purchase orders. The owner and the
Managerrole have it.
Steps
Create a supplier
Open the suppliers page and add a supplier. Enter a title, a short code, and a contact person with an email address. You can also add the payment terms, the default lead time in days, the default currency, and the address that the goods come from.
Link the supplier to the product
Open the product and add the supplier. Mark it as the primary supplier. You can also enter the supplier part number, the last quoted price, the lead time, and the minimum order quantity. A new purchase order line uses these values as its defaults.
Create the purchase order
Open the purchase orders page and create an order. Select the supplier, the destination location, and the currency. Add a line for the product: 100 units at the unit cost.
The new order has the status Draft. You can still change it.
Send and confirm the order
Send the order to the supplier, and change the status to Ordered. When the supplier accepts the order, change the status to Confirmed.
Receive the first delivery
The supplier delivers 60 units. Open the order and record a receipt. Enter 60 as the received quantity. If some units are damaged, enter them as rejected. You can also enter the actual unit cost if it differs from the order.
Miridia then does three things:
- It adds a purchase movement of 60 units to the inventory ledger of the destination location.
- It recalculates the weighted average cost of the product at that location.
- It changes the order status to
PartiallyReceived.
Receive the second delivery
The supplier delivers the other 40 units. Record a second receipt for 40 units. The order status changes to Received.
Read the ledger
Open the product inventory at the destination location. The movement list shows the two purchase movements. Each movement shows the quantity, the running balance after the movement, and a link to the purchase order.
The ledger never changes a movement. A correction is a new adjustment movement with a reason. Thus the ledger is the audit record of what arrived and when.
Close the order
When the order is complete, change the status to Closed. You can also cancel an order that the supplier cannot deliver.
| Action | Request |
|---|---|
| Create a supplier | POST /api/v1/suppliers |
| Link a supplier to a product | POST /api/v1/Products/{productId}/suppliers |
| Create a purchase order | POST /api/v1/purchase-orders |
| Change the status | PATCH /api/v1/purchase-orders/{purchaseOrderId} |
| Record a receipt | POST /api/v1/purchase-orders/{purchaseOrderId}/receipts |
| Read the ledger | GET /api/v1/inventory/{inventoryRecordId}/movements |
{
"supplierId": "<supplier-id>",
"destinationLocationId": "<location-id>",
"currencyCode": "ZAR",
"items": [
{ "productId": "<product-id>", "quantityOrdered": 100, "unitCost": 18.5 }
]
}
{
"status": "Ordered"
}
{
"lines": [
{ "productId": "<product-id>", "quantityReceived": 60, "quantityRejected": 0 }
]
}
Read the Purchase orders reference and the Suppliers reference.