Skip to content

Supplier fields and types

List columns

ColumnSourceFormat / notes
Namesuppliers.nameBold; primary identifier; must be unique per tenant
Typesuppliers.supplier_typePill with coloured dot — see types below
Credit Termssuppliers.credit_terms{n} days or N/A if empty
Credit Limitsuppliers.credit_limitPKR, zero decimal places; N/A if null
Statussuppliers.is_activeActive (green pill) or Inactive (grey pill)
ActionsEdit/wms/suppliers/{id} · Delete → confirmation dialog

Supplier types

ValueLabelDot colour
manufacturerManufacturerBlue #2563eb
distributorDistributorPurple #7c3aed
wholesalerWholesalerAmber #d97706
importerImporterTeal #0d9488
localLocalGreen #16a34a
otherOtherSlate #64748b

Type filter dropdown shows All Types (N) plus each type with count, e.g. Manufacturer (6).

KPI strip (full dataset, not filtered table)

KPICalculationSub-label
Total SuppliersCount of all suppliersacross all hubs
Activeis_active = true count{inactive} inactive
Credit ExposureSum of credit_limittotal credit limit — compact PKR X.XM when ≥ 1M
Avg Credit TermsMean of numeric credit_termsnet payment window — rounded whole days

Search scope

Client-side filter matches (case-insensitive substring):

  • name
  • supplier_type
  • ntn
  • stn

Create / edit form fields (summary)

FieldRequiredNotes
Supplier NameYesMin 2 characters
Supplier TypeYesEnum above
Official Distributor/PartnerNois_official boolean
ActiveNoDefault true
NTN / STNNoTax registration
Credit LimitNo≥ 0 PKR
Credit TermsNoInteger days ≥ 0
Expiry intimation daysNoDefault 90 on create
Delivery daysNoStored as array
Bank name / account title / IBANNoPO payment block
NotesNoFree text

Delete behaviour

On confirm delete the app removes supplier_contacts and supplier_addresses for the ID, then the suppliers row. Blocked when GRNs reference the supplier (grns_supplier_id_fkey).