From 206155927763a94af31bcb89c556e394334d35dc Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20B=C3=BCren?= Date: Tue, 11 May 2021 15:08:20 +0200 Subject: [PATCH] =?utf8?q?Zum=20Feature:=20Beleg=20zur=20Buchung=20hinzuf?= =?utf8?q?=C3=BCgen=20->=20standardm=C3=A4=C3=9Fig=20aus=20(so=20wie=20vor?= =?utf8?q?her)?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/DB/MetaSetup/Default.pm | 8 ++++---- .../defaults_posting_records_default_false.sql | 13 +++++++++++++ 2 files changed, 17 insertions(+), 4 deletions(-) create mode 100644 sql/Pg-upgrade2/defaults_posting_records_default_false.sql diff --git a/SL/DB/MetaSetup/Default.pm b/SL/DB/MetaSetup/Default.pm index 24a382fe3..70a1438e3 100644 --- a/SL/DB/MetaSetup/Default.pm +++ b/SL/DB/MetaSetup/Default.pm @@ -19,11 +19,11 @@ __PACKAGE__->meta->columns( allow_new_purchase_invoice => { type => 'boolean', default => 'true', not_null => 1 }, allow_sales_invoice_from_sales_order => { type => 'boolean', default => 'true', not_null => 1 }, allow_sales_invoice_from_sales_quotation => { type => 'boolean', default => 'true', not_null => 1 }, - ap_add_doc => { type => 'boolean', default => 'true', not_null => 1 }, + ap_add_doc => { type => 'boolean', default => 'false', not_null => 1 }, ap_changeable => { type => 'integer', default => 2, not_null => 1 }, ap_chart_id => { type => 'integer' }, ap_show_mark_as_paid => { type => 'boolean', default => 'true' }, - ar_add_doc => { type => 'boolean', default => 'true', not_null => 1 }, + ar_add_doc => { type => 'boolean', default => 'false', not_null => 1 }, ar_changeable => { type => 'integer', default => 2, not_null => 1 }, ar_chart_id => { type => 'integer' }, ar_paid_accno_id => { type => 'integer' }, @@ -96,7 +96,7 @@ __PACKAGE__->meta->columns( feature_ustva => { type => 'boolean', default => 'true', not_null => 1 }, fxgain_accno_id => { type => 'integer' }, fxloss_accno_id => { type => 'integer' }, - gl_add_doc => { type => 'boolean', default => 'true', not_null => 1 }, + gl_add_doc => { type => 'boolean', default => 'false', not_null => 1 }, gl_changeable => { type => 'integer', default => 2, not_null => 1 }, global_bcc => { type => 'text', default => '' }, id => { type => 'serial', not_null => 1 }, @@ -105,7 +105,7 @@ __PACKAGE__->meta->columns( inventory_system => { type => 'text' }, invnumber => { type => 'text' }, invoice_mail_settings => { type => 'enum', check_in => [ 'cp', 'invoice_mail', 'invoice_mail_cc_cp' ], db_type => 'invoice_mail_settings', default => 'cp' }, - ir_add_doc => { type => 'boolean', default => 'true', not_null => 1 }, + ir_add_doc => { type => 'boolean', default => 'false', not_null => 1 }, ir_changeable => { type => 'integer', default => 2, not_null => 1 }, ir_show_mark_as_paid => { type => 'boolean', default => 'true' }, is_changeable => { type => 'integer', default => 2, not_null => 1 }, diff --git a/sql/Pg-upgrade2/defaults_posting_records_default_false.sql b/sql/Pg-upgrade2/defaults_posting_records_default_false.sql new file mode 100644 index 000000000..30a41720a --- /dev/null +++ b/sql/Pg-upgrade2/defaults_posting_records_default_false.sql @@ -0,0 +1,13 @@ +-- @tag: defaults_posting_records_default_false +-- @description: Einstellung, ob Belege (PDF) zu einer Buchung hinzugefügt werden sollen +-- @depends: release_3_5_6_1 defaults_posting_records_add + +ALTER TABLE defaults ALTER COLUMN ir_add_doc SET DEFAULT false; +ALTER TABLE defaults ALTER COLUMN ar_add_doc SET DEFAULT false; +ALTER TABLE defaults ALTER COLUMN ap_add_doc SET DEFAULT false; +ALTER TABLE defaults ALTER COLUMN gl_add_doc SET DEFAULT false; + +UPDATE defaults set ir_add_doc='false'; +UPDATE defaults set ar_add_doc='false'; +UPDATE defaults set ap_add_doc='false'; +UPDATE defaults set gl_add_doc='false'; -- 2.20.1