Business-NAB

 view release on metacpan or  search on metacpan

CHANGES  view on Meta::CPAN


    based on Appendix D of the "NAB BPAY User Guide (April 2023)" this
    follows the convention of the other file parsing/generating modules
    created in the Business::NAB namespace

    perldoc, test coverage, example files, etc

    note the weird way of handling amounts in the trailer record, they
    use the last character to represent: * the last digit * the sign

    it's a little odd, but i guess they've historically had to squeeze
    amounts into the 15 available spaces (which are minor units, so 13,
    which still feels like a lot, but whatever). this is the *only* NAB
    file type that does this, so it might actually be a BPAY thing

    see also: NAB::Type::BRFInt in Business::NAB::Types which will coerce
    NAB's value to an actual signed integer so we don't need to worry too
    much about this in the class or the thing setting it / calling it 

  Change: 2d5871956cd0ef88ba04aa4066bccfa5d9b03874
  Author: Lee Johnson <lee@payprop.com>

lib/Business/NAB/BPAY/Remittance/File/TrailerRecord.pm  view on Meta::CPAN

}

sub _brf_int {
    my ( $self, $str ) = @_;

    # trailer record amounts in BPAY Remittance Files use the last
    # character to represent:
    #   - the last digit
    #   - the sign
    #
    # it's a little odd, but i guess they've historically had to squeeze
    # amounts into the 15 available spaces (which are minor units, so 13,
    # which still feels like a lot, but whatever). this is the *only*
    # NAB file type that does this, so it might actually be a BPAY thing
    #
    # see also: NAB::Type::BRFInt in Business::NAB::Types which will coerce
    # NAB's value to an actual signed integer
    my $last_char = chop( $str );

    if ( $str && $str < 0 ) {
        $str *= -1;



( run in 0.995 second using v1.01-cache-2.11-cpan-75ffa21a3d4 )