Lines 285-296
if ( $op eq "add" ) {
Link Here
|
285 |
$freedeliveryplace = $basketgroup->{freedeliveryplace}; |
285 |
$freedeliveryplace = $basketgroup->{freedeliveryplace}; |
286 |
$template->param( closedbg => ($basketgroup ->{'closed'}) ? 1 : 0); |
286 |
$template->param( closedbg => ($basketgroup ->{'closed'}) ? 1 : 0); |
287 |
} else { |
287 |
} else { |
|
|
288 |
# When creating a new basket group preselect billing and delivery place based on logged-in user |
289 |
my $patron = Koha::Patrons->find( $loggedinuser ); |
290 |
$billingplace = $patron->branchcode; |
291 |
$deliveryplace = $patron->branchcode; |
288 |
$template->param( closedbg => 0); |
292 |
$template->param( closedbg => 0); |
289 |
} |
293 |
} |
290 |
# determine default billing and delivery places depending on librarian homebranch and existing basketgroup data |
|
|
291 |
my $patron = Koha::Patrons->find( $loggedinuser ); # FIXME Not needed if billingplace and deliveryplace are set |
292 |
$billingplace = $billingplace || $patron->branchcode; |
293 |
$deliveryplace = $deliveryplace || $patron->branchcode; |
294 |
|
294 |
|
295 |
$template->param( billingplace => $billingplace ); |
295 |
$template->param( billingplace => $billingplace ); |
296 |
$template->param( deliveryplace => $deliveryplace ); |
296 |
$template->param( deliveryplace => $deliveryplace ); |
297 |
- |
|
|