Merge pull request #38572 from frappe/mergify/bp/version-15-hotfix/pr-38556
fix(minor): financial statements period end date (backport #38556)
This commit is contained in:
		
						commit
						bfe2b923e1
					
				| @ -8,7 +8,17 @@ import re | |||||||
| 
 | 
 | ||||||
| import frappe | import frappe | ||||||
| from frappe import _ | from frappe import _ | ||||||
| from frappe.utils import add_days, add_months, cint, cstr, flt, formatdate, get_first_day, getdate | from frappe.utils import ( | ||||||
|  | 	add_days, | ||||||
|  | 	add_months, | ||||||
|  | 	cint, | ||||||
|  | 	cstr, | ||||||
|  | 	flt, | ||||||
|  | 	formatdate, | ||||||
|  | 	get_first_day, | ||||||
|  | 	getdate, | ||||||
|  | 	today, | ||||||
|  | ) | ||||||
| 
 | 
 | ||||||
| from erpnext.accounts.doctype.accounting_dimension.accounting_dimension import ( | from erpnext.accounts.doctype.accounting_dimension.accounting_dimension import ( | ||||||
| 	get_accounting_dimensions, | 	get_accounting_dimensions, | ||||||
| @ -43,6 +53,8 @@ def get_period_list( | |||||||
| 		year_start_date = getdate(period_start_date) | 		year_start_date = getdate(period_start_date) | ||||||
| 		year_end_date = getdate(period_end_date) | 		year_end_date = getdate(period_end_date) | ||||||
| 
 | 
 | ||||||
|  | 	year_end_date = getdate(today()) if year_end_date > getdate(today()) else year_end_date | ||||||
|  | 
 | ||||||
| 	months_to_add = {"Yearly": 12, "Half-Yearly": 6, "Quarterly": 3, "Monthly": 1}[periodicity] | 	months_to_add = {"Yearly": 12, "Half-Yearly": 6, "Quarterly": 3, "Monthly": 1}[periodicity] | ||||||
| 
 | 
 | ||||||
| 	period_list = [] | 	period_list = [] | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user