mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-24 23:49:19 +00:00
chore: fixed test case
This commit is contained in:
@@ -1340,9 +1340,15 @@ def get_batch_incoming_rate(
|
|||||||
item_code, warehouse, batch_no, posting_date, posting_time, creation=None
|
item_code, warehouse, batch_no, posting_date, posting_time, creation=None
|
||||||
):
|
):
|
||||||
|
|
||||||
|
import datetime
|
||||||
|
|
||||||
sle = frappe.qb.DocType("Stock Ledger Entry")
|
sle = frappe.qb.DocType("Stock Ledger Entry")
|
||||||
|
|
||||||
timestamp_condition = sle.posting_datetime < get_combine_datetime(posting_date, posting_time)
|
posting_datetime = get_combine_datetime(posting_date, posting_time)
|
||||||
|
if not creation:
|
||||||
|
posting_datetime = posting_datetime + datetime.timedelta(milliseconds=1)
|
||||||
|
|
||||||
|
timestamp_condition = sle.posting_datetime < posting_datetime
|
||||||
if creation:
|
if creation:
|
||||||
timestamp_condition |= (
|
timestamp_condition |= (
|
||||||
sle.posting_datetime == get_combine_datetime(posting_date, posting_time)
|
sle.posting_datetime == get_combine_datetime(posting_date, posting_time)
|
||||||
|
|||||||
Reference in New Issue
Block a user