$form->{taxzone_id} = $taxzone_id;
}
- # currencies
- @curr = split(/:/, $form->{currencies});
- chomp $curr[0];
- $form->{defaultcurrency} = $curr[0];
-
map { $form->{selectcurrency} .= "<option>$_\n" } @curr;
$form->{oldvendor} = "$form->{vendor}--$form->{vendor_id}";
"projects" => { "key" => "ALL_PROJECTS",
"all" => 0,
"old_id" => \@old_project_ids },
- "taxzones" => "ALL_TAXZONES");
+ "taxzones" => "ALL_TAXZONES",
+ "currencies" => "ALL_CURRENCIES");
my %labels;
my @values = (undef);
NTI($cgi->popup_menu('-name' => 'globalproject_id', '-values' => \@values,
'-labels' => \%labels,
'-default' => $form->{"globalproject_id"}));
-
+
+ %labels = ();
+ @values = ();
+ foreach my $item (@{ $form->{"ALL_CURRENCIES"} }) {
+ push(@values, $item->{"currency"});
+ $labels{$item->{"currency"}} = $item->{"currency"};
+ }
+
+ $form->{currency} = $form->{defaultcurrency} unless $form->{currency};
+ my $currencies = qq|
+ <tr>
+ <th align="right">| . $locale->text('Currency') . qq|</th>
+ <td>| .
+ NTI($cgi->popup_menu('-name' => 'currency', '-default' => $form->{"currency"},
+ '-values' => \@values, '-labels' => \%labels)) . qq|
+ </td>
+ </tr>|;
+
%labels = ();
@values = ();
foreach my $item (@{ $form->{"ALL_TAXZONES"} }) {
$taxzone
$department
<tr>
- <th align=right nowrap>| . $locale->text('Currency') . qq|</th>
- <td><select name=currency>$form->{selectcurrency}</select></td>
+ $currencies
$exchangerate
</tr>
</table>
$jsscript
-<input type=hidden name=selectcurrency value="$form->{selectcurrency}">
-<input type=hidden name=defaultcurrency value=$form->{defaultcurrency}>
<input type=hidden name=fxgain_accno value=$form->{fxgain_accno}>
<input type=hidden name=fxloss_accno value=$form->{fxloss_accno}>
<input type=hidden name=webdav value=$webdav>
$form->{shipto_id} = $shipto_id;
}
- # currencies
- @curr = split(/:/, $form->{currencies});
- chomp $curr[0];
- $form->{defaultcurrency} = $curr[0];
-
- map { $form->{selectcurrency} .= "<option>$_</option>\n" } @curr;
-
$form->{oldcustomer} = "$form->{customer}--$form->{customer_id}";
if (@{ $form->{all_customer} }) {
"all" => 0,
"old_id" => \@old_project_ids },
"employees" => "ALL_SALESMEN",
- "taxzones" => "ALL_TAXZONES");
+ "taxzones" => "ALL_TAXZONES",
+ "currencies" => "ALL_CURRENCIES");
my %labels;
my @values = (undef);
'-labels' => \%labels, '-default' => $form->{"shipto_id"}))
. qq|</td>|;
+ %labels = ();
+ @values = ();
+ foreach my $item (@{ $form->{"ALL_CURRENCIES"} }) {
+ push(@values, $item->{"currency"});
+ $labels{$item->{"currency"}} = $item->{"currency"};
+ }
+
+ $form->{currency} = $form->{defaultcurrency} unless $form->{currency};
+ my $currencies = qq|
+ <tr>
+ <th align="right">| . $locale->text('Currency') . qq|</th>
+ <td>| .
+ NTI($cgi->popup_menu('-name' => 'currency', '-default' => $form->{"currency"},
+ '-values' => \@values, '-labels' => \%labels)) . qq|
+ </td>
+ </tr>|;
+
%labels = ();
@values = ("");
foreach my $item (@{ $form->{"ALL_PROJECTS"} }) {
$taxzone
$department
<tr>
- <th align="right" nowrap>| . $locale->text('Currency') . qq|</th>
- <td><select name="currency">$form->{selectcurrency}</select></td>
- <input type="hidden" name="selectcurrency" value="$form->{selectcurrency}">
- <input type="hidden" name="defaultcurrency" value="$form->{defaultcurrency}">
+ $currencies
<input type="hidden" name="fxgain_accno" value="$form->{fxgain_accno}">
<input type="hidden" name="fxloss_accno" value="$form->{fxloss_accno}">
$exchangerate
(@{ $form->{"all_$form->{vc}"} });
}
- # currencies
- @curr = split(/:/, $form->{currencies});
- chomp $curr[0];
- $form->{defaultcurrency} = $curr[0];
- $form->{currency} = $form->{defaultcurrency} unless $form->{currency};
-
- map { $form->{selectcurrency} .= "<option>$_</option>\n" } @curr;
-
$form->{taxincluded} = $taxincluded if ($form->{id});
# departments
# with JavaScript Calendar
$button1 = qq|
- <td><input name=transdate id=transdate size=11 title="$myconfig{dateformat}" value=$form->{transdate} onBlur=\"check_right_date_format(this)\"></td>
+ <td><input name=transdate id=transdate size=11 title="$myconfig{dateformat}" value="$form->{transdate}" onBlur=\"check_right_date_format(this)\"></td>
<td><input type=button name=transdate id="trigger1" value=|
. $locale->text('button') . qq|></td>
|;
$button2 = qq|
- <td width="13"><input name=reqdate id=reqdate size=11 title="$myconfig{dateformat}" value=$form->{reqdate} onBlur=\"check_right_date_format(this)\"></td>
+ <td width="13"><input name=reqdate id=reqdate size=11 title="$myconfig{dateformat}" value="$form->{reqdate}" onBlur=\"check_right_date_format(this)\"></td>
<td width="4"><input type=button name=reqdate name=reqdate id="trigger2" value=|
. $locale->text('button') . qq|></td>
|;
# without JavaScript Calendar
$button1 = qq|
- <td><input name=transdate id=transdate size=11 title="$myconfig{dateformat}" value=$form->{transdate} onBlur=\"check_right_date_format(this)\"></td>|;
+ <td><input name=transdate id=transdate size=11 title="$myconfig{dateformat}" value="$form->{transdate}" onBlur=\"check_right_date_format(this)\"></td>|;
$button2 = qq|
- <td width="13"><input name=reqdate id=reqdate size=11 title="$myconfig{dateformat}" value=$form->{reqdate} onBlur=\"check_right_date_format(this)\"></td>|;
+ <td width="13"><input name=reqdate id=reqdate size=11 title="$myconfig{dateformat}" value="$form->{reqdate}" onBlur=\"check_right_date_format(this)\"></td>|;
}
my @tmp;
"all" => 0,
"old_id" => \@old_project_ids },
"employees" => "ALL_SALESMEN",
- "taxzones" => "ALL_TAXZONES");
+ "taxzones" => "ALL_TAXZONES",
+ "currencies" => "ALL_CURRENCIES");
my %labels;
my @values = (undef);
</td>
</tr>|;
+ %labels = ();
+ @values = ();
+ foreach my $item (@{ $form->{"ALL_CURRENCIES"} }) {
+ push(@values, $item->{"currency"});
+ $labels{$item->{"currency"}} = $item->{"currency"};
+ }
+
+ $form->{currency} = $form->{defaultcurrency} unless $form->{currency};
+ my $currencies = qq|
+ <tr>
+ <th align="right">| . $locale->text('Currency') . qq|</th>
+ <td>| .
+ NTI($cgi->popup_menu('-name' => 'currency', '-default' => $form->{"currency"},
+ '-values' => \@values, '-labels' => \%labels)) . qq|
+ </td>
+ </tr>|;
+
+
$form->{exchangerate} =
$form->format_amount(\%myconfig, $form->{exchangerate});
$taxzone
$department
<tr>
- <th align=right>| . $locale->text('Currency') . qq|</th>
- <td><select name=currency>$form->{selectcurrency}</select></td>
- <input type=hidden name=selectcurrency value="$form->{selectcurrency}">
- <input type=hidden name=defaultcurrency value=$form->{defaultcurrency}>
+ $currencies
$exchangerate
</tr>
<tr>