From bf988e4dc802e964b7ff0154a003c53079dd3920 Mon Sep 17 00:00:00 2001 From: Paul POULAIN Date: Sun, 30 Sep 2007 22:22:32 +0200 Subject: [PATCH] just reindenting Signed-off-by: Chris Cormack --- .../prog/en/modules/tools/overduerules.tmpl | 343 +++++++++--------- tools/overduerules.pl | 116 +++--- 2 files changed, 236 insertions(+), 223 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/overduerules.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/overduerules.tmpl index c29ec7c5e8..7d62f19101 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/overduerules.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/overduerules.tmpl @@ -11,171 +11,184 @@
-
-
+
+
-

Defining overdue notice triggers for default overdue notice trigers

-
-

Define up to three notices below. Specify the 'Delay' (days after item is overdue), a Notice to send, and whether to change the - status of the patron to 'Debarred'

-

Note: you must specify the delay or the entry will be ignored. Delay is measured in days

-
-
- - - -
- -
-

Data error

-

The following fields have a forbidden value. Correct them and press OK again :

    - -
  • Delay for patron category has some unexpected characters. There should be only numerical characters.
  • - - -
  • Delay1 should be less than Delay2 which should be less than Delay3 for patron category
  • - -
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Notice triggers for overdues: default library -

INPUT SAVED

- -
 FirstSecondThird
 DelayNoticeDebarDelayNoticeDebarDelayNoticeDebar
- - - - " size="5" value="" /> - - - - - " value="" /> - - - - - - - - " checked="checked" value="1" /> - - " value="1" /> - - - - - - " size="5" value="" /> - - - - - " value="" /> - - - - - - - - - " checked="checked" value="1" /> - - " value="1" /> - - - - - - " size="5" value="" /> - - - - - " value="" /> - - - - - - - - " checked="checked" value="1" /> - - " value="1" /> -
- - -
- -
-
-
- -
+

Defining overdue actions for default overdue actions

+
+

Delay is the number of days after an issue is due before an action is triggered.

+

If you want Koha to trigger an action (send a letter or debar member), delay is needed.

+

Columns must be filled left to right: if the first column is blank, other columns will be ignored.

+
+
+ + + +
+ +
+

Data error

+

The following fields have a forbidden value. Correct them and press OK again :

+
    + +
  • Delay for borrower category has some unexpected characters. There should be only numerical characters.
  • + + +
  • Delay1 should be less than Delay2 which should be less than Delay3 for borrower category
  • + +
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Rules for overdue actions: default branch + +

INPUT SAVED

+ +
 FirstSecondThird
 DelayLetterDebarDelayLetterDebarDelayLetterDebar
+ + + + " size="5" value="" /> + + + + + + " value="" /> + + + + + + + + + " checked="checked" value="1" /> + + " value="1" /> + + + + + + " size="5" value="" /> + + + + + + " value="" /> + + + + + + + + + " checked="checked" value="1" /> + + " value="1" /> + + + + + + " size="5" value="" /> + + + + + + " value="" /> + + + + + + + + + " checked="checked" value="1" /> + + " value="1" /> + +
+ +
+
+
+
+ +
diff --git a/tools/overduerules.pl b/tools/overduerules.pl index 5bdec702e2..6749a05b5f 100755 --- a/tools/overduerules.pl +++ b/tools/overduerules.pl @@ -140,66 +140,66 @@ my @line_loop; my $toggle= 1; # my $i=0; while (my $data=$sth->fetchrow_hashref){ - if ( $toggle eq 1 ) { - $toggle = 0; - } else { - $toggle = 1; - } - my %row = ( overduename => $data->{'categorycode'}, - toggle => $toggle, - line => $data->{'description'} - ); - if (%temphash){ - for (my $i=1;$i<=3;$i++){ - $row{"delay$i"}=$temphash{$data->{'categorycode'}}->{"delay$i"}; - $row{"debarred$i"}=$temphash{$data->{'categorycode'}}->{"debarred$i"}; - if ($countletters){ - my @letterloop; - foreach my $thisletter (keys %$letters) { - my $selected = 1 if $thisletter eq $temphash{$data->{'categorycode'}}->{"letter$i"}; - my %letterrow =(value => $thisletter, - selected => $selected, - lettername => $letters->{$thisletter}, - ); - push @letterloop, \%letterrow; - } - $row{"letterloop$i"}=\@letterloop; - } else { - $row{"noletter"}=1; - $row{"letter$i"}=$temphash{$data->{'categorycode'}}->{"letter$i"}; - } - } - } else { - #getting values from table - my $sth2=$dbh->prepare("SELECT * from overduerules WHERE branchcode=? and categorycode=?"); - $sth2->execute($branch,$data->{'categorycode'}); - my $dat=$sth2->fetchrow_hashref; - for (my $i=1;$i<=3;$i++){ - if ($countletters){ - my @letterloop; - foreach my $thisletter (keys %$letters) { - my $selected = 1 if $thisletter eq $dat->{"letter$i"}; - my %letterrow =(value => $thisletter, - selected => $selected, - lettername => $letters->{$thisletter}, - ); - push @letterloop, \%letterrow; - } - $row{"letterloop$i"}=\@letterloop; - } else { - $row{"noletter"}=1; - if ($dat->{"letter$i"}){$row{"letter$i"}=$dat->{"letter$i"};} - } - if ($dat->{"delay$i"}){$row{"delay$i"}=$dat->{"delay$i"};} - if ($dat->{"debarred$i"}){$row{"debarred$i"}=$dat->{"debarred$i"};} - } - $sth2->finish; - } - push @line_loop,\%row; + if ( $toggle eq 1 ) { + $toggle = 0; + } else { + $toggle = 1; + } + my %row = ( overduename => $data->{'categorycode'}, + toggle => $toggle, + line => $data->{'description'} + ); + if (%temphash){ + for (my $i=1;$i<=3;$i++){ + $row{"delay$i"}=$temphash{$data->{'categorycode'}}->{"delay$i"}; + $row{"debarred$i"}=$temphash{$data->{'categorycode'}}->{"debarred$i"}; + if ($countletters){ + my @letterloop; + foreach my $thisletter (keys %$letters) { + my $selected = 1 if $thisletter eq $temphash{$data->{'categorycode'}}->{"letter$i"}; + my %letterrow =(value => $thisletter, + selected => $selected, + lettername => $letters->{$thisletter}, + ); + push @letterloop, \%letterrow; + } + $row{"letterloop$i"}=\@letterloop; + } else { + $row{"noletter"}=1; + $row{"letter$i"}=$temphash{$data->{'categorycode'}}->{"letter$i"}; + } + } + } else { + #getting values from table + my $sth2=$dbh->prepare("SELECT * from overduerules WHERE branchcode=? and categorycode=?"); + $sth2->execute($branch,$data->{'categorycode'}); + my $dat=$sth2->fetchrow_hashref; + for (my $i=1;$i<=3;$i++){ + if ($countletters){ + my @letterloop; + foreach my $thisletter (keys %$letters) { + my $selected = 1 if $thisletter eq $dat->{"letter$i"}; + my %letterrow =(value => $thisletter, + selected => $selected, + lettername => $letters->{$thisletter}, + ); + push @letterloop, \%letterrow; + } + $row{"letterloop$i"}=\@letterloop; + } else { + $row{"noletter"}=1; + if ($dat->{"letter$i"}){$row{"letter$i"}=$dat->{"letter$i"};} + } + if ($dat->{"delay$i"}){$row{"delay$i"}=$dat->{"delay$i"};} + if ($dat->{"debarred$i"}){$row{"debarred$i"}=$dat->{"debarred$i"};} + } + $sth2->finish; + } + push @line_loop,\%row; } $sth->finish; $template->param(table=> \@line_loop, - branchloop => \@branchloop, - branch => $branch); + branchloop => \@branchloop, + branch => $branch); output_html_with_http_headers $input, $cookie, $template->output; -- 2.39.5