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

(-)a/catalogue/detail.pl (-2 / +8 lines)
Lines 20-26 use Modern::Perl; Link Here
20
20
21
use CGI qw ( -utf8 );
21
use CGI qw ( -utf8 );
22
use HTML::Entities;
22
use HTML::Entities;
23
use C4::Acquisition qw( GetHistory );
24
use C4::Auth;
23
use C4::Auth;
25
use C4::Koha;
24
use C4::Koha;
26
use C4::Serials;    #uses getsubscriptionfrom biblionumber
25
use C4::Serials;    #uses getsubscriptionfrom biblionumber
Lines 180-186 foreach my $subscription (@subscriptions) { Link Here
180
179
181
# Get acquisition details
180
# Get acquisition details
182
if ( C4::Context->preference('AcquisitionDetails') ) {
181
if ( C4::Context->preference('AcquisitionDetails') ) {
183
    my $orders = C4::Acquisition::GetHistory( biblionumber => $biblionumber, get_canceled_order => 1 );
182
    my $orders = Koha::Acquisition::Orders->search(
183
        { biblionumber => $biblionumber },
184
        {
185
            join => 'basketno',
186
            order_by => 'basketno.booksellerid'
187
        }
188
    );    # GetHistory sorted by aqbooksellerid, but does it make sense?
189
184
    $template->param(
190
    $template->param(
185
        orders => $orders,
191
        orders => $orders,
186
    );
192
    );
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt (-15 / +27 lines)
Lines 710-753 Link Here
710
          <th class="title-string">Receive date</th>
710
          <th class="title-string">Receive date</th>
711
          <th>Status</th>
711
          <th>Status</th>
712
          <th>Quantity</th>
712
          <th>Quantity</th>
713
          <th>Subscription</th>
714
          <th>Subscription callnumber</th>
713
        </tr>
715
        </tr>
714
      </thead>
716
      </thead>
715
      <tbody>
717
      <tbody>
716
      [% FOR order IN orders %]
718
      [% FOR order IN orders %]
719
        [% SET basket = order.basket %]
720
        [% SET vendor = basket.bookseller %]
717
          <tr>
721
          <tr>
718
            <td>
722
            <td>
719
            [% IF (order.id) %]
723
                <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% vendor.id | uri %]" title="Vendor detail page">[% vendor.name | html %]</a>
720
                <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% order.id | html %]" title="Vendor detail page">[% order.name | html %]</a>
721
            [% END %]
722
            </td>
724
            </td>
723
            <td>
725
            <td>
724
            [% IF (order.invoiceid) %]
726
            [% IF order.invoiceid %]
725
                [% IF CAN_user_acquisition %]
727
                [% IF CAN_user_acquisition %]
726
                    <a href="/cgi-bin/koha/acqui/invoice.pl?invoiceid=[% order.invoiceid | html %]"
728
                    <a href="/cgi-bin/koha/acqui/invoice.pl?invoiceid=[% order.invoiceid | uri %]"
727
                       title="Invoice detail page">
729
                       title="Invoice detail page">
728
                       [% order.invoicenumber | html %]</a>
730
                       [% order.invoice.invoicenumber | hrml %]</a>
729
                [% ELSE %]
731
                [% ELSE %]
730
                    [% order.invoicenumber | html %]
732
                    [% order.invoice.invoicenumber | html %]
731
                [% END %]
733
                [% END %]
732
            [% END %]
734
            [% END %]
733
            </td>
735
            </td>
734
            <td>
736
            <td>
735
            [% IF (order.basketgroupid) %]
737
            [% IF basket.basketgroupid %]
738
                [% SET basket_group = basket.basket_group %]
736
                [% IF CAN_user_acquisition_group_manage %]
739
                [% IF CAN_user_acquisition_group_manage %]
737
                    <a href="/cgi-bin/koha/acqui/basketgroup.pl?op=add&booksellerid=[% order.id | html %]&basketgroupid=[% order.basketgroupid | html %]">[% order.groupname | html %] ([% order.basketgroupid | html %])</a>
740
                    <a href="/cgi-bin/koha/acqui/basketgroup.pl?op=add&booksellerid=[% vendor.id | uri %]&basketgroupid=[% basket_group.id | uri %]">[% basket_group.name | html%] ([% basket_group.id | html %])</a>
738
                [% ELSE %]
741
                [% ELSE %]
739
                    [% order.groupname | html %] ([% order.basketgroupid | html %])
742
                    [% basket_group.name | html %] ([% basket_group.id | html %])
740
                [% END %]
743
                [% END %]
741
            [% END %]
744
            [% END %]
742
            </td>
745
            </td>
743
            <td>[% IF CAN_user_acquisition_order_manage %]
746
            <td>[% IF CAN_user_acquisition_order_manage %]
744
                <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% order.basketno | html %]">[% order.basketname | html %] ([% order.basketno | html %])</a>
747
                <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basket.basketno | uri %]">[% basket.basketname | html %] ([% basket.basketno | html %])</a>
745
            [% ELSE %]
748
            [% ELSE %]
746
                [% order.basketname | html %] ([% order.basketno | html %])
749
                [% basket.basketname | html %] ([% basket.basketno | html %])
747
            [% END %]</td>
750
            [% END %]</td>
748
            <td>[% order.ordernumber | html %]</td>
751
            <td>[% order.ordernumber | html %]</td>
749
            <td><span title="[% order.creationdate | html %]">[% order.creationdate | $KohaDates%]</span></td>
752
            <td><span title="[% basket.creationdate | uri %]">[% basket.creationdate | $KohaDates%]</span></td>
750
            <td><span title="[% order.datereceived | html %]">[% order.datereceived | $KohaDates%]</span></td>
753
            <td><span title="[% order.datereceived | uri %]">[% order.datereceived | $KohaDates%]</span></td>
751
            <td>
754
            <td>
752
              [% SWITCH order.orderstatus %]
755
              [% SWITCH order.orderstatus %]
753
                [% CASE 'new' %]New
756
                [% CASE 'new' %]New
Lines 758-763 Link Here
758
              [% END %]
761
              [% END %]
759
            </td>
762
            </td>
760
            <td>[% order.quantity | html %]</td>
763
            <td>[% order.quantity | html %]</td>
764
            <td>
765
                [% IF order.subscriptionid %]
766
                    <a href="g/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% order.subscriptionid | uri %]">[% order.subscriptionid | html %]</a>
767
                [% END %]
768
            </td>
769
            <td>
770
                [% IF order.subscriptionid %]
771
                    [% order.subscription.callnumber | html %]
772
                [% END %]
773
            </td>
761
          </tr>
774
          </tr>
762
      [% END %]
775
      [% END %]
763
      </tbody>
776
      </tbody>
764
- 

Return to bug 20366