From d7754b70a21d0cfef933a54e24f212ed04e3a0e5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marc=20V=C3=A9ron?= Date: Thu, 14 Jul 2016 15:50:22 +0200 Subject: [PATCH] Bug 16941: Can not add new patron in staff client To reproduce: - Go to staff client Home > Patron - New patron - Choose a category and fill form, submit Result: Form reloads, patron data are not saved. To test: - Apply patch - Repeat steps above - Verify that patron data are saved and the new patron's detail page displays - Try to enter a duplicate patron (e.g. same surname, firstname and birthday as above) - Verify that a duplicate message appears Signed-off-by: Hector Castro Works as advertised Signed-off-by: Jonathan Druart Signed-off-by: Kyle M Hall --- members/memberentry.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/members/memberentry.pl b/members/memberentry.pl index 4785691493..0987168886 100755 --- a/members/memberentry.pl +++ b/members/memberentry.pl @@ -228,9 +228,10 @@ if ( ( $op eq 'insert' ) and !$nodouble ) { $conditions->{firstname} = $newdata{firstname} if $newdata{firstname}; $conditions->{dateofbirth} = $newdata{dateofbirth} if $newdata{dateofbirth}; } + $nodouble = 1; my $patrons = Koha::Patrons->search($conditions); if ( $patrons->count > 0) { - $nodouble = 1; + $nodouble = 0; $check_member = $patrons->next->borrowernumber; } } -- 2.39.5