[freeside-commits] freeside/httemplate/search
report_cust_credit.html, 1.8, 1.9 cust_credit.html, 1.10,
1.11 report_cust_pay.html, 1.13, 1.14 cust_pay.cgi, 1.26, 1.27
Ivan,,,
ivan at wavetail.420.am
Fri Nov 24 00:48:54 PST 2006
Update of /home/cvs/cvsroot/freeside/httemplate/search
In directory wavetail:/tmp/cvs-serv4256/search
Modified Files:
report_cust_credit.html cust_credit.html report_cust_pay.html
cust_pay.cgi
Log Message:
add less than and greater than amounts to credit and payment searches
Index: report_cust_pay.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/search/report_cust_pay.html,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- report_cust_pay.html 13 Sep 2006 16:01:54 -0000 1.13
+++ report_cust_pay.html 24 Nov 2006 08:48:52 -0000 1.14
@@ -56,6 +56,12 @@
<% include( '/elements/tr-input-beginning_ending.html' ) %>
+ <% include( '/elements/tr-input-lessthan_greaterthan.html',
+ 'label' => 'Amount',
+ 'field' => 'paid',
+ )
+ %>
+
</TABLE>
<BR>
Index: cust_credit.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/search/cust_credit.html,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- cust_credit.html 23 Aug 2006 22:25:38 -0000 1.10
+++ cust_credit.html 24 Nov 2006 08:48:52 -0000 1.11
@@ -15,26 +15,11 @@
% $title = $agent->agent. " $title";
% }
%
-% #false laziness with cust_pkg.cgi and cust_pay.cgi
-% if ( $cgi->param('beginning')
-% && $cgi->param('beginning') =~ /^([ 0-9\-\/]{1,10})$/ ) {
-% my $beginning = str2time($1);
-% push @search, "_date >= $beginning ";
-% }
-% if ( $cgi->param('ending')
-% && $cgi->param('ending') =~ /^([ 0-9\-\/]{1,10})$/ ) {
-% my $ending = str2time($1) + 86399;
-% push @search, " _date <= $ending ";
-% }
+% my($beginning, $ending) = FS::UI::Web::parse_beginning_ending($cgi);
+% push @search, "_date >= $beginning ",
+% "_date <= $ending";
%
-% if ( $cgi->param('begin')
-% && $cgi->param('begin') =~ /^(\d+)$/ ) {
-% push @search, "_date >= $1 ";
-% }
-% if ( $cgi->param('end')
-% && $cgi->param('end') =~ /^(\d+)$/ ) {
-% push @search, " _date < $1 ";
-% }
+% push @search, FS::UI::Web::parse_lt_gt($cgi, 'amount' );
%
% #here is the agent virtualization
% push @search, $FS::CurrentUser::CurrentUser->agentnums_sql;
Index: report_cust_credit.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/search/report_cust_credit.html,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- report_cust_credit.html 23 Aug 2006 22:25:38 -0000 1.8
+++ report_cust_credit.html 24 Nov 2006 08:48:52 -0000 1.9
@@ -6,30 +6,31 @@
<TABLE>
<TR>
<TD ALIGN="right">Credits by employee: </TD>
-%
-% my $sth = dbh->prepare("SELECT DISTINCT otaker FROM cust_credit")
-% or die dbh->errstr;
-% $sth->execute or die $sth->errstr;
-% my @otakers = map { $_->[0] } @{$sth->fetchall_arrayref};
-%
-
-
- <TD><SELECT NAME="otaker">
- <OPTION VALUE="">all</OPTION>
-% foreach my $otaker ( @otakers ) {
- <OPTION VALUE="<% $otaker %>"><% $otaker %></OPTION>
-% }
-
- </SELECT>
+ <TD>
+ <SELECT NAME="otaker">
+ <OPTION VALUE="">all</OPTION>
+% foreach my $otaker ( @otakers ) {
+ <OPTION VALUE="<% $otaker %>"><% $otaker %></OPTION>
+% }
+ </SELECT>
</TD>
</TR>
+
<% include( '/elements/tr-select-agent.html',
$cgi->param('agentnum'),
'label' => 'for agent: ',
)
%>
+
<% include( '/elements/tr-input-beginning_ending.html' ) %>
+
+ <% include( '/elements/tr-input-lessthan_greaterthan.html',
+ 'label' => 'Amount',
+ 'field' => 'amount',
+ )
+ %>
+
</TABLE>
<BR>
@@ -38,3 +39,12 @@
</FORM>
<% include('/elements/footer.html') %>
+
+<%init>
+
+my $sth = dbh->prepare("SELECT DISTINCT otaker FROM cust_credit")
+ or die dbh->errstr;
+$sth->execute or die $sth->errstr;
+my @otakers = map { $_->[0] } @{$sth->fetchall_arrayref};
+
+</%init>
Index: cust_pay.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/search/cust_pay.cgi,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- cust_pay.cgi 23 Aug 2006 22:25:38 -0000 1.26
+++ cust_pay.cgi 24 Nov 2006 08:48:52 -0000 1.27
@@ -80,6 +80,8 @@
% my($beginning, $ending) = FS::UI::Web::parse_beginning_ending($cgi);
% push @search, "_date >= $beginning ",
% "_date <= $ending";
+%
+% push @search, FS::UI::Web::parse_lt_gt($cgi, 'paid' );
%
% $orderby = '_date';
%
More information about the freeside-commits
mailing list