summaryrefslogtreecommitdiff
path: root/httemplate/search
diff options
context:
space:
mode:
authormark <mark>2012-01-10 18:38:44 +0000
committermark <mark>2012-01-10 18:38:44 +0000
commitc1fa2b017e4f7d79e47e4e2257f17cf8a3d0c84b (patch)
tree5a509f8bab8a11914df0d574d422258802ac2014 /httemplate/search
parenta3f549b03951a3f9710bfd51649edf6b028fb4ff (diff)
projected sales report, #15393
Diffstat (limited to 'httemplate/search')
-rw-r--r--httemplate/search/cust_bill_pkg.cgi12
1 files changed, 10 insertions, 2 deletions
diff --git a/httemplate/search/cust_bill_pkg.cgi b/httemplate/search/cust_bill_pkg.cgi
index 13fb9f836..94860d3f2 100644
--- a/httemplate/search/cust_bill_pkg.cgi
+++ b/httemplate/search/cust_bill_pkg.cgi
@@ -145,8 +145,16 @@ my $agentnums_sql =
my @where = ( $agentnums_sql );
my($beginning, $ending) = FS::UI::Web::parse_beginning_ending($cgi);
-push @where, "_date >= $beginning",
- "_date <= $ending";
+
+if ( $cgi->param('distribute') == 1 ) {
+ push @where, "sdate <= $ending",
+ "edate > $beginning",
+ ;
+}
+else {
+ push @where, "_date >= $beginning",
+ "_date <= $ending";
+}
if ( $cgi->param('agentnum') =~ /^(\d+)$/ ) {
push @where, "cust_main.agentnum = $1";