perbaikan data report

This commit is contained in:
2026-04-23 21:21:33 +07:00
parent ecb2a369af
commit a898e4432f
13 changed files with 140 additions and 134 deletions

View File

@@ -29,13 +29,13 @@ class LossProfitModel {
expenseSummary: json["mergedExpenseData"] == null
? []
: List<ExpenseSummaryModel>.from(json["mergedExpenseData"]!.map((x) => ExpenseSummaryModel.fromJson(x))),
grossSalProfit: json["grossSaleProfit"],
grossIncomeProfit: json['grossIncomeProfit'],
totalExpenses: json['totalExpenses'],
netProfit: json['netProfit'],
cartGrossProfit: json['cardGrossProfit'],
totalCardExpense: json['totalCardExpenses'],
cardNetProfit: json['cardNetProfit'],
grossSalProfit: num.tryParse(json["grossSaleProfit"].toString()),
grossIncomeProfit: num.tryParse(json['grossIncomeProfit'].toString()),
totalExpenses: num.tryParse(json['totalExpenses'].toString()),
netProfit: num.tryParse(json['netProfit'].toString()),
cartGrossProfit: num.tryParse(json['cardGrossProfit'].toString()),
totalCardExpense: num.tryParse(json['totalCardExpenses'].toString()),
cardNetProfit: num.tryParse(json['cardNetProfit'].toString()),
);
}
}
@@ -51,7 +51,7 @@ class IncomeSummaryModel {
return IncomeSummaryModel(
type: json["type"],
date: json["date"],
totalIncome: json["total_incomes"],
totalIncome: num.tryParse(json["total_incomes"].toString()),
);
}
}
@@ -67,7 +67,7 @@ class ExpenseSummaryModel {
return ExpenseSummaryModel(
type: json["type"],
date: json["date"],
totalExpense: json["total_expenses"],
totalExpense: num.tryParse(json["total_expenses"].toString()),
);
}
}