+ call => [ 'kivi.Order.purchase_check_for_direct_delivery', { to_type => PURCHASE_ORDER_TYPE() } ],
+ checks => [ @valid, @req_trans_cost_art, @req_cusordnumber ],
+ only_if => $self->type_data->show_menu('save_and_purchase_order'),
+ disabled => !$may_edit_create ? t8('You do not have the permissions to access this function.') : undef,
+ ],
+ action => [
+ t8('Save and Purchase Order Confirmation'),
+ call => [ 'kivi.Order.purchase_check_for_direct_delivery', { to_type => PURCHASE_ORDER_CONFIRMATION_TYPE() } ],
+ checks => [ @valid, @req_trans_cost_art, @req_cusordnumber ],
+ only_if => $self->type_data->show_menu('save_and_purchase_order_confirmation'),
+ disabled => !$may_edit_create ? t8('You do not have the permissions to access this function.') : undef,
+ ],
+ action => [
+ t8('Save and Sales Delivery Order'),
+ call => [ 'kivi.Order.save', {
+ action => 'save_and_new_record',
+ warn_on_duplicates => $::instance_conf->get_order_warn_duplicate_parts,
+ warn_on_reqdate => $::instance_conf->get_order_warn_no_deliverydate,
+ form_params => [
+ { name => 'to_type', value => SALES_DELIVERY_ORDER_TYPE() },
+ ],
+ }],
+ checks => [ 'kivi.Order.check_save_active_periodic_invoices',
+ @req_trans_cost_art, @req_cusordnumber,
+ ],
+ only_if => $self->type_data->show_menu('save_and_sales_delivery_order'),
+ disabled => !$may_edit_create ? t8('You do not have the permissions to access this function.') : undef,
+ ],
+ action => [
+ t8('Save and Purchase Delivery Order'),
+ call => [ 'kivi.Order.save', {
+ action => 'save_and_new_record',
+ warn_on_duplicates => $::instance_conf->get_order_warn_duplicate_parts,
+ warn_on_reqdate => $::instance_conf->get_order_warn_no_deliverydate,
+ form_params => [
+ { name => 'to_type', value => PURCHASE_DELIVERY_ORDER_TYPE() },
+ ],
+ }],
+ checks => [ 'kivi.Order.check_save_active_periodic_invoices',
+ @req_trans_cost_art, @req_cusordnumber,
+ ],
+ only_if => $self->type_data->show_menu('save_and_purchase_delivery_order'),
+ disabled => !$may_edit_create ? t8('You do not have the permissions to access this function.') : undef,
+ ],
+ action => [
+ t8('Save and Purchase Delivery Order with item selection'),
+ call => [
+ 'kivi.Order.show_purchase_delivery_order_select_items', {
+ action => 'save_and_new_record',
+ warn_on_duplicates => $::instance_conf->get_order_warn_duplicate_parts,
+ warn_on_reqdate => $::instance_conf->get_order_warn_no_deliverydate,
+ form_params => [
+ { name => 'to_type', value => PURCHASE_DELIVERY_ORDER_TYPE() },
+ ],
+ }],
+ checks => [ @req_trans_cost_art, @req_cusordnumber ],
+ only_if => $self->type_data->show_menu('save_and_purchase_delivery_order'),
+ disabled => !$may_edit_create ? t8('You do not have the permissions to access this function.') : undef,
+ ],
+ action => [
+ t8('Save and Supplier Delivery Order'),
+ call => [ 'kivi.Order.save', {
+ action => 'save_and_new_record',
+ warn_on_duplicates => $::instance_conf->get_order_warn_duplicate_parts,
+ warn_on_reqdate => $::instance_conf->get_order_warn_no_deliverydate,
+ form_params => [
+ { name => 'to_type', value => SUPPLIER_DELIVERY_ORDER_TYPE() },
+ ],
+ }],
+ checks => [ 'kivi.Order.check_save_active_periodic_invoices',
+ @req_trans_cost_art, @req_cusordnumber,
+ ],
+ only_if => $self->type_data->show_menu('save_and_supplier_delivery_order'),
+ disabled => !$may_edit_create ? t8('You do not have the permissions to access this function.') : undef,