If we empty the expiration date field, 0000-00-00 date is putted in the db.
This patch keep the expiration date in the db, if the posted form have an empty 
account expiration date.
---
 members/memberentry.pl |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/members/memberentry.pl b/members/memberentry.pl
index dba1818..60af896 100755
--- a/members/memberentry.pl
+++ b/members/memberentry.pl
@@ -129,6 +129,7 @@ if ($op eq 'insert' || $op eq 'modify' || $op eq 'save') {
                        push(@errors,"ERROR_$_");
                }
        }
+    $newdata{'dateexpiry'} = $data{'dateexpiry'} unless $newdata{'dateexpiry'};
   # check permission to modify login info.
     if (ref($borrower_data) && ($borrower_data->{'category_type'} eq 'S') && ! 
(C4::Auth::haspermission($dbh,$userenv->{'id'},{'staffaccess'=>1})) )  {
                $NoUpdateLogin =1;
-- 
1.5.6.3

_______________________________________________
Koha-patches mailing list
[email protected]
http://lists.koha.org/mailman/listinfo/koha-patches

Reply via email to