diff options
author | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2008-09-13 01:44:05 +0000 |
---|---|---|
committer | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2008-09-13 01:44:05 +0000 |
commit | c22beebb571b727fcc80ee9c4e4741ab6ca10010 (patch) | |
tree | 7e944617e41485607e349cfc31a6e0729bd86ea4 | |
parent | 4dc9e97ad999bb6ea4fe5171be988ee8e6c156dc (diff) |
Adding description and control code fields to vendor/customer search
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@2324 4979c152-3d1c-0410-bac9-87ea11338e46
-rw-r--r-- | LedgerSMB/ScriptLib/Company.pm | 17 | ||||
-rw-r--r-- | sql/modules/Company.sql | 7 |
2 files changed, 22 insertions, 2 deletions
diff --git a/LedgerSMB/ScriptLib/Company.pm b/LedgerSMB/ScriptLib/Company.pm index 9b9b87c9..34d22154 100644 --- a/LedgerSMB/ScriptLib/Company.pm +++ b/LedgerSMB/ScriptLib/Company.pm @@ -205,16 +205,29 @@ sub get_results { } # Column definitions for dynatable - @columns = qw(legal_name meta_number business_type curr); + @columns = qw(legal_name entity_control_code meta_number credit_description + business_type curr); my %column_heading; $column_heading{legal_name} = { text => $request->{_locale}->text('Name'), href => "$search_url&order_by=legal_name", }; + $column_heading{entity_control_code} = { + text => $request->{_locale}->text('Control Code'), + href => "$search_url&order_by=entity_control_code", + }; + $column_heading{legal_name} = { + text => $request->{_locale}->text('Name'), + href => "$search_url&order_by=legal_name", + }; $column_heading{meta_number} = { text => $request->{_locale}->text('Vendor Number'), href => "$search_url&order_by=meta_number", }; + $column_heading{credit_description} = { + text => $request->{_locale}->text('Description'), + href => "$search_url&order_by=credit_description", + }; $column_heading{business_type} = { text => $request->{_locale}->text('Business Type'), href => "$search_url&order_by=business_type", @@ -228,6 +241,8 @@ sub get_results { for $ref (@{$company->{search_results}}){ push @rows, {legal_name => $ref->{legal_name}, + entity_control_code => $ref->{entity_control_code}, + credit_description => $ref->{credit_description}, meta_number => {text => $ref->{meta_number}, href => "$get_url&entity_id=$ref->{entity_id}" . "&meta_number=$ref->{meta_number}" }, diff --git a/sql/modules/Company.sql b/sql/modules/Company.sql index 0ee77159..7d9dd747 100644 --- a/sql/modules/Company.sql +++ b/sql/modules/Company.sql @@ -2,9 +2,11 @@ CREATE TYPE company_search_result AS ( entity_id int, + entity_control_code text, company_id int, entity_credit_id int, meta_number text, + credit_description text, entity_class int, legal_name text, sic_code text, @@ -27,7 +29,8 @@ BEGIN FOR out_row IN - SELECT e.id, c.id, ec.id, ec.meta_number, ec.entity_class, + SELECT e.id, e.control_code, c.id, ec.id, ec.meta_number, + ec.description, ec.entity_class, c.legal_name, c.sic_code, b.description , ec.curr::text FROM entity e JOIN company c ON (e.id = c.entity_id) @@ -151,12 +154,14 @@ CREATE TYPE entity_credit_search_return AS ( legal_name text, id int, entity_id int, + entity_control_code text, entity_class int, discount numeric, taxincluded bool, creditlimit numeric, terms int2, meta_number text, + credit_description text, business_id int, language_code text, pricegroup_id int, |