|
Lines 35-61
use Data::Dumper;
Link Here
|
| 35 |
this module is a new interface, allow to the librarian to check all items on overdues (based on the acountlines type 'FU' ) |
35 |
this module is a new interface, allow to the librarian to check all items on overdues (based on the acountlines type 'FU' ) |
| 36 |
this interface is filtered by branches (automatically), and by location (optional) .... |
36 |
this interface is filtered by branches (automatically), and by location (optional) .... |
| 37 |
|
37 |
|
| 38 |
FIXME for this time, we have only four methods to notify : |
|
|
| 39 |
- mail : work with a batch programm |
| 40 |
- letter : for us, the letters are generated by an open-office program |
| 41 |
- phone : Simple method, when the method 'phone' is selected, we consider, that the borrower as been notified, and the notify send date is implemented |
| 42 |
- considered lost : for us if the document is on the third overduelevel, |
| 43 |
|
| 44 |
FIXME the methods are actually hardcoded for the levels : (maybe can be improved by a new possibility in overduerule) |
| 45 |
|
| 46 |
level 1 : three methods are possible : - mail, letter, phone |
| 47 |
level 2 : only one method is possible : - letter |
| 48 |
level 3 : only methode is possible : - Considered Lost |
| 49 |
|
| 50 |
the documents displayed on this interface, are checked on three points |
| 51 |
- 1) the document must be on accountlines (Type 'FU') |
| 52 |
- 2) item issues is not returned |
| 53 |
- 3) this item as not been already notify |
| 54 |
|
| 55 |
FIXME: who is the author? |
| 56 |
FIXME: No privisions (i.e. "actions") for handling notices are implemented. |
| 57 |
FIXME: This is linked as "Overdue Fines" but the relationship to fines in GetOverduesForBranch is more complicated than that. |
| 58 |
|
| 59 |
=cut |
38 |
=cut |
| 60 |
|
39 |
|
| 61 |
my $input = new CGI; |
40 |
my $input = new CGI; |
|
Lines 77-83
my $borrowernumber = $input->param('borrowernumber');
Link Here
|
| 77 |
my $itemnumber = $input->param('itemnumber'); |
56 |
my $itemnumber = $input->param('itemnumber'); |
| 78 |
my $method = $input->param('method'); |
57 |
my $method = $input->param('method'); |
| 79 |
my $overduelevel = $input->param('overduelevel'); |
58 |
my $overduelevel = $input->param('overduelevel'); |
| 80 |
my $notifyId = $input->param('notifyId'); |
|
|
| 81 |
my $location = $input->param('location'); |
59 |
my $location = $input->param('location'); |
| 82 |
|
60 |
|
| 83 |
# FIXME: better check that borrowernumber is defined and valid. |
61 |
# FIXME: better check that borrowernumber is defined and valid. |
|
Lines 118-139
foreach my $num (@getoverdues) {
Link Here
|
| 118 |
$overdueforbranch{'itemnumber'} = $num->{'itemnumber'}; |
96 |
$overdueforbranch{'itemnumber'} = $num->{'itemnumber'}; |
| 119 |
$overdueforbranch{'cardnumber'} = $num->{'cardnumber'}; |
97 |
$overdueforbranch{'cardnumber'} = $num->{'cardnumber'}; |
| 120 |
|
98 |
|
| 121 |
# now we add on the template, the differents values of notify_level |
|
|
| 122 |
# FIXME: numerical comparison, not string eq. |
| 123 |
if ( $num->{'notify_level'} eq '1' ) { |
| 124 |
$overdueforbranch{'overdue1'} = 1; |
| 125 |
$overdueforbranch{'overdueLevel'} = 1; |
| 126 |
} |
| 127 |
elsif ( $num->{'notify_level'} eq '2' ) { |
| 128 |
$overdueforbranch{'overdue2'} = 1; |
| 129 |
$overdueforbranch{'overdueLevel'} = 2; |
| 130 |
} |
| 131 |
elsif ( $num->{'notify_level'} eq '3' ) { |
| 132 |
$overdueforbranch{'overdue3'} = 1; |
| 133 |
$overdueforbranch{'overdueLevel'} = 3; |
| 134 |
} |
| 135 |
$overdueforbranch{'notify_id'} = $num->{'notify_id'}; |
| 136 |
|
| 137 |
push( @overduesloop, \%overdueforbranch ); |
99 |
push( @overduesloop, \%overdueforbranch ); |
| 138 |
} |
100 |
} |
| 139 |
|
101 |
|