@@ -, +, @@ - Add a patron - Renew patrons - Go to checkout page and create message for patron --- C4/Members.pm | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) --- a/C4/Members.pm +++ a/C4/Members.pm @@ -23,7 +23,6 @@ package C4::Members; use strict; #use warnings; FIXME - Bug 2505 use C4::Context; -use C4::Dates qw(format_date_in_iso format_date); use String::Random qw( random_string ); use Date::Calc qw/Today Add_Delta_YM check_date Date_to_Days/; use C4::Log; # logaction @@ -864,12 +863,12 @@ sub AddMember { # add expiration date if it isn't already there unless ( $data{'dateexpiry'} ) { - $data{'dateexpiry'} = GetExpiryDate( $data{'categorycode'}, C4::Dates->new()->output("iso") ); + $data{'dateexpiry'} = GetExpiryDate( $data{'categorycode'}, output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 }) ); } # add enrollment date if it isn't already there unless ( $data{'dateenrolled'} ) { - $data{'dateenrolled'} = C4::Dates->new()->output("iso"); + $data{'dateenrolled'} = output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 }); } my $patron_category = @@ -1965,8 +1964,8 @@ sub ExtendMemberSubscriptionTo { my $borrower = GetMember('borrowernumber'=>$borrowerid); unless ($date){ $date = (C4::Context->preference('BorrowerRenewalPeriodBase') eq 'dateexpiry') ? - C4::Dates->new($borrower->{'dateexpiry'}, 'iso')->output("iso") : - C4::Dates->new()->output("iso"); + output_pref({ dt => dt_from_string( $borrower->{'dateexpiry'} ), dateformat => 'iso', dateonly =>1 }) : + output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 }); $date = GetExpiryDate( $borrower->{'categorycode'}, $date ); } my $sth = $dbh->do(<fetchrow_hashref ) { - my $d = C4::Dates->new( $data->{message_date}, 'iso' ); - $data->{message_date_formatted} = $d->output; + $data->{message_date_formatted} = output_pref({ dt => dt_from_string( $data->{message_date} ), dateformat => 'iso', dateonly => 1 }); push @results, $data; } return \@results; --