var selectedbranch;
var setbranch;
if( oObj.branches[i].selected ){
+
selectedbranch = " selected='selected' ";
setbranch = CURRENT;
}
selectedbranch = '';
setbranch = '';
}
- branchSelect += '<option value="'+ oObj.branches[i].value +'"'+selectedbranch+'>'+oObj.branches[i].branchname+setbranch+'</option>';
+ branchSelect += '<option value="'+ oObj.branches[i].branchcode +'"'+selectedbranch+'>'+oObj.branches[i].branchname+setbranch+'</option>';
}
branchSelect +='</select>';
return branchSelect;
use C4::Auth qw(check_cookie_auth);
use C4::Biblio qw(GetMarcBiblio GetFrameworkCode GetRecordValue );
-use C4::Branch qw(GetBranchName GetBranchesLoop);
use C4::Charset;
use C4::Circulation qw(GetTransfers);
use C4::Context;
$itemtype_limit = $itemtype->{translated_description};
}
+ my $libraries = Koha::Libraries->search({}, { order_by => ['branchname'] })->unblessed;
+ for my $library ( @$libraries ) {
+ $library->{selected} = 1 if $library->{branchcode} eq $h->branchcode();
+ }
my $hold = {
DT_RowId => $h->reserve_id(),
biblionumber => $biblionumber,
author => $h->biblio()->author(),
reserve_id => $h->reserve_id(),
branchcode => $h->branch()->branchname(),
- branches => GetBranchesLoop($h->branch()->branchcode()),
+ branches => $libraries,
reservedate => $h->reservedate(),
expirationdate => $h->expirationdate(),
suspend => $h->suspend(),