[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[2324] trunk
- Subject: SF.net SVN: ledger-smb:[2324] trunk
- From: ..hidden..
- Date: Sat, 13 Sep 2008 01:44:06 +0000
Revision: 2324
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=2324&view=rev
Author: einhverfr
Date: 2008-09-13 01:44:05 +0000 (Sat, 13 Sep 2008)
Log Message:
-----------
Adding description and control code fields to vendor/customer search
Modified Paths:
--------------
trunk/LedgerSMB/ScriptLib/Company.pm
trunk/sql/modules/Company.sql
Modified: trunk/LedgerSMB/ScriptLib/Company.pm
===================================================================
--- trunk/LedgerSMB/ScriptLib/Company.pm 2008-09-12 23:36:59 UTC (rev 2323)
+++ trunk/LedgerSMB/ScriptLib/Company.pm 2008-09-13 01:44:05 UTC (rev 2324)
@@ -205,16 +205,29 @@
}
# 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 @@
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}"
},
Modified: trunk/sql/modules/Company.sql
===================================================================
--- trunk/sql/modules/Company.sql 2008-09-12 23:36:59 UTC (rev 2323)
+++ trunk/sql/modules/Company.sql 2008-09-13 01:44:05 UTC (rev 2324)
@@ -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 @@
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 @@
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,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.