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

(-)a/acqui/basket.pl (-1 / +3 lines)
Lines 204-216 if ( $op eq 'delete_confirm' ) { Link Here
204
        }
204
        }
205
    }
205
    }
206
#if the basket is closed,and the user has the permission to edit basketgroups, display a list of basketgroups
206
#if the basket is closed,and the user has the permission to edit basketgroups, display a list of basketgroups
207
    my $basketgroups;
207
    my ($basketgroup, $basketgroups);
208
    my $member = GetMember(borrowernumber => $loggedinuser);
208
    my $member = GetMember(borrowernumber => $loggedinuser);
209
    if ($basket->{closedate} && haspermission({ acquisition => 'group_manage'} )) {
209
    if ($basket->{closedate} && haspermission({ acquisition => 'group_manage'} )) {
210
        $basketgroups = GetBasketgroups($basket->{booksellerid});
210
        $basketgroups = GetBasketgroups($basket->{booksellerid});
211
        for my $bg ( @{$basketgroups} ) {
211
        for my $bg ( @{$basketgroups} ) {
212
            if ($basket->{basketgroupid} && $basket->{basketgroupid} == $bg->{id}){
212
            if ($basket->{basketgroupid} && $basket->{basketgroupid} == $bg->{id}){
213
                $bg->{default} = 1;
213
                $bg->{default} = 1;
214
                $basketgroup = $bg;
214
            }
215
            }
215
        }
216
        }
216
        my %emptygroup = ( id   =>   undef,
217
        my %emptygroup = ( id   =>   undef,
Lines 404-409 my $total_est_gste; Link Here
404
        qty_total            => $qty_total,
405
        qty_total            => $qty_total,
405
        GST                  => $gist,
406
        GST                  => $gist,
406
        basketgroups         => $basketgroups,
407
        basketgroups         => $basketgroups,
408
        basketgroup          => $basketgroup,
407
        grouped              => $basket->{basketgroupid},
409
        grouped              => $basket->{basketgroupid},
408
        unclosable           => @orders ? 0 : 1, 
410
        unclosable           => @orders ? 0 : 1, 
409
        has_budgets          => $has_budgets,
411
        has_budgets          => $has_budgets,
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt (-18 / +31 lines)
Lines 202-225 Link Here
202
                [% IF ( closedate ) %]
202
                [% IF ( closedate ) %]
203
                <div class="yui-u">
203
                <div class="yui-u">
204
                    <form action="/cgi-bin/koha/acqui/basketgroup.pl" method="post">
204
                    <form action="/cgi-bin/koha/acqui/basketgroup.pl" method="post">
205
                        <p>
206
                          <label for="basketgroupid"><strong>Basket group:</strong></label>
207
                          [% IF basketgroup.closed %]
208
                            [% basketgroup.name %] (closed)
209
                          [% ELSE %]
210
                            </p>
211
                            <p>
212
                            <select id="basketgroupid" name="basketgroupid">
213
                              <option value="new">Add new group</option>
214
                              [% FOREACH bg IN basketgroups %]
215
                                [% IF ( bg.default ) %]
216
                                    <option value="[% bg.id %]" selected="selected">[% bg.name %]</option>
217
                                [% ELSE %]
218
                                  [% UNLESS bg.closed %]
219
                                    <option value="[% bg.id %]">[% bg.name %]</option>
220
                                  [% ELSE %]
221
                                    <option value="[% bg.id %]" disabled="disabled">[% bg.name %] (closed)</option>
222
                                  [% END %]
223
                                [% END %]
224
                              [% END %]
225
                            </select>
226
                          [% END %]
227
                        </p>
205
228
206
                        <p><label for="basketgroupid"><strong>Basket group:</strong></label></p>
229
                        [% UNLESS basketgroup.closed %]
207
                        <p><select id="basketgroupid" name="basketgroupid">
230
                          <p>
208
                            <option value="new">Add new group</option>
231
                            <input type="hidden" id="basketno" value="[% basketno %]" name="basketno" />
209
                                                    [% FOREACH basketgroup IN basketgroups %]
232
                            <input type="hidden" value="mod_basket" name="op" />
210
                                                        [% IF ( basketgroup.default ) %]
233
                            <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
211
                            <option value="[% basketgroup.id %]" selected="selected">[% basketgroup.name %]</option>
234
                            <input type="submit" value="Change basket group" />
212
                                                        [% ELSE %]
235
                          </p>
213
                            <option value="[% basketgroup.id %]">[% basketgroup.name %]</option>
236
                        [% END %]
214
                                                        [% END %]
215
                                                    [% END %]
216
                        </select></p>
217
218
                        <p><input type="hidden" id="basketno" value="[% basketno %]" name="basketno" />
219
                        <input type="hidden" value="mod_basket" name="op" />
220
                        <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
221
                        <input type="submit" value="Change basket group" /></p>
222
223
                    </form>
237
                    </form>
224
                </div>
238
                </div>
225
                [% END %]
239
                [% END %]
226
- 

Return to bug 7358