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 233-245 sub printbasketgrouppdf{ Link Here
233
my $op = $input->param('op') || 'display';
233
my $op = $input->param('op') || 'display';
234
# possible values of $op :
234
# possible values of $op :
235
# - add : adds a new basketgroup, or edit an open basketgroup, or display a closed basketgroup
235
# - add : adds a new basketgroup, or edit an open basketgroup, or display a closed basketgroup
236
# - mod_basket : modify an individual basket of the basketgroup
236
# - mod_basket : puts a basket in the basketgroup and redirect to basket page (called from basket page)
237
# - closeandprint : close and print an closed basketgroup in pdf. called by clicking on "Close and print" button in closed basketgroups list
237
# - closeandprint : close and print an closed basketgroup in pdf. called by clicking on "Close and print" button in closed basketgroups list
238
# - print : print a closed basketgroup. called by clicking on "Print" button in closed basketgroups list
238
# - print : print a closed basketgroup. called by clicking on "Print" button in closed basketgroups list
239
# - export : export in CSV a closed basketgroup. called by clicking on "Export" button in closed basketgroups list
239
# - export : export in CSV a closed basketgroup. called by clicking on "Export" button in closed basketgroups list
240
# - delete : delete an open basketgroup. called by clicking on "Delete" button in open basketgroups list
240
# - delete : delete an open basketgroup. called by clicking on "Delete" button in open basketgroups list
241
# - reopen : reopen a closed basketgroup. called by clicking on "Reopen" button in closed basketgroup list
241
# - reopen : reopen a closed basketgroup. called by clicking on "Reopen" button in closed basketgroup list
242
# - attachbasket : save a modified basketgroup, or creates a new basketgroup when a basket is closed. called from basket page
242
# - save : saves a modified or newly created basketgroup
243
# - display : display the list of all basketgroups for a vendor
243
# - display : display the list of all basketgroups for a vendor
244
my $booksellerid = $input->param('booksellerid');
244
my $booksellerid = $input->param('booksellerid');
245
$template->param(booksellerid => $booksellerid);
245
$template->param(booksellerid => $booksellerid);
Lines 316-322 if ( $op eq "add" ) { Link Here
316
    displaybasketgroups($basketgroups, $bookseller, $baskets);
316
    displaybasketgroups($basketgroups, $bookseller, $baskets);
317
} elsif ($op eq 'mod_basket') {
317
} elsif ($op eq 'mod_basket') {
318
#
318
#
319
# edit an individual basket contained in this basketgroup
319
# put a basket in the basketgroup and redirect to basket page (called from basket page)
320
#
320
#
321
  my $basketno=$input->param('basketno');
321
  my $basketno=$input->param('basketno');
322
  my $basketgroupid=$input->param('basketgroupid');
322
  my $basketgroupid=$input->param('basketgroupid');
Lines 365-373 if ( $op eq "add" ) { Link Here
365
    ReOpenBasketgroup($basketgroupid);
365
    ReOpenBasketgroup($basketgroupid);
366
    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';
366
    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';
367
    print $input->redirect($redirectpath);
367
    print $input->redirect($redirectpath);
368
} elsif ( $op eq 'attachbasket') {
368
} elsif ( $op eq 'save') {
369
#
369
#
370
# save a modified basketgroup, or creates a new basketgroup when a basket is closed. called from basket page
370
# saves a modified or newly created basketgroup
371
#
371
#
372
    # Getting parameters
372
    # Getting parameters
373
    my $basketgroup       = {};
373
    my $basketgroup       = {};
Lines 393-403 if ( $op eq "add" ) { Link Here
393
              closed            => $closedbg,
393
              closed            => $closedbg,
394
        };
394
        };
395
        ModBasketgroup($basketgroup);
395
        ModBasketgroup($basketgroup);
396
        if($closedbg){
397
# FIXME
398
        }
399
    }else{
396
    }else{
400
    # we create a new basketgroup (whith a closed basket)
397
    # we create a new basketgroup
401
        $basketgroup = {
398
        $basketgroup = {
402
            name              => $basketgroupname,
399
            name              => $basketgroupname,
403
            booksellerid      => $booksellerid,
400
            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