Bugzilla – Attachment 21996 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]
Bug 7288: Allow to display only subscriptions in the invoices table
Bug-7288-Allow-to-display-only-subscriptions-in-th.patch (text/plain), 3.36 KB, created by
Jonathan Druart
on 2013-10-15 10:03:09 UTC
(
hide
)
Description:
Bug 7288: Allow to display only subscriptions in the invoices table
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2013-10-15 10:03:09 UTC
Size:
3.36 KB
patch
obsolete
>From 9f6c7cea32b0c74671d45ba983a24d11514e8dd8 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] 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 >--- > 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 ed9c215..31c7959 100644 >--- a/C4/Acquisition.pm >+++ b/C4/Acquisition.pm >@@ -2285,6 +2285,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 965fec5..1fa81fb 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt >@@ -9,15 +9,26 @@ > <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": [6] } >+ { "aTargets": [-1], "bSortable": false, "bSearchable": false }, >+ { "aTargets": [0], "bSortable": false, "bSearchable": false, "bVisible": false }, > ] > })); >+ >+ $("#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 ); >+ } >+ }); > }); > //]]> > </script> >@@ -37,9 +48,14 @@ $(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>Subscriptionid</td> > <th>Invoice no.</th> > <th>Vendor</th> > <th>Billing date</th> >@@ -52,6 +68,7 @@ $(document).ready(function() { > <tbody> > [% FOREACH invoice IN invoices %] > <tr> >+ <td>[% invoice.subscriptionid %]</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> > <td> >-- >1.7.10.4
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