mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-14 03:40:31 +00:00
20 lines
462 B
TypeScript
20 lines
462 B
TypeScript
/**
|
|
* Get inclusive tax amount.
|
|
* @param {number} amount
|
|
* @param {number} taxRate
|
|
* @returns {number}
|
|
*/
|
|
export const getInclusiveTaxAmount = (amount: number, taxRate: number) => {
|
|
return (amount * taxRate) / (100 + taxRate);
|
|
};
|
|
|
|
/**
|
|
* Get exclusive tax amount.
|
|
* @param {number} amount
|
|
* @param {number} taxRate
|
|
* @returns {number}
|
|
*/
|
|
export const getExlusiveTaxAmount = (amount: number, taxRate: number) => {
|
|
return (amount * taxRate) / 100;
|
|
};
|