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

SF.net SVN: ledger-smb:[4108] addons/1.3/budgetting/branches/1.0



Revision: 4108
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=4108&view=rev
Author:   einhverfr
Date:     2011-11-27 23:01:14 +0000 (Sun, 27 Nov 2011)
Log Message:
-----------
merging from trunk for budgetting

Modified Paths:
--------------
    addons/1.3/budgetting/branches/1.0/LedgerSMB/DBObject/Budget.pm
    addons/1.3/budgetting/branches/1.0/UI/budgetting/budget_entry.html
    addons/1.3/budgetting/branches/1.0/scripts/budgets.pl
    addons/1.3/budgetting/branches/1.0/sql/modules/Budgetting.sql
    addons/1.3/budgetting/branches/1.0/sql/modules/budgetting-tables.sql

Added Paths:
-----------
    addons/1.3/budgetting/branches/1.0/sql/modules/Budgetting-roles.sql
    addons/1.3/budgetting/branches/1.0/sql/modules/Budgetting_install.sql
    addons/1.3/budgetting/branches/1.0/sql/modules/LOADORDER.budgetting

Removed Paths:
-------------
    addons/1.3/budgetting/branches/1.0/sql/modules/budgetting-roles.sql

Property Changed:
----------------
    addons/1.3/budgetting/branches/1.0/


Property changes on: addons/1.3/budgetting/branches/1.0
___________________________________________________________________
Added: svn:mergeinfo
   + /addons/1.3/budgetting/trunk:3892-4107

Modified: addons/1.3/budgetting/branches/1.0/LedgerSMB/DBObject/Budget.pm
===================================================================
--- addons/1.3/budgetting/branches/1.0/LedgerSMB/DBObject/Budget.pm	2011-11-27 22:54:32 UTC (rev 4107)
+++ addons/1.3/budgetting/branches/1.0/LedgerSMB/DBObject/Budget.pm	2011-11-27 23:01:14 UTC (rev 4108)
@@ -266,8 +266,8 @@
 sub save_note {
    my ($self, $subject, $note) = @_;
    my ($info) = $self->call_procedure(
-          {procname => 'budget__save_note', 
-           args => [$self->{id}, $subject, $note]}
+          procname => 'budget__save_note', 
+           args => [$self->{id}, $subject, $note]
    );
 }
 

Modified: addons/1.3/budgetting/branches/1.0/UI/budgetting/budget_entry.html
===================================================================
--- addons/1.3/budgetting/branches/1.0/UI/budgetting/budget_entry.html	2011-11-27 22:54:32 UTC (rev 4107)
+++ addons/1.3/budgetting/branches/1.0/UI/budgetting/budget_entry.html	2011-11-27 23:01:14 UTC (rev 4108)
@@ -192,5 +192,56 @@
 
 <?lsmb FOREACH button IN buttons; PROCESS button element_data=button; END ?>
 </form>
+<?lsmb IF id ?>
+<form name="note" action="<?lsmb script ?>" method="POST">
+<?lsmb PROCESS input element_data = {
+       name = "id"
+      value = id
+       type = "hidden"
+} ?>
+<div class="inputrow">
+<div class="inputgroup">
+<?lsmb PROCESS input element_data = {
+        type = "text"
+        name = "subject"
+        size = "64"
+       label = text('Subject')
+}
+?>
+</div></div>
+<div class="inputrow">
+<div class="inputgroup">
+<?lsmb PROCESS textarea element_data = {
+        name = "note"
+        cols = '64'
+        rows = '5'
+       label = text('Content')
+}
+?>
+</div></div>
+<div class="inputrow">
+<div class="inputgroup">
+<?lsmb PROCESS button element_data = {
+        name = "action"
+       value = 'add_note'
+        type = "submit"
+       class = "submit"
+        text = text('Add Note') #'
+}
+?>
+</div></div>
+</form>
+<?lsmb END # IF id ?>
+<?lsmb FOREACH note IN notes ?>
+<div class="note">
+<div class="note_subject"><label><?lsmb text('Subject') ?>:</label>
+<?lsmb note.subject ?></div>
+<div class="note_entry_info"><label>&nbsp;:</label>
+<?lsmb note.created_by ?>:<?lsmb note.created ?>
+</div>
+<div class="note_content"><label><?lsmb text('Content') ?>:</label>
+<?lsmb note.note ?>
+</div>
+<?lsmb END # FOREACH Note ?>
 </body>
 </html>

Modified: addons/1.3/budgetting/branches/1.0/scripts/budgets.pl
===================================================================
--- addons/1.3/budgetting/branches/1.0/scripts/budgets.pl	2011-11-27 22:54:32 UTC (rev 4107)
+++ addons/1.3/budgetting/branches/1.0/scripts/budgets.pl	2011-11-27 23:01:14 UTC (rev 4108)
@@ -321,6 +321,9 @@
 
 sub add_note {
     my ($request) = @_;
+    my $budget = LedgerSMB::DBObject::Budget->new({base => $request});
+    $budget->save_note($request->{subject}, $request->{note});
+    view_budget($request);
 } 
 
 =item begin_search

Copied: addons/1.3/budgetting/branches/1.0/sql/modules/Budgetting-roles.sql (from rev 4107, addons/1.3/budgetting/trunk/sql/modules/Budgetting-roles.sql)
===================================================================
--- addons/1.3/budgetting/branches/1.0/sql/modules/Budgetting-roles.sql	                        (rev 0)
+++ addons/1.3/budgetting/branches/1.0/sql/modules/Budgetting-roles.sql	2011-11-27 23:01:14 UTC (rev 4108)
@@ -0,0 +1,21 @@
+--TODO
+CREATE ROLE "lsmb_<?lsmb dbname ?>__budget_enter" WITH INHERIT NOLOGIN;
+CREATE ROLE "lsmb_<?lsmb dbname ?>__budget_approve" WITH INHERIT NOLOGIN;
+CREATE ROLE "lsmb_<?lsmb dbname ?>__budget_obsolete" WITH INHERIT NOLOGIN;
+
+GRANT SELECT 
+ON budget_info, budget_line, budget_to_department, budget_to_project
+TO public;
+
+GRANT INSERT 
+ON budget_info, budget_line, budget_to_department, budget_to_project 
+TO "lsmb_<?lsmb dbname ?>__budget_enter";
+
+GRANT UPDATE (approved_at, approved_by) on budget_info 
+TO "lsmb_<?lsmb dbname ?>__budget_approve";
+
+GRANT UPDATE (obsolete_at, obsolete_by) on budget_info
+TO "lsmb_<?lsmb dbname ?>__budget_obsolete";
+
+GRANT EXECUTE ON FUNCTION budget__reject(in_id int) 
+TO "lsmb_<?lsmb dbname ?>__budget_approve";

Modified: addons/1.3/budgetting/branches/1.0/sql/modules/Budgetting.sql
===================================================================
--- addons/1.3/budgetting/branches/1.0/sql/modules/Budgetting.sql	2011-11-27 22:54:32 UTC (rev 4107)
+++ addons/1.3/budgetting/branches/1.0/sql/modules/Budgetting.sql	2011-11-27 23:01:14 UTC (rev 4108)
@@ -248,8 +248,8 @@
 (in_id int, in_subject text, in_note text)
 RETURNS budget_note AS
 $$
-INSERT INTO budget_note (note_class, subject, note, ref_key) 
-     values (5, $2, $3, $1);
+INSERT INTO budget_note (subject, note, ref_key) 
+     values ($2, $3, $1);
 
 SELECT * FROM budget_note WHERE id = currval('note_id_seq'::regclass);
 $$ language sql;

Copied: addons/1.3/budgetting/branches/1.0/sql/modules/Budgetting_install.sql (from rev 4107, addons/1.3/budgetting/trunk/sql/modules/Budgetting_install.sql)
===================================================================
--- addons/1.3/budgetting/branches/1.0/sql/modules/Budgetting_install.sql	                        (rev 0)
+++ addons/1.3/budgetting/branches/1.0/sql/modules/Budgetting_install.sql	2011-11-27 23:01:14 UTC (rev 4108)
@@ -0,0 +1,2 @@
+\i budgetting_tables.sql
+\i budgetting_menu.sql

Copied: addons/1.3/budgetting/branches/1.0/sql/modules/LOADORDER.budgetting (from rev 4107, addons/1.3/budgetting/trunk/sql/modules/LOADORDER.budgetting)
===================================================================
--- addons/1.3/budgetting/branches/1.0/sql/modules/LOADORDER.budgetting	                        (rev 0)
+++ addons/1.3/budgetting/branches/1.0/sql/modules/LOADORDER.budgetting	2011-11-27 23:01:14 UTC (rev 4108)
@@ -0,0 +1 @@
+Budgetting.sql

Deleted: addons/1.3/budgetting/branches/1.0/sql/modules/budgetting-roles.sql
===================================================================
--- addons/1.3/budgetting/branches/1.0/sql/modules/budgetting-roles.sql	2011-11-27 22:54:32 UTC (rev 4107)
+++ addons/1.3/budgetting/branches/1.0/sql/modules/budgetting-roles.sql	2011-11-27 23:01:14 UTC (rev 4108)
@@ -1,21 +0,0 @@
---TODO
-CREATE ROLE "lsmb_<?lsmb dbname ?>__budget_enter" WITH INHERIT NOLOGIN;
-CREATE ROLE "lsmb_<?lsmb dbname ?>__budget_approve" WITH INHERIT NOLOGIN;
-CREATE ROLE "lsmb_<?lsmb dbname ?>__budget_obsolete" WITH INHERIT NOLOGIN;
-
-GRANT SELECT 
-ON budget_info, budget_line, budget_to_department, budget_to_project
-TO public;
-
-GRANT INSERT 
-ON budget_info, budget_line, budget_to_department, budget_to_project 
-TO "lsmb_<?lsmb dbname ?>__budget_enter";
-
-GRANT UPDATE (approved_at, approved_by) on budget_info 
-TO "lsmb_<?lsmb dbname ?>__budget_approve";
-
-GRANT UPDATE (obsolete_at, obsolete_by) on budget_info
-TO "lsmb_<?lsmb dbname ?>__budget_obsolete";
-
-GRANT EXECUTE ON FUNCTION budget__reject(in_id int) 
-TO "lsmb_<?lsmb dbname ?>__budget_approve";

Modified: addons/1.3/budgetting/branches/1.0/sql/modules/budgetting-tables.sql
===================================================================
--- addons/1.3/budgetting/branches/1.0/sql/modules/budgetting-tables.sql	2011-11-27 22:54:32 UTC (rev 4107)
+++ addons/1.3/budgetting/branches/1.0/sql/modules/budgetting-tables.sql	2011-11-27 23:01:14 UTC (rev 4108)
@@ -41,3 +41,4 @@
     check (note_class = 6),
     foreign key(ref_key) references budget_info(id)
 ) INHERITS (note);
+ALTER TABLE budget_note ALTER COLUMN note_class SET DEFAULT 6;

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