|
/home/cpanrun/depot/main/contrib-patched/perl/CPAN/src/Finance-MICR-LineParser/blib/html/site/lib/Finance/MICR/LineParser.html |
=head2 valid()</pre>
<p>Ask if the MICR code is valid
Returns true or undef
Valid means the string argument was matched as a business check MICR or a personal
check MICR. That is, the fields are there and in the *right order*.
NOTE that if your code is deemed invalid, you *may* still get field values.
But your string as a whole should be considered invalid.
You should always use <code>valid()</code> before taking the output as gospel.</p>
<p>
</p>
<h2><a name="status__"><code>status()</code></a></h2>
<p>Returns a summary string including original string argument to constructor,
"clean_run" pass count for the string, string after those clean runs, if
the module gave up, etc. Useful for logging and find out if you have any
problems.</p>
<p>Typical usage:</p>
<pre>
<span class="variable">$micr</span><span class="operator">-></span><span class="variable">valid</span> <span class="keyword">or</span> <span class="keyword">print</span> <span class="variable">STDERR</span> <span class="variable">$micr</span><span class="operator">-></span><span class="variable">status</span><span class="operator">;</span>
</pre>
<p>
</p>
<h2><a name="is_business_check__"><code>is_business_check()</code></a></h2>
<p>Returns true or false. Presently a business check has the fields;</p>
<pre>
AUXILIARY_ON_US TRANSIT ON_US</pre>
<p>In that order. Furthermore, the check number is extracted from AUXILIARY_ON_US</p>
<p>
</p>
<h2><a name="is_personal_check__"><code>is_personal_check()</code></a></h2>
<p>Returns true or false. Presently a business check has the fields;</p>
<pre>
TRANSIT ON_US</pre>
<p>In that order. Furthermore the check number is extracted from ON_US, digits after
the on us symbol.</p>
<p>
</p>
<h2><a name="is_unknown_check__"><code>is_unknown_check()</code></a></h2>
<p>Means that we have matched one or more main fields (aux on us, on us, transit) but
some are missing or in unexpected order.
This should be taken *very* seriously. It means any strings that return
<code>is_unknown_check()</code> *must* be checked for correctness.</p>
<p>
</p>
<h2><a name="get_check_type__"><code>get_check_type()</code></a></h2>
<p>Returns (u)nknown, (b)usiness, (p)ersonal, or undef.</p>
<p>
</p>
<h2><a name="clean_runs__"><code>clean_runs()</code></a></h2>
<p>How many times the string has been been "cleaned". This does not tell you that the
string is a valid MICR code. Just how many times it was cleaned. The higher the
number, the more you should inspect the output by a human being.</p>
<p>
</p>
<h2><a name="original_string__"><code>original_string()</code></a></h2>
<p>String passed to constructor.</p>
<p>
</p>
<h2><a name="micr__"><code>micr()</code></a></h2>
<p>MICR string without spaces of extraneous garble.
If you passed a MICR string *with* garble, this is different from the <code>original_string()</code>
Returns undef if the string is invalid.
NOTE: a string which is not <code>valid()</code> will not return a <code>micr()</code> code.</p>
<p>
</p>
<h2><a name="micr_pretty__"><code>micr_pretty()</code></a></h2>
<p>Returns the <code>micr()</code> code somewhat formatted for human eyes. That is..
If your original string argument to the constructror is</p>
<p>3 12 U0000011135U T052000113T 984U0837166 _ 23 1</p>
<pre>
Then this returns somethign like</pre> <p>U0000011135U_T052000113T_984U0837166</p> <p>NOTE: a string which is not <code>valid()</code> will not return a <code>micr_pretty()</code> code.</p> <p> </p> <h2><a name=``giveup__''><code>giveup()</code></a></h2> <p>Returns true or false. Think of this also as 'gave up'. NOTE: A string that ended up not <code>valid()</code> could still return 0 here. This is because by default, Finance::MICR::LineParser attempts to match at least one of the main MICR fields before giving up.</p> <p> </p> <hr /> <h1><a name=``micr_specific_methods''>MICR SPECIFIC METHOD/a</h1> <p>There are five major fields on a MICR line. Two of the five major fields (transit and "on us") are broken into multiple fields- here called "sub fields". First are the five major fields...</p> <p> </p> <h2><a name=``auxiliary_on_us__''><code>auxiliary_on_us()</code></a></h2> <p>contains check number if present; bracketed by 'on us' symbols returns undef if not found.</p> <p> </p> <h2><a name=``epc__''><code>epc()</code></a></h2> <p>one character located to the left of the transit field if present returns undef if not found. This needs work.</p> <p> </p> <h2><a name=``transit__''><code>transit()</code></a></h2> <p>Always 9 digits including check digit. Opens and closes with a transit symbol. (Some papers refer to this field as having 11 chars because they are counting the open and close symbols as characters.) returns undef if not found.</p> <p> </p> <h2><a name=``on_us__''><code>on_us()</code></a></h2> <p>variable length 19 digits max between transit and amount fields (to the right of transit.) returns undef if not found.</p> <p> </p> <h2><a name=``ammount__''><code>ammount()</code></a></h2> <p>10 digits zero filled; bracketed by two amount symbols returns undef if not found. This needs work.</p> <p> </p> <hr /> <h1><a name=``transit_sub_field_methods''>TRANSIT SUB FIELD METHOD/a</h1> <p>Transit has 9 digits. It is croken into multiple fields:</p> <p> </p> <h2><a name=``routing_number__''><code>routing_number()</code></a></h2> <p>return routing number. (digits 1-4) returns undef if not found.</p> <p> </p> <h2><a name=``bank_number__''><code>bank_number()</code></a></h2> <p>return bank number (digits 5-8) returns undef if not found.</p> <p> </p> <h2><a name=``check_digit__''><code>check_digit()</code></a></h2> <p>return check digit (one digit) returns undef if not found</p> <p> </p> <hr /> <h1><a name=``on_us_sub_field_methods''>ON US SUB FIELD METHOD/a</h1> <p> </p> <h2><a name=``check_number__''><code>check_number()</code></a></h2> <p>returns check number, Located in various places in the on us field. returns undef if not found</p> <p> </p> <h2><a name=``tpc__''><code>tpc()</code></a></h2> <p>max 6 characters; Located to right of account number returns undef if not found TODO: This needs some thought, on a personal check this would be the check number, what gives?</p> <p> </p> <h2><a name=``account_number__''><code>account_number()</code></a></h2> <p>Variable length; always followed by the On Us symbol returns undef if not found</p> <p> </p> <hr /> <h1><a name=``bugs''>BUG/a</h1> <p>Please report bugs to developer.</p> <p>Notice: this module is under development. It is being used for production, but it *is* under development.</p> <p>Please notify with hany questions or concerns. I've seen very little on MICR and open source out there. If you have any recommendations, please don't hessitate on letting me know how to make this module better.</p> <p>This module helps me a lot, and I am hoping it may be of use to others and they may contribute criticism, patches, suggestions, etc.</p> <p> </p> <hr /> <h1><a name=``todo''>TODO</a></h1> <p>Not yet implemented:</p> <p>If you want to get *your* symbols output back, here's an example:</p> <pre> <span class=``keyword''>my</span> <span class=``variable''>$micr</span> <span class=``operator''>=</span> <span class=``variable''>new</span> <span class=``variable''>Finance::MICR::LineParser</span><span class=``operator''>(</span><span class=``operator''>{</span> <span class=``string''>string</span> <span class=``operator''>=></span> <span class=``variable''>$string_from_gocr</span><span class=``operator''>,</span> <span class=``string''>on_us_symbol</span> <span class=``operator''>=></span> <span class=``string''>'CCc'</span><span class=``operator''>,</span> <span class=``string''>transit_symbol</span> <span class=``operator''>=></span> <span class=``string''>'Aa'</span><span class=``operator''>,</span> <span class=``string''>dash_symbol</span> <span class=``operator''>=></span> <span class=``string''>'DDd'</span><span class=``operator''>,</span> <span class=``string''>ammount_symbol</span> <span class=``operator''>=></span> <span class=``string''>'XxX'</span><span class=``operator''>,</span> <span class=``string''>return_my_symbols</span><span class=``operator''>=></span><span class=``number''>1</span><span class=``operator''>,</span> <span class=``operator''>}</span><span class=``operator''>);</span> </pre> <p> </p> <hr /> <h1><a name=``author''>AUTHOR</a></h1> <p>Leo Charre <<a href=``mailto:leo@leocharre.com''>leo@leocharre.com></p> <p>This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.</p> <p> </p> <hr /> <h1><a name=``bugs''>BUG/a</h1> <p>Address bug reports and comments to: Leo Charre <<a href=``mailto:leo@leocharre.com''>leo@leocharre.com></p> <p> </p> <hr /> <h1><a name=``see_also''>SEE ALSO</a></h1> <p><a href=``http://en.wikipedia.org/wiki/Magnetic_ink_character_recognition''>http://en.wikipedia.org/wiki/Magnetic_ink_character_recognition</p>
</body>
</html>
|
/home/cpanrun/depot/main/contrib-patched/perl/CPAN/src/Finance-MICR-LineParser/blib/html/site/lib/Finance/MICR/LineParser.html |