Bug 8907 - Last updated date does not appear on currency edit form

No value for $date was getting passed to the format_date function.
This patch changes the way the timestamp is passed.

Signed-off-by: Melia Meggs <melia@test.bywatersolutions.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
This commit is contained in:
Owen Leonard 2012-10-11 15:57:41 -04:00 committed by Paul Poulain
parent ca8f897cb0
commit d1f67b1034
1 changed files with 2 additions and 1 deletions

View File

@ -162,15 +162,16 @@ sub add_form {
$template->param( add_form => 1 );
#---- if primkey exists, it's a modify action, so read values to modify...
my $date;
if ($curr) {
my $curr_rec =
$dbh->selectrow_hashref( 'select * from currency where currency=?',
{}, $curr );
for ( keys %{$curr_rec} ) {
if($_ eq "timestamp"){ $date = $curr_rec->{$_}; }
$template->param( $_ => $curr_rec->{$_} );
}
}
my $date = $template->param('timestamp');
if ($date) {
$template->param( 'timestamp' => format_date($date) );
}