Uecko_ERP/docs/customer-invoices/sql/validate-proforma-soft-delete.sql

15 lines
352 B
MySQL
Raw Permalink Normal View History

2026-07-29 10:43:54 +00:00
SELECT id, proforma_reference, status, deleted_at
FROM proformas
WHERE deleted_at IS NOT NULL
AND status <> 'draft';
SELECT id, proforma_reference, deleted_at
FROM proformas
WHERE deleted_at IS NOT NULL
ORDER BY deleted_at DESC
LIMIT 20;
SELECT ds.document_type, ds.code, ds.next_number
FROM document_series ds
WHERE ds.document_type = 'proforma';