X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fir.pl;h=c9624ccb3035b25ea14f1f0406e0195a006a8f68;hb=e06a7e08648363ef8c8ef14678ab853ae7bdd670;hp=e6f035d01fbe3fddc91be1fc9a375e2103bccf11;hpb=df88ef1f6710198e1228ac1b8846dd3e64a5ca25;p=kivitendo-erp.git diff --git a/bin/mozilla/ir.pl b/bin/mozilla/ir.pl index e6f035d01..c9624ccb3 100644 --- a/bin/mozilla/ir.pl +++ b/bin/mozilla/ir.pl @@ -78,10 +78,8 @@ sub invoice_links { $lxdebug->enter_sub(); # create links - $form->{webdav} = $webdav; - - # set jscalendar - $form->{jscalendar} = $jscalendar; + $form->{webdav} = $webdav; + $form->{jsscript} = 1; $form->create_links("AP", \%myconfig, "vendor"); @@ -286,9 +284,19 @@ sub form_header { $labels{$item->{"cp_id"}} = $item->{"cp_name"} . ($item->{"cp_abteilung"} ? " ($item->{cp_abteilung})" : ""); } - my $contact = - NTI($cgi->popup_menu('-name' => 'cp_id', '-values' => \@values, - '-labels' => \%labels, '-default' => $form->{"cp_id"})); + + my $contact; + if (scalar @values > 1) { + $contact = qq| + + | . $locale->text('Contact Person') . qq| + | . + NTI($cgi->popup_menu('-name' => 'cp_id', '-values' => \@values, '-style' => 'width: 250px', + '-labels' => \%labels, '-default' => $form->{"cp_id"})) + . qq| + + |; + } %labels = (); @values = (""); @@ -309,8 +317,10 @@ sub form_header { $labels{$item} = $item; } - $form->{currency} = $form->{defaultcurrency} unless $form->{currency}; - my $currencies = qq| + $form->{currency} = $form->{defaultcurrency} unless $form->{currency}; + my $currencies; + if (scalar @values) { + $currencies = qq| | . $locale->text('Currency') . qq| | . @@ -318,7 +328,8 @@ sub form_header { '-values' => \@values, '-labels' => \%labels)) . qq| |; - + } + %labels = (); @values = (); my $i = 0; @@ -334,7 +345,7 @@ sub form_header { '-values' => \@values, '-labels' => \%labels)) . qq| |; - + %labels = (); @values = (); my $i = 0; @@ -347,7 +358,8 @@ sub form_header { | . NTI($cgi->popup_menu('-name' => 'vendor', '-default' => $form->{"vendor"}, '-onChange' => 'document.getElementById(\'update_button\').click();', - '-values' => \@values, '-labels' => \%labels)) . qq| + '-values' => \@values, '-labels' => \%labels, '-style' => 'width: 250px')) . qq| + |; %labels = (); @@ -363,7 +375,7 @@ sub form_header { | . $locale->text('Steuersatz') . qq| | . NTI($cgi->popup_menu('-name' => 'taxzone_id', '-default' => $form->{"taxzone_id"}, - '-values' => \@values, '-labels' => \%labels)) . qq| + '-values' => \@values, '-labels' => \%labels, '-style' => 'width: 250px')) . qq| |; @@ -381,7 +393,7 @@ sub form_header { $department = qq| | . $locale->text('Department') . qq| - + @@ -390,37 +402,28 @@ sub form_header { $n = ($form->{creditremaining} =~ /-/) ? "0" : "1"; # use JavaScript Calendar or not - $form->{jsscript} = $form->{jscalendar}; + $form->{jsscript} = 1; $jsscript = ""; - if ($form->{jsscript}) { - - # with JavaScript Calendar - $button1 = qq| - - text('button') . qq|> - |; - $button2 = qq| - - text('button') . qq|> - |; - #write Trigger - $jsscript = - Form->write_trigger(\%myconfig, "2", "invdate", "BL", "trigger1", - "duedate", "BL", "trigger2"); - } else { + $button1 = qq| + + text('button') . qq|> + |; + $button2 = qq| + + text('button') . qq|> + |; - # without JavaScript Calendar - $button1 = - qq||; - $button2 = - qq||; - } + #write Trigger + $jsscript = + Form->write_trigger(\%myconfig, "2", "invdate", "BL", "trigger1", + "duedate", "BL", "trigger2"); $form->{"javascript"} .= qq||; $form->{"javascript"} .= qq||; + $form->{javascript} .= qq||; $jsscript .= $form->write_trigger(\%myconfig, 2, @@ -435,62 +438,34 @@ sub form_header {
{script}> +|; -{id}> - - -{type}> -{level}> - -{creditlimit}> -{creditremaining}> + $form->hide_form(qw(id title vc type level creditlimit creditremaining + closedto locked shippted storno storno_id + max_dunning_level dunning_amount)); -{closedto}> -{locked}> + print qq|

$form->{saved_message}

| if $form->{saved_message}; -{shipped}> -{storno}> -{storno_id}> + print qq| -| . ($form->{saved_message} ? qq|

$form->{saved_message}

| : "") . qq| +
$form->{title}
- - - - -
$form->{title}
- - -
+ - - $vendors - - - - - - - - - - + $vendors + + + + $contact + + + + - + $taxzone @@ -523,13 +498,13 @@ sub form_header { - - + - - + @@ -726,9 +701,6 @@ sub form_footer { print $webdav_list; } print qq| -{jscalendar}> -|; - print qq|
| - . $locale->text('Contact Person') . qq|$contact
- - - - - - - - -
| . $locale->text('Credit Limit') . qq|$form->{creditlimit}| . $locale->text('Remaining') . qq|$form->{creditremaining}
-
| . $locale->text('Credit Limit') . qq|$form->{creditlimit}; | . $locale->text('Remaining') . qq| $form->{creditremaining}
| . $locale->text('Record in') . qq|
| . $locale->text('Order Date') . qq| +
| . $locale->text('Quotation Date') . qq| +
| . $locale->text('Project Number') . qq|