X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FIC.pm;h=fece79579b246e721289195d3a1c279450bae71f;hb=06af498f71c9424b2d373d12b4dd90cdac58e070;hp=704c21393b081d8e84a14bb08779b3812240a3a3;hpb=83914eeb2e95cdf587565952eef54be59dd58693;p=kivitendo-erp.git diff --git a/SL/IC.pm b/SL/IC.pm index 704c21393..fece79579 100644 --- a/SL/IC.pm +++ b/SL/IC.pm @@ -188,10 +188,12 @@ sub get_part { # get translations $form->{language_values} = ""; - $query = qq|SELECT language_id, translation FROM translation WHERE parts_id = ?|; + $query = qq|SELECT language_id, translation, longdescription + FROM translation + WHERE parts_id = ?|; my $trq = prepare_execute_query($form, $dbh, $query, conv_i($form->{id})); - while ($tr = $trq->fetchrow_hashref(NAME_lc)) { - $form->{language_values} .= "---+++---".$tr->{language_id}."--++--".$tr->{translation}; + while (my $tr = $trq->fetchrow_hashref(NAME_lc)) { + $form->{language_values} .= "---+++---" . join('--++--', @{$tr}{qw(language_id translation longdescription)}); } $trq->finish; @@ -730,9 +732,9 @@ sub assembly_item { # short - NOT IMPLEMENTED as form filter, only as itemstatus option # l_serialnumber - belonges to serialnumber filter # l_deliverydate - displays deliverydate is sold etc. flags are active +# l_soldtotal - aggreg join to display total of sold quantity, works as long as there's no bullshit in soldtotal # # not working: -# l_soldtotal - aggreg join to display total of sold quantity # onhand - as above, but masking the simple itemstatus results (doh!) # masking of onhand in bsooqr mode - ToDO: fixme # @@ -752,7 +754,8 @@ sub all_parts { my ($self, $myconfig, $form) = @_; my $dbh = $form->get_standard_dbh($myconfig); - $form->{parts} = +{ }; + $form->{parts} = +{ }; + $form->{soldtotal} = undef if $form->{l_soldtotal}; # security fix. top100 insists on putting strings in there... my @simple_filters = qw(partnumber ean description partsgroup microfiche drawing onhand); my @makemodel_filters = qw(make model); @@ -1308,7 +1311,6 @@ sub all_parts { $form->{parts} = \@assemblies; } - $dbh->disconnect; $main::lxdebug->leave_sub(); } @@ -1780,18 +1782,6 @@ sub get_basic_part_info { my $info = selectall_hashref_query($form, $dbh, $query, map { conv_i($_) } @ids); - if ($params{vendor_id}) { - $query = qq|SELECT * FROM parts_vendor WHERE (parts_id = ?) AND (vendor_id = ?)|; - my $sth = prepare_query($form, $dbh, $query); - - foreach my $part (@{ $info }) { - do_statement($form, $sth, $query, $part->{id}, conv_i($params{vendor_id})); - $part->{vendor_info} = $sth->fetchrow_hashref(); - } - - $sth->finish(); - } - if ('' eq ref $params{id}) { $info = $info->[0] || { };