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

Commit

Permalink
PFM-5064 fix daysToSubtract
Browse files Browse the repository at this point in the history
  • Loading branch information
rahuldevgarg committed Mar 7, 2024
1 parent c930a71 commit e5506d5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -724,6 +724,9 @@ class ConsumerProvider with ChangeNotifier {
}
return <TaxPeriod>[];
}
List<TaxPeriod> getLastFinancialYearList(int count) {
return getFinancialYearList().length>count?getFinancialYearList().sublist(0,count):getFinancialYearList();
}
List<Map<String,dynamic>> newFunction({int pastMonthCount = 2}){
List<TaxPeriod> financialYears = getFinancialYearList();
var dates = <Map<String,dynamic>>[];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ class _ConsumerDetailsState extends State<ConsumerDetails> {
.waterconnection
.previousReadingDateCtrl,
firstDate:
DateTime.fromMillisecondsSinceEpoch(consumerProvider.languageList?.mdmsRes?.billingService?.taxPeriodList!.first.fromDate??0),
DateTime.fromMillisecondsSinceEpoch(consumerProvider.getLastFinancialYearList(2).reversed.first.fromDate??0),
lastDate:
DateTime.now(),
onChangeOfDate:
Expand Down

0 comments on commit e5506d5

Please sign in to comment.