Skip to Content

Suppliers

  • Code: PUR-SUP
  • Module: Purchasing
  • Type: Master Data

1. Overview

Suppliers are the parties that supply goods to stores, along with their addresses and the contact people who can be reached when transacting. Every supplier is attached to one entity — the master data of a person or business shared throughout the system — so an entity already registered as an employee or user can also be made a supplier without retyping its data. Suppliers are the counterparty on Purchase Orders, Goods Receipts, and Bills.

Expected outcome: every purchase has a clear counterparty along with its address and contact, so order, receipt, and billing documents are filled in automatically with the correct data.

2. Problem

Without centralized supplier data, supplier contacts and addresses are only kept in staff members’ personal notes and copied over every time a document is created. As a result:

  • Contact numbers and addresses differ across documents, so delivery and billing confirmations often stall.
  • One supplier is recorded many times with different spellings, so the purchase history with that supplier cannot be totaled.
  • Suppliers that are no longer used still appear when creating new documents and risk being selected.
  • The data of people already registered as employees or users is retyped when they become suppliers, so it easily diverges.

3. Goals & Non-goals

3.1 Goals

  • Every supplier has one master record used by all purchasing documents.
  • Supplier addresses and contacts are available immediately when a document is created, without retyping.
  • Entities already in the system can be promoted to suppliers without rewriting their data.
  • Suppliers that are no longer used can be locked from new transactions without deleting their history.

3.2 Non-goals

  • Supplier ratings and rankings, for example delivery punctuality or goods quality.
  • Supplier-specific payment terms and credit limits; terms are set per purchasing document.
  • Supplier price catalogs; prices are set when preparing an order.
  • A supplier portal and sending documents directly from the system.
  • Supplier tax and bank account data.

4. Business Rules

Business rules are the set of provisions and constraints that apply to Suppliers throughout the application, on every screen and action that involves it, whoever performs it. These rules are the single source of truth: if another part of this PRD appears to differ, the rules here prevail.

  • BR-01 Every supplier is attached to exactly one entity. A supplier is created from scratch, which also forms a new entity, or from an existing entity that is not yet a supplier.
  • BR-02 One entity may only be one supplier; an entity that is already a supplier no longer appears as an option when creating a supplier from an entity.
  • BR-03 The supplier code is set by the system when the supplier is saved and cannot be changed.
  • BR-04 The entity category is chosen from Individual, Company, or Organization. Gender only applies, and is required, if the category is Individual.
  • BR-05 The supplier’s name, email, and phone number are required, and the email must be a valid email address format.
  • BR-06 Every supplier must have at least one address from the moment it is created.
  • BR-07 The primary, billing, and shipping address roles are each held by exactly one address per supplier. Assigning a role to another address automatically moves it from the previous address.
  • BR-08 The first address created automatically holds all three roles at once.
  • BR-09 There may be more than one contact, and there may be none. A contact’s name and phone number are required, while email is optional but must be valid if filled in.
  • BR-10 Inactive suppliers still appear in supplier search, but cannot be selected when creating a Goods Receipt without a PO. Their existing transaction data can still be viewed. Needs confirmation: whether the same restriction applies when selecting a supplier on a Purchase Order.
  • BR-11 Every change to supplier data, addresses, and contacts is recorded along with its actor and time.

5. Flow

5.1 Main Flowchart

  1. Creation Source — Staff choose to create a supplier from scratch, or from a registered entity that is not yet a supplier (BR-01, BR-02).
  2. General Data — Status, name, entity category, gender if individual, email, and phone number. If created from an entity, these inputs are filled from that entity’s data.
  3. Address — The supplier is given at least one address. The first address automatically becomes the primary, billing, and shipping address at once (BR-08).
  4. Contact — People who can be reached on the supplier’s side; there may be more than one and this step may be skipped (BR-09).
  5. Review — All inputs are reviewed before saving.
  6. Validation — Inputs are checked before the supplier is saved. A supplier that violates the rules cannot be saved, and the errors are shown in the relevant step.
  7. Supplier Saved — The supplier code is issued and the supplier can be used on purchasing documents according to its status.
    • 7a. Edit General Data — Status, name, category, gender, email, and phone number are updated together.
    • 7b. Add/Edit/Delete Addresses & Contacts — Addresses and contacts are managed per row and saved instantly, including moving address roles.
  8. Used on Purchasing Documents — The supplier along with its contacts and addresses is referenced by Purchase Order, Goods Receipt, and Bill.

5.2 Status Lifecycle

StatusDescriptionNext
Active
is_active: true
The supplier can be selected on new purchasing documentsInactive, or deleted
Inactive
is_active: false
The supplier appears but cannot be selected on goods receipts without a POActive, or deleted

6. Document Structure

This section defines the content of the Supplier data itself: which fields it has, their type, which are required, their initial values, and their value rules. The provisions here apply wherever the supplier is created or changed and are enforced on save, regardless of how the field is displayed.

6.1 General

FieldTypeRequiredDefaultRules
CodeText—Generated on saveSet by the system, cannot be changed (BR-03)
EntityRef. Entity—A new entity, or the selected entity when created from an entitySet on creation, one entity one supplier (BR-01, BR-02)
StatusEnumYesNot selectedActive or Inactive
Supplier NameTextYesThe entity’s name, if created from an entity(BR-05)
CategoryEnumYes—Individual, Company, or Organization (BR-04)
GenderEnumYes, if the category is Individual—Male or Female (BR-04)
EmailTextYes—Must be a valid email format (BR-05)
Phone NumberTextYes—(BR-05)

6.2 Address

FieldTypeRequiredDefaultRules
NameTextYes—Address label, maximum 50 characters
Phone NumberTextYes—Maximum 15 characters
Full AddressTextYes—Maximum 255 characters
Primary AddressBoolean—Attached to the first addressSet by the system; exactly one per supplier (BR-07, BR-08)
Billing AddressBoolean—Attached to the first addressSet by the system; exactly one per supplier (BR-07, BR-08)
Shipping AddressBoolean—Attached to the first addressSet by the system; exactly one per supplier (BR-07, BR-08)

6.3 Contact

FieldTypeRequiredDefaultRules
NameTextYes—(BR-09)
Phone NumberTextYes—(BR-09)
EmailTextNo—Must be a valid email format if filled in (BR-09)

7. UI Structure

This section defines how Suppliers are displayed and operated: the list columns, filters, and form controls along with their option sources. Activity Logs are available as a drawer from the list page (all suppliers) and from the detail page (per supplier). This section only governs display and interaction; content and value rules still follow Document Structure.

7.1 Datatable

ColumnSortableSample ValueComponent
Select——Checkbox
No—1Number
CodeYesSUP-0007Text
Supplier NameYesPT Sumber RejekiText
Category—CompanyText
As User—YesBadge
As Employee—NoBadge
Status—ActiveBadge
Actions—View · Edit · DeleteAction Menu

7.2 Advance Filter

FieldControlOptions SourceDefault
StatusSingle SelectActive, InactiveEmpty
CategorySingle SelectIndividual, Company, OrganizationEmpty
GenderSingle SelectMale, FemaleEmpty

7.3 Form & Details

Create — Starts with a source selection dialog: Create from Scratch or Create from Entity. With the second option, the dialog shows a list of entities that are not yet suppliers, searchable and sortable, and the selected entity fills in the general data. After that comes a four-step wizard: General, Address, Contact, then Review. The Next button validates the current step before moving on. Actions: Previous, Next, Save.

Edit — Three tabs, General, Address, and Contact. The General tab is saved as a whole; addresses and contacts are managed per row (add, edit, delete, assign address role), each saved instantly.

Detail — Three read-only tabs, General, Address, and Contact. Actions: Edit Data and Activity Logs.

General

FieldControlOptions SourceBehavior
StatusSingle SelectActive or InactiveThe currently selected option can be deselected, leaving the status empty
Supplier NameText Input—Filled from the entity if created from an entity
CategorySingle SelectIndividual, Company, OrganizationChanged to something other than Individual → Gender no longer applies
GenderSingle SelectMale, FemaleOnly shown and required when the category is Individual
EmailText Input——
Phone NumberText Input——

Address

FieldControlOptions SourceBehavior
NameText Input——
Phone NumberText Input——
Full AddressTextarea——
Address RoleAction Menu (“Set as”)Primary, Billing, ShippingOnly shows roles the address does not have yet; assigning a role removes it from other addresses

Contact

FieldControlOptions SourceBehavior
NameText Input——
Phone NumberText Input——
EmailText Input—Optional; only validated if filled in

8. User Stories

US-01 - Create a supplier from scratch

As purchasing staff, I want to register a new supplier along with its addresses and contacts, so that it can be used right away to create purchase orders.

IDAcceptance criteria
AC-01.1When a user with the create permission opens Add New, the creation source dialog appears with the options Create from Scratch and Create from Entity.
AC-01.2The wizard consists of General → Address → Contact → Review; the user cannot continue if the required fields in that step are not valid yet.
AC-01.3Status, name, category, email, and phone number are required; the email must be in a valid format (BR-05).
AC-01.4Gender is only required when the category is Individual (BR-04).
AC-01.5At least one address must be added before continuing from the Address step (BR-06).
AC-01.6The first address is automatically marked Primary, Billing, and Shipping (BR-08).
AC-01.7The Contact step may be skipped without adding a contact (BR-09).
AC-01.8When Save succeeds, the supplier code is issued, a success toast appears, and the user is redirected to the supplier list (BR-03).
AC-01.9When saving is rejected, error messages appear in the Review step and on the related fields.
AC-01.10When the user leaves the wizard with unsaved input, an unsaved changes confirmation appears.

US-02 - Create a supplier from an entity

As purchasing staff, I want to promote a registered entity to a supplier, so that its data does not need to be retyped.

IDAcceptance criteria
AC-02.1The Create from Entity dialog shows a list of entities that are not yet suppliers, with search, sorting, and pagination (BR-02).
AC-02.2After an entity is selected, the General step is filled with that entity’s data and can still be adjusted.
AC-02.3The saved supplier stays attached to the selected entity, not a new entity (BR-01).

US-03 - Manage supplier addresses

As purchasing staff, I want to add, edit, delete, and assign roles to supplier addresses, so that documents use the correct address.

IDAcceptance criteria
AC-03.1An address consists of a name (max 50), phone number (max 15), and full address (max 255); all are required.
AC-03.2The “Set as” menu only shows roles that the address does not have yet (BR-07).
AC-03.3Assigning a role to one address removes the same role from other addresses (BR-07).
AC-03.4In edit mode, every address action is saved immediately and the result appears without reloading the page.
AC-03.5Each address shows its role badges (Primary / Billing / Shipping).
AC-03.6Deleting the supplier’s last address — not prevented on screen. Needs confirmation: it must be rejected on save so that BR-06 holds.

US-04 - Manage supplier contacts

As purchasing staff, I want to record the people who can be reached on the supplier’s side, so that orders can be confirmed with the right person.

IDAcceptance criteria
AC-04.1A contact consists of a required name and phone number, and an optional email that is only validated if filled in (BR-09).
AC-04.2Contacts can be added, edited, and deleted per row in edit mode, each saved immediately.
AC-04.3Supplier contacts become the options of the Contact field on Purchase Orders.

US-05 - Edit supplier data

As purchasing staff, I want to change a supplier’s general data, so that its information stays accurate.

IDAcceptance criteria
AC-05.1The Edit Data button only appears for users with the update permission.
AC-05.2Validation of the General tab is the same as the General step on creation (AC-01.3, AC-01.4).
AC-05.3The open tab is kept in the URL when switching between detail and edit.
AC-05.4The supplier code and its link to the entity cannot be changed (BR-01, BR-03).

As an owner, I want to view and filter suppliers, so that I can quickly find a specific supplier.

IDAcceptance criteria
AC-06.1Columns: code, supplier name, category, as user marker, as employee marker, and status.
AC-06.2Keyword search, filters for status, category, and gender, pagination, and default sort by name A–Z.
AC-06.3Sortable columns: code and supplier name.
AC-06.4Row actions: View, Edit, Delete according to permissions.

US-07 - Delete a supplier

As purchasing staff, I want to delete a supplier created by mistake, so that the list stays clean.

IDAcceptance criteria
AC-07.1Single and bulk delete require confirmation and the delete permission.
AC-07.2If the deletion is rejected, the error message appears as a toast.
AC-07.3Deleting a supplier already used on purchasing documents — Needs confirmation: whether it is rejected, or the supplier should simply be deactivated (BR-10).

US-08 - Activity history

As an owner, I want to see the supplier activity log, so that changes to data, addresses, and contacts can be traced.

IDAcceptance criteria
AC-08.1The activity log is available for all suppliers (in the list) and per supplier (in the detail) (BR-11).

9. User Scenarios

RoleScenario
Purchasing StaffRegisters a new distributor along with its warehouse address and two sales contacts, then immediately creates the first purchase order to that supplier
Purchasing StaffPromotes an entity registered so far as an employee to a supplier, because that person also supplies goods to the store
AdminUpdates a supplier’s billing address after its office moves, then makes sure the next bill uses the new address
OwnerDeactivates a supplier that is no longer used so it is not selected on new goods receipts, without deleting its purchase history

10. Permissions & Actions

10.1 Permission by Action

ActionPermissionCondition
View Supplier Listpurchase:supplier:list:any—
View Activity Logspurchase:supplier:list:any—
View Supplier Detailpurchase:supplier:view:any—
Create Supplierpurchase:supplier:create:any—
Edit Supplier
(General Data)
purchase:supplier:update:any—
Delete Supplierpurchase:supplier:delete:any—
Add Addresspurchase:supplier:create:anyFrom the edit supplier page
Edit Addresspurchase:supplier:update:anyFrom the edit supplier page
Delete Addresspurchase:supplier:delete:anyFrom the edit supplier page
Assign Address Rolepurchase:supplier:update:anyFrom the edit supplier page
Add Contactpurchase:supplier:create:anyFrom the edit supplier page
Edit Contactpurchase:supplier:update:anyFrom the edit supplier page
Delete Contactpurchase:supplier:delete:anyFrom the edit supplier page

10.2 Action by Status

ActionActiveInactive
View Supplier Detail✓✓
Edit Supplier
(General Data)
✓✓
Manage Addresses & Contacts✓✓
Delete Supplier✓✓
Selected on Purchase Order✓✓
Selected on Goods Receipt without PO✓—

11. Notifications

This feature does not trigger any notifications.

12. Dependencies

Related PRDs

  • Purchase Order — selects the supplier along with its contact as the counterparty.
  • Goods Receipt — selects an active supplier when receiving without a PO (BR-10).
  • Bill — bills addressed to the supplier.
  • Entities — the parent entity of each supplier (BR-01, BR-02).

Effects on other modules

  • The supplier’s name and address appear on the Purchase Order and Goods Receipt PDF documents.
  • The inactive status locks supplier selection on goods receipts without a PO (BR-10).
  • Every change is recorded in the activity log (BR-11).
Last updated on