|
Lines 243-255
borrower number.
Link Here
|
| 243 |
|
243 |
|
| 244 |
#' |
244 |
#' |
| 245 |
# FIXME - Okay, so what does the above actually _mean_? |
245 |
# FIXME - Okay, so what does the above actually _mean_? |
| 246 |
sub getnextacctno ($) { |
246 |
sub getnextacctno { |
| 247 |
my ($borrowernumber) = shift or return undef; |
247 |
my ($borrowernumber) = shift or return; |
| 248 |
my $sth = C4::Context->dbh->prepare( |
248 |
my $sth = C4::Context->dbh->prepare( |
| 249 |
"SELECT accountno+1 FROM accountlines |
249 |
"SELECT accountno+1 FROM accountlines |
| 250 |
WHERE (borrowernumber = ?) |
250 |
WHERE (borrowernumber = ?) |
| 251 |
ORDER BY accountno DESC |
251 |
ORDER BY accountno DESC |
| 252 |
LIMIT 1" |
252 |
LIMIT 1" |
| 253 |
); |
253 |
); |
| 254 |
$sth->execute($borrowernumber); |
254 |
$sth->execute($borrowernumber); |
| 255 |
return ($sth->fetchrow || 1); |
255 |
return ($sth->fetchrow || 1); |
| 256 |
- |
|
|