salert 0.0.8 copy "salert: ^0.0.8" to clipboard
salert: ^0.0.8 copied to clipboard

Library for efficient sales amounts calculations, including discounts, subtotal before taxes, taxes and total amounts.

Changelog #

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

[Unreleased] #

0.0.8 #

Fixed #

  • Using fold instead of reduce function to avoid error on empty sales.

0.0.7 #

Added #

  • Calculation of sale discount value for subtotal amount (discountAmountOfSaleAffectingSubtotal).

0.0.6 #

Added #

  • Sellable get tax amount by a group of codes (taxOfCodes).

0.0.5 #

Added #

  • Taxes equality by code.

0.0.4 #

Fixes #

  • Discounts calculations cannot be negative.

0.0.3 #

Added #

  • Obtain list of products with sale discount included (itemsWithSaleDiscount).

0.0.2 #

Changed #

  • Discount property affectTax renamed to affectSubtotalBeforeTaxes to clarify purpose.
  • Tax property affectTax renamed to affectNextTaxSubtotal to clarify purpose.

0.0.1 #

Added #

  • Discount data model with calculation methods.
  • Tax data model with calculation methods.
  • Item data model with calculation methods.
  • Sale data model with calculation methods.
  • Example for SRI invoice (Ecuador).
3
likes
160
points
64
downloads

Publisher

verified publishersp1ke.dev

Weekly Downloads

Library for efficient sales amounts calculations, including discounts, subtotal before taxes, taxes and total amounts.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

More

Packages that depend on salert