feat: enhance forms with decimal formatting and validation
- Updated CustomersPage.vue to use decimalString for standard discount percent. - Enhanced IncomingInvoicesPage.vue to format item quantities, unit prices, and tax rates using decimalString. - Improved ItemsPage.vue with new supplier price management and decimal formatting for prices. - Modified OrganizationSetupPage.vue to use a dropdown for default tax rates and ensure numeric input for payment days. - Updated OutgoingInvoicesPage.vue to apply decimal formatting for customer discounts and item details. - Enhanced PriceImportsPage.vue to include additional fields in the import format. - Improved PriceRulesPage.vue to use decimal input for markup percentages. - Updated QuotesPage.vue to apply decimal formatting for customer discounts and item details. - Enhanced SuppliersPage.vue to use decimal input for standard discount percent. - Added a new SQL migration to set default unit for items to 'Stck'. - Introduced format.ts for centralized decimal and currency formatting utilities.
This commit is contained in:
2
backend/company-migrations/0013_item_unit_default.sql
Normal file
2
backend/company-migrations/0013_item_unit_default.sql
Normal file
@@ -0,0 +1,2 @@
|
||||
alter table {schema}.items
|
||||
alter column unit set default 'Stck';
|
||||
13
backend/company-migrations/0014_activity_line_sources.sql
Normal file
13
backend/company-migrations/0014_activity_line_sources.sql
Normal file
@@ -0,0 +1,13 @@
|
||||
alter table {schema}.quote_items
|
||||
add column if not exists line_kind text not null default 'item',
|
||||
add column if not exists activity_id uuid references {schema}.activities(id);
|
||||
|
||||
alter table {schema}.quote_items
|
||||
alter column item_id drop not null;
|
||||
|
||||
alter table {schema}.outgoing_invoice_items
|
||||
add column if not exists line_kind text not null default 'item',
|
||||
add column if not exists activity_id uuid references {schema}.activities(id);
|
||||
|
||||
alter table {schema}.outgoing_invoice_items
|
||||
alter column item_id drop not null;
|
||||
@@ -0,0 +1,15 @@
|
||||
alter table {schema}.activities
|
||||
drop constraint if exists activities_status_valid;
|
||||
|
||||
update {schema}.activities
|
||||
set status = case
|
||||
when status in ('open', 'in_progress') then 'active'
|
||||
else 'inactive'
|
||||
end
|
||||
where status in ('open', 'in_progress', 'done', 'cancelled');
|
||||
|
||||
alter table {schema}.activities
|
||||
alter column status set default 'active';
|
||||
|
||||
alter table {schema}.activities
|
||||
add constraint activities_status_valid check (status in ('active', 'inactive'));
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user