[fix] event creation on Contact Date
diff --git a/erpnext/utilities/transaction_base.py b/erpnext/utilities/transaction_base.py
index 6c9b9a4..278ec3b 100644
--- a/erpnext/utilities/transaction_base.py
+++ b/erpnext/utilities/transaction_base.py
@@ -34,7 +34,7 @@
if events:
frappe.db.sql("delete from `tabEvent` where name in (%s)"
.format(", ".join(['%s']*len(events))), tuple(events))
-
+
frappe.db.sql("delete from `tabEvent Role` where parent in (%s)"
.format(", ".join(['%s']*len(events))), tuple(events))
@@ -47,7 +47,7 @@
"owner": opts.owner or self.owner,
"subject": opts.subject,
"description": opts.description,
- "starts_on": self.contact_date + " 10:00:00",
+ "starts_on": self.contact_date,
"event_type": "Private",
"ref_type": self.doctype,
"ref_name": self.name
@@ -56,7 +56,7 @@
event.insert(ignore_permissions=True)
if frappe.db.exists("User", self.contact_by):
- frappe.share.add("Event", event.name, self.contact_by,
+ frappe.share.add("Event", event.name, self.contact_by,
flags={"ignore_share_permission": True})
def validate_uom_is_integer(self, uom_field, qty_fields):
@@ -92,14 +92,14 @@
for field, condition in fields:
if prevdoc_values[field] is not None:
self.validate_value(field, condition, prevdoc_values[field], doc)
-
-
+
+
def validate_rate_with_reference_doc(self, ref_details):
for ref_dt, ref_dn_field, ref_link_field in ref_details:
for d in self.get("items"):
if d.get(ref_link_field):
ref_rate = frappe.db.get_value(ref_dt + " Item", d.get(ref_link_field), "rate")
-
+
if abs(flt(d.rate - ref_rate, d.precision("rate"))) >= .01:
frappe.throw(_("Row #{0}: Rate must be same as {1}: {2} ({3} / {4}) ")
.format(d.idx, ref_dt, d.get(ref_dn_field), d.rate, ref_rate))