X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=bin%2Fmozilla%2Fic.pl;h=3765f64a51c323da97ab26fb19f6939621540401;hb=250a086bfcb9cb51fce6f347b295b3de6166ad83;hp=c52288ad2605eb9757f85f83e8f068c1682e9aba;hpb=55bd1f287698469471b41b77cf99ca181433a7a5;p=kivitendo-erp.git
diff --git a/bin/mozilla/ic.pl b/bin/mozilla/ic.pl
index c52288ad2..3765f64a5 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;
@@ -79,7 +80,7 @@ sub search {
# $locale->text('Services')
# use JavaScript Calendar or not
- $form->{jsscript} = $jscalendar;
+ $form->{jsscript} = 1;
$jsscript = "";
if ($form->{jsscript}) {
@@ -374,7 +375,6 @@ $jsscript
-{path}>
{login}>
{password}>
@@ -397,7 +397,6 @@ $jsscript
$lxdebug->leave_sub();
} #end search()
-
sub search_update_prices {
$lxdebug->enter_sub();
@@ -405,7 +404,7 @@ sub search_update_prices {
IC->get_pricegroups(\%myconfig, \%$form);
# use JavaScript Calendar or not
-# $form->{jsscript} = $jscalendar;
+# $form->{jsscript} = 1;
# $jsscript = "";
# if ($form->{jsscript}) {
#
@@ -559,7 +558,6 @@ sub search_update_prices {
{price_rows}>
-{path}>
{login}>
{password}>
@@ -658,7 +656,6 @@ sub choice {
print qq|
-{path}>
{login}>
{password}>
@@ -748,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');
@@ -816,7 +802,6 @@ sub list {
-{path}>
{login}>
{password}>
@@ -937,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
@@ -1309,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} | ";
@@ -1318,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}) {
@@ -1359,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} | ";
@@ -1370,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} | ";
@@ -1419,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 "";
@@ -1450,7 +1432,6 @@ sub addtop100 {
+
-
-
-
-