X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/46b430e4f4e0cc49c175840eb6ef6735bf6223b7..6ef4190ee87f3b7ba053bcc247aa92b92ef02cb4:/SL/IC.pm 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;