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

SF.net SVN: ledger-smb:[4659] addons/1.3/company_person/trunk



Revision: 4659
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=4659&view=rev
Author:   einhverfr
Date:     2012-04-20 10:47:13 +0000 (Fri, 20 Apr 2012)
Log Message:
-----------
Corrections to person div addon

Modified Paths:
--------------
    addons/1.3/company_person/trunk/UI/Contact/divs/person.html
    addons/1.3/company_person/trunk/patches/customer_person.diff
    addons/1.3/company_person/trunk/sql/modules/person_customer.sql

Modified: addons/1.3/company_person/trunk/UI/Contact/divs/person.html
===================================================================
--- addons/1.3/company_person/trunk/UI/Contact/divs/person.html	2012-04-20 08:00:39 UTC (rev 4658)
+++ addons/1.3/company_person/trunk/UI/Contact/divs/person.html	2012-04-20 10:47:13 UTC (rev 4659)
@@ -1,5 +1,5 @@
 <div id="person_div" class="container">
-	<div class="listtop"><strong><?lsmb text("$operation Employee") ?></strong></div>
+	<div class="listtop"><strong><?lsmb text("$operation Person") ?></strong></div>
 <form name="hr" action="<?lsmb script ?>" method="post">
 <?lsmb PROCESS input element_data = {
 		type = "hidden"

Modified: addons/1.3/company_person/trunk/patches/customer_person.diff
===================================================================
--- addons/1.3/company_person/trunk/patches/customer_person.diff	2012-04-20 08:00:39 UTC (rev 4658)
+++ addons/1.3/company_person/trunk/patches/customer_person.diff	2012-04-20 10:47:13 UTC (rev 4659)
@@ -1,8 +1,16 @@
 Index: UI/Contact/contact.html
 ===================================================================
---- UI/Contact/contact.html	(revision 4631)
+--- UI/Contact/contact.html	(revision 4653)
 +++ UI/Contact/contact.html	(working copy)
-@@ -386,6 +386,10 @@
+@@ -65,6 +65,7 @@
+ 	<li class="nav"><a href="#hr_div"><?lsmb text('HR') ?></a></li>
+ 	<?lsmb ELSE ?>
+ 	<li class="nav"><a href="#company_div"><?lsmb text('Company') ?></a></li>
++	<li class="nav"><a href="#person_div"><?lsmb text('Person') ?></a></li>
+ 	<li class="nav"><a href="#credit_div"><?lsmb text('Accounts') ?></a></li>
+ 	<?lsmb END ?>
+ 	<?lsmb IF entity_id ?>
+@@ -386,6 +387,10 @@
  <?lsmb END ?>
  </div>
  <?lsmb IF entity_id ?>

Modified: addons/1.3/company_person/trunk/sql/modules/person_customer.sql
===================================================================
--- addons/1.3/company_person/trunk/sql/modules/person_customer.sql	2012-04-20 08:00:39 UTC (rev 4658)
+++ addons/1.3/company_person/trunk/sql/modules/person_customer.sql	2012-04-20 10:47:13 UTC (rev 4659)
@@ -6,7 +6,7 @@
 $$
 DECLARE t_location_id int;
         retval person_to_company;
-BEGIN;
+BEGIN
 
 IF in_location_id IS NULL THEN
    SELECT location_id INTO t_location_id 
@@ -17,7 +17,7 @@
    t_location_id := in_location_id;
 END IF;
 
-IF t_location_id IS NULL
+IF t_location_id IS NULL THEN
     SELECT location_id INTO t_location_id 
       FROM eca_to_location e2l
       JOIN entity_credit_account eca ON e2l.credit_id = eca.id
@@ -36,7 +36,7 @@
 END IF;
 
 SELECT * INTO retval 
-  FROM company_to_person
+  FROM person_to_company
  WHERE company_id = in_entity_id
        AND person_id = in_person_id;
 
@@ -49,7 +49,7 @@
 RETURNS SETOF person AS
 $$
 SELECT * FROM person 
- WHERE id IN (select * from company_to_person WHERE company_id = $1)
+ WHERE id IN (select person_id from  person_to_company WHERE company_id = $1)
 $$ LANGUAGE SQL;
 
 COMMIT; 

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