From 425d7eb54fd4f098c01e7c04c1070aa12b8c05da Mon Sep 17 00:00:00 2001 From: rangi Date: Thu, 25 Sep 2003 09:23:26 +0000 Subject: [PATCH] Fix for bug 618 duplicate cardnumber checking --- C4/Input.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/C4/Input.pm b/C4/Input.pm index e1824a3450..1bf1ea6277 100644 --- a/C4/Input.pm +++ b/C4/Input.pm @@ -68,7 +68,7 @@ number or ISBN is valid. =item checkdigit - $valid = &checkdigit($env, $cardnumber); + $valid = &checkdigit($env, $cardnumber $nounique); Takes a card number, computes its check digit, and compares it to the checkdigit at the end of C<$cardnumber>. Returns a true value iff @@ -90,9 +90,6 @@ sub checkdigit { #different from the one where the checkdigit on the number is #not correct - if (C4::Context->preference("checkdigit") eq "none") { - return 1; - } unless ( $nounique ) { my $dbh=C4::Context->dbh; @@ -105,6 +102,9 @@ sub checkdigit { return 0; } } + if (C4::Context->preference("checkdigit") eq "none") { + return 1; + } my @weightings = (8,4,6,3,5,2,1); my $sum; -- 2.39.5