Lines 130-136
if(not $fromcat && $tocat) { #make sure we've specified the info we need.
Link Here
|
130 |
cronlogaction(); |
130 |
cronlogaction(); |
131 |
|
131 |
|
132 |
my $dbh=C4::Context->dbh; |
132 |
my $dbh=C4::Context->dbh; |
133 |
my @branches = C4::Branch::GetBranches(); |
|
|
134 |
#get today's date, format it and subtract upperagelimit |
133 |
#get today's date, format it and subtract upperagelimit |
135 |
my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); |
134 |
my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); |
136 |
$year +=1900; |
135 |
$year +=1900; |
Lines 178-184
if ( not $noaction) {
Link Here
|
178 |
} else { print "Updated $res patrons\n"; } |
177 |
} else { print "Updated $res patrons\n"; } |
179 |
} else { # branch was not supplied, processing all branches |
178 |
} else { # branch was not supplied, processing all branches |
180 |
$verbose and print "Looking in all branches for patrons to update from $fromcat to $tocat that were born before $itsyourbirthday\n"; |
179 |
$verbose and print "Looking in all branches for patrons to update from $fromcat to $tocat that were born before $itsyourbirthday\n"; |
181 |
foreach my $branchcode (@branches) { |
|
|
182 |
my $query=qq|UPDATE borrowers |
180 |
my $query=qq|UPDATE borrowers |
183 |
SET guarantorid ='0', |
181 |
SET guarantorid ='0', |
184 |
categorycode =? |
182 |
categorycode =? |
Lines 190-196
if ( not $noaction) {
Link Here
|
190 |
if ($res eq '0E0') { print "No patrons updated\n"; |
188 |
if ($res eq '0E0') { print "No patrons updated\n"; |
191 |
} else { print "Updated $res patrons\n"; } |
189 |
} else { print "Updated $res patrons\n"; } |
192 |
} |
190 |
} |
193 |
} |
|
|
194 |
} else { |
191 |
} else { |
195 |
my $birthday; |
192 |
my $birthday; |
196 |
if ( $mybranch ) { |
193 |
if ( $mybranch ) { |
197 |
- |
|
|