+ $customers = SL::DB::Manager::Customer->get_objects_from_sql(
+ sql => $fs_query,
+ args => \@values,
+ );
+ }else{
+ # If trgm extension is not installed
+ $customers = SL::DB::Manager::Customer->get_all(
+ where => [
+ or => [
+ and => [
+ or => [ 'name' => { ilike => $lastname },
+ 'name' => { ilike => $company },
+ ],
+ 'zipcode' => { ilike => $zipcode },
+ ],
+ and => [
+ and => [ 'street' => { ilike => $street_not_fuzzy },
+ 'zipcode' => { ilike => $zipcode },
+ ],
+ ],
+ or => [ 'email' => { ilike => $email } ],
+ ],
+ ],
+ );
+ }