use C4::Output;
use C4::Budgets qw/GetCurrency GetCurrencies/;
-my $input = CGI->new;
+our $input = CGI->new;
my $searchfield = $input->param('searchfield') || $input->param('description') || q{};
-my $offset = $input->param('offset') || 0;
+our $offset = $input->param('offset') || 0;
my $op = $input->param('op') || q{};
my $script_name = '/cgi-bin/koha/admin/currency.pl';
-my $pagesize = 20;
+our $pagesize = 20;
-my ($template, $loggedinuser, $cookie) = get_template_and_user({
+our ($template, $loggedinuser, $cookie) = get_template_and_user({
template_name => 'admin/currency.tmpl',
query => $input,
type => 'intranet',
- flagsrequired => {parameters => 1},
+ flagsrequired => {parameters => 'parameters_remaining_permissions'},
authnotrequired => 0,
});
$template->param(searchfield => $searchfield,
script_name => $script_name);
-my $dbh = C4::Context->dbh;
+our $dbh = C4::Context->dbh;
if ( $op eq 'add_form' ) {
add_form($searchfield);
$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) );
}