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

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



Revision: 2668
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=2668&view=rev
Author:   aurynn_cmd
Date:     2009-06-12 20:34:58 +0000 (Fri, 12 Jun 2009)

Log Message:
-----------
Committing the Note Subject patch from Lacey Powers.

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-06-12 20:25:45 UTC (rev 2667)
+++ trunk/UI/Contact/contact.html	2009-06-12 20:34:58 UTC (rev 2668)
@@ -859,6 +859,15 @@
 		value=credit_id
 	} ?>
 <?lsmb IF credit_id -?>
+<div class="input">
+   <?lsmb PROCESS input element_data = {
+      label = text('Subject:'),
+      name = "subject"
+      value = subject
+      type = "text"
+      size = "20"
+	} ?>
+</div>
 <div class="input"><?lsmb PROCESS select element_data = {
 			name = "note_class"
 			default_values = [note_class]
@@ -884,9 +893,10 @@
 </form>
 <?lsmb FOREACH n = notes ?>
 <div class="note">
-<div class="timestamp"><?lsmb text('Entered at: [_1]', n.created) ?></div>
-<div class="author"><?lsmb text("Author: [_1]", n.created_by) ?></div>
-<div class="note_contents"><?lsmb n.note ?></div>
+    <div class="note_subject"><?lsmb text('Subject: [_1]', n.subject)?></div>
+    <div class="timestamp"><?lsmb text('Entered at: [_1]', n.created) ?></div>
+    <div class="author"><?lsmb text("Author: [_1]", n.created_by) ?></div>
+    <div class="note_contents"><?lsmb n.note ?></div>
 </div>
 <?lsmb END ?>
 </div>

Modified: trunk/sql/Pg-database.sql
===================================================================
--- trunk/sql/Pg-database.sql	2009-06-12 20:25:45 UTC (rev 2667)
+++ trunk/sql/Pg-database.sql	2009-06-12 20:34:58 UTC (rev 2668)
@@ -412,11 +412,14 @@
 INSERT INTO note_class(id,class) VALUES (3,'Entity Credit Account');
 CREATE UNIQUE INDEX note_class_idx ON note_class(lower(class));
 
-CREATE TABLE note (id serial primary key, note_class integer not null references note_class(id), 
-                   note text not null, vector tsvector not null, 
+CREATE TABLE note (id serial primary key, 
+                   note_class integer not null references note_class(id), 
+                   note text not null, 
+                   vector tsvector not null, 
                    created timestamp not null default now(),
                    created_by text DEFAULT SESSION_USER,
-                   ref_key integer not null);
+                   ref_key integer not null,
+                   subject text);
 
 CREATE TABLE entity_note(entity_id int references entity(id)) INHERITS (note);
 ALTER TABLE entity_note ADD CHECK (note_class = 1);

Modified: trunk/sql/modules/Company.sql
===================================================================
--- trunk/sql/modules/Company.sql	2009-06-12 20:25:45 UTC (rev 2667)
+++ trunk/sql/modules/Company.sql	2009-06-12 20:34:58 UTC (rev 2668)
@@ -93,28 +93,28 @@
 END;
 $$ language plpgsql;	
 
-CREATE OR REPLACE FUNCTION entity__save_notes(in_entity_id int, in_note text)
+CREATE OR REPLACE FUNCTION entity__save_notes(in_entity_id int, in_note text, in_subject text)
 RETURNS INT AS
 $$
 DECLARE out_id int;
 BEGIN
 	-- TODO, change this to create vector too
-	INSERT INTO entity_note (ref_key, note_class, entity_id, note, vector)
-	VALUES (in_entity_id, 1, in_entity_id, in_note, '');
+	INSERT INTO entity_note (ref_key, note_class, entity_id, note, vector, subject)
+	VALUES (in_entity_id, 1, in_entity_id, in_note, '', in_subject);
 
 	SELECT currval('note_id_seq') INTO out_id;
 	RETURN out_id;
 END;
 $$ LANGUAGE PLPGSQL;
 
-CREATE OR REPLACE FUNCTION eca__save_notes(in_credit_id int, in_note text)
+CREATE OR REPLACE FUNCTION eca__save_notes(in_credit_id int, in_note text, in_subject text)
 RETURNS INT AS
 $$
 DECLARE out_id int;
 BEGIN
 	-- TODO, change this to create vector too
-	INSERT INTO eca_note (ref_key, note_class, note, vector)
-	VALUES (in_credit_id, 3, in_note, '');
+	INSERT INTO eca_note (ref_key, note_class, note, vector, subject)
+	VALUES (in_credit_id, 3, in_note, '', in_subject);
 
 	SELECT currval('note_id_seq') INTO out_id;
 	RETURN out_id;


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