[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb: [2172] trunk



Revision: 2172
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=2172&view=rev
Author:   einhverfr
Date:     2008-06-25 11:19:28 -0700 (Wed, 25 Jun 2008)

Log Message:
-----------
Correcting issue on Vendor screen.  Displaying wrong account info when selecting entity from vendor report.

Modified Paths:
--------------
    trunk/LedgerSMB/DBObject/Company.pm
    trunk/scripts/vendor.pl
    trunk/sql/modules/Company.sql

Modified: trunk/LedgerSMB/DBObject/Company.pm
===================================================================
--- trunk/LedgerSMB/DBObject/Company.pm	2008-06-23 22:39:03 UTC (rev 2171)
+++ trunk/LedgerSMB/DBObject/Company.pm	2008-06-25 18:19:28 UTC (rev 2172)
@@ -185,7 +185,7 @@
     my $self = shift @_;
 
     $self->set_entity_class();
-    my ($ref) = $self->exec_method(funcname => 'entity__retrieve_credit');
+    my ($ref) = $self->exec_method(funcname => 'company_retrieve');
     $self->merge($ref);
     $self->{threshold} = $self->format_amount(amount => $self->{threshold});
 

Modified: trunk/scripts/vendor.pl
===================================================================
--- trunk/scripts/vendor.pl	2008-06-23 22:39:03 UTC (rev 2171)
+++ trunk/scripts/vendor.pl	2008-06-25 18:19:28 UTC (rev 2172)
@@ -149,7 +149,8 @@
 	push @rows, 
                 {legal_name   => $ref->{legal_name},
                 meta_number   => {text => $ref->{meta_number},
-                                  href => "$get_url&entity_id=$ref->{entity_id}"},
+                                  href => "$get_url&entity_id=$ref->{entity_id}"		                           . "&meta_number=$ref->{meta_number}"
+		                 },
 		business_type => $ref->{business_type},
                 curr          => $ref->{curr},
                 };

Modified: trunk/sql/modules/Company.sql
===================================================================
--- trunk/sql/modules/Company.sql	2008-06-23 22:39:03 UTC (rev 2171)
+++ trunk/sql/modules/Company.sql	2008-06-25 18:19:28 UTC (rev 2172)
@@ -220,11 +220,11 @@
 END;
 $$ LANGUAGE PLPGSQL;
 
-CREATE OR REPLACE FUNCTION company_retrieve (in_id int) RETURNS company AS
+CREATE OR REPLACE FUNCTION company_retrieve (in_entity_id int) RETURNS company AS
 $$
 DECLARE t_company company;
 BEGIN
-	SELECT * INTO t_company FROM company WHERE id = in_id;
+	SELECT * INTO t_company FROM company WHERE entity_id = in_entity_id;
 	RETURN t_company;
 END;
 $$ language plpgsql;


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.