Bug 2629 - Diacritics not being ignored when searching
[koha.git] / C4 / Acquisition.pm
index cfc261f..a0dda42 100644 (file)
@@ -1221,6 +1221,11 @@ sub DelOrder {
     my $sth = $dbh->prepare($query);
     $sth->execute( $bibnum, $ordernumber );
     $sth->finish;
+    my @itemnumbers = GetItemnumbersFromOrder( $ordernumber );
+    foreach my $itemnumber (@itemnumbers){
+       C4::Items::DelItem( $dbh, $bibnum, $itemnumber );
+    }
+    
 }
 
 =head2 FUNCTIONS ABOUT PARCELS
@@ -1576,33 +1581,33 @@ sub GetHistory {
 
     my @query_params  = ();
 
-    if ( defined $title ) {
+    if ( $title ) {
         $query .= " AND biblio.title LIKE ? ";
         $title =~ s/\s+/%/g;
         push @query_params, "%$title%";
     }
 
-    if ( defined $author ) {
+    if ( $author ) {
         $query .= " AND biblio.author LIKE ? ";
         push @query_params, "%$author%";
     }
 
-    if ( defined $isbn ) {
+    if ( $isbn ) {
         $query .= " AND biblioitems.isbn LIKE ? ";
         push @query_params, "%$isbn%";
     }
 
-    if ( defined $name ) {
+    if ( $name ) {
         $query .= " AND aqbooksellers.name LIKE ? ";
         push @query_params, "%$name%";
     }
 
-    if ( defined $from_placed_on ) {
+    if ( $from_placed_on ) {
         $query .= " AND creationdate >= ? ";
         push @query_params, $from_placed_on;
     }
 
-    if ( defined $to_placed_on ) {
+    if ( $to_placed_on ) {
         $query .= " AND creationdate <= ? ";
         push @query_params, $to_placed_on;
     }