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

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



Revision: 6798
          http://sourceforge.net/p/ledger-smb/code/6798
Author:   einhverfr
Date:     2014-02-07 09:45:14 +0000 (Fri, 07 Feb 2014)
Log Message:
-----------
fixing unable to edit contact info for customers and vendors, ticket 1042

Modified Paths:
--------------
    trunk/UI/Contact/divs/contact_info.html
    trunk/sql/modules/Company.sql

Modified: trunk/UI/Contact/divs/contact_info.html
===================================================================
--- trunk/UI/Contact/divs/contact_info.html	2014-02-07 07:50:07 UTC (rev 6797)
+++ trunk/UI/Contact/divs/contact_info.html	2014-02-07 09:45:14 UTC (rev 6798)
@@ -50,8 +50,8 @@
 	} ?>
 	<?lsmb PROCESS input element_data = {
 		type="hidden" 
-		name="old_contact_class" 
-		value=request.contact_class
+		name="old_class_id" 
+		value=request.class_id
 	} ?>
 	<?lsmb PROCESS input element_data = {
 		type="hidden" 

Modified: trunk/sql/modules/Company.sql
===================================================================
--- trunk/sql/modules/Company.sql	2014-02-07 07:50:07 UTC (rev 6797)
+++ trunk/sql/modules/Company.sql	2014-02-07 09:45:14 UTC (rev 6798)
@@ -1369,9 +1369,11 @@
 COMMENT ON FUNCTION eca__list_contacts(in_credit_id int) IS
 $$ Returns a list of contact info attached to the entity credit account.$$;
 
+DROP FUNCTION IF EXISTS eca__save_contact(int, int, text, text, text, int);
+
 CREATE OR REPLACE FUNCTION eca__save_contact
 (in_credit_id int, in_class_id int, in_description text, in_contact text,
-in_old_contact text, in_old_contact_class int)
+in_old_contact text, in_old_class_id int)
 RETURNS INT AS
 $$
 DECLARE out_id int;
@@ -1380,7 +1382,7 @@
     PERFORM *
        FROM eca_to_contact
       WHERE credit_id = in_credit_id
-        AND contact_class_id = in_old_contact_class
+        AND contact_class_id = in_old_class_id 
         AND contact = in_old_contact;
         
     IF FOUND THEN
@@ -1389,7 +1391,7 @@
                description = in_description,
                contact_class_id = in_class_id
          WHERE credit_id = in_credit_id
-           AND contact_class_id = in_old_contact_class
+           AND contact_class_id = in_old_class_id
            AND contact = in_old_contact;
     ELSE
         INSERT INTO eca_to_contact(credit_id, contact_class_id, 

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


------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk
_______________________________________________
Ledger-smb-commits mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-commits