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

(-)a/acqui/basket.pl (-3 lines)
Lines 189-197 if ( $op eq 'delete_confirm' ) { Link Here
189
        address3             => $bookseller->{'address3'},
189
        address3             => $bookseller->{'address3'},
190
        address4             => $bookseller->{'address4'},
190
        address4             => $bookseller->{'address4'},
191
      );
191
      );
192
} elsif ($op eq 'attachbasket' && $template->{'VARS'}->{'CAN_user_acquisition_group_manage'} == 1) {
193
      print $query->redirect('/cgi-bin/koha/acqui/basketgroup.pl?basketno=' . $basket->{'basketno'} . '&op=attachbasket&booksellerid=' . $booksellerid);
194
    # check if we have to "close" a basket before building page
195
} elsif ($op eq 'export') {
192
} elsif ($op eq 'export') {
196
    print $query->header(
193
    print $query->header(
197
        -type       => 'text/csv',
194
        -type       => 'text/csv',
(-)a/acqui/basketgroup.pl (-9 / +6 lines)
Lines 296-309 sub printbasketgrouppdf{ Link Here
296
my $op = $input->param('op') || 'display';
296
my $op = $input->param('op') || 'display';
297
# possible values of $op :
297
# possible values of $op :
298
# - add : adds a new basketgroup, or edit an open basketgroup, or display a closed basketgroup
298
# - add : adds a new basketgroup, or edit an open basketgroup, or display a closed basketgroup
299
# - mod_basket : modify an individual basket of the basketgroup
299
# - mod_basket : puts a basket in the basketgroup and redirect to basket page (called from basket page)
300
# - validate :  FIXME dead code
300
# - validate :  FIXME dead code
301
# - closeandprint : close and print an closed basketgroup in pdf. called by clicking on "Close and print" button in closed basketgroups list
301
# - closeandprint : close and print an closed basketgroup in pdf. called by clicking on "Close and print" button in closed basketgroups list
302
# - print : print a closed basketgroup. called by clicking on "Print" button in closed basketgroups list
302
# - print : print a closed basketgroup. called by clicking on "Print" button in closed basketgroups list
303
# - export : export in CSV a closed basketgroup. called by clicking on "Export" button in closed basketgroups list
303
# - export : export in CSV a closed basketgroup. called by clicking on "Export" button in closed basketgroups list
304
# - delete : delete an open basketgroup. called by clicking on "Delete" button in open basketgroups list
304
# - delete : delete an open basketgroup. called by clicking on "Delete" button in open basketgroups list
305
# - reopen : reopen a closed basketgroup. called by clicking on "Reopen" button in closed basketgroup list
305
# - reopen : reopen a closed basketgroup. called by clicking on "Reopen" button in closed basketgroup list
306
# - attachbasket : save a modified basketgroup, or creates a new basketgroup when a basket is closed. called from basket page
306
# - save : saves a modified or newly created basketgroup
307
# - display : display the list of all basketgroups for a vendor
307
# - display : display the list of all basketgroups for a vendor
308
my $booksellerid = $input->param('booksellerid');
308
my $booksellerid = $input->param('booksellerid');
309
$template->param(booksellerid => $booksellerid);
309
$template->param(booksellerid => $booksellerid);
Lines 380-386 if ( $op eq "add" ) { Link Here
380
    displaybasketgroups($basketgroups, $bookseller, $baskets);
380
    displaybasketgroups($basketgroups, $bookseller, $baskets);
381
} elsif ($op eq 'mod_basket') {
381
} elsif ($op eq 'mod_basket') {
382
#
382
#
383
# edit an individual basket contained in this basketgroup
383
# put a basket in the basketgroup and redirect to basket page (called from basket page)
384
#
384
#
385
  my $basketno=$input->param('basketno');
385
  my $basketno=$input->param('basketno');
386
  my $basketgroupid=$input->param('basketgroupid');
386
  my $basketgroupid=$input->param('basketgroupid');
Lines 470-478 if ( $op eq "add" ) { Link Here
470
    ReOpenBasketgroup($basketgroupid);
470
    ReOpenBasketgroup($basketgroupid);
471
    my $redirectpath = ((defined $input->param('mode'))&& ($input->param('mode') eq 'singlebg')) ?'/cgi-bin/koha/acqui/basketgroup.pl?op=add&basketgroupid='.$basketgroupid.'&booksellerid='.$booksellerid : '/cgi-bin/koha/acqui/basketgroup.pl?booksellerid=' .$booksellerid.'&listclosed=1';
471
    my $redirectpath = ((defined $input->param('mode'))&& ($input->param('mode') eq 'singlebg')) ?'/cgi-bin/koha/acqui/basketgroup.pl?op=add&basketgroupid='.$basketgroupid.'&booksellerid='.$booksellerid : '/cgi-bin/koha/acqui/basketgroup.pl?booksellerid=' .$booksellerid.'&listclosed=1';
472
    print $input->redirect($redirectpath);
472
    print $input->redirect($redirectpath);
473
} elsif ( $op eq 'attachbasket') {
473
} elsif ( $op eq 'save') {
474
#
474
#
475
# save a modified basketgroup, or creates a new basketgroup when a basket is closed. called from basket page
475
# saves a modified or newly created basketgroup
476
#
476
#
477
    # Getting parameters
477
    # Getting parameters
478
    my $basketgroup       = {};
478
    my $basketgroup       = {};
Lines 498-508 if ( $op eq "add" ) { Link Here
498
              closed            => $closedbg,
498
              closed            => $closedbg,
499
        };
499
        };
500
        ModBasketgroup($basketgroup);
500
        ModBasketgroup($basketgroup);
501
        if($closedbg){
502
# FIXME
503
        }
504
    }else{
501
    }else{
505
    # we create a new basketgroup (whith a closed basket)
502
    # we create a new basketgroup
506
        $basketgroup = {
503
        $basketgroup = {
507
            name              => $basketgroupname,
504
            name              => $basketgroupname,
508
            booksellerid      => $booksellerid,
505
            booksellerid      => $booksellerid,
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt (-2 / +1 lines)
Lines 292-298 function submitForm(form) { Link Here
292
                                        [% IF ( basketgroupid ) %]
292
                                        [% IF ( basketgroupid ) %]
293
                                            <input type="hidden" name="basketgroupid" value="[% basketgroupid %]" />
293
                                            <input type="hidden" name="basketgroupid" value="[% basketgroupid %]" />
294
                                        [% END %]
294
                                        [% END %]
295
                                        <input type="hidden" name="op" value="attachbasket" />
295
                                        <input type="hidden" name="op" value="save" />
296
                                        <input type="submit" value="Save" /> <a href="/cgi-bin/koha/acqui/basketgroup.pl?booksellerid=[% booksellerid %]" class="cancel">Cancel</a>
296
                                        <input type="submit" value="Save" /> <a href="/cgi-bin/koha/acqui/basketgroup.pl?booksellerid=[% booksellerid %]" class="cancel">Cancel</a>
297
                                    </fieldset>
297
                                    </fieldset>
298
                                [% END %]
298
                                [% END %]
299
- 

Return to bug 11433