Skip to content

Purchasing ​

Suppliers and their prices, purchase orders emailed as a PDF and received into the warehouse at their cost, and a replenishment list of what fell under its reorder point.

kitloom/purchasing · admins: kitloom/purchasing-filament, kitloom/purchasing-nova

Video lessons ​

Recorded in the Filament admin; the Nova admin works the same way.

Buying for the warehouse. Keep the suppliers you buy from and what each of them sells you at what price; place a purchase order, email it to the supplier as a PDF, and receive the goods into kitloom/inventory when they come — all at once or a box at a time — at the order's price, which moves the items' average cost. A replenishment list says what fell under its reorder point, from whom to buy it and how many, and turns into orders in one click.

Suppliers ​

Suppliers and their prices

Purchasing → Suppliers. Someone you buy from: a wholesaler, a brewery, a maker. A supplier has a code (ACME, made from the name when you leave it empty), an email address — where the purchase orders go —, a phone, a website, an address, the currency it bills in, its payment terms as it words them ("Net 30"), and its lead time in days, which sets when a new order is expected. A supplier you no longer use is made inactive, never deleted: its orders stay readable.

Under each supplier:

  • Contacts — the people there: the sales representative, the accounts clerk, with their email, phone and role.
  • Items — what it supplies: an item of the warehouse under the supplier's own code (printed on the order), at its price, in the smallest quantity it takes, with its own lead time. Mark one supplier of an item preferred: replenishment buys the item there. Without one, it buys from the cheapest active supplier.

A purchase order ​

A purchase order, from draft to received

Purchasing → Purchase orders. An order goes:

  1. Draft — pick the supplier and add lines: an item, how many, the price (the supplier's price for the item when you leave it empty) and the tax rate. The subtotal, tax and total follow. The order is received into the location set in Settings, or the default warehouse of Inventory; change it on the order.
  2. Send — the order is emailed to the supplier's address as a PDF: your site's name and the shop's store address, where to deliver, the lines under the supplier's codes, the totals, the payment terms and the footer from Settings. The order becomes sent; sending again after a change sends the new version.
  3. Confirm — when the supplier says yes (or straight from a draft, when you ordered by phone). The warehouse gets a receipt for the order with a line per order line, and from now on its goods count as incoming: replenishment does not suggest them twice. The lines no longer change.
  4. Receive — when the goods come, count them in per line. They enter the warehouse at the line's price, and the item's average cost moves. A delivery that came short leaves the rest on a new receipt, still expected: the order is partial until every line is in, then received.

Cancel calls off an order that is not yet received: what the warehouse still expected on it is no longer incoming. What came in already stays.

Replenishment ​

What to reorder, in one click

Purchasing → Replenishment. Every active item whose units available, with those on their way, are at or under its reorder point (set on the item in Inventory). For each: what is available and incoming, how many to order — the item's reorder quantity, else what brings it back over the point, and never less than the supplier's smallest order — and the supplier it is bought from, with the price. Tick the lines and Make purchase orders: one draft per supplier. An item nobody supplies is listed without a supplier and left out.

Every morning purchasing:replenishment looks at the same list and, when anything is due, tells you in one summary (with kitloom/notifications).

Settings ​

Purchasing → Settings. Where new orders are received (0 — the default warehouse of Inventory), and the footer printed under every purchase order: your terms, the delivery hours, who to call.

Permissions ​

manage_purchasing keeps the suppliers and places, sends, confirms, receives and cancels orders; view_purchasing looks. The roles that run the warehouse hold the first, those that look at its stock the second. Confirming, receiving and cancelling write the warehouse's receipt as the same person, so they ask Manage inventory too.

For AI agents ​

With kitloom/ai, an agent with view_purchasing reads the suppliers and their prices (purchasing_suppliers), the orders (purchasing_orders) and what to buy (purchasing_replenishment); one with manage_purchasing drafts an order (purchasing_order_create), confirms it (purchasing_order_confirm) and receives its goods (purchasing_order_receive). Sending the email stays with a person in the admin.

Also ​

With kitloom/spreadsheets the suppliers and their price lists go out and come in as CSV or Excel (a price list by supplier code and SKU), and the purchase orders go out. With kitloom/notifications you are told when goods of an order are received, and each morning what to reorder. With kitloom/webhooks other systems hear purchase_order.confirmed and purchase_order.received. Export and Erase Personal Data find a person among the suppliers' contacts by their email; the supplier, a business, stays.

For developers ​

WhatWhere
Tablessuppliers, supplier_contacts, supplier_items, purchase_orders, purchase_order_lines (the site's table prefix in front)
ModelsSupplier, SupplierContact, SupplierItem, PurchaseOrder, PurchaseOrderLine in Kitloom\Purchasing\Models, through the ModelRegistry (keys supplier, supplier_contact, supplier_item, purchase_order, purchase_order_line)
WritesSuppliers (suppliers, contacts, offer()), PurchaseOrders (draft, addLine, send, confirm, receive, cancel), Replenishment (suggestions, makeOrders) — each with the acting user
EventsPurchaseOrderConfirmed, PurchaseOrderReceived, PurchaseOrderCancelled, ReplenishmentDue
The PDFthe view kitloom-purchasing::pdf.purchase-order, drawn by dompdf; php artisan vendor:publish --tag=kitloom-purchasing-views to change it
Configurationconfig/kitloom-purchasing.php: the schedule, the PDF's paper, and a switch per optional part (AI, notifications, webhooks, sheets, privacy, both admins)

A purchase order's receipt in kitloom/inventory names it as its source (source_type purchase_order), the supplier as its partner, and each line's move carries the order's number and the line's position as its reference (PO-000031/2). Receive through the order, so its lines and status follow.

Tests ​

From the application that installs the package: php vendor/bin/phpunit --testsuite Purchasing.

Read more ​

kitloom — modules and themes for Laravel.
Contact · Pricing · Services · License · Refunds · Privacy · Community · YouTube · [email protected]