X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fdo.pl;h=fc38c52ad7fa78e541a1040edee685ab690e4627;hb=d1054383fa90478db0424f5dc255d5836bc494d7;hp=bd906d40a2b9b8352721b506807551c5362b1033;hpb=6f1ffd59a04dab30e87d6ea38c5884624f4b926a;p=kivitendo-erp.git diff --git a/bin/mozilla/do.pl b/bin/mozilla/do.pl index bd906d40a..fc38c52ad 100644 --- a/bin/mozilla/do.pl +++ b/bin/mozilla/do.pl @@ -323,6 +323,10 @@ sub setup_do_action_bar { t8('Invoice'), submit => [ '#form', { action => "invoice" } ], disabled => !$::form->{id} ? t8('This record has not been saved yet.') : undef, + confirm => $::form->{delivered} ? undef + : ($::form->{vc} eq 'customer' && $::instance_conf->get_sales_delivery_order_check_stocked) ? t8('This record has not been stocked out. Proceed?') + : ($::form->{vc} eq 'vendor' && $::instance_conf->get_purchase_delivery_order_check_stocked) ? t8('This record has not been stocked in. Proceed?') + : undef, ], combobox => [ @@ -417,6 +421,7 @@ sub form_header { "business_types" => "ALL_BUSINESS_TYPES", ); $form->{ALL_DEPARTMENTS} = SL::DB::Manager::Department->get_all_sorted; + $form->{ALL_LANGUAGES} = SL::DB::Manager::Language->get_all_sorted; # Projects my @old_project_ids = uniq grep { $_ } map { $_ * 1 } ($form->{"globalproject_id"}, map { $form->{"project_id_$_"} } 1..$form->{"rowcount"}); @@ -455,9 +460,9 @@ sub form_header { if ($form->{resubmit} && ($form->{format} eq "html")) { $dispatch_to_popup = "window.open('about:blank','Beleg'); document.do.target = 'Beleg';"; $dispatch_to_popup .= "document.do.submit();"; - } elsif ($form->{resubmit}) { + } elsif ($form->{resubmit} && $form->{action_print}) { # emulate click for resubmitting actions - $dispatch_to_popup = "document.do.${_}.click(); " for grep { /^action_/ } keys %$form; + $dispatch_to_popup = "kivi.SalesPurchase.show_print_dialog(); kivi.SalesPurchase.print_record();"; } $::request->{layout}->add_javascripts_inline("\$(function(){$dispatch_to_popup});");