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

(-)a/C4/Acquisition.pm (+7 lines)
Lines 2489-2494 sub GetInvoices { Link Here
2489
              NULL
2489
              NULL
2490
            )
2490
            )
2491
          ) AS receivedbiblios,
2491
          ) AS receivedbiblios,
2492
          COUNT(
2493
             DISTINCT IF(
2494
              aqorders.subscriptionid IS NOT NULL,
2495
              aqorders.subscriptionid,
2496
              NULL
2497
            )
2498
          ) AS is_linked_to_subscriptions,
2492
          SUM(aqorders.quantityreceived) AS receiveditems
2499
          SUM(aqorders.quantityreceived) AS receiveditems
2493
        FROM aqinvoices
2500
        FROM aqinvoices
2494
          LEFT JOIN aqbooksellers ON aqbooksellers.id = aqinvoices.booksellerid
2501
          LEFT JOIN aqbooksellers ON aqbooksellers.id = aqinvoices.booksellerid
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt (-3 / +2 lines)
Lines 12-18 $(document).ready(function() { Link Here
12
    var resultst = $("#resultst").dataTable($.extend(true, {}, dataTablesDefaults, {
12
    var resultst = $("#resultst").dataTable($.extend(true, {}, dataTablesDefaults, {
13
        sDom: "t",
13
        sDom: "t",
14
        bPaginate: false,
14
        bPaginate: false,
15
        bFilter: false,
16
        bInfo: false,
15
        bInfo: false,
17
        "aoColumns": [
16
        "aoColumns": [
18
            null,null,null,{ "sType": "title-string" },null,null,null,null
17
            null,null,null,{ "sType": "title-string" },null,null,null,null
Lines 27-33 $(document).ready(function() { Link Here
27
26
28
    $("#show_only_subscription").click(function(){
27
    $("#show_only_subscription").click(function(){
29
        if ( $(this).attr("checked") ) {
28
        if ( $(this).attr("checked") ) {
30
            resultst.fnFilter( "[0-9]+", 0, true );
29
            resultst.fnFilter( "1", 0, true );
31
        } else {
30
        } else {
32
            resultst.fnFilter( '', 0 );
31
            resultst.fnFilter( '', 0 );
33
        }
32
        }
Lines 121-127 $(document).ready(function() { Link Here
121
            <tbody>
120
            <tbody>
122
              [% FOREACH invoice IN invoices %]
121
              [% FOREACH invoice IN invoices %]
123
                <tr data-invoiceid="[% invoice.invoiceid %]" data-booksellerid="[% invoice.booksellerid %]" data-shipmentdate="[% invoice.shipmentdate | $KohaDates %]" data-billingdate="[% invoice.billingdate | $KohaDates %]" data-shipmentcost="[% invoice.shipmentcost %]" data-shipment_budgetid="[% invoice.shipmentcost_budgetid %]" data-closedate="[% invoice.closedate | $KohaDates %]">
122
                <tr data-invoiceid="[% invoice.invoiceid %]" data-booksellerid="[% invoice.booksellerid %]" data-shipmentdate="[% invoice.shipmentdate | $KohaDates %]" data-billingdate="[% invoice.billingdate | $KohaDates %]" data-shipmentcost="[% invoice.shipmentcost %]" data-shipment_budgetid="[% invoice.shipmentcost_budgetid %]" data-closedate="[% invoice.closedate | $KohaDates %]">
124
                  <td>[% invoice.subscriptionid %]</td>
123
                  <td>[% invoice.is_linked_to_subscriptions %]</td>
125
                  <td><input type="checkbox" class="select-invoice" value="[% invoice.invoiceid %]"></input></td>
124
                  <td><input type="checkbox" class="select-invoice" value="[% invoice.invoiceid %]"></input></td>
126
                  <td><a href="/cgi-bin/koha/acqui/invoice.pl?invoiceid=[% invoice.invoiceid %]">[% invoice.invoicenumber %]</a></td>
125
                  <td><a href="/cgi-bin/koha/acqui/invoice.pl?invoiceid=[% invoice.invoiceid %]">[% invoice.invoicenumber %]</a></td>
127
                  <td><a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% invoice.booksellerid %]">[% invoice.suppliername %]</a></td>
126
                  <td><a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% invoice.booksellerid %]">[% invoice.suppliername %]</a></td>
(-)a/t/db_dependent/Acquisition/Invoices.t (-1 / +7 lines)
Lines 177-182 DelInvoice($invoiceid3); Link Here
177
is(scalar @invoices, $invoicecount - 1, 'DelInvoice deletes invoice');
177
is(scalar @invoices, $invoicecount - 1, 'DelInvoice deletes invoice');
178
is(GetInvoice($invoiceid3), undef, 'DelInvoice deleted correct invoice');
178
is(GetInvoice($invoiceid3), undef, 'DelInvoice deleted correct invoice');
179
179
180
my @invoices_linked_to_subscriptions = map{
181
    $_->{linked_to_subscriptions}
182
    ? $_
183
    : ()
184
} @invoices;
185
is_deeply( \@invoices_linked_to_subscriptions, [], "GetInvoices return linked_to_subscriptions: there is no invoices linked to subscriptions yet" )
186
180
END {
187
END {
181
    $dbh and $dbh->rollback;
188
    $dbh and $dbh->rollback;
182
}
189
}
183
- 

Return to bug 7288