[Koha-bugs] [Bug 9993] On editing basket group delivery place resets to logged in branch
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Tue Apr 14 13:17:33 CEST 2015
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9993
Jonathan Druart <jonathan.druart at biblibre.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jonathan.druart at biblibre.co
| |m
--- Comment #3 from Jonathan Druart <jonathan.druart at biblibre.com> ---
Actually the code confirms it's a feature:
# determine default billing and delivery places depending on librarian
homebranch and existing basketgroup data
The following code could do the trick, but not sure if it's needed
% git diff
diff --git a/acqui/basketgroup.pl b/acqui/basketgroup.pl
index 9c57f69..b3fa964 100755
--- a/acqui/basketgroup.pl
+++ b/acqui/basketgroup.pl
@@ -254,12 +254,12 @@ if ( $op eq "add" ) {
$freedeliveryplace = $basketgroup->{freedeliveryplace};
$template->param( closedbg => ($basketgroup ->{'closed'}) ? 1 : 0);
} else {
+ # determine default billing and delivery places depending on librarian
homebranch
+ my $borrower = GetMember( ( 'borrowernumber' => $loggedinuser ) );
+ $billingplace = $borrower->{'branchcode'};
+ $deliveryplace = $borrower->{'branchcode'};
$template->param( closedbg => 0);
}
- # determine default billing and delivery places depending on librarian
homebranch and existing basketgroup data
- my $borrower = GetMember( ( 'borrowernumber' => $loggedinuser ) );
- $billingplace = $billingplace || $borrower->{'branchcode'};
- $deliveryplace = $deliveryplace || $borrower->{'branchcode'};
my $branches = C4::Branch::GetBranchesLoop( $billingplace );
$template->param( billingplaceloop => $branches );
On the other hand I agree the behavior is odd :)
--
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
More information about the Koha-bugs
mailing list