> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vinmake.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Purchase Orders

> Procure materials from suppliers with direct cost and fixed cost POs

# Purchase Orders

<Info>
  **Status:** Shipped\
  **Module:** Sales & Commercial
</Info>

## Overview

The Purchase Orders module manages procurement from suppliers. Supports two PO types:

* **Direct Cost** - Pass-through costs billed to client (materials, shipping)
* **Fixed Cost** - Pre-negotiated rates (labor, overhead)

## User Stories

| ID   | Story                                                             | Priority | Status            |
| ---- | ----------------------------------------------------------------- | -------- | ----------------- |
| PO-1 | Create a PO for a supplier with materials, quantities, and prices | P0       | ✅ Shipped         |
| PO-2 | List POs filtered by status, supplier, or linked production order | P0       | ✅ Shipped         |
| PO-3 | Track PO types: Direct Cost vs Fixed Cost                         | P0       | ✅ Shipped         |
| PO-4 | Link a PO to a production order and sales order                   | P1       | ✅ Shipped         |
| PO-5 | Auto-generate POs from material requests                          | P2       | 🟡 In Development |
| PO-6 | See total PO value by supplier and period                         | P1       | ✅ Shipped         |

## PO Types

### Direct Cost PO

* Materials, shipping, import duties
* Billed directly to client
* Linked to sales order

### Fixed Cost PO

* Labor, overhead, fixed fees
* Pre-negotiated rates
* Not directly linked to specific sales order

## Screenshots

<Note>
  Screenshots to be added by Thai
</Note>

## API Reference

| Method | Path                           | Description    |
| ------ | ------------------------------ | -------------- |
| GET    | `/api/v1/purchase-orders`      | List all POs   |
| POST   | `/api/v1/purchase-orders`      | Create new PO  |
| GET    | `/api/v1/purchase-orders/{id}` | Get PO details |
| PUT    | `/api/v1/purchase-orders/{id}` | Update PO      |
| DELETE | `/api/v1/purchase-orders/{id}` | Delete PO      |

## Related Features

* [Material Requests](/features/detail/material-requests) - Auto-generate POs from approved requests
* [Suppliers](/features/detail/suppliers) - Vendor management
* [Bills](/features/detail/bills) - Track money owed for POs

## Release History

* **v1.0.0** - Initial release with direct and fixed cost POs
