Business-Tax-ID-PPH21

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

             "TK/0"  => 54000000,
             "TK/1"  => 58500000,
             "TK/2"  => 63000000,
             "TK/3"  => 67500000,
           },
           {},
         ]

    When calculating individual income tax, the net income is subtracted by
    this amount first. This means that if a person has income below this
    amount, he/she does not need to pay income tax.

    This function is not exported by default, but exportable.

    Arguments ('*' denotes required arguments):

    *   year => *int*

        (No description)

    Returns an enveloped result (an array).

    First element ($status_code) is an integer containing HTTP-like status
    code (200 means OK, 4xx caller error, 5xx function error). Second
    element ($reason) is a string containing error message, or something
    like "OK" if status is 200. Third element ($payload) is the actual
    result, but usually not present when enveloped result is an error
    response ($status_code is not 2xx). Fourth element (%result_meta) is
    called result metadata and is optional, a hash that contains extra
    information, much like how HTTP response headers provide additional
    metadata.

    Return value: (any)

  get_pph21_op_rates
    Usage:

     get_pph21_op_rates(%args) -> [$status_code, $reason, $payload, \%result_meta]

    Get tax rates for PPh21 for individuals ("OP", "orang pribadi").

    Examples:

    *   Example #1:

         get_pph21_op_rates(year => 2022);

        Result:

         [
           200,
           "OK",
           [
             { max => 60000000, rate => 0.05 },
             { xmin => 60000000, max => 250000000, rate => 0.15 },
             { xmin => 250000000, max => 500000000, rate => 0.25 },
             { xmin => 500000000, max => 5000000000, rate => 0.3 },
             { xmin => 5000000000, rate => 0.35 },
           ],
           {
             "table.field_formats" => [undef, undef, ["percent", { sprintf => "%3.0f%%" }]],
             "table.fields"        => ["xmin", "max", "rate"],
           },
         ]

    PPh21 differentiates rates between individuals ("OP", "orang pribadi")
    and statutory bodies ("badan"). Both are progressive. This routine
    returns the tax rates for individuals.

    Keywords: tax rates, tax brackets.

    This function is not exported by default, but exportable.

    Arguments ('*' denotes required arguments):

    *   year => *int*

        (No description)

    Returns an enveloped result (an array).

    First element ($status_code) is an integer containing HTTP-like status
    code (200 means OK, 4xx caller error, 5xx function error). Second
    element ($reason) is a string containing error message, or something
    like "OK" if status is 200. Third element ($payload) is the actual
    result, but usually not present when enveloped result is an error
    response ($status_code is not 2xx). Fourth element (%result_meta) is
    called result metadata and is optional, a hash that contains extra
    information, much like how HTTP response headers provide additional
    metadata.

    Return value: (any)

HOMEPAGE
    Please visit the project's homepage at
    <https://metacpan.org/release/Business-Tax-ID-PPH21>.

SOURCE
    Source repository is at
    <https://github.com/perlancar/perl-Business-Tax-ID-PPH21>.

SEE ALSO
AUTHOR
    perlancar <perlancar@cpan.org>

CONTRIBUTING
    To contribute, you can send patches by email/via RT, or send pull
    requests on GitHub.

    Most of the time, you don't need to build the distribution yourself. You
    can simply modify the code, then test via:

     % prove -l

    If you want to build the distribution (e.g. to try to install it locally
    on your system), you can install Dist::Zilla,
    Dist::Zilla::PluginBundle::Author::PERLANCAR,
    Pod::Weaver::PluginBundle::Author::PERLANCAR, and sometimes one or two
    other Dist::Zilla- and/or Pod::Weaver plugins. Any additional steps
    required beyond that are considered a bug and can be reported to me.



( run in 2.623 seconds using v1.01-cache-2.11-cpan-364913b4093 )