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.

Salert #

Test Pub License

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

Features #

  • Sales items calculations (discount, subtotal, taxes, total).
  • Sales calculations (discount, subtotal, taxes, total).

Usage #

Example for SRI invoice (Ecuador):

// VAT tax with 13%.
final vat = Tax(code: 'IVA13', unitValue: 13);
// Invoice item (product or service).
final item = Item(code: 'productX', quantity: 1, unitPrice: 10, taxes: [vat]);
// The sale (aka Invoice)
final sale = Sale(items: [item], tip: 1);
// Calculate sale values.
print('SUBTOTAL  ${sale.subtotal}');
print('TAX  ${sale.tax}');
print('TOTAL  ${sale.total}');
3
likes
160
points
43
downloads

Publisher

verified publishersp1ke.dev

Weekly Downloads

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

Repository (GitHub)

Documentation

API reference

License

BSD-3-Clause (license)

More

Packages that depend on salert