use strict;return sub{my $this = shift;my $C = $this->{C};$this->out("");$this->out(Zen::PerlHandler->get("II34f8bb68f86188e4d4c65323d85f690a->mnt_detailed_report")->do($this->{C}));$this->out("\n<style type=\"text/css\">\n\ndiv.title\n{\n	font: bold 16px Verdana, Arial, Helvetica, sans-serif;\n	margin-bottom: 5px;\n}\n\ndiv.details\n{\n	font: normal 14px Verdana, Arial, Helvetica, sans-serif;\n	margin-bottom: 20px;\n}\n\ntable\n{\n	background-color: #4F5263;\n}\n\nth\n{\n	font: bold 14px Verdana, Arial, Helvetica, sans-serif;\n	color: #4F5263;\n	background-color: #D0D0D0;\n	padding: 3px;\n}\n\ntd\n{\n	font: normal 14px Verdana, Arial, Helvetica, sans-serif;\n	background-color: #FFFFFF;\n	padding: 3px;\n}\n\n</style>\n\n\n<div class=\"title\">\nProgram Name: $C->{INPUT}{title} (#$C->{INPUT}{id})<br>\n</div>\n\n<div class=\"details\">\nTrial Length:&nbsp;");my $var = do { $C->{INPUT}{trial} || 'none' };\$this->out($var);$this->out("<br>\n<br>\nTotal # of Subscriptions Sold: $C->{INPUT}{sales}<br>\nTotal # of Rebills: $C->{INPUT}{billings}<br>\nOverall Retention Rate: $C->{INPUT}{avgret}<br>\n</div>\n\n<table>\n<tr>\n	<th>Joined In</th>\n	<th>Total Joined</th>\n	<th>Still Members</th>\n	<th>Retention</th>\n	<th>Avg Retention</th>\n");my $in = [1..$C->{MaxBillings}];my $loop = ref($in) eq "ARRAY" ? $in : ref($in) eq "CODE" ? &{$in} : [];$C->{ITERATION}{b} = -1;for my $f (@$loop) {$C->{ITERATION}{b}++;$C->{b} = $f;$this->out("	<th>Rebilled $C->{b}</th>\n	<th>\%</th>\n");}$this->out("</tr>\n<tr>\n	<td>TOTAL</td>\n	<td>$C->{Total}{total_joined}</td>\n	<td>$C->{Total}{still_members}</td>\n	<td>$C->{Total}{retention}</td>\n	<td>$C->{Total}{avg_retention}</td>\n");my $in = [1..$C->{MaxBillings}];my $loop = ref($in) eq "ARRAY" ? $in : ref($in) eq "CODE" ? &{$in} : [];$C->{ITERATION}{b} = -1;for my $f (@$loop) {$C->{ITERATION}{b}++;$C->{b} = $f;$this->out("");if ( $C->{Total}{billings}{$C->{b}} ) {$this->out("		<td>$C->{Total}{billings}{$C->{b}}</td>\n		<td>$C->{Total}{billings_pc}{$C->{b}}</td>\n");} else {$this->out("		<td>&nbsp;</td>\n		<td>&nbsp;</td>\n");}$this->out("");}$this->out("</tr>\n");my $in = $C->{Data};my $loop = ref($in) eq "ARRAY" ? $in : ref($in) eq "CODE" ? &{$in} : [];$C->{ITERATION}{m} = -1;for my $f (@$loop) {$C->{ITERATION}{m}++;$C->{m} = $f;$this->out("<tr>\n	<td>$C->{m}{month}</td>\n	<td>$C->{m}{total_joined}</td>\n	<td>$C->{m}{still_members}</td>\n	<td>$C->{m}{retention}</td>\n	<td>$C->{m}{avg_retention}</td>\n");my $in = [1..$C->{MaxBillings}];my $loop = ref($in) eq "ARRAY" ? $in : ref($in) eq "CODE" ? &{$in} : [];$C->{ITERATION}{b} = -1;for my $f (@$loop) {$C->{ITERATION}{b}++;$C->{b} = $f;$this->out("");if ( $C->{m}{billings}{$C->{b}} ) {$this->out("		<td>$C->{m}{billings}{$C->{b}}</td>\n		<td>$C->{m}{billings_pc}{$C->{b}}</td>\n");} else {$this->out("		<td>&nbsp;</td>\n		<td>&nbsp;</td>\n");}$this->out("");}$this->out("</tr>\n");}$this->out("</table>\n");}