X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=bin%2Fmozilla%2Fic.pl;h=a60baeb704f308a217baa4f7fc78805d9072db8e;hb=8482e69b2e36af353705a84e4465668f7431dddf;hp=06fc13f90762d20aed0d560483ec3982d8319066;hpb=5ebbc846ece0cf580417eeaa6e11154b168ada7b;p=kivitendo-erp.git
diff --git a/bin/mozilla/ic.pl b/bin/mozilla/ic.pl
index 06fc13f90..a60baeb70 100644
--- a/bin/mozilla/ic.pl
+++ b/bin/mozilla/ic.pl
@@ -36,7 +36,8 @@ use SL::IC;
#use SL::PE;
-require "$form->{path}/io.pl";
+require "bin/mozilla/io.pl";
+require "bin/mozilla/common.pl";
1;
@@ -48,7 +49,7 @@ sub add {
$form->{title} = $locale->text('Add ' . ucfirst $form->{item});
$form->{callback} =
- "$form->{script}?action=add&item=$form->{item}&path=$form->{path}&login=$form->{login}&password=$form->{password}"
+ "$form->{script}?action=add&item=$form->{item}&login=$form->{login}&password=$form->{password}"
unless $form->{callback};
$form->{"unit_changeable"} = 1;
@@ -269,6 +270,8 @@ sub search {
|
@@ -372,7 +375,6 @@ $jsscript
-{path}>
{login}>
{password}>
@@ -395,7 +397,6 @@ $jsscript
$lxdebug->leave_sub();
} #end search()
-
sub search_update_prices {
$lxdebug->enter_sub();
@@ -557,7 +558,6 @@ sub search_update_prices {
{price_rows}>
-{path}>
{login}>
{password}>
@@ -656,7 +656,6 @@ sub choice {
print qq|
-{path}>
{login}>
{password}>
@@ -746,20 +745,9 @@ sub choice {
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');
@@ -814,7 +802,6 @@ sub list {
-{path}>
{login}>
{password}>
@@ -935,7 +922,7 @@ sub addtop100 {
} #fi
$callback =
- "$form->{script}?action=top100&path=$form->{path}&login=$form->{login}&password=$form->{password}&searchitems=$form->{searchitems}&itemstatus=$form->{itemstatus}&bom=$form->{bom}&l_linetotal=$form->{l_linetotal}&title="
+ "$form->{script}?action=top100&login=$form->{login}&password=$form->{password}&searchitems=$form->{searchitems}&itemstatus=$form->{itemstatus}&bom=$form->{bom}&l_linetotal=$form->{l_linetotal}&title="
. $form->escape($form->{title}, 1);
# if we have a serialnumber limit search
@@ -1028,6 +1015,10 @@ sub addtop100 {
$callback .= "&partnumber=$form->{partnumber}";
$option .= $locale->text('Part Number') . qq| : $form->{partnumber} |;
}
+ if ($form->{ean}) {
+ $callback .= "&partnumber=$form->{ean}";
+ $option .= $locale->text('EAN') . qq| : $form->{ean} |;
+ }
if ($form->{partsgroup}) {
$callback .= "&partsgroup=$form->{partsgroup}";
$option .= $locale->text('Group') . qq| : $form->{partsgroup} |;
@@ -1067,7 +1058,7 @@ sub addtop100 {
}
@columns = $form->sort_columns(
- qw(number partnumber description partsgroup bin onhand rop unit listprice linetotallistprice sellprice linetotalsellprice lastcost linetotallastcost priceupdate weight image drawing microfiche invnumber ordnumber quonumber name serialnumber soldtotal)
+ qw(number partnumber ean description partsgroup bin onhand rop unit listprice linetotallistprice sellprice linetotalsellprice lastcost linetotallastcost priceupdate weight image drawing microfiche invnumber ordnumber quonumber name serialnumber soldtotal)
);
if ($form->{l_linetotal}) {
@@ -1303,7 +1294,7 @@ sub addtop100 {
$column_data{number} =
" | "
- . $form->format_amount(\%myconfig, $ref->{number}, '', " ")
+ . $form->format_amount(\%myconfig, $ref->{number})
. " | ";
$column_data{partnumber} =
"$ref->{partnumber} | ";
@@ -1312,32 +1303,29 @@ sub addtop100 {
$column_data{onhand} =
""
- . $form->format_amount(\%myconfig, $ref->{onhand}, '', " ")
+ . $form->format_amount(\%myconfig, $ref->{onhand})
. " | ";
$column_data{sellprice} =
""
- . $form->format_amount(\%myconfig, $ref->{sellprice}, 2, " ")
+ . $form->format_amount(\%myconfig, $ref->{sellprice})
. " | ";
$column_data{listprice} =
""
- . $form->format_amount(\%myconfig, $ref->{listprice}, 2, " ")
+ . $form->format_amount(\%myconfig, $ref->{listprice})
. " | ";
$column_data{lastcost} =
""
- . $form->format_amount(\%myconfig, $ref->{lastcost}, 2, " ")
+ . $form->format_amount(\%myconfig, $ref->{lastcost})
. " | ";
$column_data{linetotalsellprice} = ""
- . $form->format_amount(\%myconfig, $ref->{onhand} * $ref->{sellprice},
- 2, " ")
+ . $form->format_amount(\%myconfig, $ref->{onhand} * $ref->{sellprice}, 2)
. " | ";
$column_data{linetotallastcost} = ""
- . $form->format_amount(\%myconfig, $ref->{onhand} * $ref->{lastcost},
- 2, " ")
+ . $form->format_amount(\%myconfig, $ref->{onhand} * $ref->{lastcost}, 2)
. " | ";
$column_data{linetotallistprice} = ""
- . $form->format_amount(\%myconfig, $ref->{onhand} * $ref->{listprice},
- 2, " ")
+ . $form->format_amount(\%myconfig, $ref->{onhand} * $ref->{listprice}, 2)
. " | ";
if (!$ref->{assemblyitem}) {
@@ -1353,10 +1341,10 @@ sub addtop100 {
$column_data{rop} =
""
- . $form->format_amount(\%myconfig, $ref->{rop}, '', " ") . " | ";
+ . $form->format_amount(\%myconfig, $ref->{rop}) . "";
$column_data{weight} =
""
- . $form->format_amount(\%myconfig, $ref->{weight}, '', " ")
+ . $form->format_amount(\%myconfig, $ref->{weight})
. " | ";
$column_data{unit} = "$ref->{unit} | ";
$column_data{bin} = "$ref->{bin} | ";
@@ -1364,15 +1352,15 @@ sub addtop100 {
$column_data{invnumber} =
($ref->{module} ne 'oe')
- ? "{module}.pl?action=edit&type=invoice&id=$ref->{trans_id}&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$callback>$ref->{invnumber} | "
+ ? "{module}.pl?action=edit&type=invoice&id=$ref->{trans_id}&login=$form->{login}&password=$form->{password}&callback=$callback>$ref->{invnumber} | "
: "$ref->{invnumber} | ";
$column_data{ordnumber} =
($ref->{module} eq 'oe')
- ? "{module}.pl?action=edit&type=$ref->{type}&id=$ref->{trans_id}&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$callback>$ref->{ordnumber} | "
+ ? "{module}.pl?action=edit&type=$ref->{type}&id=$ref->{trans_id}&login=$form->{login}&password=$form->{password}&callback=$callback>$ref->{ordnumber} | "
: "$ref->{ordnumber} | ";
$column_data{quonumber} =
($ref->{module} eq 'oe' && !$ref->{ordnumber})
- ? "{module}.pl?action=edit&type=$ref->{type}&id=$ref->{trans_id}&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$callback>$ref->{quonumber} | "
+ ? "{module}.pl?action=edit&type=$ref->{type}&id=$ref->{trans_id}&login=$form->{login}&password=$form->{password}&callback=$callback>$ref->{quonumber} | "
: "$ref->{quonumber} | ";
$column_data{name} = "$ref->{name} | ";
@@ -1413,15 +1401,15 @@ sub addtop100 {
map { $column_data{$_} = " | " } @column_index;
$column_data{linetotalsellprice} =
""
- . $form->format_amount(\%myconfig, $totalsellprice, 2, " ")
+ . $form->format_amount(\%myconfig, $totalsellprice, 2)
. " | ";
$column_data{linetotallastcost} =
""
- . $form->format_amount(\%myconfig, $totallastcost, 2, " ")
+ . $form->format_amount(\%myconfig, $totallastcost, 2)
. " | ";
$column_data{linetotallistprice} =
""
- . $form->format_amount(\%myconfig, $totallistprice, 2, " ")
+ . $form->format_amount(\%myconfig, $totallistprice, 2)
. " | ";
print "