Procurement system
Procurement & Tank Stock System
A procurement and inventory system for a bulk edible-oil buyer. It tracks every load from contract to storage tank, calculates transit shortages and debits, manages import licences, and surfaces live SAP finance reports.
- Client
- Edible-oil processor
- Year
- 2026
- Type
- Procurement system
✦ How AI is used here
- AI chat over operations data. The procurement team asks about stock, tank levels, shortages and prices in plain English, answered by an LLM over the live tables.
- Automated data pipelines. Daily price sheets, contract spreadsheets and exchange rates are imported and validated without manual copying.
Overview
Buying bulk raw oil means tracking hundreds of loads across ports, refineries, trucks and storage tanks, and recovering money when quantities arrive short. This system gives the procurement team a single live view of every load, from contract to tank, with the finance reports they need beside it.
Key modules
- Stock tracking: each load carries vendor, rate, quantity (kg and litres), vehicle, transporter and ETA through stages such as Under loading → On the way → At port → On the sea → In tank → Delivered. Conversion rules (refining loss, kg-to-litre) are applied automatically, and every field change is logged.
- Shortages: a per-load allowance, with deductions calculated from the shortage and the contract rate, plus a vendor debit/credit ledger.
- Tanks: capacity and fill levels, inward / outward / transfer logs, and item-wise weighted-average cost, shown as a visual tank monitor.
- Domestic contracts: a staged contract → loading → freight form with a status pipeline, plus bulk Excel import with SAP lookups.
- Licences: advance and DFIA import/export licences with import and export lines and remaining balances.
- Rates: daily price sheets with trend charts and monthly high/low, internal rate sheets built from margins and freight, and customs exchange rates.
- Finance: read-only live SAP reports for balances, ledgers, customer aging, open documents, and a PO-to-invoice document flow tracer.
- AI chat: plain-English questions about stock, tanks, shortages and prices, answered from the live data.
Architecture
- Backend: Django + DRF with OpenAPI docs (drf-spectacular), pandas and openpyxl for spreadsheet imports, pdfplumber for documents.
- Frontend: React 19, TypeScript, Tailwind 4 + shadcn/ui, TanStack Query and recharts, installable as a PWA.
- SAP: strictly read-only. Nothing is ever posted back.
- Delivery: push-to-deploy with GitHub Actions on self-hosted runners.
Outcome
The team replaced a set of shared spreadsheets with one system of record for loads and tanks. Shortage claims are now calculated the same way for every truck.