mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-18 09:05:00 +00:00
chore: conflicts
This commit is contained in:
@@ -6,12 +6,8 @@ import frappe
|
||||
from frappe import _
|
||||
from frappe.model.document import Document
|
||||
from frappe.model.naming import make_autoname, revert_series_if_last
|
||||
<<<<<<< HEAD
|
||||
from frappe.utils import cint, flt, get_link_to_form, nowtime
|
||||
=======
|
||||
from frappe.query_builder.functions import CurDate, Sum, Timestamp
|
||||
from frappe.utils import cint, flt, get_link_to_form
|
||||
>>>>>>> 517b5f8567 (refactor: rewrite `batch.py` queries in `QB`)
|
||||
from frappe.utils import cint, flt, get_link_to_form, nowtime
|
||||
from frappe.utils.data import add_days
|
||||
from frappe.utils.jinja import render_template
|
||||
|
||||
@@ -185,26 +181,18 @@ def get_batch_qty(
|
||||
|
||||
out = 0
|
||||
if batch_no and warehouse:
|
||||
<<<<<<< HEAD
|
||||
cond = ""
|
||||
|
||||
if posting_date:
|
||||
if posting_time is None:
|
||||
posting_time = nowtime()
|
||||
|
||||
cond = " and timestamp(posting_date, posting_time) <= timestamp('{0}', '{1}')".format(
|
||||
posting_date, posting_time
|
||||
=======
|
||||
query = (
|
||||
frappe.qb.from_(sle)
|
||||
.select(Sum(sle.actual_qty))
|
||||
.where((sle.is_cancelled == 0) & (sle.warehouse == warehouse) & (sle.batch_no == batch_no))
|
||||
)
|
||||
|
||||
if posting_date and posting_time:
|
||||
if posting_date:
|
||||
if posting_time is None:
|
||||
posting_time = nowtime()
|
||||
|
||||
query = query.where(
|
||||
Timestamp(sle.posting_date, sle.posting_time) <= Timestamp(posting_date, posting_time)
|
||||
>>>>>>> 517b5f8567 (refactor: rewrite `batch.py` queries in `QB`)
|
||||
)
|
||||
|
||||
out = query.run(as_list=True)[0][0] or 0
|
||||
|
||||
Reference in New Issue
Block a user