+# save the order and redirect to the frontend subroutine for a new
+# invoice
+sub action_save_and_invoice {
+ my ($self) = @_;
+
+ my $errors = $self->_save();
+
+ if (scalar @{ $errors }) {
+ $self->js->flash('error', $_) foreach @{ $errors };
+ return $self->js->render();
+ }
+ flash_later('info', $::locale->text('The order has been saved'));
+
+ my @redirect_params = (
+ controller => 'oe.pl',
+ action => 'oe_invoice_from_order',
+ id => $self->order->id,
+ );
+
+ $self->redirect_to(@redirect_params);
+}
+