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

SF.net SVN: ledger-smb:[4318] trunk/LedgerSMB/DBObject



Revision: 4318
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=4318&view=rev
Author:   einhverfr
Date:     2012-02-15 10:07:29 +0000 (Wed, 15 Feb 2012)
Log Message:
-----------
Outline of Business Unit classes

Added Paths:
-----------
    trunk/LedgerSMB/DBObject/Business_Unit.pm
    trunk/LedgerSMB/DBObject/Business_Unit_Class.pm

Added: trunk/LedgerSMB/DBObject/Business_Unit.pm
===================================================================
--- trunk/LedgerSMB/DBObject/Business_Unit.pm	                        (rev 0)
+++ trunk/LedgerSMB/DBObject/Business_Unit.pm	2012-02-15 10:07:29 UTC (rev 4318)
@@ -0,0 +1,134 @@
+=head1 NAME
+
+LedgerSMB::DBObject::Business_Unit_Class
+
+=head1 SYNOPSYS
+
+This holds the information as to the handling of classes of buisness units.  
+Business units are reporting units which can be used to classify various line 
+items of transactions in different ways and include handling for departments, 
+funds, and projects.
+
+=cut
+
+package LedgerSMB::DBObject::Business_Unit_Class;
+use Moose;
+extends LedgerSMB::DBobject_Moose;
+
+=head1 PROPERTIES
+
+=over
+
+=item id
+
+This is the internal id of the unit class.  It is undef when the class has not
+yet been saved in the database 
+
+=cut
+
+has 'id' => (is => 'rw', isa => 'Int');
+
+=item class_id
+
+Required. Internal id of class (1 for department, 2 for project, etc)
+
+=cut
+
+has 'class_id' => (is => 'ro', isa => 'Int', required => '1'); 
+
+=item control_code  
+
+This is a textual reference to the business reporting unit.  It must be unique
+to the business units of its class.
+
+=cut
+
+has 'control_code' => (is => 'ro', isa => 'Str', required => '1');
+
+=item description
+
+Textual description of the reporting unit.
+
+=cut
+
+has 'description' => (is => 'rw', isa => 'Str');
+
+=item start_date
+
+The first date the business reporting unit is valid.  We use the PGDate class
+here for conversion to/from input and to/from strings for the db.
+
+=cut
+
+has 'start_date' => (is => 'rw', isa => 'LedgerSMB::PGDate');
+
+=item end_date
+
+The last date the business reporting unit is valid.  We use the PGDate class
+here for conversion to/from input and to/from strings for the db.
+
+=cut
+
+has 'end_date' => (is => 'rw', isa => 'LedgerSMB::PGDate');
+
+=item parent_id
+
+The internal id of the parent, if applicable.  undef means no parent.
+
+=cut
+
+has 'parent_id' => (is => 'rw', isa => 'Int');
+
+=item parent
+
+A reference to the parent business reporting unit
+
+=cut
+
+has 'parent' => (is => 'rw', isa => 'LedgerSMB::DBObject::Business_Unit');
+
+=item credit_id
+
+The internal id of the customer, vendor, employee, etc. attached to this 
+unit.
+
+=cut
+
+has 'credit_id' => (is => 'rw', isa => 'Int');
+
+=item children
+
+The children of the current unit, if applicable, and desired.
+
+This is not set unless get_tree has already been called.
+
+=back
+
+=cut
+
+has 'children' => (is => 'rw', isa => 'ArrayRef[LedgerSMB::DBObject::Business_Unit]');
+
+=head1 METHODS
+
+=over
+
+=item get($id)
+
+=item save
+
+=item list
+
+=item delete
+
+=item search
+
+=item get_tree
+
+=item tree_to_list
+ 
+=back
+
+=head1 COPYRIGHT
+
+Copyright (C) 2012 The LedgerSMB Core Team.  This module may be used under the
+GNU GPL in accordance with the LICENSE file listed.

Added: trunk/LedgerSMB/DBObject/Business_Unit_Class.pm
===================================================================
--- trunk/LedgerSMB/DBObject/Business_Unit_Class.pm	                        (rev 0)
+++ trunk/LedgerSMB/DBObject/Business_Unit_Class.pm	2012-02-15 10:07:29 UTC (rev 4318)
@@ -0,0 +1,101 @@
+=head1 NAME
+
+LedgerSMB::DBObject::Business_Unit_Class
+
+=head1 SYNOPSYS
+
+This holds the information as to the handling of classes of buisness units.  
+Business units are reporting units which can be used to classify various line 
+items of transactions in different ways and include handling for departments, 
+funds, and projects.
+
+=cut
+
+package LedgerSMB::DBObject::Business_Unit_Class;
+use Moose;
+extends LedgerSMB::DBobject_Moose;
+
+=head1 PROPERTIES
+
+=over
+
+=item id
+
+This is the internal id of the unit class.  It is undef when the class has not
+yet been saved in the database 
+
+=cut
+
+has 'id' => (is => 'rw', isa => 'Int');
+
+=item label
+
+This is the human-readible label for the class.  It must be unique among
+classes.
+
+=cut
+
+has 'label' => (is => 'rw', isa => 'Str');
+
+=item active bool
+
+If true, indicates that this will show up on screens.  If not, it will be
+hidden.
+
+=cut
+
+has 'active' => (is => 'rw', isa => 'Bool');
+
+=item ordering 
+
+The entry boxes (drop down or text entry) are set arranged from low to high
+by this field on the data entry screens.
+
+=cut
+
+has 'ordering' => (is => 'rw', isa => 'Int');
+
+=back
+
+=head1 METHODS
+
+=over
+
+=item get($id)
+
+=item save
+
+=item list
+
+=item delete
+ 
+=back
+
+=head1 PREDEFINED CLASSES
+
+=over
+
+=item Department, ID: 1
+
+=item Project, ID: 2
+
+=item Job, ID: 3
+
+Used for manufacturing lots
+
+=item Fund, ID: 4
+
+Used by non-profits for funds accounting
+
+=item Customer, ID 5
+
+Used in some countries/industries for multi-customer receipts
+
+=item Vendor, ID 6
+
+Used in some countries/industries for multi-vendor payments
+
+=head1 COPYRIGHT
+
+Copyright (C) 2012 The LedgerSMB Core Team.  This module may be used under the
+GNU GPL in accordance with the LICENSE file listed.

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