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

(-)a/acqui/basket.pl (-1 / +3 lines)
Lines 206-218 if ( $op eq 'delete_confirm' ) { Link Here
206
        }
206
        }
207
    }
207
    }
208
#if the basket is closed,and the user has the permission to edit basketgroups, display a list of basketgroups
208
#if the basket is closed,and the user has the permission to edit basketgroups, display a list of basketgroups
209
    my $basketgroups;
209
    my ($basketgroup, $basketgroups);
210
    my $member = GetMember(borrowernumber => $loggedinuser);
210
    my $member = GetMember(borrowernumber => $loggedinuser);
211
    if ($basket->{closedate} && haspermission({ acquisition => 'group_manage'} )) {
211
    if ($basket->{closedate} && haspermission({ acquisition => 'group_manage'} )) {
212
        $basketgroups = GetBasketgroups($basket->{booksellerid});
212
        $basketgroups = GetBasketgroups($basket->{booksellerid});
213
        for my $bg ( @{$basketgroups} ) {
213
        for my $bg ( @{$basketgroups} ) {
214
            if ($basket->{basketgroupid} && $basket->{basketgroupid} == $bg->{id}){
214
            if ($basket->{basketgroupid} && $basket->{basketgroupid} == $bg->{id}){
215
                $bg->{default} = 1;
215
                $bg->{default} = 1;
216
                $basketgroup = $bg;
216
            }
217
            }
217
        }
218
        }
218
        my %emptygroup = ( id   =>   undef,
219
        my %emptygroup = ( id   =>   undef,
Lines 339-344 if ( $op eq 'delete_confirm' ) { Link Here
339
        currency             => $cur->{'currency'},
340
        currency             => $cur->{'currency'},
340
        listincgst           => $bookseller->{listincgst},
341
        listincgst           => $bookseller->{listincgst},
341
        basketgroups         => $basketgroups,
342
        basketgroups         => $basketgroups,
343
        basketgroup          => $basketgroup,
342
        grouped              => $basket->{basketgroupid},
344
        grouped              => $basket->{basketgroupid},
343
        unclosable           => @orders ? 0 : 1, 
345
        unclosable           => @orders ? 0 : 1, 
344
        has_budgets          => $has_budgets,
346
        has_budgets          => $has_budgets,
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt (-18 / +31 lines)
Lines 232-255 Link Here
232
                [% IF ( closedate ) %]
232
                [% IF ( closedate ) %]
233
                <div class="yui-u">
233
                <div class="yui-u">
234
                    <form action="/cgi-bin/koha/acqui/basketgroup.pl" method="post">
234
                    <form action="/cgi-bin/koha/acqui/basketgroup.pl" method="post">
235
                        <p>
236
                          <label for="basketgroupid"><strong>Basket group:</strong></label>
237
                          [% IF basketgroup.closed %]
238
                            [% basketgroup.name %] (closed)
239
                          [% ELSE %]
240
                            </p>
241
                            <p>
242
                            <select id="basketgroupid" name="basketgroupid">
243
                              <option value="new">Add new group</option>
244
                              [% FOREACH bg IN basketgroups %]
245
                                [% IF ( bg.default ) %]
246
                                    <option value="[% bg.id %]" selected="selected">[% bg.name %]</option>
247
                                [% ELSE %]
248
                                  [% UNLESS bg.closed %]
249
                                    <option value="[% bg.id %]">[% bg.name %]</option>
250
                                  [% ELSE %]
251
                                    <option value="[% bg.id %]" disabled="disabled">[% bg.name %] (closed)</option>
252
                                  [% END %]
253
                                [% END %]
254
                              [% END %]
255
                            </select>
256
                          [% END %]
257
                        </p>
235
258
236
                        <p><label for="basketgroupid"><strong>Basket group:</strong></label></p>
259
                        [% UNLESS basketgroup.closed %]
237
                        <p><select id="basketgroupid" name="basketgroupid">
260
                          <p>
238
                            <option value="new">Add new group</option>
261
                            <input type="hidden" id="basketno" value="[% basketno %]" name="basketno" />
239
                                                    [% FOREACH basketgroup IN basketgroups %]
262
                            <input type="hidden" value="mod_basket" name="op" />
240
                                                        [% IF ( basketgroup.default ) %]
263
                            <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
241
                            <option value="[% basketgroup.id %]" selected="selected">[% basketgroup.name %]</option>
264
                            <input type="submit" value="Change basket group" />
242
                                                        [% ELSE %]
265
                          </p>
243
                            <option value="[% basketgroup.id %]">[% basketgroup.name %]</option>
266
                        [% END %]
244
                                                        [% END %]
245
                                                    [% END %]
246
                        </select></p>
247
248
                        <p><input type="hidden" id="basketno" value="[% basketno %]" name="basketno" />
249
                        <input type="hidden" value="mod_basket" name="op" />
250
                        <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
251
                        <input type="submit" value="Change basket group" /></p>
252
253
                    </form>
267
                    </form>
254
                    [% IF ( basketgroupdeliveryplace ) %]<p>Basket group delivery place: [% basketgroupdeliveryplace %]</p>[% END %]
268
                    [% IF ( basketgroupdeliveryplace ) %]<p>Basket group delivery place: [% basketgroupdeliveryplace %]</p>[% END %]
255
                    [% IF ( basketgroupbillingplace ) %]<p>Basket group billing place: [% basketgroupbillingplace %]</p>[% END %]
269
                    [% IF ( basketgroupbillingplace ) %]<p>Basket group billing place: [% basketgroupbillingplace %]</p>[% END %]
256
- 

Return to bug 7358