1 Workflows
Hardik edited this page 2026-06-19 14:06:07 +05:30

Workflows

Step-by-step user workflows, migrated from the original UI/UX spec (Docs/DESIGN.md, now retired). For the screen list see Pages and Navigation; for the status graph see PO Lifecycle.

Submit a purchase order (Technical / Manning)

  1. Click New PO in the sidebar.
  2. Select Cost Centre (Vessel) and Accounting Code.
  3. Add line items — type a name to search the catalogue; previous vendor prices appear as hints.
  4. Optionally attach documents and fill in Terms & Conditions.
  5. Click Submit for Approval → Manager is emailed; status shows "Under Review" on My Orders.
  6. If the manager requests edits: the PO shows EDITS_REQUESTED with the note; edit and resubmit.
  7. If the manager requests a vendor ID: select a vendor and submit; the PO returns to the manager queue.
  8. On approval: you're emailed and the PO appears in the Accounts payment queue.

Approve a purchase order (Manager)

  1. Open Approvals; see the pending count.
  2. Click Review on a PO; read line items, vendor, documents, notes.
  3. Optionally Edit to adjust quantities/prices/GST or change vendor/vessel/account inline (logged as MANAGER_LINE_EDIT).
  4. Choose an action:
    • Approve → moves to the Accounts payment queue.
    • Approve with Note → same, with a note visible to the submitter.
    • Request Edits → write a note; PO returns to the submitter.
    • Request Vendor ID → PO returns to the submitter to select a vendor.
    • Reject → write a reason; PO is closed permanently.

A vendor must be assigned before approval, and only verified vendors may be assigned. See Roles and Permissions.

Process a payment (Accounts)

  1. Open Payments; see cards for MGR_APPROVED POs.
  2. Send for Payment → notifies submitter and manager.
  3. When the bank/finance confirms, Mark as Paid (capturing the compulsory payment date — no future dates) → notifies all parties. Partial payments loop via PARTIALLY_PAID until fully settled.
  4. The submitter can now upload a delivery receipt.

Confirm receipt (Technical / Manning)

  1. Goods are delivered to the vessel/site.
  2. Open the PO detail (status PAID_DELIVERED).
  3. Confirm Receipt → upload the delivery receipt and optionally add notes.
  4. Submit → PO is CLOSED (or PARTIALLY_CLOSED for a partial receipt); accounts and manager are notified.

Look up a vendor by GSTIN (Manager / Admin)

  1. Open the Add/Edit Vendor form.
  2. Type the 15-digit GSTIN and click Look up → a CAPTCHA image loads from the GST microservice.
  3. Type the 6-digit CAPTCHA and click Verify → the form auto-fills legal name, address, and pincode.
  4. Save; location is geocoded silently from the pincode for distance sorting.

Detail: Vendors and GST Lookup.

Source items by proximity (Manager)

  1. Open Items → click an item name.
  2. See all vendors that supply it with their last quoted price.
  3. Select a site from the "Sort by distance from" dropdown.
  4. The table re-sorts by proximity; distance shows per row; the closest vendor is marked and the cheapest is tagged Cheapest.
  5. Add to Cart on the desired vendor row.

Create a PO from the cart (Manager / Technical)

  1. Add items to the cart from item detail pages.
  2. Open Cart; adjust quantities, remove items, select a delivery site.
  3. Create PO → opens New PO pre-filled with the cart line items and vendor.
  4. Fill in title, cost centre, accounting code; submit normally.

Track inventory at a site (Manager / Admin)

  1. Open Sites → click a site.
  2. View the current-stock bar chart and the 30-day consumption line chart.
  3. Use Log Consumption to record a daily drawdown (product, date, quantity, note). See Inventory and Catalogue.

Import a PO from Excel (Manager / SuperUser / Admin)

  1. Open Import PO and upload a Pelagia-format .xlsx.
  2. The parser extracts line items, vendor, and quotation details; the company is auto-detected and the vessel auto-matched by code.
  3. The PO is saved directly as CLOSED (a historical record), auto-creating the vendor and any unknown products. See Purchase Orders.

Export PO history (Auditor / Manager)

  1. Open History; apply filters (date range, cost centre, one or more statuses).
  2. Export PDF or Export CSV → downloads the matching POs (up to ~200).

User stories (priority reference)

From the original spec (Docs/01-design-document.md §8); IDs are referenced by the Test Plan. P0 = must-have, P1 = should-have.

Submitter (Technical / Manning)

ID Story Pri
S-01 Create a PO with line items and attach documents P0
S-02 Save a PO as draft before submitting P0
S-03 Submit a draft PO for approval P0
S-04 Receive email when my PO is approved/rejected P0
S-05 View status and history of all my POs P0
S-06 Provide a vendor ID when requested P0
S-07 Edit and resubmit when edits are requested P0
S-08 Confirm receipt and upload a receipt to close a PO P0

Manager

ID Story Pri
M-01 See all POs awaiting my approval P0
M-02 Approve / reject / request edits P0
M-03 Add a note when approving or rejecting P0
M-04 Flag a PO for vendor-ID verification P0
M-05 View spend analytics by cost centre and month P1
M-06 Export a full PO history report (CSV/PDF) P1

Accounts

ID Story Pri
A-01 See all manager-approved POs ready for payment P0
A-02 Mark a PO as paid with a reference P0
A-03 Receive email when a PO enters my payment queue P0

Admin

ID Story Pri
AD-01 Create, edit, deactivate user accounts P0
AD-02 Manage cost centres, accounting codes, vendors P0
AD-03 Manage the product catalogue P1

Non-goals (out of scope)

Mobile-native app (web is desktop-first), public-facing pages, self-registration / generic OAuth, a vendor self-service portal, and automated bank/payment-gateway integration (payment is marked manually).