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

(-)a/acqui/basketgroup.pl (-1 / +6 lines)
Lines 55-61 use CGI; Link Here
55
use C4::Bookseller qw/GetBookSellerFromId/;
55
use C4::Bookseller qw/GetBookSellerFromId/;
56
use C4::Acquisition qw/CloseBasketgroup ReOpenBasketgroup GetOrders GetBasketsByBasketgroup GetBasketsByBookseller ModBasketgroup NewBasketgroup DelBasketgroup GetBasketgroups ModBasket GetBasketgroup GetBasket GetBasketGroupAsCSV/;
56
use C4::Acquisition qw/CloseBasketgroup ReOpenBasketgroup GetOrders GetBasketsByBasketgroup GetBasketsByBookseller ModBasketgroup NewBasketgroup DelBasketgroup GetBasketgroups ModBasket GetBasketgroup GetBasket GetBasketGroupAsCSV/;
57
use C4::Bookseller qw/GetBookSellerFromId/;
57
use C4::Bookseller qw/GetBookSellerFromId/;
58
use C4::Branch qw/GetBranches/;
58
use C4::Branch qw/GetBranches GetBranchName/;
59
use C4::Members qw/GetMember/;
59
use C4::Members qw/GetMember/;
60
60
61
our $input=new CGI;
61
our $input=new CGI;
Lines 155-171 sub displaybasketgroups { Link Here
155
    my $baskets = shift;
155
    my $baskets = shift;
156
    if (scalar @$basketgroups != 0) {
156
    if (scalar @$basketgroups != 0) {
157
        foreach my $basketgroup (@$basketgroups){
157
        foreach my $basketgroup (@$basketgroups){
158
            $basketgroup -> {'billingplacename'} = GetBranchName($basketgroup -> {'billingplace'});
159
            $basketgroup -> {'deliveryplacename'} = GetBranchName($basketgroup -> {'deliveryplace'});
158
            my $i = 0;
160
            my $i = 0;
161
            my $basketsqty = 0;
159
            while($i < scalar(@$baskets)){
162
            while($i < scalar(@$baskets)){
160
                my $basket = @$baskets[$i];
163
                my $basket = @$baskets[$i];
161
                if($basket->{'basketgroupid'} && $basket->{'basketgroupid'} == $basketgroup->{'id'}){
164
                if($basket->{'basketgroupid'} && $basket->{'basketgroupid'} == $basketgroup->{'id'}){
162
                    $basket->{total} = BasketTotal($basket->{basketno}, $bookseller);
165
                    $basket->{total} = BasketTotal($basket->{basketno}, $bookseller);
163
                    push(@{$basketgroup->{'baskets'}}, $basket);
166
                    push(@{$basketgroup->{'baskets'}}, $basket);
164
                    splice(@$baskets, $i, 1);
167
                    splice(@$baskets, $i, 1);
168
                    ++$basketsqty;
165
                    --$i;
169
                    --$i;
166
                }
170
                }
167
                ++$i;
171
                ++$i;
168
            }
172
            }
173
            $basketgroup -> {'basketsqty'} = $basketsqty;
169
        }
174
        }
170
        $template->param(basketgroups => $basketgroups);
175
        $template->param(basketgroups => $basketgroups);
171
    }
176
    }
(-)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