Revision aa2fcd58
Von Tamino Steinert vor etwa 1 Jahr hinzugefügt
SL/Controller/Order.pm | ||
---|---|---|
797 | 797 |
); |
798 | 798 |
} |
799 | 799 |
|
800 |
# save the order and redirect to the frontend subroutine for a new |
|
801 |
# delivery order |
|
802 |
sub action_save_and_delivery_order { |
|
803 |
my ($self) = @_; |
|
804 |
|
|
805 |
my %params; |
|
806 |
|
|
807 |
if ($::form->{convert_to_purchase_delivery_order_selected_items_only}) { |
|
808 |
$params{only_items} = join(',', @{ $::form->{purchase_delivery_order_item_selection_indexes} || [] }); |
|
809 |
} |
|
810 |
|
|
811 |
$self->save_and_redirect_to( |
|
812 |
controller => 'oe.pl', |
|
813 |
action => 'oe_delivery_order_from_order', |
|
814 |
%params, |
|
815 |
); |
|
816 |
} |
|
817 |
|
|
818 | 800 |
# save the order and redirect to the frontend subroutine for a new |
819 | 801 |
# invoice |
820 | 802 |
sub action_save_and_invoice { |
... | ... | |
2334 | 2316 |
disabled => !$may_edit_create ? t8('You do not have the permissions to access this function.') : undef, |
2335 | 2317 |
], |
2336 | 2318 |
action => [ |
2337 |
t8('Save and Delivery Order'), |
|
2319 |
t8('Save and Sales Delivery Order'),
|
|
2338 | 2320 |
call => [ 'kivi.Order.save', { |
2339 |
action => 'save_and_delivery_order',
|
|
2321 |
action => 'save_and_new_record',
|
|
2340 | 2322 |
warn_on_duplicates => $::instance_conf->get_order_warn_duplicate_parts, |
2341 | 2323 |
warn_on_reqdate => $::instance_conf->get_order_warn_no_deliverydate, |
2324 |
form_params => [ |
|
2325 |
{ name => 'to_type', value => SALES_DELIVERY_ORDER_TYPE() }, |
|
2326 |
], |
|
2342 | 2327 |
}], |
2343 | 2328 |
checks => [ 'kivi.Order.check_save_active_periodic_invoices', |
2344 | 2329 |
@req_trans_cost_art, @req_cusordnumber, |
2345 | 2330 |
], |
2346 |
only_if => $self->type_data->show_menu('save_and_delivery_order'), |
|
2331 |
only_if => $self->type_data->show_menu('save_and_sales_delivery_order'),
|
|
2347 | 2332 |
disabled => !$may_edit_create ? t8('You do not have the permissions to access this function.') : undef, |
2348 | 2333 |
], |
2349 | 2334 |
action => [ |
2350 |
t8('Save and Delivery Order with item selection'), |
|
2351 |
call => [ 'kivi.Order.convert_to_purchase_delivery_order_select_items', |
|
2352 |
{ action => 'save_and_delivery_order', |
|
2353 |
warn_on_duplicates => $::instance_conf->get_order_warn_duplicate_parts, |
|
2354 |
warn_on_reqdate => $::instance_conf->get_order_warn_no_deliverydate }, |
|
2355 |
], |
|
2335 |
t8('Save and Purchase Delivery Order'), |
|
2336 |
call => [ 'kivi.Order.save', { |
|
2337 |
action => 'save_and_new_record', |
|
2338 |
warn_on_duplicates => $::instance_conf->get_order_warn_duplicate_parts, |
|
2339 |
warn_on_reqdate => $::instance_conf->get_order_warn_no_deliverydate, |
|
2340 |
form_params => [ |
|
2341 |
{ name => 'to_type', value => PURCHASE_DELIVERY_ORDER_TYPE() }, |
|
2342 |
], |
|
2343 |
}], |
|
2344 |
checks => [ 'kivi.Order.check_save_active_periodic_invoices', |
|
2345 |
@req_trans_cost_art, @req_cusordnumber, |
|
2346 |
], |
|
2347 |
only_if => $self->type_data->show_menu('save_and_purchase_delivery_order'), |
|
2348 |
disabled => !$may_edit_create ? t8('You do not have the permissions to access this function.') : undef, |
|
2349 |
], |
|
2350 |
action => [ |
|
2351 |
t8('Save and Purchase Delivery Order with item selection'), |
|
2352 |
call => [ |
|
2353 |
'kivi.Order.show_purchase_delivery_order_select_items', { |
|
2354 |
action => 'save_and_new_record', |
|
2355 |
warn_on_duplicates => $::instance_conf->get_order_warn_duplicate_parts, |
|
2356 |
warn_on_reqdate => $::instance_conf->get_order_warn_no_deliverydate, |
|
2357 |
form_params => [ |
|
2358 |
{ name => 'to_type', value => PURCHASE_DELIVERY_ORDER_TYPE() }, |
|
2359 |
], |
|
2360 |
}], |
|
2356 | 2361 |
checks => [ @req_trans_cost_art, @req_cusordnumber ], |
2357 | 2362 |
only_if => (any { $self->type eq $_ } (PURCHASE_ORDER_TYPE())), |
2358 | 2363 |
disabled => !$may_edit_create ? t8('You do not have the permissions to access this function.') : undef, |
Auch abrufbar als: Unified diff
Workflow Auftrag → Lieferschein auf neuen Controller umgestellt