- Added customer_id and contact_id filters to the list_opportunities endpoint for improved querying. - Implemented a redirect for opportunity detail pages to a new format. - Refactored SubscriptionMatrixService to load invoices from a local snapshot instead of an external service, improving performance and reliability. - Updated settings to include 'pipeline' as a case type and added a new section for managing ignored product texts in the invoice error finder. - Introduced a new user_sag_create_preferences table to store per-user default case types for new cases. - Enhanced frontend settings page with invoice error finder configuration options and improved handling of ignored product texts. - Added migrations to support new features, including resolved status for invoice error finder issues and user-specific case type preferences.
27 lines
681 B
SQL
27 lines
681 B
SQL
-- Migration 213: allow smart-sync to mark invoice error finder issues as resolved
|
|
|
|
DO $$
|
|
BEGIN
|
|
IF EXISTS (
|
|
SELECT 1
|
|
FROM pg_constraint
|
|
WHERE conname = 'invoice_error_finder_issues_status_check'
|
|
) THEN
|
|
ALTER TABLE invoice_error_finder_issues
|
|
DROP CONSTRAINT invoice_error_finder_issues_status_check;
|
|
END IF;
|
|
END $$;
|
|
|
|
ALTER TABLE invoice_error_finder_issues
|
|
ADD CONSTRAINT invoice_error_finder_issues_status_check
|
|
CHECK (status IN (
|
|
'open',
|
|
'investigating',
|
|
'approved_change',
|
|
'error_found',
|
|
'ready_to_invoice',
|
|
'invoiced',
|
|
'ignored',
|
|
'resolved'
|
|
));
|