diff options
| author | Ivan Kohler <ivan@freeside.biz> | 2012-05-09 15:20:07 -0700 |
|---|---|---|
| committer | Ivan Kohler <ivan@freeside.biz> | 2012-05-09 15:20:07 -0700 |
| commit | db5d13003d4020d9d2bc78ebc565e748622237f4 (patch) | |
| tree | 9a57b24532dc958b06badb08a13558ad101dbf1d /FS | |
| parent | 4e80826785918c80148c91d3b0e7c8e81e67197e (diff) | |
disable advertising sources, RT#17638
Diffstat (limited to 'FS')
| -rw-r--r-- | FS/FS/part_referral.pm | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/FS/FS/part_referral.pm b/FS/FS/part_referral.pm index c94c57e19..e7dfe067d 100644 --- a/FS/FS/part_referral.pm +++ b/FS/FS/part_referral.pm @@ -163,10 +163,16 @@ simply using rather than editing advertising sources). sub all_part_referral { my $self = shift; + my $global = @_ ? shift : ''; + my $disabled = @_ ? shift : ''; + + my $hashref = $disabled ? {} : { 'disabled' => '' }; + my $and = $disabled ? ' WHERE ' : ' AND '; qsearch({ 'table' => 'part_referral', - 'extra_sql' => ' WHERE '. $self->acl_agentnum_sql(@_). ' ORDER BY refnum ', + 'hashref' => $hashref, + 'extra_sql' => $and. $self->acl_agentnum_sql(@_). ' ORDER BY refnum ', }); } |
