Download the PHP package anurat/laravel-thai-tax without Composer

On this page you can find all versions of the php package anurat/laravel-thai-tax. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-thai-tax

laravel-thai-tax

This Laravel package allows you to calculate personal income tax according to Thai regulations.

Installation

Tested on Laravel 8 but should be working on any version of Laravel.

After installed, it can be used through ThaiTax facade.

Usage

The simplest use of the library is to provide netIncome() (THB)
then call incomeTax()

Net income is total incomes minus total expenses minus total deductions.
It is then used to calculate income tax according to personal income tax rate
e.g. https://www.rd.go.th/59670.html

Thai year

You can also provide Thai year to calculate different income tax on different year as follow.

If Thai year is not provided, the current year is used.

The earliest year it can calculate is 2542

Incomes and Deductions

Net income can be calculated by using incomes and deductions,
so incomes and deductions can be provided instead of net income.

netIncome() and (all types or incomes and deductions) should not be used together, as they will override each other.

Income

income(float $income) can be used for general type of incomes

Also you can use more specific type of incomes
e.g. salary(float $salaryPerMonth) or bonus(float $bonus).

salary() takes monthly salary as an argument so 50,000 will be 600,000 per year.

income(array $incomes) can also accept an array as an argument.

Deduction

For general type of deductions deduction() can be used.

Other deduction types are as follow.
It has the benefit of checking for specific rules for that type
e.g. home loan interest may not exceed 100,000 Baht,
it will automatically reduce to 100,000 Baht if more is provided.

spouse(bool $hasSpouse) // คู่สมรส

children(int $noOfChildren) // บุตร

parents(int $noOfParents) // บิดามารดา

disabiltites(int $noOfDisabilities) // ผู้พิการ/ทุพพลภาพ

childBirth(float $cost) // ฝากครรภ์และทำคลอด

insurancePremium(float $premium) // ประกันชีวิต

annuityInsurancePremium(float $premium) // ประกันชีวิตแบบบำนาญ

homeLoanInterest(float $interest) // ดอกเบี้ยซื้อที่อยู่อาศัย

providentFund(float $fund) // กองทุนสำรองเลี้ยงชีพ

socialSecurity(float $security) // ประกันสังคม

donation(float $donation) // บริจาค

educationDonation(float $donation) // บริจาคเพื่อการศึกษา/กีฬา

politicalParty(float $donation) // บริจาคพรรคการเมือง

shopDeeMeeKeun(float $shop) // ช๊อปดีมีคืน

deduction() can also accept an array as an argument.


All versions of laravel-thai-tax with dependencies

PHP Build Version
Package Version
Requires php Version >=7
laravel/framework Version >=7
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package anurat/laravel-thai-tax contains the following files

Loading the files please wait ....