summaryrefslogtreecommitdiff
path: root/httemplate/elements/tr-select-from_to.html
diff options
context:
space:
mode:
authorivan <ivan>2006-05-07 20:27:21 +0000
committerivan <ivan>2006-05-07 20:27:21 +0000
commite65c6a26ca778166aec2b2d1dd3012ab84fa611a (patch)
tree1ef2a5a21088301217a8b4f1440fedd6b7b1a274 /httemplate/elements/tr-select-from_to.html
parent29644d5921c99520965b884b25800ed084891e94 (diff)
first pass at sales reports per agent and package class
Diffstat (limited to 'httemplate/elements/tr-select-from_to.html')
-rw-r--r--httemplate/elements/tr-select-from_to.html51
1 files changed, 51 insertions, 0 deletions
diff --git a/httemplate/elements/tr-select-from_to.html b/httemplate/elements/tr-select-from_to.html
new file mode 100644
index 000000000..d7e5a8337
--- /dev/null
+++ b/httemplate/elements/tr-select-from_to.html
@@ -0,0 +1,51 @@
+<%
+
+ #my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
+ my ($curmon,$curyear) = (localtime(time))[4,5];
+
+ #find first month
+ my $syear = 1899+$curyear;
+ my $smonth = $curmon+1;
+
+ #want 12 month by default, not 13
+ $smonth++;
+ if ( $smonth > 12 ) { $smonth-=12; $syear++ }
+
+ #find last month
+ my $eyear = 1900+$curyear;
+ my $emonth = $curmon+1;
+
+ my %hash = (
+ 'show_month_abbr' => 1,
+ 'start_year' => '1999',
+ 'end_year' => '2012', #haha, well...
+ @_,
+ );
+
+%>
+
+<TR>
+ <TD ALIGN="right">From: </TD>
+ <TD>
+ <%= include('/elements/select-month_year.html',
+ 'prefix' => 'start',
+ 'selected_mon' => $smonth,
+ 'selected_year' => $syear,
+ %hash,
+ )
+ %>
+ </TD>
+</TR>
+
+<TR>
+ <TD ALIGN="right">To: </TD>
+ <TD>
+ <%= include('/elements/select-month_year.html',
+ 'prefix' => 'end',
+ 'selected_mon' => $emonth,
+ 'selected_year' => $eyear,
+ %hash,
+ )
+ %>
+ </TD>
+</TR>