[**@bondsports/general**](../README.md) • **Docs**

***

[@bondsports/general](../globals.md) / calculateQuantityFromTotal

# Function: calculateQuantityFromTotal()

> **calculateQuantityFromTotal**\<`T`\>(`totalAmount`, `unitPrice`, `taxes`?): `number`

Calculates the quantity based on the total amount, unit price, and tax percentage.

## Type Parameters

• **T** *extends* [`ITaxBase`](../interfaces/ITaxBase.md)

## Parameters

• **totalAmount**: `number`

The total amount.

• **unitPrice**: `number`

The unit price of the item.

• **taxes?**: `T`[]

The taxes to apply.

## Returns

`number`

The calculated quantity.

## Defined in

[utils/price.util.ts:384](https://github.com/Bond-Sports/bondUtils/blob/545f16ceb055481acfd7641d7809c0f252d3a5e6/packages/general/src/utils/price.util.ts#L384)
