Revision 3a35d09f
Von Bernd Bleßmann vor etwa 6 Jahren hinzugefügt
SL/Controller/Order.pm | ||
---|---|---|
210 | 210 |
sub action_print { |
211 | 211 |
my ($self) = @_; |
212 | 212 |
|
213 |
my $errors = $self->save(); |
|
214 |
|
|
215 |
if (scalar @{ $errors }) { |
|
216 |
$self->js->flash('error', $_) foreach @{ $errors }; |
|
217 |
return $self->js->render(); |
|
218 |
} |
|
219 |
|
|
220 |
$self->js->val('#id', $self->order->id) |
|
221 |
->val('#order_' . $self->nr_key(), $self->order->number); |
|
222 |
|
|
213 | 223 |
my $format = $::form->{print_options}->{format}; |
214 | 224 |
my $media = $::form->{print_options}->{media}; |
215 | 225 |
my $formname = $::form->{print_options}->{formname}; |
... | ... | |
370 | 380 |
sub action_send_email { |
371 | 381 |
my ($self) = @_; |
372 | 382 |
|
383 |
my $errors = $self->save(); |
|
384 |
|
|
385 |
if (scalar @{ $errors }) { |
|
386 |
$self->js->run('kivi.Order.close_email_dialog'); |
|
387 |
$self->js->flash('error', $_) foreach @{ $errors }; |
|
388 |
return $self->js->render(); |
|
389 |
} |
|
390 |
|
|
391 |
$self->js->val('#id', $self->order->id) |
|
392 |
->val('#order_' . $self->nr_key(), $self->order->number); |
|
393 |
|
|
373 | 394 |
my $email_form = delete $::form->{email_form}; |
374 | 395 |
my %field_names = (to => 'email'); |
375 | 396 |
|
... | ... | |
417 | 438 |
$intnotes .= t8('Subject') . ": " . $::form->{subject} . "\n\n"; |
418 | 439 |
$intnotes .= t8('Message') . ": " . $::form->{message}; |
419 | 440 |
|
441 |
$self->order->update_attributes(intnotes => $intnotes); |
|
442 |
|
|
420 | 443 |
$self->js |
421 | 444 |
->val('#order_intnotes', $intnotes) |
422 | 445 |
->run('kivi.Order.close_email_dialog') |
... | ... | |
1565 | 1588 |
t8('Export'), |
1566 | 1589 |
], |
1567 | 1590 |
action => [ |
1568 |
t8('Print'),
|
|
1569 |
call => [ 'kivi.Order.show_print_options' ], |
|
1591 |
t8('Save and print'),
|
|
1592 |
call => [ 'kivi.Order.show_print_options', $::instance_conf->get_order_warn_duplicate_parts ],
|
|
1570 | 1593 |
], |
1571 | 1594 |
action => [ |
1572 |
t8('E-mail'), |
|
1573 |
call => [ 'kivi.Order.email' ], |
|
1595 |
t8('Save and E-mail'),
|
|
1596 |
call => [ 'kivi.Order.email', $::instance_conf->get_order_warn_duplicate_parts ],
|
|
1574 | 1597 |
], |
1575 | 1598 |
action => [ |
1576 | 1599 |
t8('Download attachments of all parts'), |
... | ... | |
1790 | 1813 |
|
1791 | 1814 |
=item * |
1792 | 1815 |
|
1793 |
Save order only on "save" (and "save and delivery order"-workflow). No |
|
1794 |
hidden save on "print" or "email". |
|
1795 |
|
|
1796 |
=item * |
|
1797 |
|
|
1798 | 1816 |
Item list in a scrollable area, so that the workflow buttons stay at |
1799 | 1817 |
the bottom. |
1800 | 1818 |
|
Auch abrufbar als: Unified diff
Auftrags-Controller: Beleg vor drucken und E-mailen speichern.
Das nur bei "speichern" auch gespeichert wird, ist vielleicht konsequent, aber
im Alltag eher unpraktisch. Viele Anwender hatten damit ein Problem, dass die
verschickte oder gedruckte Version des Belegs anders ist, als die gespeicherte,
weil oft nicht daran gedacht wurde, nach der letzten Änderung und nach dem
Drucken/versenden nochmals zu speichern.
Deshalb wird jetzt beim Drucken und E-Mailen immer gespeichert.