View | Details | Raw Unified | Return to bug 5356
Collapse All | Expand All

(-)a/C4/Acquisition.pm (-2 / +7 lines)
Lines 257-264 sub GetBasketAsCSV { Link Here
257
            notes => $order->{'notes'},
257
            notes => $order->{'notes'},
258
            quantity => $order->{'quantity'},
258
            quantity => $order->{'quantity'},
259
            rrp => $order->{'rrp'},
259
            rrp => $order->{'rrp'},
260
            deliveryplace => $basket->{'deliveryplace'},
260
            deliveryplace => C4::Branch::GetBranchName( $basket->{'deliveryplace'} ),
261
            billingplace => $basket->{'billingplace'}
261
            billingplace => C4::Branch::GetBranchName( $basket->{'billingplace'} ),
262
        };
262
        };
263
        foreach(qw(
263
        foreach(qw(
264
            contractname author title publishercode collectiontitle notes
264
            contractname author title publishercode collectiontitle notes
Lines 307-312 sub GetBasketGroupAsCSV { Link Here
307
        my @orders     = GetOrders( $$basket{basketno} );
307
        my @orders     = GetOrders( $$basket{basketno} );
308
        my $contract   = GetContract( $$basket{contractnumber} );
308
        my $contract   = GetContract( $$basket{contractnumber} );
309
        my $bookseller = GetBookSellerFromId( $$basket{booksellerid} );
309
        my $bookseller = GetBookSellerFromId( $$basket{booksellerid} );
310
        my $basketgroup = GetBasketgroup( $$basket{basketgroupid} );
310
311
311
        foreach my $order (@orders) {
312
        foreach my $order (@orders) {
312
            my $bd = GetBiblioData( $order->{'biblionumber'} );
313
            my $bd = GetBiblioData( $order->{'biblionumber'} );
Lines 331-336 sub GetBasketGroupAsCSV { Link Here
331
                booksellerpostal => $bookseller->{postal},
332
                booksellerpostal => $bookseller->{postal},
332
                contractnumber => $contract->{contractnumber},
333
                contractnumber => $contract->{contractnumber},
333
                contractname => $contract->{contractname},
334
                contractname => $contract->{contractname},
335
                basketgroupdeliveryplace => C4::Branch::GetBranchName( $basketgroup->{deliveryplace} ) || C4::Branch::GetBranchName( $basketgroup->{freedeliveryplace} ),
336
                basketgroupbillingplace => C4::Branch::GetBranchName( $basketgroup->{billingplace} ),
337
                basketdeliveryplace => C4::Branch::GetBranchName( $basket->{deliveryplace} ),
338
                basketbillingplace => C4::Branch::GetBranchName( $basket->{billingplace} ),
334
            };
339
            };
335
            foreach(qw(
340
            foreach(qw(
336
                basketname author title publishercode collectiontitle notes
341
                basketname author title publishercode collectiontitle notes
(-)a/acqui/basket.pl (-2 / +4 lines)
Lines 363-368 my $total_est_gste; Link Here
363
        for my $key (keys %$basketgroup ){
363
        for my $key (keys %$basketgroup ){
364
            $basketgroup->{"basketgroup$key"} = delete $basketgroup->{$key};
364
            $basketgroup->{"basketgroup$key"} = delete $basketgroup->{$key};
365
        }
365
        }
366
        $basketgroup->{basketgroupdeliveryplace} = C4::Branch::GetBranchName( $basketgroup->{basketgroupdeliveryplace} );
367
        $basketgroup->{basketgroupbillingplace} = C4::Branch::GetBranchName( $basketgroup->{basketgroupbillingplace} );
366
        $template->param(%$basketgroup);
368
        $template->param(%$basketgroup);
367
    }
369
    }
368
    my $borrower= GetMember('borrowernumber' => $loggedinuser);
370
    my $borrower= GetMember('borrowernumber' => $loggedinuser);
Lines 393-400 my $total_est_gste; Link Here
393
        authorisedbyname     => $basket->{authorisedbyname},
395
        authorisedbyname     => $basket->{authorisedbyname},
394
        closedate            => $basket->{closedate},
396
        closedate            => $basket->{closedate},
395
        estimateddeliverydate=> $estimateddeliverydate,
397
        estimateddeliverydate=> $estimateddeliverydate,
396
        deliveryplace        => $basket->{deliveryplace} || $basket->{freedeliveryplace},
398
        deliveryplace        => C4::Branch::GetBranchName( $basket->{deliveryplace} ) || C4::Branch::GetBranchName( $basket->{freedeliveryplace} ),
397
        billingplace         => $basket->{billingplace},
399
        billingplace         => C4::Branch::GetBranchName( $basket->{billingplace} ),
398
        active               => $bookseller->{'active'},
400
        active               => $bookseller->{'active'},
399
        booksellerid         => $bookseller->{'id'},
401
        booksellerid         => $bookseller->{'id'},
400
        name                 => $bookseller->{'name'},
402
        name                 => $bookseller->{'name'},
(-)a/acqui/basketgroup.pl (-24 / +5 lines)
Lines 328-357 if ( $op eq "add" ) { Link Here
328
        my $borrower = GetMember( ( 'borrowernumber' => $loggedinuser ) );
328
        my $borrower = GetMember( ( 'borrowernumber' => $loggedinuser ) );
329
        $billingplace  = $billingplace  || $borrower->{'branchcode'};
329
        $billingplace  = $billingplace  || $borrower->{'branchcode'};
330
        $deliveryplace = $deliveryplace || $borrower->{'branchcode'};
330
        $deliveryplace = $deliveryplace || $borrower->{'branchcode'};
331
        
331
332
        my $branches = GetBranches;
332
        my $branches = C4::Branch::GetBranchesLoop( $billingplace );
333
        
333
        $template->param( billingplaceloop => $branches );
334
        # Build the combobox to select the billing place
334
        $branches = C4::Branch::GetBranchesLoop( $deliveryplace );
335
        my @billingplaceloop;
335
        $template->param( deliveryplaceloop => $branches );
336
        for (sort keys %$branches) {
337
            push @billingplaceloop, {
338
                value      => $_,
339
                selected   => $_ eq $billingplace,
340
                branchname => $branches->{$_}->{branchname},
341
            };
342
        }
343
        $template->param( billingplaceloop => \@billingplaceloop );
344
        
345
        # Build the combobox to select the delivery place
346
        my @deliveryplaceloop;
347
        for (sort keys %$branches) {
348
            push @deliveryplaceloop, {
349
                value      => $_,
350
                selected   => $_ eq $deliveryplace,
351
                branchname => $branches->{$_}->{branchname},
352
            };
353
        }
354
        $template->param( deliveryplaceloop => \@deliveryplaceloop );
355
336
356
        $template->param( booksellerid => $booksellerid );
337
        $template->param( booksellerid => $booksellerid );
357
    }
338
    }
(-)a/acqui/basketheader.pl (-45 / +4 lines)
Lines 121-170 if ( $op eq 'add_form' ) { Link Here
121
    # Build the combobox to select the billing place
121
    # Build the combobox to select the billing place
122
    my @billingplaceloop;
122
    my @billingplaceloop;
123
123
124
    # In case there's no branch selected
124
    my $branches = C4::Branch::GetBranchesLoop( $billingplace );
125
    if ($billingplace eq "NO_LIBRARY_SET") {
125
    $template->param( billingplaceloop => $branches );
126
        my %row = (
126
    $branches = C4::Branch::GetBranchesLoop( $deliveryplace );
127
          value => "",
127
    $template->param( deliveryplaceloop => $branches );
128
          selected => 1,
129
          branchname => "--",
130
        );
131
        push @billingplaceloop, \%row;
132
    }
133
134
    for ( sort keys %$branches ) {
135
        my $selected = 1 if $_ eq $billingplace;
136
        my %row = (
137
            value      => $_,
138
            selected   => $selected,
139
            branchname => $branches->{$_}->{branchname},
140
        );
141
        push @billingplaceloop, \%row;
142
    }
143
    $template->param( billingplaceloop => \@billingplaceloop );
144
145
    # Build the combobox to select the delivery place
146
    my @deliveryplaceloop;
147
148
    # In case there's no branch selected
149
    if ($deliveryplace eq "NO_LIBRARY_SET") {
150
        my %row = (
151
          value => "",
152
          selected => 1,
153
          branchname => "--",
154
        );
155
        push @deliveryplaceloop, \%row;
156
    }
157
158
    for ( sort keys %$branches ) {
159
        my $selected = 1 if $_ eq $deliveryplace;
160
        my %row = (
161
            value      => $_,
162
            selected   => $selected,
163
            branchname => $branches->{$_}->{branchname},
164
        );
165
        push @deliveryplaceloop, \%row;
166
    }
167
    $template->param( deliveryplaceloop => \@deliveryplaceloop );
168
128
169
#End Edit
129
#End Edit
170
} elsif ( $op eq 'add_validate' ) {
130
} elsif ( $op eq 'add_validate' ) {
171
- 

Return to bug 5356