SELECT id, proforma_reference, status, archived_at
FROM proformas
WHERE archived_at IS NOT NULL
  AND status NOT IN ('draft', 'rejected');

SELECT id, proforma_reference, status, archived_at, deleted_at
FROM proformas
WHERE archived_at IS NOT NULL
  AND deleted_at IS NOT NULL;
