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

(-)a/acqui/basketgroup.pl (-1 / +6 lines)
Lines 56-62 use C4::Bookseller qw/GetBookSellerFromId/; Link Here
56
use C4::Budgets qw/ConvertCurrency/;
56
use C4::Budgets qw/ConvertCurrency/;
57
use C4::Acquisition qw/CloseBasketgroup ReOpenBasketgroup GetOrders GetBasketsByBasketgroup GetBasketsByBookseller ModBasketgroup NewBasketgroup DelBasketgroup GetBasketgroups ModBasket GetBasketgroup GetBasket GetBasketGroupAsCSV/;
57
use C4::Acquisition qw/CloseBasketgroup ReOpenBasketgroup GetOrders GetBasketsByBasketgroup GetBasketsByBookseller ModBasketgroup NewBasketgroup DelBasketgroup GetBasketgroups ModBasket GetBasketgroup GetBasket GetBasketGroupAsCSV/;
58
use C4::Bookseller qw/GetBookSellerFromId/;
58
use C4::Bookseller qw/GetBookSellerFromId/;
59
use C4::Branch qw/GetBranches/;
59
use C4::Branch qw/GetBranches GetBranchName/;
60
use C4::Members qw/GetMember/;
60
use C4::Members qw/GetMember/;
61
61
62
our $input=new CGI;
62
our $input=new CGI;
Lines 156-172 sub displaybasketgroups { Link Here
156
    my $baskets = shift;
156
    my $baskets = shift;
157
    if (scalar @$basketgroups != 0) {
157
    if (scalar @$basketgroups != 0) {
158
        foreach my $basketgroup (@$basketgroups){
158
        foreach my $basketgroup (@$basketgroups){
159
            $basketgroup -> {'billingplacename'} = GetBranchName($basketgroup -> {'billingplace'});
160
            $basketgroup -> {'deliveryplacename'} = GetBranchName($basketgroup -> {'deliveryplace'});
159
            my $i = 0;
161
            my $i = 0;
162
            my $basketsqty = 0;
160
            while($i < scalar(@$baskets)){
163
            while($i < scalar(@$baskets)){
161
                my $basket = @$baskets[$i];
164
                my $basket = @$baskets[$i];
162
                if($basket->{'basketgroupid'} && $basket->{'basketgroupid'} == $basketgroup->{'id'}){
165
                if($basket->{'basketgroupid'} && $basket->{'basketgroupid'} == $basketgroup->{'id'}){
163
                    $basket->{total} = BasketTotal($basket->{basketno}, $bookseller);
166
                    $basket->{total} = BasketTotal($basket->{basketno}, $bookseller);
164
                    push(@{$basketgroup->{'baskets'}}, $basket);
167
                    push(@{$basketgroup->{'baskets'}}, $basket);
165
                    splice(@$baskets, $i, 1);
168
                    splice(@$baskets, $i, 1);
169
                    ++$basketsqty;
166
                    --$i;
170
                    --$i;
167
                }
171
                }
168
                ++$i;
172
                ++$i;
169
            }
173
            }
174
            $basketgroup -> {'basketsqty'} = $basketsqty;
170
        }
175
        }
171
        $template->param(basketgroups => $basketgroups);
176
        $template->param(basketgroups => $basketgroups);
172
    }
177
    }
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt (-3 / +20 lines)
Lines 246-252 function submitForm(form) { Link Here
246
        <table id="basket_group_opened">
246
        <table id="basket_group_opened">
247
			<thead>
247
			<thead>
248
				<tr>
248
				<tr>
249
                    <th>Basket group</th><th>Action</th>
249
                                        <th>Name</th>
250
                                        <th>Number</th>
251
                                        <th>Billing place</th>
252
                                        <th>Delivery place</th>
253
                                        <th>Number of baskets</th>
254
                                        <th>Action</th>
250
				</tr>
255
				</tr>
251
			</thead>
256
			</thead>
252
			<tbody>
257
			<tbody>
Lines 259-264 function submitForm(form) { Link Here
259
													Basket group no. [% basketgroup.id %]
264
													Basket group no. [% basketgroup.id %]
260
												[% END %]
265
												[% END %]
261
						</td>
266
						</td>
267
                                    <td>[% basketgroup.id %]</td>
268
                                    <td>[% basketgroup.billingplacename %]</td>
269
                                    <td>[% IF (basketgroup.freedeliveryplace) %]Free delivery place[% ELSE %][% basketgroup.deliveryplacename %][% END %]</td>
270
                                    <td>[% basketgroup.basketsqty %]</td>
262
							<td>
271
							<td>
263
								<input type="button" onclick="closeandprint([% basketgroup.id %])" value="Close and print" />
272
								<input type="button" onclick="closeandprint([% basketgroup.id %])" value="Close and print" />
264
								<form action="/cgi-bin/koha/acqui/basketgroup.pl" method="get"><input type="hidden" name="op" value="add" /><input type="hidden" name="booksellerid" value="[% basketgroup.booksellerid %]" /><input type="hidden" name="basketgroupid" value="[% basketgroup.id %]" /><input type="submit" value="Edit" /></form>
273
								<form action="/cgi-bin/koha/acqui/basketgroup.pl" method="get"><input type="hidden" name="op" value="add" /><input type="hidden" name="booksellerid" value="[% basketgroup.booksellerid %]" /><input type="hidden" name="basketgroupid" value="[% basketgroup.id %]" /><input type="submit" value="Edit" /></form>
Lines 274-280 function submitForm(form) { Link Here
274
        <table id="basket_group_closed">
283
        <table id="basket_group_closed">
275
			<thead>
284
			<thead>
276
				<tr>
285
				<tr>
277
                    <th>Basket group</th><th>Action</th>
286
                                        <th>Name</th>
287
                                        <th>Number</th>
288
                                        <th>Billing place</th>
289
                                        <th>Delivery place</th>
290
                                        <th>Number of baskets</th>
291
                                        <th>Action</th>
278
				</tr>
292
				</tr>
279
			</thead>
293
			</thead>
280
			<tbody>
294
			<tbody>
Lines 288-293 function submitForm(form) { Link Here
288
											Basket group no. [% basketgroup.id %]
302
											Basket group no. [% basketgroup.id %]
289
										[% END %]
303
										[% END %]
290
					</td>
304
					</td>
305
                                    <td>[% basketgroup.id %]</td>
306
                                    <td>[% basketgroup.billingplacename %]</td>
307
                                    <td>[% IF (basketgroup.freedeliveryplace) %]Free delivery place[% ELSE %][% basketgroup.deliveryplacename %][% END %]</td>
308
                                    <td>[% basketgroup.basketsqty %]</td>
291
					<td>
309
					<td>
292
							<form action="/cgi-bin/koha/acqui/basketgroup.pl" method="get"><input type="hidden" name="op" value="reopen" /><input type="hidden" name="booksellerid" value="[% basketgroup.booksellerid %]" /><input type="hidden" name="basketgroupid" value="[% basketgroup.id %]" /><input type="submit" value="Reopen" /></form>
310
							<form action="/cgi-bin/koha/acqui/basketgroup.pl" method="get"><input type="hidden" name="op" value="reopen" /><input type="hidden" name="booksellerid" value="[% basketgroup.booksellerid %]" /><input type="hidden" name="basketgroupid" value="[% basketgroup.id %]" /><input type="submit" value="Reopen" /></form>
293
							<form action="/cgi-bin/koha/acqui/basketgroup.pl" method="get"><input type="hidden" name="op" value="print" /><input type="hidden" name="basketgroupid" value="[% basketgroup.id %]" /><input type="submit" value="Print" /></form>
311
							<form action="/cgi-bin/koha/acqui/basketgroup.pl" method="get"><input type="hidden" name="op" value="print" /><input type="hidden" name="basketgroupid" value="[% basketgroup.id %]" /><input type="submit" value="Print" /></form>
294
- 

Return to bug 9806