LedgerSMB Documentation

Description manuals and libraries
LedgerSMB Documentation > Perl Modules > LedgerSMB::Company
Source

NAME

LedgerSMB::Company - Entrypoint to the Perl API for a LedgerSMB company

DESCRIPTION

This module defines the class which encapsulates a connection to a LedgerSMB company database. Its responsibility is to provide access to the various groups of functionality (modules) in the database and their wrapping Perl API modules.

SYNOPSIS

  use LedgerSMB::Company;

  my $dbh = DBI->connect(...);
  my $c = LedgerSMB::Company->new( dbh => $dbh );

  print $c->setting('company.legalname');

METHODS

DESCRIPTION

ATTRIBUTES

dbh (required)

Database handle for connection to the LedgerSMB company database. The access rights to the company are derived from the connected user.

configuration

Holds a LedgerSMB::Company::Configuration instance, representing the configuration of the connected company database (as visible to the connected user).

This attribute cannot be set at object instantiation.

Note: Depending on the connected user, different parts of the configuration may be visible. In order to see and manage the complete company setup, be sure to connect as a database owner or PostgreSQL super-user.

LICENSE AND COPYRIGHT

Copyright (C) 2020 The LedgerSMB Core Team

This file is licensed under the GNU General Public License version 2, or at your option any later version. A copy of the license should have been included with your software.