From 7c9f045815116656f3e2e07601e0b9ac593f798b Mon Sep 17 00:00:00 2001 From: Chris Cormack Date: Thu, 10 Jan 2008 15:22:42 -0600 Subject: [PATCH] Fix for 1599 getting expiry date prepopulating on member entry Signed-off-by: Joshua Ferraro --- members/memberentry.pl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/members/memberentry.pl b/members/memberentry.pl index 2f8b659aa4..67a9ccf11f 100755 --- a/members/memberentry.pl +++ b/members/memberentry.pl @@ -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 ); -- 2.39.5