acc_invoices: внутренние проекты (acc_internal_projects), описание, ссылка для оплаты, «Файла Invoice пока нет», строки необязательны, ждёт автор по умолчанию
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
-- acc_invoices: внутренние проекты (спецстроки вместо проекта QuickBooks), описание, ссылка для оплаты, «файла инвойса пока нет»
|
||||
create table if not exists acc_internal_projects (
|
||||
id uuid primary key default gen_random_uuid(),
|
||||
name text not null unique,
|
||||
sort int not null default 0
|
||||
);
|
||||
alter table acc_internal_projects enable row level security;
|
||||
insert into acc_internal_projects (name, sort) values ('ИТ KHBuild', 1), ('KHBuild внутренние затраты', 2) on conflict (name) do nothing;
|
||||
|
||||
alter table acc_invoices add column if not exists internal_project_id uuid references acc_internal_projects (id);
|
||||
alter table acc_invoices add column if not exists description text; -- описание текстом (что оплачивается)
|
||||
alter table acc_invoices add column if not exists pay_link text; -- URL для оплаты (портал вендора и т. п.)
|
||||
alter table acc_invoices add column if not exists no_invoice_file boolean not null default false; -- «Файла Invoice пока нет.»
|
||||
Reference in New Issue
Block a user