@@ -, +, @@ --- Koha/Patron.pm | 8 +++++ api/v1/swagger/definitions/patron.yaml | 10 ++++++ api/v1/swagger/paths/patrons.yaml | 2 ++ .../prog/en/includes/patron-search.inc | 31 +++++++++++++++++-- 4 files changed, 49 insertions(+), 2 deletions(-) --- a/Koha/Patron.pm +++ a/Koha/Patron.pm @@ -1206,6 +1206,8 @@ sub get_overdues { ); } +sub overdues { my $self = shift; return $self->get_overdues(@_); } + =head3 get_routing_lists my $routinglists = $patron->get_routing_lists @@ -2054,6 +2056,12 @@ sub safe_to_delete { return Koha::Result::Boolean->new(1); } +sub account_balance { + my ($self) = @_; + return $self->account->balance; +} + + =head2 Internal methods =head3 _type --- a/api/v1/swagger/definitions/patron.yaml +++ a/api/v1/swagger/definitions/patron.yaml @@ -333,6 +333,16 @@ properties: - integer - "null" description: Number of checkouts + overdues_count: + type: + - integer + - "null" + description: Number of overdued checkouts + account_balance: + type: + - number + - "null" + description: Balance of the patron's account additionalProperties: false required: - surname --- a/api/v1/swagger/paths/patrons.yaml +++ a/api/v1/swagger/paths/patrons.yaml @@ -386,6 +386,8 @@ x-koha-embed: - extended_attributes - checkouts+count + - overdues+count + - account_balance post: x-mojo-to: Patrons#add operationId: addPatron --- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc @@ -106,6 +106,7 @@ [% CASE 'borrowernotes' %]