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

SF.net SVN: ledger-smb: [1997] trunk/LedgerSMB/DBObject/Company.pm



Revision: 1997
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=1997&view=rev
Author:   einhverfr
Date:     2007-12-20 23:25:11 -0800 (Thu, 20 Dec 2007)

Log Message:
-----------
Adding some rudamentary POD to Company.pm

Modified Paths:
--------------
    trunk/LedgerSMB/DBObject/Company.pm

Modified: trunk/LedgerSMB/DBObject/Company.pm
===================================================================
--- trunk/LedgerSMB/DBObject/Company.pm	2007-12-21 07:15:54 UTC (rev 1996)
+++ trunk/LedgerSMB/DBObject/Company.pm	2007-12-21 07:25:11 UTC (rev 1997)
@@ -1,9 +1,33 @@
+=head1 NAME
 
+LedgerSMB::DBObject::Company.pm, LedgerSMB Base Class for Customers/Vendors
+
+=head1 SYNOPSIS
+
+This library contains the base utility functions for creating, saving, and
+retrieving customers and vendors.
+
+=cut
+
 package LedgerSMB::DBObject::Company;
 
 use base qw(LedgerSMB::DBObject);
 use strict;
 
+=head1 METHODS
+
+=over
+
+=item $company->set_entity_class()
+
+This is a stub for a private method that subclasses are expected to overwrite. 
+It will be set to the account class of the entity (1 for vendor, 2 for customer,
+etc).
+
+=back
+
+=cut
+
 sub set_entity_class {
     my $self = shift @_;
     if (!defined $self->{entity_class}){
@@ -11,6 +35,18 @@
     }
 }
 
+=over
+
+=item save()
+
+This stores the company record including a credit accoun tin the database.
+
+TODO:  Separate company from credit account storage.
+
+=back
+
+=cut
+
 sub save {
     my $self = shift @_;
     $self->set_entity_class();
@@ -21,6 +57,16 @@
     $self->{dbh}->commit;
 }
 
+=over
+
+=item save_location
+
+This method saves an address for a company.
+
+=back
+
+=cut
+
 sub save_location {
     my $self = shift @_;
     $self->{country_id} = $self->{country};
@@ -29,6 +75,19 @@
     $self->{dbh}->commit;
 }
 
+=over
+
+=item get_metadata()
+
+This retrieves various information vor building the user interface.  Among other
+things, it sets the following properties:
+$self->{ar_ap_acc_list} = qw(list of ar or ap accounts)
+$self->{cash_acc_list} = qw(list of cash accounts)
+
+=back
+
+=cut
+
 sub get_metadata {
     my $self = shift @_;
 


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