Bug 15496: Tidy code block (Whitespace changes only)
[koha-equinox.git] / cataloguing / moveitem.pl
index 5ef4ffe..49641f4 100755 (executable)
@@ -65,38 +65,44 @@ $template->param(bibliotitle => $biblio->title);
 $template->param(biblionumber => $biblionumber);
 
 # If we already have the barcode of the item to move and the biblionumber to move the item to
-if ($barcode && $biblionumber) { 
+if ( $barcode && $biblionumber ) {
 
     my $itemnumber;
-    my $item = Koha::Items->find({ barcode => $barcode });
+    my $item = Koha::Items->find( { barcode => $barcode } );
 
     if ($item) {
 
         $itemnumber = $item->itemnumber;
         my $frombiblionumber = $item->biblionumber;
 
-           my $moveresult = MoveItemFromBiblio($itemnumber, $frombiblionumber, $biblionumber); 
-           if ($moveresult) { 
-               $template->param(success => 1);
-           } else {
-               $template->param(error => 1,
-                                errornonewitem => 1); 
-           }
+        my $moveresult = MoveItemFromBiblio( $itemnumber, $frombiblionumber, $biblionumber );
+        if ($moveresult) {
+            $template->param( success => 1 );
+        }
+        else {
+            $template->param(
+                error          => 1,
+                errornonewitem => 1
+            );
+        }
 
-
-       } else {
-           $template->param(error => 1,
-                            errornoitem => 1);
-       }
+    }
+    else {
+        $template->param(
+            error       => 1,
+            errornoitem => 1
+        );
+    }
     $template->param(
-                       barcode => $barcode,  
-                       itemnumber => $itemnumber,
-                   );
-
-} else {
-    $template->param(missingparameter => 1);
-    if (!$barcode)      { $template->param(missingbarcode      => 1); }
-    if (!$biblionumber) { $template->param(missingbiblionumber => 1); }
+        barcode    => $barcode,
+        itemnumber => $itemnumber,
+    );
+
+}
+else {
+    $template->param( missingparameter => 1 );
+    if ( !$barcode )      { $template->param( missingbarcode      => 1 ); }
+    if ( !$biblionumber ) { $template->param( missingbiblionumber => 1 ); }
 }