|
Lines 529-543
sub UpdateFine {
Link Here
|
| 529 |
# account type has one of several values, but what does this _mean_? |
529 |
# account type has one of several values, but what does this _mean_? |
| 530 |
# Does it look up existing fines for this item? |
530 |
# Does it look up existing fines for this item? |
| 531 |
# FIXME - What are these various account types? ("FU", "O", "F", "M") |
531 |
# FIXME - What are these various account types? ("FU", "O", "F", "M") |
| 532 |
# "L" is LOST item |
532 |
# "L" is LOST item |
| 533 |
# "A" is Account Management Fee |
533 |
# "A" is Account Management Fee |
| 534 |
# "N" is New Card |
534 |
# "N" is New Card |
| 535 |
# "M" is Sundry |
535 |
# "M" is Sundry |
| 536 |
# "O" is Overdue ?? |
536 |
# "O" is Overdue ?? |
| 537 |
# "F" is Fine ?? |
537 |
# "F" is Fine ?? |
| 538 |
# "FU" is Fine UPDATE?? |
538 |
# "FU" is Fine UPDATE?? |
| 539 |
# "Pay" is Payment |
539 |
# "Pay" is Payment |
| 540 |
# "REF" is Cash Refund |
540 |
# "REF" is Cash Refund |
| 541 |
my $sth = $dbh->prepare( |
541 |
my $sth = $dbh->prepare( |
| 542 |
"SELECT * FROM accountlines |
542 |
"SELECT * FROM accountlines |
| 543 |
WHERE borrowernumber=? |
543 |
WHERE borrowernumber=? |
|
Lines 593-605
sub UpdateFine {
Link Here
|
| 593 |
accounttype => 'FU', |
593 |
accounttype => 'FU', |
| 594 |
} |
594 |
} |
| 595 |
)->store(); |
595 |
)->store(); |
| 596 |
|
|
|
| 597 |
# FIXME: BOGUS query cannot ensure uniqueness w/ LIKE %x% !!! |
| 598 |
# LIMIT 1 added to prevent multiple affected lines |
| 599 |
# FIXME: accountlines table needs unique key!! Possibly a combo of borrowernumber and accountline. |
| 600 |
# But actually, we should just have a regular autoincrementing PK and forget accountline, |
| 601 |
# including the bogus getnextaccountno function (doesn't prevent conflict on simultaneous ops). |
| 602 |
# FIXME: Why only 2 account types here? |
| 603 |
} |
596 |
} |
| 604 |
} else { |
597 |
} else { |
| 605 |
if ( $amount ) { # Don't add new fines with an amount of 0 |
598 |
if ( $amount ) { # Don't add new fines with an amount of 0 |
| 606 |
- |
|
|