1.0.12 • Published 11 months ago

@fastekph/tax-sdk v1.0.12

Weekly downloads
-
License
MIT License
Repository
-
Last release
11 months ago

tax-sdk

npm version node npm downloads npm downloads npm downloads npm downloads dependents types license

An SDK for tax computations.


DISCLAIMER: This Tax SDK is designed for tax computation in the Philippines. While efforts are made to keep it updated, users are encouraged to still consult a qualified tax professional and refer to the latest official guidelines for accurate information. The creators of this SDK are not liable for errors or losses resulting from its use. Use at your own risk.

Installation

$ npm i @fastekph/tax-sdk

Sample Usage

import sdk from '@fastekph/tax-sdk'

const taxation = sdk.ph.fastek.Taxation

/**
 * @VAT_RATE [number] default value-added tax rate percentage
 **/
taxation.VAT_RATE

/**
 * @WITHHOLDING_TAX_RATE [number] default withholding tax rate percentage
 **/
taxation.WITHHOLDING_TAX_RATE

/**
 * computeVatAmount(amount, vatInclusive)
 * @amount [number] amount of the transaction to compute vat
 * @vatInclusive [boolean] tagging if the amount is vat inclusive or not 
 **/
taxation.computeVatAmount(1458.00, true)
taxation.computeVatAmount(1292.79, false)

/**
 * computeVatAmountWithCustomRate(rate, amount, vatInclusive)
 * @rate [number] custom tax rate percentage to use
 * @amount [number] amount of the transaction to compute vat
 * @vatInclusive [boolean] tagging if the amount is vat inclusive or not 
 **/
taxation.computeVatAmountWithCustomRate(12.00, 1458.00, true)
taxation.computeVatAmountWithCustomRate(12.00, 1292.79, false)

/**
 * addVatAmount(amount)
 * @amount [number] amount of the transaction to add vat to
 **/
taxation.addVatAmount(1292.79)

/**
 * addVatAmountWithCustomRate(rate, amount)
 * @rate [number] custom tax rate percentage to use
 * @amount [number] amount of the transaction to add vat to
 **/
taxation.addVatAmountWithCustomRate(12.00, 1292.79)

/**
 * lessVatAmount(amount)
 * @amount [number] amount of the transaction to deduct vat to
 **/
taxation.lessVatAmount(1458.00)

/**
 * lessVatAmountWithCustomRate(rate, amount)
 * @rate [number] custom tax rate percentage to use
 * @amount [number] amount of the transaction to deduct vat to
 **/
taxation.lessVatAmountWithCustomRate(12.00, 1458.00)

/**
 * computeWithholdingTaxAmount(amount)
 * @amount [number] amount of the transaction to compute withholding tax
 **/
taxation.computeWithholdingTaxAmount(1.00)

/**
 * computeWithholdingTaxAmountWithCustomRate(amount)
 * @rate [number] custom tax rate percentage to use
 * @amount [number] amount of the transaction to compute withholding tax
 **/
taxation.computeWithholdingTaxAmountWithCustomRate(2.00, 1.00)
1.0.12

11 months ago

1.0.11

11 months ago

1.0.10

11 months ago

1.0.9

11 months ago

1.0.8

11 months ago

1.0.7

11 months ago

1.0.6

11 months ago

1.0.5

11 months ago

1.0.4

11 months ago

1.0.3

11 months ago

1.0.2

11 months ago

1.0.1

11 months ago

1.0.0

11 months ago