From fc1e67b429bb959ab60bd50d144c0a51fbc4b292 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20B=C3=BCren?= Date: Tue, 11 May 2021 08:07:31 +0200 Subject: [PATCH] =?utf8?q?Mandatenkonfig->Buchungskonfig->=20Verhalten=20n?= =?utf8?q?ach=20Buchen=20optional=20=C3=A4ndern?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Falls der Mandant zu jeder Buchung einen Beleg hinzufügen möchte, ist es nicht sinnvoll in eine leere Buchungsmaske zu springen. Einzeln steuerbar für alle Buchungsmasken außer VK-Rechnung --- SL/DB/MetaSetup/Default.pm | 4 +++ .../defaults_posting_records_add.sql | 8 ++++++ .../client_config/_posting_configuration.html | 26 +++++++++++++++++-- 3 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 sql/Pg-upgrade2/defaults_posting_records_add.sql diff --git a/SL/DB/MetaSetup/Default.pm b/SL/DB/MetaSetup/Default.pm index 6308292d7..24a382fe3 100644 --- a/SL/DB/MetaSetup/Default.pm +++ b/SL/DB/MetaSetup/Default.pm @@ -19,9 +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_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_changeable => { type => 'integer', default => 2, not_null => 1 }, ar_chart_id => { type => 'integer' }, ar_paid_accno_id => { type => 'integer' }, @@ -94,6 +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_changeable => { type => 'integer', default => 2, not_null => 1 }, global_bcc => { type => 'text', default => '' }, id => { type => 'serial', not_null => 1 }, @@ -102,6 +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_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_add.sql b/sql/Pg-upgrade2/defaults_posting_records_add.sql new file mode 100644 index 000000000..0fcb1558d --- /dev/null +++ b/sql/Pg-upgrade2/defaults_posting_records_add.sql @@ -0,0 +1,8 @@ +-- @tag: defaults_posting_records_add +-- @description: Einstellung, ob Belege (PDF) zu einer Buchung hinzugefügt werden sollen +-- @depends: release_3_5_6_1 + +ALTER TABLE defaults ADD COLUMN ir_add_doc BOOLEAN NOT NULL DEFAULT true; +ALTER TABLE defaults ADD COLUMN ar_add_doc BOOLEAN NOT NULL DEFAULT true; +ALTER TABLE defaults ADD COLUMN ap_add_doc BOOLEAN NOT NULL DEFAULT true; +ALTER TABLE defaults ADD COLUMN gl_add_doc BOOLEAN NOT NULL DEFAULT true; diff --git a/templates/webpages/client_config/_posting_configuration.html b/templates/webpages/client_config/_posting_configuration.html index 91b425799..557ee1320 100644 --- a/templates/webpages/client_config/_posting_configuration.html +++ b/templates/webpages/client_config/_posting_configuration.html @@ -26,10 +26,8 @@ [% L.select_tag('defaults.gl_changeable', SELF.posting_options, value_key = 'value', title_key = 'title', default = SELF.defaults.gl_changeable) %] [% LxERP.t8('Should gl transactions be and when should they be changeable or deleteable after posting?') %] - - [% LxERP.t8('Payments Changeable') %] [% L.select_tag('defaults.payments_changeable', SELF.payment_options, value_key = 'value', title_key = 'title', default = SELF.defaults.payments_changeable) %] @@ -39,6 +37,30 @@ + + [% LxERP.t8(' Add document for Purchase invoices') %] + [% L.yes_no_tag('defaults.ir_add_doc', SELF.posting_options, value_key = 'value', title_key = 'title', default = SELF.defaults.ir_add_doc) %] + [% LxERP.t8('Show document tab after posting?') %] + + + [% LxERP.t8(' Add document for AR transactions') %] + [% L.yes_no_tag('defaults.ar_add_doc', SELF.posting_options, value_key = 'value', title_key = 'title', default = SELF.defaults.ar_add_doc) %] + [% LxERP.t8('Show document tab after posting?') %] + + + [% LxERP.t8(' Add document for AP transactions') %] + [% L.yes_no_tag('defaults.ap_add_doc', SELF.posting_options, value_key = 'value', title_key = 'title', default = SELF.defaults.ap_add_doc) %] + [% LxERP.t8('Show document tab after posting?') %] + + + [% LxERP.t8(' Add document for GL transactions') %] + [% L.yes_no_tag('defaults.gl_add_doc', SELF.posting_options, value_key = 'value', title_key = 'title', default = SELF.defaults.gl_add_doc) %] + [% LxERP.t8('Show document tab after posting?') %] + + + + + [% LxERP.t8('Show "mark as paid" in sales invoices') %] [% L.yes_no_tag('defaults.is_show_mark_as_paid', SELF.defaults.is_show_mark_as_paid) %] -- 2.20.1