The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

IncomeTax::UK - Interface to Income Tax of UK.

VERSION

Version 0.02

DESCRIPTION

Income tax forms the bulk of revenues collected by the government. Each person has an income tax personal allowance and income upto this amount in each tax year is tax free for everyone. For 2010-11 the tax allowance for under 65s is GBP 6,475. On 22 June 2010, the Chancellor (George Osborne) increased the personal allowance by GBP 1000 in his emergency budget bringing it to GBP 7,475 for the tax year 2011-12.

    +------+----------+-------------------+
    | Age  | Tax Year | Persoal Allowance |
    +------+----------+-------------------+
    | < 65 | 2010-11  | GBP 6,475         |
    | < 65 | 2011-12  | GBP 7,475         |
    +------+----------+-------------------+

    +------------+----------+---------+------------------+---------------------------+
    | Rate       | Dividend | Savings | Other            | Band                      |
    |            |          |         | (inc employment) | (Above personal allowance)|
    +------------+----------+---------+------------------+---------------------------+
    | Lower      | N/A      | 10%     | N/A              | GBP 0 - GBP 2440          |
    | Basic      | 10%      | 20%     | 20%              | GBP 0 - GBP 37,400        |
    | Higher     | 32.5%    | 40%     | 40%              | over GBP 7,400            |
    | Additional | 42.5%    | 50%     | 50%              | over GBP 150,000          |
    +------------+----------+---------+------------------+---------------------------+

CONSTRUCTOR

The constructor expects a reference to an anonymous hash as input parameter. Table below shows the possible value of various key and value pairs.

    +----------+--------------------+
    | Key      | Value              |
    +----------+--------------------+
    | age      | Age of the person. |
    | tax_year | 2010-11 | 2011-12. |
    +----------+--------------------+

    use stric; use warnings;
    use IncomeTax::UK;
    
    my $uk = IncomeTax::UK->new({age => 35, tax_year => '2010-11'});

METHODS

get_tax_amount()

Returns the tax amount for the given gross amount & type in the given tax year.Possible values for types are as below. They are passed in as list gross amount, type.

    +------------------------+----------+
    | Type                   | Value    |
    +------------------------+----------+
    | Dividend               | dividend |
    | Savings                | savings  |
    | Other (inc employment) | other    |
    +------------------------+----------+
    

Default is other i.e. Income Tax.

get_breakdown()

Returns the calculation breakdown. You should ONLY be calling after method get_tax_amount(). Otherwise if it would simply return nothing.

    use stric; use warnings;
    use IncomeTax::UK;
    
    my $uk = IncomeTax::UK->new({age => 35, tax_year => '2010-11'});
    my $income_tax = $uk->get_tax_amount(55000);
    print $uk->get_breakdown();

as_string()

Same as get_breakdown() except that it gets called when printing object in scalar context.

    use stric; use warnings;
    use IncomeTax::UK;
    
    my $uk = IncomeTax::UK->new({age => 35, tax_year => '2010-11'});
    my $income_tax = $uk->get_tax_amount(55000);
    print $uk->as_string();
    
    # or simply
    
    print $uk;

AUTHOR

Mohammad S Anwar, <mohammad.anwar at yahoo.com>

BUGS

Please report any bugs or feature requests to bug-incometax-uk at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=IncomeTax-UK. I will be notified and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc IncomeTax::UK

You can also look for information at:

LICENSE AND COPYRIGHT

Copyright 2011 Mohammad S Anwar.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.

DISCLAIMER

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

1; # End of IncomeTax::UK