[translations] fixes #4533
This commit is contained in:
parent
eb961370ff
commit
5760b79747
@ -90,12 +90,12 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) {
|
|||||||
var frm = cur_frm;
|
var frm = cur_frm;
|
||||||
if(frm.perm[0].write && doc.docstatus==0) {
|
if(frm.perm[0].write && doc.docstatus==0) {
|
||||||
if(frm.doc.status==="Open") {
|
if(frm.doc.status==="Open") {
|
||||||
frm.add_custom_button("Close", function() {
|
frm.add_custom_button(__("Close"), function() {
|
||||||
frm.set_value("status", "Closed");
|
frm.set_value("status", "Closed");
|
||||||
frm.save();
|
frm.save();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
frm.add_custom_button("Reopen", function() {
|
frm.add_custom_button(__("Reopen"), function() {
|
||||||
frm.set_value("status", "Open");
|
frm.set_value("status", "Open");
|
||||||
frm.save();
|
frm.save();
|
||||||
});
|
});
|
||||||
|
@ -31,12 +31,12 @@ frappe.ui.form.on("Task", {
|
|||||||
|
|
||||||
if(frm.perm[0].write) {
|
if(frm.perm[0].write) {
|
||||||
if(frm.doc.status!=="Closed" && frm.doc.status!=="Cancelled") {
|
if(frm.doc.status!=="Closed" && frm.doc.status!=="Cancelled") {
|
||||||
frm.add_custom_button("Close", function() {
|
frm.add_custom_button(__("Close"), function() {
|
||||||
frm.set_value("status", "Closed");
|
frm.set_value("status", "Closed");
|
||||||
frm.save();
|
frm.save();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
frm.add_custom_button("Reopen", function() {
|
frm.add_custom_button(__("Reopen"), function() {
|
||||||
frm.set_value("status", "Open");
|
frm.set_value("status", "Open");
|
||||||
frm.save();
|
frm.save();
|
||||||
});
|
});
|
||||||
|
@ -180,6 +180,6 @@ erpnext.SalesFunnel = Class.extend({
|
|||||||
context.fillStyle = "black";
|
context.fillStyle = "black";
|
||||||
context.textBaseline = "middle";
|
context.textBaseline = "middle";
|
||||||
context.font = "1.1em sans-serif";
|
context.font = "1.1em sans-serif";
|
||||||
context.fillText(title, width + 20, y_mid);
|
context.fillText(__(title), width + 20, y_mid);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -4,6 +4,8 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
import frappe
|
import frappe
|
||||||
|
|
||||||
|
from frappe import _
|
||||||
|
|
||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
def get_funnel_data(from_date, to_date):
|
def get_funnel_data(from_date, to_date):
|
||||||
active_leads = frappe.db.sql("""select count(*) from `tabLead`
|
active_leads = frappe.db.sql("""select count(*) from `tabLead`
|
||||||
@ -26,8 +28,8 @@ def get_funnel_data(from_date, to_date):
|
|||||||
where docstatus = 1 and (date(`creation`) between %s and %s)""", (from_date, to_date))[0][0]
|
where docstatus = 1 and (date(`creation`) between %s and %s)""", (from_date, to_date))[0][0]
|
||||||
|
|
||||||
return [
|
return [
|
||||||
{ "title": "Active Leads / Customers", "value": active_leads, "color": "#B03B46" },
|
{ "title": _("Active Leads / Customers"), "value": active_leads, "color": "#B03B46" },
|
||||||
{ "title": "Opportunities", "value": opportunities, "color": "#F09C00" },
|
{ "title": _("Opportunities"), "value": opportunities, "color": "#F09C00" },
|
||||||
{ "title": "Quotations", "value": quotations, "color": "#006685" },
|
{ "title": _("Quotations"), "value": quotations, "color": "#006685" },
|
||||||
{ "title": "Sales Orders", "value": sales_orders, "color": "#00AD65" }
|
{ "title": _("Sales Orders"), "value": sales_orders, "color": "#00AD65" }
|
||||||
]
|
]
|
||||||
|
@ -65,7 +65,7 @@ erpnext.stock.DeliveryNoteController = erpnext.selling.SellingController.extend(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(doc.docstatus==1 && doc.status === "Closed" && this.frm.has_perm("submit")) {
|
if(doc.docstatus==1 && doc.status === "Closed" && this.frm.has_perm("submit")) {
|
||||||
cur_frm.add_custom_button(__('Re-open'), this.reopen_delivery_note)
|
cur_frm.add_custom_button(__('Reopen'), this.reopen_delivery_note)
|
||||||
}
|
}
|
||||||
erpnext.stock.delivery_note.set_print_hide(doc, dt, dn);
|
erpnext.stock.delivery_note.set_print_hide(doc, dt, dn);
|
||||||
|
|
||||||
|
@ -69,7 +69,7 @@ erpnext.stock.PurchaseReceiptController = erpnext.buying.BuyingController.extend
|
|||||||
|
|
||||||
|
|
||||||
if(this.frm.doc.docstatus==1 && this.frm.doc.status === "Closed" && this.frm.has_perm("submit")) {
|
if(this.frm.doc.docstatus==1 && this.frm.doc.status === "Closed" && this.frm.has_perm("submit")) {
|
||||||
cur_frm.add_custom_button(__('Re-open'), this.reopen_purchase_receipt)
|
cur_frm.add_custom_button(__('Reopen'), this.reopen_purchase_receipt)
|
||||||
}
|
}
|
||||||
|
|
||||||
this.frm.toggle_reqd("supplier_warehouse", this.frm.doc.is_subcontracted==="Yes");
|
this.frm.toggle_reqd("supplier_warehouse", this.frm.doc.is_subcontracted==="Yes");
|
||||||
|
@ -5,12 +5,12 @@ frappe.ui.form.on("Issue", {
|
|||||||
|
|
||||||
"refresh": function(frm) {
|
"refresh": function(frm) {
|
||||||
if(frm.doc.status==="Open") {
|
if(frm.doc.status==="Open") {
|
||||||
frm.add_custom_button("Close", function() {
|
frm.add_custom_button(__("Close"), function() {
|
||||||
frm.set_value("status", "Closed");
|
frm.set_value("status", "Closed");
|
||||||
frm.save();
|
frm.save();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
frm.add_custom_button("Reopen", function() {
|
frm.add_custom_button(__("Reopen"), function() {
|
||||||
frm.set_value("status", "Open");
|
frm.set_value("status", "Open");
|
||||||
frm.save();
|
frm.save();
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user