Download the PHP package feimx/tax without Composer

On this page you can find all versions of the php package feimx/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 tax

Calculate taxes for a given amount

Latest Version on Packagist Build Status Quality Score Total Downloads

The feimx/tax package provide a simple way for calculate taxes of an amount.

Basic Usage

Installation

You can install the package via composer:

Note: If your Laravel versions is >=5.5 you don't need register providers.

Note: This is not necesary if you are not using Laravel

You can optionally publish the config file with:

This is the contents of the published config file:

Note: This is not necesary if you are not using Laravel

You can optionally publish the migrations file with:

Note: This is not necesary if you are not using Laravel

Usage

Firt need create a new instance of TaxManager:

Second you need to add the taxes for calculate the final amount: The first parameter could be a tax name ['iva', 'ieps', 'isr'] or an instance of FeiMx\Tax\Contracts\TaxContract. Exist 3 Tax Objects:

Note: You can pass a string for a tax type of given config file instead the retention boolean param.

You can add multiple taxes at once:

Now you can get the final amount:

You can get a list for given data:

This is the contents of get method:

Models

You can assign Taxable trait to your models.

You can assign tax groups to your model:

You can pass a name and multiples tax groups:

You can sync too:

And you can remove:

You can verify if a model has a TaxGroup:

For get the total amount after taxes, must need to know what column use, for defaul we use price column, but you can use another one:

Now you can get the total of a given TaxGroup:

And you can obtain the content of the get method of the TaxManager:

Testing

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

Support us

FEI is a Digital Invoicing startup based in Yucatán, México. You'll find an overview of all our open source projects on our website.

Does your business depend on our contributions? Reach out and support us on Patreon. All pledges will be dedicated to allocating workforce on maintenance and new awesome stuff.

License

The MIT License (MIT). Please see License File for more information.


All versions of tax with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1
illuminate/support Version ~5.6
nesbot/carbon Version ^1.20
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 feimx/tax contains the following files

Loading the files please wait ....