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

(-)a/acqui/basket.pl (-17 / +22 lines)
Lines 473-499 sub get_order_infos { Link Here
473
        my $biblio = Koha::Biblios->find( $biblionumber );
473
        my $biblio = Koha::Biblios->find( $biblionumber );
474
        my $countbiblio = $biblio->active_orders->count;
474
        my $countbiblio = $biblio->active_orders->count;
475
475
476
        my $ordernumber = $order->{'ordernumber'};
476
        my $ordernumber       = $order->{'ordernumber'};
477
        my $cnt_subscriptions = $biblio->subscriptions->count;
477
        my $cnt_subscriptions = $biblio->subscriptions->count;
478
        my $itemcount   = $biblio->items->count;
478
        my $itemcount         = $biblio->items->count;
479
        my $holds_count = $biblio->holds->count;
479
        my $holds_count       = $biblio->holds->count;
480
        my $order = Koha::Acquisition::Orders->find($ordernumber); # FIXME We should certainly do that at the beginning of this sub
480
        my $order             = Koha::Acquisition::Orders->find($ordernumber);    # FIXME We should certainly do that at the beginning of this sub
481
        my $items = $order->items;
481
        my $items   = $order->items;
482
        my $invoice = $order->invoice;
483
482
        my $itemholds  = $biblio->holds->search({ itemnumber => { -in => [ $items->get_column('itemnumber') ] } })->count;
484
        my $itemholds  = $biblio->holds->search({ itemnumber => { -in => [ $items->get_column('itemnumber') ] } })->count;
483
485
484
        # if the biblio is not in other orders and if there is no items elsewhere and no subscriptions and no holds we can then show the link "Delete order and Biblio" see bug 5680
486
        # if the biblio is not in other orders and if there is no items elsewhere and no subscriptions and no holds we can then show the link "Delete order and Biblio" see bug 5680
485
        $line{can_del_bib}          = 1 if $countbiblio <= 1 && $itemcount == $items->count && !($cnt_subscriptions) && !($holds_count);
487
        $line{can_del_bib} = 1
486
        $line{items}                = $itemcount - $items->count;
488
            if $countbiblio <= 1 && $itemcount == $items->count && !($cnt_subscriptions) && !($holds_count);
487
        $line{left_item}            = 1 if $line{items} >= 1;
489
        $line{items}             = $itemcount - $items->count;
488
        $line{left_biblio}          = 1 if $countbiblio > 1;
490
        $line{left_item}         = 1 if $line{items} >= 1;
489
        $line{biblios}              = $countbiblio - 1;
491
        $line{left_biblio}       = 1 if $countbiblio > 1;
490
        $line{left_subscription}    = 1 if $cnt_subscriptions;
492
        $line{biblios}           = $countbiblio - 1;
491
        $line{subscriptions}        = $cnt_subscriptions;
493
        $line{left_subscription} = 1 if $cnt_subscriptions;
492
        ($holds_count >= 1) ? $line{left_holds} = 1 : $line{left_holds} = 0;
494
        $line{subscriptions}     = $cnt_subscriptions;
493
        $line{left_holds_on_order}  = 1 if $line{left_holds}==1 && ($line{items} == 0 || $itemholds );
495
        ( $holds_count >= 1 ) ? $line{left_holds} = 1 : $line{left_holds} = 0;
494
        $line{holds}                = $holds_count;
496
        $line{left_holds_on_order} = 1 if $line{left_holds} == 1 && ( $line{items} == 0 || $itemholds );
495
        $line{holds_on_order}       = $itemholds?$itemholds:$holds_count if $line{left_holds_on_order};
497
        $line{holds}               = $holds_count;
496
        $line{order_object}         = $order;
498
        $line{holds_on_order}      = $itemholds ? $itemholds : $holds_count if $line{left_holds_on_order};
499
        $line{order_object}        = $order;
500
        $line{invoice_object}      = $invoice;
501
497
    }
502
    }
498
503
499
    my $suggestion   = GetSuggestionInfoFromBiblionumber($line{biblionumber});
504
    my $suggestion   = GetSuggestionInfoFromBiblionumber($line{biblionumber});
(-)a/admin/columns_settings.yml (+2 lines)
Lines 158-163 modules: Link Here
158
            -
158
            -
159
              columnname: statistic2
159
              columnname: statistic2
160
              is_hidden: 1
160
              is_hidden: 1
161
            -
162
              columnname: invoice
161
            -
163
            -
162
              columnname: supplier_report
164
              columnname: supplier_report
163
            -
165
            -
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt (-2 / +11 lines)
Lines 478-483 Link Here
478
                                                    <th>Estimated delivery date</th>
478
                                                    <th>Estimated delivery date</th>
479
                                                    <th>Statistic 1</th>
479
                                                    <th>Statistic 1</th>
480
                                                    <th>Statistic 2</th>
480
                                                    <th>Statistic 2</th>
481
                                                    <th>Invoice</th>
481
                                                    [% IF Koha.Preference('EDIFACT') && ediaccount %]
482
                                                    [% IF Koha.Preference('EDIFACT') && ediaccount %]
482
                                                        <th>Supplier report</th>
483
                                                        <th>Supplier report</th>
483
                                                    [% END %]
484
                                                    [% END %]
Lines 510-515 Link Here
510
                                                        <th>&nbsp;</th>
511
                                                        <th>&nbsp;</th>
511
                                                        <th>&nbsp;</th>
512
                                                        <th>&nbsp;</th>
512
                                                        <th>&nbsp;</th>
513
                                                        <th>&nbsp;</th>
514
                                                        <th>&nbsp;</th>
513
                                                        [% IF Koha.Preference('EDIFACT') && ediaccount %]
515
                                                        [% IF Koha.Preference('EDIFACT') && ediaccount %]
514
                                                            <th>&nbsp;</th>
516
                                                            <th>&nbsp;</th>
515
                                                        [% END %]
517
                                                        [% END %]
Lines 540-545 Link Here
540
                                                    <th>&nbsp;</th>
542
                                                    <th>&nbsp;</th>
541
                                                    <th>&nbsp;</th>
543
                                                    <th>&nbsp;</th>
542
                                                    <th>&nbsp;</th>
544
                                                    <th>&nbsp;</th>
545
                                                    <th>&nbsp;</th>
543
                                                    [% IF Koha.Preference('EDIFACT') && ediaccount %]
546
                                                    [% IF Koha.Preference('EDIFACT') && ediaccount %]
544
                                                        <th>&nbsp;</th>
547
                                                        <th>&nbsp;</th>
545
                                                    [% END %]
548
                                                    [% END %]
Lines 662-667 Link Here
662
                                                        </td>
665
                                                        </td>
663
                                                        <td>[% books_loo.sort1 | html %]</td>
666
                                                        <td>[% books_loo.sort1 | html %]</td>
664
                                                        <td>[% books_loo.sort2 | html %]</td>
667
                                                        <td>[% books_loo.sort2 | html %]</td>
668
                                                        <td>
669
                                                            [% IF CAN_user_acquisition_edit_invoices %]
670
                                                                <a href="/cgi-bin/koha/acqui/invoice.pl?invoiceid=[% books_loo.invoice_object.invoiceid | url %]" class="invoice">[% books_loo.invoice_object.invoicenumber | html %]</a>
671
                                                            [% ELSE %]
672
                                                                [% books_loo.invoice_object.invoicenumber | html %]
673
                                                            [% END %]
674
                                                        </td>
665
                                                        [% IF Koha.Preference('EDIFACT') && ediaccount %]
675
                                                        [% IF Koha.Preference('EDIFACT') && ediaccount %]
666
                                                            <td>[% books_loo.suppliers_report | html %]</td>
676
                                                            <td>[% books_loo.suppliers_report | html %]</td>
667
                                                        [% END %]
677
                                                        [% END %]
Lines 1092-1098 Link Here
1092
            KohaTable("orders", {
1102
            KohaTable("orders", {
1093
                "sPaginationType": "full",
1103
                "sPaginationType": "full",
1094
                "autoWidth": false,
1104
                "autoWidth": false,
1095
                "exportColumns": [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17[% IF (Koha.Preference('EDIFACT') && ediaccount) %],18[% END %]],
1105
                "exportColumns": [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18[% IF (Koha.Preference('EDIFACT') && ediaccount) %],19[% END %]],
1096
            }, table_settings);
1106
            }, table_settings);
1097
1107
1098
            var cancelledorderst = $("#cancelledorderst").dataTable($.extend(true, {}, dataTablesDefaults, {
1108
            var cancelledorderst = $("#cancelledorderst").dataTable($.extend(true, {}, dataTablesDefaults, {
1099
- 

Return to bug 28449