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 360-367 function submitForm(form) { Link Here
360
                                                <th>Search no. of ordered titles</th>
358
                                                <th>Search no. of ordered titles</th>
361
                                                <th>Search no. of received titles</th>
359
                                                <th>Search no. of received titles</th>
362
                                                <th></th>
360
                                                <th></th>
363
                                                <th></th>
364
                                                <th></th>
365
                                            </tr>
361
                                            </tr>
366
                                            <tr>
362
                                            <tr>
367
                                                <th>Name</th>
363
                                                <th>Name</th>
Lines 371-378 function submitForm(form) { Link Here
371
                                                <th>No. of baskets</th>
367
                                                <th>No. of baskets</th>
372
                                                <th>No. of ordered titles</th>
368
                                                <th>No. of ordered titles</th>
373
                                                <th>No. of received titles</th>
369
                                                <th>No. of received titles</th>
374
                                                <th>Amount ordered</th>
375
                                                <th>Amount spent</th>
376
                                                <th>Action</th>
370
                                                <th>Action</th>
377
                                            </tr>
371
                                            </tr>
378
                                        </thead>
372
                                        </thead>
Lines 393-400 function submitForm(form) { Link Here
393
                                                        <td>[% basketgroup.basketsqty %]</td>
387
                                                        <td>[% basketgroup.basketsqty %]</td>
394
                                                        <td>[% basketgroup.ordered_titles_count %]</td>
388
                                                        <td>[% basketgroup.ordered_titles_count %]</td>
395
                                                        <td>[% basketgroup.received_titles_count %]</td>
389
                                                        <td>[% basketgroup.received_titles_count %]</td>
396
                                                        <td>[% basketgroup.ordered_amount %]</td>
397
                                                        <td>[% basketgroup.charged_amount %]</td>
398
                                                        <td>
390
                                                        <td>
399
                                                            <input type="button" onclick="closeandprint('[% basketgroup.id %]');" value="Close and print" />
391
                                                            <input type="button" onclick="closeandprint('[% basketgroup.id %]');" value="Close and print" />
400
                                                            <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>
392
                                                            <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 419-426 function submitForm(form) { Link Here
419
                                                <th>Search no. of ordered titles</th>
411
                                                <th>Search no. of ordered titles</th>
420
                                                <th>Search no. of received titles</th>
412
                                                <th>Search no. of received titles</th>
421
                                                <th></th>
413
                                                <th></th>
422
                                                <th></th>
423
                                                <th></th>
424
                                            </tr>
414
                                            </tr>
425
                                            <tr>
415
                                            <tr>
426
                                                <th>Name</th>
416
                                                <th>Name</th>
Lines 431-438 function submitForm(form) { Link Here
431
                                                <th>No. of baskets</th>
421
                                                <th>No. of baskets</th>
432
                                                <th>No. of ordered titles</th>
422
                                                <th>No. of ordered titles</th>
433
                                                <th>No. of received titles</th>
423
                                                <th>No. of received titles</th>
434
                                                <th>Amount ordered</th>
435
                                                <th>Amount spent</th>
436
                                                <th>Action</th>
424
                                                <th>Action</th>
437
                                            </tr>
425
                                            </tr>
438
                                        </thead>
426
                                        </thead>
Lines 454-461 function submitForm(form) { Link Here
454
                                                        <td>[% basketgroup.basketsqty %]</td>
442
                                                        <td>[% basketgroup.basketsqty %]</td>
455
                                                        <td>[% basketgroup.ordered_titles_count %]</td>
443
                                                        <td>[% basketgroup.ordered_titles_count %]</td>
456
                                                        <td>[% basketgroup.received_titles_count %]</td>
444
                                                        <td>[% basketgroup.received_titles_count %]</td>
457
                                                        <td>[% basketgroup.ordered_amount %]</td>
458
                                                        <td>[% basketgroup.charged_amount %]</td>
459
                                                        <td>
445
                                                        <td>
460
                                                            <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>
446
                                                            <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>
461
                                                            <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>
447
                                                            <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>
462
- 

Return to bug 11708