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

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



Revision: 2751
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=2751&view=rev
Author:   einhverfr
Date:     2009-08-17 15:58:11 +0000 (Mon, 17 Aug 2009)

Log Message:
-----------
Pay to name

Modified Paths:
--------------
    trunk/UI/Contact/contact.html
    trunk/sql/Pg-database.sql
    trunk/sql/modules/Company.sql

Modified: trunk/UI/Contact/contact.html
===================================================================
--- trunk/UI/Contact/contact.html	2009-08-17 15:48:07 UTC (rev 2750)
+++ trunk/UI/Contact/contact.html	2009-08-17 15:58:11 UTC (rev 2751)
@@ -318,6 +318,17 @@
 		value = account_class
 	} ?>	
         <table>
+	<tr class="pay_to_row">
+	<td colspan = "2">
+	<?lsmb PROCESS input element_data = {
+		label = text('Pay To') #'
+		type = "text"
+		sixe = "50"
+		name = "pay_to_name"
+		value = pay_to_name
+		class = "name"
+	} ?>
+	</td>
 	<tr class="eca_row">
 	<td>
  	<?lsmb PROCESS input element_data = {

Modified: trunk/sql/Pg-database.sql
===================================================================
--- trunk/sql/Pg-database.sql	2009-08-17 15:48:07 UTC (rev 2750)
+++ trunk/sql/Pg-database.sql	2009-08-17 15:58:11 UTC (rev 2751)
@@ -609,6 +609,7 @@
     id serial not null unique,
     entity_id int not null references entity(id) ON DELETE CASCADE,
     entity_class int not null references entity_class(id) check ( entity_class in (1,2) ),
+    pay_to_name text,
     discount numeric, 
     description text,
     discount_terms int default 0,

Modified: trunk/sql/modules/Company.sql
===================================================================
--- trunk/sql/modules/Company.sql	2009-08-17 15:48:07 UTC (rev 2750)
+++ trunk/sql/modules/Company.sql	2009-08-17 15:58:11 UTC (rev 2751)
@@ -309,7 +309,8 @@
 DECLARE out_var company_billing_info;
 	t_id INT;
 BEGIN
-	select c.legal_name, eca.meta_number, e.control_code, c.tax_id, a.line_one, a.line_two, a.line_three, 
+	select coalesce(eca.pay_to_name, c.legal_name), eca.meta_number, 
+		e.control_code, c.tax_id, a.line_one, a.line_two, a.line_three, 
 		a.city, a.state, a.mail_code, cc.name
 	into out_var
 	FROM company c
@@ -382,6 +383,7 @@
     in_threshold NUMERIC,
     in_ar_ap_account_id int,
     in_cash_account_id int,
+    in_pay_to_name text,
     in_taxform_id int
     
 ) returns INT as $$
@@ -420,6 +422,7 @@
                 enddate = in_enddate,
                 threshold = in_threshold,
 		discount_terms = in_discount_terms,
+		pay_to_name = in_pay_to_name,
 		taxform_id = in_taxform_id
             where id = in_credit_id;
         


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