Revision 0bf92081
Von Moritz Bunkus vor mehr als 8 Jahren hinzugefügt
SL/Controller/Letter.pm | ||
---|---|---|
4 | 4 |
use parent qw(SL::Controller::Base); |
5 | 5 |
|
6 | 6 |
use Carp; |
7 |
use File::Basename; |
|
7 | 8 |
use POSIX qw(strftime); |
8 | 9 |
use SL::Controller::Helper::GetModels; |
9 | 10 |
use SL::Controller::Helper::ReportGenerator; |
... | ... | |
247 | 248 |
return !$err; |
248 | 249 |
} |
249 | 250 |
|
251 |
my $webdav_copy_args = Form->new(''); |
|
252 |
%{ $webdav_copy_args } = ( |
|
253 |
%{ $::form }, |
|
254 |
tmpdir => dirname($pdf_file_name), |
|
255 |
tmpfile => basename($pdf_file_name), |
|
256 |
cwd => POSIX::getcwd(), |
|
257 |
); |
|
258 |
|
|
250 | 259 |
if (!$::form->{printer_id} || $::form->{media} eq 'screen') { |
251 | 260 |
|
252 | 261 |
my $file = IO::File->new($pdf_file_name, 'r') || croak("Cannot open file '$pdf_file_name'"); |
... | ... | |
263 | 272 |
$::locale->with_raw_io(\*STDOUT, sub { print while <$file> }); |
264 | 273 |
$file->close; |
265 | 274 |
|
266 |
Common::copy_file_to_webdav_folder($::form) if $::instance_conf->get_webdav_documents;
|
|
275 |
Common::copy_file_to_webdav_folder($webdav_copy_args) if $::instance_conf->get_webdav_documents;
|
|
267 | 276 |
unlink $pdf_file_name; |
268 | 277 |
return 1; |
269 | 278 |
} |
... | ... | |
275 | 284 |
binmode $out; |
276 | 285 |
print $out scalar(read_file($pdf_file_name)); |
277 | 286 |
close $out; |
278 |
Common::copy_file_to_webdav_folder($::form) if $::instance_conf->get_webdav_documents;
|
|
287 |
Common::copy_file_to_webdav_folder($webdav_copy_args) if $::instance_conf->get_webdav_documents;
|
|
279 | 288 |
|
280 | 289 |
flash_later('info', t8('The documents have been sent to the printer \'#1\'.', $printer->printer_description)); |
281 | 290 |
$self->redirect_to(action => 'edit', id => $letter->{id}, 'printer_id' => $::form->{printer_id}); |
doc/changelog | ||
---|---|---|
7 | 7 |
einere neue Features und Detailverbesserungen: |
8 | 8 |
|
9 | 9 |
- Auftrag um Druckvariante Gelangensbestätigung erweitert. |
10 |
|
|
11 |
|
|
10 |
- Beim Speichern und Drucken von Briefen werden diese im |
|
11 |
WebDAV-Verzeichnis gespeichert, sofern das Feature in der |
|
12 |
Mandantenkonfiguration aktiv ist. |
|
12 | 13 |
|
13 | 14 |
|
14 | 15 |
2016-03-12 - Release 3.4.0 |
Auch abrufbar als: Unified diff
Brieffunktion: beim Drucken im WebDAV speichern