X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=bin%2Fmozilla%2Fic.pl;h=61a820b39dbda3698e0272617e9acb9e0c43a74a;hb=1387c8c3ae668f43cafc8b81f51f7952b42db262;hp=c52288ad2605eb9757f85f83e8f068c1682e9aba;hpb=55bd1f287698469471b41b77cf99ca181433a7a5;p=kivitendo-erp.git
diff --git a/bin/mozilla/ic.pl b/bin/mozilla/ic.pl
index c52288ad2..61a820b39 100644
--- a/bin/mozilla/ic.pl
+++ b/bin/mozilla/ic.pl
@@ -397,7 +397,6 @@ $jsscript
$lxdebug->leave_sub();
} #end search()
-
sub search_update_prices {
$lxdebug->enter_sub();
@@ -748,20 +747,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');
@@ -1309,7 +1297,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 +1306,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 +1344,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} | ";
@@ -1419,15 +1404,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 "";
@@ -1861,32 +1846,29 @@ sub generate_report {
$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}, -2)
. " | ";
$column_data{listprice} =
""
- . $form->format_amount(\%myconfig, $ref->{listprice}, 2, " ")
+ . $form->format_amount(\%myconfig, $ref->{listprice}, -2)
. " | ";
$column_data{lastcost} =
""
- . $form->format_amount(\%myconfig, $ref->{lastcost}, 2, " ")
+ . $form->format_amount(\%myconfig, $ref->{lastcost}, -2)
. " | ";
$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}) {
@@ -1902,10 +1884,10 @@ sub generate_report {
$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} | ";
@@ -1943,7 +1925,7 @@ sub generate_report {
$column_data{soldtotal} =
""
- . $form->format_amount(\%myconfig, $ref->{soldtotal}, '', " ")
+ . $form->format_amount(\%myconfig, $ref->{soldtotal})
. " | ";
$column_data{deliverydate} = "$ref->{deliverydate} | ";
@@ -1968,15 +1950,15 @@ sub generate_report {
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 "
";
@@ -2028,20 +2010,20 @@ sub parts_subtotal {
$column_data{onhand} =
""
- . $form->format_amount(\%myconfig, $subtotalonhand, '', " ")
+ . $form->format_amount(\%myconfig, $subtotalonhand)
. " | ";
$column_data{linetotalsellprice} =
""
- . $form->format_amount(\%myconfig, $subtotalsellprice, 2, " ")
+ . $form->format_amount(\%myconfig, $subtotalsellprice, 2)
. " | ";
$column_data{linetotallistprice} =
""
- . $form->format_amount(\%myconfig, $subtotallistprice, 2, " ")
+ . $form->format_amount(\%myconfig, $subtotallistprice, 2)
. " | ";
$column_data{linetotallastcost} =
""
- . $form->format_amount(\%myconfig, $subtotallastcost, 2, " ")
+ . $form->format_amount(\%myconfig, $subtotallastcost, 2)
. " | ";
$subtotalonhand = 0;
@@ -2062,7 +2044,9 @@ sub parts_subtotal {
sub edit {
$lxdebug->enter_sub();
-
+ # show history button
+ $form->{javascript} = qq||;
+ #/show hhistory button
IC->get_part(\%myconfig, \%$form);
$form->{"original_partnumber"} = $form->{"partnumber"};
@@ -2081,8 +2065,8 @@ sub link_part {
IC->create_links("IC", \%myconfig, \%$form);
# currencies
- map { $form->{selectcurrency} .= "
-
-
-
-