From 068e2451a9457aec30aba3b34a71f03964dd7ca1 Mon Sep 17 00:00:00 2001 From: "G. Richardson" Date: Mon, 4 Aug 2014 01:35:45 +0200 Subject: [PATCH] Beim Erfassen von Steuerzonen Standardkonten verwenden MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Vorauswahl von Erlös- und Aufwandskonten laut Mandantenkonfiguration. Im Gegensatz zum Anlegen von Buchungsgruppen kann bei der Steuerzone kein Bestandskonto konfiguriert werden, da dies nur von der Buchungsgruppe abhängt. --- SL/Controller/Taxzones.pm | 7 +++++++ templates/webpages/taxzones/form.html | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/SL/Controller/Taxzones.pm b/SL/Controller/Taxzones.pm index 9bdf3553b..1e29e6022 100644 --- a/SL/Controller/Taxzones.pm +++ b/SL/Controller/Taxzones.pm @@ -15,6 +15,7 @@ use SL::Controller::ClientConfig; use Rose::Object::MakeMethods::Generic ( scalar => [ qw(config) ], + 'scalar --get_set_init' => [ qw(defaults) ], ); __PACKAGE__->run_before('check_auth'); @@ -136,4 +137,10 @@ sub create_or_update { $self->redirect_to(action => 'list'); } +# +# initializers +# + +sub init_defaults { SL::DB::Default->get }; + 1; diff --git a/templates/webpages/taxzones/form.html b/templates/webpages/taxzones/form.html index 72b8327ac..9994057a8 100644 --- a/templates/webpages/taxzones/form.html +++ b/templates/webpages/taxzones/form.html @@ -14,7 +14,7 @@ [%- IF SELF.config.id %] [% CHARTLIST.${bg.id}.income_accno %] -- [% CHARTLIST.${bg.id}.income_accno_description %] [%- ELSE %] - [%- L.select_tag('income_accno_id_' _ bg.id, ACCOUNTS.ic_income, title_sub=\account_label, default=CHARTLIST.${bg.id}.income_accno_id) %] + [%- L.select_tag('income_accno_id_' _ bg.id, ACCOUNTS.ic_income, title_sub=\account_label, default=SELF.defaults.income_accno_id) %] [%- END %] @@ -22,7 +22,7 @@ [%- IF SELF.config.id %] [% CHARTLIST.${bg.id}.expense_accno %] -- [% CHARTLIST.${bg.id}.expense_accno_description %] [%- ELSE %] - [%- L.select_tag('expense_accno_id_' _ bg.id, ACCOUNTS.ic_expense, title_sub=\account_label, default=CHARTLIST.${bg.id}.expense_accno_id) %] + [%- L.select_tag('expense_accno_id_' _ bg.id, ACCOUNTS.ic_expense, title_sub=\account_label, default=SELF.defaults.expense_accno_id) %] [%- END %] [%- END %] -- 2.20.1