feat: profit loss widget
This commit is contained in:
@@ -72,10 +72,14 @@ class ProfitLossData {
|
||||
dateTo: map['date_to'],
|
||||
groupBy: map['group_by'],
|
||||
summary: ProfitLossSummary.fromMap(map['summary']),
|
||||
data: List<ProfitLossItem>.from(
|
||||
map['data'].map((x) => ProfitLossItem.fromMap(x))),
|
||||
productData: List<ProfitLossProduct>.from(
|
||||
map['product_data'].map((x) => ProfitLossProduct.fromMap(x))),
|
||||
data: map['data'] == null
|
||||
? []
|
||||
: List<ProfitLossItem>.from(
|
||||
map['data'].map((x) => ProfitLossItem.fromMap(x))),
|
||||
productData: map['product_data'] == null
|
||||
? []
|
||||
: List<ProfitLossProduct>.from(
|
||||
map['product_data'].map((x) => ProfitLossProduct.fromMap(x))),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user