From 3f21f766920411eeb17e21887943e6fb6ff43b5c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20B=C3=BCren?= Date: Tue, 26 Sep 2017 08:39:25 +0200 Subject: [PATCH] Dialogbuchungsvorlagen um 'Details anzeigen' erweitert MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Hintergrund: Beleg und Memo werden auch bei den Vorlagen zeilenweise mitgespeichert, wenn diese aber nicht visuell beim Laden der Vorlage zu Verfügung stehen, vergißt der Anwender die Werte zu ändern. -> Details anzeigen mitübergeben --- SL/DB/MetaSetup/RecordTemplate.pm | 1 + bin/mozilla/gl.pl | 3 ++- sql/Pg-upgrade2/alter_record_template_tables.sql | 6 ++++++ 3 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 sql/Pg-upgrade2/alter_record_template_tables.sql diff --git a/SL/DB/MetaSetup/RecordTemplate.pm b/SL/DB/MetaSetup/RecordTemplate.pm index 8fe4cf9dc..a9f6f8814 100644 --- a/SL/DB/MetaSetup/RecordTemplate.pm +++ b/SL/DB/MetaSetup/RecordTemplate.pm @@ -25,6 +25,7 @@ __PACKAGE__->meta->columns( ordnumber => { type => 'text' }, project_id => { type => 'integer' }, reference => { type => 'text' }, + show_details => { type => 'boolean', default => 'false', not_null => 1 }, taxincluded => { type => 'boolean', default => 'false', not_null => 1 }, template_name => { type => 'text', not_null => 1 }, template_type => { type => 'enum', check_in => [ 'ar_transaction', 'ap_transaction', 'gl_transaction' ], db_type => 'record_template_type', not_null => 1 }, diff --git a/bin/mozilla/gl.pl b/bin/mozilla/gl.pl index 8ac26984c..593209a23 100644 --- a/bin/mozilla/gl.pl +++ b/bin/mozilla/gl.pl @@ -109,7 +109,7 @@ sub load_record_template { $::form->{duedate} = $today->to_kivitendo; $::form->{rowcount} = @{ $template->items }; $::form->{paidaccounts} = 1; - $::form->{$_} = $template->$_ for qw(department_id taxincluded ob_transaction cb_transaction reference description); + $::form->{$_} = $template->$_ for qw(department_id taxincluded ob_transaction cb_transaction reference description show_details); $::form->{$_} = $dummy_form->{$_} for qw(closedto revtrans previous_id previous_gldate); my $row = 0; @@ -183,6 +183,7 @@ sub save_record_template { cb_transaction => $::form->{cb_transaction} ? 1 : 0, reference => $::form->{reference}, description => $::form->{description}, + show_details => $::form->{show_details}, items => \@items, ); diff --git a/sql/Pg-upgrade2/alter_record_template_tables.sql b/sql/Pg-upgrade2/alter_record_template_tables.sql new file mode 100644 index 000000000..99185a681 --- /dev/null +++ b/sql/Pg-upgrade2/alter_record_template_tables.sql @@ -0,0 +1,6 @@ +-- @tag: alter_record_template_tables +-- @description: Haken Details anzeigen in Dialog-Vorlage ergänzen +-- @depends: release_3_5_0 create_record_template_tables + +ALTER TABLE record_templates ADD column show_details BOOLEAN NOT NULL DEFAULT FALSE; + -- 2.20.1