Purchase Order Suppliers

Purchase Order Suppliers — Functional Description

Interactive admin popup for the purchase-order workflow. Staff add a vendor, select it from pd_purchase_order_supplier, and edit store assignment, address, payment/shipping terms, and related contacts in pd_purchase_order_supplier_contacts. Deleting a supplier also removes its manufacturer links in pd_purchase_order_manufacturer. These records are consumed by PO PDF generation, PO grids, and product-cost tools.

Operational rules

  • Add Supplier: Pre-check name existence before InsertRecord(). Matching names reuse the existing row and surface a warning.
  • Select Supplier: The dropdown submits on change. There is no duplicate hidden supplier_id field.
  • Active column: Kept as a 1-character text input (Y/N), matching other FS Admin schema standards.
  • Delete protection: Supplier and contact deletions require a JavaScript confirm() prompt before the form posts.
  • Contacts: Existing rows update in place; the empty last row (contact_id = 0) inserts a new contact.
  • Close: Returns to the parent inventory window via self.close().