From: G. Richardson Date: Sun, 3 Aug 2014 23:35:45 +0000 (+0200) Subject: Beim Erfassen von Steuerzonen Standardkonten verwenden X-Git-Tag: release-3.2.0beta~369 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=068e2451a9457aec30aba3b34a71f03964dd7ca1;p=kivitendo-erp.git Beim Erfassen von Steuerzonen Standardkonten verwenden 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. --- 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 %]