From 44f3f7bb945fa1051308d07b55b708d469db5638 Mon Sep 17 00:00:00 2001 From: Paul Poulain Date: Wed, 28 Oct 2009 19:21:14 +0100 Subject: [PATCH] removing useless files & fixing broken link --- .../en/modules/suggestion/acceptorreject.tmpl | 246 -------- .../modules/suggestion/acceptorrejectpd.tmpl | 442 ------------- .../modules/suggestion/suggestiondetails.tmpl | 580 ------------------ .../suggestion/suggestiondetailspd.tmpl | 551 ----------------- suggestion/acceptorreject.pl | 209 ------- suggestion/acceptorrejectpd.pl | 267 -------- suggestion/suggestiondetails.pl | 451 -------------- suggestion/suggestiondetailspd.pl | 428 ------------- 8 files changed, 3174 deletions(-) delete mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/acceptorreject.tmpl delete mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/acceptorrejectpd.tmpl delete mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestiondetails.tmpl delete mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestiondetailspd.tmpl delete mode 100755 suggestion/acceptorreject.pl delete mode 100755 suggestion/acceptorrejectpd.pl delete mode 100755 suggestion/suggestiondetails.pl delete 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 deleted file mode 100644 index 4a19b5e5a6..0000000000 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/acceptorreject.tmpl +++ /dev/null @@ -1,246 +0,0 @@ - -Koha › Acquisitions › Suggestions Management - - - - - - - - - - - -
- -
-
-
- -

Suggestions

-
Sorting...
-
Loading tab...
-
- - - -
"> -
" method="post" action="/cgi-bin/koha/suggestion/acceptorreject.pl#"> - - " /> - - - t"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SuggestionNotesSuggested byDateReasonReason UpdateCheckedAcceptRejectDelete
- ">, by ">
- © - ; Volume: - ; ISBN : ; Published by in in
- ">, -
- ()
- () -
- - - - " value="" /> - -
" class="select"> - No reasons defined in authorized values -
-
"> - " value="please note your reason here..." /> -

">back to list

-
- -
- - " 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="REJECTED" readonly="readonly" checked="checked" /> - - " name="" type="radio" value="REJECTED" /> - - - " name="" type="radio" value="delete" /> -
-
all"> - ">Mark all with this reason -
- -
all"> - - all" name="other-reasonall" value="please note your reason here..." /> ">Mark all with this reason all">Cancel -
-
-
-
- - 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 deleted file mode 100644 index 77a626c8e5..0000000000 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/acceptorrejectpd.tmpl +++ /dev/null @@ -1,442 +0,0 @@ - - -Koha › Suggestions Management - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
-
-
- - -

Suggestions (Purchase Department - )

- - - - - - - -
- - - - - - - - - - - - -
- - - - - - -
"> - - - " /> - - - - - - - - - - - - - - " 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 deleted file mode 100644 index f05338e8b9..0000000000 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestiondetails.tmpl +++ /dev/null @@ -1,580 +0,0 @@ - - - - - - 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 deleted file mode 100644 index 24be4eb08e..0000000000 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestiondetailspd.tmpl +++ /dev/null @@ -1,551 +0,0 @@ - - - - - - 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/suggestion/acceptorreject.pl b/suggestion/acceptorreject.pl deleted file mode 100755 index d4615a1bf9..0000000000 --- a/suggestion/acceptorreject.pl +++ /dev/null @@ -1,209 +0,0 @@ -#!/usr/bin/perl - -# Copyright 2000-2002 Katipo Communications -# -# 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 title - -=item author - -=item note - -=item copyrightdate - -=item publishercode - -=item volumedesc - -=item publicationyear - -=item place - -=item isbn - -=item status - -=item suggestedbyme - -=item op - -op can be : - * aorr_confirm : to confirm accept or reject - * delete_confirm : to confirm the deletion - * accepted : to display only accepted. - -=back - - -=cut - -use strict; -use warnings; - -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); - - -my $input = new CGI; -my $title = $input->param('title'); -my $author = $input->param('author'); -my $note = $input->param('note'); -my $copyrightdate = $input->param('copyrightdate'); -my $publishercode = $input->param('publishercode'); -my $volumedesc = $input->param('volumedesc'); -my $publicationyear = $input->param('publicationyear'); -my $place = $input->param('place'); -my $isbn = $input->param('isbn'); -my $status = $input->param('status'); -my $suggestedbyme = $input->param('suggestedbyme'); -my $op = $input->param('op') || "aorr_confirm"; - -my $dbh = C4::Context->dbh; -my ( $template, $loggedinuser, $cookie ) = get_template_and_user( - { - template_name => "suggestion/acceptorreject.tmpl", - type => "intranet", - query => $input, - authnotrequired => 1, - flagsrequired => { catalogue => 1 }, - } -); - -my $suggestions; - -my $branchcode; -my $userenv = C4::Context->userenv; -if ($userenv) { - unless ($userenv->{flags} % 2 == 1){ - $branchcode=$userenv->{branch}; - } -} - -if ( $op eq "aorr_confirm" ) { - my $parameters=$input->Vars; - my @deletelist; - my $suggestiontype=$parameters->{suggestiontype}; - foreach my $suggestionid (keys %$parameters){ - next unless $suggestionid=~/^\d+$/; - ## it is a suggestion - if ($parameters->{$suggestionid}=~/delete/i){ - push @deletelist,$suggestionid; - } - else { - ## it is not a deletion - ## Get the Reason - my $reason = $parameters->{"reason$suggestionid"}; - if ( $reason eq "other" ) { - $reason = $parameters->{"other-reason$suggestionid"}; - } - unless ($reason){ - $reason= $parameters->{"reason".$suggestiontype."all"}; - if ( $reason eq "other" ) { - $reason = $parameters->{"other-reason".$suggestiontype."all"}; - } - } - ModStatus( $suggestionid, $parameters->{$suggestionid}, $loggedinuser, '', $reason ); - } - } - $op = "else"; - if (scalar(@deletelist)>0){ - my $params = "&delete_field=".join ("&delete_field=",@deletelist); - print $input->redirect("/cgi-bin/koha/suggestion/acceptorreject.pl?op=delete_confirm$params"); - exit; - } -} -elsif ( $op eq "delete_confirm" ) { - my @delete_field = $input->param("delete_field"); - foreach my $delete_field (@delete_field) { - &DelSuggestion( $loggedinuser, $delete_field,"intranet" ); - } - $op = 'else'; -} - -my $reasonsloop = GetAuthorisedValues("SUGGEST"); -my $pending_suggestions = &SearchSuggestion("", "", "", "", 'ASKED', "", $branchcode); -map { $_->{'reasonsloop'} = $reasonsloop; $_->{'date'} = format_date($_->{'date'}) } @$pending_suggestions; -my $accepted_suggestions = &GetSuggestionByStatus('ACCEPTED', $branchcode); -map { $_->{'reasonsloop'} = $reasonsloop; $_->{'date'} = format_date($_->{'date'}) } @$accepted_suggestions; -my $rejected_suggestions = &GetSuggestionByStatus('REJECTED', $branchcode); -map { $_->{'reasonsloop'} = $reasonsloop; $_->{'date'} = format_date($_->{'date'}) } @$rejected_suggestions; - -# FIXME: BAD use of map in VOID context. - -my @allsuggestions; -push @allsuggestions, - { "suggestiontype" => "accepted", - 'suggestions_loop' => $accepted_suggestions, - 'reasonsloop' => $reasonsloop - }; -push @allsuggestions, - { "suggestiontype" => "pending", - 'suggestions_loop' => $pending_suggestions, - 'reasonsloop' => $reasonsloop - }; -push @allsuggestions, - { "suggestiontype" => "rejected", - 'suggestions_loop' => $rejected_suggestions, - 'reasonsloop' => $reasonsloop - }; - -$template->param( - suggestions => \@allsuggestions, - "op_$op" => 1, - dateformat => C4::Context->preference("dateformat"), -); - -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 deleted file mode 100755 index 5cdf8ca382..0000000000 --- a/suggestion/acceptorrejectpd.pl +++ /dev/null @@ -1,267 +0,0 @@ -#!/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 deleted file mode 100755 index 777f189185..0000000000 --- a/suggestion/suggestiondetails.pl +++ /dev/null @@ -1,451 +0,0 @@ -#!/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 deleted file mode 100755 index ba1f03cfcc..0000000000 --- a/suggestion/suggestiondetailspd.pl +++ /dev/null @@ -1,428 +0,0 @@ -#!/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