X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fic.pl;h=3765f64a51c323da97ab26fb19f6939621540401;hb=7d03f2419db86592947fc2526a21c2bf34aa97d0;hp=1f45b3a34acc6cd3a75b2e50cdc74b0cb1102b89;hpb=92daa1a66a9ff737c92df86da3c28d663c421032;p=kivitendo-erp.git diff --git a/bin/mozilla/ic.pl b/bin/mozilla/ic.pl index 1f45b3a34..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}) { @@ -185,7 +186,7 @@ sub search {
| + | | . $locale->text('Part Number') . qq| | | . $locale->text('Part Description') . qq| | @@ -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(); @@ -403,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}) { # @@ -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 {" - . $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 "
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|