[freeside-commits] freeside/FS/FS/UI Web.pm,1.17,1.18
Ivan,,,
ivan at wavetail.420.am
Fri Nov 24 00:49:11 PST 2006
- Previous message: [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
- Next message: [freeside-commits] freeside/httemplate/browse part_pkg.cgi, 1.35,
1.36
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /home/cvs/cvsroot/freeside/FS/FS/UI
In directory wavetail:/tmp/cvs-serv4303/UI
Modified Files:
Web.pm
Log Message:
add less than and greater than amounts to credit and payment searches
Index: Web.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/UI/Web.pm,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- Web.pm 19 Jun 2006 08:05:28 -0000 1.17
+++ Web.pm 24 Nov 2006 08:49:09 -0000 1.18
@@ -32,6 +32,38 @@
( $beginning, $ending );
}
+sub parse_lt_gt {
+ my($cgi, $field) = @_;
+
+ my @search = ();
+
+ my %op = (
+ 'lt' => '<',
+ 'gt' => '>',
+ );
+
+ foreach my $op (keys %op) {
+
+ warn "checking for ${field}_$op field\n"
+ if $DEBUG;
+
+ if ( $cgi->param($field."_$op") =~ /^\s*\$?\s*([\d\,\s]+(\.\d\d)?)\s*$/ ) {
+
+ my $num = $1;
+ $num =~ s/[\,\s]+//g;
+ my $search = "$field $op{$op} $num";
+ push @search, $search;
+
+ warn "found ${field}_$op field; adding search element $search\n"
+ if $DEBUG;
+ }
+
+ }
+
+ @search;
+
+}
+
###
# cust_main report subroutines
###
- Previous message: [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
- Next message: [freeside-commits] freeside/httemplate/browse part_pkg.cgi, 1.35,
1.36
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the freeside-commits
mailing list