X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=bin%2Fmozilla%2Fdo.pl;h=a804dee7afba352c57b298aea4ceb0b758ca03f1;hb=3816bb5160e9ccc0652082434f2d3f07b9ea7cb1;hp=b0b9f62d853cf9dcafeda9b19f0ba378015e3638;hpb=e4070a746ddfeb7e08868759ce4100af7a198560;p=kivitendo-erp.git diff --git a/bin/mozilla/do.pl b/bin/mozilla/do.pl index b0b9f62d8..a804dee7a 100644 --- a/bin/mozilla/do.pl +++ b/bin/mozilla/do.pl @@ -271,12 +271,12 @@ sub form_header { "business_types" => "ALL_BUSINESS_TYPES", ); - $::form->{ALL_EMPLOYEES} = SL::DB::Manager::Employee->get_all(query => [ or => [ id => $::form->{employee_id}, deleted => 0 ] ]); - $::form->{ALL_SALESMEN} = SL::DB::Manager::Employee->get_all(query => [ or => [ id => $::form->{salesman_id}, deleted => 0 ] ]); + $::form->{ALL_EMPLOYEES} = SL::DB::Manager::Employee->get_all_sorted(query => [ or => [ id => $::form->{employee_id}, deleted => 0 ] ]); + $::form->{ALL_SALESMEN} = SL::DB::Manager::Employee->get_all_sorted(query => [ or => [ id => $::form->{salesman_id}, deleted => 0 ] ]); $::form->{ALL_SHIPTO} = SL::DB::Manager::Shipto->get_all(query => [ or => [ trans_id => $::form->{"$::form->{vc}_id"} * 1, and => [ shipto_id => $::form->{shipto_id} * 1, trans_id => undef ] ] ]); - $::form->{ALL_CONTACTS} = SL::DB::Manager::Contact->get_all(query => [ + $::form->{ALL_CONTACTS} = SL::DB::Manager::Contact->get_all_sorted(query => [ or => [ cp_cv_id => $::form->{"$::form->{vc}_id"} * 1, and => [ @@ -302,7 +302,7 @@ sub form_header { # emulate click for resubmitting actions $dispatch_to_popup = "document.do.${_}.click(); " for grep { /^action_/ } keys %$form; } - $::request->{layout}->add_javascripts_inline("\$(function(){$dispatch_to_popup})"); + $::request->{layout}->add_javascripts_inline("\$(function(){$dispatch_to_popup});"); my $follow_up_vc = $form->{ $form->{vc} eq 'customer' ? 'customer' : 'vendor' }; @@ -310,6 +310,8 @@ sub form_header { $form->{follow_up_trans_info} = $form->{donumber} .'('. $follow_up_vc .')'; + $::request->{layout}->use_javascript(map { "${_}.js" } qw(kivi.SalesPurchase)); + $form->header(); # Fix für Bug 1082 Erwartet wird: 'abteilungsNAME--abteilungsID' # und Erweiterung für Bug 1760: @@ -464,7 +466,7 @@ sub search { "all" => 1 }, "departments" => "ALL_DEPARTMENTS", "$form->{vc}s" => "ALL_VC"); - $form->{ALL_EMPLOYEES} = SL::DB::Manager::Employee->get_all(query => [ deleted => 0 ]); + $form->{ALL_EMPLOYEES} = SL::DB::Manager::Employee->get_all_sorted(query => [ deleted => 0 ]); $form->{SHOW_VC_DROP_DOWN} = $myconfig{vclimit} > scalar @{ $form->{ALL_VC} }; $form->{title} = $locale->text('Delivery Orders'); @@ -1327,6 +1329,8 @@ sub transfer_in { $request->{parts_id} = $form->{"id_$i"}; $row_sum_base_qty += $request->{qty} * $units->{$request->{unit}}->{factor} / $base_unit_factor; + $request->{project_id} = $form->{"project_id_$i"} || $form->{globalproject_id}; + push @all_requests, $request; }