X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=bin%2Fmozilla%2Fic.pl;h=cf94b7bc9f8284fab1b0fced902fe86b4c291ea9;hb=34035b33f21af21316df798b19f2a758aa86b3a8;hp=5edc385c2e212cd825e6fdc7fe39fbb382eb7e9d;hpb=c42acfd52669057debdf6a3d4245492ef23384b7;p=kivitendo-erp.git diff --git a/bin/mozilla/ic.pl b/bin/mozilla/ic.pl index 5edc385c2..cf94b7bc9 100644 --- a/bin/mozilla/ic.pl +++ b/bin/mozilla/ic.pl @@ -38,6 +38,8 @@ use List::MoreUtils qw(any); use SL::AM; use SL::CVar; use SL::IC; +use SL::Helper::Flash qw(flash); +use SL::HTML::Util; use SL::ReportGenerator; #use SL::PE; @@ -49,7 +51,6 @@ use strict; our ($form, $locale, %myconfig, $lxdebug, $auth); require "bin/mozilla/io.pl"; -require "bin/mozilla/invoice_io.pl"; require "bin/mozilla/common.pl"; require "bin/mozilla/reportgenerator.pl"; @@ -93,7 +94,7 @@ sub add { sub search { $lxdebug->enter_sub(); - $auth->assert('part_service_assembly_edit'); + $auth->assert('part_service_assembly_details'); $form->{revers} = 0; # switch for backward sorting $form->{lastsort} = ""; # memory for which table was sort at last time @@ -105,8 +106,6 @@ sub search { $form->{title} = $locale->text($form->{title}); $form->{title} = $locale->text('Assemblies') if ($is_xyz{is_assembly}); - $form->{jsscript} = 1; - $form->{CUSTOM_VARIABLES} = CVar->get_configs('module' => 'IC'); ($form->{CUSTOM_VARIABLES_FILTER_CODE}, $form->{CUSTOM_VARIABLES_INCLUSION_CODE}) = CVar->render_search_options('variables' => $form->{CUSTOM_VARIABLES}, @@ -116,9 +115,7 @@ sub search { $form->header; $form->get_lists('partsgroup' => 'ALL_PARTSGROUPS'); - print $form->parse_html_template('ic/search', { %is_xyz, - dateformat => $myconfig{dateformat}, - limit => $myconfig{vclimit}, }); + print $form->parse_html_template('ic/search', { %is_xyz, }); $lxdebug->leave_sub(); } #end search() @@ -200,794 +197,31 @@ sub update_prices { $lxdebug->leave_sub(); } -#sub choice { -# $lxdebug->enter_sub(); -# -# $auth->assert('part_service_assembly_edit'); -# -# our ($j, $lastndx); -# my ($totop100); -# -# $form->{title} = $locale->text('Top 100 hinzufuegen'); -# -# $form->header; -# -# push @custom_hiddens, qw(searchitems title bom titel revers lastsort sort ndxs_counter extras); -# push @custom_hiddens, qw(itemstatus l_linetotal l_partnumber l_description l_onhand l_unit l_sellprice l_linetotalsellprice); -# my @HIDDENS = ( -# +{ name => 'row', value => $j }, -# +{ name => 'nextsub', value => 'item_selected' }, -# +{ name => 'test', value => 'item_selected' }, -# +{ name => 'lastndx', value => $lastndx }, -# map(+{ name => $_, value => $form->{$_} }, @custom_hiddens), -# ); -# -# my ($partnumber, $description, $unit, $sellprice, $soldtotal); -# # if choice set data -## if ($form->{ndx}) { -## for my $i (0 .. $form->{ndxs_counter}) { -## -## # insert data into top100 -## push @{ $form->{parts} }, -## { number => "", -## partnumber => $form->{"totop100_partnumber_$j"}, -## description => $form->{"totop100_description_$j"}, -## unit => $form->{"totop100_unit_$j"}, -## sellprice => $form->{"totop100_sellprice_$j"}, -## soldtotal => $form->{"totop100_soldtotal_$j"}, -## }; -## } #rof -## } #fi -# -# $totop100 = ""; -# -# # set data for next page -# for my $i (1 .. $form->{ndxs_counter}) { -# $partnumber = $form->{"totop100_partnumber_$i"}; -# $description = $form->{"totop100_description_$i"}; -# $unit = $form->{"totop100_unit_$i"}; -# $sellprice = $form->{"totop100_sellprice_$i"}; -# $soldtotal = $form->{"totop100_soldtotal_$i"}; -# -# push @PARTS, { -# totop100_partnumber => $form->{"totop100_partnumber_$i"}, -# totop100_description => $form->{"totop100_description_$i"}, -# totop100_unit => $form->{"totop100_unit_$i"}, -# totop100_sellprice => $form->{"totop100_sellprice_$i"}, -# totop100_soldtotal => $form->{"totop100_soldtotal_$i"}, -# } -# -## $totop100 .= qq| -##{"totop100_partnumber_$i"}> -##{"totop100_description_$i"}> -##{"totop100_unit_$i"}> -##{"totop100_sellprice_$i"}> -##{"totop100_soldtotal_$i"}> -## |; -# } #rof -# -# print $form->parse_html_template('ic/choice', +{ HIDDENS => \@HIDDENS, PARTS => \@PARTS }); -# -# $lxdebug->leave_sub(); -#} #end choice - -#sub list { -# $lxdebug->enter_sub(); -# -# $auth->assert('part_service_assembly_edit'); -# -# our ($lastndx); -# our ($partnumber, $description, $unit, $sellprice, $soldtotal); -# -# 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'); -# -# $form->header; -# -# print qq| -#
-# -# -#