NAME

Business::RO::TaxDeduction - Romanian salary tax deduction calculator

VERSION

version 0.012

SYNOPSIS

use Business::RO::TaxDeduction;

my $brtd = Business::RO::TaxDeduction->new(
    vbl     => 1400,
    persons => 3,
);
my $amount = $brtd->tax_deduction;

DESCRIPTION

Romanian salary tax deduction calculator.

INTERFACE

ATTRIBUTES

vbl

The vbl attribute holds the input amount of the tax deduction calculation. (ro: Venit Brut Lunar).

year

The year attribute holds the year of the tax deduction calculation.

persons

The persons attribute holds the number of persons. Not required, the default is 0.

deduction

The deduction attribute holds a Business::RO::TaxDeduction::Amount object instance.

ten

A Math::BigFloat object instance for 10.

five

A Math::BigFloat object instance for 5.

INSTANCE METHODS

tax_deduction

Return the deduction calculated for the given amount.

Starting with the current version (0.004) the appropriate algorithm for the tax deduction calculation year is chosen.

_tax_deduction_formula

Formula for calculating the tax deduction for amounts above vbl_min and less or equal to vbl_max.

_round_to_int

Custom rounding method to the nearest integer. It uses the Romanian standard for rounding in bookkeeping.

Example:

10.01 -:- 10.49 => 10
10.50 -:- 10.99 => 11

_round_to_tens

Round up to tens. Uses Math::BigFloat to prevent rounding errors like when amount minus floor(amount) gives something like 7.105427357601e-15.

AUTHOR

Ștefan Suciu <stefan@s2i2.ro>

COPYRIGHT AND LICENSE

This software is copyright (c) 2018 by Ștefan Suciu.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.