Revision 2d1ba4f4
Von Moritz Bunkus vor fast 8 Jahren hinzugefügt
SL/Form.pm | ||
---|---|---|
1293 | 1293 |
dunning => $main::locale->text('Dunning'), |
1294 | 1294 |
letter => $main::locale->text('Letter'), |
1295 | 1295 |
ic_supply => $main::locale->text('Intra-Community supply'), |
1296 |
statement => $main::locale->text('Statement'), |
|
1296 | 1297 |
); |
1297 | 1298 |
|
1298 | 1299 |
$main::lxdebug->leave_sub(); |
bin/mozilla/rp.pl | ||
---|---|---|
43 | 43 |
use SL::DB::Customer; |
44 | 44 |
use SL::RP; |
45 | 45 |
use SL::Iconv; |
46 |
use SL::Locale::String qw(t8); |
|
46 | 47 |
use SL::ReportGenerator; |
47 | 48 |
use Data::Dumper; |
48 | 49 |
use List::MoreUtils qw(any); |
... | ... | |
164 | 165 |
my $is_trial_balance = $::form->{report} eq "trial_balance"; |
165 | 166 |
my $is_aging = $::form->{report} =~ /^a[rp]_aging$/; |
166 | 167 |
my $is_payments = $::form->{report} =~ /(receipts|payments)$/; |
168 |
my $format = 'html'; |
|
167 | 169 |
|
168 | 170 |
my ($label, $nextsub, $vc); |
169 | 171 |
if ($is_aging) { |
... | ... | |
174 | 176 |
$nextsub = "generate_$::form->{report}"; |
175 | 177 |
|
176 | 178 |
$vc = qq|<input name=$::form->{vc} size=35 class="initial_focus">|; |
179 |
|
|
180 |
$format = 'pdf'; |
|
177 | 181 |
} |
178 | 182 |
|
179 | 183 |
my ($selection, $paymentaccounts); |
... | ... | |
189 | 193 |
} |
190 | 194 |
} |
191 | 195 |
|
196 |
setup_rp_report_action_bar(); |
|
197 |
|
|
192 | 198 |
$::form->header; |
193 | 199 |
print $::form->parse_html_template('rp/report', { |
194 | 200 |
paymentaccounts => $paymentaccounts, |
... | ... | |
206 | 212 |
is_income_statement => $is_income_statement, |
207 | 213 |
is_erfolgsrechnung => $is_erfolgsrechnung, |
208 | 214 |
is_projects => $is_projects, |
215 |
format => $format, |
|
209 | 216 |
}); |
210 | 217 |
|
211 | 218 |
$::lxdebug->leave_sub; |
... | ... | |
1001 | 1008 |
my @columns = qw(statement ct invnumber transdate duedate amount open); |
1002 | 1009 |
|
1003 | 1010 |
my %column_defs = ( |
1004 |
'statement' => { 'text' => '', 'visible' => $form->{ct} eq 'customer' ? 'HTML' : 0, },
|
|
1011 |
'statement' => { raw_header_data => $::request->presenter->checkbox_tag("checkall", checkall => '[name^=statement_]'), 'visible' => $form->{ct} eq 'customer' ? 'HTML' : 0, align => "center" },
|
|
1005 | 1012 |
'ct' => { 'text' => $form->{ct} eq 'customer' ? $locale->text('Customer') : $locale->text('Vendor'), }, |
1006 | 1013 |
'invnumber' => { 'text' => $locale->text('Invoice'), }, |
1007 | 1014 |
'transdate' => { 'text' => $locale->text('Date'), }, |
... | ... | |
1112 | 1119 |
'raw_bottom_info_text' => $raw_bottom_info_text); |
1113 | 1120 |
} |
1114 | 1121 |
|
1122 |
setup_rp_aging_action_bar(arap => $form->{arap}); |
|
1115 | 1123 |
$report->generate_with_headers(); |
1116 | 1124 |
|
1117 | 1125 |
$main::lxdebug->leave_sub(); |
1118 | 1126 |
} |
1119 | 1127 |
|
1120 |
sub select_all { |
|
1121 |
$main::lxdebug->enter_sub(); |
|
1122 |
|
|
1123 |
my $form = $main::form; |
|
1124 |
my %myconfig = %main::myconfig; |
|
1125 |
my $locale = $main::locale; |
|
1126 |
|
|
1127 |
RP->aging(\%myconfig, \%$form); |
|
1128 |
|
|
1129 |
map { $_->{checked} = "checked" } @{ $form->{AG} }; |
|
1130 |
|
|
1131 |
&aging; |
|
1132 |
|
|
1133 |
$main::lxdebug->leave_sub(); |
|
1134 |
} |
|
1135 |
|
|
1136 |
sub e_mail { |
|
1137 |
$::lxdebug->enter_sub; |
|
1138 |
$::auth->assert('general_ledger'); |
|
1139 |
|
|
1140 |
# get name and email addresses |
|
1141 |
my $selected = 0; |
|
1142 |
for my $i (1 .. $::form->{rowcount}) { |
|
1143 |
next unless $::form->{"statement_$i"}; |
|
1144 |
$::form->{"$::form->{ct}_id"} = $::form->{"$::form->{ct}_id_$i"}; |
|
1145 |
RP->get_customer(\%::myconfig, $::form); |
|
1146 |
$selected = 1; |
|
1147 |
last; |
|
1148 |
} |
|
1149 |
|
|
1150 |
$::form->error($::locale->text('Nothing selected!')) unless $selected; |
|
1151 |
|
|
1152 |
$::form->{media} = "email"; |
|
1153 |
|
|
1154 |
# save all other variables |
|
1155 |
my @hidden_values; |
|
1156 |
for my $key (keys %$::form) { |
|
1157 |
next if any { $key eq $_ } qw(login password action email cc bcc subject message type sendmode format header); |
|
1158 |
next unless '' eq ref $::form->{$key}; |
|
1159 |
push @hidden_values, $key; |
|
1160 |
} |
|
1161 |
|
|
1162 |
$::form->header; |
|
1163 |
print $::form->parse_html_template('rp/e_mail', { |
|
1164 |
print_options => print_options(inline => 1), |
|
1165 |
hidden_values => \@hidden_values, |
|
1166 |
}); |
|
1167 |
|
|
1168 |
$::lxdebug->leave_sub; |
|
1169 |
} |
|
1170 |
|
|
1171 | 1128 |
sub send_email { |
1172 | 1129 |
$main::lxdebug->enter_sub(); |
1173 | 1130 |
|
... | ... | |
1184 | 1141 |
|
1185 | 1142 |
$form->{"statement_1"} = 1; |
1186 | 1143 |
|
1144 |
my $email_form = delete $form->{email_form}; |
|
1145 |
my %field_names = (to => 'email'); |
|
1146 |
|
|
1147 |
$form->{ $field_names{$_} // $_ } = $email_form->{$_} for keys %{ $email_form }; |
|
1148 |
|
|
1187 | 1149 |
$form->{media} = 'email'; |
1188 | 1150 |
print_form(); |
1189 | 1151 |
|
... | ... | |
1910 | 1872 |
$main::lxdebug->leave_sub(); |
1911 | 1873 |
|
1912 | 1874 |
} |
1875 |
|
|
1876 |
sub setup_rp_aging_action_bar { |
|
1877 |
my %params = @_; |
|
1878 |
|
|
1879 |
return unless $params{arap} eq 'ar'; |
|
1880 |
|
|
1881 |
for my $bar ($::request->layout->get('actionbar')) { |
|
1882 |
$bar->add( |
|
1883 |
combobox => [ |
|
1884 |
action => [ |
|
1885 |
t8('Print'), |
|
1886 |
call => [ 'kivi.SalesPurchase.show_print_dialog' ], |
|
1887 |
checks => [ [ 'kivi.check_if_entries_selected', '[name^=statement_]' ] ], |
|
1888 |
], |
|
1889 |
action => [ |
|
1890 |
t8('E Mail'), |
|
1891 |
call => [ 'kivi.SalesPurchase.show_email_dialog', 'send_email' ], |
|
1892 |
checks => [ [ 'kivi.check_if_entries_selected', '[name^=statement_]' ] ], |
|
1893 |
], |
|
1894 |
], |
|
1895 |
); |
|
1896 |
} |
|
1897 |
} |
|
1898 |
|
|
1899 |
sub setup_rp_report_action_bar { |
|
1900 |
my %params = @_; |
|
1901 |
|
|
1902 |
for my $bar ($::request->layout->get('actionbar')) { |
|
1903 |
$bar->add( |
|
1904 |
action => [ |
|
1905 |
t8('Continue'), |
|
1906 |
submit => [ '#form', { action => 'continue' } ], |
|
1907 |
accesskey => 'enter', |
|
1908 |
], |
|
1909 |
); |
|
1910 |
} |
|
1911 |
} |
|
1912 |
|
|
1913 | 1913 |
1; |
locale/de/all | ||
---|---|---|
1055 | 1055 |
'E-Mail' => 'E-Mail', |
1056 | 1056 |
'E-Mail-Journal' => 'E-Mail-Journal', |
1057 | 1057 |
'E-mail' => 'E-Mail', |
1058 |
'E-mail Statement to' => 'Fälligkeitsabrechnung als E-Mail an', |
|
1059 | 1058 |
'E-mail address missing!' => 'E-Mail-Adresse fehlt!', |
1060 | 1059 |
'EAN' => 'EAN', |
1061 | 1060 |
'EAN-Code' => 'EAN-Code', |
... | ... | |
2561 | 2560 |
'Select a customer' => 'Einen Kunden auswählen', |
2562 | 2561 |
'Select a period' => 'Bitte Zeitraum auswählen', |
2563 | 2562 |
'Select a vendor' => 'Einen Lieferanten auswählen', |
2564 |
'Select all' => 'Alle auswählen', |
|
2565 | 2563 |
'Select charts for which the CB/OB transactions want to be posted.' => 'Wählen Sie Konten aus, zu welchen SB/EB-Buchungen erstellt werden sollen.', |
2566 | 2564 |
'Select federal state...' => 'Bundesland auswählen...', |
2567 | 2565 |
'Select file to upload' => 'Datei zum Hochladen auswählen', |
templates/webpages/rp/aging_ar_bottom.html | ||
---|---|---|
1 | 1 |
[%- USE T8 %] |
2 |
[% USE HTML %] <input type="hidden" name="rowcount" value="[% HTML.escape(row_idx) %]"> |
|
3 |
|
|
4 |
[% PRINT_OPTIONS %] |
|
2 |
[% USE HTML %][%- USE L -%] <input type="hidden" name="rowcount" value="[% HTML.escape(row_idx) %]"> |
|
5 | 3 |
|
6 | 4 |
<input type="hidden" name="todate" value="[% HTML.escape(todate) %]"> |
7 | 5 |
<input type="hidden" name="title" value="[% HTML.escape(title) %]"> |
... | ... | |
10 | 8 |
<input type="hidden" name="customer" value="[% HTML.escape(customer) %]"> |
11 | 9 |
<input type="hidden" name="vendor" value="[% HTML.escape(vendor) %]"> |
12 | 10 |
<input type="hidden" name="department" value="[% HTML.escape(department) %]"> |
11 |
[% L.hidden_tag("formname", "statement") %] |
|
13 | 12 |
|
14 |
[% 'Statement' | $T8 %]
|
|
15 |
<br>
|
|
16 |
<input class="submit" type="submit" name="action" value="[% 'Select all' | $T8 %]">
|
|
17 |
<input class="submit" type="submit" name="action" value="[% 'Print' | $T8 %]">
|
|
18 |
<input class="submit" type="submit" name="action" value="[% 'E-mail' | $T8 %]">
|
|
13 |
<div id="email_inputs" class="hidden"></div>
|
|
14 |
<div id="print_options" class="hidden">
|
|
15 |
[% PRINT_OPTIONS %]
|
|
16 |
</div>
|
|
17 |
</form>
|
|
19 | 18 |
|
20 | 19 |
</form> |
20 |
<div id="print_dialog" class="hidden"> |
|
21 |
[%- PROCESS 'common/_print_dialog.html' %] |
|
22 |
</div> |
templates/webpages/rp/aging_ar_top.html | ||
---|---|---|
1 |
<form method="post" action="rp.pl"> |
|
1 |
<form method="post" action="rp.pl" id="form"> |
templates/webpages/rp/e_mail.html | ||
---|---|---|
1 |
[%- USE HTML %] |
|
2 |
[%- USE L %] |
|
3 |
[%- USE LxERP %] |
|
4 |
[%- USE T8 %] |
|
5 |
|
|
6 |
<h1>[% 'E-mail Statement to' | $T8 %] [% $ct %]</h1> |
|
7 |
|
|
8 |
<form method=post action='[% script %]'> |
|
9 |
|
|
10 |
<table> |
|
11 |
<tr> |
|
12 |
<th align=right nowrap>[% 'E-mail' | $T8 %]</th> |
|
13 |
<td><input name=email size=30 value="[% email %]"></td> |
|
14 |
<th align=right nowrap>[% 'Cc' | $T8 %]</th> |
|
15 |
<td><input name=cc size=30 value="[% cc %]"></td> |
|
16 |
</tr> |
|
17 |
<tr> |
|
18 |
<th align=right nowrap>[% 'Subject' | $T8 %]</th> |
|
19 |
<td><input name=subject size=30 value="[% subject %]"></td> |
|
20 |
[% IF AUTH.assert('email_bcc', 'may_fail') %] |
|
21 |
<th align=right nowrap=true>[% 'Bcc' | $T8 %]</th> |
|
22 |
<td><input name=bcc size=30 value="[% bcc | $T8 %]"></td> |
|
23 |
[%- END %] |
|
24 |
</tr> |
|
25 |
</table> |
|
26 |
<table width=100%> |
|
27 |
<tr> |
|
28 |
<th align=left nowrap>[% 'Message' | $T8 %]</th> |
|
29 |
</tr> |
|
30 |
<tr> |
|
31 |
<td><textarea name=message rows=15 cols=60 wrap=soft>[% message %]</textarea></td> |
|
32 |
</tr> |
|
33 |
</table> |
|
34 |
[% print_options %] |
|
35 |
<hr size=3 noshade> |
|
36 |
|
|
37 |
<input type=hidden name=nextsub value=send_email> |
|
38 |
[%- FOREACH var = hidden_values %] |
|
39 |
[% L.hidden_tag(var, $var) %] |
|
40 |
[%- END %] |
|
41 |
|
|
42 |
<br> |
|
43 |
<input name=action class=submit type=submit value="[% 'Continue' | $T8 %]"> |
|
44 |
</form> |
|
45 |
|
templates/webpages/rp/print_options.html | ||
---|---|---|
5 | 5 |
<table> |
6 | 6 |
<tr> |
7 | 7 |
<td> |
8 |
<select name=type>
|
|
8 |
<select name="type" id="type">
|
|
9 | 9 |
<option value=statement [% PD.statement %]>[% 'Statement' | $T8 %]</option> |
10 | 10 |
</select> |
11 | 11 |
</td> |
12 | 12 |
<td> |
13 |
<select name=format>
|
|
13 |
<select name="format" id="format">
|
|
14 | 14 |
<option value=html [% DF.html %]>[% 'HTML' | $T8 %]</option> |
15 | 15 |
<option value=pdf [% DF.pdf %]>[% 'PDF' | $T8 %]</option> |
16 | 16 |
<option value=postscript [% DF.postscript %]>[% 'Postscript' | $T8 %]</option> |
templates/webpages/rp/report.html | ||
---|---|---|
118 | 118 |
|
119 | 119 |
<h1>[% title %]</h1> |
120 | 120 |
|
121 |
<form method=post action='[% script %]'>
|
|
121 |
<form method='post' action='[% script %]' id='form'>
|
|
122 | 122 |
|
123 | 123 |
<input type=hidden name=title value="[% title %]"> |
124 | 124 |
|
... | ... | |
264 | 264 |
</td> |
265 | 265 |
</tr> |
266 | 266 |
<input type=hidden name=type value=statement> |
267 |
<input type=hidden name=format value=html>
|
|
267 |
[% L.hidden_tag("format", format) %]
|
|
268 | 268 |
<input type=hidden name=media value=screen> |
269 | 269 |
|
270 | 270 |
<input type=hidden name=nextsub value='[% nextsub %]'> |
... | ... | |
363 | 363 |
</tr> |
364 | 364 |
[%- END %] |
365 | 365 |
</table> |
366 |
|
|
367 |
<hr size=3 noshade> |
|
368 |
<br> |
|
369 |
<input type=submit class=submit name=action value="[% 'Continue' | $T8 %]"> |
|
370 |
|
|
371 | 366 |
</form> |
372 | 367 |
|
373 | 368 |
<script type="text/javascript"> |
... | ... | |
398 | 393 |
return true; |
399 | 394 |
} |
400 | 395 |
</script> |
401 |
|
Auch abrufbar als: Unified diff
ActionBar: Verwendung bei »offene Forderungen/Verbindlichkeiten«