Skip to main content
Version: v1.0.0(int)

W028: Delete vendor

Removes a vendor that no PO references. Triggered from Vendor Detail. Archive (set isActive to false via W027) is the routine path for retired suppliers.

Steps​

  1. Load the vendor. Call Vendors.getById.

  2. Block if POs reference it. Call PurchaseOrders.listPos({ vendorId }) and refuse if non-empty.

  3. Delete the vendor. Call Vendors.delete.

Returns​

Nothing.

Business rules​

  • PO history is blocking.

Errors​

  • NotFoundError. The vendor was not found.
  • InUseError. One or more POs reference this vendor.