Bugzilla – Attachment 23815 Details for
Bug 7288
Invoice improvements - Show only subscriptions
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 7288: Allow to display only subscriptions in the invoices table
PASSED-QA-Bug-7288-Allow-to-display-only-subscript.patch (text/plain), 4.29 KB, created by
Katrin Fischer
on 2013-12-26 09:55:32 UTC
(
hide
)
Description:
[PASSED QA] Bug 7288: Allow to display only subscriptions in the invoices table
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2013-12-26 09:55:32 UTC
Size:
4.29 KB
patch
obsolete
>From 1b964211876e378fcc19e090a36499aae6198f30 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Mon, 5 Nov 2012 10:35:08 +0100 >Subject: [PATCH] [PASSED QA] Bug 7288: Allow to display only subscriptions in > the invoices table > >This patch adds a checkbox "Show only subscriptions" in the invoices >table. >If this checkbox is checked, a filter is added on the table in order to >show only subscription invoices > >Signed-off-by: Paola Rossi <paola.rossi@cineca.it> >Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> >To test: >- Test in a database with multiple existing invoices >- Create an order from a subscription, close basket, receive >- Test that the result table of the invoice search shows > the new checkbox and that it works correctly > >Passes all tests and QA script. >Also passes t/db_dependent/Acquisition.t and t/db_dependent/Acquisition/*. >--- > C4/Acquisition.pm | 1 + > .../prog/en/modules/acqui/invoices.tt | 23 +++++++++++++++++++--- > 2 files changed, 21 insertions(+), 3 deletions(-) > >diff --git a/C4/Acquisition.pm b/C4/Acquisition.pm >index 1bf41cb..9d8fe69 100644 >--- a/C4/Acquisition.pm >+++ b/C4/Acquisition.pm >@@ -2504,6 +2504,7 @@ sub GetInvoices { > my $dbh = C4::Context->dbh; > my $query = qq{ > SELECT aqinvoices.*, aqbooksellers.name AS suppliername, >+ aqorders.subscriptionid, > COUNT( > DISTINCT IF( > aqorders.datereceived IS NOT NULL, >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt >index 66b40a6..f3809f5 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt >@@ -9,16 +9,27 @@ > <script type="text/javascript"> > //<![CDATA[ > $(document).ready(function() { >- $("#resultst").dataTable($.extend(true, {}, dataTablesDefaults, { >+ var resultst = $("#resultst").dataTable($.extend(true, {}, dataTablesDefaults, { > sDom: "t", > "aoColumns": [ >- null,null,{ "sType": "title-string" },null,null,null,null >+ null,null,null,{ "sType": "title-string" },null,null,null,null > ], > aoColumnDefs: [ >- { "bSortable": false, "aTargets": [0, 7] } >+ { "bSortable": false, "aTargets": [1, 8] }, >+ { "bVisible": false, "aTargets": [0] } > ] > })); > >+ $("#show_only_subscription").attr("checked", false); >+ >+ $("#show_only_subscription").click(function(){ >+ if ( $(this).attr("checked") ) { >+ resultst.fnFilter( "[0-9]+", 0, true ); >+ } else { >+ resultst.fnFilter( '', 0 ); >+ } >+ }); >+ > $('#merge').click(function (ev) { > var booksellerid; > var mismatch; >@@ -86,10 +97,15 @@ $(document).ready(function() { > <h1>Invoices</h1> > [% IF ( do_search ) %] > [% IF invoices %] >+ <label for="show_only_subscription"> >+ <input type="checkbox" style="vertical-align: middle;" id="show_only_subscription" /> >+ Show only subscriptions >+ </label> > <table id="resultst"> > <thead> > <tr> > <th> </th> >+ <th> </th> > <th>Invoice no.</th> > <th>Vendor</th> > <th>Billing date</th> >@@ -102,6 +118,7 @@ $(document).ready(function() { > <tbody> > [% FOREACH invoice IN invoices %] > <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 %]"> >+ <td>[% invoice.subscriptionid %]</td> > <td><input type="checkbox" class="select-invoice" value="[% invoice.invoiceid %]"></input></td> > <td><a href="/cgi-bin/koha/acqui/invoice.pl?invoiceid=[% invoice.invoiceid %]">[% invoice.invoicenumber %]</a></td> > <td><a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% invoice.booksellerid %]">[% invoice.suppliername %]</a></td> >-- >1.8.3.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 7288
:
13246
|
18537
|
21996
|
22048
|
22473
|
22516
| 23815 |
26065