perbaikan data report
This commit is contained in:
@@ -21,9 +21,9 @@ class TransactionModel {
|
||||
factory TransactionModel.fromJson(Map<String, dynamic> json) {
|
||||
return TransactionModel(
|
||||
message: json['message'],
|
||||
totalAmount: json['total_amount'],
|
||||
moneyIn: json['money_in'],
|
||||
moneyOut: json['money_out'],
|
||||
totalAmount: num.tryParse(json['total_amount']?.toString() ?? ''),
|
||||
moneyIn: num.tryParse(json['money_in']?.toString() ?? ''),
|
||||
moneyOut: num.tryParse(json['money_out']?.toString() ?? ''),
|
||||
data: json['data'] != null
|
||||
? List<TransactionModelData>.from(
|
||||
json['data'].map((v) => TransactionModelData.fromJson(v)),
|
||||
@@ -105,20 +105,20 @@ class TransactionModelData {
|
||||
final _partyKey = json['sale']?['party'] ?? json['purchase']?['party'] ?? json['due_collect']?['party'];
|
||||
|
||||
return TransactionModelData(
|
||||
id: json['id'],
|
||||
id: num.tryParse(json['id']?.toString() ?? ''),
|
||||
platform: json['platform'],
|
||||
transactionType: json['transaction_type'],
|
||||
type: json['type'],
|
||||
amount: json['amount'],
|
||||
totalAmount: json['total_amount'],
|
||||
amount: num.tryParse(json['amount']?.toString() ?? ''),
|
||||
totalAmount: num.tryParse(json['total_amount']?.toString() ?? ''),
|
||||
date: json['date'],
|
||||
businessId: json['business_id'],
|
||||
branchId: json['branch_id'],
|
||||
paymentTypeId: json['payment_type_id'],
|
||||
userId: json['user_id'],
|
||||
businessId: num.tryParse(json['business_id']?.toString() ?? ''),
|
||||
branchId: num.tryParse(json['branch_id']?.toString() ?? ''),
|
||||
paymentTypeId: num.tryParse(json['payment_type_id']?.toString() ?? ''),
|
||||
userId: num.tryParse(json['user_id']?.toString() ?? ''),
|
||||
fromBank: json['from_bank'],
|
||||
toBank: json['to_bank'],
|
||||
referenceId: json['reference_id'],
|
||||
toBank: int.tryParse(json['to_bank']?.toString() ?? ''),
|
||||
referenceId: num.tryParse(json['reference_id']?.toString() ?? ''),
|
||||
invoiceNo: json['invoice_no'],
|
||||
image: json['image'],
|
||||
note: json['note'],
|
||||
|
||||
Reference in New Issue
Block a user