'Returns \'Actual Operating Time\'.'

def get_actual_timesheet_summary(self, operation_id):

    return frappe.db.sql(u'select\n DCTB  DCTB  DCTB sum(tsd.hours*60)    as    mins,    sum(tsd.completed_qty)    as    completed_qty,    min(tsd.from_time)    as    from_time,\n DCTB  DCTB  DCTB max(tsd.to_time)    as    to_time    from    `tabTimesheet    Detail`    as    tsd,    `tabTimesheet`    as    ts    where\n DCTB  DCTB  DCTB ts.production_order    =    %s    and    tsd.operation_id    =    %s    and    ts.docstatus=1    and    ts.name    =    tsd.parent', (self.production_order, operation_id), as_dict=1)[0]
