Uecko_ERP/docs/customer-invoices/sql/validate-proforma-archive.sql

15 lines
411 B
MySQL
Raw Permalink Normal View History

2026-07-29 12:40:59 +00:00
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;
SELECT id, proforma_reference, status, archived_at, deleted_at
FROM proformas
WHERE deleted_at IS NOT NULL
AND status <> 'draft';