X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=bin%2Fmozilla%2Fir.pl;h=159dc45e8941d0896c74b8453c3e777648f649ae;hb=47916a374217afc8d84bd147f0fada5086970bae;hp=9dd0076c526d1178e98fecbc3394e4bf9b34dbfd;hpb=3740b5032e01a83f12912887e66d0824c47aebcc;p=kivitendo-erp.git
diff --git a/bin/mozilla/ir.pl b/bin/mozilla/ir.pl
index 9dd0076c5..159dc45e8 100644
--- a/bin/mozilla/ir.pl
+++ b/bin/mozilla/ir.pl
@@ -286,9 +286,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,
+ '-labels' => \%labels, '-default' => $form->{"cp_id"}))
+ . qq|
+ |
+
|;
+ }
%labels = ();
@values = ("");
@@ -309,8 +319,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 +330,8 @@ sub form_header {
'-values' => \@values, '-labels' => \%labels)) . qq|
|
|;
-
+ }
+
%labels = ();
@values = ();
my $i = 0;
@@ -396,13 +409,13 @@ sub form_header {
# with JavaScript Calendar
$button1 = qq|
- |
-
+ text('button') . qq|> |
|;
$button2 = qq|
- |
-
+ text('button') . qq|> |
|;
@@ -454,40 +467,21 @@ sub form_header {
| . ($form->{saved_message} ? qq|$form->{saved_message}
| : "") . qq|
+$form->{title}
+
-
- $form->{title} |
-
-
-
-
-
-
+ |
-
- $vendors
- |
- . $locale->text('Contact Person') . qq| |
- $contact |
-
-
-
-
-
-
- |
-
-
-
- | . $locale->text('Credit Limit') . qq| |
- $form->{creditlimit} |
- |
- | . $locale->text('Remaining') . qq| |
- $form->{creditremaining} |
-
-
- |
+ $vendors
+
+
+
+ $contact
+
+ | . $locale->text('Credit Limit') . qq| |
+ $form->{creditlimit}; | . $locale->text('Remaining') . qq| $form->{creditremaining} |
+
| . $locale->text('Record in') . qq| |
|
@@ -523,13 +517,13 @@ sub form_header {
| . $locale->text('Order Date') . qq| |
- |
- |
+
+ |
| . $locale->text('Quotation Date') . qq| |
- |
- |
+
+ |
| . $locale->text('Project Number') . qq| |
@@ -830,6 +824,10 @@ sub form_footer {
$invdate = $form->datetonum($form->{invdate}, \%myconfig);
$closedto = $form->datetonum($form->{closedto}, \%myconfig);
+ print qq|
+|;
+
if ($form->{id}) {
my $show_storno = !$form->{storno} && !IS->has_storno(\%myconfig, $form, "ap");
@@ -851,9 +849,6 @@ sub form_footer {
}
- print qq||;
-
if (!$form->{id} && ($invdate > $closedto)) {
print qq| | .
@@ -1099,6 +1094,9 @@ sub post {
$form->isblank("invdate", $locale->text('Invoice Date missing!'));
$form->isblank("vendor", $locale->text('Vendor missing!'));
+ $form->{invnumber} =~ s/^\s*//g;
+ $form->{invnumber} =~ s/\s*$//g;
+
# if the vendor changed get new values
if (&check_name(vendor)) {
&update;
| |