erp_calculator 1.1.0
erp_calculator: ^1.1.0 copied to clipboard
A pure-Dart, stateless billing calculation engine that handles tax modes (exclusive / inclusive / none), item-level discounts, and bill-level discounts with a full step-by-step audit trail.
Changelog #
1.1.0 #
- Fixed
BillResult.totalSavedunder-reporting savings when a discount is applied on net. It is noworiginalGross - totalGross, so it includes the tax removed by net discounts. - Added
BillResult.overallDiscountPercentage(totalSaved / originalGross).billDiscountDisplayPercentageis unchanged and still covers bill-level discounts only. - Added
BillResult.billDiscountPercentageOfSubtotalGross: the bill discount as a share of the bill after item discounts (billDiscountAmount / subtotalGross). A fixed 150 off a 300 bill gives 50%. - Added
BillResult.originalGross,BillResult.itemDiscountImpactOnGross,LineItemResult.originalGrossandLineItemResult.discountImpactOnGross. - Net, tax and gross totals are unchanged.
BillResultandLineItemResultconstructors gain the new required fields. This only matters if you construct these results yourself (for example in test fakes).- Demo: inputs no longer lose focus after each keystroke; the summary shows the real total saved, the overall discount %, and the bill discount % separately; bill-step labels are translated in Arabic.
1.0.0 #
- Initial public release.
- Added support for inclusive, exclusive, and no-tax calculations.
- Added item-level and bill-level discounts.
- Added step-by-step calculation audit output.