Revision 000588da
Von Kivitendo Admin vor fast 10 Jahren hinzugefügt
SL/Controller/Buchungsgruppen.pm | ||
---|---|---|
8 | 8 |
use SL::Helper::Flash; |
9 | 9 |
use SL::Locale::String; |
10 | 10 |
use SL::DB::TaxzoneChart; |
11 |
use SL::Controller::ClientConfig; |
|
12 | 11 |
use SL::DB::Default; |
13 | 12 |
|
14 | 13 |
use Rose::Object::MakeMethods::Generic ( |
... | ... | |
53 | 52 |
my ($self, %params) = @_; |
54 | 53 |
|
55 | 54 |
$self->render('buchungsgruppen/form', %params, |
56 |
TAXZONES => SL::DB::Manager::TaxZone->get_all_sorted(), |
|
57 |
ACCOUNTS => SL::Controller::ClientConfig->init_accounts(), |
|
58 |
account_label => sub { "$_[0]{accno}--$_[0]{description}" }); |
|
55 |
TAXZONES => SL::DB::Manager::TaxZone->get_all_sorted()); |
|
59 | 56 |
} |
60 | 57 |
|
61 | 58 |
sub action_edit { |
SL/Controller/Taxzones.pm | ||
---|---|---|
11 | 11 |
use SL::Locale::String; |
12 | 12 |
use SL::DB::Manager::Buchungsgruppe; |
13 | 13 |
use SL::DB::Manager::TaxzoneChart; |
14 |
use SL::Controller::ClientConfig; |
|
15 | 14 |
|
16 | 15 |
use Rose::Object::MakeMethods::Generic ( |
17 | 16 |
scalar => [ qw(config) ], |
... | ... | |
47 | 46 |
my ($self, %params) = @_; |
48 | 47 |
|
49 | 48 |
$self->render('taxzones/form', %params, |
50 |
BUCHUNGSGRUPPEN => SL::DB::Manager::Buchungsgruppe->get_all_sorted, |
|
51 |
ACCOUNTS => SL::Controller::ClientConfig->init_accounts, |
|
52 |
account_label => sub { "$_[0]{accno}--$_[0]{description}" }); |
|
49 |
BUCHUNGSGRUPPEN => SL::DB::Manager::Buchungsgruppe->get_all_sorted); |
|
53 | 50 |
} |
54 | 51 |
|
55 | 52 |
sub action_edit { |
templates/webpages/buchungsgruppen/form.html | ||
---|---|---|
1 | 1 |
[%- USE HTML -%][%- USE LxERP -%][%- USE L -%][%- USE T8 -%] |
2 |
[% SET style="width: 400px" %] |
|
2 | 3 |
|
3 | 4 |
<h1>[% HTML.escape(title) %]</h1> |
4 | 5 |
|
... | ... | |
13 | 14 |
<tr> |
14 | 15 |
<th align="right">[% 'Inventory Account' | $T8 %]</th> |
15 | 16 |
[%- IF NOT SELF.config.id %] |
16 |
<td>[%- L.select_tag("config.inventory_accno_id", ACCOUNTS.ic, title_sub=\account_label, default=SELF.defaults.inventory_accno_id) %]</td>
|
|
17 |
<td>[% L.chart_picker("config.inventory_accno_id", SELF.defaults.inventory_accno_id, choose=1, type='IC', style=style) %]</td>
|
|
17 | 18 |
[%- ELSIF SELF.config.id AND SELF.config.orphaned %] |
18 |
<td>[%- L.select_tag("config.inventory_accno_id", ACCOUNTS.ic, title_sub=\account_label, default=SELF.config.inventory_accno_id) %]</td>
|
|
19 |
<td>[% L.chart_picker("config.inventory_accno_id", SELF.config.inventory_accno_id, choose=1, type='IC', style=style) %]</td>
|
|
19 | 20 |
[%- ELSE %] |
20 | 21 |
<td>[%- CHARTLIST.inventory_accno %] -- [%- CHARTLIST.inventory_accno_description %]</td> |
21 | 22 |
[%- END %] |
... | ... | |
24 | 25 |
<tr> |
25 | 26 |
<th align="right">[% 'Revenue' | $T8 %] [% HTML.escape(tz.description) %]</th> |
26 | 27 |
[%- IF NOT SELF.config.id %] |
27 |
<td>[%- L.select_tag('income_accno_id_' _ tz.id, ACCOUNTS.ic_income, title_sub=\account_label, default=SELF.defaults.income_accno_id) %]</td>
|
|
28 |
<td>[% L.chart_picker('income_accno_id_' _ tz.id, SELF.defaults.income_accno_id, choose=1, type='IC_income,IC_sale', style=style) %]</td>
|
|
28 | 29 |
[%- ELSIF SELF.config.id AND SELF.config.orphaned %] |
29 |
<td>[%- L.select_tag('income_accno_id_' _ tz.id, ACCOUNTS.ic_income, title_sub=\account_label, default=CHARTLIST.${tz.id}.income_accno_id) %]</td>
|
|
30 |
<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>
|
|
30 | 31 |
[%- ELSE %] |
31 | 32 |
<td>[% CHARTLIST.${tz.id}.income_accno %] -- [% CHARTLIST.${tz.id}.income_accno_description %]</td> |
32 | 33 |
[%- END %] |
... | ... | |
34 | 35 |
<tr> |
35 | 36 |
<th align="right">[% 'Expense' | $T8 %] [% HTML.escape(tz.description) %]</th> |
36 | 37 |
[%- IF NOT SELF.config.id %] |
37 |
<td>[%- L.select_tag('expense_accno_id_' _ tz.id, ACCOUNTS.ic_expense, title_sub=\account_label, default=SELF.defaults.expense_accno_id) %]</td>
|
|
38 |
<td>[% L.chart_picker('expense_accno_id_' _ tz.id, SELF.defaults.expense_accno_id, choose=1, type='IC_expense,IC_cogs', style=style) %]</td>
|
|
38 | 39 |
[%- ELSIF SELF.config.id AND SELF.config.orphaned %] |
39 |
<td>[%- L.select_tag('expense_accno_id_' _ tz.id, ACCOUNTS.ic_expense, title_sub=\account_label, default=CHARTLIST.${tz.id}.expense_accno_id) %]</td>
|
|
40 |
<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>
|
|
40 | 41 |
[%- ELSE %] |
41 | 42 |
<td>[% CHARTLIST.${tz.id}.expense_accno %] -- [% CHARTLIST.${tz.id}.expense_accno_description %]</td> |
42 | 43 |
[%- END %] |
templates/webpages/login_screen/user_login.html | ||
---|---|---|
29 | 29 |
<table> |
30 | 30 |
<tr> |
31 | 31 |
<th align="right">[% 'Login Name' | $T8 %]</th> |
32 |
<td>[% L.input_tag('{AUTH}login', '', id='auth_login', style=style, class='initial_focus') %]</td>
|
|
32 |
<td>[% L.input_tag('{AUTH}login', FORM.login, id='auth_login', style=style, class='initial_focus') %]</td>
|
|
33 | 33 |
</tr> |
34 | 34 |
<tr> |
35 | 35 |
<th align="right">[% 'Password' | $T8 %]</th> |
... | ... | |
70 | 70 |
| |
71 | 71 |
<a href="doc/kivitendo-Dokumentation.pdf" target="_top">[%- LxERP.t8('Documentation') %]</a> |
72 | 72 |
</p> |
73 |
|
|
74 |
[% IF FORM.client %] |
|
75 |
<script type='text/javascript'> |
|
76 |
$(function() { |
|
77 |
$('[name="{AUTH}client_id"] option').filter(function() { |
|
78 |
return ($(this).text() === '[% FORM.client %]'); |
|
79 |
}).prop('selected', true); |
|
80 |
}); |
|
81 |
</script> |
|
82 |
[% END %] |
templates/webpages/taxzones/form.html | ||
---|---|---|
1 | 1 |
[%- USE HTML -%][%- USE LxERP -%][%- USE L -%][%- USE T8 -%]<h1>[% HTML.escape(title) %]</h1> |
2 |
[% SET style="width: 400px" %] |
|
2 | 3 |
|
3 | 4 |
<form action="controller.pl" method="post"> |
4 | 5 |
[%- L.hidden_tag("id", SELF.config.id) %] |
... | ... | |
14 | 15 |
[%- IF SELF.config.id %] |
15 | 16 |
<td>[% CHARTLIST.${bg.id}.income_accno %] -- [% CHARTLIST.${bg.id}.income_accno_description %]</td> |
16 | 17 |
[%- ELSE %] |
17 |
<td>[%- L.select_tag('income_accno_id_' _ bg.id, ACCOUNTS.ic_income, title_sub=\account_label, default=SELF.defaults.income_accno_id) %]</td>
|
|
18 |
<td>[% L.chart_picker('income_accno_id_' _ bg.id, SELF.defaults.income_accno_id, choose=1, type='IC_income,IC_sale', style=style) %]</td>
|
|
18 | 19 |
[%- END %] |
19 | 20 |
</tr> |
20 | 21 |
<tr> |
... | ... | |
22 | 23 |
[%- IF SELF.config.id %] |
23 | 24 |
<td>[% CHARTLIST.${bg.id}.expense_accno %] -- [% CHARTLIST.${bg.id}.expense_accno_description %]</td> |
24 | 25 |
[%- ELSE %] |
25 |
<td>[%- L.select_tag('expense_accno_id_' _ bg.id, ACCOUNTS.ic_expense, title_sub=\account_label, default=SELF.defaults.expense_accno_id) %]</td>
|
|
26 |
<td>[% L.chart_picker('expense_accno_id_' _ bg.id, SELF.defaults.expense_accno_id, choose=1, type='IC_expense,IC_cogs', style=style) %]</td>
|
|
26 | 27 |
[%- END %] |
27 | 28 |
</tr> |
28 | 29 |
[%- END %] |
Auch abrufbar als: Unified diff
Chartpicker auch für Steuerzonen und Buchungsgruppen
Hier wurde noch das entfernte init_accounts aus ClientConfig benutzt.