perbaikan data report
This commit is contained in:
@@ -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"],
|
||||
|
||||
Reference in New Issue
Block a user