39 |
39 |
__PACKAGE__->run_before('_check_auth');
|
40 |
40 |
|
41 |
41 |
__PACKAGE__->run_before('_recalc',
|
42 |
|
only => [ qw(save save_and_delivery_order print create_pdf send_email) ]);
|
|
42 |
only => [ qw(save save_and_delivery_order save_and_invoice print create_pdf send_email) ]);
|
43 |
43 |
|
44 |
44 |
__PACKAGE__->run_before('_get_unalterable_data',
|
45 |
|
only => [ qw(save save_and_delivery_order print create_pdf send_email) ]);
|
|
45 |
only => [ qw(save save_and_delivery_order save_and_invoice print create_pdf send_email) ]);
|
46 |
46 |
|
47 |
47 |
#
|
48 |
48 |
# actions
|
... | ... | |
340 |
340 |
$self->redirect_to(@redirect_params);
|
341 |
341 |
}
|
342 |
342 |
|
|
343 |
# save the order and redirect to the frontend subroutine for a new
|
|
344 |
# invoice
|
|
345 |
sub action_save_and_invoice {
|
|
346 |
my ($self) = @_;
|
|
347 |
|
|
348 |
my $errors = $self->_save();
|
|
349 |
|
|
350 |
if (scalar @{ $errors }) {
|
|
351 |
$self->js->flash('error', $_) foreach @{ $errors };
|
|
352 |
return $self->js->render();
|
|
353 |
}
|
|
354 |
flash_later('info', $::locale->text('The order has been saved'));
|
|
355 |
|
|
356 |
my @redirect_params = (
|
|
357 |
controller => 'oe.pl',
|
|
358 |
action => 'oe_invoice_from_order',
|
|
359 |
id => $self->order->id,
|
|
360 |
);
|
|
361 |
|
|
362 |
$self->redirect_to(@redirect_params);
|
|
363 |
}
|
|
364 |
|
343 |
365 |
# set form elements in respect to a changed customer or vendor
|
344 |
366 |
#
|
345 |
367 |
# This action is called on an change of the customer/vendor picker.
|
... | ... | |
1123 |
1145 |
t8('Save and Delivery Order'),
|
1124 |
1146 |
call => [ 'kivi.Order.save_and_delivery_order', $::instance_conf->get_order_warn_duplicate_parts ],
|
1125 |
1147 |
],
|
|
1148 |
action => [
|
|
1149 |
t8('Save and Invoice'),
|
|
1150 |
call => [ 'kivi.Order.save_and_invoice', $::instance_conf->get_order_warn_duplicate_parts ],
|
|
1151 |
],
|
1126 |
1152 |
|
1127 |
1153 |
], # end of combobox "Save"
|
1128 |
1154 |
|
... | ... | |
1349 |
1375 |
|
1350 |
1376 |
=item * credit limit
|
1351 |
1377 |
|
1352 |
|
=item * more workflows (save as new / invoice)
|
|
1378 |
=item * more workflows (save as new, quotation, purchase order)
|
1353 |
1379 |
|
1354 |
1380 |
=item * price sources: little symbols showing better price / better discount
|
1355 |
1381 |
|
... | ... | |
1450 |
1476 |
|
1451 |
1477 |
A warning when leaving the page without saveing unchanged inputs.
|
1452 |
1478 |
|
|
1479 |
=item *
|
|
1480 |
|
|
1481 |
Workflows for delivery order and invoice are in the menu "Save", because the
|
|
1482 |
order is saved before opening the new document form. Nevertheless perhaps these
|
|
1483 |
workflow buttons should be put under "Workflows".
|
|
1484 |
|
|
1485 |
|
1453 |
1486 |
=back
|
1454 |
1487 |
|
1455 |
1488 |
=head1 AUTHOR
|
Auftrags-Controller: Workflow -> Rechnung (Speichern und Rechnung erfassen)