diff --git a/frontend/mgramseva/lib/providers/reports_provider.dart b/frontend/mgramseva/lib/providers/reports_provider.dart index ba3b6e087..c584d164b 100644 --- a/frontend/mgramseva/lib/providers/reports_provider.dart +++ b/frontend/mgramseva/lib/providers/reports_provider.dart @@ -35,7 +35,14 @@ class ReportsProvider with ChangeNotifier { List? demandreports; List? collectionreports; late BillsTableData genericTableData; - + void clearBillingSelection(){ + selectedBillYear = null; + selectedBillPeriod = null; + selectedBillCycle = null; + billingcycleCtrl.clear(); + billingyearCtrl.clear(); + notifyListeners(); + } dispose() { streamController.close(); super.dispose(); diff --git a/frontend/mgramseva/lib/screeens/reports/reports.dart b/frontend/mgramseva/lib/screeens/reports/reports.dart index 576eec223..6c3c48ccf 100644 --- a/frontend/mgramseva/lib/screeens/reports/reports.dart +++ b/frontend/mgramseva/lib/screeens/reports/reports.dart @@ -34,6 +34,10 @@ class _Reports extends State with SingleTickerProviderStateMixin { @override void dispose() { + var reportsProvider = Provider.of( + navigatorKey.currentContext!, + listen: false); + reportsProvider.clearBillingSelection(); super.dispose(); }