X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=bin%2Fmozilla%2Fir.pl;h=0f9c295a1255dc89fb07bf86d60e7eb734f2e531;hb=c046c42244acda83029d00cb06ff636063765fb2;hp=967d532cea912c4ee49fab595df307bfc9359af7;hpb=9419dfc989a58881eeda136162d5b61e80dafc16;p=kivitendo-erp.git diff --git a/bin/mozilla/ir.pl b/bin/mozilla/ir.pl index 967d532ce..0f9c295a1 100644 --- a/bin/mozilla/ir.pl +++ b/bin/mozilla/ir.pl @@ -219,7 +219,7 @@ sub form_header { $lxdebug->enter_sub(); # set option selected - foreach $item (qw(AP vendor currency department contact)) { + foreach $item (qw(AP vendor currency department)) { $form->{"select$item"} =~ s/ selected//; $form->{"select$item"} =~ s/option>\Q$form->{$item}\E/option selected>$form->{$item}/; @@ -239,20 +239,6 @@ sub form_header { $form->{creditremaining} = $form->format_amount(\%myconfig, $form->{creditremaining}, 0, "0"); - #build contacts - if ($form->{all_contacts}) { - - $form->{selectcontact} = ""; - foreach $item (@{ $form->{all_contacts} }) { - if ($form->{cp_id} == $item->{cp_id}) { - $form->{selectcontact} .= - "$item->{cp_name}--$item->{cp_id}"; - } else { - $form->{selectcontact} .= "$item->{cp_name}--$item->{cp_id}"; - } - } - } - $exchangerate = ""; if ($form->{currency} ne $form->{defaultcurrency}) { if ($form->{forex}) { @@ -273,6 +259,17 @@ sub form_header { {forex}> |; + $form->get_lists("contacts" => "ALL_CONTACTS"); + + my (%labels, @values); + foreach my $item (@{ $form->{"ALL_CONTACTS"} }) { + push(@values, $item->{"cp_id"}); + $labels{$item->{"cp_id"}} = $item->{"cp_name"} . + ($item->{"cp_abteilung"} ? " ($item->{cp_abteilung})" : ""); + } + my $contact = + $cgi->popup_menu('-name' => 'cp_id', '-values' => \@values, + '-labels' => \%labels, '-default' => $form->{"cp_id"}); if (@{ $form->{TAXZONE} }) { $form->{selecttaxzone} = ""; @@ -308,11 +305,6 @@ sub form_header { ? qq|$form->{selectvendor}\n| : qq||; - $contact = - ($form->{selectcontact}) - ? qq|$form->{selectcontact}\n| - : qq||; - $department = qq| | . $locale->text('Department') . qq| @@ -354,6 +346,13 @@ sub form_header { qq|{duedate}>|; } + $form->{"javascript"} .= qq||; + + $jsscript .= + $form->write_trigger(\%myconfig, 2, + "orddate", "BL", "trigger_orddate", + "quodate", "BL", "trigger_quodate"); + $form->header; print qq| @@ -446,6 +445,16 @@ sub form_header { + + | . $locale->text('Order Date') . qq| + + + + + | . $locale->text('Quotation Date') . qq| + + + @@ -669,6 +678,7 @@ sub form_footer { |; + my @triggers = (); $form->{paidaccounts}++ if ($form->{"paid_$form->{paidaccounts}"}); for $i (1 .. $form->{paidaccounts}) { @@ -708,7 +718,8 @@ sub form_footer { $column_data{"AP_paid_$i"} = qq|$form->{"selectAP_paid_$i"}|; $column_data{"datepaid_$i"} = - qq|{"datepaid_$i"}>|; + qq|{"datepaid_$i"}> + |; $column_data{"source_$i"} = qq|{"source_$i"}>|; $column_data{"memo_$i"} = @@ -719,6 +730,7 @@ sub form_footer { print qq| |; + push(@triggers, "datepaid_$i", "BL", "trigger_datepaid_$i"); } print qq| @@ -754,21 +766,19 @@ sub form_footer { print qq| |; - } else { - if ($invdate > $closedto) { - print qq| - |; - } + } - if ($form->{menubar}) { - require "$form->{path}/menu.pl"; - &menubar; + print qq||; + + if (!$form->{id} && ($invdate > $closedto)) { + print qq| |; } - print qq| + print $form->write_trigger(\%myconfig, scalar(@triggers) / 3, @triggers) . + qq| {rowcount}>