Merge branch 'hotfix' into revert_change
This commit is contained in:
@@ -211,6 +211,11 @@ frappe.query_reports["General Ledger"] = {
|
|||||||
"label": __("Currency"),
|
"label": __("Currency"),
|
||||||
"fieldtype": "Select",
|
"fieldtype": "Select",
|
||||||
"options": erpnext.get_presentation_currency_list()
|
"options": erpnext.get_presentation_currency_list()
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "show_opening_entries",
|
||||||
|
"label": __("Show Opening Entries"),
|
||||||
|
"fieldtype": "Check"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -283,7 +283,8 @@ def get_accountwise_gle(filters, gl_entries, gle_map):
|
|||||||
|
|
||||||
from_date, to_date = getdate(filters.from_date), getdate(filters.to_date)
|
from_date, to_date = getdate(filters.from_date), getdate(filters.to_date)
|
||||||
for gle in gl_entries:
|
for gle in gl_entries:
|
||||||
if gle.posting_date < from_date or cstr(gle.is_opening) == "Yes":
|
if (gle.posting_date < from_date or
|
||||||
|
(cstr(gle.is_opening) == "Yes" and not filters.get("show_opening_entries"))):
|
||||||
update_value_in_dict(gle_map[gle.get(group_by)].totals, 'opening', gle)
|
update_value_in_dict(gle_map[gle.get(group_by)].totals, 'opening', gle)
|
||||||
update_value_in_dict(totals, 'opening', gle)
|
update_value_in_dict(totals, 'opening', gle)
|
||||||
|
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ class Lead(SellingController):
|
|||||||
def set_lead_name(self):
|
def set_lead_name(self):
|
||||||
if not self.lead_name:
|
if not self.lead_name:
|
||||||
# Check for leads being created through data import
|
# Check for leads being created through data import
|
||||||
if not self.company_name:
|
if not self.company_name and not self.flags.ignore_mandatory:
|
||||||
frappe.throw(_("A Lead requires either a person's name or an organization's name"))
|
frappe.throw(_("A Lead requires either a person's name or an organization's name"))
|
||||||
|
|
||||||
self.lead_name = self.company_name
|
self.lead_name = self.company_name
|
||||||
|
|||||||
Reference in New Issue
Block a user