[Fix] Calendar view for sales order
This commit is contained in:
parent
3b128cabb2
commit
d62fa84ed9
@ -627,14 +627,15 @@ def get_events(start, end, filters=None):
|
|||||||
|
|
||||||
data = frappe.db.sql("""
|
data = frappe.db.sql("""
|
||||||
select
|
select
|
||||||
so.name, so.customer_name, so.status,
|
`tabSales Order`.name, `tabSales Order`.customer_name, `tabSales Order`.status,
|
||||||
so.delivery_status, so.billing_status, so_item.delivery_date
|
`tabSales Order`.delivery_status, `tabSales Order`.billing_status,
|
||||||
|
`tabSales Order Item`.delivery_date
|
||||||
from
|
from
|
||||||
`tabSales Order` so, `tabSales Order Item` so_item
|
`tabSales Order`, `tabSales Order Item`
|
||||||
where so.name = so_item.parent
|
where `tabSales Order`.name = `tabSales Order Item`.parent
|
||||||
and (ifnull(so_item.delivery_date, '0000-00-00')!= '0000-00-00') \
|
and (ifnull(`tabSales Order Item`.delivery_date, '0000-00-00')!= '0000-00-00') \
|
||||||
and (so_item.delivery_date between %(start)s and %(end)s)
|
and (`tabSales Order Item`.delivery_date between %(start)s and %(end)s)
|
||||||
and so.docstatus < 2
|
and `tabSales Order`.docstatus < 2
|
||||||
{conditions}
|
{conditions}
|
||||||
""".format(conditions=conditions), {
|
""".format(conditions=conditions), {
|
||||||
"start": start,
|
"start": start,
|
||||||
|
Loading…
Reference in New Issue
Block a user