[% USE Asset %] [% USE Branches %] [% USE Categories %] [% USE KohaDates %] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Patrons › Merge patron records [% INCLUDE 'doc-head-close.inc' %] [% INCLUDE 'header.inc' %] [% INCLUDE 'patron-search.inc' %] [% BLOCK display_names %] [% SWITCH rs %] [% CASE 'Accountline' %]account lines [% CASE 'ArticleRequest' %]article requests [% CASE 'BorrowerAttribute' %]extended patron attributes [% CASE 'BorrowerDebarment' %]patron restrictions [% CASE 'BorrowerFile' %]patrons files [% CASE 'BorrowerModification' %]patron modification requests [% CASE 'ClubEnrollment' %]club enrollments [% CASE 'Issue' %]checkouts [% CASE 'ItemsLastBorrower' %]marks as last borrower of item [% CASE 'Linktracker' %]tracked link clicks [% CASE 'Message' %]patron messages [% CASE 'MessageQueue' %]patron notices [% CASE 'OldIssue' %]previous checkouts [% CASE 'OldReserve' %]filled holds [% CASE 'Rating' %]ratings [% CASE 'Reserve' %]current holds [% CASE 'Review' %]reviews [% CASE 'Statistic' %]statistics [% CASE 'SearchHistory' %]historical searches [% CASE 'Suggestion' %]purchase suggestions [% CASE 'TagAll' %]tags [% CASE 'Virtualshelfcontent' %]list items [% CASE 'Virtualshelfshare' %]list shares [% CASE 'Virtualshelve' %]lists [% CASE %][% rs %] [% END %] [% END %]

Merge patron records

[% IF action == 'show' %]

Select patron to keep. Data from the other patrons will be transferred to this patron record and the remaining patron records will be deleted.

[% FOREACH p IN patrons %] [% END %]
  Card Name Date of birth Category Library Expires on
[% p.cardnumber | html %] [% p.firstname | html %] [% p.surname | html %] [% p.dateofbirth | $KohaDates %] [% Categories.GetName( p.categorycode ) %] ([% p.categorycode %]) [% Branches.GetName( p.branchcode ) %] [% p.dateexpiry | $KohaDates %]
[% FOREACH p IN patrons %] [% END %]

[% ELSIF action == 'merge' %]

Results

[% IF error %]
Merge failed! The following error was reported: [% error %].
[% ELSE %]

Patron records merged into [% keeper.firstname %] [% keeper.surname %] ([% keeper.cardnumber | html %])

[% FOREACH pair IN results.merged.pairs %] [% SET patron = pair.value.patron %]
[% patron.firstname %] [% patron.surname %] ([% patron.cardnumber %])
[% FOREACH r IN pair.value.updated.pairs %] [% SET name = r.key %] [% SET count = r.value %] [% IF count %]

[% count %] [% PROCESS display_names rs = name %] transferred. [% IF name == 'Reserve' %] It is advisable to check for and resolve duplicate holds due to merging. [% END %]

[% END %] [% END %] [% END %] [% END %] View patron record [% END %]
[% MACRO jsinclude BLOCK %] [% Asset.js("js/members-menu.js") %] [% END %] [% INCLUDE 'intranet-bottom.inc' %]