Revision 38a9098d
Von Moritz Bunkus vor fast 8 Jahren hinzugefügt
bin/mozilla/rc.pl | ||
---|---|---|
33 | 33 |
#====================================================================== |
34 | 34 |
|
35 | 35 |
use SL::RC; |
36 |
use SL::Locale::String qw(t8); |
|
36 | 37 |
|
37 | 38 |
require "bin/mozilla/common.pl"; |
38 | 39 |
|
... | ... | |
48 | 49 |
|
49 | 50 |
RC->paymentaccounts(\%::myconfig, $::form); |
50 | 51 |
|
52 |
setup_rc_reconciliation_action_bar(); |
|
53 |
|
|
51 | 54 |
$::form->header; |
52 | 55 |
print $::form->parse_html_template('rc/step1', { |
53 | 56 |
selection_sub => sub { ("$_[0]{accno}--$_[0]{description}")x2 }, |
... | ... | |
56 | 59 |
$::lxdebug->leave_sub; |
57 | 60 |
} |
58 | 61 |
|
59 |
sub continue { call_sub($::form->{"nextsub"}); } |
|
60 |
|
|
61 | 62 |
sub get_payments { |
62 | 63 |
$::lxdebug->enter_sub; |
63 | 64 |
$::auth->assert('cash'); |
... | ... | |
103 | 104 |
my $statementbalance = $::form->parse_amount(\%::myconfig, $::form->{statementbalance}); |
104 | 105 |
my $difference = $statementbalance - $clearedbalance - $cleared; |
105 | 106 |
|
107 |
setup_rc_display_form_action_bar(); |
|
108 |
|
|
106 | 109 |
$::form->header; |
107 | 110 |
print $::form->parse_html_template('rc/step2', { |
108 | 111 |
is_asset => $::form->{category} eq 'A', |
... | ... | |
146 | 149 |
$::lxdebug->leave_sub; |
147 | 150 |
} |
148 | 151 |
|
149 |
sub done {
|
|
152 |
sub reconcile {
|
|
150 | 153 |
$::lxdebug->enter_sub; |
151 | 154 |
$::auth->assert('cash'); |
152 | 155 |
|
... | ... | |
160 | 163 |
$::lxdebug->leave_sub; |
161 | 164 |
} |
162 | 165 |
|
166 |
sub setup_rc_reconciliation_action_bar { |
|
167 |
my %params = @_; |
|
168 |
|
|
169 |
for my $bar ($::request->layout->get('actionbar')) { |
|
170 |
$bar->add( |
|
171 |
action => [ |
|
172 |
t8('Show'), |
|
173 |
submit => [ '#form', { action => "get_payments" } ], |
|
174 |
accesskey => 'enter', |
|
175 |
], |
|
176 |
); |
|
177 |
} |
|
178 |
} |
|
179 |
|
|
180 |
sub setup_rc_display_form_action_bar { |
|
181 |
my %params = @_; |
|
182 |
|
|
183 |
for my $bar ($::request->layout->get('actionbar')) { |
|
184 |
$bar->add( |
|
185 |
action => [ |
|
186 |
t8('Update'), |
|
187 |
submit => [ '#form', { action => "update" } ], |
|
188 |
accesskey => 'enter', |
|
189 |
], |
|
190 |
action => [ |
|
191 |
t8('Reconcile'), |
|
192 |
submit => [ '#form', { action => "reconcile" } ], |
|
193 |
], |
|
194 |
); |
|
195 |
} |
|
196 |
} |
templates/webpages/rc/step1.html | ||
---|---|---|
4 | 4 |
[%- USE LxERP %] |
5 | 5 |
<h1>[% 'Reconciliation' | $T8 %]</h1> |
6 | 6 |
|
7 |
<form method=post action="[% script %]">
|
|
7 |
<form method="post" action="rc.pl" id="form">
|
|
8 | 8 |
|
9 | 9 |
<table> |
10 | 10 |
<tr> |
... | ... | |
18 | 18 |
<td>[% L.date_tag('todate') %]</td> |
19 | 19 |
</tr> |
20 | 20 |
</table> |
21 |
|
|
22 |
<hr size=3 noshade> |
|
23 |
<br> |
|
24 |
|
|
25 |
[% L.hidden_tag('nextsub', 'get_payments') %] |
|
26 |
[% L.submit_tag('action', LxERP.t8('Continue')) %] |
|
27 |
|
|
28 | 21 |
</form> |
29 |
|
templates/webpages/rc/step2.html | ||
---|---|---|
7 | 7 |
|
8 | 8 |
<p>[% FOREACH row IN option %][% row %][% ', ' UNLESS loop.last %][% END %]</p> |
9 | 9 |
|
10 |
<form method=post action="[% script %]">
|
|
10 |
<form method="post" action="rc.pl" id="form">
|
|
11 | 11 |
|
12 | 12 |
<table width=100%> |
13 | 13 |
<tr class=listheading> |
... | ... | |
98 | 98 |
</tr> |
99 | 99 |
</table> |
100 | 100 |
|
101 |
<hr size=3 noshade> |
|
102 |
<br> |
|
103 |
|
|
104 | 101 |
<input type=hidden name=rowcount value="[% rowcount %]"> |
105 | 102 |
<input type=hidden name=accno value="[% accno %]"> |
106 | 103 |
<input type=hidden name=account value="[% account %]"> |
... | ... | |
108 | 105 |
<input type=hidden name=fromdate value="[% fromdate %]"> |
109 | 106 |
<input type=hidden name=todate value="[% todate %]"> |
110 | 107 |
|
111 |
<br> |
|
112 |
<input type=submit class=submit name=action value="[% 'Update' | $T8 %]"> |
|
113 |
<input type=submit class=submit name=action value="[% 'Done' | $T8 %]"> |
|
114 |
|
|
115 | 108 |
</form> |
Auch abrufbar als: Unified diff
ActionBar: Verwendung bei »Kontenabgleich«