Skip to content
This repository has been archived by the owner on Nov 26, 2024. It is now read-only.

Commit

Permalink
Merge pull request #542 from egovernments/PFM-4080
Browse files Browse the repository at this point in the history
Pfm 4080
  • Loading branch information
rahuldevgarg authored Sep 7, 2023
2 parents 3d0fa0d + 05448e4 commit c397cf5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
13 changes: 10 additions & 3 deletions frontend/mgramseva/lib/providers/reports_provider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,14 @@ class ReportsProvider with ChangeNotifier {
List<BillReportData>? demandreports;
List<CollectionReportData>? collectionreports;
late BillsTableData genericTableData;

void clearBillingSelection(){
selectedBillYear = null;
selectedBillPeriod = null;
selectedBillCycle = null;
billingcycleCtrl.clear();
billingyearCtrl.clear();
notifyListeners();
}
dispose() {
streamController.close();
super.dispose();
Expand Down Expand Up @@ -332,12 +339,12 @@ class ReportsProvider with ChangeNotifier {
.setText(headers[CommonMethods.getAlphabetsWithKeyValue()[i].key]);
}

for (int i = dataStartRow; i < tableData.length + 2; i++) {
for (int i = dataStartRow; i < tableData.length + dataStartRow; i++) {
for (int j = 0; j < headers.length; j++) {
sheet
.getRangeByName(
'${CommonMethods.getAlphabetsWithKeyValue()[j].label}$i')
.setText(tableData[i - 2][j]);
.setText(tableData[i - dataStartRow][j]);
sheet
.getRangeByName(
'${CommonMethods.getAlphabetsWithKeyValue()[j].label}$i')
Expand Down
4 changes: 4 additions & 0 deletions frontend/mgramseva/lib/screeens/reports/reports.dart
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ class _Reports extends State<Reports> with SingleTickerProviderStateMixin {

@override
void dispose() {
var reportsProvider = Provider.of<ReportsProvider>(
navigatorKey.currentContext!,
listen: false);
reportsProvider.clearBillingSelection();
super.dispose();
}

Expand Down

0 comments on commit c397cf5

Please sign in to comment.