mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-26 16:34:46 +00:00
refactor: report columns should be based on from and to dates
(cherry picked from commit 751a25c4b7)
This commit is contained in:
@@ -8,7 +8,7 @@ from itertools import groupby
|
|||||||
import frappe
|
import frappe
|
||||||
from dateutil.relativedelta import relativedelta
|
from dateutil.relativedelta import relativedelta
|
||||||
from frappe import _
|
from frappe import _
|
||||||
from frappe.utils import cint, flt
|
from frappe.utils import cint, flt, getdate
|
||||||
|
|
||||||
from erpnext.setup.utils import get_exchange_rate
|
from erpnext.setup.utils import get_exchange_rate
|
||||||
|
|
||||||
@@ -235,10 +235,9 @@ class SalesPipelineAnalytics:
|
|||||||
|
|
||||||
def get_month_list(self):
|
def get_month_list(self):
|
||||||
month_list = []
|
month_list = []
|
||||||
current_date = date.today()
|
current_date = getdate(self.filters.get("from_date"))
|
||||||
month_number = date.today().month
|
|
||||||
|
|
||||||
for _month in range(month_number, 13):
|
while current_date < getdate(self.filters.get("to_date")):
|
||||||
month_list.append(current_date.strftime("%B"))
|
month_list.append(current_date.strftime("%B"))
|
||||||
current_date = current_date + relativedelta(months=1)
|
current_date = current_date + relativedelta(months=1)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user