Bugzilla – Attachment 10341 Details for
Bug 5356
Shipping billing address improvements
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 5356: Followup sort and branchname
SIGNED-OFF-Bug-5356-Followup-sort-and-branchname.patch (text/plain), 7.34 KB, created by
Katrin Fischer
on 2012-06-17 19:43:26 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 5356: Followup sort and branchname
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2012-06-17 19:43:26 UTC
Size:
7.34 KB
patch
obsolete
>From 8293714f894eab346fc12a1f87a983311937d7ac Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Mon, 11 Jun 2012 14:13:24 +0200 >Subject: [PATCH] [SIGNED-OFF] Bug 5356: Followup sort and branchname > >- Sort is now the same as C4::Branch::GetBranchesLoop >- branchcodes are replaced with branchnames > >Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> >--- > C4/Acquisition.pm | 9 +++++++-- > acqui/basket.pl | 6 ++++-- > acqui/basketgroup.pl | 29 +++++------------------------ > acqui/basketheader.pl | 48 ++++-------------------------------------------- > 4 files changed, 20 insertions(+), 72 deletions(-) > >diff --git a/C4/Acquisition.pm b/C4/Acquisition.pm >index 7414237..899598a 100644 >--- a/C4/Acquisition.pm >+++ b/C4/Acquisition.pm >@@ -257,8 +257,8 @@ sub GetBasketAsCSV { > notes => $order->{'notes'}, > quantity => $order->{'quantity'}, > rrp => $order->{'rrp'}, >- deliveryplace => $basket->{'deliveryplace'}, >- billingplace => $basket->{'billingplace'} >+ deliveryplace => C4::Branch::GetBranchName( $basket->{'deliveryplace'} ), >+ billingplace => C4::Branch::GetBranchName( $basket->{'billingplace'} ), > }; > foreach(qw( > contractname author title publishercode collectiontitle notes >@@ -307,6 +307,7 @@ sub GetBasketGroupAsCSV { > my @orders = GetOrders( $$basket{basketno} ); > my $contract = GetContract( $$basket{contractnumber} ); > my $bookseller = GetBookSellerFromId( $$basket{booksellerid} ); >+ my $basketgroup = GetBasketgroup( $$basket{basketgroupid} ); > > foreach my $order (@orders) { > my $bd = GetBiblioData( $order->{'biblionumber'} ); >@@ -331,6 +332,10 @@ sub GetBasketGroupAsCSV { > booksellerpostal => $bookseller->{postal}, > contractnumber => $contract->{contractnumber}, > contractname => $contract->{contractname}, >+ basketgroupdeliveryplace => C4::Branch::GetBranchName( $basketgroup->{deliveryplace} ) || C4::Branch::GetBranchName( $basketgroup->{freedeliveryplace} ), >+ basketgroupbillingplace => C4::Branch::GetBranchName( $basketgroup->{billingplace} ), >+ basketdeliveryplace => C4::Branch::GetBranchName( $basket->{deliveryplace} ), >+ basketbillingplace => C4::Branch::GetBranchName( $basket->{billingplace} ), > }; > foreach(qw( > basketname author title publishercode collectiontitle notes >diff --git a/acqui/basket.pl b/acqui/basket.pl >index ebe965e..0c54d1d 100755 >--- a/acqui/basket.pl >+++ b/acqui/basket.pl >@@ -363,6 +363,8 @@ my $total_est_gste; > for my $key (keys %$basketgroup ){ > $basketgroup->{"basketgroup$key"} = delete $basketgroup->{$key}; > } >+ $basketgroup->{basketgroupdeliveryplace} = C4::Branch::GetBranchName( $basketgroup->{basketgroupdeliveryplace} ); >+ $basketgroup->{basketgroupbillingplace} = C4::Branch::GetBranchName( $basketgroup->{basketgroupbillingplace} ); > $template->param(%$basketgroup); > } > my $borrower= GetMember('borrowernumber' => $loggedinuser); >@@ -393,8 +395,8 @@ my $total_est_gste; > authorisedbyname => $basket->{authorisedbyname}, > closedate => $basket->{closedate}, > estimateddeliverydate=> $estimateddeliverydate, >- deliveryplace => $basket->{deliveryplace} || $basket->{freedeliveryplace}, >- billingplace => $basket->{billingplace}, >+ deliveryplace => C4::Branch::GetBranchName( $basket->{deliveryplace} ) || C4::Branch::GetBranchName( $basket->{freedeliveryplace} ), >+ billingplace => C4::Branch::GetBranchName( $basket->{billingplace} ), > active => $bookseller->{'active'}, > booksellerid => $bookseller->{'id'}, > name => $bookseller->{'name'}, >diff --git a/acqui/basketgroup.pl b/acqui/basketgroup.pl >index f873580..76a9c8d 100755 >--- a/acqui/basketgroup.pl >+++ b/acqui/basketgroup.pl >@@ -328,30 +328,11 @@ if ( $op eq "add" ) { > my $borrower = GetMember( ( 'borrowernumber' => $loggedinuser ) ); > $billingplace = $billingplace || $borrower->{'branchcode'}; > $deliveryplace = $deliveryplace || $borrower->{'branchcode'}; >- >- my $branches = GetBranches; >- >- # Build the combobox to select the billing place >- my @billingplaceloop; >- for (sort keys %$branches) { >- push @billingplaceloop, { >- value => $_, >- selected => $_ eq $billingplace, >- branchname => $branches->{$_}->{branchname}, >- }; >- } >- $template->param( billingplaceloop => \@billingplaceloop ); >- >- # Build the combobox to select the delivery place >- my @deliveryplaceloop; >- for (sort keys %$branches) { >- push @deliveryplaceloop, { >- value => $_, >- selected => $_ eq $deliveryplace, >- branchname => $branches->{$_}->{branchname}, >- }; >- } >- $template->param( deliveryplaceloop => \@deliveryplaceloop ); >+ >+ my $branches = C4::Branch::GetBranchesLoop( $billingplace ); >+ $template->param( billingplaceloop => $branches ); >+ $branches = C4::Branch::GetBranchesLoop( $deliveryplace ); >+ $template->param( deliveryplaceloop => $branches ); > > $template->param( booksellerid => $booksellerid ); > } >diff --git a/acqui/basketheader.pl b/acqui/basketheader.pl >index 3997811..142dcbe 100755 >--- a/acqui/basketheader.pl >+++ b/acqui/basketheader.pl >@@ -121,50 +121,10 @@ if ( $op eq 'add_form' ) { > # Build the combobox to select the billing place > my @billingplaceloop; > >- # In case there's no branch selected >- if ($billingplace eq "NO_LIBRARY_SET") { >- my %row = ( >- value => "", >- selected => 1, >- branchname => "--", >- ); >- push @billingplaceloop, \%row; >- } >- >- for ( sort keys %$branches ) { >- my $selected = 1 if $_ eq $billingplace; >- my %row = ( >- value => $_, >- selected => $selected, >- branchname => $branches->{$_}->{branchname}, >- ); >- push @billingplaceloop, \%row; >- } >- $template->param( billingplaceloop => \@billingplaceloop ); >- >- # Build the combobox to select the delivery place >- my @deliveryplaceloop; >- >- # In case there's no branch selected >- if ($deliveryplace eq "NO_LIBRARY_SET") { >- my %row = ( >- value => "", >- selected => 1, >- branchname => "--", >- ); >- push @deliveryplaceloop, \%row; >- } >- >- for ( sort keys %$branches ) { >- my $selected = 1 if $_ eq $deliveryplace; >- my %row = ( >- value => $_, >- selected => $selected, >- branchname => $branches->{$_}->{branchname}, >- ); >- push @deliveryplaceloop, \%row; >- } >- $template->param( deliveryplaceloop => \@deliveryplaceloop ); >+ my $branches = C4::Branch::GetBranchesLoop( $billingplace ); >+ $template->param( billingplaceloop => $branches ); >+ $branches = C4::Branch::GetBranchesLoop( $deliveryplace ); >+ $template->param( deliveryplaceloop => $branches ); > > #End Edit > } elsif ( $op eq 'add_validate' ) { >-- >1.7.9.5
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 5356
:
8405
|
8409
|
8532
|
8940
|
9228
|
9230
|
9975
|
10152
|
10201
|
10338
|
10340
|
10341
|
11120
|
11952
|
12376
|
12377
|
12407
|
12484
|
12838