X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/72e545d62bd1eb0d65e9afc0c05b97306864a15a..575baa0abd4cbd84f2f1aab53d858d1003a475cd:/SL/Controller/Order.pm diff --git a/SL/Controller/Order.pm b/SL/Controller/Order.pm index b4328a1e2..524d9045b 100644 --- a/SL/Controller/Order.pm +++ b/SL/Controller/Order.pm @@ -677,6 +677,16 @@ sub action_save_and_delivery_order { ); } +sub action_save_and_supplier_delivery_order { + my ($self) = @_; + + $self->save_and_redirect_to( + controller => 'controller.pl', + action => 'DeliveryOrder/add_from_order', + type => 'supplier_delivery_order', + ); +} + # save the order and redirect to the frontend subroutine for a new # invoice sub action_save_and_invoice { @@ -2065,6 +2075,16 @@ sub setup_edit_action_bar { ], only_if => (any { $self->type eq $_ } (sales_order_type(), purchase_order_type())) ], + action => [ + t8('Save and Supplier Delivery Order'), + call => [ 'kivi.Order.save', 'save_and_supplier_delivery_order', $::instance_conf->get_order_warn_duplicate_parts, + $::instance_conf->get_order_warn_no_deliverydate, + ], + checks => [ 'kivi.Order.check_save_active_periodic_invoices', + @req_trans_cost_art, @req_cusordnumber, + ], + only_if => (any { $self->type eq $_ } (sales_order_type())) + ], action => [ t8('Save and Invoice'), call => [ 'kivi.Order.save', 'save_and_invoice', $::instance_conf->get_order_warn_duplicate_parts ],