Commit a514315f authored by Petter Goksøyr Åsen's avatar Petter Goksøyr Åsen Committed by Torstein
Browse files

DEICH-5925 update fields returned from patron search

parent 1122a774
...@@ -105,7 +105,10 @@ WITH t AS (SELECT upperagelimit from categories where categorycode = 'B') ...@@ -105,7 +105,10 @@ WITH t AS (SELECT upperagelimit from categories where categorycode = 'B')
SELECT SELECT
dateofbirth, dateofbirth,
TIMESTAMPDIFF(YEAR, dateofbirth, CURDATE()) AS age, TIMESTAMPDIFF(YEAR, dateofbirth, CURDATE()) AS age,
CONCAT(surname, ', ', firstname) AS name, surname,
firstname,
borrowernumber,
cardnumber,
categorycode categorycode
FROM borrowers, t FROM borrowers, t
WHERE WHERE
...@@ -236,7 +239,7 @@ sub Update { ...@@ -236,7 +239,7 @@ sub Update {
. " WHERE borrowernumber = ?"; . " WHERE borrowernumber = ?";
my $sth = $dbh->prepare($q); my $sth = $dbh->prepare($q);
$sth->execute( $self->{patron}->{borrowernumber} ) or Deichman::Exception::Patron->throw($dbh->errstr); $sth->execute( $self->{patron}->{borrowernumber} ) or Deichman::Exception::Patron->throw($dbh->errstr);
# DEICH-5747 : send update to MessageQueue if adult # DEICH-5747 : send update to MessageQueue if adult
if ($self->{patron}->{categorycode} eq "V") { if ($self->{patron}->{categorycode} eq "V") {
# Check if it's a new user that should be subscribed. # Check if it's a new user that should be subscribed.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment