fix: error message placeholders and sider issues

This commit is contained in:
Rucha Mahabal
2021-05-20 22:17:20 +05:30
parent 0d8b9a9d0a
commit be247ec3de
3 changed files with 11 additions and 11 deletions

View File

@@ -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.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(["billing_rate", "billing_amount", "costing_rate", "costing_amount"], frm.doc.currency, "time_logs");

View File

@@ -150,7 +150,7 @@ class Timesheet(Document):
def validate_project(self, data):
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):
if not value or ignore_validation:

View File

@@ -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
return value;
}
}
};
// add description on posting time
$(document).on('app_ready', function() {