From 4783789db90ba00a0e57077464c689bd082ffb0f Mon Sep 17 00:00:00 2001 From: jeff Date: Mon, 25 Aug 2008 05:53:14 +0000 Subject: correct fallout from duplicate line items --- httemplate/search/cust_bill_pkg.cgi | 2 ++ httemplate/search/report_prepaid_income.cgi | 5 +++-- httemplate/search/report_tax.cgi | 3 ++- 3 files changed, 7 insertions(+), 3 deletions(-) (limited to 'httemplate') diff --git a/httemplate/search/cust_bill_pkg.cgi b/httemplate/search/cust_bill_pkg.cgi index 74efe4f7e..2354be953 100644 --- a/httemplate/search/cust_bill_pkg.cgi +++ b/httemplate/search/cust_bill_pkg.cgi @@ -70,6 +70,8 @@ my $agentnums_sql = my @where = ( $agentnums_sql ); +push @where, "(duplicate IS NULL OR duplicate = '' )"; + my($beginning, $ending) = FS::UI::Web::parse_beginning_ending($cgi); push @where, "_date >= $beginning", "_date <= $ending"; diff --git a/httemplate/search/report_prepaid_income.cgi b/httemplate/search/report_prepaid_income.cgi index 27dbcbf9f..3694c7aae 100644 --- a/httemplate/search/report_prepaid_income.cgi +++ b/httemplate/search/report_prepaid_income.cgi @@ -43,8 +43,9 @@ my( $total, $total_legacy ) = ( 0, 0 ); my @cust_bill_pkg = grep { $_->cust_pkg && $_->cust_pkg->part_pkg->freq !~ /^([01]|\d+[dw])$/ } qsearch( 'cust_bill_pkg', { - 'recur' => { op=>'!=', value=>0 }, - 'edate' => { op=>'>', value=>$now }, + 'recur' => { op=>'!=', value=>0 }, + 'edate' => { op=>'>', value=>$now }, + 'duplicate' => '', }, ); my @cust_pkg = diff --git a/httemplate/search/report_tax.cgi b/httemplate/search/report_tax.cgi index 3d37c47e4..dd6779a61 100755 --- a/httemplate/search/report_tax.cgi +++ b/httemplate/search/report_tax.cgi @@ -188,7 +188,8 @@ my $join_pkg = " LEFT JOIN part_pkg USING ( pkgpart ) "; -my $where = "WHERE _date >= $beginning AND _date <= $ending "; +my $where = "WHERE _date >= $beginning AND _date <= $ending ". + "AND (duplicate IS NULL or duplicate = '')"; my @base_param = qw( county county state state country ); if ( $conf->exists('tax-ship_address') ) { -- cgit v1.2.1