Bugzilla – Attachment 13246 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.11 KB, created by
Jonathan Druart
on 2012-11-05 09:40:59 UTC
(
hide
)
Description:
Bug 7288: Allow to display only subscriptions in the invoices table
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2012-11-05 09:40:59 UTC
Size:
3.11 KB
patch
obsolete
>From fc8d574ceae611aacb1fb403ecab2640b2ba4000 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 | 22 +++++++++++++++++--- > 2 files changed, 20 insertions(+), 3 deletions(-) > >diff --git a/C4/Acquisition.pm b/C4/Acquisition.pm >index 83031be..32064f3 100644 >--- a/C4/Acquisition.pm >+++ b/C4/Acquisition.pm >@@ -2189,6 +2189,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 a04204e..3c1a2bf 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt >@@ -11,15 +11,25 @@ > <script type="text/javascript"> > //<![CDATA[ > $(document).ready(function() { >- $("#resultst").dataTable($.extend(true, {}, dataTablesDefaults, { >+ var resultst = $("#resultst").dataTable($.extend(true, {}, dataTablesDefaults, { > bInfo: false, > bPaginate: false, >- bFilter: false, > sDom: "t", > 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> >@@ -39,9 +49,14 @@ $(document).ready(function() { > <h1>Invoices</h1> > [% IF ( do_search ) %] > [% IF ( results_loop ) %] >+ <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> >@@ -54,6 +69,7 @@ $(document).ready(function() { > <tbody> > [% FOREACH result IN results_loop %] > <tr> >+ <td>[% result.subscriptionid %]</td> > <td>[% result.invoicenumber %]</td> > <td>[% result.suppliername %]</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