Tellow Calculations Distribution Package
A library to align all Tellow frontend calculations.
Installation
# Yarn
yarn add @hellotellow/calculations
## Contents
### `invoiceLines`
This module provides with functions to calculate invoice totals from the user input. It handles two main cases:
- when a user inputs a price (amount) excluding VAT
- when a inputs a price (amount) including VAT
For calculating the total values per invoice line (item), use:
import { getItemTotals } from '@hellotellow/calculations';
For calculating the total values per invoice, use:
import { getInvoiceTotals } from '@hellotellow/calculations';
## Releasing
Releases are automatically published to NPM whenever the `develop` branch is merged into `main`.
Please do not forget to run a versioning command like e.g. `yarn version --patch`, and then `git push --tags` so align Github with your newly published version tag.
# Dependencies
- [lodash](https://github.com/lodash/lodash)