X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=bin%2Fmozilla%2Fdo.pl;h=1dc880ef907fdecf8ddd9ad3c4a843f643e02f61;hb=e97c628d0f75459a88926c33e4b370aa98c6b680;hp=ccc5f2b13bcd8f02655ec26462cb206fdb988036;hpb=dc39f671740dc3ab2292c604e8605dd69fb33eac;p=kivitendo-erp.git diff --git a/bin/mozilla/do.pl b/bin/mozilla/do.pl index ccc5f2b13..1dc880ef9 100644 --- a/bin/mozilla/do.pl +++ b/bin/mozilla/do.pl @@ -258,9 +258,6 @@ sub form_header { # use JavaScript Calendar or not $form->{jsscript} = 1; - #write Trigger - my $jsscript = Form->write_trigger(\%myconfig, "2", "transdate", "BL", "trigger1", "reqdate", "BL", "trigger2"); - my @old_project_ids = ($form->{"globalproject_id"}); map({ push(@old_project_ids, $form->{"project_id_$_"}) if ($form->{"project_id_$_"}); } (1..$form->{"rowcount"})); @@ -280,7 +277,7 @@ sub form_header { $::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_SHIPTO} = SL::DB::Manager::Shipto->get_all(query => [ - or => [ trans_id => $::form->{"$::form->{vc}_id"} * 1, shipto_id => $::form->{shipto_id} * 1 ] + 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 => [ or => [ @@ -310,6 +307,11 @@ sub form_header { $form->{onload} .= "document.do.submit();" } + my $follow_up_vc = $form->{ $form->{vc} eq 'customer' ? 'customer' : 'vendor' }; + $follow_up_vc =~ s/--\d*\s*$//; + + $form->{follow_up_trans_info} = $form->{donumber} .'('. $follow_up_vc .')'; + $form->header(); # Fix für Bug 1082 Erwartet wird: 'abteilungsNAME--abteilungsID' # und Erweiterung für Bug 1760: @@ -451,6 +453,7 @@ sub search { $form->get_lists("projects" => { "key" => "ALL_PROJECTS", "all" => 1 }, + "departments" => "ALL_DEPARTMENTS", "$form->{vc}s" => "ALL_VC"); $form->{ALL_EMPLOYEES} = SL::DB::Manager::Employee->get_all(query => [ deleted => 0 ]); @@ -475,6 +478,7 @@ sub orders { my $locale = $main::locale; my $cgi = $::request->{cgi}; + $form->{department_id} = (split /--/, $form->{department})[-1]; ($form->{ $form->{vc} }, $form->{"$form->{vc}_id"}) = split(/--/, $form->{ $form->{vc} }); report_generator_set_default_sort('transdate', 1); @@ -486,10 +490,10 @@ sub orders { my @columns = qw( ids transdate id donumber - ordnumber + ordnumber customernumber name employee salesman shipvia globalprojectnumber - transaction_description + transaction_description department open delivered ); @@ -514,6 +518,7 @@ sub orders { 'id' => { 'text' => $locale->text('ID'), }, 'donumber' => { 'text' => $locale->text('Delivery Order'), }, 'ordnumber' => { 'text' => $locale->text('Order'), }, + 'customernumber' => { 'text' => $locale->text('Customer Number'), }, 'name' => { 'text' => $form->{vc} eq 'customer' ? $locale->text('Customer') : $locale->text('Vendor'), }, 'employee' => { 'text' => $locale->text('Employee'), }, 'salesman' => { 'text' => $locale->text('Salesman'), }, @@ -522,9 +527,10 @@ sub orders { 'transaction_description' => { 'text' => $locale->text('Transaction description'), }, 'open' => { 'text' => $locale->text('Open'), }, 'delivered' => { 'text' => $locale->text('Delivered'), }, + 'department' => { 'text' => $locale->text('Department'), }, ); - foreach my $name (qw(id transdate donumber ordnumber name employee salesman shipvia transaction_description)) { + foreach my $name (qw(id transdate donumber ordnumber name employee salesman shipvia transaction_description department)) { my $sortdir = $form->{sort} eq $name ? 1 - $form->{sortdir} : $form->{sortdir}; $column_defs{$name}->{link} = $href . "&sort=$name&sortdir=$sortdir"; } @@ -615,8 +621,7 @@ sub orders { }; $row->{donumber}->{link} = $edit_url . "&id=" . E($dord->{id}) . "&callback=${callback}"; - $row->{ordnumber}->{link} = $edit_order_url . "&id=" . E($dord->{oe_id}) . "&callback=${callback}"; - + $row->{ordnumber}->{link} = $edit_order_url . "&id=" . E($dord->{oe_id}) . "&callback=${callback}" if $dord->{oe_id}; $report->add_data($row); $idx++;