Hier wurde noch das entfernte init_accounts aus ClientConfig benutzt.
use SL::Helper::Flash;
use SL::Locale::String;
use SL::DB::TaxzoneChart;
-use SL::Controller::ClientConfig;
use SL::DB::Default;
use Rose::Object::MakeMethods::Generic (
my ($self, %params) = @_;
$self->render('buchungsgruppen/form', %params,
- TAXZONES => SL::DB::Manager::TaxZone->get_all_sorted(),
- ACCOUNTS => SL::Controller::ClientConfig->init_accounts(),
- account_label => sub { "$_[0]{accno}--$_[0]{description}" });
+ TAXZONES => SL::DB::Manager::TaxZone->get_all_sorted());
}
sub action_edit {
use SL::Locale::String;
use SL::DB::Manager::Buchungsgruppe;
use SL::DB::Manager::TaxzoneChart;
-use SL::Controller::ClientConfig;
use Rose::Object::MakeMethods::Generic (
scalar => [ qw(config) ],
my ($self, %params) = @_;
$self->render('taxzones/form', %params,
- BUCHUNGSGRUPPEN => SL::DB::Manager::Buchungsgruppe->get_all_sorted,
- ACCOUNTS => SL::Controller::ClientConfig->init_accounts,
- account_label => sub { "$_[0]{accno}--$_[0]{description}" });
+ BUCHUNGSGRUPPEN => SL::DB::Manager::Buchungsgruppe->get_all_sorted);
}
sub action_edit {
[%- USE HTML -%][%- USE LxERP -%][%- USE L -%][%- USE T8 -%]
+[% SET style="width: 400px" %]
<h1>[% HTML.escape(title) %]</h1>
<tr>
<th align="right">[% 'Inventory Account' | $T8 %]</th>
[%- IF NOT SELF.config.id %]
- <td>[%- L.select_tag("config.inventory_accno_id", ACCOUNTS.ic, title_sub=\account_label, default=SELF.defaults.inventory_accno_id) %]</td>
+ <td>[% L.chart_picker("config.inventory_accno_id", SELF.defaults.inventory_accno_id, choose=1, type='IC', style=style) %]</td>
[%- ELSIF SELF.config.id AND SELF.config.orphaned %]
- <td>[%- L.select_tag("config.inventory_accno_id", ACCOUNTS.ic, title_sub=\account_label, default=SELF.config.inventory_accno_id) %]</td>
+ <td>[% L.chart_picker("config.inventory_accno_id", SELF.config.inventory_accno_id, choose=1, type='IC', style=style) %]</td>
[%- ELSE %]
<td>[%- CHARTLIST.inventory_accno %] -- [%- CHARTLIST.inventory_accno_description %]</td>
[%- END %]
<tr>
<th align="right">[% 'Revenue' | $T8 %] [% HTML.escape(tz.description) %]</th>
[%- IF NOT SELF.config.id %]
- <td>[%- L.select_tag('income_accno_id_' _ tz.id, ACCOUNTS.ic_income, title_sub=\account_label, default=SELF.defaults.income_accno_id) %]</td>
+ <td>[% L.chart_picker('income_accno_id_' _ tz.id, SELF.defaults.income_accno_id, choose=1, type='IC_income,IC_sale', style=style) %]</td>
[%- ELSIF SELF.config.id AND SELF.config.orphaned %]
- <td>[%- L.select_tag('income_accno_id_' _ tz.id, ACCOUNTS.ic_income, title_sub=\account_label, default=CHARTLIST.${tz.id}.income_accno_id) %]</td>
+ <td>[% L.chart_picker('income_accno_id_' _ tz.id, CHARTLIST.${tz.id}.income_accno_id, choose=1, type='IC_income,IC_sale', style=style) %]</td>
[%- ELSE %]
<td>[% CHARTLIST.${tz.id}.income_accno %] -- [% CHARTLIST.${tz.id}.income_accno_description %]</td>
[%- END %]
<tr>
<th align="right">[% 'Expense' | $T8 %] [% HTML.escape(tz.description) %]</th>
[%- IF NOT SELF.config.id %]
- <td>[%- L.select_tag('expense_accno_id_' _ tz.id, ACCOUNTS.ic_expense, title_sub=\account_label, default=SELF.defaults.expense_accno_id) %]</td>
+ <td>[% L.chart_picker('expense_accno_id_' _ tz.id, SELF.defaults.expense_accno_id, choose=1, type='IC_expense,IC_cogs', style=style) %]</td>
[%- ELSIF SELF.config.id AND SELF.config.orphaned %]
- <td>[%- L.select_tag('expense_accno_id_' _ tz.id, ACCOUNTS.ic_expense, title_sub=\account_label, default=CHARTLIST.${tz.id}.expense_accno_id) %]</td>
+ <td>[% L.chart_picker('expense_accno_id_' _ tz.id, CHARTLIST.${tz.id}.expense_accno_id, choose=1, type='IC_expense,IC_cogs', style=style) %]</td>
[%- ELSE %]
<td>[% CHARTLIST.${tz.id}.expense_accno %] -- [% CHARTLIST.${tz.id}.expense_accno_description %]</td>
[%- END %]
<table>
<tr>
<th align="right">[% 'Login Name' | $T8 %]</th>
- <td>[% L.input_tag('{AUTH}login', '', id='auth_login', style=style, class='initial_focus') %]</td>
+ <td>[% L.input_tag('{AUTH}login', FORM.login, id='auth_login', style=style, class='initial_focus') %]</td>
</tr>
<tr>
<th align="right">[% 'Password' | $T8 %]</th>
|
<a href="doc/kivitendo-Dokumentation.pdf" target="_top">[%- LxERP.t8('Documentation') %]</a>
</p>
+
+[% IF FORM.client %]
+<script type='text/javascript'>
+$(function() {
+ $('[name="{AUTH}client_id"] option').filter(function() {
+ return ($(this).text() === '[% FORM.client %]');
+ }).prop('selected', true);
+});
+</script>
+[% END %]
[%- USE HTML -%][%- USE LxERP -%][%- USE L -%][%- USE T8 -%]<h1>[% HTML.escape(title) %]</h1>
+[% SET style="width: 400px" %]
<form action="controller.pl" method="post">
[%- L.hidden_tag("id", SELF.config.id) %]
[%- IF SELF.config.id %]
<td>[% CHARTLIST.${bg.id}.income_accno %] -- [% CHARTLIST.${bg.id}.income_accno_description %]</td>
[%- ELSE %]
- <td>[%- L.select_tag('income_accno_id_' _ bg.id, ACCOUNTS.ic_income, title_sub=\account_label, default=SELF.defaults.income_accno_id) %]</td>
+ <td>[% L.chart_picker('income_accno_id_' _ bg.id, SELF.defaults.income_accno_id, choose=1, type='IC_income,IC_sale', style=style) %]</td>
[%- END %]
</tr>
<tr>
[%- IF SELF.config.id %]
<td>[% CHARTLIST.${bg.id}.expense_accno %] -- [% CHARTLIST.${bg.id}.expense_accno_description %]</td>
[%- ELSE %]
- <td>[%- L.select_tag('expense_accno_id_' _ bg.id, ACCOUNTS.ic_expense, title_sub=\account_label, default=SELF.defaults.expense_accno_id) %]</td>
+ <td>[% L.chart_picker('expense_accno_id_' _ bg.id, SELF.defaults.expense_accno_id, choose=1, type='IC_expense,IC_cogs', style=style) %]</td>
[%- END %]
</tr>
[%- END %]