diff --git a/acqui/acqui-home.pl b/acqui/acqui-home.pl index cbb8896804..d23f082187 100755 --- a/acqui/acqui-home.pl +++ b/acqui/acqui-home.pl @@ -72,10 +72,7 @@ foreach my $budget ( @{$budget_arr} ) { my $patron = Koha::Patrons->find( $budget->{budget_owner_id} ); if ( $patron ) { - # FIXME should pass the entire object into budget_owner - $budget->{budget_owner_firstname} = $patron->firstname; - $budget->{budget_owner_surname} = $patron->surname; - $budget->{budget_owner_borrowernumber} = $patron->borrowernumber; + $budget->{budget_owner} = $patron; } if ( !defined $budget->{budget_amount} ) { diff --git a/acqui/booksellers.pl b/acqui/booksellers.pl index b0ec7285b1..99da78cb9f 100755 --- a/acqui/booksellers.pl +++ b/acqui/booksellers.pl @@ -138,8 +138,7 @@ for my $vendor (@suppliers) { $basket->{$_} ||= 0; } if ( $patron ) { - $basket->{authorisedby_firstname} = $patron->firstname; - $basket->{authorisedby_surname} = $patron->surname; + $basket->{authorisedby} = $patron; } if ($basket->{basketgroupid}) { my $basketgroup = C4::Acquisition::GetBasketgroup($basket->{basketgroupid}); diff --git a/admin/aqbudgets.pl b/admin/aqbudgets.pl index f106a86415..5aeb8b9786 100755 --- a/admin/aqbudgets.pl +++ b/admin/aqbudgets.pl @@ -117,8 +117,7 @@ if ($op eq 'add_form') { exit; } $dropbox_disabled = BudgetHasChildren($budget_id); - my $patron = Koha::Patrons->find( $budget->{budget_owner_id} ); - $budget->{budget_owner_name} = ( $patron ? $patron->firstname . ' ' . $patron->surname : '' ); + $budget->{budget_owner} = Koha::Patrons->find( $budget->{budget_owner_id} ); } # build budget hierarchy diff --git a/circ/branchtransfers.pl b/circ/branchtransfers.pl index 1305c82803..b9d357c97f 100755 --- a/circ/branchtransfers.pl +++ b/circ/branchtransfers.pl @@ -210,10 +210,7 @@ foreach my $code ( keys %$messages ) { $err{borrowernumber} = $messages->{'WasReturned'}; my $patron = Koha::Patrons->find( $messages->{'WasReturned'} ); if ( $patron ) { # Just in case... - $err{title} = $patron->title; - $err{firstname} = $patron->firstname; - $err{surname} = $patron->surname; - $err{cardnumber} = $patron->cardnumber; + $err{patron} = $patron; } } $err{errdesteqholding} = ( $code eq 'DestinationEqualsHolding' ); diff --git a/circ/overdue.pl b/circ/overdue.pl index ff65712d2a..fe3fdd021f 100755 --- a/circ/overdue.pl +++ b/circ/overdue.pl @@ -300,27 +300,12 @@ if ($noreport) { push @overduedata, { patron => scalar Koha::Patrons->find( $data->{borrowernumber} ), duedate => $data->{date_due}, - borrowernumber => $data->{borrowernumber}, barcode => $data->{barcode}, - cardnumber => $data->{cardnumber}, itemnum => $data->{itemnumber}, issuedate => output_pref({ dt => dt_from_string( $data->{issuedate} ), dateonly => 1 }), - borrowertitle => $data->{borrowertitle}, - surname => $data->{surname}, - firstname => $data->{firstname}, - streetnumber => $data->{streetnumber}, - streettype => $data->{streettype}, - address => $data->{address}, - address2 => $data->{address2}, - city => $data->{city}, - zipcode => $data->{zipcode}, - country => $data->{country}, - phone => $data->{phone}, - email => $data->{email}, biblionumber => $data->{biblionumber}, title => $data->{title}, author => $data->{author}, - branchcode => $data->{branchcode}, homebranchcode => $data->{homebranchcode}, holdingbranchcode => $data->{holdingbranchcode}, itemcallnumber => $data->{itemcallnumber}, diff --git a/circ/transferstoreceive.pl b/circ/transferstoreceive.pl index de6a89aa22..10df07df07 100755 --- a/circ/transferstoreceive.pl +++ b/circ/transferstoreceive.pl @@ -114,13 +114,7 @@ while ( my $library = $libraries->next ) { # we check if we have a reserv for this transfer my $holds = $item->current_holds; if ( my $first_hold = $holds->next ) { - my $patron = Koha::Patrons->find( $first_hold->borrowernumber ); - # FIXME The full patron object should be passed to the template - $getransf{'borrowernum'} = $patron->borrowernumber; - $getransf{'borrowername'} = $patron->surname; - $getransf{'borrowerfirstname'} = $patron->firstname; - $getransf{'borrowermail'} = $patron->email if $patron->email; - $getransf{'borrowerphone'} = $patron->phone; + $getransf{patron} = Koha::Patrons->find( $first_hold->borrowernumber ); } push( @transferloop, \%getransf ); } diff --git a/circ/waitingreserves.pl b/circ/waitingreserves.pl index 24e03475ab..5943ea5673 100755 --- a/circ/waitingreserves.pl +++ b/circ/waitingreserves.pl @@ -130,11 +130,7 @@ while ( my $hold = $holds->next ) { $getreserv{'dotransfer'} = 1; } - my $borEmail = $patron->first_valid_email_address; - - if ( $borEmail ) { - $getreserv{'borrowermail'} = $borEmail; - } + $getreserv{patron} = $patron; if ($today > $calcDate) { if ($cancelall) { diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/borrower_debarments.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/borrower_debarments.inc index e8e22e8c66..92dda54b34 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/borrower_debarments.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/borrower_debarments.inc @@ -40,7 +40,7 @@