fix: error message placeholders and sider issues
This commit is contained in:
@@ -149,7 +149,7 @@ frappe.ui.form.on("Timesheet", {
|
|||||||
frm.toggle_display(["base_total_costing_amount", "base_total_billable_amount", "base_total_billed_amount"],
|
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) {
|
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");
|
frm.set_currency_labels(["base_billing_rate", "base_billing_amount", "base_costing_rate", "base_costing_amount"], base_currency, "time_logs");
|
||||||
frm.set_currency_labels(["billing_rate", "billing_amount", "costing_rate", "costing_amount"], frm.doc.currency, "time_logs");
|
frm.set_currency_labels(["billing_rate", "billing_amount", "costing_rate", "costing_amount"], frm.doc.currency, "time_logs");
|
||||||
|
|
||||||
|
|||||||
@@ -150,7 +150,7 @@ class Timesheet(Document):
|
|||||||
|
|
||||||
def validate_project(self, data):
|
def validate_project(self, data):
|
||||||
if self.parent_project and self.parent_project != data.project:
|
if self.parent_project and self.parent_project != data.project:
|
||||||
frappe.throw(_("Row {0}: Project must be same as the one set in the Timesheet: {1}.")).format(data.idx, self.parent_project)
|
frappe.throw(_("Row {0}: Project must be same as the one set in the Timesheet: {1}.").format(data.idx, self.parent_project))
|
||||||
|
|
||||||
def validate_overlap_for(self, fieldname, args, value, ignore_validation=False):
|
def validate_overlap_for(self, fieldname, args, value, ignore_validation=False):
|
||||||
if not value or ignore_validation:
|
if not value or ignore_validation:
|
||||||
|
|||||||
@@ -734,7 +734,7 @@ frappe.form.link_formatters['Project'] = function(value, doc) {
|
|||||||
// if value is blank in report view or project name and name are the same, return as is
|
// if value is blank in report view or project name and name are the same, return as is
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
// add description on posting time
|
// add description on posting time
|
||||||
$(document).on('app_ready', function() {
|
$(document).on('app_ready', function() {
|
||||||
|
|||||||
Reference in New Issue
Block a user