Merge branch 'develop' into prod-plan-status
This commit is contained in:
commit
9dc4941072
@ -75,6 +75,6 @@ class StudentAttendance(Document):
|
|||||||
})
|
})
|
||||||
|
|
||||||
if attendance_record:
|
if attendance_record:
|
||||||
record = get_link_to_form('Attendance Record', attendance_record)
|
record = get_link_to_form('Student Attendance', attendance_record)
|
||||||
frappe.throw(_('Student Attendance record {0} already exists against the Student {1}')
|
frappe.throw(_('Student Attendance record {0} already exists against the Student {1}')
|
||||||
.format(record, frappe.bold(self.student)), title=_('Duplicate Entry'))
|
.format(record, frappe.bold(self.student)), title=_('Duplicate Entry'))
|
||||||
|
@ -168,6 +168,7 @@ def get_stock_ledger_entries(filters, items):
|
|||||||
from
|
from
|
||||||
`tabStock Ledger Entry` sle force index (posting_sort_index)
|
`tabStock Ledger Entry` sle force index (posting_sort_index)
|
||||||
where sle.docstatus < 2 %s %s
|
where sle.docstatus < 2 %s %s
|
||||||
|
and is_cancelled = 0
|
||||||
order by sle.posting_date, sle.posting_time, sle.creation, sle.actual_qty""" % #nosec
|
order by sle.posting_date, sle.posting_time, sle.creation, sle.actual_qty""" % #nosec
|
||||||
(item_conditions_sql, conditions), as_dict=1)
|
(item_conditions_sql, conditions), as_dict=1)
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ import json
|
|||||||
from frappe import _
|
from frappe import _
|
||||||
from frappe import utils
|
from frappe import utils
|
||||||
from frappe.model.document import Document
|
from frappe.model.document import Document
|
||||||
from frappe.utils import time_diff_in_hours, now_datetime, getdate, get_weekdays, add_to_date, today, get_time, get_datetime, time_diff_in_seconds, time_diff
|
from frappe.utils import now_datetime, getdate, get_weekdays, add_to_date, get_time, get_datetime, time_diff_in_seconds
|
||||||
from datetime import datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
from frappe.model.mapper import get_mapped_doc
|
from frappe.model.mapper import get_mapped_doc
|
||||||
from frappe.utils.user import is_website_user
|
from frappe.utils.user import is_website_user
|
||||||
@ -355,13 +355,13 @@ def set_service_level_agreement_variance(issue=None):
|
|||||||
doc = frappe.get_doc("Issue", issue.name)
|
doc = frappe.get_doc("Issue", issue.name)
|
||||||
|
|
||||||
if not doc.first_responded_on: # first_responded_on set when first reply is sent to customer
|
if not doc.first_responded_on: # first_responded_on set when first reply is sent to customer
|
||||||
variance = round(time_diff_in_hours(doc.response_by, current_time), 2)
|
variance = round(time_diff_in_seconds(doc.response_by, current_time), 2)
|
||||||
frappe.db.set_value(dt="Issue", dn=doc.name, field="response_by_variance", val=variance, update_modified=False)
|
frappe.db.set_value(dt="Issue", dn=doc.name, field="response_by_variance", val=variance, update_modified=False)
|
||||||
if variance < 0:
|
if variance < 0:
|
||||||
frappe.db.set_value(dt="Issue", dn=doc.name, field="agreement_status", val="Failed", update_modified=False)
|
frappe.db.set_value(dt="Issue", dn=doc.name, field="agreement_status", val="Failed", update_modified=False)
|
||||||
|
|
||||||
if not doc.resolution_date: # resolution_date set when issue has been closed
|
if not doc.resolution_date: # resolution_date set when issue has been closed
|
||||||
variance = round(time_diff_in_hours(doc.resolution_by, current_time), 2)
|
variance = round(time_diff_in_seconds(doc.resolution_by, current_time), 2)
|
||||||
frappe.db.set_value(dt="Issue", dn=doc.name, field="resolution_by_variance", val=variance, update_modified=False)
|
frappe.db.set_value(dt="Issue", dn=doc.name, field="resolution_by_variance", val=variance, update_modified=False)
|
||||||
if variance < 0:
|
if variance < 0:
|
||||||
frappe.db.set_value(dt="Issue", dn=doc.name, field="agreement_status", val="Failed", update_modified=False)
|
frappe.db.set_value(dt="Issue", dn=doc.name, field="agreement_status", val="Failed", update_modified=False)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user