NAME
Finance::AMEX::Transaction::GRRCN::TaxRecord - Parse AMEX Global Reconciliation (GRRCN) TaxRecord Rows
VERSION
version 0.005
SYNOPSIS
use Finance::AMEX::Transaction;
my $epraw = Finance::AMEX::Transaction->new(file_type => 'GRRCN');
open my $fh, '<', '/path to GRRCN file' or die "cannot open GRRCN file: $!";
while (my $record = $epraw->getline($fh)) {
if ($record->type eq 'SUMMARY') {
print $record->PAYMENT_DATE . "\n";
}
}
# to parse a single line
my $record = $epraw->parse_line('line from an GRRCN file');
if ($record->type eq 'SUMMARY') {
...
}
DESCRIPTION
You would not normally be calling this module directly, it is one of the possible return objects from a call to Finance::AMEX::Transaction's getline method.
METHODS
new
Returns a new Finance::AMEX::Transaction::GRRCN::TaxRecord object.
my $record = Finance::AMEX::Transaction::GRRCN::TaxRecord->new(line => $line);
type
This will always return the string SUMMARY.
print $record->type; # SUMMARY
line
Returns the full line that is represented by this object.
print $record->line;
field_map
Returns an arrayref of hashrefs where the name is the record name and the value is an arrayref of the start position and length of that field.
# print the start position of the PAYMENT_DATE field
print $record->field_map->[4]->{PAYMENT_DATE}->[0]; # 39
RECORD_TYPE
This field contains the Record identifier, which will always be “TAXRECORD” for the Tax Record(s).
Note: This record is only applicable to the Argentina market.
PAYEE_MERCHANT_ID
This field contains the American Express-assigned Service Establishment (SE) Number of the Merchant receiving the payment/settlement.
SETTLEMENT_ACCOUNT_TYPE_CODE
This field contains the Settlement Account Type.
Valid values include the following:
If unused, this field will be space filled (fixed format) or blank (delimited formats).
AMERICAN_EXPRESS_PAYMENT_NUMBER
This field contains the American Express-assigned Payment/Settlement Number. This reference number may be used by the American Express Payee for reconciliation purposes.
PAYMENT_DATE
This field contains the Payment Date scheduled in American Express systems. The date that funds are actually available to the payee's depository institution may differ from the date reported in this field.
The format is: YYYYMMDD
PAYMENT_CURRENCY
This field contains the Alphanumeric ISO Code for the Payment (Settlement) currency.
TAX_TYPE_CODE
This field contains a numerical value between 01 and 99 according to the description of tax.
TAX_DESCRIPTION
This field contains a description of the tax applied, which corresponds to the Tax Type Code field.
Note: there may be multiple descriptions for a single tax code.
TAX_BASE_AMOUNT
This field contains the amount on which tax is applied.
The format of the Tax Base Amount field value is: leading sign (1), whole numbers (13) and decimal places (10).
TAX_PRESENT_DATE
This field contains the date when American Express pays the tax to the tax collector.
The format is: YYYYMMDD
TAX_RATE
This field contains the Tax Rate Percentage, which corresponds to the calculation of the tax Amount.
This field is expressed as an actual percentage. The format of the Tax Rate field value is: leading sign (1), whole numbers (13) and decimal places (6). Right aligned with leading zeros.
For example: Rate Displayed in File +21% ~0000000000021000000 +21.123446% ~0000000000021123446 -5.05% -0000000000005050000
TAX_AMOUNT
This field contains the amount of the tax.
The Tax Amount is calculated as follows;
Tax Base Amount * Tax Rate = Tax Amount.
“Tax Rate” used in above calculation is a decimal value (i.e., Tax Base Amount = 1000, Tax Rate = 20%, Tax Amount = 200; 1000 * 0.2 = 200).
The format of the Tax Amount field value is: leading sign (1), whole numbers (13) and decimal places (10).
NAME
Finance::AMEX::Transaction::GRRCN::TaxRecord - Object methods for AMEX Global Reconciliation (GRRCN) Tax records.
Note: This record is only applicable for Argentina.
=for: list = YYYY = Year = MM = Month = DD = Day
AUTHOR
Tom Heady <cpan@punch.net>
COPYRIGHT AND LICENSE
This software is copyright (c) 2022 by ZipRecruiter/Tom Heady.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.