summaryrefslogtreecommitdiff
path: root/LedgerSMB
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-12-21 07:25:11 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-12-21 07:25:11 +0000
commitf30c5de0e4b5f3ea0f52df1ce4f09c1b5d3c9fd0 (patch)
tree6551fe512d0983948befa67a83449f4a788c5095 /LedgerSMB
parent1409e15e9ba7b7b45d5ea095d2d10e08818bb108 (diff)
Adding some rudamentary POD to Company.pm
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1997 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'LedgerSMB')
-rw-r--r--LedgerSMB/DBObject/Company.pm59
1 files changed, 59 insertions, 0 deletions
diff --git a/LedgerSMB/DBObject/Company.pm b/LedgerSMB/DBObject/Company.pm
index 0e56567b..9b122b4d 100644
--- a/LedgerSMB/DBObject/Company.pm
+++ b/LedgerSMB/DBObject/Company.pm
@@ -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 @@ sub set_entity_class {
}
}
+=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 @@ sub save {
$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 @@ sub save_location {
$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 @_;