Lingua::ZH::Currency::UpperCase 0.01 review

Download
by rbytes.net on

Lingua::ZH::Currency::UpperCase is a Perl module to convert Currency Numbers to Chinese UpperCase Format. SYNOPSIS use Lingua

License: Perl Artistic License
File size: 3K
Developer: Chun Sheng
0 stars award from rbytes.net

Lingua::ZH::Currency::UpperCase is a Perl module to convert Currency Numbers to Chinese UpperCase Format.

SYNOPSIS

use Lingua::ZH::Currency::UpperCase;
print chinese_currency_uc( 2504.39 );

The main subroutine get a number and give a chinese string which has been converted as currency upper case for finance processing. As Check or Invoce that need.

0 : 0
0.03 : ?????
1.04 : ?????????
-12.00 : ????????
102.15 : ???????????????
2004 : ???????????
50142 : ?????????????????
400102 : ?????????????????
50000045.01 : ????????????????????
123456789.00 : ????????????????????????????????
9876543219876.123 : 9876543219876.123
chinese_currency_uc( $number )
my $words = chinese_currency_uc( 123.45 );
my $words = chinese_currency_uc( 123.45 );

The number is only 12 interger length and the float will restrict to 2 length, ortherwise it just return the orignal number which passed in. If the number is negotive, we just ignore the '-'.
chinese_currency_uc is auto exported.

_convert_integer_every_four_digits( $number, $start_point )

here the $number is a number which maxlength is 4. The $start_point is an array index refer to @integer_unit. Returns a string which temporily converted, and contains some alpha number 0 to suit later handling.

It is the private subroutine, so just leave it be.

Requirements:
Perl

Lingua::ZH::Currency::UpperCase 0.01 search tags