salestax library
Standard sales tax rates on goods and services, and sales tax amounts.
Same as the pakdatakit/salestax entry point of the npm package.
Classes
- SalesTaxAmounts
- Result of calculateSalesTax and splitInclusive.
- SalesTaxRate
- One standard rate and the period it applied. Result of getSalesTaxRate.
Enums
- SalesTaxKind
- What is taxed: goods (federal sales tax) or services (provincial or ICT).
Functions
-
calculateSalesTax(
num amount, {num? rate, String? province, SalesTaxKind? kind, Object? date, bool inclusive = false}) → SalesTaxAmounts? -
Adds sales tax to
amount(0 to 1 trillion rupees), or splits it out wheninclusiveistrue. -
getSalesTaxRate(
{required SalesTaxKind kind, String? province, Object? date}) → SalesTaxRate? - Returns the standard sales tax rate for goods (federal, Sales Tax Act 1990) or for services in a province or Islamabad Capital Territory, on a given date.
-
splitInclusive(
num gross, num rate) → SalesTaxAmounts? - Splits an amount that includes sales tax into its value and tax.