.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.28) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{ . if \nF \{ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "LedgerSMB::DBObject::Reconciliation 3pm" .TH LedgerSMB::DBObject::Reconciliation 3pm "2014-06-10" "perl v5.18.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" LedgerSMB::DBObject::Reconciliation \- LedgerSMB class defining the core database interaction logic for Reconciliation. .SH "SYOPSIS" .IX Header "SYOPSIS" This module creates object instances based on LedgerSMB's in-database \s-1ORM. \s0 .SH "METHODS" .IX Header "METHODS" Please note, this module needs a lot of cleanup. .ie n .IP "new ($class, base => $LedgerSMB::hash)" 4 .el .IP "new ($class, base => \f(CW$LedgerSMB::hash\fR)" 4 .IX Item "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. .Sp 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. .ie n .IP "get_report($self, $report_id)" 4 .el .IP "get_report($self, \f(CW$report_id\fR)" 4 .IX Item "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. .Sp Returns undef in the event of no records found. .ie n .IP "get_corrections($self, $report_id, $entry_id)" 4 .el .IP "get_corrections($self, \f(CW$report_id\fR, \f(CW$entry_id\fR)" 4 .IX Item "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. .IP "entry ($self,$report_id,$entry_id)" 4 .IX Item "entry ($self,$report_id,$entry_id)" Returns a single entry from the pending reports table, either cleared or uncleared. .IP "update" 4 .IX Item "update" Updates the report, pulling in any new transactions in the date range into the transaction list. .IP "submit" 4 .IX Item "submit" Submits the reconciliation set for approval. .IP "save" 4 .IX Item "save" Saves the reconciliation set for later work .IP "import_file" 4 .IX Item "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. .IP "approve($self,$reportid)" 4 .IX Item "approve($self,$reportid)" Approves the pending report \f(CW$reportid\fR. Checks for error codes in the pending report, and approves the report if none are found. .Sp Limitations: The creating user may not approve the report. .Sp Returns 1 on success. .IP "new_report" 4 .IX Item "new_report" Creates a new report with data entered. .ie n .IP "delete ($self, $report_id)" 4 .el .IP "delete ($self, \f(CW$report_id\fR)" 4 .IX Item "delete ($self, $report_id)" Requires report_id .Sp 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. .Sp Returns 0 if successful, or a true result if not. .IP "add_entries" 4 .IX Item "add_entries" Adds entries from the import file routine. .Sp 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. .IP "search" 4 .IX Item "search" Searches for reconciliation reports. No inputs mandatory. .Sp 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. .IP "get" 4 .IX Item "get" Gets all information relating to a reconciliation report. .Sp id must be set. .Sp Populates main hash with values from cr_report .Sp Also populates .RS 4 .IP "report_lines" 4 .IX Item "report_lines" a list of report lines .IP "account_info" 4 .IX Item "account_info" a hashrefo of information from the account table. .IP "beginning_balance" 4 .IX Item "beginning_balance" .PD 0 .IP "cleared_total" 4 .IX Item "cleared_total" .IP "outstanding_total" 4 .IX Item "outstanding_total" .IP "mismatch_our_total" 4 .IX Item "mismatch_our_total" .IP "mismatch_our_credits" 4 .IX Item "mismatch_our_credits" .IP "mismatch_our_debits" 4 .IX Item "mismatch_our_debits" .IP "mismatch_their_total" 4 .IX Item "mismatch_their_total" .IP "mismatch_their_credits" 4 .IX Item "mismatch_their_credits" .IP "mismatch_their_debits" 4 .IX Item "mismatch_their_debits" .RE .RS 4 .RE .IP "get_accounts" 4 .IX Item "get_accounts" .PD This is a simple wrapper around reconciliation_\|_account_list .SH "Copyright (C) 2007, The LedgerSMB core team." .IX Header "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.