From f30c5de0e4b5f3ea0f52df1ce4f09c1b5d3c9fd0 Mon Sep 17 00:00:00 2001 From: einhverfr Date: Fri, 21 Dec 2007 07:25:11 +0000 Subject: 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 --- LedgerSMB/DBObject/Company.pm | 59 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) (limited to 'LedgerSMB/DBObject') 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 @_; -- cgit v1.2.3