Revision 1268bf67
Von Bernd Bleßmann vor mehr als 2 Jahren hinzugefügt
SL/Controller/Order.pm | ||
---|---|---|
330 | 330 |
|
331 | 331 |
if ($media eq 'screen') { |
332 | 332 |
# screen/download |
333 |
$self->js->flash('info', t8('The document has been created.'));
|
|
333 |
flash_later('info', t8('The document has been created.'));
|
|
334 | 334 |
$self->send_file( |
335 | 335 |
\$doc, |
336 | 336 |
type => SL::MIME->mime_type_from_ext($doc_filename), |
... | ... | |
346 | 346 |
content => $doc, |
347 | 347 |
); |
348 | 348 |
|
349 |
$self->js->flash('info', t8('The document has been printed.'));
|
|
349 |
flash_later('info', t8('The document has been printed.'));
|
|
350 | 350 |
} |
351 | 351 |
|
352 | 352 |
my @warnings = $self->store_doc_to_webdav_and_filemanagement($doc, $doc_filename, $formname); |
353 | 353 |
if (scalar @warnings) { |
354 |
$self->js->flash('warning', $_) for @warnings;
|
|
354 |
flash_later('warning', $_) for @warnings;
|
|
355 | 355 |
} |
356 | 356 |
|
357 | 357 |
$self->save_history('PRINTED'); |
358 | 358 |
|
359 |
$self->js |
|
360 |
->run('kivi.ActionBar.setEnabled', '#save_and_email_action') |
|
361 |
->render; |
|
359 |
my @redirect_params = ( |
|
360 |
action => 'edit', |
|
361 |
type => $self->type, |
|
362 |
id => $self->order->id, |
|
363 |
); |
|
364 |
$self->js->redirect_to($self->url_for(@redirect_params))->render; |
|
362 | 365 |
} |
366 |
|
|
363 | 367 |
sub action_preview_pdf { |
364 | 368 |
my ($self) = @_; |
365 | 369 |
|
... | ... | |
395 | 399 |
return $self->js->flash('error', t8('Conversion to PDF failed: #1', $errors[0]))->render; |
396 | 400 |
} |
397 | 401 |
$self->save_history('PREVIEWED'); |
398 |
$self->js->flash('info', t8('The PDF has been previewed'));
|
|
402 |
flash_later('info', t8('The PDF has been previewed'));
|
|
399 | 403 |
# screen/download |
400 | 404 |
$self->send_file( |
401 | 405 |
\$pdf, |
402 | 406 |
type => SL::MIME->mime_type_from_ext($pdf_filename), |
403 | 407 |
name => $pdf_filename, |
404 |
js_no_render => 0, |
|
408 |
js_no_render => 1, |
|
409 |
); |
|
410 |
|
|
411 |
my @redirect_params = ( |
|
412 |
action => 'edit', |
|
413 |
type => $self->type, |
|
414 |
id => $self->order->id, |
|
405 | 415 |
); |
416 |
$self->js->redirect_to($self->url_for(@redirect_params))->render; |
|
406 | 417 |
} |
407 | 418 |
|
408 | 419 |
# open the email dialog |
Auch abrufbar als: Unified diff
Auftrags-Controller: Beleg neu laden nach "Speichern und drucken"/Druckvorschau.
Sonst wird die Belegnummer nicht angezeigt, falls die Änderbarkeit von
Belegnummern abgeschaltet ist.
Zudem wurde die Projektnummer nicht angezeigt, wenn das automatische anlegen von
Projekten aktiv ist. Das Projekt exisitert dann aber schon und ein erneutes
Speichern schlägt fehl.
behebt #498 (redmine)