X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=SL%2FIC.pm;h=1a02c59c62627a0b776e9e244f1cf1eccd09fd28;hb=c7241bf7c547d63999898dee7b5dd486e4d122d3;hp=45604b0c9768e83d5db5a08f2b35a5f5eab940d6;hpb=46b430e4f4e0cc49c175840eb6ef6735bf6223b7;p=kivitendo-erp.git diff --git a/SL/IC.pm b/SL/IC.pm index 45604b0c9..1a02c59c6 100644 --- a/SL/IC.pm +++ b/SL/IC.pm @@ -399,6 +399,8 @@ sub save { ); do_query($form, $dbh, $query, @values); + $form->new_lastmtime('parts'); + # delete translation records do_query($form, $dbh, qq|DELETE FROM translation WHERE parts_id = ?|, conv_i($form->{id})); @@ -570,6 +572,8 @@ sub update_assembly { $qty * ($form->{weight} - $weight), conv_i($id)); do_query($form, $dbh, $query, @values); + $form->new_lastmtime('parts') if $id == $form->{id}; + $main::lxdebug->leave_sub(); } @@ -868,6 +872,13 @@ sub all_parts { } } + # special case smart search + if ($form->{all}) { + $form->{"l_$_"} = 1 for qw(partnumber description unit sellprice lastcost cvar_packaging linetotal); + push @where_tokens, "p.partnumber ILIKE ? OR p.description ILIKE ?"; + push @bind_vars, "%$form->{all}%", "%$form->{all}%"; + } + # special case insertdate if (grep { $form->{$_} } qw(insertdatefrom insertdateto)) { $form->{"l_insertdate"} = 1;