projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
82f76d0
)
qualify columns by default in 4.x (experiment?), RT#20688, RT#22232
author
Ivan Kohler
<ivan@freeside.biz>
Sun, 18 Jan 2015 22:35:16 +0000
(14:35 -0800)
committer
Ivan Kohler
<ivan@freeside.biz>
Sun, 18 Jan 2015 22:35:16 +0000
(14:35 -0800)
FS/FS/Record.pm
patch
|
blob
|
history
FS/FS/cust_bill_pkg.pm
patch
|
blob
|
history
FS/FS/cust_pkg.pm
patch
|
blob
|
history
FS/FS/h_cust_svc.pm
patch
|
blob
|
history
FS/FS/h_svc_Radius_Mixin.pm
patch
|
blob
|
history
FS/FS/h_svc_acct.pm
patch
|
blob
|
history
FS/FS/h_svc_forward.pm
patch
|
blob
|
history
FS/FS/h_svc_www.pm
patch
|
blob
|
history
FS/bin/freeside-censustract-update
patch
|
blob
|
history
httemplate/search/h_inventory_item.html
patch
|
blob
|
history
diff --git
a/FS/FS/Record.pm
b/FS/FS/Record.pm
index
0810a7e
..
991c56e
100644
(file)
--- a/
FS/FS/Record.pm
+++ b/
FS/FS/Record.pm
@@
-45,7
+45,7
@@
our $nowarn_classload = 0;
our $no_update_diff = 0;
our $no_history = 0;
our $no_update_diff = 0;
our $no_history = 0;
-our $qsearch_qualify_columns =
0
;
+our $qsearch_qualify_columns =
1
;
our $no_check_foreign = 1; #well, not inefficiently in perl by default anymore
our $no_check_foreign = 1; #well, not inefficiently in perl by default anymore
diff --git
a/FS/FS/cust_bill_pkg.pm
b/FS/FS/cust_bill_pkg.pm
index
78b8b0f
..
56a666e
100644
(file)
--- a/
FS/FS/cust_bill_pkg.pm
+++ b/
FS/FS/cust_bill_pkg.pm
@@
-1204,6
+1204,7
@@
sub upgrade_tax_location {
# It's either the bill or ship address of the customer as of the
# invoice date-of-insertion. (Not necessarily the invoice date.)
my $date = $h_cust_bill->history_date;
# It's either the bill or ship address of the customer as of the
# invoice date-of-insertion. (Not necessarily the invoice date.)
my $date = $h_cust_bill->history_date;
+ local($FS::Record::qsearch_qualify_columns) = 0;
my $h_cust_main = qsearchs('h_cust_main',
{ custnum => $custnum },
FS::h_cust_main->sql_h_searchs($date)
my $h_cust_main = qsearchs('h_cust_main',
{ custnum => $custnum },
FS::h_cust_main->sql_h_searchs($date)
@@
-1257,6
+1258,7
@@
sub upgrade_tax_location {
} else {
# (pkgparts really shouldn't change, right?)
} else {
# (pkgparts really shouldn't change, right?)
+ local($FS::Record::qsearch_qualify_columns) = 0;
my $h_cust_pkg = qsearchs('h_cust_pkg', { pkgnum => $pkgnum },
FS::h_cust_pkg->sql_h_searchs($date)
);
my $h_cust_pkg = qsearchs('h_cust_pkg', { pkgnum => $pkgnum },
FS::h_cust_pkg->sql_h_searchs($date)
);
@@
-1276,6
+1278,7
@@
sub upgrade_tax_location {
}
if (!exists $pkgpart_taxclass{$pkgpart}) {
}
if (!exists $pkgpart_taxclass{$pkgpart}) {
+ local($FS::Record::qsearch_qualify_columns) = 0;
my $h_part_pkg = qsearchs('h_part_pkg', { pkgpart => $pkgpart },
FS::h_part_pkg->sql_h_searchs($date)
);
my $h_part_pkg = qsearchs('h_part_pkg', { pkgpart => $pkgpart },
FS::h_part_pkg->sql_h_searchs($date)
);
@@
-1310,6
+1313,7
@@
sub upgrade_tax_location {
# Get any per-customer taxname exemptions that were in effect.
my %exempt_cust_taxname;
foreach (keys %all_tax_names) {
# Get any per-customer taxname exemptions that were in effect.
my %exempt_cust_taxname;
foreach (keys %all_tax_names) {
+ local($FS::Record::qsearch_qualify_columns) = 0;
my $h_exemption = qsearchs('h_cust_main_exemption', {
'custnum' => $custnum,
'taxname' => $_,
my $h_exemption = qsearchs('h_cust_main_exemption', {
'custnum' => $custnum,
'taxname' => $_,
diff --git
a/FS/FS/cust_pkg.pm
b/FS/FS/cust_pkg.pm
index
d8fda3e
..
d55bd7b
100644
(file)
--- a/
FS/FS/cust_pkg.pm
+++ b/
FS/FS/cust_pkg.pm
@@
-2934,12
+2934,16
@@
sub h_cust_svc {
if $DEBUG;
my ($end, $start, $mode) = @_;
if $DEBUG;
my ($end, $start, $mode) = @_;
+
+ local($FS::Record::qsearch_qualify_columns) = 0;
+
my @cust_svc = $self->_sort_cust_svc(
[ qsearch( 'h_cust_svc',
{ 'pkgnum' => $self->pkgnum, },
FS::h_cust_svc->sql_h_search(@_),
) ]
);
my @cust_svc = $self->_sort_cust_svc(
[ qsearch( 'h_cust_svc',
{ 'pkgnum' => $self->pkgnum, },
FS::h_cust_svc->sql_h_search(@_),
) ]
);
+
if ( defined($mode) && $mode eq 'I' ) {
my %hidden_svcpart = map { $_->svcpart => $_->hidden } $self->part_svc;
return grep { !$hidden_svcpart{$_->svcpart} } @cust_svc;
if ( defined($mode) && $mode eq 'I' ) {
my %hidden_svcpart = map { $_->svcpart => $_->hidden } $self->part_svc;
return grep { !$hidden_svcpart{$_->svcpart} } @cust_svc;
diff --git
a/FS/FS/h_cust_svc.pm
b/FS/FS/h_cust_svc.pm
index
d280d53
..
7b565ad
100644
(file)
--- a/
FS/FS/h_cust_svc.pm
+++ b/
FS/FS/h_cust_svc.pm
@@
-98,6
+98,7
@@
sub h_svc_x {
warn "requiring FS/h_$svcdb.pm" if $DEBUG;
require "FS/h_$svcdb.pm";
warn "requiring FS/h_$svcdb.pm" if $DEBUG;
require "FS/h_$svcdb.pm";
+ local($FS::Record::qsearch_qualify_columns) = 0;
my $svc_x = qsearchs(
"h_$svcdb",
{ 'svcnum' => $self->svcnum, },
my $svc_x = qsearchs(
"h_$svcdb",
{ 'svcnum' => $self->svcnum, },
diff --git
a/FS/FS/h_svc_Radius_Mixin.pm
b/FS/FS/h_svc_Radius_Mixin.pm
index
af29770
..
c0c6d4b
100644
(file)
--- a/
FS/FS/h_svc_Radius_Mixin.pm
+++ b/
FS/FS/h_svc_Radius_Mixin.pm
@@
-6,6
+6,7
@@
use FS::h_radius_usergroup;
sub h_usergroup {
my $self = shift;
sub h_usergroup {
my $self = shift;
+ local($FS::Record::qsearch_qualify_columns) = 0;
map { $_->groupnum }
qsearch( 'h_radius_usergroup',
{ svcnum => $self->svcnum },
map { $_->groupnum }
qsearch( 'h_radius_usergroup',
{ svcnum => $self->svcnum },
diff --git
a/FS/FS/h_svc_acct.pm
b/FS/FS/h_svc_acct.pm
index
f525f82
..
6e127a2
100644
(file)
--- a/
FS/FS/h_svc_acct.pm
+++ b/
FS/FS/h_svc_acct.pm
@@
-28,6
+28,7
@@
FS::h_svc_acct - Historical account objects
sub svc_domain {
my $self = shift;
sub svc_domain {
my $self = shift;
+ local($FS::Record::qsearch_qualify_columns) = 0;
qsearchs( 'h_svc_domain',
{ 'svcnum' => $self->domsvc },
FS::h_svc_domain->sql_h_searchs(@_),
qsearchs( 'h_svc_domain',
{ 'svcnum' => $self->domsvc },
FS::h_svc_domain->sql_h_searchs(@_),
diff --git
a/FS/FS/h_svc_forward.pm
b/FS/FS/h_svc_forward.pm
index
25b2039
..
7f6a5cc
100644
(file)
--- a/
FS/FS/h_svc_forward.pm
+++ b/
FS/FS/h_svc_forward.pm
@@
-32,6
+32,9
@@
FS::h_svc_forward - Historical mail forwarding alias objects
sub srcsvc_acct {
my $self = shift;
sub srcsvc_acct {
my $self = shift;
+
+ local($FS::Record::qsearch_qualify_columns) = 0;
+
my $h_svc_acct = qsearchs(
'h_svc_acct',
{ 'svcnum' => $self->srcsvc },
my $h_svc_acct = qsearchs(
'h_svc_acct',
{ 'svcnum' => $self->srcsvc },
@@
-52,6
+55,9
@@
sub srcsvc_acct {
sub dstsvc_acct {
my $self = shift;
sub dstsvc_acct {
my $self = shift;
+
+ local($FS::Record::qsearch_qualify_columns) = 0;
+
my $h_svc_acct = qsearchs(
'h_svc_acct',
{ 'svcnum' => $self->dstsvc },
my $h_svc_acct = qsearchs(
'h_svc_acct',
{ 'svcnum' => $self->dstsvc },
diff --git
a/FS/FS/h_svc_www.pm
b/FS/FS/h_svc_www.pm
index
2a3b6dc
..
e719f1b
100644
(file)
--- a/
FS/FS/h_svc_www.pm
+++ b/
FS/FS/h_svc_www.pm
@@
-33,6
+33,7
@@
sub domain_record {
carp 'Called FS::h_svc_www->domain_record on svcnum ' . $self->svcnum if $DEBUG;
carp 'Called FS::h_svc_www->domain_record on svcnum ' . $self->svcnum if $DEBUG;
+ local($FS::Record::qsearch_qualify_columns) = 0;
my $domain_record = qsearchs(
'h_domain_record',
{ 'recnum' => $self->recnum },
my $domain_record = qsearchs(
'h_domain_record',
{ 'recnum' => $self->recnum },
diff --git
a/FS/bin/freeside-censustract-update
b/FS/bin/freeside-censustract-update
index
af9ad74
..
f9b6d11
100644
(file)
--- a/
FS/bin/freeside-censustract-update
+++ b/
FS/bin/freeside-censustract-update
@@
-26,6
+26,7
@@
$date ||= time;
# Find all locations that, as of $date, did not have
# censusyear = the current year. This includes those
# that have no censusyear.
# Find all locations that, as of $date, did not have
# censusyear = the current year. This includes those
# that have no censusyear.
+local($FS::Record::qsearch_qualify_columns) = 0;
my %h_cust_location = map { $_->locationnum => $_ }
qsearch(
'h_cust_location',
my %h_cust_location = map { $_->locationnum => $_ }
qsearch(
'h_cust_location',
diff --git
a/httemplate/search/h_inventory_item.html
b/httemplate/search/h_inventory_item.html
index
b0f9b8a
..
b5cac9e
100644
(file)
--- a/
httemplate/search/h_inventory_item.html
+++ b/
httemplate/search/h_inventory_item.html
@@
-60,6
+60,7
@@
my %agent = ('agentnum' => $agentnum) if $agentnum;
my %class = ('classnum' => $classnum) if $classnum;
my @rows = ( map {[ (0) x $numdays ]} @labels);
my %class = ('classnum' => $classnum) if $classnum;
my @rows = ( map {[ (0) x $numdays ]} @labels);
+local($FS::Record::qsearch_qualify_columns) = 0;
my $opening_balance = scalar(
qsearch('h_inventory_item',
{ 'svcnum' => '',
my $opening_balance = scalar(
qsearch('h_inventory_item',
{ 'svcnum' => '',