summaryrefslogtreecommitdiff
path: root/FS/FS
diff options
context:
space:
mode:
authorivan <ivan>2005-03-04 12:34:56 +0000
committerivan <ivan>2005-03-04 12:34:56 +0000
commitb1fc20ef3b68a8536163fbb17c57bca15555f3c4 (patch)
tree389d9d91cd4e855a113c8825adac926ec1f71dcb /FS/FS
parent8f11e2a03067829dc5f8cd6ae7fa0e3f249d61c1 (diff)
add agent selection to payment and credit reports, add link to agent browse, closes: Bug#1105
Diffstat (limited to 'FS/FS')
-rw-r--r--FS/FS/Record.pm8
-rw-r--r--FS/FS/h_Common.pm2
2 files changed, 5 insertions, 5 deletions
diff --git a/FS/FS/Record.pm b/FS/FS/Record.pm
index 748026a..e24c0eb 100644
--- a/FS/FS/Record.pm
+++ b/FS/FS/Record.pm
@@ -180,7 +180,7 @@ sub create {
}
}
-=item qsearch TABLE, HASHREF, SELECT, EXTRA_SQL, CACHE_OBJ, AS
+=item qsearch TABLE, HASHREF, SELECT, EXTRA_SQL, CACHE_OBJ, ADDL_FROM
Searches the database for all records matching (at least) the key/value pairs
in HASHREF. Returns all the records found as `FS::TABLE' objects if that
@@ -199,7 +199,7 @@ objects.
=cut
sub qsearch {
- my($stable, $record, $select, $extra_sql, $cache, $as ) = @_;
+ my($stable, $record, $select, $extra_sql, $cache, $addl_from ) = @_;
#$stable =~ /^([\w\_]+)$/ or die "Illegal table: $table";
#for jsearch
$stable =~ /^([\w\s\(\)\.\,\=]+)$/ or die "Illegal table: $stable";
@@ -223,7 +223,7 @@ sub qsearch {
}
my $statement = "SELECT $select FROM $stable";
- $statement .= " AS $as" if $as;
+ $statement .= " $addl_from" if $addl_from;
if ( @real_fields or @virtual_fields ) {
$statement .= ' WHERE '. join(' AND ',
( map {
@@ -428,7 +428,7 @@ sub jsearch {
);
}
-=item qsearchs TABLE, HASHREF
+=item qsearchs TABLE, HASHREF, SELECT, EXTRA_SQL, CACHE_OBJ, ADDL_FROM
Same as qsearch, except that if more than one record matches, it B<carp>s but
returns the first. If this happens, you either made a logic error in asking
diff --git a/FS/FS/h_Common.pm b/FS/FS/h_Common.pm
index a7bb937..52af42b 100644
--- a/FS/FS/h_Common.pm
+++ b/FS/FS/h_Common.pm
@@ -64,7 +64,7 @@ sub sql_h_search {
'',
- 'maintable',
+ 'AS maintable',
);
}