From 03d9a7987896f091543117a28e63a06da9c82ebd Mon Sep 17 00:00:00 2001 From: Paul Poulain Date: Tue, 28 Apr 2009 23:22:15 +0200 Subject: [PATCH] suggestions changes (probably useless) and incompatible with hdl stuff --- .../en/modules/suggestion/acceptorreject.tmpl | 80 +-- .../modules/suggestion/acceptorrejectpd.tmpl | 442 +++++++++++++ .../modules/suggestion/suggestiondetails.tmpl | 580 ++++++++++++++++++ .../suggestion/suggestiondetailspd.tmpl | 551 +++++++++++++++++ .../prog/en/modules/opac-suggestions.tmpl | 4 +- opac/opac-suggestions.pl | 5 + suggestion/acceptorreject.pl | 21 + suggestion/acceptorrejectpd.pl | 267 ++++++++ suggestion/suggestiondetails.pl | 451 ++++++++++++++ suggestion/suggestiondetailspd.pl | 428 +++++++++++++ 10 files changed, 2788 insertions(+), 41 deletions(-) create mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/acceptorrejectpd.tmpl create mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestiondetails.tmpl create mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestiondetailspd.tmpl create mode 100755 suggestion/acceptorrejectpd.pl create mode 100755 suggestion/suggestiondetails.pl create mode 100755 suggestion/suggestiondetailspd.pl diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/acceptorreject.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/acceptorreject.tmpl index 6cc5cbe2ff..4a19b5e5a6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/acceptorreject.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/acceptorreject.tmpl @@ -27,7 +27,7 @@ $.tablesorter.defaults.widgets = ['zebra']; $("#acceptedt").tablesorter({ dateFormat: 'uk', - headers: { 0: { sorter: 'articles' },3:{sorter: false},4:{sorter: false},5:{sorter: false},6:{sorter: false},7:{sorter: false}} + headers: { 0: { sorter: 'articles' },3:{sorter: false},4:{sorter: false},5:{sorter: false},6:{sorter: false},7:{sorter: false}, 8:{sorter: false}} }); $("#acceptedt").bind("sortStart",function() { $("#sorting").show(); @@ -36,7 +36,7 @@ }); $("#pendingt").tablesorter({ dateFormat: 'uk', - headers: { 0: { sorter: 'articles' },3:{sorter: false},4:{sorter: false},5:{sorter: false},6:{sorter: false},7:{sorter: false}} + headers: { 0: { sorter: 'articles' },3:{sorter: false},4:{sorter: false},5:{sorter: false},6:{sorter: false},7:{sorter: false}, 8:{sorter: false}} }); $("#pendingt").bind("sortStart",function() { $("#sorting").show(); @@ -45,13 +45,22 @@ }); $("#rejectedt").tablesorter({ dateFormat: 'uk', - headers: { 0: { sorter: 'articles' },3:{sorter: false},4:{sorter: false},5:{sorter: false},6:{sorter: false},7:{sorter: false}} + headers: { 0: { sorter: 'articles' },3:{sorter: false},4:{sorter: false},5:{sorter: false},6:{sorter: false},7:{sorter: false}, 8:{sorter: false}} }); $("#rejectedt").bind("sortStart",function() { $("#sorting").show(); }).bind("sortEnd",function() { $("#sorting").hide(); }); + $("#checkedt").tablesorter({ + dateFormat: 'uk', + headers: { 0: { sorter: 'articles' },3:{sorter: false},4:{sorter: false},5:{sorter: false},6:{sorter: false},7:{sorter: false}, 8:{sorter: false}} + }); + $("#checkedt").bind("sortStart",function() { + $("#sorting").show(); + }).bind("sortEnd",function() { + $("#sorting").hide(); + }); $("div[id*=other-reason]").hide(); $("input[name*=other-reason]").focus(function(){ $(this).val(""); }); @@ -112,8 +121,9 @@
Loading tab...
@@ -123,14 +133,8 @@ " /> - - - - -
- -
- + +
t"> @@ -140,6 +144,7 @@ + @@ -159,18 +164,18 @@ () + @@ -219,23 +229,13 @@
all"> all" name="other-reasonall" value="please note your reason here..." /> ">Mark all with this reason all">Cancel -
+
- - No pending suggestions. - - - No accepted suggestions. - - - No rejected suggestions. - - + No suggestions. - diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/acceptorrejectpd.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/acceptorrejectpd.tmpl new file mode 100644 index 0000000000..77a626c8e5 --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/acceptorrejectpd.tmpl @@ -0,0 +1,442 @@ + + +Koha › Suggestions Management + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+
+ + +

Suggestions (Purchase Department - )

+ + + + + + + +
+ + + + + + + + + + + + +
+ + + + + + +
"> + + + " /> + +
Suggestion Notes Reason Update Checked Accept Reject Delete - + - " value="" /> + " value="" /> -
" class="select"> - " name="reason"> @@ -178,30 +183,35 @@ No reasons defined in authorized values
-
"> - " value="please note your reason here..." /> -

">back to list

+
"> + " value="please note your reason here..." /> +

">back to list

- - - " name="" type="radio" value="ACCEPTED" readonly="readonly" checked="checked" /> + + " name="" type="radio" value="CHECKED" readonly="readonly" checked="checked" /> + + " name="" type="radio" value="CHECKED" /> + + + + " name="" type="radio" value="ACCEPTED" readonly="readonly" checked="checked" /> - " name="" type="radio" value="ACCEPTED" /> + " name="" type="radio" value="ACCEPTED" /> - - " name="" type="radio" value="REJECTED" readonly="readonly" checked="checked" /> + + " name="" type="radio" value="REJECTED" readonly="readonly" checked="checked" /> - " name="" type="radio" value="REJECTED" /> + " name="" type="radio" value="REJECTED" /> - - " name="" type="radio" value="delete" /> + " name="" type="radio" value="delete" />
+ + + + + + + + + + + + " value="" /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
StatusReasonBook fundSuggestionSuggested by
on
+ + + " class="content_visible"> + + + + + + No reasons defined in authorised values + + + + + " class="content_hidden"> + + " value="please note your reason here..." onclick="if(this.value === 'please note your reason here...'){this.value=''}" /> + + '); return false;">back to list + + + + + + + + , by
+ + © + + ; Volume: + + ; ISBN :
+ + ; Published by + + in + + in
+ +
+ + +
+ + , +
+ +
+ ">details +
+ +
+ + + + + + + + + + No pending suggestions +

+ + ">See accepted suggestions +

+ + ">See rejected suggestions + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Managed by (GPD)
on
Managed by (PD)
on
Reason +
Book fund
SuggestionSuggested by
on
+ + , +
+ +
+ + , +
+ +
+
+ +
+ + + , by + +
+ + + © + + + + ; Volume: + + + + ; ISBN :
+ + + + Published by + + + + in + + + + in + +
+ + unit price :
+ + + + +
+ + , +
+ +
+ ">details +
+ + + + + + + + +

No suggestions have been + + + accepted. + + rejected. + + +

+ + + + + + +
+ + + + + + diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestiondetails.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestiondetails.tmpl new file mode 100644 index 0000000000..f05338e8b9 --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestiondetails.tmpl @@ -0,0 +1,580 @@ + + + + + + Koha › Acquisitions › Suggestion management › Suggestion details + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +

Suggestion details (General Purchase Department)

+

+ + + + + + + + + + +
    +
  1. +

    Document

    +
  2. +
  3. +   +
  4. +
  5. +   +
  6. +
  7. +   +
  8. +
  9. +   +
  10. +
  11. +   +
  12. +
  13. +   +
  14. +
  15. +   +
  16. +
  17. +   +
  18. + +
  19. +   +
  20. + +
  21. +

    Branch, book fund group, book fund, audience

    +
  22. + + + + + +
  23. +   +
  24. + +
  25. +   +
  26. + +
  27. +   +
  28. + +
  29. +   +
  30. + +
  31. +

    Suggestion management

    +
  32. + + + + + +
  33. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + /> + +
    +
      +
    1. +

      Document

      +
    2. +
    3. + + "/> +
    4. +
    5. + + " /> +
    6. +
    7. + + "/> +
    8. +
    9. + + "/> +
    10. +
    11. + + "/> +
    12. +
    13. + + "/> +
    14. +
    15. + + "/> +
    16. +
    17. + + +
    18. + +
    19. + + +
    20. + + +
    21. +

      Branch, book fund group, book fund, audience

      +
    22. + + + + + +
    23. + + +
    24. + +
    25. + + +
    26. + +
    27. + + +
    28. + +
    29. + + + +
    30. + + +
    31. +

      Suggestion management

      +
    32. + + + + + +
    33. + +
    ActionAuthorDateStatusReason
    suggestion made by + + , + + - - - - - - - - - -
    suggestion managed by (GPD) + + , + + + + REJECTED + + ACCEPTED + + + + + + - - - - - + +
    suggestion managed by (PD) - - - - - - - - - - - - - - - - - - - - + + , + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + Cancel +
    + + + + + +

    + Suggestions Management + + + +
    +--> + + +
    \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestiondetailspd.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestiondetailspd.tmpl new file mode 100644 index 0000000000..24be4eb08e --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestiondetailspd.tmpl @@ -0,0 +1,551 @@ + + + + + + Koha › Acquisitions › Suggestion management › Suggestion details + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +

    Suggestion details (Purchase Department)

    +

    + + + + + + + + + + +
      +
    1. +

      Document

      +
    2. +
    3. +   +
    4. +
    5. +   +
    6. +
    7. +   +
    8. +
    9. +   +
    10. +
    11. +   +
    12. +
    13. +   +
    14. +
    15. +   +
    16. +
    17. +   +
    18. + +
    19. +   +
    20. + +
    21. +

      Branch, book fund group, book fund, audience

      +
    22. + + + + + +
    23. +   +
    24. + +
    25. +   +
    26. + +
    27. +   +
    28. + +
    29. +   +
    30. + +
    31. +

      Suggestion management

      +
    32. + + + + + +
    33. + +
    ActionAuthorDateStatusReason
    suggestion made by + + , + + - - - - - - - - - -
    suggestion managed by (GPD) + + + + " class="content_visible"> + + + + + + + No reasons defined in authorised values + + + + + " class="content_hidden"> + + " value="please note your reason here..." onclick="if(this.value === 'please note your reason here...'){this.value=''}" /> + + '); return false;">back to list + + + +
    suggestion managed by (PD)
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ActionAuthorDateStatusReason
    suggestion made by + + , + + - - - - - - - - - -
    suggestion managed by (GPD) + + , + + + ACCEPTED + + - - - - - +
    suggestion managed by (PD) + + , + + - - - - -
    + +
  34. + +
+ + + + + + + + + + + + + +
+ + " /> + + "/> + + "/> + +
+ +
    +
  1. +

    Document

    +
  2. +
  3. + + "/> +
  4. +
  5. + + " /> +
  6. +
  7. + + "/> +
  8. +
  9. + + "/> +
  10. +
  11. + + "/> +
  12. +
  13. + + "/> +
  14. +
  15. + + "/> +
  16. +
  17. + + +
  18. + +
  19. + + +
  20. + +
  21. +

    Branch, book fund group, book fund, audience

    +
  22. + + + + + +
  23. + + +
  24. + +
  25. + +
  26. + +
  27. + + +
  28. + +
  29. + + + +
  30. + + +
  31. +

    Suggestion management

    +
  32. + + + + + +
  33. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ActionAuthorDateStatusReason
    suggestion made by + + , + + - - - - - - - - - -
    suggestion managed by (GPD) + + , + + + ACCEPTED + + - - - - - +
    suggestion managed by (PD) + + + " class="content_visible"> + + + + + + No reasons defined in authorised values + + + + + " class="content_hidden"> + + " value="please note your reason here..." onclick="if(this.value === 'please note your reason here...'){this.value=''}" /> + + '); return false;">back to list + + + +
    + +
  34. + +
+ +
+ +
+ + + ">Cancel +
+ +
+ + + +

+ ">Suggestions Management + + +
+ --> + +
+ diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-suggestions.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-suggestions.tmpl index b14bf764c1..4c3e8bbc0d 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-suggestions.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-suggestions.tmpl @@ -126,7 +126,9 @@ $.tablesorter.addParser({ - " /> + + " /> +

diff --git a/opac/opac-suggestions.pl b/opac/opac-suggestions.pl index cd512de079..6f518d7eb0 100755 --- a/opac/opac-suggestions.pl +++ b/opac/opac-suggestions.pl @@ -108,9 +108,14 @@ $template->param( itemtypeloop=> $supportlist, suggestions_loop => $suggestions_loop, showall => $allsuggestions, + title => $title, + author => $author, + publishercode => $publishercode, + status => $status, "op_$op" => 1, suggestionsview => 1 ); + output_html_with_http_headers $input, $cookie, $template->output; diff --git a/suggestion/acceptorreject.pl b/suggestion/acceptorreject.pl index 12e2f136fa..d4615a1bf9 100755 --- a/suggestion/acceptorreject.pl +++ b/suggestion/acceptorreject.pl @@ -186,3 +186,24 @@ $template->param( ); output_html_with_http_headers $input, $cookie, $template->output; +my @allsuggestions; +foreach my $status ('ASKED','CHECKED','REJECTED','ACCEPTED'){ + my $suggestions = &GetSuggestionByStatus( $status, $branchcode ); + map{ + $_->{$status}=1 unless ($status eq 'ASKED' ||$status eq 'PENDING'); + $_->{'reasonsloop'}=$reasonsloop; + $_->{'suggestioncreatedon'}=format_date($_->{'suggestioncreatedon'}) + } @$suggestions; + + push @allsuggestions,{"suggestiontype"=>($status eq 'ASKED'?"pending":lc $status), + 'suggestions_loop'=>$suggestions, + 'reasonsloop' => $reasonsloop}; +} +>>>>>>> suggestions changes (probably useless):suggestion/acceptorreject.pl +$template->param( + suggestions => \@allsuggestions, + "op_$op" => 1, + dateformat => C4::Context->preference("dateformat"), +); + +output_html_with_http_headers $input, $cookie, $template->output; diff --git a/suggestion/acceptorrejectpd.pl b/suggestion/acceptorrejectpd.pl new file mode 100755 index 0000000000..5cdf8ca382 --- /dev/null +++ b/suggestion/acceptorrejectpd.pl @@ -0,0 +1,267 @@ +#!/usr/bin/perl + +# Copyright 2008 BibLibre, Olivier SAURY +# SAN Ouest Provence +# +# This file is part of Koha. +# +# Koha is free software; you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# Koha is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +# A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along with +# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, +# Suite 330, Boston, MA 02111-1307 USA + + +=head1 NAME + +acceptorreject.pl + +=head1 DESCRIPTION + +this script modify the status of a subscription to ACCEPTED or to REJECTED + +=head1 PARAMETERS + +=over 4 + +=item op + +op can be : + * aorr_confirm : to confirm accept or reject + * accepted : to display only accepted. + * rejected : to display only rejected. + +=back + + +=cut + +## modules +################################################################################### + +use strict; +require Exporter; +use CGI; + +use C4::Auth; # get_template_and_user +use C4::Output; +use C4::Suggestions; +use C4::Koha; # GetAuthorisedValue +use C4::Dates qw/format_date format_date_in_iso/; + + +## variables +################################################################################### + +## input variables +my $input = new CGI; +my $bookfundgroupnumber = $input->param('bookfundgroupnumber'); +my $op = $input->param('op') || "aorr_confirm"; + +## other variables +my $bookfundgroupname; +my @suggestions_loop; + +my $dbh = C4::Context->dbh; + +my ( $template, $loggedinuser, $cookie ) = get_template_and_user( + { + template_name => "suggestion/acceptorrejectpd.tmpl", + type => "intranet", + query => $input, + authnotrequired => 1, + flagsrequired => { catalogue => 1 }, + } +); + +my $suggestion_loop0; + + +################################################################################### +################################################################################### +## modify suggestions'status. Choose a list of suggestions +################################################################################### +################################################################################### + + +if ( $op eq "aorr_confirm" ) { + +## modify suggestions'status +################################################################################### + + my @suggestionlist = $input->param("aorr"); + + foreach my $suggestion (@suggestionlist) { + if ( $suggestion =~ /(A|R)(.*)/ ) { + + my ( $newstatus, $ordernumber ) = ( $1, $2 ); + $newstatus = "REJECTED" if $newstatus eq "R"; + $newstatus = "ACCEPTED" if $newstatus eq "A"; + my $reason = $input->param( "reason" . $ordernumber ); + if ( $reason eq "other" ) { + $reason = $input->param( "other-reason" . $ordernumber ); + } + + my $bookfundnumber = $input->param( "bookfunds_loop".$ordernumber); + my $step = $input->param( "step".$ordernumber); + + ModStatus( + $ordernumber, + $newstatus, + $reason, + $bookfundgroupnumber, + $bookfundnumber, + $loggedinuser, + $step, + '', + $input, + ); + } + } + $op = "else"; + $suggestion_loop0 = &SearchSuggestion("", "", "", "", 'ASKED', "","",2,$bookfundgroupnumber); +} + + +if ( $op eq "accepted" ) { + +## accepted suggestions +################################################################################### + + $suggestion_loop0 = &GetSuggestionByStatus('ACCEPTED',3,$bookfundgroupnumber); + $template->param(done => 1); +} + + +if ( $op eq "rejected" ) { + +## rejected suggestions +################################################################################### + + $suggestion_loop0 = &GetSuggestionByStatus('REJECTED',3,$bookfundgroupnumber); + $template->param(done => 1); +} + + +## book fund group name +######################################################################################### +my $dbh = C4::Context->dbh; +my $sth = $dbh->prepare(" +SELECT bookfundgroupname +FROM aq2bookfundgroups +WHERE bookfundgroupnumber=? +"); +$sth->execute($bookfundgroupnumber); +my $data = $sth->fetchrow_hashref; +$bookfundgroupname = $data->{'bookfundgroupname'}; +$sth->finish; + + + +foreach my $suggestion (@$suggestion_loop0) { + +################################################################################### +################################################################################### +## get more information about suggestions +################################################################################### +################################################################################### + + + ## reasonsloop + $suggestion->{'reasonsloop'} = GetAuthorisedValues("SUGGEST"); + + ## dates + $suggestion->{'suggestioncreatedon'} = format_date($suggestion->{'suggestioncreatedon'}); + $suggestion->{'suggestionmanagedingpdon'} = format_date($suggestion->{'suggestionmanagedingpdon'}); + $suggestion->{'suggestionmanagedinpdon'} = + format_date($suggestion->{'suggestionmanagedinpdon'}); + + + ## bookfunds_loop + ############################################################################### + my $dbh = C4::Context->dbh; + my $sth = $dbh->prepare(" + SELECT bookfundnumber, bookfundname + FROM aq2bookfunds + WHERE bookfundgroupnumber=? + ORDER BY bookfundname + "); + $sth->execute($bookfundgroupnumber); + + my @bookfunds_loop; + + while (my $data = $sth->fetchrow_hashref) { + + ## book fund number of the suggestion + $data->{selected}=($data->{'bookfundnumber'} eq $suggestion->{'bookfundnumber'})? 1:0; + + ## book fund name of the suggestion + if ($data->{'bookfundnumber'} eq $suggestion->{'bookfundnumber'}) { + $suggestion->{'bookfundname'} = $data->{'bookfundname'}; + } + + push( @bookfunds_loop, $data); + } + $sth->finish; + + $suggestion->{'bookfunds_loop'} = \@bookfunds_loop; + + + ## name of the person who managed the suggestion in the General Purchase Department + ################################################################################### + + my $dbh = C4::Context->dbh; + my $sth = $dbh->prepare(" + SELECT firstname AS firstnamemanagedingpdby, + surname AS surnamemanagedingpdby + FROM borrowers + WHERE borrowernumber=? + "); + $sth->execute($suggestion->{'suggestionmanagedingpdby'}); + my $namemanagedingpdby = $sth->fetchrow_hashref; + $sth->finish; + $suggestion->{'firstnamemanagedingpdby'} = $namemanagedingpdby->{'firstnamemanagedingpdby'}; + $suggestion->{'surnamemanagedingpdby'} = $namemanagedingpdby->{'surnamemanagedingpdby'}; + + + ## name of the person who managed the suggestion in a Purchase Department + ################################################################################### + my $dbh = C4::Context->dbh; + my $sth = $dbh->prepare(" + SELECT firstname AS firstnamemanagedinpdby, + surname AS surnamemanagedinpdby + FROM borrowers + WHERE borrowernumber=? + "); + $sth->execute($suggestion->{'suggestionmanagedinpdby'}); + my $namemanagedinpdby = $sth->fetchrow_hashref; + $sth->finish; + $suggestion->{'firstnamemanagedinpdby'} = $namemanagedinpdby->{'firstnamemanagedinpdby'}; + $suggestion->{'surnamemanagedinpdby'} = $namemanagedinpdby->{'surnamemanagedinpdby'}; + + + ## insert the suggestion into the table of suggestions + ################################################################################ + push @suggestions_loop, $suggestion ; + + +################################################################################### +## $template +################################################################################### +} + +$template->param( + suggestions_loop => \@suggestions_loop, + bookfundgroupnumber => $bookfundgroupnumber, + bookfundgroupname => $bookfundgroupname, + "op_$op" => 1, +); + +output_html_with_http_headers $input, $cookie, $template->output; \ No newline at end of file diff --git a/suggestion/suggestiondetails.pl b/suggestion/suggestiondetails.pl new file mode 100755 index 0000000000..777f189185 --- /dev/null +++ b/suggestion/suggestiondetails.pl @@ -0,0 +1,451 @@ +#!/usr/bin/perl + +# Copyright 2008 BibLibre, Olivier SAURY +# SAN Ouest Provence +# +# This file is part of Koha. +# +# Koha is free software; you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# Koha is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +# A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along with +# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, +# Suite 330, Boston, MA 02111-1307 USA + + +## modules +################################################################################### + +use strict; +require Exporter; +use CGI; + +use List::Util qw/min/; +use C4::Context; +use C4::Auth; # get_template_and_user +use C4::Output; +use C4::Suggestions; +use C4::Koha; # GetAuthorisedValue +use C4::Dates qw/format_date format_date_in_iso/; +use C4::Branch; # GetBranches + +## input variables +############################################################################### + +my $input = new CGI; + +my $ordernumber = $input->param('ordernumber'); + +my $op = $input->param('op'); + + +## other variables +############################################################################### + +my $dbh = C4::Context->dbh; +my ( $template, $loggedinuser, $cookie ) = get_template_and_user( + { + template_name => + "/suggestion/suggestiondetails.tmpl", + type => "intranet", + query => $input, + authnotrequired => 0, + flagsrequired => { catalogue => 1 }, + } +); + + + +if ($op eq "add_confirm") { + +################################################################################################ +################################################################################################ +## modify a suggestion +################################################################################################ +################################################################################################ + + ## 'bookfundgroupnumber', 'bookfundnumber', 'audiencenumber' + my $bookfundgroup_loop = $input->param('bookfundgroup_loop'); + my $bookfund_loop = $input->param('bookfund_loop'); + my $audience_loop = $input->param('audience_loop'); + + $bookfundgroup_loop = ($bookfundgroup_loop eq "")? undef : $bookfundgroup_loop; + $bookfund_loop = ($bookfund_loop eq "")? undef : $bookfund_loop; + $audience_loop = ($audience_loop eq "")? undef : $audience_loop; + + + ## modify the suggestion + my $dbh = C4::Context->dbh; + my $sth = $dbh->prepare(' + UPDATE aq2orders + SET title = ? + , author = ? + , copyrightdate = ? + , isbn = ? + , publishercode = ? + , seriestitle = ? + , note = ? + , itemtype = ? + , rrp = ? + , bookfundgroupnumber = ? + , bookfundnumber = ? + , audiencenumber = ? + , branchcode = ? + WHERE ordernumber = ? + '); + + + $sth->execute( + $input->param('title')?$input->param('title'):"", + $input->param('author')?$input->param('author'):"", + $input->param('copyrightdate')?$input->param('copyrightdate'):"", + $input->param('isbn')?$input->param('isbn'):"", + $input->param('publishercode')?$input->param('publishercode'):"", + $input->param('seriestitle')?$input->param('seriestitle'):"", + $input->param('note')?$input->param('note'):"", + $input->param('itemtype')?$input->param('itemtype'):"", + $input->param('rrp')?$input->param('rrp'):undef, + $bookfundgroup_loop, + $bookfundgroup_loop ? $bookfund_loop: undef, + $bookfundgroup_loop ? $audience_loop : undef, + $input->param('branch_loop')?$input->param('branch_loop'):"", + $input->param('ordernumber'), + ); + $sth->finish; + + + if ($input->param("aorr")) { + + ModStatus( + $input->param('ordernumber'), + $input->param("aorr"), + $input->param('reason'), + $bookfundgroup_loop, + '', + $loggedinuser, + 1, ##$step + '', + $input, + ); + } + + + print "Content-Type: text/html\n\n"; + exit; + +} + +else { + +################################################################################################ +################################################################################################ +## display the suggestion details +################################################################################################ +################################################################################################ + + my @bookfund_loop; + my @audience_loop; + my $chooseabookfund=0; + my $chooseanaudience=0; + my $bookfundgroupname; + my $bookfundname; + my $audiencename; + my $itemtypedescription; + my @suggestion_loop1; + + ################################################################################### + ## get the suggestion (from 'aq2orders') + ################################################################################### + my $suggestion; + my $dbh = C4::Context->dbh; + my $sth = $dbh->prepare(" + SELECT * + FROM aq2orders + WHERE ordernumber=? + "); + + $sth->execute($ordernumber); + my $suggestion = $sth->fetchrow_hashref; + my $bookfundgroupnumber=$suggestion->{'bookfundgroupnumber'}; + my $bookfundnumber=$suggestion->{'bookfundnumber'}; + my $branchcode=$suggestion->{'branchcode'}; + my $itemtype=$suggestion->{'itemtype'}; + my $audiencenumber=$suggestion->{'audiencenumber'}; + my $step=$suggestion->{'step'}; + $sth->finish; + + + ################################################################################### + ## get data from other tables + ################################################################################### + + ## get data about book fund groups + ################################################################################### + + my $dbh = C4::Context->dbh; + my $sth = $dbh->prepare(" + SELECT bookfundgroupnumber, bookfundgroupname + FROM aq2bookfundgroups + ORDER BY bookfundgroupname + "); + $sth->execute(); + + my @bookfundgroup_loop; + + while (my $data = $sth->fetchrow_hashref) { + if ($data->{'bookfundgroupnumber'} eq $bookfundgroupnumber) { + $data->{selected}=1; + $bookfundgroupname=$data->{'bookfundgroupname'}; + } + else {$data->{selected}=0;} + push(@bookfundgroup_loop, $data); + } + $sth->finish; + + if ($bookfundgroupnumber) {$chooseabookfund=1;$chooseanaudience=1;} + + ## get data about book funds + ################################################################################### + + if ($bookfundgroupnumber) { + my $dbh = C4::Context->dbh; + my $sth = $dbh->prepare(" + SELECT bookfundnumber, bookfundname + FROM aq2bookfunds + WHERE bookfundgroupnumber=? + ORDER BY bookfundname + "); + + $sth->execute($bookfundgroupnumber); + + while (my $data = $sth->fetchrow_hashref) { + + if ($data->{'bookfundnumber'} eq $bookfundnumber) { + $data->{selected}=1; + $bookfundname=$data->{'bookfundname'}; + } + else { + $data->{selected}=0; + } + + push(@bookfund_loop, $data); + } + $sth->finish; + } + + + ## get data about audiences + ################################################################################### + + if ($bookfundgroupnumber) { + my $dbh = C4::Context->dbh; + my $sth = $dbh->prepare(" + SELECT audiencenumber, audiencename + FROM aq2audiences + WHERE bookfundgroupnumber=? + ORDER BY audiencename + "); + + $sth->execute($bookfundgroupnumber); + + ## get 'audiencenumber' value (in the table 'aq2orders') + + while (my $data = $sth->fetchrow_hashref) { + if ($data->{'audiencenumber'} eq $audiencenumber) { + $data->{selected}=1; + $audiencename = $data->{'audiencename'}; + } + else {$data->{selected}=0;} + + push(@audience_loop, $data); + } + $sth->finish; + } + + + ## get branch names + ################################################################################### + my $branches = GetBranches; + my @branch_loop; + my $branchname; + + foreach my $thisbranch (keys %$branches) { + my %row = (branchcode => $thisbranch, + branchname => $branches->{$thisbranch}->{'branchname'}, + ); + if ($thisbranch eq $branchcode) { + $row{"selected"}=1; + $branchname=$branches->{$thisbranch}->{'branchname'}; + } + else {$row{"selected"}=0;} + + push @branch_loop, \%row; + } + + + ## get item types + ################################################################################### + my $dbh = C4::Context->dbh; + my $sth=$dbh->prepare(" + SELECT description,itemtype + FROM itemtypes + ORDER BY description"); + $sth->execute(); + + my @itemtypeloop; + + while ( my $data = $sth->fetchrow_hashref ) { + if ($data->{'itemtype'} eq $itemtype) { + $data->{selected}=1; + $itemtypedescription=$data->{'description'}; + } + else { $data->{selected}=0;} + push( @itemtypeloop, $data); + } + $sth->finish; + + + ### get names + ################################################################################### + + ## name of the person who 1st wrote the suggestion + + my $dbh = C4::Context->dbh; + my $sth = $dbh->prepare(" + SELECT firstname AS firstnamesuggestedby, + surname AS surnamesuggestedby + FROM borrowers + WHERE borrowernumber=? + "); + $sth->execute($suggestion->{'suggestedby'}); + my $namesuggestedby = $sth->fetchrow_hashref; + $sth->finish; + + ## name of the person who managed the suggestion in the General Purchase Department + + my $dbh = C4::Context->dbh; + my $sth = $dbh->prepare(" + SELECT firstname AS firstnamemanagedingpdby, + surname AS surnamemanagedingpdby + FROM borrowers + WHERE borrowernumber=? + "); + $sth->execute($suggestion->{'suggestionmanagedingpdby'}); + my $namemanagedingpdby = $sth->fetchrow_hashref; + $sth->finish; + + + ## name of the person who managed the suggestion in a Purchase Department + + my $dbh = C4::Context->dbh; + my $sth = $dbh->prepare(" + SELECT firstname AS firstnamemanagedinpdby, + surname AS surnamemanagedinpdby + FROM borrowers + WHERE borrowernumber=? + "); + $sth->execute($suggestion->{'suggestionmanagedinpdby'}); + my $namemanagedinpdby = $sth->fetchrow_hashref; + $sth->finish; + + if ($chooseabookfund) { + $template->param(chooseabookfund => $chooseabookfund,); + } + + if ($chooseanaudience) { + $template->param(chooseanaudience => $chooseanaudience,); + } + + + ## list of reasons why a suggestion can be rejected + ################################################################################### + my $reasons_loop = GetAuthorisedValues("SUGGEST"); + + +################################################################################################ +################################################################################################ +### $template +################################################################################################ +################################################################################################ + + $template->param( + + ## ordernumber + ordernumber => $ordernumber, + + ## other variables from 'aq2orders' + ######################################################################################## + + title => $suggestion->{'title'}, + author => $suggestion->{'author'}, + copyrightdate => $suggestion->{'copyrightdate'}, + isbn => $suggestion->{'isbn'}, + rrp => $suggestion->{'rrp'}, + publishercode => $suggestion->{'publishercode'}, + seriestitle => $suggestion->{'seriestitle'}, + note => $suggestion->{'note'}, + status => $suggestion->{'status'}, + reason => $suggestion->{'reason'}, + + bookfundgroupnumber => $bookfundgroupnumber, + + ## dates (metric format) + suggestioncreatedon => format_date($suggestion->{'suggestioncreatedon'}), + suggestionmanagedingpdon => format_date($suggestion->{'suggestionmanagedingpdon'}), + suggestionmanagedinpdon => format_date($suggestion->{'suggestionmanagedinpdon'}), + + ## suggestion status + step2 => ($step==2)?1:0, + step3 => ($step==3)?1:0, + step2ormore => ($step>=2)?1:0, + accepted1 =>(($suggestion->{'status'} eq 'ACCEPTED') and $step==1)?1:0, + accepted2 =>(($suggestion->{'status'} eq 'ACCEPTED') and $step==2)?1:0, + rejected1 =>(($suggestion->{'status'} eq 'REJECTED') and $step==1)?1:0, + rejected2 => (($suggestion->{'status'} eq 'REJECTED') and $step==2)?1:0, + + + ## variables from other tables + ######################################################################################## + + ## "loop variables" + bookfundgroup_loop => \@bookfundgroup_loop, + bookfund_loop => \@bookfund_loop, + audience_loop => \@audience_loop, + branch_loop => \@branch_loop, + itemtypeloop => \@itemtypeloop, + reasons_loop => $reasons_loop, + + ## + branchname => $branchname, + bookfundgroupname => $bookfundgroupname, + bookfundname => $bookfundname, + audiencename => $audiencename, + itemtypedescription => $itemtypedescription, + + ## names (person who 1st write the suggestion, persons who managed the suggestion) + firstnamesuggestedby => $namesuggestedby->{'firstnamesuggestedby'}, + surnamesuggestedby => $namesuggestedby->{'surnamesuggestedby'}, + + firstnamemanagedingpdby =>$namemanagedingpdby->{'firstnamemanagedingpdby'}, + surnamemanagedingpdby =>$namemanagedingpdby->{'surnamemanagedingpdby'}, + + firstnamemanagedinpdby =>$namemanagedinpdby->{'firstnamemanagedinpdby'}, + surnamemanagedinpdby =>$namemanagedinpdby->{'surnamemanagedinpdby'}, + + + ## other variables + ######################################################################################## + + template => C4::Context->preference('template'), + ); + +} + + +output_html_with_http_headers $input, $cookie, $template->output; diff --git a/suggestion/suggestiondetailspd.pl b/suggestion/suggestiondetailspd.pl new file mode 100755 index 0000000000..ba1f03cfcc --- /dev/null +++ b/suggestion/suggestiondetailspd.pl @@ -0,0 +1,428 @@ +#!/usr/bin/perl + +# Copyright 2008 BibLibre, Olivier SAURY +# SAN Ouest Provence +# +# This file is part of Koha. +# +# Koha is free software; you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# Koha is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +# A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along with +# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, +# Suite 330, Boston, MA 02111-1307 USA + + +## modules +################################################################################### + +use strict; +require Exporter; +use CGI; + +use List::Util qw/min/; +use C4::Context; +use C4::Auth; # get_template_and_user +use C4::Output; +use C4::Suggestions; +use C4::Koha; # GetAuthorisedValue +use C4::Dates qw/format_date format_date_in_iso/; +use C4::Branch; # GetBranches + +## variables +############################################################################### + +my $input = new CGI; + +my $ordernumber = $input->param('ordernumber'); +my $bookfundgroupname = $input->param('bookfundgroupname'); + +my $op = $input->param('op'); + +my $bookfundgroupnumber = $input->param('bookfundgroupnumber'); + + +my $dbh = C4::Context->dbh; +my ( $template, $loggedinuser, $cookie ) = get_template_and_user( + { + template_name => + "/suggestion/suggestiondetailspd.tmpl", + type => "intranet", + query => $input, + authnotrequired => 0, + flagsrequired => { catalogue => 1 }, + } +); + + + +if ($op eq "add_confirm") { + +################################################################################################ +################################################################################################ +## modify a suggestion +################################################################################################ +################################################################################################ + + ## 'bookfundgroupnumber', 'bookfundnumber', 'audiencenumber' + my $bookfund_loop = ($input->param('bookfund_loop') eq "")?undef:$input->param('bookfund_loop'); + my $audience_loop = ($input->param('audience_loop') eq "")?undef:$input->param('audience_loop'); + + ## modify the suggestion + my $dbh = C4::Context->dbh; + my $sth = $dbh->prepare(' + UPDATE aq2orders + SET title = ? + , author = ? + , copyrightdate = ? + , isbn = ? + , publishercode = ? + , seriestitle = ? + , note = ? + , itemtype = ? + , rrp = ? + , bookfundgroupnumber = ? + , bookfundnumber = ? + , audiencenumber = ? + , branchcode = ? + WHERE ordernumber = ? + '); + + + $sth->execute( + $input->param('title')?$input->param('title'):"", + $input->param('author')?$input->param('author'):"", + $input->param('copyrightdate')?$input->param('copyrightdate'):"", + $input->param('isbn')?$input->param('isbn'):"", + $input->param('publishercode')?$input->param('publishercode'):"", + $input->param('seriestitle')?$input->param('seriestitle'):"", + $input->param('note')?$input->param('note'):"", + $input->param('itemtype')?$input->param('itemtype'):"", + $input->param('rrp')?$input->param('rrp'):undef, + $bookfundgroupnumber ? $bookfundgroupnumber : undef, + $bookfundgroupnumber ? $bookfund_loop: undef, + $bookfundgroupnumber ? $audience_loop : undef, + $input->param('branch_loop')?$input->param('branch_loop'):"", + $input->param('ordernumber'), + ); + $sth->finish; + + + if ($input->param("aorr")) { + + ModStatus( + $input->param('ordernumber'), + $input->param("aorr"), + $input->param('reason'), + $bookfundgroupnumber, + $bookfund_loop, + $loggedinuser, + 2, ##$step + '', + $input, + ); + } + + + + print "Content-Type: text/html\n\n"; + exit; + +} +else { + +################################################################################################ +################################################################################################ +## display the suggestion details +################################################################################################ +################################################################################################ + my @bookfund_loop; + my @audience_loop; + my $chooseabookfund=0; + my $chooseanaudience=0; + my $bookfundgroupname; + my $bookfundname; + my $audiencename; + my $itemtypedescription; + + ################################################################################### + ## get the suggestion (from 'aq2orders') + ################################################################################### + my $suggestion; + my $dbh = C4::Context->dbh; + my $sth = $dbh->prepare(" + SELECT * + FROM aq2orders + WHERE ordernumber=? + "); + + $sth->execute($ordernumber); + my $suggestion = $sth->fetchrow_hashref; + my $bookfundgroupnumber=$suggestion->{'bookfundgroupnumber'}; + my $bookfundnumber=$suggestion->{'bookfundnumber'}; + my $branchcode=$suggestion->{'branchcode'}; + my $itemtype=$suggestion->{'itemtype'}; + my $audiencenumber=$suggestion->{'audiencenumber'}; + my $step=$suggestion->{'step'}; + $sth->finish; + + + ################################################################################### + ## get data from other tables + ################################################################################### + + ## get data about book fund groups + ################################################################################### + + my $dbh = C4::Context->dbh; + my $sth = $dbh->prepare(" + SELECT bookfundgroupname + FROM aq2bookfundgroups + WHERE bookfundgroupnumber=? + "); + + $sth->execute($bookfundgroupnumber); + + $bookfundgroupname = $sth->fetchrow_hashref->{'bookfundgroupname'}; + $sth->finish; + + + ## get data about book funds + ################################################################################### + + if ($bookfundgroupnumber) { + my $dbh = C4::Context->dbh; + my $sth = $dbh->prepare(" + SELECT bookfundnumber, bookfundname + FROM aq2bookfunds + WHERE bookfundgroupnumber=? + ORDER BY bookfundname + "); + + $sth->execute($bookfundgroupnumber); + + while (my $data = $sth->fetchrow_hashref) { + + if ($data->{'bookfundnumber'} eq $bookfundnumber) { + $data->{selected}=1; + $bookfundname=$data->{'bookfundname'}; + } + else { + $data->{selected}=0; + } + + push(@bookfund_loop, $data); + } + $sth->finish; + } + + + ## get data about audiences + ################################################################################### + + if ($bookfundgroupnumber) { + my $dbh = C4::Context->dbh; + my $sth = $dbh->prepare(" + SELECT audiencenumber, audiencename + FROM aq2audiences + WHERE bookfundgroupnumber=? + ORDER BY audiencename + "); + + $sth->execute($bookfundgroupnumber); + + ## get 'audiencenumber' value (in the table 'aq2orders') + + while (my $data = $sth->fetchrow_hashref) { + if ($data->{'audiencenumber'} eq $audiencenumber) { + $data->{selected}=1; + $audiencename = $data->{'audiencename'}; + } + else {$data->{selected}=0;} + + push(@audience_loop, $data); + } + $sth->finish; + } + + + ## get branch names + ################################################################################### + my $branches = GetBranches; + my @branch_loop; + my $branchname; + + foreach my $thisbranch (keys %$branches) { + my %row = (branchcode => $thisbranch, + branchname => $branches->{$thisbranch}->{'branchname'}, + ); + if ($thisbranch eq $branchcode) { + $row{"selected"}=1; + $branchname=$branches->{$thisbranch}->{'branchname'}; + } + else {$row{"selected"}=0;} + + push @branch_loop, \%row; + } + + + ## get item types + ################################################################################### + my $dbh = C4::Context->dbh; + my $sth=$dbh->prepare(" + SELECT description,itemtype + FROM itemtypes + ORDER BY description"); + $sth->execute(); + + my @itemtypeloop; + + while ( my $data = $sth->fetchrow_hashref ) { + if ($data->{'itemtype'} eq $itemtype) { + $data->{selected}=1; + $itemtypedescription=$data->{'description'}; + } + else { $data->{selected}=0;} + push( @itemtypeloop, $data); + } + $sth->finish; + + + ### get names + ################################################################################### + + ## name of the person who 1st wrote the suggestion + my $dbh = C4::Context->dbh; + my $sth = $dbh->prepare(" + SELECT firstname AS firstnamesuggestedby, + surname AS surnamesuggestedby + FROM borrowers + WHERE borrowernumber=? + "); + $sth->execute($suggestion->{'suggestedby'}); + my $namesuggestedby = $sth->fetchrow_hashref; + $sth->finish; + + ## name of the person who managed the suggestion in the General Purchase Department + + my $dbh = C4::Context->dbh; + my $sth = $dbh->prepare(" + SELECT firstname AS firstnamemanagedingpdby, + surname AS surnamemanagedingpdby + FROM borrowers + WHERE borrowernumber=? + "); + $sth->execute($suggestion->{'suggestionmanagedingpdby'}); + my $namemanagedingpdby = $sth->fetchrow_hashref; + $sth->finish; + + + ## name of the person who managed the suggestion in a Purchase Department + my $dbh = C4::Context->dbh; + my $sth = $dbh->prepare(" + SELECT firstname AS firstnamemanagedinpdby, + surname AS surnamemanagedinpdby + FROM borrowers + WHERE borrowernumber=? + "); + $sth->execute($suggestion->{'suggestionmanagedinpdby'}); + my $namemanagedinpdby = $sth->fetchrow_hashref; + $sth->finish; + + if ($chooseabookfund) { + $template->param(chooseabookfund => $chooseabookfund,); + warn "valeur de chooseabookfund = $chooseabookfund"; + } + + if ($chooseanaudience) { + $template->param(chooseanaudience => $chooseanaudience,); + warn "valeur de chooseanaudience = $chooseanaudience"; + } + + + ## list of reasons why a suggestion can be rejected + ################################################################################### + + my $reasons_loop = GetAuthorisedValues("SUGGEST"); + + +################################################################################################ +################################################################################################ +### $template +################################################################################################ +################################################################################################ + + $template->param( + + ##argument en entrée du script + + ordernumber => $ordernumber, + + ## other variables from 'aq2orders' + ######################################################################################## + + title => $suggestion->{'title'}, + author => $suggestion->{'author'}, + copyrightdate => $suggestion->{'copyrightdate'}, + isbn => $suggestion->{'isbn'}, + rrp => $suggestion->{'rrp'}, + publishercode => $suggestion->{'publishercode'}, + seriestitle => $suggestion->{'seriestitle'}, + note => $suggestion->{'note'}, + reason => $suggestion->{'reason'}, + reasons_loop => $reasons_loop, + bookfundgroupnumber => $bookfundgroupnumber, + bookfundgroup_loop => $bookfundgroupnumber, + + ## dates 'metric format' + suggestioncreatedon => format_date($suggestion->{'suggestioncreatedon'}), + suggestionmanagedingpdon => format_date($suggestion->{'suggestionmanagedingpdon'}), + suggestionmanagedinpdon => format_date($suggestion->{'suggestionmanagedinpdon'}), + + ## suggestions'status + status => $suggestion->{'status'}, + step2 => ($step==2)?1:0, + step3 => ($step==3)?1:0, + step3ormore => ($step>=3)?1:0, + rejected3 => (($suggestion->{'status'} eq "REJECTED") and ($step==3))?1:0, + + + ## variables from other tables + ######################################################################################## + + ## loop variables + bookfund_loop => \@bookfund_loop, + audience_loop => \@audience_loop, + branch_loop => \@branch_loop, + itemtypeloop => \@itemtypeloop, + + ## names (person who 1st write the suggestion, persons who managed the suggestion) + firstnamesuggestedby => $namesuggestedby->{'firstnamesuggestedby'}, + surnamesuggestedby => $namesuggestedby->{'surnamesuggestedby'}, + + firstnamemanagedingpdby =>$namemanagedingpdby->{'firstnamemanagedingpdby'}, + surnamemanagedingpdby =>$namemanagedingpdby->{'surnamemanagedingpdby'}, + + firstnamemanagedinpdby =>$namemanagedinpdby->{'firstnamemanagedinpdby'}, + surnamemanagedinpdby =>$namemanagedinpdby->{'surnamemanagedinpdby'}, + + ## other variables + branchname => $branchname, + bookfundgroupname => $bookfundgroupname, + bookfundname => $bookfundname, + audiencename => $audiencename, + itemtypedescription => $itemtypedescription, + + template => C4::Context->preference('template'), + ); + +} + + +output_html_with_http_headers $input, $cookie, $template->output; -- 2.39.5