Lines 136-153
number.
Link Here
|
136 |
|
136 |
|
137 |
C<$borrower> is a reference-to-hash whose keys are the fields of the |
137 |
C<$borrower> is a reference-to-hash whose keys are the fields of the |
138 |
borrowers table in the Koha database. In addition, |
138 |
borrowers table in the Koha database. In addition, |
139 |
C<$borrower-E<gt>{flags}> is a hash giving more detailed information |
|
|
140 |
about the patron. Its keys act as flags : |
141 |
|
142 |
if $borrower->{flags}->{LOST} { |
143 |
# Patron's card was reported lost |
144 |
} |
145 |
|
146 |
If the state of a flag means that the patron should not be |
147 |
allowed to borrow any more books, then it will have a C<noissues> key |
148 |
with a true value. |
149 |
|
150 |
See patronflags for more details. |
151 |
|
139 |
|
152 |
=cut |
140 |
=cut |
153 |
|
141 |
|
Lines 188-196
sub GetMemberDetails {
Link Here
|
188 |
my $borrower = $sth->fetchrow_hashref; |
176 |
my $borrower = $sth->fetchrow_hashref; |
189 |
return unless $borrower; |
177 |
return unless $borrower; |
190 |
|
178 |
|
191 |
my $flags = patronflags( $borrower); |
|
|
192 |
$borrower->{'flags'} = $flags; |
193 |
|
194 |
$borrower->{'is_expired'} = 0; |
179 |
$borrower->{'is_expired'} = 0; |
195 |
$borrower->{'is_expired'} = 1 if |
180 |
$borrower->{'is_expired'} = 1 if |
196 |
defined($borrower->{dateexpiry}) && |
181 |
defined($borrower->{dateexpiry}) && |
Lines 499-505
sub ModMember {
Link Here
|
499 |
my $schema = Koha::Database->new()->schema; |
484 |
my $schema = Koha::Database->new()->schema; |
500 |
my @columns = $schema->source('Borrower')->columns; |
485 |
my @columns = $schema->source('Borrower')->columns; |
501 |
my $new_borrower = { map { join(' ', @columns) =~ /$_/ ? ( $_ => $data{$_} ) : () } keys(%data) }; |
486 |
my $new_borrower = { map { join(' ', @columns) =~ /$_/ ? ( $_ => $data{$_} ) : () } keys(%data) }; |
502 |
delete $new_borrower->{flags}; |
|
|
503 |
|
487 |
|
504 |
$new_borrower->{dateofbirth} ||= undef if exists $new_borrower->{dateofbirth}; |
488 |
$new_borrower->{dateofbirth} ||= undef if exists $new_borrower->{dateofbirth}; |
505 |
$new_borrower->{dateenrolled} ||= undef if exists $new_borrower->{dateenrolled}; |
489 |
$new_borrower->{dateenrolled} ||= undef if exists $new_borrower->{dateenrolled}; |