Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

ledgersmb::dbobject::reconciliation(3pm) [debian man page]

LedgerSMB::DBObject::Reconciliation(3pm)		User Contributed Perl Documentation		  LedgerSMB::DBObject::Reconciliation(3pm)

NAME
LedgerSMB::DBObject::Reconciliation - LedgerSMB class defining the core database interaction logic for Reconciliation. SYOPSIS
This module creates object instances based on LedgerSMB's in-database ORM. METHODS
Please note, this module needs a lot of cleanup. new ($class, base => $LedgerSMB::hash) This is the base constructor for all child classes. It must be used with base argument because this is necessary for database connectivity and the like. Of course the base object can be any object that inherits LedgerSMB, so you can use any subclass of that. The per-session dbh is passed between the objects this way as is any information that is needed. get_report($self, $report_id) Collects all the rows from the database in the given report. Returns an arrayref of entries in the table for the given report_id. Returns undef in the event of no records found. get_corrections($self, $report_id, $entry_id) Returns the corrections made for the selected report and entry. Returns undef in the event of no corrections found. entry ($self,$report_id,$entry_id) Returns a single entry from the pending reports table, either cleared or uncleared. update Updates the report, pulling in any new transactions in the date range into the transaction list. submit Submits the reconciliation set for approval. save Saves the reconciliation set for later work import_file Calls the file import function. This is generally assumed to be a csv file although the plugin is very modular and plugins could be written for other formats. The format structure is per account id. approve($self,$reportid) Approves the pending report $reportid. Checks for error codes in the pending report, and approves the report if none are found. Limitations: The creating user may not approve the report. Returns 1 on success. new_report Creates a new report with data entered. delete ($self, $report_id) Requires report_id This will allow the deletion of a report if the report is not approved and the user either owns the unsubmitted report, or the user has the right to approve reports. Returns 0 if successful, or a true result if not. add_entries Adds entries from the import file routine. This function is extremely order dependent. Meaningful scn's must be submitted first it is also recommended that amounts be ordered where scn's are not found. search Searches for reconciliation reports. No inputs mandatory. date_from and date_to specify ranges. balance_from and balance_to specify ranges chart_id specifies an account submitted and approved are exact matches to status. get Gets all information relating to a reconciliation report. id must be set. Populates main hash with values from cr_report Also populates report_lines a list of report lines account_info a hashrefo of information from the account table. beginning_balance cleared_total outstanding_total mismatch_our_total mismatch_our_credits mismatch_our_debits mismatch_their_total mismatch_their_credits mismatch_their_debits get_accounts This is a simple wrapper around reconciliation__account_list Copyright (C) 2007, 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. perl v5.14.2 2011-09-20 LedgerSMB::DBObject::Reconciliation(3pm)

Check Out this Related Man Page

LedgerSMB::DBTest(3pm)					User Contributed Perl Documentation				    LedgerSMB::DBTest(3pm)

NAME
LedgerSMB::DBTest - LedgerSMB commit filter for test cases. SYOPSIS
This module creates a DBI-like interface but ensures autocommit is off, and filters commit statements such that they don't do anything. This can be used for making API test cases which involve DB commits safe for production environments. USAGE
Both LedgerSMB.pm and LedgerSMB/Form.pm assign a global database handler for all database access within a script in the dbh property (for example, $request->{dbh} or $form->{dbh}). By setting this early to a LedgerSMB::DBTest (instead of a DBI object), the tests can be made safe. However, there are a few limitations to be aware of. One cannot run tests through the standard request handler and use this module. Hence this is limited to unit tests of files in the LedgerSMB, scripts, and bin directories. Here is an example of how this could be done: my $lsmb = LedgerSMB->new(); $lsmb->merge($testdata); my $dbh = LedgerSMB::DBTest->connect("dbi:Pg:dbname=$company", "$username", "$password",) $lsmb->{dbh} = $dbh; METHODS
connect($dsn, $user, $pass) Connects to the database and returns a LedgerSMB::DBTest object commit() Tests the current transaction (issues a 'SELECT 1;' to the database). If this is successful returns 1, if not, rolls back and returns false. Note that this means all past tests are rolled back and this is inconsistent with normal transactional behavior. prepare() Returns a statement handle, via the private DBI database handle. do() passes this statement on to the private database handle errstr() passes this call on to the private database handle err() passes this call on to the private database handle quote() passes this call on to the private database handle quote_identifier() passes this call on to the private database handle rollback() passes this call on to the private database handle. Note that this will roll back all statements issues through this object. perl v5.14.2 2010-03-02 LedgerSMB::DBTest(3pm)
Man Page