fix: report profit loss
This commit is contained in:
@@ -106,7 +106,7 @@ class ProfitLossSummary {
|
||||
final int netProfit;
|
||||
final double netProfitMargin;
|
||||
final int totalOrders;
|
||||
final int averageProfit;
|
||||
final double averageProfit;
|
||||
final double profitabilityRatio;
|
||||
|
||||
ProfitLossSummary({
|
||||
@@ -134,7 +134,7 @@ class ProfitLossSummary {
|
||||
netProfit: map['net_profit'],
|
||||
netProfitMargin: (map['net_profit_margin'] as num).toDouble(),
|
||||
totalOrders: map['total_orders'],
|
||||
averageProfit: map['average_profit'],
|
||||
averageProfit: (map['average_profit'] as num).toDouble(),
|
||||
profitabilityRatio: (map['profitability_ratio'] as num).toDouble(),
|
||||
);
|
||||
}
|
||||
@@ -252,8 +252,8 @@ class ProfitLossProduct {
|
||||
cost: map['cost'],
|
||||
grossProfit: map['gross_profit'],
|
||||
grossProfitMargin: (map['gross_profit_margin'] as num).toDouble(),
|
||||
averagePrice: map['average_price'],
|
||||
averageCost: map['average_cost'],
|
||||
averagePrice: (map['average_price'] as num).toInt(),
|
||||
averageCost: (map['average_cost'] as num).toInt(),
|
||||
profitPerUnit: map['profit_per_unit'],
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user