# Suite 330, Boston, MA 02111-1307 USA
use strict;
-require Exporter;
+
use CGI;
use Mail::Sendmail;
}
$borr->{'dateenrolled'} = format_date( $borr->{'dateenrolled'} );
-$borr->{'expiry'} = format_date( $borr->{'expiry'} );
+$borr->{'dateexpiry'} = format_date( $borr->{'dateexpiry'} );
$borr->{'dateofbirth'} = format_date( $borr->{'dateofbirth'} );
$borr->{'ethnicity'} = fixEthnicity( $borr->{'ethnicity'} );
}
}
+my $checkin_prefs = C4::Members::Messaging::GetMessagingPreferences({
+ borrowernumber => $borrowernumber,
+ message_name => 'Item Checkout'
+});
+for (@{ $checkin_prefs->{transports} }) {
+ $borr->{"items_returned_$_"} = 1;
+}
+my $checkout_prefs = C4::Members::Messaging::GetMessagingPreferences({
+ borrowernumber => $borrowernumber,
+ message_name => 'Item Check-in'
+});
+for (@{ $checkout_prefs->{transports} }) {
+ $borr->{"items_borrowed_$_"} = 1;
+}
+
my @bordat;
$bordat[0] = $borr;