Create/View Purchase Order PDF/ETA

Create/View Purchase Order PDF/ETA — Functional Description

Interactive admin popup for the purchase-order workflow. Staff select an Editing purchase order, generate a TCPDF purchase-order PDF and companion CSV export, mark orders In Process or Completed, and manage supplier PO IDs. The In Process grid displays cost totals (total, received, canceled, outstanding) with shortcuts to expected-date messaging (purchaseOrderExpectedDate.php) and PDF viewing.

PDF line-item descriptions pull shelf/bin display names from OpenCart oc_product custom field 83 via defensive JSON_VALID() / JSON_UNQUOTE(JSON_EXTRACT(..., '$."83"')) (blank fallback).

Workspace notes

  • The product names are taken from the Shelf/Bin Name mapping.
  • Create PDF & CSV writes both formats for the selected Editing PO. View PDF opens the isolated ?action=pdf stream; CSV uses ?action=csv.
  • Mark In Process moves the selected PO into the financial grid. Re-edit returns a row to Editing; MarkCompleted closes the PO.
  • Set Expected Date & Message opens purchaseOrderExpectedDate.php for the target PO. Update writes that row's Supplier PO ID.
  • Close dismisses this popup window.
"Editing" Purchase Orders
View Purchase Order PDF #516
Click here to download Purchase Order #516 CSV file
View Purchase Order PDF #518
Click here to download Purchase Order #518 CSV file
Purchase Orders "In Process"
PO# Supplier Created TotalCost ReceivedCost CanceledCost OutstandingCost
512Lee Precision2023-04-14$2855.78$2831.48$24.30$0.00
Average1 PO$2855.78$2831.48$24.30$0.00
Grand Total1 PO$2855.78$2831.48$24.30$0.00