diff options
author | ivan <ivan> | 2005-03-12 14:31:50 +0000 |
---|---|---|
committer | ivan <ivan> | 2005-03-12 14:31:50 +0000 |
commit | b5fbaadb1cb2893660e460a1d4a3cabe02774de7 (patch) | |
tree | 0f574d67fffe967f98d0bdcac1e69e1fc1fd78c0 /httemplate/search/prepay_credit.html | |
parent | 40c89f3fd0933be14693b918e045bc21d39d6f01 (diff) |
- bring prepaid support into this century (close: Bug#1124)
- finally get rid of fs_signup (everything is in fs_selfservice now) (Bug#413)
- organize main menu sysadmin section so it is slightly less confusing
Diffstat (limited to 'httemplate/search/prepay_credit.html')
-rw-r--r-- | httemplate/search/prepay_credit.html | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/httemplate/search/prepay_credit.html b/httemplate/search/prepay_credit.html new file mode 100644 index 000000000..8c8f57b5a --- /dev/null +++ b/httemplate/search/prepay_credit.html @@ -0,0 +1,43 @@ +<% +my $agent = ''; +my $hashref = {}; +if ( $cgi->param('agentnum') =~ /^(\d+)$/ ) { + $hashref->{agentnum} = $1; + $agent = qsearchs('agent', { 'agentnum' => $1 } ); +} + +my $count_query = 'SELECT COUNT(*) FROM prepay_credit'; +$count_query .= ' WHERE agentnum = '. $agent->agentnum if $agent; + +%><%= include( 'elements/search.html', + 'title' => 'Unused Prepaid Cards'. + ($agent ? ' for '. $agent->agent : ''), + 'menubar' => [ + 'Main menu' => $p, + 'Generate cards' => $p.'edit/prepay_credit.cgi', + ], + 'name' => 'prepaid cards', + 'query' => { 'table' => 'prepay_credit', + 'hashref' => $hashref, + }, + 'count_query' => $count_query, + #'redirect' => $link, + 'header' => [ '#', qw(Amount Time Agent) ], + 'fields' => [ + 'identifier', + sub { sprintf('$%.2f', shift->amount ) }, + sub { my $c = shift; $c ? duration_exact($c->seconds) : '' }, + sub { my $agent = shift->agent; + $agent ? $agent->agent : ''; + }, + ], + 'links' => [ + '', + '', + '', + sub { my $agent = shift->agent; + $agent ? [ "${p}view/agent.cgi?", 'agentnum' ] : ''; + }, + ], + ) +%> |