fix: sider issues

This commit is contained in:
Rucha Mahabal 2021-05-20 22:23:44 +05:30
parent be247ec3de
commit 8a407f1ec3
2 changed files with 3 additions and 3 deletions

View File

@ -147,7 +147,7 @@ frappe.ui.form.on("Timesheet", {
frm.set_currency_labels(["total_costing_amount", "total_billable_amount", "total_billed_amount"], frm.doc.currency);
frm.toggle_display(["base_total_costing_amount", "base_total_billable_amount", "base_total_billed_amount"],
frm.doc.currency != base_currency)
frm.doc.currency != base_currency);
if (frm.doc.time_logs.length > 0) {
frm.set_currency_labels(["base_billing_rate", "base_billing_amount", "base_costing_rate", "base_costing_amount"], base_currency, "time_logs");

View File

@ -137,7 +137,7 @@ class Timesheet(Document):
def validate_time_logs(self):
for data in self.get('time_logs'):
self.validate_overlap(data)
self.validate_task_project(data)
self.set_project(data)
self.validate_project(data)
def validate_overlap(self, data):
@ -145,7 +145,7 @@ class Timesheet(Document):
self.validate_overlap_for("user", data, self.user, settings.ignore_user_time_overlap)
self.validate_overlap_for("employee", data, self.employee, settings.ignore_employee_time_overlap)
def validate_task_project(self, data):
def set_project(self, data):
data.project = data.project or frappe.db.get_value("Task", data.task, "project")
def validate_project(self, data):