#use SL::PE;
require "$form->{path}/io.pl";
+require "bin/mozilla/common.pl";
1;
sub list {
$lxdebug->enter_sub();
- # get parts for
- if (($form->{partnumber} eq "") and ($form->{description} eq "")) {
- IC->get_parts(\%myconfig, \%$form, "");
- } else {
- if ((!($form->{partnumber} eq "")) and ($form->{description} eq "")) {
- IC->get_parts(\%myconfig, \%$form, "partnumber");
- } else {
- if (($form->{partnumber} eq "") and (!($form->{description} eq ""))) {
- IC->get_parts(\%myconfig, \%$form, "description");
- } else {
- IC->get_parts(\%myconfig, \%$form, "all");
- } #fi
- } #fi
- } #fi
+ my @sortorders = ("", "partnumber", "description", "all");
+ my $sortorder = $sortorders[($form->{description} ? 2 : 0) + ($form->{partnumber} ? 1 : 0)];
+ IC->get_parts(\%myconfig, \%$form, $sortorder);
$form->{title} = $locale->text('Top 100 hinzufuegen');
</tr>
<tr>
<th align="right" nowrap="true">|
- . $locale->text('Geschäftsvolumen') . qq|</th>
+ . $locale->text('Geschäftsvolumen') . qq|</th>
<td><input name=gv size=10 value=$form->{gv}></td>
</tr>
|;
}
if ($form->{item} eq 'service') {
- map { $form->{$_} = $form->parse_amount(\%myconfig, $form->{$_}) }
- qw(sellprice listprice);
+ map({ $form->{$_} = $form->parse_amount(\%myconfig, $form->{$_}) }
+ qw(sellprice listprice lastcost));
&form_header;
&price_row;
&form_footer;
}
# saving the history
if(!exists $form->{addition}) {
+ $form->{snumber} = qq|partnumber_| . $form->{partnumber};
$form->{addition} = "SAVED";
$form->save_history($form->dbconnect(\%myconfig));
}
# saving the history
if(!exists $form->{addition}) {
+ $form->{snumber} = qq|partnumber_| . $form->{partnumber};
$form->{addition} = "SAVED AS NEW";
$form->save_history($form->dbconnect(\%myconfig));
}
$lxdebug->enter_sub();
# saving the history
if(!exists $form->{addition}) {
+ $form->{snumber} = qq|partnumber_| . $form->{partnumber};
$form->{addition} = "DELETED";
$form->save_history($form->dbconnect(\%myconfig));
}
$lxdebug->leave_sub();
}
-sub continue { &{ $form->{nextsub} } }
+sub continue { call_sub($form->{"nextsub"}); }