fixes before build
This commit is contained in:
@@ -22,6 +22,14 @@ class LineItem {
|
||||
/// Negative amount when a discount was folded into [price].
|
||||
final double discount;
|
||||
|
||||
bool get hasDiscount => discount != 0;
|
||||
|
||||
/// List price before a folded discount. Equals [price] when there is none.
|
||||
double get originalPrice {
|
||||
if (!hasDiscount) return price;
|
||||
return ((price - discount) * 100).round() / 100;
|
||||
}
|
||||
|
||||
LineItem copyWith({
|
||||
String? id,
|
||||
String? name,
|
||||
|
||||
Reference in New Issue
Block a user