3 New Database Tables
purchase_signatures
id
purchase_request_id → FK
signed_by → FK users
signature_image → base64 png
signed_at → timestamp
ip_address
rfq_invitations
id
purchase_request_id → FK
supplier_id → FK
token → unique 64-char hex
channel → email|whatsapp|both
sent_at, opened_at, expires_at
status → pending|opened|submitted|declined
supplier_quotes + supplier_quote_items
id
rfq_invitation_id → FK
submitted_at
lead_time_days
payment_terms
notes
total_amount
is_awarded → boolean
award_reason
── items ──
description, unit, qty, unit_price, total
Public Portal (no auth)
🔗 /rfq/{token}
• Outside auth middleware — no login needed
• Token validated on every request
• Expires 7 days after sending
• Can only be submitted once
• Shows your company name + item list
• Supplier fills price/terms, submits
• Confirmation screen shown after submit
Existing models — minor additions only
purchase_requests → add stage column
grn_items → add type (inventory|consumable)
purchase_orders → relabel as LPO in UI only