diff options
| author | Mitch Jackson <mitch@freeside.biz> | 2018-09-19 02:31:52 -0400 |
|---|---|---|
| committer | Mitch Jackson <mitch@freeside.biz> | 2018-09-19 12:06:06 -0400 |
| commit | 5aa5b25d6149129a676daadfa39c878a1f5823bf (patch) | |
| tree | 3d715e21399a664834fb8132fe58074f942df14d | |
| parent | fa32644857a444c489ff0d7389b0d6d61790b229 (diff) | |
RT# 78547 Future autobill report - sql bugfix
| -rw-r--r-- | FS/FS/cust_payby.pm | 4 | ||||
| -rw-r--r-- | httemplate/search/future_autobill.html | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/FS/FS/cust_payby.pm b/FS/FS/cust_payby.pm index 9d8be120a..4e9f04f51 100644 --- a/FS/FS/cust_payby.pm +++ b/FS/FS/cust_payby.pm @@ -931,7 +931,7 @@ sub has_autobill_cards { weight => { op => '>', value => 0 }, }, extra_sql => - "AND payby IN ('CARD', 'DCRD') ". + "AND cust_payby.payby IN ('CARD', 'DCRD') ". 'AND '. $FS::CurrentUser::CurrentUser->agentnums_sql( table => 'cust_main' ), }); @@ -952,7 +952,7 @@ sub has_autobill_checks { weight => { op => '>', value => 0 }, }, extra_sql => - "AND payby IN ('CHEK','DCHEK','DCHK') ". + "AND cust_payby.payby IN ('CHEK','DCHEK','DCHK') ". 'AND '. $FS::CurrentUser::CurrentUser->agentnums_sql( table => 'cust_main' ), }); diff --git a/httemplate/search/future_autobill.html b/httemplate/search/future_autobill.html index 1f3862fbc..3385dd880 100644 --- a/httemplate/search/future_autobill.html +++ b/httemplate/search/future_autobill.html @@ -121,8 +121,8 @@ there will be 1,400 billing and payment cycles simulated order_by => " ORDER BY weight DESC ", extra_sql => "AND ( - payby IN ('CHEK','DCHK','DCHEK') - OR ( paydate > '".$target_dt->ymd."') + cust_payby.payby IN ('CHEK','DCHK','DCHEK') + OR ( cust_payby.paydate > '".$target_dt->ymd."') ) AND " . $FS::CurrentUser::CurrentUser->agentnums_sql . ($agentnum ? "AND cust_main.agentnum = $agentnum" : ''), |
