@iol-inc/fe-vat-utils
v1.0.0
Published
IOL VAT Computation utility functions
Downloads
1
Readme
Functions
computeBase(price) ⇒ number
Computes the base price from the total price. Removes VAT AMOUNT
Kind: global function
Returns: number - The base price.
| Param | Type | Description | | --- | --- | --- | | price | number | The total price. VAT INCLUSIVE |
computeMarkupPercent() ⇒ number
Computes the markup percentage based on markup in peso and cost.
Kind: global function
Returns: number - The markup percentage.
| Param | Type | Description | | --- | --- | --- | | params.markupPeso | number | The markup in peso. | | params.cost | number | The cost of the item. VAT Exclusive |
computeMarkupPeso() ⇒ number
Computes the markup in peso based on sales and cost.
Kind: global function
Returns: number - The markup in peso.
| Param | Type | Description | | --- | --- | --- | | params.sales | number | The total sales. VAT EXCLUSIVE | | params.cost | number | The cost of the item. VAT EXCLUSIVE |
computeOutputVAT(sales) ⇒ number
Computes the output VAT based on sales.
Kind: global function
Returns: number - The output VAT.
| Param | Type | Description | | --- | --- | --- | | sales | number | The total sales. VAT EXCLUSIVE |
computeOutputVATFromSellingPrice() ⇒ number
Computes the output VAT from the selling price.
Kind: global function
Returns: number - The output VAT.
| Param | Type | Description | | --- | --- | --- | | params.sellingPrice | number | The total selling price. VAT INCLUSIVE | | params.sales | number | The total sales. VAT EXCLUSIVE |
computeSales() ⇒ number
Computes the sales amount based on cost and markup percentage.
Kind: global function
Returns: number - The computed sales amount.
| Param | Type | Description | | --- | --- | --- | | params.cost | number | The cost of the item. VAT EXCLUSIVE | | params.markupPercent | number | The markup percentage. |
computeSellingPrice(sales) ⇒ number
Computes the selling price from sales and output VAT.
Kind: global function
Returns: number - The total selling price. VAT INCLUSIVE
| Param | Type | Description | | --- | --- | --- | | sales | number | The total sales. VAT EXCLUSIVE |
computeVATFromPrice(price) ⇒ number
Computes the VAT directly from the total price.
Kind: global function
Returns: number - The VAT amount.
| Param | Type | Description | | --- | --- | --- | | price | number | The total price. VAT INCLUSIVE |
computeVATFromBase(base) ⇒ number
Computes the VAT from the base price.
Kind: global function
Returns: number - The VAT amount.
| Param | Type | Description | | --- | --- | --- | | base | number | The base price. VAT INCLUSIVE |