Provided by: ledgersmb_1.3.25-1_all bug

NAME

       LedgerSMB::AA - Contains the routines for managing AR and AP transactions.

SYNOPSIS

       This module contains the routines for managing AR and AP transactions and many of the
       reorts (a few others are found in LedgerSMB::RP.pm).

       All routines require $form->{dbh} to be set so that database actions can be performed.

       This module is due to be deprecated for active development as soon as a replacement is
       available.

       post_transaction() Post transaction uses the following variables in the $form variable: *
       dbh - the database connection handle * currency - The current users' currency *
       defaultcurrency - The "normal" currency * department - Unknown * department_id - ID for
       the department * exchangerate - Conversion between currency and defaultcurrency *
       invnumber - invoice number * reverse - ? * rowcount - Number of rows in the invoice *
       taxaccounts - Apply taxes? * taxincluded - ? * transdate - Date of the transaction * vc -
       Vendor or customer - determines transaction type
       get_files
           Returns a list of files associated with the existing transaction.  This is
           provisional, and will change for 1.4 as the GL transaction functionality is
                             {ref_key => $self->{id}, file_class => 1} rewritten

       delete_transaction(\%myconfig, $form)
           Deletes a transaction identified by $form->{id}, whether it is an ar or ap transaction
           is identified by $form->{vc}.  $form->{invnumber} used for the audittrail routine.

       transactions(\%myconfig, $form)
           Generates the transaction and outstanding reports.  Form variables used in this
           function are:

           approved: whether or not transactions must be approved to show up

           transdatefrom: Earliest day of transactions

           transdateto:  Latest day of transactions

           month, year, interval:  Used in palce of transdatefrom and transdate to

           vc:  'customer' for ar, 'vendor' for ap.

           meta_number:  customer/vendor number

           entity_id:  A specific entity id

           parts_id:  Show transactions including a specific part

           department_id:  Transactions for a department

           entity_credit_account: As an alternate for meta_number to identify a customer of
           vendor credit account

           invoice_type:  3 for on-hold, 2 for active

           The transaction list is stored at: @{$form->{transactions}}

       get_name(\%myconfig, $form)
           Retrieves the last account used.  Also retrieves tax accounts, departments, and a few
           other things.

           Form variables used: vc: customer or vendor ${vc}_id:  id of vendor/customemr
           transdate:  Transaction date desired

           Sets the following form variables currency exchangerate forex taxaccounts

       taxform_exist($form, $cv_id)
           Determines if a taxform attached to the entity_credit_account record (where the id
           field is the same as $cv_id) exists. Returns true if it exists, false if not.

       update_ac_tax_form($form,$dbh,$entry_id,$report)
           Updates the ac_tax_form checkbox for the acc_trans.entry_id (where it is the same as
           $entry_id).  If $report is true, sets it to true, if false, sets it to false.  $report
           must be a valid *postgresql* bool value (0/1, t/f, 'true'/'false').

       get_taxchech($entry_id,$dbh)
           Returns true if the acc_trans record has been set to reportable in the past false
           otherwise.

       save_intnotes($form)
           Saves the $form->{intnotes} into the ar/ap.intnotes field.

COPTYRIGHT

       # LedgerSMB # Small Medium Business Accounting software # http://www.ledgersmb.org/ #
       Copyright (C) 2006-2010 # This work contains copyrighted information from a number of
       sources all used # with permission.  # # This file contains source code included with or
       based on SQL-Ledger which # is Copyright Dieter Simader and DWS Systems Inc. 2000-2005 and
       licensed # under the GNU General Public License version 2 or, at your option, any later #
       version.  For a full list including contact information of contributors, # maintainers,
       and copyright holders, see the CONTRIBUTORS file.  # # Original Copyright Notice from SQL-
       Ledger 2.6.17 (before the fork): # Copyright (C) 2006 # #  Author: DWS Systems Inc.  #
       Web: http://www.sql-ledger.org # #  Contributors: # # # See COPYRIGHT file for copyright
       information