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 296-302 if ( $op eq "add" ) { Link Here
296
    displaybasketgroups($basketgroups, $bookseller, $baskets);
296
    displaybasketgroups($basketgroups, $bookseller, $baskets);
297
} elsif ($op eq 'mod_basket') {
297
} elsif ($op eq 'mod_basket') {
298
#
298
#
299
# edit an individual basket contained in this basketgroup
299
# put a basket in the basketgroup and redirect to basket page (called from basket page)
300
#
300
#
301
  my $basketno=$input->param('basketno');
301
  my $basketno=$input->param('basketno');
302
  my $basketgroupid=$input->param('basketgroupid');
302
  my $basketgroupid=$input->param('basketgroupid');
Lines 345-353 if ( $op eq "add" ) { Link Here
345
    ReOpenBasketgroup($basketgroupid);
345
    ReOpenBasketgroup($basketgroupid);
346
    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';
346
    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';
347
    print $input->redirect($redirectpath);
347
    print $input->redirect($redirectpath);
348
} elsif ( $op eq 'attachbasket') {
348
} elsif ( $op eq 'save') {
349
#
349
#
350
# save a modified basketgroup, or creates a new basketgroup when a basket is closed. called from basket page
350
# saves a modified or newly created basketgroup
351
#
351
#
352
    # Getting parameters
352
    # Getting parameters
353
    my $basketgroup       = {};
353
    my $basketgroup       = {};
Lines 373-383 if ( $op eq "add" ) { Link Here
373
              closed            => $closedbg,
373
              closed            => $closedbg,
374
        };
374
        };
375
        ModBasketgroup($basketgroup);
375
        ModBasketgroup($basketgroup);
376
        if($closedbg){
377
# FIXME
378
        }
379
    }else{
376
    }else{
380
    # we create a new basketgroup (whith a closed basket)
377
    # we create a new basketgroup
381
        $basketgroup = {
378
        $basketgroup = {
382
            name              => $basketgroupname,
379
            name              => $basketgroupname,
383
            booksellerid      => $booksellerid,
380
            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