Cleanup Pick Table

Cleanup Pick Table β€” Functional Description

Operational cleanup for leftover pd_pick_table rows that inflate Pick Table on updateInventory.php and can produce a negative Shelf Quantity. This page deletes matching rows in AJAX batches of 2500 inside a database transaction. It never modifies OpenCart catalog fields (oc_product.quantity, price, status, name, or description).

  • Stale / orphan rows: pick allocations whose oc_order is Completed / Shipped / Canceled / Denied, or whose order_id no longer exists. Live outstanding statuses (Paid, Processed, Backordered, etc.) are excluded.
  • Duplicates: extra row IDs sharing the same order_id + product_id. The newest MAX(id) row is kept; extras are removed.
  • Batching: 2,500 IDs per request, 3-second network retry (up to 3 attempts). Each batch prints database name, table, and rows cleaned.
  • Review first: open Diagnostic: Stale Pick Table Rows before running this mutation.
Candidates: 5 Stale / orphan: 5 Duplicate extras: 0 Batch size: 2500

Previewing the first 5 of 5 candidate row(s). Confirm below to start batched deletion. Remaining rows are always the next unmatched IDs (offset stays at 0 after each successful delete).

Open Diagnostic Report
Pick Row ID Product ID Order ID Current OpenCart Order Status Picked Quantity Date Added
35463 293 235451 Canceled 1 2026-09-27
35464 1757 235452 Canceled 1 2026-09-27
35465 1252 235452 Canceled 1 2026-09-27
35466 2266 235450 Canceled 1 2026-09-27
35477 3779 235463 Canceled 10 2026-10-01