X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/fb75f507d7fcae62d9b04162bd82e3787bb271c1..14562379bf33cf4b4388c6cf594ee8fc56ae3f87:/bin/mozilla/ic.pl diff --git a/bin/mozilla/ic.pl b/bin/mozilla/ic.pl index 84fe35186..b6153a6bc 100644 --- a/bin/mozilla/ic.pl +++ b/bin/mozilla/ic.pl @@ -74,23 +74,6 @@ require "bin/mozilla/reportgenerator.pl"; # end of main -sub add { - $lxdebug->enter_sub(); - - $auth->assert('part_service_assembly_edit'); - - my $title = 'Add ' . ucfirst $form->{item}; - $form->{title} = $locale->text($title); - $form->{callback} = "$form->{script}?action=add&item=$form->{item}" unless $form->{callback}; - $form->{unit_changeable} = 1; - - IC->get_pricegroups(\%myconfig, \%$form); - &link_part; - &display_form; - - $lxdebug->leave_sub(); -} - sub search { $lxdebug->enter_sub(); @@ -259,10 +242,11 @@ sub generate_report { my $cvar_configs = CVar->get_configs('module' => 'IC'); my %titles = ( - '' => $locale->text('Articles'), - part => $locale->text('Parts'), - service => $locale->text('Services'), - assembly => $locale->text('Assemblies'), + '' => $locale->text('Articles'), + part => $locale->text('Parts'), + service => $locale->text('Services'), + assembly => $locale->text('Assemblies'), + assortment => $locale->text('Assortments'), ); $form->{title} = $titles{$form->{searchitems}}; @@ -590,7 +574,7 @@ sub generate_report { $soldtotal = 0 if ($form->{sold}); } - my $edit_link = build_std_url('action=edit', 'id=' . E($ref->{id}), 'callback'); + my $edit_link = build_std_url('script=controller.pl', 'action=Part/edit', 'part.id=' . E($ref->{id}), 'callback'); $row->{partnumber}->{link} = $edit_link; $row->{description}->{link} = $edit_link; @@ -686,675 +670,6 @@ sub generate_report { $lxdebug->leave_sub(); } #end generate_report -sub parts_subtotal { - $lxdebug->enter_sub(); - - $auth->assert('part_service_assembly_edit'); - - my (%column_data); - my ($column_index, $subtotalonhand, $subtotalsellprice, $subtotallastcost, $subtotallistprice) = @_; - - map { $column_data{$_} = " " } @{ $column_index }; - $$subtotalonhand = 0 if ($form->{searchitems} eq 'assembly' && $form->{bom}); - - $column_data{onhand} = - "" - . $form->format_amount(\%myconfig, $$subtotalonhand) - . ""; - - $column_data{linetotalsellprice} = - "" - . $form->format_amount(\%myconfig, $$subtotalsellprice, 2) - . ""; - $column_data{linetotallistprice} = - "" - . $form->format_amount(\%myconfig, $$subtotallistprice, 2) - . ""; - $column_data{linetotallastcost} = - "" - . $form->format_amount(\%myconfig, $$subtotallastcost, 2) - . ""; - - $$subtotalonhand = 0; - $$subtotalsellprice = 0; - $$subtotallistprice = 0; - $$subtotallastcost = 0; - - print ""; - - map { print "\n$column_data{$_}" } @{ $column_index }; - - print qq| - -|; - - $lxdebug->leave_sub(); -} - -sub edit { - $lxdebug->enter_sub(); - - $auth->assert('part_service_assembly_details'); - - # show history button - $form->{javascript} = qq||; - #/show hhistory button - IC->get_part(\%myconfig, \%$form); - - $form->{"original_partnumber"} = $form->{"partnumber"}; - - my $title = 'Edit ' . ucfirst $form->{item}; - $form->{title} = $locale->text($title); - - &link_part; - &display_form; - - $lxdebug->leave_sub(); -} - -sub link_part { - $lxdebug->enter_sub(); - - $auth->assert('part_service_assembly_details'); - - IC->create_links("IC", \%myconfig, \%$form); - - # currencies - map({ $form->{selectcurrency} .= "