-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #912 from egovernments/ISTE-12_2
Iste 12 2
- Loading branch information
Showing
24 changed files
with
1,203 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
111 changes: 111 additions & 0 deletions
111
frontend/mgramseva/lib/model/reports/monthly_ledger_data.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
class MonthReport { | ||
final List<MonthReportData>? monthReport; | ||
final String? tenantName; | ||
final String? monthPeriod; | ||
final ResponseInfo? responseInfo; | ||
|
||
MonthReport({ | ||
this.monthReport, | ||
this.tenantName, | ||
this.monthPeriod, | ||
this.responseInfo, | ||
}); | ||
|
||
factory MonthReport.fromJson(Map<String, dynamic> json) { | ||
return MonthReport( | ||
monthReport: (json['monthReport'] as List<dynamic>?) | ||
?.map((e) => MonthReportData.fromJson(e)) | ||
.toList(), | ||
tenantName: json['tenantName'] as String?, | ||
monthPeriod: json['monthPeriod'] as String?, | ||
responseInfo: json['responseInfo'] != null | ||
? ResponseInfo.fromJson(json['responseInfo']) | ||
: null, | ||
); | ||
} | ||
} | ||
|
||
class MonthReportData { | ||
final String? tenantName; | ||
final String? connectionNo; | ||
final String? oldConnectionNo; | ||
final int? consumerCreatedOnDate; | ||
final String? consumerName; | ||
final String? userId; | ||
final int? demandGenerationDate; | ||
final double? penalty; | ||
final double? demandAmount; | ||
final double? advance; | ||
final double? arrears; | ||
final double? totalAmount; | ||
final double? amountPaid; | ||
final int? paidDate; | ||
final double? remainingAmount; | ||
|
||
MonthReportData({ | ||
this.tenantName, | ||
this.connectionNo, | ||
this.oldConnectionNo, | ||
this.consumerCreatedOnDate, | ||
this.consumerName, | ||
this.userId, | ||
this.demandGenerationDate, | ||
this.penalty, | ||
this.demandAmount, | ||
this.advance, | ||
this.arrears, | ||
this.totalAmount, | ||
this.amountPaid, | ||
this.paidDate, | ||
this.remainingAmount, | ||
}); | ||
|
||
factory MonthReportData.fromJson(Map<String, dynamic> json) { | ||
return MonthReportData( | ||
tenantName: json['tenantName'] as String?, | ||
connectionNo: json['connectionNo'] as String?, | ||
oldConnectionNo: json['oldConnectionNo'] as String?, | ||
consumerCreatedOnDate: json['consumerCreatedOnDate'] as int?, | ||
consumerName: json['consumerName'] as String?, | ||
userId: json['userId'] as String?, | ||
demandGenerationDate: json['demandGenerationDate'] as int?, | ||
penalty: (json['penalty'] as num?)?.toDouble(), | ||
demandAmount: (json['demandAmount'] as num?)?.toDouble(), | ||
advance: (json['advance'] as num?)?.toDouble(), | ||
arrears: (json['arrears'] as num?)?.toDouble(), | ||
totalAmount: (json['totalAmount'] as num?)?.toDouble(), | ||
amountPaid: (json['amountPaid'] as num?)?.toDouble(), | ||
paidDate: json['paidDate'] as int?, | ||
remainingAmount: (json['remainingAmount'] as num?)?.toDouble(), | ||
); | ||
} | ||
} | ||
|
||
class ResponseInfo { | ||
final String apiId; | ||
final String ver; | ||
final dynamic ts; | ||
final String resMsgId; | ||
final String msgId; | ||
final String status; | ||
|
||
ResponseInfo({ | ||
required this.apiId, | ||
required this.ver, | ||
required this.ts, | ||
required this.resMsgId, | ||
required this.msgId, | ||
required this.status, | ||
}); | ||
|
||
factory ResponseInfo.fromJson(Map<String, dynamic> json) { | ||
return ResponseInfo( | ||
apiId: json['apiId'], | ||
ver: json['ver'], | ||
ts: json['ts'], | ||
resMsgId: json['resMsgId'], | ||
msgId: json['msgId'], | ||
status: json['status'], | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.