From ee26ffe75c909f1863ab21705774d80dd2bcdfb7 Mon Sep 17 00:00:00 2001 From: jason Date: Mon, 23 Mar 2026 16:56:23 -0500 Subject: [PATCH] fixed --- README.md | 2 + app/purchase-orders/page.tsx | 20 +++----- app/sales-orders/page.tsx | 20 +++----- lib/actions.ts | 90 ++++++++++++++++++++++++++++++++---- lib/repository.ts | 23 +++++++++ lib/types.ts | 11 +++++ 6 files changed, 128 insertions(+), 38 deletions(-) diff --git a/README.md b/README.md index f7fd35d..c9fb1db 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,7 @@ Inven is a single-container inventory management system for Unraid-style deploym - Inventory is tracked through a transaction ledger - Sales orders can be created and shipped - Purchase orders can be created and received +- Sales orders and purchase orders are created from relational inventory line selections - Sales orders support partial shipments - Purchase orders support partial receipts - Invoices are generated from shipped sales orders @@ -73,6 +74,7 @@ Suggested Unraid mapping: - Add customers and vendors before creating orders. - Add parts and assemblies in the Parts module. - Define assembly components in the Assemblies module. +- Create SOs and POs by selecting actual inventory items from the item master instead of typing free-form SKUs. - Use purchase orders to restock and receive inventory. - Use build transactions to convert component stock into assembly stock. - Use sales orders and ship them fully or partially to reduce stock and generate invoices plus journal entries. diff --git a/app/purchase-orders/page.tsx b/app/purchase-orders/page.tsx index d723ae9..4a63ee4 100644 --- a/app/purchase-orders/page.tsx +++ b/app/purchase-orders/page.tsx @@ -1,9 +1,11 @@ -import { createPurchaseOrder, receivePurchaseOrder } from "@/lib/actions"; +import { receivePurchaseOrder } from "@/lib/actions"; +import { PurchaseOrderCreateForm } from "@/components/purchase-order-create-form"; import { formatCurrency, formatDate } from "@/lib/format"; -import { getLowStockParts, getPurchaseOrders, getVendors } from "@/lib/repository"; +import { getLowStockParts, getOrderItemOptions, getPurchaseOrders, getVendors } from "@/lib/repository"; export default function PurchaseOrdersPage() { const vendors = getVendors(); + const items = getOrderItemOptions(); const orders = getPurchaseOrders(); const lowStockParts = getLowStockParts(); @@ -12,18 +14,8 @@ export default function PurchaseOrdersPage() {

Create Purchase Order

-

Enter one line per row as `SKU,quantity,unit cost`.

-
-
- - -
-