X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FIC.pm;h=3141b805ee622e5aa68d97fdd953faf2566fe5f0;hb=7804fab3bb495ddedd90159071c51b35a7e603ce;hp=451638d4b948c11d75b833a217660376f93cf232;hpb=70a063c3e5be7b3989c62f279d321a93d9e46801;p=kivitendo-erp.git diff --git a/SL/IC.pm b/SL/IC.pm index 451638d4b..3141b805e 100644 --- a/SL/IC.pm +++ b/SL/IC.pm @@ -502,6 +502,7 @@ sub save { shop = '$form->{shop}', ve = '$form->{ve}', gv = '$form->{gv}', + ean = '$form->{ean}', not_discountable = '$form->{not_discountable}', microfiche = '$form->{microfiche}', partsgroup_id = $partsgroup_id @@ -933,6 +934,11 @@ sub all_parts { } } + if ($form->{ean}) { + $var = $form->like(lc $form->{ean}); + $where .= " AND lower(ean) LIKE '$var'"; + } + if ($form->{searchitems} eq 'part') { $where .= " AND p.inventory_accno_id > 0"; } @@ -1519,22 +1525,12 @@ sub create_links { } $sth->finish; - if ($form->{id}) { - $query = qq|SELECT weightunit - FROM defaults|; - $sth = $dbh->prepare($query); - $sth->execute || $form->dberror($query); - - ($form->{weightunit}) = $sth->fetchrow_array; - $sth->finish; - - } else { - $query = qq|SELECT weightunit, current_date - FROM defaults|; + if (!$form->{id}) { + $query = qq|SELECT current_date FROM defaults|; $sth = $dbh->prepare($query); $sth->execute || $form->dberror($query); - ($form->{weightunit}, $form->{priceupdate}) = $sth->fetchrow_array; + ($form->{priceupdate}) = $sth->fetchrow_array; $sth->finish; } @@ -1772,7 +1768,7 @@ sub retrieve_accounts { my ($query, $sth, $dbh); - return $main::lxdebug->leave_sub() if (!defined($form->{"taxzone_id"})); + $form->{"taxzone_id"} *= 1; $dbh = $form->dbconnect($myconfig); @@ -1819,7 +1815,7 @@ sub retrieve_accounts { if (!$ref) { $dbh->disconnect(); - return $lxdebug->leave_sub(); + return $main::lxdebug->leave_sub(); } $ref->{"inventory_accno_id"} = undef unless ($ref->{"is_part"});