Skip to content
/ sars Public

South African Revenue Services (SARS) component for PHP

License

Notifications You must be signed in to change notification settings

bit64co/sars

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SARS Component

Copyright (c) 2021-current Bit 64 Solutions Pty Ltd (bit64.co)

This component provides a tax calculator microservice specific to the South African Revenue Services (SARS) for PHP projects.


Usage

Installation via Composer

$ composer require bit64/sars

Instantiate the API class

use Bit64\SARS\Api;

$api = new Api();

Income Tax Calculator

Get the income tax calculator

$incomeTax = $api->IncomeTax();

Default age is 30 years old

$grossMonthly = 25000;

$paye = $incomeTax->calculateMonthlyTax($grossMonthly);

echo sprintf('R%0.2f', $paye);
// Output R3749.17

Specify age and context date

$grossWeekly = 12000;
$age = 68;
$contextDate = '2021-05-30';

$paye = $incomeTax->calculateWeeklyTax($grossWeekly, $age, $contextDate);

echo sprintf('R%0.2f', $paye);
// Output R2751.23

About

South African Revenue Services (SARS) component for PHP

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages