summaryrefslogtreecommitdiff
path: root/LedgerSMB/IC.pm
diff options
context:
space:
mode:
authoraurynn_cmd <aurynn_cmd@4979c152-3d1c-0410-bac9-87ea11338e46>2007-08-06 20:28:31 +0000
committeraurynn_cmd <aurynn_cmd@4979c152-3d1c-0410-bac9-87ea11338e46>2007-08-06 20:28:31 +0000
commitf1756b69854a21b50da387f32f394d4b6fb80be7 (patch)
treea41cf10135ad979ec6fce5d6c924feba94f53fed /LedgerSMB/IC.pm
parenta68e3e4e78cd1bb7efe35a39d0fdd376f60e2fae (diff)
Addition of Vendor and Customer-specific save, get, and search functions in Pgsql stored procedures.
Cleanup and modification of Employee.sql, to fit the new Entity framework, as well as the modifications to support trigram searching. Addition of customer.pl and vendor.pl scripts, to support new perl framework code, as well as .pm modules for the same. Some cleanup of Pg-database.sql. addition of note_class = 1 check on entity_note, removal of check id = 1. git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1454 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'LedgerSMB/IC.pm')
-rw-r--r--LedgerSMB/IC.pm10
1 files changed, 8 insertions, 2 deletions
diff --git a/LedgerSMB/IC.pm b/LedgerSMB/IC.pm
index d3db12e8..c8d39f5f 100644
--- a/LedgerSMB/IC.pm
+++ b/LedgerSMB/IC.pm
@@ -1829,7 +1829,10 @@ sub create_links {
my ($count) = $dbh->selectrow_array($query);
if ( $count < $myconfig->{vclimit} ) {
- $query = qq|SELECT id, name FROM vendor ORDER BY name|;
+ $query = qq|SELECT v.id, e.name
+ FROM vendor v
+ join entity e on e.id = v.entity_id
+ ORDER BY e.name|;
$sth = $dbh->prepare($query);
$sth->execute || $form->dberror($query);
@@ -1845,7 +1848,10 @@ sub create_links {
($count) = $dbh->selectrow_array($query);
if ( $count < $myconfig->{vclimit} ) {
- $query = qq|SELECT id, name FROM customer ORDER BY name|;
+ $query = qq|SELECT c.id, e.name
+ FROM customer c
+ join entity e on e.id = c.entity_id
+ ORDER BY e.name|;
$sth = $dbh->prepare($query);
$sth->execute || $form->dberror($query);