- Added a new modal for reporting bugs, including fields for describing the issue and attaching optional files. - Integrated automatic screenshot capture functionality when the bug report modal is opened. - Created a new API endpoint for submitting bug reports, including validation and rate limiting. - Added database migration for tracking bug report submissions. - Updated frontend scripts to handle bug report submissions and display status messages. - Enhanced contact search functionality with improved error handling and backward compatibility. - Introduced a new button in the UI for accessing the bug report modal.
17 lines
1.0 KiB
SQL
17 lines
1.0 KiB
SQL
-- Migration 186: Customer-specific economic pricing fields
|
|
-- Adds customer-level defaults for margin, freight, supplier service flag, and invoice fee.
|
|
|
|
ALTER TABLE customers
|
|
ADD COLUMN IF NOT EXISTS standard_margin_percent NUMERIC(5,2) NOT NULL DEFAULT 20.00,
|
|
ADD COLUMN IF NOT EXISTS special_freight_price NUMERIC(10,2),
|
|
ADD COLUMN IF NOT EXISTS supplier_service_enrolled BOOLEAN NOT NULL DEFAULT FALSE,
|
|
ADD COLUMN IF NOT EXISTS invoice_fee_amount NUMERIC(10,2) NOT NULL DEFAULT 49.00;
|
|
|
|
CREATE INDEX IF NOT EXISTS idx_customers_supplier_service_enrolled
|
|
ON customers(supplier_service_enrolled);
|
|
|
|
COMMENT ON COLUMN customers.standard_margin_percent IS 'Default margin percentage used for order pricing.';
|
|
COMMENT ON COLUMN customers.special_freight_price IS 'Customer-specific freight price override.';
|
|
COMMENT ON COLUMN customers.supplier_service_enrolled IS 'Whether customer is enrolled in supplier service.';
|
|
COMMENT ON COLUMN customers.invoice_fee_amount IS 'Customer-specific invoice fee amount. 0 disables invoice fee.';
|