[Koha-patches] [PATCH 2/7] (bug #4954) allow date expiry modification only on step 0 and 3
Henri-Damien LAURENT
henridamien.laurent at biblibre.com
Wed Jul 7 15:58:59 CEST 2010
This add a verification, to allow automatic modification of expiry date, only if we are on a page that allow modification of expiry date.
---
members/memberentry.pl | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/members/memberentry.pl b/members/memberentry.pl
index c121460..6ec6d8e 100755
--- a/members/memberentry.pl
+++ b/members/memberentry.pl
@@ -278,7 +278,7 @@ if ($op eq 'save' || $op eq 'insert'){
}
}
-if ($op eq 'modify' || $op eq 'insert' || $op eq 'save' ){
+if ( ($op eq 'modify' || $op eq 'insert' || $op eq 'save') and ($step == 0 or $step == 3 )){
if (exists ($newdata{'dateexpiry'}) && !($newdata{'dateexpiry'})){
my $arg2 = $newdata{'dateenrolled'} || C4::Dates->today('iso');
$newdata{'dateexpiry'} = GetExpiryDate($newdata{'categorycode'},$arg2);
--
1.7.0.4
More information about the Koha-patches
mailing list