From c401514b9546f14df3be6f9740b94b323c21cd0e Mon Sep 17 00:00:00 2001 From: Paul POULAIN Date: Thu, 23 Sep 2010 09:06:43 +0200 Subject: [PATCH] MT2743 : add filter on subscription branch to subscription claims Signed-off-by: Colin Campbell --- C4/Serials.pm | 6 ++-- .../prog/en/modules/serials/claims.tmpl | 30 ++++++++++++++++++- serials/claims.pl | 6 ++++ 3 files changed, 39 insertions(+), 3 deletions(-) diff --git a/C4/Serials.pm b/C4/Serials.pm index 4eea7956ca..caf5df55b8 100644 --- a/C4/Serials.pm +++ b/C4/Serials.pm @@ -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 diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tmpl index b9f327857b..3f3fc64e84 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tmpl @@ -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 @@
  • + +
  • @@ -247,6 +271,7 @@ Vendor + Branch Title Issue number Status @@ -265,6 +290,9 @@ + + + "> diff --git a/serials/claims.pl b/serials/claims.pl index 0a0375e4f0..249cf85c12 100755 --- a/serials/claims.pl +++ b/serials/claims.pl @@ -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(), ); -- 2.39.5