Bugzilla – Attachment 98364 Details for
Bug 9993
On editing basket group delivery place resets to logged in library
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9993: On editing basket group delivery place resets to logged in branch
Bug-9993-On-editing-basket-group-delivery-place-re.patch (text/plain), 2.43 KB, created by
Katrin Fischer
on 2020-02-04 07:20:17 UTC
(
hide
)
Description:
Bug 9993: On editing basket group delivery place resets to logged in branch
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2020-02-04 07:20:17 UTC
Size:
2.43 KB
patch
obsolete
>From c6c5168a87fb590deb643e025c1faa5e739bfb96 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Wed, 20 Nov 2019 17:00:52 +0000 >Subject: [PATCH] Bug 9993: On editing basket group delivery place resets to > logged in branch > >This patch modifies basketgroups.pl so that existing data about a basket >group's billing and delivery place are correctly preselected in the edit >form. These fields shouldn't reset to the logged-in user's home branch >just because they have an empty value. > >To test, apply the patch and go to Acquisitions -> Vendor -> Basket >groups. > >When adding or editing a basket group the pre-selected value for >"Billing place" and "Delivery place" should be correct: > > - When creating a new basket group: The logged-in user's library > should be pre-selected. > > - When editing a basket group which has a library defined for either > the billing or delivery places, the correct library should be > pre-selected. > > - When editing a basket group which has no library defined for either > the billing or delivery place there should be no library > pre-selected (the "--" option should be pre-selected). > >Signed-off-by: David Nind <david@davidnind.com> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > acqui/basketgroup.pl | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > >diff --git a/acqui/basketgroup.pl b/acqui/basketgroup.pl >index ffa4ffb2aa..5a49f77114 100755 >--- a/acqui/basketgroup.pl >+++ b/acqui/basketgroup.pl >@@ -285,12 +285,12 @@ if ( $op eq "add" ) { > $freedeliveryplace = $basketgroup->{freedeliveryplace}; > $template->param( closedbg => ($basketgroup ->{'closed'}) ? 1 : 0); > } else { >+ # When creating a new basket group preselect billing and delivery place based on logged-in user >+ my $patron = Koha::Patrons->find( $loggedinuser ); >+ $billingplace = $patron->branchcode; >+ $deliveryplace = $patron->branchcode; > $template->param( closedbg => 0); > } >- # determine default billing and delivery places depending on librarian homebranch and existing basketgroup data >- my $patron = Koha::Patrons->find( $loggedinuser ); # FIXME Not needed if billingplace and deliveryplace are set >- $billingplace = $billingplace || $patron->branchcode; >- $deliveryplace = $deliveryplace || $patron->branchcode; > > $template->param( billingplace => $billingplace ); > $template->param( deliveryplace => $deliveryplace ); >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 9993
:
95622
|
95821
|
98269
| 98364