diff --git a/erpnext/setup/doctype/naming_series/naming_series.py b/erpnext/setup/doctype/naming_series/naming_series.py index 67646f6d5f..dfe3ec009f 100644 --- a/erpnext/setup/doctype/naming_series/naming_series.py +++ b/erpnext/setup/doctype/naming_series/naming_series.py @@ -134,7 +134,7 @@ class NamingSeries(Document): """get series current""" if self.prefix: self.current_value = frappe.db.get_value("Series", - self.prefix.split('.')[0], "current") + self.prefix.split('.')[0], "current", order_by = "name") def insert_series(self, series): """insert series if missing"""