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 152-157 modules: Link Here
152
              columnname: fund
152
              columnname: fund
153
            -
153
            -
154
              columnname: estimated_delivery_date
154
              columnname: estimated_delivery_date
155
            -
156
              columnname: invoice
155
            -
157
            -
156
              columnname: supplier_report
158
              columnname: supplier_report
157
            -
159
            -
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt (-1 / +10 lines)
Lines 472-477 Link Here
472
                                                    <th>GST</th>
472
                                                    <th>GST</th>
473
                                                    <th>Fund</th>
473
                                                    <th>Fund</th>
474
                                                    <th>Estimated delivery date</th>
474
                                                    <th>Estimated delivery date</th>
475
                                                    <th>Invoice</th>
475
                                                    [% IF Koha.Preference('EDIFACT') && ediaccount %]
476
                                                    [% IF Koha.Preference('EDIFACT') && ediaccount %]
476
                                                        <th>Supplier report</th>
477
                                                        <th>Supplier report</th>
477
                                                    [% END %]
478
                                                    [% END %]
Lines 502-507 Link Here
502
                                                        <th>[% foot_loo.tax_value | $Price %]</th>
503
                                                        <th>[% foot_loo.tax_value | $Price %]</th>
503
                                                        <th>&nbsp;</th>
504
                                                        <th>&nbsp;</th>
504
                                                        <th>&nbsp;</th>
505
                                                        <th>&nbsp;</th>
506
                                                        <th>&nbsp;</th>
505
                                                        [% IF Koha.Preference('EDIFACT') && ediaccount %]
507
                                                        [% IF Koha.Preference('EDIFACT') && ediaccount %]
506
                                                            <th>&nbsp;</th>
508
                                                            <th>&nbsp;</th>
507
                                                        [% END %]
509
                                                        [% END %]
Lines 530-535 Link Here
530
                                                    <th>[% total_tax_value | $Price %]</th>
532
                                                    <th>[% total_tax_value | $Price %]</th>
531
                                                    <th>&nbsp;</th>
533
                                                    <th>&nbsp;</th>
532
                                                    <th>&nbsp;</th>
534
                                                    <th>&nbsp;</th>
535
                                                    <th>&nbsp;</th>
533
                                                    [% IF Koha.Preference('EDIFACT') && ediaccount %]
536
                                                    [% IF Koha.Preference('EDIFACT') && ediaccount %]
534
                                                        <th>&nbsp;</th>
537
                                                        <th>&nbsp;</th>
535
                                                    [% END %]
538
                                                    [% END %]
Lines 650-655 Link Here
650
                                                                    <i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit</a>
653
                                                                    <i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit</a>
651
                                                            [% END %]
654
                                                            [% END %]
652
                                                        </td>
655
                                                        </td>
656
                                                        <td>
657
                                                            [% IF CAN_user_acquisition_edit_invoices %]
658
                                                                <a href="/cgi-bin/koha/acqui/invoice.pl?invoiceid=[% books_loo.invoice_object.invoiceid | url %]" class="invoice">[% books_loo.invoice_object.invoicenumber | html %]</a>
659
                                                            [% ELSE %]
660
                                                                [% books_loo.invoice_object.invoicenumber | html %]
661
                                                            [% END %]
662
                                                        </td>
653
                                                        [% IF Koha.Preference('EDIFACT') && ediaccount %]
663
                                                        [% IF Koha.Preference('EDIFACT') && ediaccount %]
654
                                                            <td>[% books_loo.suppliers_report | html %]</td>
664
                                                            <td>[% books_loo.suppliers_report | html %]</td>
655
                                                        [% END %]
665
                                                        [% END %]
656
- 

Return to bug 28449