MT2743 : add filter on subscription branch to subscription claims
Signed-off-by: Colin Campbell <colin.campbell@ptfs-europe.com>
This commit is contained in:
parent
73a140b509
commit
c401514b95
|
|
@ -1760,7 +1760,8 @@ sub GetLateOrMissingIssues {
|
|||
"SELECT
|
||||
serialid, aqbooksellerid, name,
|
||||
biblio.title, planneddate, serialseq,
|
||||
serial.status, serial.subscriptionid, claimdate
|
||||
serial.status, serial.subscriptionid, claimdate,
|
||||
subscription.branchcode
|
||||
FROM serial
|
||||
LEFT JOIN subscription ON serial.subscriptionid=subscription.subscriptionid
|
||||
LEFT JOIN biblio ON subscription.biblionumber=biblio.biblionumber
|
||||
|
|
@ -1776,7 +1777,8 @@ sub GetLateOrMissingIssues {
|
|||
"SELECT
|
||||
serialid, aqbooksellerid, name,
|
||||
biblio.title, planneddate, serialseq,
|
||||
serial.status, serial.subscriptionid, claimdate
|
||||
serial.status, serial.subscriptionid, claimdate,
|
||||
subscription.branchcode
|
||||
FROM serial
|
||||
LEFT JOIN subscription ON serial.subscriptionid=subscription.subscriptionid
|
||||
LEFT JOIN biblio ON subscription.biblionumber=biblio.biblionumber
|
||||
|
|
|
|||
|
|
@ -55,6 +55,10 @@
|
|||
$("#titlefilter").keyup(function() {
|
||||
$.uiTableFilter($("#claimst"), $("#titlefilter").val())
|
||||
});
|
||||
|
||||
$("#branchfilter").keyup(function() {
|
||||
$.uiTableFilter($("#claimst"), $("#branchfilter").val())
|
||||
});
|
||||
});
|
||||
|
||||
// Checks if the form can be sent (at least one checkbox must be checked)
|
||||
|
|
@ -72,10 +76,20 @@
|
|||
clearFilters();
|
||||
} else {
|
||||
$("table#claimst tbody tr").hide();
|
||||
$("table#claimst tbody tr:contains(" + selectedStatus + ")").show();
|
||||
$("table#claimst tbody tr:contains(" + selectedStatus + ")").show();
|
||||
}
|
||||
}
|
||||
|
||||
// Filter by branch
|
||||
function filterByBranch() {
|
||||
selectedBranch = $("#branchfilter").val();
|
||||
if (selectedBranch == "all") {
|
||||
clearFilters();
|
||||
} else {
|
||||
$("table#claimst tbody tr").hide();
|
||||
$("table#claimst tbody tr:contains(" + selectedBranch + ")").show();
|
||||
}
|
||||
}
|
||||
// Filter by date
|
||||
function filterByDate() {
|
||||
var beginDate = Date_from_syspref($("#begindate").val()).getTime();
|
||||
|
|
@ -200,6 +214,16 @@
|
|||
<li>
|
||||
<label for="titlefilter">Title : </label>
|
||||
<input id="titlefilter" type="text" />
|
||||
<label for="branchfilter">Branch: </label>
|
||||
<select id="branchfilter" onchange="filterByBranch();">
|
||||
<!-- TMPL_LOOP Name="branchloop" -->
|
||||
<!-- TMPL_IF NAME="selected" -->
|
||||
<option value="<!-- TMPL_VAR NAME="value" -->" selected="selected"><!-- TMPL_VAR NAME="branchname" --></option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="<!-- TMPL_VAR NAME="value" -->"><!-- TMPL_VAR NAME="branchname" --></option>
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- /TMPL_LOOP -->
|
||||
</select>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
|
|
@ -247,6 +271,7 @@
|
|||
<th><input type="checkbox" id="CheckAll"></th>
|
||||
<!--/TMPL_IF-->
|
||||
<th>Vendor</th>
|
||||
<th>Branch</th>
|
||||
<th>Title</th>
|
||||
<th>Issue number</th>
|
||||
<th>Status</th>
|
||||
|
|
@ -265,6 +290,9 @@
|
|||
<!-- TMPL_VAR name="name" -->
|
||||
</td>
|
||||
<td>
|
||||
<!-- TMPL_VAR name="branchcode" -->
|
||||
</td>
|
||||
<td>
|
||||
<a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=<!-- TMPL_VAR NAME="subscriptionid" -->"><!-- TMPL_VAR name="title" escape="html" --></a>
|
||||
</td>
|
||||
<td>
|
||||
|
|
|
|||
|
|
@ -25,6 +25,8 @@ use C4::Output;
|
|||
use C4::Bookseller;
|
||||
use C4::Context;
|
||||
use C4::Letters;
|
||||
use C4::Branch; # GetBranches GetBranchesLoop
|
||||
|
||||
my $input = CGI->new;
|
||||
|
||||
my $serialid = $input->param('serialid');
|
||||
|
|
@ -78,6 +80,9 @@ if ($supplierid) {
|
|||
@supplierinfo=GetBookSeller($supplierid);
|
||||
}
|
||||
|
||||
my $branchloop = GetBranchesLoop();
|
||||
unshift @$branchloop, {value=> 'all',name=>''};
|
||||
|
||||
my $preview=0;
|
||||
if($op && $op eq 'preview'){
|
||||
$preview = 1;
|
||||
|
|
@ -101,6 +106,7 @@ $template->param(
|
|||
supplierid => $supplierid,
|
||||
claimletter => $claimletter,
|
||||
supplierloop => \@supplierinfo,
|
||||
branchloop => $branchloop,
|
||||
dateformat => C4::Context->preference("dateformat"),
|
||||
DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(),
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in New Issue