match condition added in daily time log summary report
This commit is contained in:
parent
7da387100d
commit
1a738f72f4
@ -3,13 +3,13 @@ wn.query_reports["Daily Time Log Summary"] = {
|
|||||||
{
|
{
|
||||||
"fieldname":"from_date",
|
"fieldname":"from_date",
|
||||||
"label": "From Date",
|
"label": "From Date",
|
||||||
"fieldtype": "Datetime",
|
"fieldtype": "Date",
|
||||||
"default": wn.datetime.get_today()
|
"default": wn.datetime.get_today()
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname":"to_date",
|
"fieldname":"to_date",
|
||||||
"label": "To Date",
|
"label": "To Date",
|
||||||
"fieldtype": "Datetime",
|
"fieldtype": "Date",
|
||||||
"default": wn.datetime.get_today()
|
"default": wn.datetime.get_today()
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|||||||
@ -2,7 +2,11 @@ from __future__ import unicode_literals
|
|||||||
import webnotes
|
import webnotes
|
||||||
|
|
||||||
def execute(filters=None):
|
def execute(filters=None):
|
||||||
if not filters: filters = {}
|
if not filters:
|
||||||
|
filters = {}
|
||||||
|
elif filters.get("to_date"):
|
||||||
|
filters["to_date"] = filters.get("to_date") + "24:00:00"
|
||||||
|
|
||||||
columns = ["Employee::150", "From Datetime::120", "To Datetime::120", "Hours::70", "Task::150",
|
columns = ["Employee::150", "From Datetime::120", "To Datetime::120", "Hours::70", "Task::150",
|
||||||
"Project:Link/Project:120", "Status::70"]
|
"Project:Link/Project:120", "Status::70"]
|
||||||
|
|
||||||
@ -13,10 +17,10 @@ def execute(filters=None):
|
|||||||
where docstatus < 2 %s order by owner asc""" % (conditions, ), filters, as_dict=1)
|
where docstatus < 2 %s order by owner asc""" % (conditions, ), filters, as_dict=1)
|
||||||
|
|
||||||
data = []
|
data = []
|
||||||
|
if time_logs:
|
||||||
profiles = [time_logs[0].owner]
|
profiles = [time_logs[0].owner]
|
||||||
|
|
||||||
for tl in time_logs:
|
for tl in time_logs:
|
||||||
|
|
||||||
if tl.owner not in profiles:
|
if tl.owner not in profiles:
|
||||||
profiles.append(tl.owner)
|
profiles.append(tl.owner)
|
||||||
data.append([])
|
data.append([])
|
||||||
@ -43,4 +47,9 @@ def build_conditions(filters):
|
|||||||
if filters.get("to_date"):
|
if filters.get("to_date"):
|
||||||
conditions += " and to_time <= %(to_date)s"
|
conditions += " and to_time <= %(to_date)s"
|
||||||
|
|
||||||
|
from webnotes.widgets.reportview import build_match_conditions
|
||||||
|
match_conditions = build_match_conditions("Time Log")
|
||||||
|
if match_conditions:
|
||||||
|
conditions += " and %s" % match_conditions
|
||||||
|
|
||||||
return conditions
|
return conditions
|
||||||
@ -67,7 +67,7 @@ erpnext.stock.StockReconciliation = erpnext.stock.StockController.extend({
|
|||||||
attach the modified file.");
|
attach the modified file.");
|
||||||
}
|
}
|
||||||
} else if(this.frm.doc.docstatus == 1) {
|
} else if(this.frm.doc.docstatus == 1) {
|
||||||
this.frm.set_intro("Cancelling this Stock Reconciliation will nullify it's effect.");
|
this.frm.set_intro("Cancelling this Stock Reconciliation will nullify its effect.");
|
||||||
this.show_stock_ledger();
|
this.show_stock_ledger();
|
||||||
} else {
|
} else {
|
||||||
this.frm.set_intro("");
|
this.frm.set_intro("");
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user