npm package: @iol-inc/fe-vat-utils
Description: IOL VAT Computation utility functions
Author: amiellion
Latest version: 1.0.0

## Functions

<dl>
<dt><a href="#computeBase">computeBase(price)</a> ⇒ <code>number</code></dt>
<dd><p>Computes the base price from the total price. Removes VAT AMOUNT</p>
</dd>
<dt><a href="#computeMarkupPercent">computeMarkupPercent()</a> ⇒ <code>number</code></dt>
<dd><p>Computes the markup percentage based on markup in peso and cost.</p>
</dd>
<dt><a href="#computeMarkupPeso">computeMarkupPeso()</a> ⇒ <code>number</code></dt>
<dd><p>Computes the markup in peso based on sales and cost.</p>
</dd>
<dt><a href="#computeOutputVAT">computeOutputVAT(sales)</a> ⇒ <code>number</code></dt>
<dd><p>Computes the output VAT based on sales.</p>
</dd>
<dt><a href="#computeOutputVATFromSellingPrice">computeOutputVATFromSellingPrice()</a> ⇒ <code>number</code></dt>
<dd><p>Computes the output VAT from the selling price.</p>
</dd>
<dt><a href="#computeSales">computeSales()</a> ⇒ <code>number</code></dt>
<dd><p>Computes the sales amount based on cost and markup percentage.</p>
</dd>
<dt><a href="#computeSellingPrice">computeSellingPrice(sales)</a> ⇒ <code>number</code></dt>
<dd><p>Computes the selling price from sales and output VAT.</p>
</dd>
<dt><a href="#computeVATFromPrice">computeVATFromPrice(price)</a> ⇒ <code>number</code></dt>
<dd><p>Computes the VAT directly from the total price.</p>
</dd>
<dt><a href="#computeVATFromBase">computeVATFromBase(base)</a> ⇒ <code>number</code></dt>
<dd><p>Computes the VAT from the base price.</p>
</dd>
</dl>

<a name="computeBase"></a>

## computeBase(price) ⇒ <code>number</code>
Computes the base price from the total price. Removes VAT AMOUNT

**Kind**: global function  
**Returns**: <code>number</code> - The base price.  

| Param | Type | Description |
| --- | --- | --- |
| price | <code>number</code> | The total price. VAT INCLUSIVE |

<a name="computeMarkupPercent"></a>

## computeMarkupPercent() ⇒ <code>number</code>
Computes the markup percentage based on markup in peso and cost.

**Kind**: global function  
**Returns**: <code>number</code> - The markup percentage.  

| Param | Type | Description |
| --- | --- | --- |
| params.markupPeso | <code>number</code> | The markup in peso. |
| params.cost | <code>number</code> | The cost of the item. VAT Exclusive |

<a name="computeMarkupPeso"></a>

## computeMarkupPeso() ⇒ <code>number</code>
Computes the markup in peso based on sales and cost.

**Kind**: global function  
**Returns**: <code>number</code> - The markup in peso.  

| Param | Type | Description |
| --- | --- | --- |
| params.sales | <code>number</code> | The total sales. VAT EXCLUSIVE |
| params.cost | <code>number</code> | The cost of the item. VAT EXCLUSIVE |

<a name="computeOutputVAT"></a>

## computeOutputVAT(sales) ⇒ <code>number</code>
Computes the output VAT based on sales.

**Kind**: global function  
**Returns**: <code>number</code> - The output VAT.  

| Param | Type | Description |
| --- | --- | --- |
| sales | <code>number</code> | The total sales. VAT EXCLUSIVE |

<a name="computeOutputVATFromSellingPrice"></a>

## computeOutputVATFromSellingPrice() ⇒ <code>number</code>
Computes the output VAT from the selling price.

**Kind**: global function  
**Returns**: <code>number</code> - The output VAT.  

| Param | Type | Description |
| --- | --- | --- |
| params.sellingPrice | <code>number</code> | The total selling price. VAT INCLUSIVE |
| params.sales | <code>number</code> | The total sales. VAT EXCLUSIVE |

<a name="computeSales"></a>

## computeSales() ⇒ <code>number</code>
Computes the sales amount based on cost and markup percentage.

**Kind**: global function  
**Returns**: <code>number</code> - The computed sales amount.  

| Param | Type | Description |
| --- | --- | --- |
| params.cost | <code>number</code> | The cost of the item. VAT EXCLUSIVE |
| params.markupPercent | <code>number</code> | The markup percentage. |

<a name="computeSellingPrice"></a>

## computeSellingPrice(sales) ⇒ <code>number</code>
Computes the selling price from sales and output VAT.

**Kind**: global function  
**Returns**: <code>number</code> - The total selling price. VAT INCLUSIVE  

| Param | Type | Description |
| --- | --- | --- |
| sales | <code>number</code> | The total sales. VAT EXCLUSIVE |

<a name="computeVATFromPrice"></a>

## computeVATFromPrice(price) ⇒ <code>number</code>
Computes the VAT directly from the total price.

**Kind**: global function  
**Returns**: <code>number</code> - The VAT amount.  

| Param | Type | Description |
| --- | --- | --- |
| price | <code>number</code> | The total price. VAT INCLUSIVE |

<a name="computeVATFromBase"></a>

## computeVATFromBase(base) ⇒ <code>number</code>
Computes the VAT from the base price.

**Kind**: global function  
**Returns**: <code>number</code> - The VAT amount.  

| Param | Type | Description |
| --- | --- | --- |
| base | <code>number</code> | The base price. VAT INCLUSIVE |