trusty (3) LedgerSMB::DBObject::Reconciliation.3pm.gz

Provided by: ledgersmb_1.3.25-1_all bug

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

       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.