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

@@ -15,10 +15,10 @@ class CashflowModel {
factory CashflowModel.fromJson(Map<String, dynamic> json) {
return CashflowModel(
cashIn: json["cash_in"],
cashOut: json["cash_out"],
runningCash: json["running_cash"],
initialRunningCash: json["initial_running_cash"],
cashIn: num.tryParse(json["cash_in"].toString()),
cashOut: num.tryParse(json["cash_out"].toString()),
runningCash: num.tryParse(json["running_cash"].toString()),
initialRunningCash: num.tryParse(json["initial_running_cash"].toString()),
data: json["data"] == null ? [] : List<CashflowData>.from(json["data"]!.map((x) => CashflowData.fromJson(x))),
);
}
@@ -55,7 +55,7 @@ class CashflowData {
platform: json["platform"],
transactionType: json["transaction_type"],
type: json["type"],
amount: json["amount"],
amount: num.tryParse(json["amount"].toString()),
date: json["date"] == null ? null : DateTime.parse(json["date"]),
invoiceNo: json["invoice_no"],
paymentType: json["payment_type"]?["name"],