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

SF.net SVN: ledger-smb:[3778] addons/1.3/budgetting/trunk



Revision: 3778
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=3778&view=rev
Author:   einhverfr
Date:     2011-09-29 15:34:14 +0000 (Thu, 29 Sep 2011)
Log Message:
-----------
More budgetting stuff

Modified Paths:
--------------
    addons/1.3/budgetting/trunk/LedgerSMB/DBObject/Budget.pm
    addons/1.3/budgetting/trunk/LedgerSMB/DBObject/Budget_Report.pm
    addons/1.3/budgetting/trunk/sql/modules/Budgetting.sql
    addons/1.3/budgetting/trunk/sql/modules/budgetting-tables.sql

Modified: addons/1.3/budgetting/trunk/LedgerSMB/DBObject/Budget.pm
===================================================================
--- addons/1.3/budgetting/trunk/LedgerSMB/DBObject/Budget.pm	2011-09-29 07:01:54 UTC (rev 3777)
+++ addons/1.3/budgetting/trunk/LedgerSMB/DBObject/Budget.pm	2011-09-29 15:34:14 UTC (rev 3778)
@@ -6,6 +6,7 @@
 
 package LedgerSMB::DBObject::Budget;
 use strict;
+our $VERSION = 0.1;
 
 =head1 SYNOPSIS
 
@@ -32,25 +33,135 @@
 
 =over
 
-=item   $id INT,
-=item   $start_date date,
-=item   $end_date date ,
-=item   $reference text,
-=item   $description text,
-=item   $entered_by int,
-=item   $approved_by int,
-=item   $entered_at timestamp,
-=item   $approved_at timestamp,
-=item   $obsolete_by timestamp,
+=item   $id INT
+   The id of the budget
+
+=item   $start_date date
+   The start date of the budget, inclusive
+
+=item   $end_date date
+   The end date of the budget, inclusive
+
+=item   $reference text
+   This is a text reference identifier for the budget
+
+=item   $description text
+   This is a text field for the budget description.  It is searchable.
+
+=item   $entered_by int
+   Entity id of the employee or contractor who entered the budget
+
+=item   $approved_by int
+   Entity id of the employee or contractor who approved the budget
+
+=item   $obsolete_by int
+   Entity id for the employee or contractor who marked the budget obsolete
+
+=item   $entered_at timestamp
+   Time the budget was entered
+
+=item   $approved_at timestamp
+   Time the budget was approved
+
+=item   $obsolete_at timestamp
+   Time the budget was deleted
+
 =item   $entered_by_name text
-=item   $approved_by_name text,
-=item   $obsolete_by_name text,
-=item   $department_id int,
+   Name of entity who entered the budget. 
+
+=item   $approved_by_name text
+   Name of entity who approved the budget
+
+=item   $obsolete_by_name text
+   Name of entity who obsoleted the budget
+
+=item   $department_id int
+   ID of department for which the budget is for
+
+=item   $department_name text
+   Name of the department for which the budget is for
+
 =item   $project_id int
+  ID  of project of which the budget is for
+
+=item  $projectnumber text
+   Text descriptor of the project of which the budget is for
+
 =item   @lines 
+   These are the actual lines of the budget.  Each one is a hashref containing
 
+=over 
+
+=item $budget_id int
+   Optional.  Don't use.  Use the $id field of the parent instead.
+
+=item $account_id int
+   The id of the chart of accounts entry
+
+=item $accno text
+   The account number for the coa entry
+
+=item $amount numeric
+   The amount budgetted
+
+=item $description text
+   Description of line item
+
+=back
+
+=back
+
 =head1 METHODS
 
+=over
+
+=item save
+
+=cut
+
+sub save {
+}
+
+=item search(....)
+
+=cut 
+
+sub search {
+}
+
+=item get(id)
+
+=cut
+
+sub get {
+   my ($self, $id) = @_;
+}
+
+=item approve
+
+=cut
+
+sub approve {
+}
+
+=item reject
+
+=cut
+
+sub reject {
+}
+
+=item obsolete
+
+=cut
+
+sub obsolete {
+}
+
+1;
+
+=back
+
 =head1 SEE ALSO
 
 =over
@@ -64,3 +175,8 @@
 =back
 
 =head1 COPYRIGHT AND LICENSE
+
+Copyright (C) 2011 LedgerSMB Core Team.  This file is licensed under the GNU 
+General Public License version 2, or at your option any later version.  Please
+see the included License.txt for details.
+

Modified: addons/1.3/budgetting/trunk/LedgerSMB/DBObject/Budget_Report.pm
===================================================================
--- addons/1.3/budgetting/trunk/LedgerSMB/DBObject/Budget_Report.pm	2011-09-29 07:01:54 UTC (rev 3777)
+++ addons/1.3/budgetting/trunk/LedgerSMB/DBObject/Budget_Report.pm	2011-09-29 15:34:14 UTC (rev 3778)
@@ -31,3 +31,12 @@
 
 =head1 METHODS
 
+=cut
+
+1;
+
+=head1 COPYRIGHT AND LICENSE
+
+Copyright (C) 2011 LedgerSMB Core Team.  This file is licensed under the GNU 
+General Public License version 2, or at your option any later version.  Please
+see the included License.txt for details.

Modified: addons/1.3/budgetting/trunk/sql/modules/Budgetting.sql
===================================================================
--- addons/1.3/budgetting/trunk/sql/modules/Budgetting.sql	2011-09-29 07:01:54 UTC (rev 3777)
+++ addons/1.3/budgetting/trunk/sql/modules/Budgetting.sql	2011-09-29 15:34:14 UTC (rev 3778)
@@ -81,7 +81,8 @@
    in_approved_by int,
    in_department_id int,
    in_project_id int,
-   in_is_approved bool, in_is_obsolete bool
+   in_is_approved bool, 
+   in_is_obsolete bool
 )  IS $$ This is a general search for budgets$$;
 
 CREATE OR REPLACE FUNCTION budget__save_info

Modified: addons/1.3/budgetting/trunk/sql/modules/budgetting-tables.sql
===================================================================
--- addons/1.3/budgetting/trunk/sql/modules/budgetting-tables.sql	2011-09-29 07:01:54 UTC (rev 3777)
+++ addons/1.3/budgetting/trunk/sql/modules/budgetting-tables.sql	2011-09-29 15:34:14 UTC (rev 3778)
@@ -17,19 +17,22 @@
 
 CREATE TABLE budget_to_department (
     budget_id int not null unique references budget_info(id),
-    department_id int not null references department(id)
+    department_id int not null references department(id),
+    primary key (budget_id)
 );
 
 CREATE TABLE budget_to_project (
     budget_id int not null unique references budget_info(id),
-    project_id int not null references project(id)
+    project_id int not null references project(id),
+    primary key (budget_id)
 );
 
 CREATE OR REPLACE budget_line (
     budget_id int not null references budget_info(id),
     account_id int not null references account(id),
     description text,
-    amount numeric not null 
+    amount numeric not null,
+    primary key (budget_id, account_id) 
 );
 
 INSERT INTO note_class (id, class) values ('5', 'Budget');

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