use C4::Letters;
use C4::Biblio;
use C4::Branch; # GetBranchName
-use C4::Overdues qw/CheckBorrowerDebarred/;
use C4::Form::MessagingPreferences;
use List::MoreUtils qw/uniq/;
use C4::Members::Attributes qw(GetBorrowerAttributes);
-
+use Koha::Borrower::Debarments qw(GetDebarments);
#use Smart::Comments;
#use Data::Dumper;
use DateTime;
$data->{$_} and $template->param(flagged => 1) and last;
}
-my $debar = CheckBorrowerDebarred($borrowernumber);
+my $debar = $data->{'debarred'};
if ($debar) {
$template->param( 'userdebarred' => 1, 'flagged' => 1 );
if ( $debar ne "9999-12-31" ) {
# Converts the branchcode to the branch name
my $samebranch;
-if ( C4::Context->preference("IndependantBranches") ) {
+if ( C4::Context->preference("IndependentBranches") ) {
my $userenv = C4::Context->userenv;
unless ( $userenv->{flags} % 2 == 1 ) {
$samebranch = ( $data->{'branchcode'} eq $userenv->{branch} );
$getreserv{nottransferedby} =
GetBranchName( $getiteminfo->{'holdingbranch'} );
}
+ $getreserv{title} = $getiteminfo->{'title'};
+ $getreserv{subtitle} = GetRecordValue('subtitle', GetMarcBiblio($getiteminfo->{biblionumber}), GetFrameworkCode($getiteminfo->{biblionumber}));
# if we don't have a reserv on item, we put the biblio infos and the waiting position
if ( $getiteminfo->{'title'} eq '' ) {
my $getbibtype = getitemtypeinfo( $getbibinfo->{'itemtype'} );
$getreserv{color} = 'inwait';
$getreserv{title} = $getbibinfo->{'title'};
+ $getreserv{subtitle} = GetRecordValue('subtitle', GetMarcBiblio($num_res->{biblionumber}), GetFrameworkCode($num_res->{biblionumber}));
$getreserv{nottransfered} = 0;
$getreserv{itemtype} = $getbibtype->{'description'};
$getreserv{author} = $getbibinfo->{'author'};
$getreserv{waitingposition} = $num_res->{'priority'};
$getreserv{suspend} = $num_res->{'suspend'};
$getreserv{suspend_until} = $num_res->{'suspend_until'};
+ $getreserv{expirationdate} = $num_res->{'expirationdate'};
+ $getreserv{reserve_id} = $num_res->{'reserve_id'};
push( @reservloop, \%getreserv );
}
my $userenv = C4::Context->userenv;
if($userenv->{flags} % 2 == 1){
$candeleteuser = 1;
-}elsif ( C4::Context->preference("IndependantBranches") ) {
+}elsif ( C4::Context->preference("IndependentBranches") ) {
$candeleteuser = ( $data->{'branchcode'} eq $userenv->{branch} );
}else{
if( C4::Auth::getuserflags( $userenv->{flags},$userenv->{number})->{borrowers} ) {
# check to see if patron's image exists in the database
# basically this gives us a template var to condition the display of
# patronimage related interface on
-my ($picture, $dberror) = GetPatronImage($data->{'cardnumber'});
+my ($picture, $dberror) = GetPatronImage($data->{'borrowernumber'});
$template->param( picture => 1 ) if $picture;
my $branch=C4::Context->userenv->{'branch'};
AutoResumeSuspendedHolds => C4::Context->preference('AutoResumeSuspendedHolds'),
SuspendHoldsIntranet => C4::Context->preference('SuspendHoldsIntranet'),
RoutingSerials => C4::Context->preference('RoutingSerials'),
+ debarments => GetDebarments({ borrowernumber => $borrowernumber }),
);
$template->param( $error => 1 ) if $error;
if ($issue->{issuedate} ) {
$issuedate = $issue->{issuedate}->clone();
}
-
- my $biblionumber = $issue->{biblionumber};
+ $issue->{subtitle} = GetRecordValue('subtitle', GetMarcBiblio($issue->{biblionumber}), GetFrameworkCode($issue->{biblionumber}));
$issue->{issuingbranchname} = GetBranchName($issue->{branchcode});
my %row = %{$issue};
$totalprice += $issue->{replacementprice};