Bug 28581: Use 'from_email_address' where appropriate
[koha-ffzg.git] / Koha / Checkouts.pm
index a7b5060..0f2da95 100644 (file)
@@ -82,12 +82,12 @@ sub automatic_checkin {
         { prefetch => 'item'}
     );
 
-    while(my $checkout = $due_checkouts->next) {
-        if($checkout->item->itemtype->automatic_checkin) {
-            C4::Circulation::AddReturn($checkout->item->barcode, $checkout->branchcode);
+    while ( my $checkout = $due_checkouts->next ) {
+        if ( $checkout->item->itemtype->automatic_checkin ) {
+            C4::Circulation::AddReturn( $checkout->item->barcode,
+                $checkout->branchcode, undef, dt_from_string($checkout->date_due) );
         }
     }
-
 }
 
 =head3 type