Revision aace8a03
Von Tamino Steinert vor mehr als 1 Jahr hinzugefügt
SL/Controller/Order.pm | ||
---|---|---|
2181 | 2181 |
sub setup_edit_action_bar { |
2182 | 2182 |
my ($self, %params) = @_; |
2183 | 2183 |
|
2184 |
my @valid = qw( |
|
2185 |
kivi.Order.check_cv |
|
2186 |
); |
|
2187 |
push @valid, "kivi.Order.check_duplicate_parts" if $::instance_conf->get_order_warn_duplicate_parts; |
|
2188 |
push @valid, "kivi.Order.check_valid_reqdate" if $::instance_conf->get_order_warn_no_deliverydate; |
|
2184 | 2189 |
my @req_trans_cost_art = qw(kivi.Order.check_transport_cost_article_presence) x!!$::instance_conf->get_transport_cost_reminder_article_number_id; |
2185 | 2190 |
my @req_cusordnumber = qw(kivi.Order.check_cusordnumber_presence) x($self->type eq SALES_ORDER_TYPE() && $::instance_conf->get_order_warn_no_cusordnumber); |
2186 | 2191 |
|
... | ... | |
2262 | 2267 |
action => [ |
2263 | 2268 |
t8('Save and Quotation'), |
2264 | 2269 |
call => [ 'kivi.submit_ajax_form', $self->url_for(action => "save_and_order_workflow", to_type => SALES_QUOTATION_TYPE()), '#order_form' ], |
2265 |
checks => [ @req_trans_cost_art, @req_cusordnumber ], |
|
2270 |
checks => [ @valid, @req_trans_cost_art, @req_cusordnumber ],
|
|
2266 | 2271 |
only_if => $self->type_data->show_menu('save_and_quotation'), |
2267 | 2272 |
disabled => !$may_edit_create ? t8('You do not have the permissions to access this function.') : undef, |
2268 | 2273 |
], |
2269 | 2274 |
action => [ |
2270 | 2275 |
t8('Save and RFQ'), |
2271 | 2276 |
call => [ 'kivi.Order.purchase_check_for_direct_delivery', { to_type => REQUEST_QUOTATION_TYPE() } ], |
2277 |
checks => [ @valid ], |
|
2272 | 2278 |
only_if => $self->type_data->show_menu('save_and_rfq'), |
2273 | 2279 |
disabled => !$may_edit_create ? t8('You do not have the permissions to access this function.') : undef, |
2274 | 2280 |
], |
2275 | 2281 |
action => [ |
2276 | 2282 |
t8('Save and Sales Order'), |
2277 | 2283 |
call => [ 'kivi.submit_ajax_form', $self->url_for(action => "save_and_order_workflow", to_type => SALES_ORDER_TYPE()), '#order_form' ], |
2278 |
checks => [ @req_trans_cost_art ], |
|
2284 |
checks => [ @valid, @req_trans_cost_art ],
|
|
2279 | 2285 |
only_if => $self->type_data->show_menu('save_and_sales_order'), |
2280 | 2286 |
disabled => !$may_edit_create ? t8('You do not have the permissions to access this function.') : undef, |
2281 | 2287 |
], |
2282 | 2288 |
action => [ |
2283 | 2289 |
t8('Save and Purchase Order'), |
2284 | 2290 |
call => [ 'kivi.Order.purchase_check_for_direct_delivery', { to_type => PURCHASE_ORDER_TYPE() } ], |
2285 |
checks => [ @req_trans_cost_art, @req_cusordnumber ], |
|
2291 |
checks => [ @valid, @req_trans_cost_art, @req_cusordnumber ],
|
|
2286 | 2292 |
only_if => $self->type_data->show_menu('save_and_purchase_order'), |
2287 | 2293 |
disabled => !$may_edit_create ? t8('You do not have the permissions to access this function.') : undef, |
2288 | 2294 |
], |
... | ... | |
2331 | 2337 |
call => [ 'kivi.Order.save', { |
2332 | 2338 |
action => 'save_and_new_record', |
2333 | 2339 |
warn_on_duplicates => $::instance_conf->get_order_warn_duplicate_parts, |
2340 |
warn_on_reqdate => $::instance_conf->get_order_warn_no_deliverydate, |
|
2334 | 2341 |
form_params => [ |
2335 | 2342 |
{ name => 'to_type', |
2336 | 2343 |
value => $self->order->is_sales ? SALES_RECLAMATION_TYPE() |
... | ... | |
2344 | 2351 |
call => [ 'kivi.Order.save', { |
2345 | 2352 |
action => 'save_and_invoice', |
2346 | 2353 |
warn_on_duplicates => $::instance_conf->get_order_warn_duplicate_parts, |
2354 |
warn_on_reqdate => $::instance_conf->get_order_warn_no_deliverydate, |
|
2347 | 2355 |
}], |
2348 | 2356 |
checks => [ 'kivi.Order.check_save_active_periodic_invoices', |
2349 | 2357 |
@req_trans_cost_art, @req_cusordnumber, |
Auch abrufbar als: Unified diff
Order: FIX: überprüfen von Werten in der Form bei Workflows