mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-14 12:25:09 +00:00
fix: invalid comparison error in sabb.py
(cherry picked from commit ec1faf02ed)
This commit is contained in:
@@ -11,11 +11,11 @@ from frappe.model.document import Document
|
|||||||
from frappe.model.naming import make_autoname
|
from frappe.model.naming import make_autoname
|
||||||
from frappe.query_builder.functions import CombineDatetime, Sum
|
from frappe.query_builder.functions import CombineDatetime, Sum
|
||||||
from frappe.utils import (
|
from frappe.utils import (
|
||||||
add_days,
|
|
||||||
cint,
|
cint,
|
||||||
cstr,
|
cstr,
|
||||||
flt,
|
flt,
|
||||||
get_link_to_form,
|
get_link_to_form,
|
||||||
|
getdate,
|
||||||
now,
|
now,
|
||||||
nowtime,
|
nowtime,
|
||||||
parse_json,
|
parse_json,
|
||||||
@@ -2149,7 +2149,7 @@ def get_auto_batch_nos(kwargs):
|
|||||||
)
|
)
|
||||||
|
|
||||||
if kwargs.based_on == "Expiry":
|
if kwargs.based_on == "Expiry":
|
||||||
available_batches = sorted(available_batches, key=lambda x: (x.expiry_date or "9999-12-31"))
|
available_batches = sorted(available_batches, key=lambda x: (x.expiry_date or getdate("9999-12-31")))
|
||||||
|
|
||||||
if not kwargs.get("do_not_check_future_batches") and available_batches and kwargs.get("posting_date"):
|
if not kwargs.get("do_not_check_future_batches") and available_batches and kwargs.get("posting_date"):
|
||||||
filter_zero_near_batches(available_batches, kwargs)
|
filter_zero_near_batches(available_batches, kwargs)
|
||||||
|
|||||||
Reference in New Issue
Block a user