}
}
- warn( 'calling SetMessaginPreferencse with ' . Data::Dumper->Dump( [ $updater ], [ 'updater' ] ) );
+ #warn( 'calling SetMessaginPreferencse with ' . Data::Dumper->Dump( [ $updater ], [ 'updater' ] ) );
C4::Members::Messaging::SetMessagingPreference( $updater );
}
PREF: foreach my $option ( @$messaging_options ) {
my $pref = C4::Members::Messaging::GetMessagingPreferences( { borrowernumber => $borrower->{'borrowernumber'},
message_name => $option->{'message_name'} } );
- warn( Data::Dumper->Dump( [ $pref ], [ 'pref' ] ) );
+ #warn( Data::Dumper->Dump( [ $pref ], [ 'pref' ] ) );
# make a hashref of the days, selecting one.
if ( $option->{'takes_days'} ) {
@{$option->{'select_days'}} = map {; { day => $_,
$option->{'digest'} = 'CHECKED' if $pref->{'wants_digest'};
}
+ if ( $borrower->{'category_type'} eq 'C') {
+ my ( $catcodes, $labels ) = GetborCatFromCatType( 'A', 'WHERE category_type = ?' );
+ my $cnt = scalar(@$catcodes);
+ $template->param( 'CATCODE_MULTI' => 1) if $cnt > 1;
+ $template->param( 'catcode' => $catcodes->[0]) if $cnt == 1;
+ }
+
+my ($picture, $dberror) = GetPatronImage($borrower->{'cardnumber'});
+$template->param( picture => 1 ) if $picture;
# get some recent messages sent to this borrower for display:
my $message_queue = C4::Letters::GetQueuedMessages( { borrowernumber => $query->param('borrowernumber') } );
message_queue => $message_queue,
DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(),
borrowernumber => $borrowernumber,
- branch => $branch,
+ branchcode => $borrower->{'branchcode'},
+ branchname => GetBranchName($borrower->{'branchcode'}),
dateformat => C4::Context->preference("dateformat"),
categoryname => $borrower->{'description'},
$borrower->{'categorycode'} => 1,
$template->param( BORROWER_INFO => [ $borrower ],
messagingview => 1,
messaging_preferences => $messaging_options,
+ is_child => ($borrower->{'category_type'} eq 'C'),
SMSnumber => defined $borrower->{'smsalertnumber'} ? $borrower->{'smsalertnumber'} : $borrower->{'mobile'} );
output_html_with_http_headers $query, $cookie, $template->output;