Fix for 1599 getting expiry date prepopulating on member entry
authorChris Cormack <crc@liblime.com>
Thu, 10 Jan 2008 21:22:42 +0000 (15:22 -0600)
committerJoshua Ferraro <jmf@liblime.com>
Thu, 10 Jan 2008 21:36:40 +0000 (15:36 -0600)
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
members/memberentry.pl

index 2f8b659..67a9ccf 100755 (executable)
@@ -264,7 +264,10 @@ if (C4::Context->preference("IndependantBranches")) {
   }
 }
 if ($op eq 'add'){
-  $template->param( updtype => 'I',step_1=>1,step_2=>1,step_3=>1);
+       my $arg2 = $newdata{'dateenrolled'} || sprintf('%04d-%02d-%02d', Today()); 
+       $data{'dateexpiry'} = GetExpiryDate($newdata{'categorycode'},$arg2);
+       $template->param( updtype => 'I',step_1=>1,step_2=>1,step_3=>1);
+       
 } 
 if ($op eq "modify")  {
   $template->param( updtype => 'M',modify => 1 );