311 |
311 |
|| $params{is_pur_ord}
|
312 |
312 |
|| ($params{is_sales_quo} && $::instance_conf->get_allow_sales_invoice_from_sales_quotation)
|
313 |
313 |
|| ($params{is_sales_ord} && $::instance_conf->get_allow_sales_invoice_from_sales_order);
|
314 |
|
my @req_trans_desc = qw(kivi.SalesPurchase.check_transaction_description) x!!$::instance_conf->get_require_transaction_description_ps;
|
315 |
314 |
my @req_trans_cost_art = qw(kivi.SalesPurchase.check_transport_cost_article_presence) x!!$::instance_conf->get_transport_cost_reminder_article_number_id;
|
316 |
315 |
my @warn_p_invoice = qw(kivi.SalesPurchase.oe_warn_save_active_periodic_invoice) x!!$has_active_periodic_invoice;
|
317 |
316 |
|
... | ... | |
321 |
320 |
t8('Update'),
|
322 |
321 |
submit => [ '#form', { action => "update" } ],
|
323 |
322 |
id => 'update_button',
|
|
323 |
checks => [ 'kivi.validate_form' ],
|
324 |
324 |
accesskey => 'enter',
|
325 |
325 |
],
|
326 |
326 |
|
... | ... | |
328 |
328 |
action => [
|
329 |
329 |
t8('Save'),
|
330 |
330 |
submit => [ '#form', { action => "save" } ],
|
331 |
|
checks => [ @req_trans_desc, @req_trans_cost_art, @warn_p_invoice ],
|
|
331 |
checks => [ 'kivi.validate_form', @req_trans_cost_art, @warn_p_invoice ],
|
332 |
332 |
],
|
333 |
333 |
action => [
|
334 |
334 |
t8('Save as new'),
|
335 |
335 |
submit => [ '#form', { action => "save_as_new" } ],
|
336 |
|
checks => [ @req_trans_desc, @req_trans_cost_art ],
|
|
336 |
checks => [ 'kivi.validate_form', @req_trans_cost_art ],
|
337 |
337 |
disabled => !$form->{id} ? t8('This record has not been saved yet.') : undef,
|
338 |
338 |
],
|
339 |
339 |
action => [
|
340 |
340 |
t8('Save and Close'),
|
341 |
341 |
submit => [ '#form', { action => "save_and_close" } ],
|
342 |
|
checks => [ @req_trans_desc, @req_trans_cost_art, @warn_p_invoice ],
|
|
342 |
checks => [ 'kivi.validate_form', @req_trans_cost_art, @warn_p_invoice ],
|
343 |
343 |
],
|
344 |
344 |
action => [
|
345 |
345 |
t8('Delete'),
|
... | ... | |
360 |
360 |
t8('Sales Order'),
|
361 |
361 |
submit => [ '#form', { action => "sales_order" } ],
|
362 |
362 |
disabled => !$form->{id} ? t8('This record has not been saved yet.') : undef,
|
|
363 |
checks => [ 'kivi.validate_form' ],
|
363 |
364 |
only_if => $params{is_sales_quo} || $params{is_pur_ord},
|
364 |
365 |
],
|
365 |
366 |
action => [
|
366 |
367 |
t8('Purchase Order'),
|
367 |
368 |
submit => [ '#form', { action => "purchase_order" } ],
|
368 |
369 |
disabled => !$form->{id} ? t8('This record has not been saved yet.') : undef,
|
|
370 |
checks => [ 'kivi.validate_form' ],
|
369 |
371 |
only_if => $params{is_sales_ord} || $params{is_req_quo},
|
370 |
372 |
],
|
371 |
373 |
action => [
|
372 |
374 |
t8('Delivery Order'),
|
373 |
375 |
submit => [ '#form', { action => "delivery_order" } ],
|
374 |
376 |
disabled => !$form->{id} ? t8('This record has not been saved yet.') : undef,
|
|
377 |
checks => [ 'kivi.validate_form' ],
|
375 |
378 |
only_if => $params{is_sales_ord} || $params{is_pur_ord},
|
376 |
379 |
],
|
377 |
380 |
action => [
|
378 |
381 |
t8('Invoice'),
|
379 |
382 |
submit => [ '#form', { action => "invoice" } ],
|
380 |
383 |
disabled => !$form->{id} ? t8('This record has not been saved yet.') : undef,
|
|
384 |
checks => [ 'kivi.validate_form' ],
|
381 |
385 |
only_if => $allow_invoice,
|
382 |
386 |
],
|
383 |
387 |
action => [
|
384 |
388 |
t8('Quotation'),
|
385 |
389 |
submit => [ '#form', { action => "quotation" } ],
|
386 |
390 |
disabled => !$form->{id} ? t8('This record has not been saved yet.') : undef,
|
|
391 |
checks => [ 'kivi.validate_form' ],
|
387 |
392 |
only_if => $params{is_sales_ord},
|
388 |
393 |
],
|
389 |
394 |
action => [
|
390 |
395 |
t8('Request for Quotation'),
|
391 |
396 |
submit => [ '#form', { action => "request_for_quotation" } ],
|
392 |
397 |
disabled => !$form->{id} ? t8('This record has not been saved yet.') : undef,
|
|
398 |
checks => [ 'kivi.validate_form' ],
|
393 |
399 |
only_if => $params{is_pur_ord},
|
394 |
400 |
],
|
395 |
401 |
], # end of combobox "Workflow"
|
... | ... | |
399 |
405 |
action => [
|
400 |
406 |
t8('Print'),
|
401 |
407 |
call => [ 'kivi.SalesPurchase.show_print_dialog' ],
|
402 |
|
checks => [ @req_trans_desc ],
|
|
408 |
checks => [ 'kivi.validate_form' ],
|
403 |
409 |
],
|
404 |
410 |
action => [
|
405 |
411 |
t8('E Mail'),
|
406 |
412 |
call => [ 'kivi.SalesPurchase.show_email_dialog' ],
|
407 |
|
checks => [ @req_trans_desc ],
|
|
413 |
checks => [ 'kivi.validate_form' ],
|
408 |
414 |
],
|
409 |
415 |
action => [
|
410 |
416 |
t8('Download attachments of all parts'),
|
... | ... | |
429 |
435 |
], # end of combobox "more"
|
430 |
436 |
);
|
431 |
437 |
}
|
|
438 |
$::request->layout->add_javascripts('kivi.Validator.js');
|
432 |
439 |
}
|
433 |
440 |
|
434 |
441 |
sub setup_oe_search_action_bar {
|
... | ... | |
440 |
447 |
t8('Search'),
|
441 |
448 |
submit => [ '#form' ],
|
442 |
449 |
accesskey => 'enter',
|
|
450 |
checks => [ 'kivi.validate_form' ],
|
443 |
451 |
],
|
444 |
452 |
);
|
445 |
453 |
}
|
|
454 |
$::request->layout->add_javascripts('kivi.Validator.js');
|
446 |
455 |
}
|
447 |
456 |
|
448 |
457 |
sub setup_oe_orders_action_bar {
|
kivi.Validator: In OE Suche und Normaler Maske als check registriert