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

(-)a/acqui/basketgroup.pl (-4 lines)
Lines 414-431 if ( $op eq "add" ) { Link Here
414
        foreach my $basketgroup (@{ $bookseller->{basketgroups} }) {
414
        foreach my $basketgroup (@{ $bookseller->{basketgroups} }) {
415
            my $baskets = GetBasketsByBasketgroup($basketgroup->{id});
415
            my $baskets = GetBasketsByBasketgroup($basketgroup->{id});
416
            $basketgroup->{basketsqty} = 0;
416
            $basketgroup->{basketsqty} = 0;
417
            $basketgroup->{ordered_amount} = 0.0;
418
            $basketgroup->{charged_amount} = 0.0;
419
            my (@ordered_biblionumbers, @received_biblionumbers);
417
            my (@ordered_biblionumbers, @received_biblionumbers);
420
            foreach my $basket (@$baskets) {
418
            foreach my $basket (@$baskets) {
421
                $basketgroup->{basketsqty} += 1;
419
                $basketgroup->{basketsqty} += 1;
422
                my @orders = GetOrders($basket->{basketno});
420
                my @orders = GetOrders($basket->{basketno});
423
                foreach my $order (@orders) {
421
                foreach my $order (@orders) {
424
                    push @ordered_biblionumbers, $order->{biblionumber};
422
                    push @ordered_biblionumbers, $order->{biblionumber};
425
                    $basketgroup->{ordered_amount} += $order->{ecost} * $order->{quantity};
426
                    if ($order->{datereceived}) {
423
                    if ($order->{datereceived}) {
427
                        push @received_biblionumbers, $order->{biblionumber};
424
                        push @received_biblionumbers, $order->{biblionumber};
428
                        $basketgroup->{charged_amount} += $order->{ecost} * $order->{quantity};
429
                    }
425
                    }
430
                }
426
                }
431
            }
427
            }
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt (-15 lines)
Lines 126-133 function submitForm(form) { Link Here
126
          { type: "text" },
126
          { type: "text" },
127
          { type: "text" },
127
          { type: "text" },
128
          { type: "text" },
128
          { type: "text" },
129
          null,
130
          null,
131
          null
129
          null
132
        ]
130
        ]
133
      };
131
      };
Lines 359-366 function submitForm(form) { Link Here
359
                                                <th>Search no. of ordered titles</th>
357
                                                <th>Search no. of ordered titles</th>
360
                                                <th>Search no. of received titles</th>
358
                                                <th>Search no. of received titles</th>
361
                                                <th></th>
359
                                                <th></th>
362
                                                <th></th>
363
                                                <th></th>
364
                                            </tr>
360
                                            </tr>
365
                                            <tr>
361
                                            <tr>
366
                                                <th>Name</th>
362
                                                <th>Name</th>
Lines 370-377 function submitForm(form) { Link Here
370
                                                <th>No. of baskets</th>
366
                                                <th>No. of baskets</th>
371
                                                <th>No. of ordered titles</th>
367
                                                <th>No. of ordered titles</th>
372
                                                <th>No. of received titles</th>
368
                                                <th>No. of received titles</th>
373
                                                <th>Amount ordered</th>
374
                                                <th>Amount spent</th>
375
                                                <th>Action</th>
369
                                                <th>Action</th>
376
                                            </tr>
370
                                            </tr>
377
                                        </thead>
371
                                        </thead>
Lines 392-399 function submitForm(form) { Link Here
392
                                                        <td>[% basketgroup.basketsqty %]</td>
386
                                                        <td>[% basketgroup.basketsqty %]</td>
393
                                                        <td>[% basketgroup.ordered_titles_count %]</td>
387
                                                        <td>[% basketgroup.ordered_titles_count %]</td>
394
                                                        <td>[% basketgroup.received_titles_count %]</td>
388
                                                        <td>[% basketgroup.received_titles_count %]</td>
395
                                                        <td>[% basketgroup.ordered_amount %]</td>
396
                                                        <td>[% basketgroup.charged_amount %]</td>
397
                                                        <td>
389
                                                        <td>
398
                                                            <input type="button" onclick="closeandprint('[% basketgroup.id %]');" value="Close and print" />
390
                                                            <input type="button" onclick="closeandprint('[% basketgroup.id %]');" value="Close and print" />
399
                                                            <form action="/cgi-bin/koha/acqui/basketgroup.pl" method="get"><input type="hidden" name="op" value="add" /><input type="hidden" name="booksellerid" value="[% basketgroup.booksellerid %]" /><input type="hidden" name="basketgroupid" value="[% basketgroup.id %]" /><input type="submit" value="Edit" /></form>
391
                                                            <form action="/cgi-bin/koha/acqui/basketgroup.pl" method="get"><input type="hidden" name="op" value="add" /><input type="hidden" name="booksellerid" value="[% basketgroup.booksellerid %]" /><input type="hidden" name="basketgroupid" value="[% basketgroup.id %]" /><input type="submit" value="Edit" /></form>
Lines 418-425 function submitForm(form) { Link Here
418
                                                <th>Search no. of ordered titles</th>
410
                                                <th>Search no. of ordered titles</th>
419
                                                <th>Search no. of received titles</th>
411
                                                <th>Search no. of received titles</th>
420
                                                <th></th>
412
                                                <th></th>
421
                                                <th></th>
422
                                                <th></th>
423
                                            </tr>
413
                                            </tr>
424
                                            <tr>
414
                                            <tr>
425
                                                <th>Name</th>
415
                                                <th>Name</th>
Lines 430-437 function submitForm(form) { Link Here
430
                                                <th>No. of baskets</th>
420
                                                <th>No. of baskets</th>
431
                                                <th>No. of ordered titles</th>
421
                                                <th>No. of ordered titles</th>
432
                                                <th>No. of received titles</th>
422
                                                <th>No. of received titles</th>
433
                                                <th>Amount ordered</th>
434
                                                <th>Amount spent</th>
435
                                                <th>Action</th>
423
                                                <th>Action</th>
436
                                            </tr>
424
                                            </tr>
437
                                        </thead>
425
                                        </thead>
Lines 453-460 function submitForm(form) { Link Here
453
                                                        <td>[% basketgroup.basketsqty %]</td>
441
                                                        <td>[% basketgroup.basketsqty %]</td>
454
                                                        <td>[% basketgroup.ordered_titles_count %]</td>
442
                                                        <td>[% basketgroup.ordered_titles_count %]</td>
455
                                                        <td>[% basketgroup.received_titles_count %]</td>
443
                                                        <td>[% basketgroup.received_titles_count %]</td>
456
                                                        <td>[% basketgroup.ordered_amount %]</td>
457
                                                        <td>[% basketgroup.charged_amount %]</td>
458
                                                        <td>
444
                                                        <td>
459
                                                            <form action="/cgi-bin/koha/acqui/basketgroup.pl" method="get"><input type="hidden" name="op" value="add" /><input type="hidden" name="booksellerid" value="[% basketgroup.booksellerid %]" /><input type="hidden" name="basketgroupid" value="[% basketgroup.id %]" /><input type="submit" value="View" /></form>
445
                                                            <form action="/cgi-bin/koha/acqui/basketgroup.pl" method="get"><input type="hidden" name="op" value="add" /><input type="hidden" name="booksellerid" value="[% basketgroup.booksellerid %]" /><input type="hidden" name="basketgroupid" value="[% basketgroup.id %]" /><input type="submit" value="View" /></form>
460
                                                            <form action="/cgi-bin/koha/acqui/basketgroup.pl" method="get"><input type="hidden" name="op" value="reopen" /><input type="hidden" name="booksellerid" value="[% basketgroup.booksellerid %]" /><input type="hidden" name="basketgroupid" value="[% basketgroup.id %]" /><input type="submit" value="Reopen" /></form>
446
                                                            <form action="/cgi-bin/koha/acqui/basketgroup.pl" method="get"><input type="hidden" name="op" value="reopen" /><input type="hidden" name="booksellerid" value="[% basketgroup.booksellerid %]" /><input type="hidden" name="basketgroupid" value="[% basketgroup.id %]" /><input type="submit" value="Reopen" /></form>
461
- 

Return to bug 11708