Merge pull request #1514 from frappe/js-translate-refactor
JS translation refactor
This commit is contained in:
commit
f37d6fe32b
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
cur_frm.cscript.refresh = function(doc, cdt, cdn) {
|
cur_frm.cscript.refresh = function(doc, cdt, cdn) {
|
||||||
if(doc.__islocal) {
|
if(doc.__islocal) {
|
||||||
msgprint(frappe._("Please create new account from Chart of Accounts."));
|
msgprint(__("Please create new account from Chart of Accounts."));
|
||||||
throw "cannot create";
|
throw "cannot create";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -29,7 +29,7 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) {
|
|||||||
// read-only for root accounts
|
// read-only for root accounts
|
||||||
if(!doc.parent_account) {
|
if(!doc.parent_account) {
|
||||||
cur_frm.set_read_only();
|
cur_frm.set_read_only();
|
||||||
cur_frm.set_intro(frappe._("This is a root account and cannot be edited."));
|
cur_frm.set_intro(__("This is a root account and cannot be edited."));
|
||||||
} else {
|
} else {
|
||||||
// credit days and type if customer or supplier
|
// credit days and type if customer or supplier
|
||||||
cur_frm.set_intro(null);
|
cur_frm.set_intro(null);
|
||||||
@ -64,17 +64,17 @@ cur_frm.cscript.account_type = function(doc, cdt, cdn) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
cur_frm.cscript.add_toolbar_buttons = function(doc) {
|
cur_frm.cscript.add_toolbar_buttons = function(doc) {
|
||||||
cur_frm.appframe.add_button(frappe._('Chart of Accounts'),
|
cur_frm.appframe.add_button(__('Chart of Accounts'),
|
||||||
function() { frappe.set_route("Accounts Browser", "Account"); }, 'icon-sitemap')
|
function() { frappe.set_route("Accounts Browser", "Account"); }, 'icon-sitemap')
|
||||||
|
|
||||||
if (cstr(doc.group_or_ledger) == 'Group') {
|
if (cstr(doc.group_or_ledger) == 'Group') {
|
||||||
cur_frm.add_custom_button(frappe._('Convert to Ledger'),
|
cur_frm.add_custom_button(__('Convert to Ledger'),
|
||||||
function() { cur_frm.cscript.convert_to_ledger(); }, 'icon-retweet')
|
function() { cur_frm.cscript.convert_to_ledger(); }, 'icon-retweet')
|
||||||
} else if (cstr(doc.group_or_ledger) == 'Ledger') {
|
} else if (cstr(doc.group_or_ledger) == 'Ledger') {
|
||||||
cur_frm.add_custom_button(frappe._('Convert to Group'),
|
cur_frm.add_custom_button(__('Convert to Group'),
|
||||||
function() { cur_frm.cscript.convert_to_group(); }, 'icon-retweet')
|
function() { cur_frm.cscript.convert_to_group(); }, 'icon-retweet')
|
||||||
|
|
||||||
cur_frm.appframe.add_button(frappe._('View Ledger'), function() {
|
cur_frm.appframe.add_button(__('View Ledger'), function() {
|
||||||
frappe.route_options = {
|
frappe.route_options = {
|
||||||
"account": doc.name,
|
"account": doc.name,
|
||||||
"from_date": sys_defaults.year_start_date,
|
"from_date": sys_defaults.year_start_date,
|
||||||
|
@ -4,5 +4,5 @@
|
|||||||
cur_frm.add_fetch("bank_account", "company", "company");
|
cur_frm.add_fetch("bank_account", "company", "company");
|
||||||
cur_frm.cscript.onload = function(doc, cdt, cdn){
|
cur_frm.cscript.onload = function(doc, cdt, cdn){
|
||||||
cur_frm.set_intro('<i class="icon-question" /> ' +
|
cur_frm.set_intro('<i class="icon-question" /> ' +
|
||||||
frappe._("Update clearance date of Journal Entries marked as 'Bank Vouchers'"))
|
__("Update clearance date of Journal Entries marked as 'Bank Vouchers'"))
|
||||||
}
|
}
|
@ -40,8 +40,7 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) {
|
|||||||
cur_frm.toggle_enable(['group_or_ledger', 'company'], doc.__islocal);
|
cur_frm.toggle_enable(['group_or_ledger', 'company'], doc.__islocal);
|
||||||
|
|
||||||
if(!doc.__islocal && doc.group_or_ledger=='Group') {
|
if(!doc.__islocal && doc.group_or_ledger=='Group') {
|
||||||
intro_txt += '<p><b>'+frappe._('Note:')+'</b>'+ frappe._('This Cost Center is a')+ '<i>'+frappe._('Group')+'</i>, '+
|
intro_txt += __('Note: This Cost Center is a Group. Cannot make accounting entries against groups.');
|
||||||
frappe._('Accounting Entries are not allowed against groups.')+'</p>';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cur_frm.cscript.hide_unhide_group_ledger(doc);
|
cur_frm.cscript.hide_unhide_group_ledger(doc);
|
||||||
@ -49,22 +48,22 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) {
|
|||||||
cur_frm.toggle_display('sb1', doc.group_or_ledger=='Ledger')
|
cur_frm.toggle_display('sb1', doc.group_or_ledger=='Ledger')
|
||||||
cur_frm.set_intro(intro_txt);
|
cur_frm.set_intro(intro_txt);
|
||||||
|
|
||||||
cur_frm.appframe.add_button(frappe._('Chart of Cost Centers'),
|
cur_frm.appframe.add_button(__('Chart of Cost Centers'),
|
||||||
function() { frappe.set_route("Accounts Browser", "Cost Center"); }, 'icon-sitemap')
|
function() { frappe.set_route("Accounts Browser", "Cost Center"); }, 'icon-sitemap')
|
||||||
}
|
}
|
||||||
|
|
||||||
cur_frm.cscript.parent_cost_center = function(doc, cdt, cdn) {
|
cur_frm.cscript.parent_cost_center = function(doc, cdt, cdn) {
|
||||||
if(!doc.company){
|
if(!doc.company){
|
||||||
msgprint(frappe._('Please enter company name first'));
|
msgprint(__('Please enter company name first'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
cur_frm.cscript.hide_unhide_group_ledger = function(doc) {
|
cur_frm.cscript.hide_unhide_group_ledger = function(doc) {
|
||||||
if (cstr(doc.group_or_ledger) == 'Group') {
|
if (cstr(doc.group_or_ledger) == 'Group') {
|
||||||
cur_frm.add_custom_button(frappe._('Convert to Ledger'),
|
cur_frm.add_custom_button(__('Convert to Ledger'),
|
||||||
function() { cur_frm.cscript.convert_to_ledger(); }, 'icon-retweet')
|
function() { cur_frm.cscript.convert_to_ledger(); }, 'icon-retweet')
|
||||||
} else if (cstr(doc.group_or_ledger) == 'Ledger') {
|
} else if (cstr(doc.group_or_ledger) == 'Ledger') {
|
||||||
cur_frm.add_custom_button(frappe._('Convert to Group'),
|
cur_frm.add_custom_button(__('Convert to Group'),
|
||||||
function() { cur_frm.cscript.convert_to_group(); }, 'icon-retweet')
|
function() { cur_frm.cscript.convert_to_group(); }, 'icon-retweet')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,8 +8,8 @@ $.extend(cur_frm.cscript, {
|
|||||||
this.frm.toggle_enable('year_end_date', doc.__islocal)
|
this.frm.toggle_enable('year_end_date', doc.__islocal)
|
||||||
|
|
||||||
if (!doc.__islocal && (doc.name != sys_defaults.fiscal_year)) {
|
if (!doc.__islocal && (doc.name != sys_defaults.fiscal_year)) {
|
||||||
this.frm.add_custom_button(frappe._("Set as Default"), this.frm.cscript.set_as_default);
|
this.frm.add_custom_button(__("Set as Default"), this.frm.cscript.set_as_default);
|
||||||
this.frm.set_intro(frappe._("To set this Fiscal Year as Default, click on 'Set as Default'"));
|
this.frm.set_intro(__("To set this Fiscal Year as Default, click on 'Set as Default'"));
|
||||||
} else this.frm.set_intro("");
|
} else this.frm.set_intro("");
|
||||||
},
|
},
|
||||||
set_as_default: function() {
|
set_as_default: function() {
|
||||||
|
@ -114,7 +114,7 @@ cur_frm.cscript.refresh = function(doc) {
|
|||||||
erpnext.hide_naming_series();
|
erpnext.hide_naming_series();
|
||||||
cur_frm.cscript.voucher_type(doc);
|
cur_frm.cscript.voucher_type(doc);
|
||||||
if(doc.docstatus==1) {
|
if(doc.docstatus==1) {
|
||||||
cur_frm.appframe.add_button(frappe._('View Ledger'), function() {
|
cur_frm.appframe.add_button(__('View Ledger'), function() {
|
||||||
frappe.route_options = {
|
frappe.route_options = {
|
||||||
"voucher_no": doc.name,
|
"voucher_no": doc.name,
|
||||||
"from_date": doc.posting_date,
|
"from_date": doc.posting_date,
|
||||||
@ -186,7 +186,7 @@ cur_frm.cscript.select_print_heading = function(doc,cdt,cdn){
|
|||||||
cur_frm.pformat.print_heading = doc.select_print_heading;
|
cur_frm.pformat.print_heading = doc.select_print_heading;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
cur_frm.pformat.print_heading = frappe._("Journal Voucher");
|
cur_frm.pformat.print_heading = __("Journal Voucher");
|
||||||
}
|
}
|
||||||
|
|
||||||
cur_frm.cscript.voucher_type = function(doc, cdt, cdn) {
|
cur_frm.cscript.voucher_type = function(doc, cdt, cdn) {
|
||||||
|
@ -10,15 +10,15 @@ cur_frm.cscript.onload_post_render = function(doc) {
|
|||||||
cur_frm.cscript.refresh = function(doc) {
|
cur_frm.cscript.refresh = function(doc) {
|
||||||
cur_frm.set_intro("");
|
cur_frm.set_intro("");
|
||||||
if(!doc.voucher_no) {
|
if(!doc.voucher_no) {
|
||||||
cur_frm.set_intro(frappe._("Select the Invoice against which you want to allocate payments."));
|
cur_frm.set_intro(__("Select the Invoice against which you want to allocate payments."));
|
||||||
} else {
|
} else {
|
||||||
cur_frm.set_intro(frappe._("Set allocated amount against each Payment Entry and click 'Allocate'."));
|
cur_frm.set_intro(__("Set allocated amount against each Payment Entry and click 'Allocate'."));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
cur_frm.fields_dict.voucher_no.get_query = function(doc) {
|
cur_frm.fields_dict.voucher_no.get_query = function(doc) {
|
||||||
// TO-do: check for pos, it should not come
|
// TO-do: check for pos, it should not come
|
||||||
if (!doc.account) msgprint(frappe._("Please select Account first"));
|
if (!doc.account) msgprint(__("Please select Account first"));
|
||||||
else {
|
else {
|
||||||
return {
|
return {
|
||||||
doctype: doc.voucher_type,
|
doctype: doc.voucher_type,
|
||||||
|
@ -27,10 +27,10 @@ erpnext.accounts.PurchaseInvoice = erpnext.buying.BuyingController.extend({
|
|||||||
|
|
||||||
// Show / Hide button
|
// Show / Hide button
|
||||||
if(doc.docstatus==1 && doc.outstanding_amount > 0)
|
if(doc.docstatus==1 && doc.outstanding_amount > 0)
|
||||||
this.frm.add_custom_button(frappe._('Make Payment Entry'), this.make_bank_voucher);
|
this.frm.add_custom_button(__('Make Payment Entry'), this.make_bank_voucher);
|
||||||
|
|
||||||
if(doc.docstatus==1) {
|
if(doc.docstatus==1) {
|
||||||
cur_frm.appframe.add_button(frappe._('View Ledger'), function() {
|
cur_frm.appframe.add_button(__('View Ledger'), function() {
|
||||||
frappe.route_options = {
|
frappe.route_options = {
|
||||||
"voucher_no": doc.name,
|
"voucher_no": doc.name,
|
||||||
"from_date": doc.posting_date,
|
"from_date": doc.posting_date,
|
||||||
@ -43,7 +43,7 @@ erpnext.accounts.PurchaseInvoice = erpnext.buying.BuyingController.extend({
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(doc.docstatus===0) {
|
if(doc.docstatus===0) {
|
||||||
cur_frm.add_custom_button(frappe._('From Purchase Order'),
|
cur_frm.add_custom_button(__('From Purchase Order'),
|
||||||
function() {
|
function() {
|
||||||
frappe.model.map_current_doc({
|
frappe.model.map_current_doc({
|
||||||
method: "erpnext.buying.doctype.purchase_order.purchase_order.make_purchase_invoice",
|
method: "erpnext.buying.doctype.purchase_order.purchase_order.make_purchase_invoice",
|
||||||
@ -58,7 +58,7 @@ erpnext.accounts.PurchaseInvoice = erpnext.buying.BuyingController.extend({
|
|||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
cur_frm.add_custom_button(frappe._('From Purchase Receipt'),
|
cur_frm.add_custom_button(__('From Purchase Receipt'),
|
||||||
function() {
|
function() {
|
||||||
frappe.model.map_current_doc({
|
frappe.model.map_current_doc({
|
||||||
method: "erpnext.stock.doctype.purchase_receipt.purchase_receipt.make_purchase_invoice",
|
method: "erpnext.stock.doctype.purchase_receipt.purchase_receipt.make_purchase_invoice",
|
||||||
@ -228,5 +228,5 @@ cur_frm.cscript.select_print_heading = function(doc,cdt,cdn){
|
|||||||
cur_frm.pformat.print_heading = doc.select_print_heading;
|
cur_frm.pformat.print_heading = doc.select_print_heading;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
cur_frm.pformat.print_heading = frappe._("Purchase Invoice");
|
cur_frm.pformat.print_heading = __("Purchase Invoice");
|
||||||
}
|
}
|
@ -1,162 +1,431 @@
|
|||||||
{
|
{
|
||||||
|
"_last_update": null,
|
||||||
|
"_user_tags": null,
|
||||||
|
"allow_attach": null,
|
||||||
|
"allow_copy": null,
|
||||||
|
"allow_email": null,
|
||||||
|
"allow_import": null,
|
||||||
|
"allow_print": null,
|
||||||
|
"allow_rename": null,
|
||||||
|
"allow_trash": null,
|
||||||
"autoname": "PVTD.######",
|
"autoname": "PVTD.######",
|
||||||
"creation": "2013-05-21 16:16:04.000000",
|
"change_log": null,
|
||||||
|
"client_script": null,
|
||||||
|
"client_script_core": null,
|
||||||
|
"client_string": null,
|
||||||
|
"colour": null,
|
||||||
|
"creation": "2013-05-21 16:16:04",
|
||||||
|
"custom": null,
|
||||||
|
"default_print_format": null,
|
||||||
|
"description": null,
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"doctype": "DocType",
|
"doctype": "DocType",
|
||||||
|
"document_type": null,
|
||||||
|
"dt_template": null,
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": null,
|
||||||
"default": "Valuation and Total",
|
"default": "Valuation and Total",
|
||||||
|
"depends_on": null,
|
||||||
|
"description": null,
|
||||||
"fieldname": "category",
|
"fieldname": "category",
|
||||||
"fieldtype": "Select",
|
"fieldtype": "Select",
|
||||||
|
"hidden": null,
|
||||||
|
"ignore_restrictions": null,
|
||||||
|
"in_filter": null,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Consider Tax or Charge for",
|
"label": "Consider Tax or Charge for",
|
||||||
|
"no_column": null,
|
||||||
|
"no_copy": null,
|
||||||
"oldfieldname": "category",
|
"oldfieldname": "category",
|
||||||
"oldfieldtype": "Select",
|
"oldfieldtype": "Select",
|
||||||
"options": "Valuation and Total\nValuation\nTotal",
|
"options": "Valuation and Total\nValuation\nTotal",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print_hide": null,
|
||||||
|
"print_width": null,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"reqd": 1
|
"report_hide": null,
|
||||||
|
"reqd": 1,
|
||||||
|
"search_index": null,
|
||||||
|
"set_only_once": null,
|
||||||
|
"trigger": null,
|
||||||
|
"width": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": null,
|
||||||
"default": "Add",
|
"default": "Add",
|
||||||
|
"depends_on": null,
|
||||||
|
"description": null,
|
||||||
"fieldname": "add_deduct_tax",
|
"fieldname": "add_deduct_tax",
|
||||||
"fieldtype": "Select",
|
"fieldtype": "Select",
|
||||||
|
"hidden": null,
|
||||||
|
"ignore_restrictions": null,
|
||||||
|
"in_filter": null,
|
||||||
|
"in_list_view": null,
|
||||||
"label": "Add or Deduct",
|
"label": "Add or Deduct",
|
||||||
|
"no_column": null,
|
||||||
|
"no_copy": null,
|
||||||
"oldfieldname": "add_deduct_tax",
|
"oldfieldname": "add_deduct_tax",
|
||||||
"oldfieldtype": "Select",
|
"oldfieldtype": "Select",
|
||||||
"options": "Add\nDeduct",
|
"options": "Add\nDeduct",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print_hide": null,
|
||||||
|
"print_width": null,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"reqd": 1
|
"report_hide": null,
|
||||||
|
"reqd": 1,
|
||||||
|
"search_index": null,
|
||||||
|
"set_only_once": null,
|
||||||
|
"trigger": null,
|
||||||
|
"width": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": null,
|
||||||
|
"default": null,
|
||||||
|
"depends_on": null,
|
||||||
|
"description": null,
|
||||||
"fieldname": "charge_type",
|
"fieldname": "charge_type",
|
||||||
"fieldtype": "Select",
|
"fieldtype": "Select",
|
||||||
|
"hidden": null,
|
||||||
|
"ignore_restrictions": null,
|
||||||
|
"in_filter": null,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Type",
|
"label": "Type",
|
||||||
|
"no_column": null,
|
||||||
|
"no_copy": null,
|
||||||
"oldfieldname": "charge_type",
|
"oldfieldname": "charge_type",
|
||||||
"oldfieldtype": "Select",
|
"oldfieldtype": "Select",
|
||||||
"options": "\nActual\nOn Net Total\nOn Previous Row Amount\nOn Previous Row Total",
|
"options": "\nActual\nOn Net Total\nOn Previous Row Amount\nOn Previous Row Total",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print_hide": null,
|
||||||
|
"print_width": null,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"reqd": 1
|
"report_hide": null,
|
||||||
|
"reqd": 1,
|
||||||
|
"search_index": null,
|
||||||
|
"set_only_once": null,
|
||||||
|
"trigger": null,
|
||||||
|
"width": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": null,
|
||||||
|
"default": null,
|
||||||
|
"depends_on": "eval:[\"On Previous Row Amount\", \"On Previous Row Total\"].indexOf(doc.charge_type)!==-1",
|
||||||
|
"description": null,
|
||||||
"fieldname": "row_id",
|
"fieldname": "row_id",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"label": "Enter Row",
|
"ignore_restrictions": null,
|
||||||
|
"in_filter": null,
|
||||||
|
"in_list_view": null,
|
||||||
|
"label": "Reference Row #",
|
||||||
|
"no_column": null,
|
||||||
|
"no_copy": null,
|
||||||
"oldfieldname": "row_id",
|
"oldfieldname": "row_id",
|
||||||
"oldfieldtype": "Data",
|
"oldfieldtype": "Data",
|
||||||
|
"options": null,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"read_only": 0
|
"print_hide": null,
|
||||||
|
"print_width": null,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": null,
|
||||||
|
"reqd": null,
|
||||||
|
"search_index": null,
|
||||||
|
"set_only_once": null,
|
||||||
|
"trigger": null,
|
||||||
|
"width": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": null,
|
||||||
|
"default": null,
|
||||||
|
"depends_on": null,
|
||||||
|
"description": null,
|
||||||
"fieldname": "description",
|
"fieldname": "description",
|
||||||
"fieldtype": "Small Text",
|
"fieldtype": "Small Text",
|
||||||
|
"hidden": null,
|
||||||
|
"ignore_restrictions": null,
|
||||||
|
"in_filter": null,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Description",
|
"label": "Description",
|
||||||
|
"no_column": null,
|
||||||
|
"no_copy": null,
|
||||||
"oldfieldname": "description",
|
"oldfieldname": "description",
|
||||||
"oldfieldtype": "Small Text",
|
"oldfieldtype": "Small Text",
|
||||||
|
"options": null,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print_hide": null,
|
||||||
"print_width": "300px",
|
"print_width": "300px",
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
|
"report_hide": null,
|
||||||
"reqd": 1,
|
"reqd": 1,
|
||||||
|
"search_index": null,
|
||||||
|
"set_only_once": null,
|
||||||
|
"trigger": null,
|
||||||
"width": "300px"
|
"width": "300px"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": null,
|
||||||
|
"default": null,
|
||||||
|
"depends_on": null,
|
||||||
|
"description": null,
|
||||||
"fieldname": "col_break1",
|
"fieldname": "col_break1",
|
||||||
"fieldtype": "Column Break",
|
"fieldtype": "Column Break",
|
||||||
"permlevel": 0
|
"hidden": null,
|
||||||
|
"ignore_restrictions": null,
|
||||||
|
"in_filter": null,
|
||||||
|
"in_list_view": null,
|
||||||
|
"label": null,
|
||||||
|
"no_column": null,
|
||||||
|
"no_copy": null,
|
||||||
|
"oldfieldname": null,
|
||||||
|
"oldfieldtype": null,
|
||||||
|
"options": null,
|
||||||
|
"permlevel": 0,
|
||||||
|
"print_hide": null,
|
||||||
|
"print_width": null,
|
||||||
|
"read_only": null,
|
||||||
|
"report_hide": null,
|
||||||
|
"reqd": null,
|
||||||
|
"search_index": null,
|
||||||
|
"set_only_once": null,
|
||||||
|
"trigger": null,
|
||||||
|
"width": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": null,
|
||||||
|
"default": null,
|
||||||
|
"depends_on": null,
|
||||||
|
"description": null,
|
||||||
"fieldname": "account_head",
|
"fieldname": "account_head",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
|
"hidden": null,
|
||||||
|
"ignore_restrictions": null,
|
||||||
|
"in_filter": null,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Account Head",
|
"label": "Account Head",
|
||||||
|
"no_column": null,
|
||||||
|
"no_copy": null,
|
||||||
"oldfieldname": "account_head",
|
"oldfieldname": "account_head",
|
||||||
"oldfieldtype": "Link",
|
"oldfieldtype": "Link",
|
||||||
"options": "Account",
|
"options": "Account",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print_hide": null,
|
||||||
|
"print_width": null,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"reqd": 1
|
"report_hide": null,
|
||||||
|
"reqd": 1,
|
||||||
|
"search_index": null,
|
||||||
|
"set_only_once": null,
|
||||||
|
"trigger": null,
|
||||||
|
"width": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": null,
|
||||||
"default": ":Company",
|
"default": ":Company",
|
||||||
|
"depends_on": null,
|
||||||
|
"description": null,
|
||||||
"fieldname": "cost_center",
|
"fieldname": "cost_center",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
|
"hidden": null,
|
||||||
|
"ignore_restrictions": null,
|
||||||
|
"in_filter": null,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Cost Center",
|
"label": "Cost Center",
|
||||||
|
"no_column": null,
|
||||||
|
"no_copy": null,
|
||||||
"oldfieldname": "cost_center",
|
"oldfieldname": "cost_center",
|
||||||
"oldfieldtype": "Link",
|
"oldfieldtype": "Link",
|
||||||
"options": "Cost Center",
|
"options": "Cost Center",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"read_only": 0
|
"print_hide": null,
|
||||||
|
"print_width": null,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": null,
|
||||||
|
"reqd": null,
|
||||||
|
"search_index": null,
|
||||||
|
"set_only_once": null,
|
||||||
|
"trigger": null,
|
||||||
|
"width": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": null,
|
||||||
|
"default": null,
|
||||||
|
"depends_on": null,
|
||||||
|
"description": null,
|
||||||
"fieldname": "rate",
|
"fieldname": "rate",
|
||||||
"fieldtype": "Float",
|
"fieldtype": "Float",
|
||||||
|
"hidden": null,
|
||||||
|
"ignore_restrictions": null,
|
||||||
|
"in_filter": null,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Rate",
|
"label": "Rate",
|
||||||
|
"no_column": null,
|
||||||
|
"no_copy": null,
|
||||||
"oldfieldname": "rate",
|
"oldfieldname": "rate",
|
||||||
"oldfieldtype": "Currency",
|
"oldfieldtype": "Currency",
|
||||||
|
"options": null,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print_hide": null,
|
||||||
|
"print_width": null,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"reqd": 0
|
"report_hide": null,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": null,
|
||||||
|
"set_only_once": null,
|
||||||
|
"trigger": null,
|
||||||
|
"width": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": null,
|
||||||
|
"default": null,
|
||||||
|
"depends_on": null,
|
||||||
|
"description": null,
|
||||||
"fieldname": "tax_amount",
|
"fieldname": "tax_amount",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
|
"hidden": null,
|
||||||
|
"ignore_restrictions": null,
|
||||||
|
"in_filter": null,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Amount",
|
"label": "Amount",
|
||||||
|
"no_column": null,
|
||||||
|
"no_copy": null,
|
||||||
"oldfieldname": "tax_amount",
|
"oldfieldname": "tax_amount",
|
||||||
"oldfieldtype": "Currency",
|
"oldfieldtype": "Currency",
|
||||||
"options": "Company:company:default_currency",
|
"options": "Company:company:default_currency",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print_hide": null,
|
||||||
|
"print_width": null,
|
||||||
"read_only": 1,
|
"read_only": 1,
|
||||||
"reqd": 0
|
"report_hide": null,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": null,
|
||||||
|
"set_only_once": null,
|
||||||
|
"trigger": null,
|
||||||
|
"width": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": null,
|
||||||
|
"default": null,
|
||||||
|
"depends_on": null,
|
||||||
|
"description": null,
|
||||||
"fieldname": "total",
|
"fieldname": "total",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
|
"hidden": null,
|
||||||
|
"ignore_restrictions": null,
|
||||||
|
"in_filter": null,
|
||||||
|
"in_list_view": null,
|
||||||
"label": "Total",
|
"label": "Total",
|
||||||
|
"no_column": null,
|
||||||
|
"no_copy": null,
|
||||||
"oldfieldname": "total",
|
"oldfieldname": "total",
|
||||||
"oldfieldtype": "Currency",
|
"oldfieldtype": "Currency",
|
||||||
"options": "Company:company:default_currency",
|
"options": "Company:company:default_currency",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"read_only": 1
|
"print_hide": null,
|
||||||
|
"print_width": null,
|
||||||
|
"read_only": 1,
|
||||||
|
"report_hide": null,
|
||||||
|
"reqd": null,
|
||||||
|
"search_index": null,
|
||||||
|
"set_only_once": null,
|
||||||
|
"trigger": null,
|
||||||
|
"width": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": null,
|
||||||
|
"default": null,
|
||||||
|
"depends_on": null,
|
||||||
|
"description": null,
|
||||||
"fieldname": "item_wise_tax_detail",
|
"fieldname": "item_wise_tax_detail",
|
||||||
"fieldtype": "Small Text",
|
"fieldtype": "Small Text",
|
||||||
"hidden": 1,
|
"hidden": 1,
|
||||||
|
"ignore_restrictions": null,
|
||||||
|
"in_filter": null,
|
||||||
|
"in_list_view": null,
|
||||||
"label": "Item Wise Tax Detail ",
|
"label": "Item Wise Tax Detail ",
|
||||||
|
"no_column": null,
|
||||||
|
"no_copy": null,
|
||||||
"oldfieldname": "item_wise_tax_detail",
|
"oldfieldname": "item_wise_tax_detail",
|
||||||
"oldfieldtype": "Small Text",
|
"oldfieldtype": "Small Text",
|
||||||
|
"options": null,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 1,
|
"print_hide": 1,
|
||||||
"read_only": 1
|
"print_width": null,
|
||||||
|
"read_only": 1,
|
||||||
|
"report_hide": null,
|
||||||
|
"reqd": null,
|
||||||
|
"search_index": null,
|
||||||
|
"set_only_once": null,
|
||||||
|
"trigger": null,
|
||||||
|
"width": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": null,
|
||||||
|
"default": null,
|
||||||
|
"depends_on": null,
|
||||||
|
"description": null,
|
||||||
"fieldname": "parenttype",
|
"fieldname": "parenttype",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"hidden": 1,
|
"hidden": 1,
|
||||||
|
"ignore_restrictions": null,
|
||||||
"in_filter": 1,
|
"in_filter": 1,
|
||||||
|
"in_list_view": null,
|
||||||
"label": "Parenttype",
|
"label": "Parenttype",
|
||||||
|
"no_column": null,
|
||||||
|
"no_copy": null,
|
||||||
"oldfieldname": "parenttype",
|
"oldfieldname": "parenttype",
|
||||||
"oldfieldtype": "Data",
|
"oldfieldtype": "Data",
|
||||||
|
"options": null,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 1,
|
"print_hide": 1,
|
||||||
|
"print_width": null,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"search_index": 0
|
"report_hide": null,
|
||||||
|
"reqd": null,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": null,
|
||||||
|
"trigger": null,
|
||||||
|
"width": null
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"hide_heading": 1,
|
"hide_heading": 1,
|
||||||
|
"hide_toolbar": null,
|
||||||
|
"icon": null,
|
||||||
"idx": 1,
|
"idx": 1,
|
||||||
|
"in_create": null,
|
||||||
|
"in_dialog": null,
|
||||||
|
"is_submittable": null,
|
||||||
|
"is_transaction_doc": null,
|
||||||
|
"issingle": null,
|
||||||
"istable": 1,
|
"istable": 1,
|
||||||
"modified": "2014-02-03 12:36:04.000000",
|
"max_attachments": null,
|
||||||
|
"menu_index": null,
|
||||||
|
"modified": "2014-04-15 09:48:45.892548",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Purchase Taxes and Charges",
|
"name": "Purchase Taxes and Charges",
|
||||||
"owner": "Administrator"
|
"name_case": null,
|
||||||
|
"owner": "Administrator",
|
||||||
|
"parent": null,
|
||||||
|
"parent_node": null,
|
||||||
|
"parentfield": null,
|
||||||
|
"parenttype": null,
|
||||||
|
"permissions": [],
|
||||||
|
"plugin": null,
|
||||||
|
"print_outline": null,
|
||||||
|
"read_only": null,
|
||||||
|
"read_only_onload": null,
|
||||||
|
"search_fields": null,
|
||||||
|
"section_style": null,
|
||||||
|
"server_code": null,
|
||||||
|
"server_code_compiled": null,
|
||||||
|
"server_code_core": null,
|
||||||
|
"server_code_error": null,
|
||||||
|
"show_in_menu": null,
|
||||||
|
"smallicon": null,
|
||||||
|
"subject": null,
|
||||||
|
"tag_fields": null,
|
||||||
|
"title_field": null,
|
||||||
|
"use_template": null,
|
||||||
|
"version": null
|
||||||
}
|
}
|
@ -78,11 +78,11 @@ cur_frm.cscript.add_deduct_tax = function(doc, cdt, cdn) {
|
|||||||
var d = locals[cdt][cdn];
|
var d = locals[cdt][cdn];
|
||||||
|
|
||||||
if(!d.category && d.add_deduct_tax) {
|
if(!d.category && d.add_deduct_tax) {
|
||||||
msgprint(frappe._("Please select Category first"));
|
msgprint(__("Please select Category first"));
|
||||||
d.add_deduct_tax = '';
|
d.add_deduct_tax = '';
|
||||||
}
|
}
|
||||||
else if(d.category != 'Total' && d.add_deduct_tax == 'Deduct') {
|
else if(d.category != 'Total' && d.add_deduct_tax == 'Deduct') {
|
||||||
msgprint(frappe._("You cannot deduct when category is for 'Valuation' or 'Valuation and Total'"));
|
msgprint(__("Cannot deduct when category is for 'Valuation' or 'Valuation and Total'"));
|
||||||
d.add_deduct_tax = '';
|
d.add_deduct_tax = '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -91,15 +91,15 @@ cur_frm.cscript.charge_type = function(doc, cdt, cdn) {
|
|||||||
var d = locals[cdt][cdn];
|
var d = locals[cdt][cdn];
|
||||||
|
|
||||||
if(!d.category && d.charge_type) {
|
if(!d.category && d.charge_type) {
|
||||||
msgprint(frappe._("Please select Category first"));
|
msgprint(__("Please select Category first"));
|
||||||
d.charge_type = '';
|
d.charge_type = '';
|
||||||
}
|
}
|
||||||
else if(d.idx == 1 && (d.charge_type == 'On Previous Row Amount' || d.charge_type == 'On Previous Row Total')) {
|
else if(d.idx == 1 && (d.charge_type == 'On Previous Row Amount' || d.charge_type == 'On Previous Row Total')) {
|
||||||
msgprint(frappe._("You cannot select Charge Type as 'On Previous Row Amount' or 'On Previous Row Total' for first row"));
|
msgprint(__("Cannot select charge type as 'On Previous Row Amount' or 'On Previous Row Total' for first row"));
|
||||||
d.charge_type = '';
|
d.charge_type = '';
|
||||||
}
|
}
|
||||||
else if((d.category == 'Valuation' || d.category == 'Valuation and Total') && (d.charge_type == 'On Previous Row Amount' || d.charge_type == 'On Previous Row Total')) {
|
else if((d.category == 'Valuation' || d.category == 'Valuation and Total') && (d.charge_type == 'On Previous Row Amount' || d.charge_type == 'On Previous Row Total')) {
|
||||||
msgprint(frappe._("You cannot select charge type as 'On Previous Row Amount' or 'On Previous Row Total' for valuation. You can select only 'Total' option for previous row amount or previous row total"));
|
msgprint(__("Cannot select charge type as 'On Previous Row Amount' or 'On Previous Row Total' for valuation. You can select only 'Total' option for previous row amount or previous row total"));
|
||||||
d.charge_type = '';
|
d.charge_type = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -116,16 +116,16 @@ cur_frm.cscript.row_id = function(doc, cdt, cdn) {
|
|||||||
var d = locals[cdt][cdn];
|
var d = locals[cdt][cdn];
|
||||||
|
|
||||||
if(!d.charge_type && d.row_id) {
|
if(!d.charge_type && d.row_id) {
|
||||||
msgprint(frappe._("Please select Charge Type first"));
|
msgprint(__("Please select charge type first"));
|
||||||
d.row_id = '';
|
d.row_id = '';
|
||||||
}
|
}
|
||||||
else if((d.charge_type == 'Actual' || d.charge_type == 'On Net Total') && d.row_id) {
|
else if((d.charge_type == 'Actual' || d.charge_type == 'On Net Total') && d.row_id) {
|
||||||
msgprint(frappe._("You can Enter Row only if your Charge Type is 'On Previous Row Amount' or ' Previous Row Total'"));
|
msgprint(__("Can refer row only if the charge type is 'On Previous Row Amount' or 'Previous Row Total'"));
|
||||||
d.row_id = '';
|
d.row_id = '';
|
||||||
}
|
}
|
||||||
else if((d.charge_type == 'On Previous Row Amount' || d.charge_type == 'On Previous Row Total') && d.row_id) {
|
else if((d.charge_type == 'On Previous Row Amount' || d.charge_type == 'On Previous Row Total') && d.row_id) {
|
||||||
if(d.row_id >= d.idx){
|
if(d.row_id >= d.idx){
|
||||||
msgprint(frappe._("You cannot Enter Row no. greater than or equal to current row no. for this Charge type"));
|
msgprint(__("Cannot refer row number greater than or equal to current row number for this Charge type"));
|
||||||
d.row_id = '';
|
d.row_id = '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -156,7 +156,7 @@ cur_frm.cscript.rate = function(doc, cdt, cdn) {
|
|||||||
var d = locals[cdt][cdn];
|
var d = locals[cdt][cdn];
|
||||||
|
|
||||||
if(!d.charge_type && d.rate) {
|
if(!d.charge_type && d.rate) {
|
||||||
msgprint(frappe._("Please select Charge Type first"));
|
msgprint(__("Please select Charge Type first"));
|
||||||
d.rate = '';
|
d.rate = '';
|
||||||
}
|
}
|
||||||
validated = false;
|
validated = false;
|
||||||
@ -167,11 +167,11 @@ cur_frm.cscript.tax_amount = function(doc, cdt, cdn) {
|
|||||||
var d = locals[cdt][cdn];
|
var d = locals[cdt][cdn];
|
||||||
|
|
||||||
if(!d.charge_type && d.tax_amount) {
|
if(!d.charge_type && d.tax_amount) {
|
||||||
msgprint(frappe._("Please select Charge Type first"));
|
msgprint(__("Please select Charge Type first"));
|
||||||
d.tax_amount = '';
|
d.tax_amount = '';
|
||||||
}
|
}
|
||||||
else if(d.charge_type && d.tax_amount) {
|
else if(d.charge_type && d.tax_amount) {
|
||||||
msgprint(frappe._("You cannot directly enter Amount and if your Charge Type is Actual enter your amount in Rate"));
|
msgprint(__("Cannot directly set amount. For 'Actual' charge type, use the rate field"));
|
||||||
d.tax_amount = '';
|
d.tax_amount = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -274,7 +274,7 @@ erpnext.POS = Class.extend({
|
|||||||
if(!me.frm.doc[me.party.toLowerCase()] && ((me.frm.doctype == "Quotation" &&
|
if(!me.frm.doc[me.party.toLowerCase()] && ((me.frm.doctype == "Quotation" &&
|
||||||
me.frm.doc.quotation_to == "Customer")
|
me.frm.doc.quotation_to == "Customer")
|
||||||
|| me.frm.doctype != "Quotation")) {
|
|| me.frm.doctype != "Quotation")) {
|
||||||
msgprint("Please select " + me.party + " first.");
|
msgprint("Please select {0} first.", [me.party]);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -523,7 +523,7 @@ erpnext.POS = Class.extend({
|
|||||||
me.add_to_cart(r.message[0][0].name);
|
me.add_to_cart(r.message[0][0].name);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
msgprint(frappe._("Invalid Barcode"));
|
msgprint(__("Invalid Barcode"));
|
||||||
|
|
||||||
me.refresh();
|
me.refresh();
|
||||||
}
|
}
|
||||||
@ -564,7 +564,7 @@ erpnext.POS = Class.extend({
|
|||||||
var mode_of_payment = [];
|
var mode_of_payment = [];
|
||||||
|
|
||||||
if (no_of_items == 0)
|
if (no_of_items == 0)
|
||||||
msgprint(frappe._("Payment cannot be made for empty cart"));
|
msgprint(__("Payment cannot be made for empty cart"));
|
||||||
else {
|
else {
|
||||||
frappe.call({
|
frappe.call({
|
||||||
method: 'erpnext.accounts.doctype.sales_invoice.pos.get_mode_of_payment',
|
method: 'erpnext.accounts.doctype.sales_invoice.pos.get_mode_of_payment',
|
||||||
|
@ -63,7 +63,7 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
|
|||||||
var percent_paid = cint(flt(doc.grand_total - doc.outstanding_amount) / flt(doc.grand_total) * 100);
|
var percent_paid = cint(flt(doc.grand_total - doc.outstanding_amount) / flt(doc.grand_total) * 100);
|
||||||
cur_frm.dashboard.add_progress(percent_paid + "% Paid", percent_paid);
|
cur_frm.dashboard.add_progress(percent_paid + "% Paid", percent_paid);
|
||||||
|
|
||||||
cur_frm.appframe.add_button(frappe._('Send SMS'), cur_frm.cscript.send_sms, 'icon-mobile-phone');
|
cur_frm.appframe.add_button(__('Send SMS'), cur_frm.cscript.send_sms, 'icon-mobile-phone');
|
||||||
|
|
||||||
if(cint(doc.update_stock)!=1) {
|
if(cint(doc.update_stock)!=1) {
|
||||||
// show Make Delivery Note button only if Sales Invoice is not created from Delivery Note
|
// show Make Delivery Note button only if Sales Invoice is not created from Delivery Note
|
||||||
@ -74,11 +74,11 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
|
|||||||
});
|
});
|
||||||
|
|
||||||
if(!from_delivery_note)
|
if(!from_delivery_note)
|
||||||
cur_frm.appframe.add_primary_action(frappe._('Make Delivery'), cur_frm.cscript['Make Delivery Note'])
|
cur_frm.appframe.add_primary_action(__('Make Delivery'), cur_frm.cscript['Make Delivery Note'])
|
||||||
}
|
}
|
||||||
|
|
||||||
if(doc.outstanding_amount!=0)
|
if(doc.outstanding_amount!=0)
|
||||||
cur_frm.appframe.add_primary_action(frappe._('Make Payment Entry'), cur_frm.cscript.make_bank_voucher);
|
cur_frm.appframe.add_primary_action(__('Make Payment Entry'), cur_frm.cscript.make_bank_voucher);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Show buttons only when pos view is active
|
// Show buttons only when pos view is active
|
||||||
@ -89,7 +89,7 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
|
|||||||
},
|
},
|
||||||
|
|
||||||
sales_order_btn: function() {
|
sales_order_btn: function() {
|
||||||
this.$sales_order_btn = cur_frm.appframe.add_primary_action(frappe._('From Sales Order'),
|
this.$sales_order_btn = cur_frm.appframe.add_primary_action(__('From Sales Order'),
|
||||||
function() {
|
function() {
|
||||||
frappe.model.map_current_doc({
|
frappe.model.map_current_doc({
|
||||||
method: "erpnext.selling.doctype.sales_order.sales_order.make_sales_invoice",
|
method: "erpnext.selling.doctype.sales_order.sales_order.make_sales_invoice",
|
||||||
@ -106,7 +106,7 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
|
|||||||
},
|
},
|
||||||
|
|
||||||
delivery_note_btn: function() {
|
delivery_note_btn: function() {
|
||||||
this.$delivery_note_btn = cur_frm.appframe.add_primary_action(frappe._('From Delivery Note'),
|
this.$delivery_note_btn = cur_frm.appframe.add_primary_action(__('From Delivery Note'),
|
||||||
function() {
|
function() {
|
||||||
frappe.model.map_current_doc({
|
frappe.model.map_current_doc({
|
||||||
method: "erpnext.stock.doctype.delivery_note.delivery_note.make_sales_invoice",
|
method: "erpnext.stock.doctype.delivery_note.delivery_note.make_sales_invoice",
|
||||||
@ -134,7 +134,7 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
|
|||||||
if(cint(this.frm.doc.is_pos)) {
|
if(cint(this.frm.doc.is_pos)) {
|
||||||
if(!this.frm.doc.company) {
|
if(!this.frm.doc.company) {
|
||||||
this.frm.set_value("is_pos", 0);
|
this.frm.set_value("is_pos", 0);
|
||||||
msgprint(frappe._("Please specify Company to proceed"));
|
msgprint(__("Please specify Company to proceed"));
|
||||||
} else {
|
} else {
|
||||||
var me = this;
|
var me = this;
|
||||||
return this.frm.call({
|
return this.frm.call({
|
||||||
|
@ -1,153 +1,431 @@
|
|||||||
{
|
{
|
||||||
|
"_last_update": null,
|
||||||
|
"_user_tags": null,
|
||||||
|
"allow_attach": null,
|
||||||
|
"allow_copy": null,
|
||||||
|
"allow_email": null,
|
||||||
|
"allow_import": null,
|
||||||
|
"allow_print": null,
|
||||||
|
"allow_rename": null,
|
||||||
|
"allow_trash": null,
|
||||||
"autoname": "INVTD.######",
|
"autoname": "INVTD.######",
|
||||||
"creation": "2013-04-24 11:39:32.000000",
|
"change_log": null,
|
||||||
|
"client_script": null,
|
||||||
|
"client_script_core": null,
|
||||||
|
"client_string": null,
|
||||||
|
"colour": null,
|
||||||
|
"creation": "2013-04-24 11:39:32",
|
||||||
|
"custom": null,
|
||||||
|
"default_print_format": null,
|
||||||
|
"description": null,
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"doctype": "DocType",
|
"doctype": "DocType",
|
||||||
|
"document_type": null,
|
||||||
|
"dt_template": null,
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": null,
|
||||||
|
"default": null,
|
||||||
|
"depends_on": null,
|
||||||
|
"description": null,
|
||||||
"fieldname": "charge_type",
|
"fieldname": "charge_type",
|
||||||
"fieldtype": "Select",
|
"fieldtype": "Select",
|
||||||
|
"hidden": null,
|
||||||
|
"ignore_restrictions": null,
|
||||||
|
"in_filter": null,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Type",
|
"label": "Type",
|
||||||
|
"no_column": null,
|
||||||
|
"no_copy": null,
|
||||||
"oldfieldname": "charge_type",
|
"oldfieldname": "charge_type",
|
||||||
"oldfieldtype": "Select",
|
"oldfieldtype": "Select",
|
||||||
"options": "\nActual\nOn Net Total\nOn Previous Row Amount\nOn Previous Row Total",
|
"options": "\nActual\nOn Net Total\nOn Previous Row Amount\nOn Previous Row Total",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"reqd": 1
|
"print_hide": null,
|
||||||
|
"print_width": null,
|
||||||
|
"read_only": null,
|
||||||
|
"report_hide": null,
|
||||||
|
"reqd": 1,
|
||||||
|
"search_index": null,
|
||||||
|
"set_only_once": null,
|
||||||
|
"trigger": null,
|
||||||
|
"width": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": null,
|
||||||
|
"default": null,
|
||||||
|
"depends_on": "eval:[\"On Previous Row Amount\", \"On Previous Row Total\"].indexOf(doc.charge_type)!==-1",
|
||||||
|
"description": null,
|
||||||
"fieldname": "row_id",
|
"fieldname": "row_id",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"label": "Enter Row",
|
"ignore_restrictions": null,
|
||||||
|
"in_filter": null,
|
||||||
|
"in_list_view": null,
|
||||||
|
"label": "Reference Row #",
|
||||||
|
"no_column": null,
|
||||||
|
"no_copy": null,
|
||||||
"oldfieldname": "row_id",
|
"oldfieldname": "row_id",
|
||||||
"oldfieldtype": "Data",
|
"oldfieldtype": "Data",
|
||||||
"permlevel": 0
|
"options": null,
|
||||||
|
"permlevel": 0,
|
||||||
|
"print_hide": null,
|
||||||
|
"print_width": null,
|
||||||
|
"read_only": null,
|
||||||
|
"report_hide": null,
|
||||||
|
"reqd": null,
|
||||||
|
"search_index": null,
|
||||||
|
"set_only_once": null,
|
||||||
|
"trigger": null,
|
||||||
|
"width": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": null,
|
||||||
|
"default": null,
|
||||||
|
"depends_on": null,
|
||||||
|
"description": null,
|
||||||
"fieldname": "description",
|
"fieldname": "description",
|
||||||
"fieldtype": "Small Text",
|
"fieldtype": "Small Text",
|
||||||
|
"hidden": null,
|
||||||
|
"ignore_restrictions": null,
|
||||||
|
"in_filter": null,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Description",
|
"label": "Description",
|
||||||
|
"no_column": null,
|
||||||
|
"no_copy": null,
|
||||||
"oldfieldname": "description",
|
"oldfieldname": "description",
|
||||||
"oldfieldtype": "Small Text",
|
"oldfieldtype": "Small Text",
|
||||||
|
"options": null,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print_hide": null,
|
||||||
"print_width": "300px",
|
"print_width": "300px",
|
||||||
|
"read_only": null,
|
||||||
|
"report_hide": null,
|
||||||
"reqd": 1,
|
"reqd": 1,
|
||||||
|
"search_index": null,
|
||||||
|
"set_only_once": null,
|
||||||
|
"trigger": null,
|
||||||
"width": "300px"
|
"width": "300px"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": null,
|
||||||
|
"default": null,
|
||||||
|
"depends_on": null,
|
||||||
|
"description": null,
|
||||||
"fieldname": "col_break_1",
|
"fieldname": "col_break_1",
|
||||||
"fieldtype": "Column Break",
|
"fieldtype": "Column Break",
|
||||||
|
"hidden": null,
|
||||||
|
"ignore_restrictions": null,
|
||||||
|
"in_filter": null,
|
||||||
|
"in_list_view": null,
|
||||||
|
"label": null,
|
||||||
|
"no_column": null,
|
||||||
|
"no_copy": null,
|
||||||
|
"oldfieldname": null,
|
||||||
|
"oldfieldtype": null,
|
||||||
|
"options": null,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print_hide": null,
|
||||||
|
"print_width": null,
|
||||||
|
"read_only": null,
|
||||||
|
"report_hide": null,
|
||||||
|
"reqd": null,
|
||||||
|
"search_index": null,
|
||||||
|
"set_only_once": null,
|
||||||
|
"trigger": null,
|
||||||
"width": "50%"
|
"width": "50%"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": null,
|
||||||
|
"default": null,
|
||||||
|
"depends_on": null,
|
||||||
|
"description": null,
|
||||||
"fieldname": "account_head",
|
"fieldname": "account_head",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
|
"hidden": null,
|
||||||
|
"ignore_restrictions": null,
|
||||||
|
"in_filter": null,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Account Head",
|
"label": "Account Head",
|
||||||
|
"no_column": null,
|
||||||
|
"no_copy": null,
|
||||||
"oldfieldname": "account_head",
|
"oldfieldname": "account_head",
|
||||||
"oldfieldtype": "Link",
|
"oldfieldtype": "Link",
|
||||||
"options": "Account",
|
"options": "Account",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print_hide": null,
|
||||||
|
"print_width": null,
|
||||||
|
"read_only": null,
|
||||||
|
"report_hide": null,
|
||||||
"reqd": 1,
|
"reqd": 1,
|
||||||
"search_index": 1
|
"search_index": 1,
|
||||||
|
"set_only_once": null,
|
||||||
|
"trigger": null,
|
||||||
|
"width": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": null,
|
||||||
"default": ":Company",
|
"default": ":Company",
|
||||||
|
"depends_on": null,
|
||||||
|
"description": null,
|
||||||
"fieldname": "cost_center",
|
"fieldname": "cost_center",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
|
"hidden": null,
|
||||||
|
"ignore_restrictions": null,
|
||||||
|
"in_filter": null,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Cost Center",
|
"label": "Cost Center",
|
||||||
|
"no_column": null,
|
||||||
|
"no_copy": null,
|
||||||
"oldfieldname": "cost_center_other_charges",
|
"oldfieldname": "cost_center_other_charges",
|
||||||
"oldfieldtype": "Link",
|
"oldfieldtype": "Link",
|
||||||
"options": "Cost Center",
|
"options": "Cost Center",
|
||||||
"permlevel": 0
|
"permlevel": 0,
|
||||||
|
"print_hide": null,
|
||||||
|
"print_width": null,
|
||||||
|
"read_only": null,
|
||||||
|
"report_hide": null,
|
||||||
|
"reqd": null,
|
||||||
|
"search_index": null,
|
||||||
|
"set_only_once": null,
|
||||||
|
"trigger": null,
|
||||||
|
"width": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": null,
|
||||||
|
"default": null,
|
||||||
|
"depends_on": null,
|
||||||
|
"description": null,
|
||||||
"fieldname": "rate",
|
"fieldname": "rate",
|
||||||
"fieldtype": "Float",
|
"fieldtype": "Float",
|
||||||
|
"hidden": null,
|
||||||
|
"ignore_restrictions": null,
|
||||||
|
"in_filter": null,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Rate",
|
"label": "Rate",
|
||||||
|
"no_column": null,
|
||||||
|
"no_copy": null,
|
||||||
"oldfieldname": "rate",
|
"oldfieldname": "rate",
|
||||||
"oldfieldtype": "Currency",
|
"oldfieldtype": "Currency",
|
||||||
|
"options": null,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"reqd": 1
|
"print_hide": null,
|
||||||
|
"print_width": null,
|
||||||
|
"read_only": null,
|
||||||
|
"report_hide": null,
|
||||||
|
"reqd": 1,
|
||||||
|
"search_index": null,
|
||||||
|
"set_only_once": null,
|
||||||
|
"trigger": null,
|
||||||
|
"width": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": null,
|
||||||
|
"default": null,
|
||||||
|
"depends_on": null,
|
||||||
|
"description": null,
|
||||||
"fieldname": "tax_amount",
|
"fieldname": "tax_amount",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
|
"hidden": null,
|
||||||
|
"ignore_restrictions": null,
|
||||||
|
"in_filter": null,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Amount",
|
"label": "Amount",
|
||||||
|
"no_column": null,
|
||||||
|
"no_copy": null,
|
||||||
"oldfieldname": "tax_amount",
|
"oldfieldname": "tax_amount",
|
||||||
"oldfieldtype": "Currency",
|
"oldfieldtype": "Currency",
|
||||||
"options": "Company:company:default_currency",
|
"options": "Company:company:default_currency",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print_hide": null,
|
||||||
|
"print_width": null,
|
||||||
"read_only": 1,
|
"read_only": 1,
|
||||||
"reqd": 0
|
"report_hide": null,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": null,
|
||||||
|
"set_only_once": null,
|
||||||
|
"trigger": null,
|
||||||
|
"width": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": null,
|
||||||
|
"default": null,
|
||||||
|
"depends_on": null,
|
||||||
|
"description": null,
|
||||||
"fieldname": "total",
|
"fieldname": "total",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
|
"hidden": null,
|
||||||
|
"ignore_restrictions": null,
|
||||||
|
"in_filter": null,
|
||||||
|
"in_list_view": null,
|
||||||
"label": "Total",
|
"label": "Total",
|
||||||
|
"no_column": null,
|
||||||
|
"no_copy": null,
|
||||||
"oldfieldname": "total",
|
"oldfieldname": "total",
|
||||||
"oldfieldtype": "Currency",
|
"oldfieldtype": "Currency",
|
||||||
"options": "Company:company:default_currency",
|
"options": "Company:company:default_currency",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"read_only": 1
|
"print_hide": null,
|
||||||
|
"print_width": null,
|
||||||
|
"read_only": 1,
|
||||||
|
"report_hide": null,
|
||||||
|
"reqd": null,
|
||||||
|
"search_index": null,
|
||||||
|
"set_only_once": null,
|
||||||
|
"trigger": null,
|
||||||
|
"width": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"default": null,
|
||||||
|
"depends_on": null,
|
||||||
"description": "If checked, the tax amount will be considered as already included in the Print Rate / Print Amount",
|
"description": "If checked, the tax amount will be considered as already included in the Print Rate / Print Amount",
|
||||||
"fieldname": "included_in_print_rate",
|
"fieldname": "included_in_print_rate",
|
||||||
"fieldtype": "Check",
|
"fieldtype": "Check",
|
||||||
|
"hidden": null,
|
||||||
|
"ignore_restrictions": null,
|
||||||
|
"in_filter": null,
|
||||||
|
"in_list_view": null,
|
||||||
"label": "Is this Tax included in Basic Rate?",
|
"label": "Is this Tax included in Basic Rate?",
|
||||||
|
"no_column": null,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
|
"oldfieldname": null,
|
||||||
|
"oldfieldtype": null,
|
||||||
|
"options": null,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 1,
|
"print_hide": 1,
|
||||||
"print_width": "150px",
|
"print_width": "150px",
|
||||||
|
"read_only": null,
|
||||||
"report_hide": 1,
|
"report_hide": 1,
|
||||||
|
"reqd": null,
|
||||||
|
"search_index": null,
|
||||||
|
"set_only_once": null,
|
||||||
|
"trigger": null,
|
||||||
"width": "150px"
|
"width": "150px"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": null,
|
||||||
|
"default": null,
|
||||||
|
"depends_on": null,
|
||||||
|
"description": null,
|
||||||
"fieldname": "tax_amount_after_discount_amount",
|
"fieldname": "tax_amount_after_discount_amount",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
"hidden": 1,
|
"hidden": 1,
|
||||||
|
"ignore_restrictions": null,
|
||||||
|
"in_filter": null,
|
||||||
|
"in_list_view": null,
|
||||||
"label": "Tax Amount After Discount Amount",
|
"label": "Tax Amount After Discount Amount",
|
||||||
|
"no_column": null,
|
||||||
|
"no_copy": null,
|
||||||
|
"oldfieldname": null,
|
||||||
|
"oldfieldtype": null,
|
||||||
"options": "Company:company:default_currency",
|
"options": "Company:company:default_currency",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"read_only": 1
|
"print_hide": null,
|
||||||
|
"print_width": null,
|
||||||
|
"read_only": 1,
|
||||||
|
"report_hide": null,
|
||||||
|
"reqd": null,
|
||||||
|
"search_index": null,
|
||||||
|
"set_only_once": null,
|
||||||
|
"trigger": null,
|
||||||
|
"width": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": null,
|
||||||
|
"default": null,
|
||||||
|
"depends_on": null,
|
||||||
|
"description": null,
|
||||||
"fieldname": "item_wise_tax_detail",
|
"fieldname": "item_wise_tax_detail",
|
||||||
"fieldtype": "Small Text",
|
"fieldtype": "Small Text",
|
||||||
"hidden": 1,
|
"hidden": 1,
|
||||||
|
"ignore_restrictions": null,
|
||||||
|
"in_filter": null,
|
||||||
|
"in_list_view": null,
|
||||||
"label": "Item Wise Tax Detail",
|
"label": "Item Wise Tax Detail",
|
||||||
|
"no_column": null,
|
||||||
|
"no_copy": null,
|
||||||
"oldfieldname": "item_wise_tax_detail",
|
"oldfieldname": "item_wise_tax_detail",
|
||||||
"oldfieldtype": "Small Text",
|
"oldfieldtype": "Small Text",
|
||||||
|
"options": null,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"read_only": 1
|
"print_hide": null,
|
||||||
|
"print_width": null,
|
||||||
|
"read_only": 1,
|
||||||
|
"report_hide": null,
|
||||||
|
"reqd": null,
|
||||||
|
"search_index": null,
|
||||||
|
"set_only_once": null,
|
||||||
|
"trigger": null,
|
||||||
|
"width": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": null,
|
||||||
|
"default": null,
|
||||||
|
"depends_on": null,
|
||||||
|
"description": null,
|
||||||
"fieldname": "parenttype",
|
"fieldname": "parenttype",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"hidden": 1,
|
"hidden": 1,
|
||||||
|
"ignore_restrictions": null,
|
||||||
"in_filter": 1,
|
"in_filter": 1,
|
||||||
|
"in_list_view": null,
|
||||||
"label": "Parenttype",
|
"label": "Parenttype",
|
||||||
|
"no_column": null,
|
||||||
|
"no_copy": null,
|
||||||
"oldfieldname": "parenttype",
|
"oldfieldname": "parenttype",
|
||||||
"oldfieldtype": "Data",
|
"oldfieldtype": "Data",
|
||||||
|
"options": null,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 1,
|
"print_hide": 1,
|
||||||
"search_index": 1
|
"print_width": null,
|
||||||
|
"read_only": null,
|
||||||
|
"report_hide": null,
|
||||||
|
"reqd": null,
|
||||||
|
"search_index": 1,
|
||||||
|
"set_only_once": null,
|
||||||
|
"trigger": null,
|
||||||
|
"width": null
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"hide_heading": 1,
|
"hide_heading": 1,
|
||||||
|
"hide_toolbar": null,
|
||||||
|
"icon": null,
|
||||||
"idx": 1,
|
"idx": 1,
|
||||||
|
"in_create": null,
|
||||||
|
"in_dialog": null,
|
||||||
|
"is_submittable": null,
|
||||||
|
"is_transaction_doc": null,
|
||||||
|
"issingle": null,
|
||||||
"istable": 1,
|
"istable": 1,
|
||||||
"modified": "2014-01-03 15:04:25.000000",
|
"max_attachments": null,
|
||||||
|
"menu_index": null,
|
||||||
|
"modified": "2014-04-14 18:40:48.450796",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Sales Taxes and Charges",
|
"name": "Sales Taxes and Charges",
|
||||||
"owner": "Administrator"
|
"name_case": null,
|
||||||
|
"owner": "Administrator",
|
||||||
|
"parent": null,
|
||||||
|
"parent_node": null,
|
||||||
|
"parentfield": null,
|
||||||
|
"parenttype": null,
|
||||||
|
"permissions": [],
|
||||||
|
"plugin": null,
|
||||||
|
"print_outline": null,
|
||||||
|
"read_only": null,
|
||||||
|
"read_only_onload": null,
|
||||||
|
"search_fields": null,
|
||||||
|
"section_style": null,
|
||||||
|
"server_code": null,
|
||||||
|
"server_code_compiled": null,
|
||||||
|
"server_code_core": null,
|
||||||
|
"server_code_error": null,
|
||||||
|
"show_in_menu": null,
|
||||||
|
"smallicon": null,
|
||||||
|
"subject": null,
|
||||||
|
"tag_fields": null,
|
||||||
|
"title_field": null,
|
||||||
|
"use_template": null,
|
||||||
|
"version": null
|
||||||
}
|
}
|
@ -100,7 +100,7 @@ cur_frm.pformat.other_charges= function(doc){
|
|||||||
cur_frm.cscript.charge_type = function(doc, cdt, cdn) {
|
cur_frm.cscript.charge_type = function(doc, cdt, cdn) {
|
||||||
var d = locals[cdt][cdn];
|
var d = locals[cdt][cdn];
|
||||||
if(d.idx == 1 && (d.charge_type == 'On Previous Row Amount' || d.charge_type == 'On Previous Row Total')) {
|
if(d.idx == 1 && (d.charge_type == 'On Previous Row Amount' || d.charge_type == 'On Previous Row Total')) {
|
||||||
msgprint(frappe._("You cannot select Charge Type as 'On Previous Row Amount' or 'On Previous Row Total' for first row"));
|
msgprint(__("Cannot select charge type as 'On Previous Row Amount' or 'On Previous Row Total' for first row"));
|
||||||
d.charge_type = '';
|
d.charge_type = '';
|
||||||
}
|
}
|
||||||
validated = false;
|
validated = false;
|
||||||
@ -113,16 +113,16 @@ cur_frm.cscript.charge_type = function(doc, cdt, cdn) {
|
|||||||
cur_frm.cscript.row_id = function(doc, cdt, cdn) {
|
cur_frm.cscript.row_id = function(doc, cdt, cdn) {
|
||||||
var d = locals[cdt][cdn];
|
var d = locals[cdt][cdn];
|
||||||
if(!d.charge_type && d.row_id) {
|
if(!d.charge_type && d.row_id) {
|
||||||
msgprint(frappe._("Please select Charge Type first"));
|
msgprint(__("Please select Charge Type first"));
|
||||||
d.row_id = '';
|
d.row_id = '';
|
||||||
}
|
}
|
||||||
else if((d.charge_type == 'Actual' || d.charge_type == 'On Net Total') && d.row_id) {
|
else if((d.charge_type == 'Actual' || d.charge_type == 'On Net Total') && d.row_id) {
|
||||||
msgprint(frappe._("You can Enter Row only if your Charge Type is 'On Previous Row Amount' or ' Previous Row Total'"));
|
msgprint(__("Can refer row only if the charge type is 'On Previous Row Amount' or 'Previous Row Total'"));
|
||||||
d.row_id = '';
|
d.row_id = '';
|
||||||
}
|
}
|
||||||
else if((d.charge_type == 'On Previous Row Amount' || d.charge_type == 'On Previous Row Total') && d.row_id) {
|
else if((d.charge_type == 'On Previous Row Amount' || d.charge_type == 'On Previous Row Total') && d.row_id) {
|
||||||
if(d.row_id >= d.idx){
|
if(d.row_id >= d.idx){
|
||||||
msgprint(frappe._("You cannot Enter Row no. greater than or equal to current row no. for this Charge type"));
|
msgprint(__("Cannot refer row number greater than or equal to current row number for this Charge type"));
|
||||||
d.row_id = '';
|
d.row_id = '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -152,7 +152,7 @@ cur_frm.fields_dict['other_charges'].grid.get_field("cost_center").get_query = f
|
|||||||
cur_frm.cscript.rate = function(doc, cdt, cdn) {
|
cur_frm.cscript.rate = function(doc, cdt, cdn) {
|
||||||
var d = locals[cdt][cdn];
|
var d = locals[cdt][cdn];
|
||||||
if(!d.charge_type && d.rate) {
|
if(!d.charge_type && d.rate) {
|
||||||
msgprint(frappe._("Please select Charge Type first"));
|
msgprint(__("Please select Charge Type first"));
|
||||||
d.rate = '';
|
d.rate = '';
|
||||||
}
|
}
|
||||||
validated = false;
|
validated = false;
|
||||||
@ -162,11 +162,11 @@ cur_frm.cscript.rate = function(doc, cdt, cdn) {
|
|||||||
cur_frm.cscript.tax_amount = function(doc, cdt, cdn) {
|
cur_frm.cscript.tax_amount = function(doc, cdt, cdn) {
|
||||||
var d = locals[cdt][cdn];
|
var d = locals[cdt][cdn];
|
||||||
if(!d.charge_type && d.tax_amount) {
|
if(!d.charge_type && d.tax_amount) {
|
||||||
msgprint(frappe._("Please select Charge Type first"));
|
msgprint(__("Please select Charge Type first"));
|
||||||
d.tax_amount = '';
|
d.tax_amount = '';
|
||||||
}
|
}
|
||||||
else if(d.charge_type && d.tax_amount) {
|
else if(d.charge_type && d.tax_amount) {
|
||||||
msgprint(frappe._("You cannot directly enter Amount and if your Charge Type is Actual enter your amount in Rate"));
|
msgprint(__("Cannot directly set amount. For 'Actual' charge type, use the rate field"));
|
||||||
d.tax_amount = '';
|
d.tax_amount = '';
|
||||||
}
|
}
|
||||||
validated = false;
|
validated = false;
|
||||||
|
@ -20,30 +20,28 @@ pscript['onload_Accounts Browser'] = function(wrapper){
|
|||||||
.css({"margin-bottom": "15px", "min-height": "200px"})
|
.css({"margin-bottom": "15px", "min-height": "200px"})
|
||||||
.appendTo(main),
|
.appendTo(main),
|
||||||
help_area = $('<div class="well">'+
|
help_area = $('<div class="well">'+
|
||||||
'<h4>'+frappe._('Quick Help')+'</h4>'+
|
'<h4>'+__('Quick Help')+'</h4>'+
|
||||||
'<ol>'+
|
'<ol>'+
|
||||||
'<li>'+frappe._('To add child nodes, explore tree and click on the node under which you want to add more nodes.')+'</li>'+
|
'<li>'+__('To add child nodes, explore tree and click on the node under which you want to add more nodes.')+'</li>'+
|
||||||
'<li>'+
|
'<li>'+
|
||||||
frappe._('Accounting Entries can be made against leaf nodes, called')+
|
__('Accounting Entries can be made against leaf nodes, called')+
|
||||||
'<b>' +frappe._('Ledgers')+'</b>.'+ frappe._('Entries against') +
|
'<b>' +__('Ledgers')+'</b>.'+ __('Entries against') +
|
||||||
'<b>' +frappe._('Groups') + '</b>'+ frappe._('are not allowed.')+
|
'<b>' +__('Groups') + '</b>'+ __('are not allowed.')+
|
||||||
'</li>'+
|
'</li>'+
|
||||||
'<li>'+frappe._('Please do NOT create Account (Ledgers) for Customers and Suppliers. They are created directly from the Customer / Supplier masters.')+'</li>'+
|
'<li>'+__('Please do NOT create Account (Ledgers) for Customers and Suppliers. They are created directly from the Customer / Supplier masters.')+'</li>'+
|
||||||
'<li>'+
|
'<li>'+
|
||||||
'<b>'+frappe._('To create a Bank Account:')+'</b>'+
|
'<b>'+__('To create a Bank Account:')+'</b>'+
|
||||||
frappe._('Go to the appropriate group (usually Application of Funds > Current Assets > Bank Accounts)')+
|
__('Go to the appropriate group (usually Application of Funds > Current Assets > Bank Accounts and create a new Account Ledger (by clicking on Add Child) of type "Bank"')+
|
||||||
frappe._('and create a new Account Ledger (by clicking on Add Child) of type "Bank"')+
|
|
||||||
'</li>'+
|
'</li>'+
|
||||||
'<li>'+
|
'<li>'+
|
||||||
'<b>'+frappe._('To create a Tax Account:')+'</b>'+
|
'<b>'+__('To create a Tax Account:')+'</b>'+
|
||||||
frappe._('Go to the appropriate group (usually Source of Funds > Current Liabilities > Taxes and Duties)')+
|
__('Go to the appropriate group (usually Source of Funds > Current Liabilities > Taxes and Duties and create a new Account Ledger (by clicking on Add Child) of type "Tax" and do mention the Tax rate.')+
|
||||||
frappe._('and create a new Account Ledger (by clicking on Add Child) of type "Tax" and do mention the Tax rate.')+
|
|
||||||
'</li>'+
|
'</li>'+
|
||||||
'</ol>'+
|
'</ol>'+
|
||||||
'<p>'+frappe._('Please setup your chart of accounts before you start Accounting Entries')+'</p></div>').appendTo(main);
|
'<p>'+__('Please setup your chart of accounts before you start Accounting Entries')+'</p></div>').appendTo(main);
|
||||||
|
|
||||||
if (frappe.boot.user.can_create.indexOf("Company") !== -1) {
|
if (frappe.boot.user.can_create.indexOf("Company") !== -1) {
|
||||||
wrapper.appframe.add_button(frappe._('New Company'), function() { newdoc('Company'); },
|
wrapper.appframe.add_button(__('New Company'), function() { newdoc('Company'); },
|
||||||
'icon-plus');
|
'icon-plus');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -184,21 +182,19 @@ erpnext.AccountsChart = Class.extend({
|
|||||||
|
|
||||||
// the dialog
|
// the dialog
|
||||||
var d = new frappe.ui.Dialog({
|
var d = new frappe.ui.Dialog({
|
||||||
title:frappe._('New Account'),
|
title:__('New Account'),
|
||||||
fields: [
|
fields: [
|
||||||
{fieldtype:'Data', fieldname:'account_name', label:frappe._('New Account Name'), reqd:true,
|
{fieldtype:'Data', fieldname:'account_name', label:__('New Account Name'), reqd:true,
|
||||||
description: frappe._("Name of new Account. Note: Please don't create accounts for Customers and Suppliers,")+
|
description: __("Name of new Account. Note: Please don't create accounts for Customers and Suppliers, they are created automatically from the Customer and Supplier master")},
|
||||||
frappe._("they are created automatically from the Customer and Supplier master")},
|
{fieldtype:'Select', fieldname:'group_or_ledger', label:__('Group or Ledger'),
|
||||||
{fieldtype:'Select', fieldname:'group_or_ledger', label:frappe._('Group or Ledger'),
|
options:'Group\nLedger', description: __('Further accounts can be made under Groups, but entries can be made against Ledger')},
|
||||||
options:'Group\nLedger', description: frappe._('Further accounts can be made under Groups,')+
|
{fieldtype:'Select', fieldname:'account_type', label:__('Account Type'),
|
||||||
frappe._('but entries can be made against Ledger')},
|
|
||||||
{fieldtype:'Select', fieldname:'account_type', label:frappe._('Account Type'),
|
|
||||||
options: ['', 'Bank', 'Cash', 'Warehouse', 'Receivable', 'Payable',
|
options: ['', 'Bank', 'Cash', 'Warehouse', 'Receivable', 'Payable',
|
||||||
'Equity', 'Cost of Goods Sold', 'Fixed Asset', 'Expense Account',
|
'Equity', 'Cost of Goods Sold', 'Fixed Asset', 'Expense Account',
|
||||||
'Income Account', 'Tax', 'Chargeable'].join('\n'),
|
'Income Account', 'Tax', 'Chargeable'].join('\n'),
|
||||||
description: frappe._("Optional. This setting will be used to filter in various transactions.") },
|
description: __("Optional. This setting will be used to filter in various transactions.") },
|
||||||
{fieldtype:'Float', fieldname:'tax_rate', label:frappe._('Tax Rate')},
|
{fieldtype:'Float', fieldname:'tax_rate', label:__('Tax Rate')},
|
||||||
{fieldtype:'Button', fieldname:'create_new', label:frappe._('Create New') }
|
{fieldtype:'Button', fieldname:'create_new', label:__('Create New') }
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -261,13 +257,12 @@ erpnext.AccountsChart = Class.extend({
|
|||||||
var me = this;
|
var me = this;
|
||||||
// the dialog
|
// the dialog
|
||||||
var d = new frappe.ui.Dialog({
|
var d = new frappe.ui.Dialog({
|
||||||
title:frappe._('New Cost Center'),
|
title:__('New Cost Center'),
|
||||||
fields: [
|
fields: [
|
||||||
{fieldtype:'Data', fieldname:'cost_center_name', label:frappe._('New Cost Center Name'), reqd:true},
|
{fieldtype:'Data', fieldname:'cost_center_name', label:__('New Cost Center Name'), reqd:true},
|
||||||
{fieldtype:'Select', fieldname:'group_or_ledger', label:frappe._('Group or Ledger'),
|
{fieldtype:'Select', fieldname:'group_or_ledger', label:__('Group or Ledger'),
|
||||||
options:'Group\nLedger', description:frappe._('Further accounts can be made under Groups,')+
|
options:'Group\nLedger', description:__('Further accounts can be made under Groups but entries can be made against Ledger')},
|
||||||
frappe._('but entries can be made against Ledger')},
|
{fieldtype:'Button', fieldname:'create_new', label:__('Create New') }
|
||||||
{fieldtype:'Button', fieldname:'create_new', label:frappe._('Create New') }
|
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ frappe.require("assets/erpnext/js/account_tree_grid.js");
|
|||||||
frappe.pages['financial-analytics'].onload = function(wrapper) {
|
frappe.pages['financial-analytics'].onload = function(wrapper) {
|
||||||
frappe.ui.make_app_page({
|
frappe.ui.make_app_page({
|
||||||
parent: wrapper,
|
parent: wrapper,
|
||||||
title: frappe._('Financial Analytics'),
|
title: __('Financial Analytics'),
|
||||||
single_column: true
|
single_column: true
|
||||||
});
|
});
|
||||||
erpnext.trial_balance = new erpnext.FinancialAnalytics(wrapper, 'Financial Analytics');
|
erpnext.trial_balance = new erpnext.FinancialAnalytics(wrapper, 'Financial Analytics');
|
||||||
@ -17,7 +17,7 @@ frappe.pages['financial-analytics'].onload = function(wrapper) {
|
|||||||
erpnext.FinancialAnalytics = erpnext.AccountTreeGrid.extend({
|
erpnext.FinancialAnalytics = erpnext.AccountTreeGrid.extend({
|
||||||
filters: [
|
filters: [
|
||||||
{
|
{
|
||||||
fieldtype:"Select", label: frappe._("PL or BS"),
|
fieldtype:"Select", label: __("PL or BS"),
|
||||||
options:["Profit and Loss", "Balance Sheet"],
|
options:["Profit and Loss", "Balance Sheet"],
|
||||||
filter: function(val, item, opts, me) {
|
filter: function(val, item, opts, me) {
|
||||||
if(item._show) return true;
|
if(item._show) return true;
|
||||||
@ -31,31 +31,31 @@ erpnext.FinancialAnalytics = erpnext.AccountTreeGrid.extend({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
fieldtype:"Select", label: frappe._("Company"),
|
fieldtype:"Select", label: __("Company"),
|
||||||
link:"Company", default_value: "Select Company...",
|
link:"Company", default_value: "Select Company...",
|
||||||
filter: function(val, item, opts) {
|
filter: function(val, item, opts) {
|
||||||
return item.company == val || val == opts.default_value || item._show;
|
return item.company == val || val == opts.default_value || item._show;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{fieldtype:"Select", label: frappe._("Fiscal Year"), link:"Fiscal Year",
|
{fieldtype:"Select", label: __("Fiscal Year"), link:"Fiscal Year",
|
||||||
default_value: "Select Fiscal Year..."},
|
default_value: "Select Fiscal Year..."},
|
||||||
{fieldtype:"Date", label: frappe._("From Date")},
|
{fieldtype:"Date", label: __("From Date")},
|
||||||
{fieldtype:"Label", label: frappe._("To")},
|
{fieldtype:"Label", label: __("To")},
|
||||||
{fieldtype:"Date", label: frappe._("To Date")},
|
{fieldtype:"Date", label: __("To Date")},
|
||||||
{fieldtype:"Select", label: frappe._("Range"),
|
{fieldtype:"Select", label: __("Range"),
|
||||||
options:["Daily", "Weekly", "Monthly", "Quarterly", "Yearly"]},
|
options:["Daily", "Weekly", "Monthly", "Quarterly", "Yearly"]},
|
||||||
{fieldtype:"Button", label: frappe._("Refresh"), icon:"icon-refresh icon-white"},
|
{fieldtype:"Button", label: __("Refresh"), icon:"icon-refresh icon-white"},
|
||||||
{fieldtype:"Button", label: frappe._("Reset Filters")}
|
{fieldtype:"Button", label: __("Reset Filters")}
|
||||||
],
|
],
|
||||||
setup_columns: function() {
|
setup_columns: function() {
|
||||||
var std_columns = [
|
var std_columns = [
|
||||||
{id: "check", name: frappe._("Plot"), field: "check", width: 30,
|
{id: "check", name: __("Plot"), field: "check", width: 30,
|
||||||
formatter: this.check_formatter},
|
formatter: this.check_formatter},
|
||||||
{id: "name", name: frappe._("Account"), field: "name", width: 300,
|
{id: "name", name: __("Account"), field: "name", width: 300,
|
||||||
formatter: this.tree_formatter},
|
formatter: this.tree_formatter},
|
||||||
{id: "opening_dr", name: frappe._("Opening (Dr)"), field: "opening_dr",
|
{id: "opening_dr", name: __("Opening (Dr)"), field: "opening_dr",
|
||||||
hidden: true, formatter: this.currency_formatter, balance_type: "Dr"},
|
hidden: true, formatter: this.currency_formatter, balance_type: "Dr"},
|
||||||
{id: "opening_cr", name: frappe._("Opening (Cr)"), field: "opening_cr",
|
{id: "opening_cr", name: __("Opening (Cr)"), field: "opening_cr",
|
||||||
hidden: true, formatter: this.currency_formatter, balance_type: "Cr"},
|
hidden: true, formatter: this.currency_formatter, balance_type: "Cr"},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ frappe.require("assets/erpnext/js/account_tree_grid.js");
|
|||||||
frappe.pages['trial-balance'].onload = function(wrapper) {
|
frappe.pages['trial-balance'].onload = function(wrapper) {
|
||||||
frappe.ui.make_app_page({
|
frappe.ui.make_app_page({
|
||||||
parent: wrapper,
|
parent: wrapper,
|
||||||
title: frappe._('Trial Balance'),
|
title: __('Trial Balance'),
|
||||||
single_column: true
|
single_column: true
|
||||||
});
|
});
|
||||||
var TrialBalance = erpnext.AccountTreeGrid.extend({
|
var TrialBalance = erpnext.AccountTreeGrid.extend({
|
||||||
@ -18,7 +18,7 @@ frappe.pages['trial-balance'].onload = function(wrapper) {
|
|||||||
this.wrapper.bind("make", function() {
|
this.wrapper.bind("make", function() {
|
||||||
$('<div style="margin: 10px 0px; "\
|
$('<div style="margin: 10px 0px; "\
|
||||||
class="with_period_closing_entry"><input type="checkbox" checked="checked">' +
|
class="with_period_closing_entry"><input type="checkbox" checked="checked">' +
|
||||||
frappe._("With period closing entry") + '</div>')
|
__("With period closing entry") + '</div>')
|
||||||
.appendTo(me.wrapper)
|
.appendTo(me.wrapper)
|
||||||
.find("input").click(function() { me.refresh(); });
|
.find("input").click(function() { me.refresh(); });
|
||||||
});
|
});
|
||||||
|
@ -5,14 +5,14 @@ frappe.query_reports["Accounts Payable"] = {
|
|||||||
"filters": [
|
"filters": [
|
||||||
{
|
{
|
||||||
"fieldname":"company",
|
"fieldname":"company",
|
||||||
"label": frappe._("Company"),
|
"label": __("Company"),
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"options": "Company",
|
"options": "Company",
|
||||||
"default": frappe.defaults.get_user_default("company")
|
"default": frappe.defaults.get_user_default("company")
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname":"account",
|
"fieldname":"account",
|
||||||
"label": frappe._("Account"),
|
"label": __("Account"),
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"options": "Account",
|
"options": "Account",
|
||||||
"get_query": function() {
|
"get_query": function() {
|
||||||
@ -29,13 +29,13 @@ frappe.query_reports["Accounts Payable"] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname":"report_date",
|
"fieldname":"report_date",
|
||||||
"label": frappe._("Date"),
|
"label": __("Date"),
|
||||||
"fieldtype": "Date",
|
"fieldtype": "Date",
|
||||||
"default": get_today()
|
"default": get_today()
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname":"ageing_based_on",
|
"fieldname":"ageing_based_on",
|
||||||
"label": frappe._("Ageing Based On"),
|
"label": __("Ageing Based On"),
|
||||||
"fieldtype": "Select",
|
"fieldtype": "Select",
|
||||||
"options": 'Posting Date' + NEWLINE + 'Due Date',
|
"options": 'Posting Date' + NEWLINE + 'Due Date',
|
||||||
"default": "Posting Date"
|
"default": "Posting Date"
|
||||||
|
@ -5,14 +5,14 @@ frappe.query_reports["Accounts Receivable"] = {
|
|||||||
"filters": [
|
"filters": [
|
||||||
{
|
{
|
||||||
"fieldname":"company",
|
"fieldname":"company",
|
||||||
"label": frappe._("Company"),
|
"label": __("Company"),
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"options": "Company",
|
"options": "Company",
|
||||||
"default": frappe.defaults.get_user_default("company")
|
"default": frappe.defaults.get_user_default("company")
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname":"account",
|
"fieldname":"account",
|
||||||
"label": frappe._("Account"),
|
"label": __("Account"),
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"options": "Account",
|
"options": "Account",
|
||||||
"get_query": function() {
|
"get_query": function() {
|
||||||
@ -29,13 +29,13 @@ frappe.query_reports["Accounts Receivable"] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname":"report_date",
|
"fieldname":"report_date",
|
||||||
"label": frappe._("Date"),
|
"label": __("Date"),
|
||||||
"fieldtype": "Date",
|
"fieldtype": "Date",
|
||||||
"default": get_today()
|
"default": get_today()
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname":"ageing_based_on",
|
"fieldname":"ageing_based_on",
|
||||||
"label": frappe._("Ageing Based On"),
|
"label": __("Ageing Based On"),
|
||||||
"fieldtype": "Select",
|
"fieldtype": "Select",
|
||||||
"options": 'Posting Date' + NEWLINE + 'Due Date',
|
"options": 'Posting Date' + NEWLINE + 'Due Date',
|
||||||
"default": "Posting Date"
|
"default": "Posting Date"
|
||||||
|
@ -5,20 +5,20 @@ frappe.query_reports["Bank Clearance Summary"] = {
|
|||||||
"filters": [
|
"filters": [
|
||||||
{
|
{
|
||||||
"fieldname":"from_date",
|
"fieldname":"from_date",
|
||||||
"label": frappe._("From Date"),
|
"label": __("From Date"),
|
||||||
"fieldtype": "Date",
|
"fieldtype": "Date",
|
||||||
"default": frappe.defaults.get_user_default("year_start_date"),
|
"default": frappe.defaults.get_user_default("year_start_date"),
|
||||||
"width": "80"
|
"width": "80"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname":"to_date",
|
"fieldname":"to_date",
|
||||||
"label": frappe._("To Date"),
|
"label": __("To Date"),
|
||||||
"fieldtype": "Date",
|
"fieldtype": "Date",
|
||||||
"default": get_today()
|
"default": get_today()
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname":"account",
|
"fieldname":"account",
|
||||||
"label": frappe._("Bank Account"),
|
"label": __("Bank Account"),
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"options": "Account",
|
"options": "Account",
|
||||||
"get_query": function() {
|
"get_query": function() {
|
||||||
|
@ -5,7 +5,7 @@ frappe.query_reports["Bank Reconciliation Statement"] = {
|
|||||||
"filters": [
|
"filters": [
|
||||||
{
|
{
|
||||||
"fieldname":"account",
|
"fieldname":"account",
|
||||||
"label": frappe._("Bank Account"),
|
"label": __("Bank Account"),
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"options": "Account",
|
"options": "Account",
|
||||||
"reqd": 1,
|
"reqd": 1,
|
||||||
@ -21,7 +21,7 @@ frappe.query_reports["Bank Reconciliation Statement"] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname":"report_date",
|
"fieldname":"report_date",
|
||||||
"label": frappe._("Date"),
|
"label": __("Date"),
|
||||||
"fieldtype": "Date",
|
"fieldtype": "Date",
|
||||||
"default": get_today(),
|
"default": get_today(),
|
||||||
"reqd": 1
|
"reqd": 1
|
||||||
|
@ -5,21 +5,21 @@ frappe.query_reports["Budget Variance Report"] = {
|
|||||||
"filters": [
|
"filters": [
|
||||||
{
|
{
|
||||||
fieldname: "fiscal_year",
|
fieldname: "fiscal_year",
|
||||||
label: frappe._("Fiscal Year"),
|
label: __("Fiscal Year"),
|
||||||
fieldtype: "Link",
|
fieldtype: "Link",
|
||||||
options: "Fiscal Year",
|
options: "Fiscal Year",
|
||||||
default: sys_defaults.fiscal_year
|
default: sys_defaults.fiscal_year
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
fieldname: "period",
|
fieldname: "period",
|
||||||
label: frappe._("Period"),
|
label: __("Period"),
|
||||||
fieldtype: "Select",
|
fieldtype: "Select",
|
||||||
options: "Monthly\nQuarterly\nHalf-Yearly\nYearly",
|
options: "Monthly\nQuarterly\nHalf-Yearly\nYearly",
|
||||||
default: "Monthly"
|
default: "Monthly"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
fieldname: "company",
|
fieldname: "company",
|
||||||
label: frappe._("Company"),
|
label: __("Company"),
|
||||||
fieldtype: "Link",
|
fieldtype: "Link",
|
||||||
options: "Company",
|
options: "Company",
|
||||||
default: frappe.defaults.get_user_default("company")
|
default: frappe.defaults.get_user_default("company")
|
||||||
|
@ -5,7 +5,7 @@ frappe.query_reports["General Ledger"] = {
|
|||||||
"filters": [
|
"filters": [
|
||||||
{
|
{
|
||||||
"fieldname":"company",
|
"fieldname":"company",
|
||||||
"label": frappe._("Company"),
|
"label": __("Company"),
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"options": "Company",
|
"options": "Company",
|
||||||
"default": frappe.defaults.get_user_default("company"),
|
"default": frappe.defaults.get_user_default("company"),
|
||||||
@ -13,7 +13,7 @@ frappe.query_reports["General Ledger"] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname":"from_date",
|
"fieldname":"from_date",
|
||||||
"label": frappe._("From Date"),
|
"label": __("From Date"),
|
||||||
"fieldtype": "Date",
|
"fieldtype": "Date",
|
||||||
"default": frappe.datetime.add_months(frappe.datetime.get_today(), -1),
|
"default": frappe.datetime.add_months(frappe.datetime.get_today(), -1),
|
||||||
"reqd": 1,
|
"reqd": 1,
|
||||||
@ -21,7 +21,7 @@ frappe.query_reports["General Ledger"] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname":"to_date",
|
"fieldname":"to_date",
|
||||||
"label": frappe._("To Date"),
|
"label": __("To Date"),
|
||||||
"fieldtype": "Date",
|
"fieldtype": "Date",
|
||||||
"default": frappe.datetime.get_today(),
|
"default": frappe.datetime.get_today(),
|
||||||
"reqd": 1,
|
"reqd": 1,
|
||||||
@ -32,7 +32,7 @@ frappe.query_reports["General Ledger"] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname":"account",
|
"fieldname":"account",
|
||||||
"label": frappe._("Account"),
|
"label": __("Account"),
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"options": "Account",
|
"options": "Account",
|
||||||
"get_query": function() {
|
"get_query": function() {
|
||||||
@ -47,18 +47,18 @@ frappe.query_reports["General Ledger"] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname":"voucher_no",
|
"fieldname":"voucher_no",
|
||||||
"label": frappe._("Voucher No"),
|
"label": __("Voucher No"),
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname":"group_by_voucher",
|
"fieldname":"group_by_voucher",
|
||||||
"label": frappe._("Group by Voucher"),
|
"label": __("Group by Voucher"),
|
||||||
"fieldtype": "Check",
|
"fieldtype": "Check",
|
||||||
"default": 1
|
"default": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname":"group_by_account",
|
"fieldname":"group_by_account",
|
||||||
"label": frappe._("Group by Account"),
|
"label": __("Group by Account"),
|
||||||
"fieldtype": "Check",
|
"fieldtype": "Check",
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -5,20 +5,20 @@ frappe.query_reports["Gross Profit"] = {
|
|||||||
"filters": [
|
"filters": [
|
||||||
{
|
{
|
||||||
"fieldname":"company",
|
"fieldname":"company",
|
||||||
"label": frappe._("Company"),
|
"label": __("Company"),
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"options": "Company",
|
"options": "Company",
|
||||||
"default": frappe.defaults.get_user_default("company")
|
"default": frappe.defaults.get_user_default("company")
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname":"from_date",
|
"fieldname":"from_date",
|
||||||
"label": frappe._("From Date"),
|
"label": __("From Date"),
|
||||||
"fieldtype": "Date",
|
"fieldtype": "Date",
|
||||||
"default": frappe.defaults.get_user_default("year_start_date")
|
"default": frappe.defaults.get_user_default("year_start_date")
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname":"to_date",
|
"fieldname":"to_date",
|
||||||
"label": frappe._("To Date"),
|
"label": __("To Date"),
|
||||||
"fieldtype": "Date",
|
"fieldtype": "Date",
|
||||||
"default": frappe.defaults.get_user_default("year_end_date")
|
"default": frappe.defaults.get_user_default("year_end_date")
|
||||||
},
|
},
|
||||||
|
@ -5,26 +5,26 @@ frappe.query_reports["Item-wise Purchase Register"] = {
|
|||||||
"filters": [
|
"filters": [
|
||||||
{
|
{
|
||||||
"fieldname":"from_date",
|
"fieldname":"from_date",
|
||||||
"label": frappe._("From Date"),
|
"label": __("From Date"),
|
||||||
"fieldtype": "Date",
|
"fieldtype": "Date",
|
||||||
"default": frappe.defaults.get_user_default("year_start_date"),
|
"default": frappe.defaults.get_user_default("year_start_date"),
|
||||||
"width": "80"
|
"width": "80"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname":"to_date",
|
"fieldname":"to_date",
|
||||||
"label": frappe._("To Date"),
|
"label": __("To Date"),
|
||||||
"fieldtype": "Date",
|
"fieldtype": "Date",
|
||||||
"default": get_today()
|
"default": get_today()
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "item_code",
|
"fieldname": "item_code",
|
||||||
"label": frappe._("Item"),
|
"label": __("Item"),
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"options": "Item",
|
"options": "Item",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname":"account",
|
"fieldname":"account",
|
||||||
"label": frappe._("Account"),
|
"label": __("Account"),
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"options": "Account",
|
"options": "Account",
|
||||||
"get_query": function() {
|
"get_query": function() {
|
||||||
@ -41,7 +41,7 @@ frappe.query_reports["Item-wise Purchase Register"] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname":"company",
|
"fieldname":"company",
|
||||||
"label": frappe._("Company"),
|
"label": __("Company"),
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"options": "Company",
|
"options": "Company",
|
||||||
"default": frappe.defaults.get_user_default("company")
|
"default": frappe.defaults.get_user_default("company")
|
||||||
|
@ -5,20 +5,20 @@ frappe.query_reports["Item-wise Sales Register"] = frappe.query_reports["Sales R
|
|||||||
"filters": [
|
"filters": [
|
||||||
{
|
{
|
||||||
"fieldname":"from_date",
|
"fieldname":"from_date",
|
||||||
"label": frappe._("From Date"),
|
"label": __("From Date"),
|
||||||
"fieldtype": "Date",
|
"fieldtype": "Date",
|
||||||
"default": frappe.defaults.get_default("year_start_date"),
|
"default": frappe.defaults.get_default("year_start_date"),
|
||||||
"width": "80"
|
"width": "80"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname":"to_date",
|
"fieldname":"to_date",
|
||||||
"label": frappe._("To Date"),
|
"label": __("To Date"),
|
||||||
"fieldtype": "Date",
|
"fieldtype": "Date",
|
||||||
"default": get_today()
|
"default": get_today()
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname":"account",
|
"fieldname":"account",
|
||||||
"label": frappe._("Account"),
|
"label": __("Account"),
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"options": "Account",
|
"options": "Account",
|
||||||
"get_query": function() {
|
"get_query": function() {
|
||||||
@ -35,7 +35,7 @@ frappe.query_reports["Item-wise Sales Register"] = frappe.query_reports["Sales R
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname":"company",
|
"fieldname":"company",
|
||||||
"label": frappe._("Company"),
|
"label": __("Company"),
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"options": "Company",
|
"options": "Company",
|
||||||
"default": frappe.defaults.get_user_default("company")
|
"default": frappe.defaults.get_user_default("company")
|
||||||
|
@ -5,26 +5,26 @@ frappe.query_reports["Payment Period Based On Invoice Date"] = {
|
|||||||
"filters": [
|
"filters": [
|
||||||
{
|
{
|
||||||
fieldname: "from_date",
|
fieldname: "from_date",
|
||||||
label: frappe._("From Date"),
|
label: __("From Date"),
|
||||||
fieldtype: "Date",
|
fieldtype: "Date",
|
||||||
default: frappe.defaults.get_user_default("year_start_date"),
|
default: frappe.defaults.get_user_default("year_start_date"),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
fieldname:"to_date",
|
fieldname:"to_date",
|
||||||
label: frappe._("To Date"),
|
label: __("To Date"),
|
||||||
fieldtype: "Date",
|
fieldtype: "Date",
|
||||||
default: get_today()
|
default: get_today()
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
fieldname:"payment_type",
|
fieldname:"payment_type",
|
||||||
label: frappe._("Payment Type"),
|
label: __("Payment Type"),
|
||||||
fieldtype: "Select",
|
fieldtype: "Select",
|
||||||
options: "Incoming\nOutgoing",
|
options: "Incoming\nOutgoing",
|
||||||
default: "Incoming"
|
default: "Incoming"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
fieldname:"account",
|
fieldname:"account",
|
||||||
label: frappe._("Account"),
|
label: __("Account"),
|
||||||
fieldtype: "Link",
|
fieldtype: "Link",
|
||||||
options: "Account",
|
options: "Account",
|
||||||
get_query: function() {
|
get_query: function() {
|
||||||
@ -39,7 +39,7 @@ frappe.query_reports["Payment Period Based On Invoice Date"] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
fieldname:"company",
|
fieldname:"company",
|
||||||
label: frappe._("Company"),
|
label: __("Company"),
|
||||||
fieldtype: "Link",
|
fieldtype: "Link",
|
||||||
options: "Company",
|
options: "Company",
|
||||||
default: frappe.defaults.get_user_default("company")
|
default: frappe.defaults.get_user_default("company")
|
||||||
|
@ -5,20 +5,20 @@ frappe.query_reports["Purchase Register"] = {
|
|||||||
"filters": [
|
"filters": [
|
||||||
{
|
{
|
||||||
"fieldname":"from_date",
|
"fieldname":"from_date",
|
||||||
"label": frappe._("From Date"),
|
"label": __("From Date"),
|
||||||
"fieldtype": "Date",
|
"fieldtype": "Date",
|
||||||
"default": frappe.defaults.get_user_default("year_start_date"),
|
"default": frappe.defaults.get_user_default("year_start_date"),
|
||||||
"width": "80"
|
"width": "80"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname":"to_date",
|
"fieldname":"to_date",
|
||||||
"label": frappe._("To Date"),
|
"label": __("To Date"),
|
||||||
"fieldtype": "Date",
|
"fieldtype": "Date",
|
||||||
"default": get_today()
|
"default": get_today()
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname":"account",
|
"fieldname":"account",
|
||||||
"label": frappe._("Account"),
|
"label": __("Account"),
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"options": "Account",
|
"options": "Account",
|
||||||
"get_query": function() {
|
"get_query": function() {
|
||||||
@ -35,7 +35,7 @@ frappe.query_reports["Purchase Register"] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname":"company",
|
"fieldname":"company",
|
||||||
"label": frappe._("Company"),
|
"label": __("Company"),
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"options": "Company",
|
"options": "Company",
|
||||||
"default": frappe.defaults.get_user_default("company")
|
"default": frappe.defaults.get_user_default("company")
|
||||||
|
@ -5,20 +5,20 @@ frappe.query_reports["Sales Register"] = {
|
|||||||
"filters": [
|
"filters": [
|
||||||
{
|
{
|
||||||
"fieldname":"from_date",
|
"fieldname":"from_date",
|
||||||
"label": frappe._("From Date"),
|
"label": __("From Date"),
|
||||||
"fieldtype": "Date",
|
"fieldtype": "Date",
|
||||||
"default": frappe.defaults.get_default("year_start_date"),
|
"default": frappe.defaults.get_default("year_start_date"),
|
||||||
"width": "80"
|
"width": "80"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname":"to_date",
|
"fieldname":"to_date",
|
||||||
"label": frappe._("To Date"),
|
"label": __("To Date"),
|
||||||
"fieldtype": "Date",
|
"fieldtype": "Date",
|
||||||
"default": get_today()
|
"default": get_today()
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname":"account",
|
"fieldname":"account",
|
||||||
"label": frappe._("Account"),
|
"label": __("Account"),
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"options": "Account",
|
"options": "Account",
|
||||||
"get_query": function() {
|
"get_query": function() {
|
||||||
@ -35,7 +35,7 @@ frappe.query_reports["Sales Register"] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname":"company",
|
"fieldname":"company",
|
||||||
"label": frappe._("Company"),
|
"label": __("Company"),
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"options": "Company",
|
"options": "Company",
|
||||||
"default": frappe.defaults.get_user_default("company")
|
"default": frappe.defaults.get_user_default("company")
|
||||||
|
@ -300,7 +300,7 @@ erpnext.buying.BuyingController = erpnext.TransactionController.extend({
|
|||||||
$.each(fields_list, function(i, fname) {
|
$.each(fields_list, function(i, fname) {
|
||||||
var docfield = frappe.meta.docfield_map[me.frm.doc.doctype][fname];
|
var docfield = frappe.meta.docfield_map[me.frm.doc.doctype][fname];
|
||||||
if(docfield) {
|
if(docfield) {
|
||||||
var label = frappe._(docfield.label || "").replace(/\([^\)]*\)/g, "");
|
var label = __(docfield.label || "").replace(/\([^\)]*\)/g, "");
|
||||||
field_label_map[fname] = label.trim() + " (" + currency + ")";
|
field_label_map[fname] = label.trim() + " (" + currency + ")";
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -347,7 +347,7 @@ erpnext.buying.BuyingController = erpnext.TransactionController.extend({
|
|||||||
$.each(fields_list, function(i, fname) {
|
$.each(fields_list, function(i, fname) {
|
||||||
var docfield = frappe.meta.docfield_map[grid_doctype][fname];
|
var docfield = frappe.meta.docfield_map[grid_doctype][fname];
|
||||||
if(docfield) {
|
if(docfield) {
|
||||||
var label = frappe._(docfield.label || "").replace(/\([^\)]*\)/g, "");
|
var label = __(docfield.label || "").replace(/\([^\)]*\)/g, "");
|
||||||
field_label_map[grid_doctype + "-" + fname] =
|
field_label_map[grid_doctype + "-" + fname] =
|
||||||
label.trim() + " (" + currency + ")";
|
label.trim() + " (" + currency + ")";
|
||||||
}
|
}
|
||||||
|
@ -18,25 +18,25 @@ erpnext.buying.PurchaseOrderController = erpnext.buying.BuyingController.extend(
|
|||||||
this.frm.dashboard.reset();
|
this.frm.dashboard.reset();
|
||||||
|
|
||||||
if(doc.docstatus == 1 && doc.status != 'Stopped'){
|
if(doc.docstatus == 1 && doc.status != 'Stopped'){
|
||||||
cur_frm.dashboard.add_progress(cint(doc.per_received) + frappe._("% Received"),
|
cur_frm.dashboard.add_progress(cint(doc.per_received) + __("% Received"),
|
||||||
doc.per_received);
|
doc.per_received);
|
||||||
cur_frm.dashboard.add_progress(cint(doc.per_billed) + frappe._("% Billed"),
|
cur_frm.dashboard.add_progress(cint(doc.per_billed) + __("% Billed"),
|
||||||
doc.per_billed);
|
doc.per_billed);
|
||||||
|
|
||||||
cur_frm.add_custom_button('Send SMS', cur_frm.cscript.send_sms);
|
cur_frm.add_custom_button('Send SMS', cur_frm.cscript.send_sms);
|
||||||
|
|
||||||
if(flt(doc.per_received, 2) < 100)
|
if(flt(doc.per_received, 2) < 100)
|
||||||
cur_frm.add_custom_button(frappe._('Make Purchase Receipt'), this.make_purchase_receipt);
|
cur_frm.add_custom_button(__('Make Purchase Receipt'), this.make_purchase_receipt);
|
||||||
if(flt(doc.per_billed, 2) < 100)
|
if(flt(doc.per_billed, 2) < 100)
|
||||||
cur_frm.add_custom_button(frappe._('Make Invoice'), this.make_purchase_invoice);
|
cur_frm.add_custom_button(__('Make Invoice'), this.make_purchase_invoice);
|
||||||
if(flt(doc.per_billed, 2) < 100 || doc.per_received < 100)
|
if(flt(doc.per_billed, 2) < 100 || doc.per_received < 100)
|
||||||
cur_frm.add_custom_button(frappe._('Stop'), cur_frm.cscript['Stop Purchase Order'], "icon-exclamation");
|
cur_frm.add_custom_button(__('Stop'), cur_frm.cscript['Stop Purchase Order'], "icon-exclamation");
|
||||||
} else if(doc.docstatus===0) {
|
} else if(doc.docstatus===0) {
|
||||||
cur_frm.cscript.add_from_mappers();
|
cur_frm.cscript.add_from_mappers();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(doc.docstatus == 1 && doc.status == 'Stopped')
|
if(doc.docstatus == 1 && doc.status == 'Stopped')
|
||||||
cur_frm.add_custom_button(frappe._('Unstop Purchase Order'),
|
cur_frm.add_custom_button(__('Unstop Purchase Order'),
|
||||||
cur_frm.cscript['Unstop Purchase Order'], "icon-check");
|
cur_frm.cscript['Unstop Purchase Order'], "icon-check");
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -55,7 +55,7 @@ erpnext.buying.PurchaseOrderController = erpnext.buying.BuyingController.extend(
|
|||||||
},
|
},
|
||||||
|
|
||||||
add_from_mappers: function() {
|
add_from_mappers: function() {
|
||||||
cur_frm.add_custom_button(frappe._('From Material Request'),
|
cur_frm.add_custom_button(__('From Material Request'),
|
||||||
function() {
|
function() {
|
||||||
frappe.model.map_current_doc({
|
frappe.model.map_current_doc({
|
||||||
method: "erpnext.stock.doctype.material_request.material_request.make_purchase_order",
|
method: "erpnext.stock.doctype.material_request.material_request.make_purchase_order",
|
||||||
@ -71,7 +71,7 @@ erpnext.buying.PurchaseOrderController = erpnext.buying.BuyingController.extend(
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
cur_frm.add_custom_button(frappe._('From Supplier Quotation'),
|
cur_frm.add_custom_button(__('From Supplier Quotation'),
|
||||||
function() {
|
function() {
|
||||||
frappe.model.map_current_doc({
|
frappe.model.map_current_doc({
|
||||||
method: "erpnext.buying.doctype.supplier_quotation.supplier_quotation.make_purchase_order",
|
method: "erpnext.buying.doctype.supplier_quotation.supplier_quotation.make_purchase_order",
|
||||||
@ -85,7 +85,7 @@ erpnext.buying.PurchaseOrderController = erpnext.buying.BuyingController.extend(
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
cur_frm.add_custom_button(frappe._('For Supplier'),
|
cur_frm.add_custom_button(__('For Supplier'),
|
||||||
function() {
|
function() {
|
||||||
frappe.model.map_current_doc({
|
frappe.model.map_current_doc({
|
||||||
method: "erpnext.stock.doctype.material_request.material_request.make_purchase_order_based_on_supplier",
|
method: "erpnext.stock.doctype.material_request.material_request.make_purchase_order_based_on_supplier",
|
||||||
@ -137,7 +137,7 @@ cur_frm.cscript.get_last_purchase_rate = function(doc, cdt, cdn){
|
|||||||
|
|
||||||
cur_frm.cscript['Stop Purchase Order'] = function() {
|
cur_frm.cscript['Stop Purchase Order'] = function() {
|
||||||
var doc = cur_frm.doc;
|
var doc = cur_frm.doc;
|
||||||
var check = confirm(frappe._("Do you really want to STOP ") + doc.name);
|
var check = confirm(__("Do you really want to STOP ") + doc.name);
|
||||||
|
|
||||||
if (check) {
|
if (check) {
|
||||||
return $c('runserverobj', args={'method':'update_status', 'arg': 'Stopped', 'docs':doc}, function(r,rt) {
|
return $c('runserverobj', args={'method':'update_status', 'arg': 'Stopped', 'docs':doc}, function(r,rt) {
|
||||||
@ -148,7 +148,7 @@ cur_frm.cscript['Stop Purchase Order'] = function() {
|
|||||||
|
|
||||||
cur_frm.cscript['Unstop Purchase Order'] = function() {
|
cur_frm.cscript['Unstop Purchase Order'] = function() {
|
||||||
var doc = cur_frm.doc;
|
var doc = cur_frm.doc;
|
||||||
var check = confirm(frappe._("Do you really want to UNSTOP ") + doc.name);
|
var check = confirm(__("Do you really want to UNSTOP ") + doc.name);
|
||||||
|
|
||||||
if (check) {
|
if (check) {
|
||||||
return $c('runserverobj', args={'method':'update_status', 'arg': 'Submitted', 'docs':doc}, function(r,rt) {
|
return $c('runserverobj', args={'method':'update_status', 'arg': 'Submitted', 'docs':doc}, function(r,rt) {
|
||||||
|
@ -45,9 +45,9 @@ cur_frm.cscript.make_dashboard = function(doc) {
|
|||||||
callback: function(r) {
|
callback: function(r) {
|
||||||
if (in_list(user_roles, "Accounts User") || in_list(user_roles, "Accounts Manager")) {
|
if (in_list(user_roles, "Accounts User") || in_list(user_roles, "Accounts Manager")) {
|
||||||
cur_frm.dashboard.set_headline(
|
cur_frm.dashboard.set_headline(
|
||||||
frappe._("Total Billing This Year: ") + "<b>"
|
__("Total Billing This Year: ") + "<b>"
|
||||||
+ format_currency(r.message.total_billing, erpnext.get_currency(cur_frm.doc.company))
|
+ format_currency(r.message.total_billing, erpnext.get_currency(cur_frm.doc.company))
|
||||||
+ '</b> / <span class="text-muted">' + frappe._("Unpaid") + ": <b>"
|
+ '</b> / <span class="text-muted">' + __("Unpaid") + ": <b>"
|
||||||
+ format_currency(r.message.total_unpaid, erpnext.get_currency(cur_frm.doc.company))
|
+ format_currency(r.message.total_unpaid, erpnext.get_currency(cur_frm.doc.company))
|
||||||
+ '</b></span>');
|
+ '</b></span>');
|
||||||
}
|
}
|
||||||
@ -67,7 +67,7 @@ cur_frm.cscript.make_address = function() {
|
|||||||
return "select name, address_type, address_line1, address_line2, city, state, country, pincode, fax, email_id, phone, is_primary_address, is_shipping_address from tabAddress where supplier='"+cur_frm.docname+"' and docstatus != 2 order by is_primary_address desc"
|
return "select name, address_type, address_line1, address_line2, city, state, country, pincode, fax, email_id, phone, is_primary_address, is_shipping_address from tabAddress where supplier='"+cur_frm.docname+"' and docstatus != 2 order by is_primary_address desc"
|
||||||
},
|
},
|
||||||
as_dict: 1,
|
as_dict: 1,
|
||||||
no_results_message: frappe._('No addresses created'),
|
no_results_message: __('No addresses created'),
|
||||||
render_row: cur_frm.cscript.render_address_row,
|
render_row: cur_frm.cscript.render_address_row,
|
||||||
});
|
});
|
||||||
// note: render_address_row is defined in contact_control.js
|
// note: render_address_row is defined in contact_control.js
|
||||||
@ -85,7 +85,7 @@ cur_frm.cscript.make_contact = function() {
|
|||||||
return "select name, first_name, last_name, email_id, phone, mobile_no, department, designation, is_primary_contact from tabContact where supplier='"+cur_frm.docname+"' and docstatus != 2 order by is_primary_contact desc"
|
return "select name, first_name, last_name, email_id, phone, mobile_no, department, designation, is_primary_contact from tabContact where supplier='"+cur_frm.docname+"' and docstatus != 2 order by is_primary_contact desc"
|
||||||
},
|
},
|
||||||
as_dict: 1,
|
as_dict: 1,
|
||||||
no_results_message: frappe._('No contacts created'),
|
no_results_message: __('No contacts created'),
|
||||||
render_row: cur_frm.cscript.render_contact_row,
|
render_row: cur_frm.cscript.render_contact_row,
|
||||||
});
|
});
|
||||||
// note: render_contact_row is defined in contact_control.js
|
// note: render_contact_row is defined in contact_control.js
|
||||||
|
@ -16,10 +16,10 @@ erpnext.buying.SupplierQuotationController = erpnext.buying.BuyingController.ext
|
|||||||
this._super();
|
this._super();
|
||||||
|
|
||||||
if (this.frm.doc.docstatus === 1) {
|
if (this.frm.doc.docstatus === 1) {
|
||||||
cur_frm.add_custom_button(frappe._("Make Purchase Order"), this.make_purchase_order);
|
cur_frm.add_custom_button(__("Make Purchase Order"), this.make_purchase_order);
|
||||||
}
|
}
|
||||||
else if (this.frm.doc.docstatus===0) {
|
else if (this.frm.doc.docstatus===0) {
|
||||||
cur_frm.add_custom_button(frappe._('From Material Request'),
|
cur_frm.add_custom_button(__('From Material Request'),
|
||||||
function() {
|
function() {
|
||||||
frappe.model.map_current_doc({
|
frappe.model.map_current_doc({
|
||||||
method: "erpnext.stock.doctype.material_request.material_request.make_supplier_quotation",
|
method: "erpnext.stock.doctype.material_request.material_request.make_supplier_quotation",
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
frappe.pages['purchase-analytics'].onload = function(wrapper) {
|
frappe.pages['purchase-analytics'].onload = function(wrapper) {
|
||||||
frappe.ui.make_app_page({
|
frappe.ui.make_app_page({
|
||||||
parent: wrapper,
|
parent: wrapper,
|
||||||
title: frappe._('Purchase Analytics'),
|
title: __('Purchase Analytics'),
|
||||||
single_column: true
|
single_column: true
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -18,7 +18,7 @@ frappe.pages['purchase-analytics'].onload = function(wrapper) {
|
|||||||
erpnext.PurchaseAnalytics = frappe.views.TreeGridReport.extend({
|
erpnext.PurchaseAnalytics = frappe.views.TreeGridReport.extend({
|
||||||
init: function(wrapper) {
|
init: function(wrapper) {
|
||||||
this._super({
|
this._super({
|
||||||
title: frappe._("Purchase Analytics"),
|
title: __("Purchase Analytics"),
|
||||||
page: wrapper,
|
page: wrapper,
|
||||||
parent: $(wrapper).find('.layout-main'),
|
parent: $(wrapper).find('.layout-main'),
|
||||||
appframe: wrapper.appframe,
|
appframe: wrapper.appframe,
|
||||||
@ -31,7 +31,7 @@ erpnext.PurchaseAnalytics = frappe.views.TreeGridReport.extend({
|
|||||||
|
|
||||||
this.tree_grids = {
|
this.tree_grids = {
|
||||||
"Supplier Type": {
|
"Supplier Type": {
|
||||||
label: frappe._("Supplier Type / Supplier"),
|
label: __("Supplier Type / Supplier"),
|
||||||
show: true,
|
show: true,
|
||||||
item_key: "supplier",
|
item_key: "supplier",
|
||||||
parent_field: "parent_supplier_type",
|
parent_field: "parent_supplier_type",
|
||||||
@ -44,7 +44,7 @@ erpnext.PurchaseAnalytics = frappe.views.TreeGridReport.extend({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Supplier": {
|
"Supplier": {
|
||||||
label: frappe._("Supplier"),
|
label: __("Supplier"),
|
||||||
show: false,
|
show: false,
|
||||||
item_key: "supplier",
|
item_key: "supplier",
|
||||||
formatter: function(item) {
|
formatter: function(item) {
|
||||||
@ -74,7 +74,7 @@ erpnext.PurchaseAnalytics = frappe.views.TreeGridReport.extend({
|
|||||||
this.tree_grid = this.tree_grids[this.tree_type];
|
this.tree_grid = this.tree_grids[this.tree_type];
|
||||||
|
|
||||||
var std_columns = [
|
var std_columns = [
|
||||||
{id: "check", name: frappe._("Plot"), field: "check", width: 30,
|
{id: "check", name: __("Plot"), field: "check", width: 30,
|
||||||
formatter: this.check_formatter},
|
formatter: this.check_formatter},
|
||||||
{id: "name", name: this.tree_grid.label, field: "name", width: 300,
|
{id: "name", name: this.tree_grid.label, field: "name", width: 300,
|
||||||
formatter: this.tree_formatter},
|
formatter: this.tree_formatter},
|
||||||
@ -86,23 +86,23 @@ erpnext.PurchaseAnalytics = frappe.views.TreeGridReport.extend({
|
|||||||
this.columns = std_columns.concat(this.columns);
|
this.columns = std_columns.concat(this.columns);
|
||||||
},
|
},
|
||||||
filters: [
|
filters: [
|
||||||
{fieldtype:"Select", label: frappe._("Tree Type"), options:["Supplier Type", "Supplier",
|
{fieldtype:"Select", label: __("Tree Type"), options:["Supplier Type", "Supplier",
|
||||||
"Item Group", "Item"],
|
"Item Group", "Item"],
|
||||||
filter: function(val, item, opts, me) {
|
filter: function(val, item, opts, me) {
|
||||||
return me.apply_zero_filter(val, item, opts, me);
|
return me.apply_zero_filter(val, item, opts, me);
|
||||||
}},
|
}},
|
||||||
{fieldtype:"Select", label: frappe._("Based On"), options:["Purchase Invoice",
|
{fieldtype:"Select", label: __("Based On"), options:["Purchase Invoice",
|
||||||
"Purchase Order", "Purchase Receipt"]},
|
"Purchase Order", "Purchase Receipt"]},
|
||||||
{fieldtype:"Select", label: frappe._("Value or Qty"), options:["Value", "Quantity"]},
|
{fieldtype:"Select", label: __("Value or Qty"), options:["Value", "Quantity"]},
|
||||||
{fieldtype:"Select", label: frappe._("Company"), link:"Company",
|
{fieldtype:"Select", label: __("Company"), link:"Company",
|
||||||
default_value: "Select Company..."},
|
default_value: "Select Company..."},
|
||||||
{fieldtype:"Date", label: frappe._("From Date")},
|
{fieldtype:"Date", label: __("From Date")},
|
||||||
{fieldtype:"Label", label: frappe._("To")},
|
{fieldtype:"Label", label: __("To")},
|
||||||
{fieldtype:"Date", label: frappe._("To Date")},
|
{fieldtype:"Date", label: __("To Date")},
|
||||||
{fieldtype:"Select", label: frappe._("Range"),
|
{fieldtype:"Select", label: __("Range"),
|
||||||
options:["Daily", "Weekly", "Monthly", "Quarterly", "Yearly"]},
|
options:["Daily", "Weekly", "Monthly", "Quarterly", "Yearly"]},
|
||||||
{fieldtype:"Button", label: frappe._("Refresh"), icon:"icon-refresh icon-white"},
|
{fieldtype:"Button", label: __("Refresh"), icon:"icon-refresh icon-white"},
|
||||||
{fieldtype:"Button", label: frappe._("Reset Filters")}
|
{fieldtype:"Button", label: __("Reset Filters")}
|
||||||
],
|
],
|
||||||
setup_filters: function() {
|
setup_filters: function() {
|
||||||
var me = this;
|
var me = this;
|
||||||
@ -130,18 +130,18 @@ erpnext.PurchaseAnalytics = frappe.views.TreeGridReport.extend({
|
|||||||
})
|
})
|
||||||
|
|
||||||
frappe.report_dump.data["Supplier Type"] = [{
|
frappe.report_dump.data["Supplier Type"] = [{
|
||||||
name: frappe._("All Supplier Types"),
|
name: __("All Supplier Types"),
|
||||||
id: "All Supplier Types",
|
id: "All Supplier Types",
|
||||||
}].concat(frappe.report_dump.data["Supplier Type"]);
|
}].concat(frappe.report_dump.data["Supplier Type"]);
|
||||||
|
|
||||||
frappe.report_dump.data["Supplier"].push({
|
frappe.report_dump.data["Supplier"].push({
|
||||||
name: frappe._("Not Set"),
|
name: __("Not Set"),
|
||||||
parent_supplier_type: "All Supplier Types",
|
parent_supplier_type: "All Supplier Types",
|
||||||
id: "Not Set",
|
id: "Not Set",
|
||||||
});
|
});
|
||||||
|
|
||||||
frappe.report_dump.data["Item"].push({
|
frappe.report_dump.data["Item"].push({
|
||||||
name: frappe._("Not Set"),
|
name: __("Not Set"),
|
||||||
parent_item_group: "All Item Groups",
|
parent_item_group: "All Item Groups",
|
||||||
id: "Not Set",
|
id: "Not Set",
|
||||||
});
|
});
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
frappe.pages['activity'].onload = function(wrapper) {
|
frappe.pages['activity'].onload = function(wrapper) {
|
||||||
frappe.ui.make_app_page({
|
frappe.ui.make_app_page({
|
||||||
parent: wrapper,
|
parent: wrapper,
|
||||||
title: frappe._("Activity"),
|
title: __("Activity"),
|
||||||
single_column: true
|
single_column: true
|
||||||
})
|
})
|
||||||
wrapper.appframe.add_module_icon("Activity");
|
wrapper.appframe.add_module_icon("Activity");
|
||||||
@ -24,7 +24,7 @@ frappe.pages['activity'].onload = function(wrapper) {
|
|||||||
|
|
||||||
// Build Report Button
|
// Build Report Button
|
||||||
if(frappe.boot.user.can_get_report.indexOf("Feed")!=-1) {
|
if(frappe.boot.user.can_get_report.indexOf("Feed")!=-1) {
|
||||||
wrapper.appframe.add_primary_action(frappe._('Build Report'), function() {
|
wrapper.appframe.add_primary_action(__('Build Report'), function() {
|
||||||
frappe.set_route('Report', "Feed");
|
frappe.set_route('Report', "Feed");
|
||||||
}, 'icon-th')
|
}, 'icon-th')
|
||||||
}
|
}
|
||||||
@ -47,7 +47,7 @@ erpnext.ActivityFeed = Class.extend({
|
|||||||
|
|
||||||
// feedtype
|
// feedtype
|
||||||
if(!data.feed_type) {
|
if(!data.feed_type) {
|
||||||
data.feed_type = frappe._(data.doc_type);
|
data.feed_type = __(data.doc_type);
|
||||||
data.add_class = "label-info";
|
data.add_class = "label-info";
|
||||||
data.onclick = repl('onclick="window.location.href=\'#!List/%(feed_type)s\';"', data)
|
data.onclick = repl('onclick="window.location.href=\'#!List/%(feed_type)s\';"', data)
|
||||||
}
|
}
|
||||||
|
@ -45,7 +45,7 @@ cur_frm.cscript.score = function(doc,cdt,cdn){
|
|||||||
var d = locals[cdt][cdn];
|
var d = locals[cdt][cdn];
|
||||||
if (d.score){
|
if (d.score){
|
||||||
if (flt(d.score) > 5) {
|
if (flt(d.score) > 5) {
|
||||||
msgprint(frappe._("Score must be less than or equal to 5"));
|
msgprint(__("Score must be less than or equal to 5"));
|
||||||
d.score = 0;
|
d.score = 0;
|
||||||
refresh_field('score', d.name, 'appraisal_details');
|
refresh_field('score', d.name, 'appraisal_details');
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,7 @@ erpnext.hr.EmployeeController = frappe.ui.form.Controller.extend({
|
|||||||
var me = this;
|
var me = this;
|
||||||
erpnext.hide_naming_series();
|
erpnext.hide_naming_series();
|
||||||
if(!this.frm.doc.__islocal) {
|
if(!this.frm.doc.__islocal) {
|
||||||
cur_frm.add_custom_button(frappe._('Make Salary Structure'), function() {
|
cur_frm.add_custom_button(__('Make Salary Structure'), function() {
|
||||||
me.make_salary_structure(this); });
|
me.make_salary_structure(this); });
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -61,11 +61,11 @@ erpnext.hr.EmployeeController = frappe.ui.form.Controller.extend({
|
|||||||
var me = this;
|
var me = this;
|
||||||
this.validate_salary_structure(btn, function(r) {
|
this.validate_salary_structure(btn, function(r) {
|
||||||
if(r.message) {
|
if(r.message) {
|
||||||
msgprint(frappe._("Employee") + ' "' + me.frm.doc.name + '": '
|
msgprint(__("Employee {0}:\
|
||||||
+ frappe._("An active Salary Structure already exists. \
|
An active Salary Structure already exists. \
|
||||||
If you want to create new one, please ensure that no active \
|
If you want to create new one, please ensure that no active \
|
||||||
Salary Structure exists for this Employee. \
|
Salary Structure exists for this Employee. \
|
||||||
Go to the active Salary Structure and set \"Is Active\" = \"No\""));
|
Go to the active Salary Structure and set \"Is Active\" = \"No\"", [me.frm.doc.name]));
|
||||||
} else if(!r.exc) {
|
} else if(!r.exc) {
|
||||||
frappe.model.map({
|
frappe.model.map({
|
||||||
source: me.frm.doc,
|
source: me.frm.doc,
|
||||||
|
@ -92,26 +92,26 @@ cur_frm.cscript.refresh = function(doc,cdt,cdn){
|
|||||||
cur_frm.savesubmit();
|
cur_frm.savesubmit();
|
||||||
|
|
||||||
if(doc.docstatus==1 && frappe.model.can_create("Journal Voucher"))
|
if(doc.docstatus==1 && frappe.model.can_create("Journal Voucher"))
|
||||||
cur_frm.add_custom_button(frappe._("Make Bank Voucher"), cur_frm.cscript.make_bank_voucher);
|
cur_frm.add_custom_button(__("Make Bank Voucher"), cur_frm.cscript.make_bank_voucher);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
cur_frm.cscript.set_help = function(doc) {
|
cur_frm.cscript.set_help = function(doc) {
|
||||||
cur_frm.set_intro("");
|
cur_frm.set_intro("");
|
||||||
if(doc.__islocal && !in_list(user_roles, "HR User")) {
|
if(doc.__islocal && !in_list(user_roles, "HR User")) {
|
||||||
cur_frm.set_intro(frappe._("Fill the form and save it"))
|
cur_frm.set_intro(__("Fill the form and save it"))
|
||||||
} else {
|
} else {
|
||||||
if(doc.docstatus==0 && doc.approval_status=="Draft") {
|
if(doc.docstatus==0 && doc.approval_status=="Draft") {
|
||||||
if(user==doc.exp_approver) {
|
if(user==doc.exp_approver) {
|
||||||
cur_frm.set_intro(frappe._("You are the Expense Approver for this record. Please Update the 'Status' and Save"));
|
cur_frm.set_intro(__("You are the Expense Approver for this record. Please Update the 'Status' and Save"));
|
||||||
} else {
|
} else {
|
||||||
cur_frm.set_intro(frappe._("Expense Claim is pending approval. Only the Expense Approver can update status."));
|
cur_frm.set_intro(__("Expense Claim is pending approval. Only the Expense Approver can update status."));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if(doc.approval_status=="Approved") {
|
if(doc.approval_status=="Approved") {
|
||||||
cur_frm.set_intro(frappe._("Expense Claim has been approved."));
|
cur_frm.set_intro(__("Expense Claim has been approved."));
|
||||||
} else if(doc.approval_status=="Rejected") {
|
} else if(doc.approval_status=="Rejected") {
|
||||||
cur_frm.set_intro(frappe._("Expense Claim has been rejected."));
|
cur_frm.set_intro(__("Expense Claim has been rejected."));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
cur_frm.cscript = {
|
cur_frm.cscript = {
|
||||||
onload: function(doc, dt, dn) {
|
onload: function(doc, dt, dn) {
|
||||||
if(in_list(user_roles,'System Manager')) {
|
if(in_list(user_roles,'System Manager')) {
|
||||||
cur_frm.footer.help_area.innerHTML = '<p><a href="#Form/Jobs Email Settings">'+frappe._("Jobs Email Settings")+'</a><br>\
|
cur_frm.footer.help_area.innerHTML = '<p><a href="#Form/Jobs Email Settings">'+__("Jobs Email Settings")+'</a><br>\
|
||||||
<span class="help">'+frappe._('Automatically extract Job Applicants from a mail box ')+'e.g. "jobs@example.com"</span></p>';
|
<span class="help">'+__('Automatically extract Job Applicants from a mail box ')+'e.g. "jobs@example.com"</span></p>';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
refresh: function(doc) {
|
refresh: function(doc) {
|
||||||
|
@ -31,14 +31,14 @@ cur_frm.cscript.refresh = function(doc, dt, dn) {
|
|||||||
}
|
}
|
||||||
cur_frm.set_intro("");
|
cur_frm.set_intro("");
|
||||||
if(doc.__islocal && !in_list(user_roles, "HR User")) {
|
if(doc.__islocal && !in_list(user_roles, "HR User")) {
|
||||||
cur_frm.set_intro(frappe._("Fill the form and save it"))
|
cur_frm.set_intro(__("Fill the form and save it"))
|
||||||
} else {
|
} else {
|
||||||
if(doc.docstatus==0 && doc.status=="Open") {
|
if(doc.docstatus==0 && doc.status=="Open") {
|
||||||
if(user==doc.leave_approver) {
|
if(user==doc.leave_approver) {
|
||||||
cur_frm.set_intro(frappe._("You are the Leave Approver for this record. Please Update the 'Status' and Save"));
|
cur_frm.set_intro(__("You are the Leave Approver for this record. Please Update the 'Status' and Save"));
|
||||||
cur_frm.toggle_enable("status", true);
|
cur_frm.toggle_enable("status", true);
|
||||||
} else {
|
} else {
|
||||||
cur_frm.set_intro(frappe._("This Leave Application is pending approval. Only the Leave Apporver can update status."))
|
cur_frm.set_intro(__("This Leave Application is pending approval. Only the Leave Apporver can update status."))
|
||||||
cur_frm.toggle_enable("status", false);
|
cur_frm.toggle_enable("status", false);
|
||||||
if(!doc.__islocal) {
|
if(!doc.__islocal) {
|
||||||
cur_frm.frm_head.appframe.set_title_right("");
|
cur_frm.frm_head.appframe.set_title_right("");
|
||||||
@ -46,12 +46,12 @@ cur_frm.cscript.refresh = function(doc, dt, dn) {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if(doc.status=="Approved") {
|
if(doc.status=="Approved") {
|
||||||
cur_frm.set_intro(frappe._("Leave application has been approved."));
|
cur_frm.set_intro(__("Leave application has been approved."));
|
||||||
if(cur_frm.doc.docstatus==0) {
|
if(cur_frm.doc.docstatus==0) {
|
||||||
cur_frm.set_intro(frappe._("Please submit to update Leave Balance."));
|
cur_frm.set_intro(__("Please submit to update Leave Balance."));
|
||||||
}
|
}
|
||||||
} else if(doc.status=="Rejected") {
|
} else if(doc.status=="Rejected") {
|
||||||
cur_frm.set_intro(frappe._("Leave application has been rejected."));
|
cur_frm.set_intro(__("Leave application has been rejected."));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -85,7 +85,7 @@ cur_frm.cscript.from_date = function(doc, dt, dn) {
|
|||||||
|
|
||||||
cur_frm.cscript.to_date = function(doc, dt, dn) {
|
cur_frm.cscript.to_date = function(doc, dt, dn) {
|
||||||
if(cint(doc.half_day) == 1 && cstr(doc.from_date) && doc.from_date != doc.to_date){
|
if(cint(doc.half_day) == 1 && cstr(doc.from_date) && doc.from_date != doc.to_date){
|
||||||
msgprint(frappe._("To Date should be same as From Date for Half Day leave"));
|
msgprint(__("To Date should be same as From Date for Half Day leave"));
|
||||||
set_multiple(dt,dn,{to_date:doc.from_date});
|
set_multiple(dt,dn,{to_date:doc.from_date});
|
||||||
}
|
}
|
||||||
cur_frm.cscript.calculate_total_days(doc, dt, dn);
|
cur_frm.cscript.calculate_total_days(doc, dt, dn);
|
||||||
|
@ -13,7 +13,7 @@ cur_frm.cscript.to_date = function(doc, cdt, cdn) {
|
|||||||
function(r, rt) {
|
function(r, rt) {
|
||||||
var doc = locals[cdt][cdn];
|
var doc = locals[cdt][cdn];
|
||||||
if (r.message) {
|
if (r.message) {
|
||||||
msgprint(frappe._("To date cannot be before from date"));
|
msgprint(__("To date cannot be before from date"));
|
||||||
doc.to_date = '';
|
doc.to_date = '';
|
||||||
refresh_field('to_date');
|
refresh_field('to_date');
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@ var display_activity_log = function(msg) {
|
|||||||
if(!pscript.ss_html)
|
if(!pscript.ss_html)
|
||||||
pscript.ss_html = $a(cur_frm.fields_dict['activity_log'].wrapper,'div');
|
pscript.ss_html = $a(cur_frm.fields_dict['activity_log'].wrapper,'div');
|
||||||
pscript.ss_html.innerHTML =
|
pscript.ss_html.innerHTML =
|
||||||
'<div class="panel"><div class="panel-heading">'+frappe._("Activity Log:")+'</div>'+msg+'</div>';
|
'<div class="panel"><div class="panel-heading">'+__("Activity Log:")+'</div>'+msg+'</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
//Create salary slip
|
//Create salary slip
|
||||||
@ -19,7 +19,7 @@ cur_frm.cscript.create_salary_slip = function(doc, cdt, cdn) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
cur_frm.cscript.submit_salary_slip = function(doc, cdt, cdn) {
|
cur_frm.cscript.submit_salary_slip = function(doc, cdt, cdn) {
|
||||||
var check = confirm(frappe._("Do you really want to Submit all Salary Slip for month : ") + doc.month+ frappe._(" and fiscal year : ")+doc.fiscal_year);
|
var check = confirm(__("Do you really want to Submit all Salary Slip for month : ") + doc.month+ __(" and fiscal year : ")+doc.fiscal_year);
|
||||||
if(check){
|
if(check){
|
||||||
var callback = function(r, rt){
|
var callback = function(r, rt){
|
||||||
if (r.message)
|
if (r.message)
|
||||||
@ -33,7 +33,7 @@ cur_frm.cscript.make_bank_voucher = function(doc,cdt,cdn){
|
|||||||
if(doc.company && doc.month && doc.fiscal_year){
|
if(doc.company && doc.month && doc.fiscal_year){
|
||||||
cur_frm.cscript.make_jv(doc, cdt, cdn);
|
cur_frm.cscript.make_jv(doc, cdt, cdn);
|
||||||
} else {
|
} else {
|
||||||
msgprint(frappe._("Company, Month and Fiscal Year is mandatory"));
|
msgprint(__("Company, Month and Fiscal Year is mandatory"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -42,8 +42,8 @@ cur_frm.cscript.make_jv = function(doc, dt, dn) {
|
|||||||
var jv = frappe.model.make_new_doc_and_get_name('Journal Voucher');
|
var jv = frappe.model.make_new_doc_and_get_name('Journal Voucher');
|
||||||
jv = locals['Journal Voucher'][jv];
|
jv = locals['Journal Voucher'][jv];
|
||||||
jv.voucher_type = 'Bank Voucher';
|
jv.voucher_type = 'Bank Voucher';
|
||||||
jv.user_remark = frappe._('Payment of salary for the month: ') + doc.month +
|
jv.user_remark = __('Payment of salary for the month: ') + doc.month +
|
||||||
frappe._(' and fiscal year: ') + doc.fiscal_year;
|
__(' and fiscal year: ') + doc.fiscal_year;
|
||||||
jv.fiscal_year = doc.fiscal_year;
|
jv.fiscal_year = doc.fiscal_year;
|
||||||
jv.company = doc.company;
|
jv.company = doc.company;
|
||||||
jv.posting_date = dateutil.obj_to_str(new Date());
|
jv.posting_date = dateutil.obj_to_str(new Date());
|
||||||
|
@ -12,7 +12,7 @@ cur_frm.cscript.onload = function(doc, dt, dn){
|
|||||||
|
|
||||||
cur_frm.cscript.refresh = function(doc, dt, dn){
|
cur_frm.cscript.refresh = function(doc, dt, dn){
|
||||||
if((!doc.__islocal) && (doc.is_active == 'Yes')){
|
if((!doc.__islocal) && (doc.is_active == 'Yes')){
|
||||||
cur_frm.add_custom_button(frappe._('Make Salary Slip'), cur_frm.cscript['Make Salary Slip']);
|
cur_frm.add_custom_button(__('Make Salary Slip'), cur_frm.cscript['Make Salary Slip']);
|
||||||
}
|
}
|
||||||
|
|
||||||
cur_frm.toggle_enable('employee', doc.__islocal);
|
cur_frm.toggle_enable('employee', doc.__islocal);
|
||||||
|
@ -17,7 +17,7 @@ erpnext.hr.AttendanceControlPanel = frappe.ui.form.Controller.extend({
|
|||||||
|
|
||||||
get_template:function() {
|
get_template:function() {
|
||||||
if(!this.frm.doc.att_fr_date || !this.frm.doc.att_to_date) {
|
if(!this.frm.doc.att_fr_date || !this.frm.doc.att_to_date) {
|
||||||
msgprint(frappe._("Attendance From Date and Attendance To Date is mandatory"));
|
msgprint(__("Attendance From Date and Attendance To Date is mandatory"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
window.location.href = repl(frappe.request.url +
|
window.location.href = repl(frappe.request.url +
|
||||||
@ -56,10 +56,10 @@ erpnext.hr.AttendanceControlPanel = frappe.ui.form.Controller.extend({
|
|||||||
return v;
|
return v;
|
||||||
});
|
});
|
||||||
|
|
||||||
r.messages = ["<h4 style='color:red'>"+frappe._("Import Failed!")+"</h4>"]
|
r.messages = ["<h4 style='color:red'>"+__("Import Failed!")+"</h4>"]
|
||||||
.concat(r.messages)
|
.concat(r.messages)
|
||||||
} else {
|
} else {
|
||||||
r.messages = ["<h4 style='color:green'>"+frappe._("Import Successful!")+"</h4>"].
|
r.messages = ["<h4 style='color:green'>"+__("Import Successful!")+"</h4>"].
|
||||||
concat(r.message.messages)
|
concat(r.message.messages)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@ frappe.query_reports["Employee Birthday"] = {
|
|||||||
"filters": [
|
"filters": [
|
||||||
{
|
{
|
||||||
"fieldname":"month",
|
"fieldname":"month",
|
||||||
"label": frappe._("Month"),
|
"label": __("Month"),
|
||||||
"fieldtype": "Select",
|
"fieldtype": "Select",
|
||||||
"options": "Jan\nFeb\nMar\nApr\nMay\nJun\nJul\nAug\nSep\nOct\nNov\nDec",
|
"options": "Jan\nFeb\nMar\nApr\nMay\nJun\nJul\nAug\nSep\nOct\nNov\nDec",
|
||||||
"default": ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov",
|
"default": ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov",
|
||||||
@ -13,7 +13,7 @@ frappe.query_reports["Employee Birthday"] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname":"company",
|
"fieldname":"company",
|
||||||
"label": frappe._("Company"),
|
"label": __("Company"),
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"options": "Company",
|
"options": "Company",
|
||||||
"default": frappe.defaults.get_user_default("company")
|
"default": frappe.defaults.get_user_default("company")
|
||||||
|
@ -5,14 +5,14 @@ frappe.query_reports["Employee Leave Balance"] = {
|
|||||||
"filters": [
|
"filters": [
|
||||||
{
|
{
|
||||||
"fieldname":"fiscal_year",
|
"fieldname":"fiscal_year",
|
||||||
"label": frappe._("Fiscal Year"),
|
"label": __("Fiscal Year"),
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"options": "Fiscal Year",
|
"options": "Fiscal Year",
|
||||||
"default": frappe.defaults.get_user_default("fiscal_year")
|
"default": frappe.defaults.get_user_default("fiscal_year")
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname":"company",
|
"fieldname":"company",
|
||||||
"label": frappe._("Company"),
|
"label": __("Company"),
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"options": "Company",
|
"options": "Company",
|
||||||
"default": frappe.defaults.get_user_default("company")
|
"default": frappe.defaults.get_user_default("company")
|
||||||
|
@ -5,7 +5,7 @@ frappe.query_reports["Monthly Attendance Sheet"] = {
|
|||||||
"filters": [
|
"filters": [
|
||||||
{
|
{
|
||||||
"fieldname":"month",
|
"fieldname":"month",
|
||||||
"label": frappe._("Month"),
|
"label": __("Month"),
|
||||||
"fieldtype": "Select",
|
"fieldtype": "Select",
|
||||||
"options": "Jan\nFeb\nMar\nApr\nMay\nJun\nJul\nAug\nSep\nOct\nNov\nDec",
|
"options": "Jan\nFeb\nMar\nApr\nMay\nJun\nJul\nAug\nSep\nOct\nNov\nDec",
|
||||||
"default": ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov",
|
"default": ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov",
|
||||||
@ -13,20 +13,20 @@ frappe.query_reports["Monthly Attendance Sheet"] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname":"fiscal_year",
|
"fieldname":"fiscal_year",
|
||||||
"label": frappe._("Fiscal Year"),
|
"label": __("Fiscal Year"),
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"options": "Fiscal Year",
|
"options": "Fiscal Year",
|
||||||
"default": sys_defaults.fiscal_year,
|
"default": sys_defaults.fiscal_year,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname":"employee",
|
"fieldname":"employee",
|
||||||
"label": frappe._("Employee"),
|
"label": __("Employee"),
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"options": "Employee"
|
"options": "Employee"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname":"company",
|
"fieldname":"company",
|
||||||
"label": frappe._("Company"),
|
"label": __("Company"),
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"options": "Company",
|
"options": "Company",
|
||||||
"default": frappe.defaults.get_user_default("company")
|
"default": frappe.defaults.get_user_default("company")
|
||||||
|
@ -5,7 +5,7 @@ frappe.query_reports["Monthly Salary Register"] = {
|
|||||||
"filters": [
|
"filters": [
|
||||||
{
|
{
|
||||||
"fieldname":"month",
|
"fieldname":"month",
|
||||||
"label": frappe._("Month"),
|
"label": __("Month"),
|
||||||
"fieldtype": "Select",
|
"fieldtype": "Select",
|
||||||
"options": "\nJan\nFeb\nMar\nApr\nMay\nJun\nJul\nAug\nSep\nOct\nNov\nDec",
|
"options": "\nJan\nFeb\nMar\nApr\nMay\nJun\nJul\nAug\nSep\nOct\nNov\nDec",
|
||||||
"default": ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov",
|
"default": ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov",
|
||||||
@ -13,20 +13,20 @@ frappe.query_reports["Monthly Salary Register"] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname":"fiscal_year",
|
"fieldname":"fiscal_year",
|
||||||
"label": frappe._("Fiscal Year"),
|
"label": __("Fiscal Year"),
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"options": "Fiscal Year",
|
"options": "Fiscal Year",
|
||||||
"default": sys_defaults.fiscal_year,
|
"default": sys_defaults.fiscal_year,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname":"employee",
|
"fieldname":"employee",
|
||||||
"label": frappe._("Employee"),
|
"label": __("Employee"),
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"options": "Employee"
|
"options": "Employee"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname":"company",
|
"fieldname":"company",
|
||||||
"label": frappe._("Company"),
|
"label": __("Company"),
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"options": "Company",
|
"options": "Company",
|
||||||
"default": frappe.defaults.get_user_default("company")
|
"default": frappe.defaults.get_user_default("company")
|
||||||
|
@ -6,7 +6,7 @@ cur_frm.cscript.refresh = function(doc,dt,dn){
|
|||||||
cur_frm.toggle_enable("item", doc.__islocal);
|
cur_frm.toggle_enable("item", doc.__islocal);
|
||||||
|
|
||||||
if (!doc.__islocal && doc.docstatus<2) {
|
if (!doc.__islocal && doc.docstatus<2) {
|
||||||
cur_frm.add_custom_button(frappe._("Update Cost"), cur_frm.cscript.update_cost);
|
cur_frm.add_custom_button(__("Update Cost"), cur_frm.cscript.update_cost);
|
||||||
}
|
}
|
||||||
|
|
||||||
cur_frm.cscript.with_operations(doc);
|
cur_frm.cscript.with_operations(doc);
|
||||||
@ -123,7 +123,7 @@ cur_frm.cscript.qty = function(doc, cdt, cdn) {
|
|||||||
cur_frm.cscript.rate = function(doc, cdt, cdn) {
|
cur_frm.cscript.rate = function(doc, cdt, cdn) {
|
||||||
var d = locals[cdt][cdn];
|
var d = locals[cdt][cdn];
|
||||||
if (d.bom_no) {
|
if (d.bom_no) {
|
||||||
msgprint(frappe._("You can not change rate if BOM mentioned agianst any item"));
|
msgprint(__("You can not change rate if BOM mentioned agianst any item"));
|
||||||
get_bom_material_detail(doc, cdt, cdn);
|
get_bom_material_detail(doc, cdt, cdn);
|
||||||
} else {
|
} else {
|
||||||
calculate_rm_cost(doc);
|
calculate_rm_cost(doc);
|
||||||
|
@ -17,13 +17,13 @@ $.extend(cur_frm.cscript, {
|
|||||||
cfn_set_fields(doc, dt, dn);
|
cfn_set_fields(doc, dt, dn);
|
||||||
|
|
||||||
if (doc.docstatus === 0 && !doc.__islocal) {
|
if (doc.docstatus === 0 && !doc.__islocal) {
|
||||||
this.frm.set_intro(frappe._("Submit this Production Order for further processing."));
|
this.frm.set_intro(__("Submit this Production Order for further processing."));
|
||||||
} else if (doc.docstatus === 1) {
|
} else if (doc.docstatus === 1) {
|
||||||
var percent = flt(doc.produced_qty) / flt(doc.qty) * 100;
|
var percent = flt(doc.produced_qty) / flt(doc.qty) * 100;
|
||||||
this.frm.dashboard.add_progress(cint(percent) + "% " + frappe._("Complete"), percent);
|
this.frm.dashboard.add_progress(cint(percent) + "% " + __("Complete"), percent);
|
||||||
|
|
||||||
if(doc.status === "Stopped") {
|
if(doc.status === "Stopped") {
|
||||||
this.frm.dashboard.set_headline_alert(frappe._("Stopped"), "alert-danger", "icon-stop");
|
this.frm.dashboard.set_headline_alert(__("Stopped"), "alert-danger", "icon-stop");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -55,20 +55,20 @@ $.extend(cur_frm.cscript, {
|
|||||||
var cfn_set_fields = function(doc, dt, dn) {
|
var cfn_set_fields = function(doc, dt, dn) {
|
||||||
if (doc.docstatus == 1) {
|
if (doc.docstatus == 1) {
|
||||||
if (doc.status != 'Stopped' && doc.status != 'Completed')
|
if (doc.status != 'Stopped' && doc.status != 'Completed')
|
||||||
cur_frm.add_custom_button(frappe._('Stop!'), cur_frm.cscript['Stop Production Order'], "icon-exclamation");
|
cur_frm.add_custom_button(__('Stop!'), cur_frm.cscript['Stop Production Order'], "icon-exclamation");
|
||||||
else if (doc.status == 'Stopped')
|
else if (doc.status == 'Stopped')
|
||||||
cur_frm.add_custom_button(frappe._('Unstop'), cur_frm.cscript['Unstop Production Order'], "icon-check");
|
cur_frm.add_custom_button(__('Unstop'), cur_frm.cscript['Unstop Production Order'], "icon-check");
|
||||||
|
|
||||||
if (doc.status == 'Submitted' || doc.status == 'Material Transferred' || doc.status == 'In Process'){
|
if (doc.status == 'Submitted' || doc.status == 'Material Transferred' || doc.status == 'In Process'){
|
||||||
cur_frm.add_custom_button(frappe._('Transfer Raw Materials'), cur_frm.cscript['Transfer Raw Materials']);
|
cur_frm.add_custom_button(__('Transfer Raw Materials'), cur_frm.cscript['Transfer Raw Materials']);
|
||||||
cur_frm.add_custom_button(frappe._('Update Finished Goods'), cur_frm.cscript['Update Finished Goods']);
|
cur_frm.add_custom_button(__('Update Finished Goods'), cur_frm.cscript['Update Finished Goods']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
cur_frm.cscript['Stop Production Order'] = function() {
|
cur_frm.cscript['Stop Production Order'] = function() {
|
||||||
var doc = cur_frm.doc;
|
var doc = cur_frm.doc;
|
||||||
var check = confirm(frappe._("Do you really want to stop production order: " + doc.name));
|
var check = confirm(__("Do you really want to stop production order: " + doc.name));
|
||||||
if (check) {
|
if (check) {
|
||||||
return $c_obj(doc, 'stop_unstop', 'Stopped', function(r, rt) {cur_frm.refresh();});
|
return $c_obj(doc, 'stop_unstop', 'Stopped', function(r, rt) {cur_frm.refresh();});
|
||||||
}
|
}
|
||||||
@ -76,7 +76,7 @@ cur_frm.cscript['Stop Production Order'] = function() {
|
|||||||
|
|
||||||
cur_frm.cscript['Unstop Production Order'] = function() {
|
cur_frm.cscript['Unstop Production Order'] = function() {
|
||||||
var doc = cur_frm.doc;
|
var doc = cur_frm.doc;
|
||||||
var check = confirm(frappe._("Do really want to unstop production order: " + doc.name));
|
var check = confirm(__("Do really want to unstop production order: " + doc.name));
|
||||||
if (check)
|
if (check)
|
||||||
return $c_obj(doc, 'stop_unstop', 'Unstopped', function(r, rt) {cur_frm.refresh();});
|
return $c_obj(doc, 'stop_unstop', 'Unstopped', function(r, rt) {cur_frm.refresh();});
|
||||||
}
|
}
|
||||||
@ -111,5 +111,5 @@ cur_frm.set_query("bom_no", function(doc) {
|
|||||||
query: "erpnext.controllers.queries.bom",
|
query: "erpnext.controllers.queries.bom",
|
||||||
filters: {item: cstr(doc.production_item)}
|
filters: {item: cstr(doc.production_item)}
|
||||||
}
|
}
|
||||||
} else msgprint(frappe._("Please enter Production Item first"));
|
} else msgprint(__("Please enter Production Item first"));
|
||||||
});
|
});
|
@ -44,7 +44,7 @@ cur_frm.fields_dict['pp_details'].grid.get_field('bom_no').get_query = function(
|
|||||||
query: "erpnext.controllers.queries.bom",
|
query: "erpnext.controllers.queries.bom",
|
||||||
filters:{'item': cstr(d.item_code)}
|
filters:{'item': cstr(d.item_code)}
|
||||||
}
|
}
|
||||||
} else msgprint(frappe._("Please enter Item first"));
|
} else msgprint(__("Please enter Item first"));
|
||||||
}
|
}
|
||||||
|
|
||||||
cur_frm.fields_dict.customer.get_query = function(doc,cdt,cdn) {
|
cur_frm.fields_dict.customer.get_query = function(doc,cdt,cdn) {
|
||||||
|
@ -4,11 +4,11 @@
|
|||||||
// show tasks
|
// show tasks
|
||||||
cur_frm.cscript.refresh = function(doc) {
|
cur_frm.cscript.refresh = function(doc) {
|
||||||
if(!doc.__islocal) {
|
if(!doc.__islocal) {
|
||||||
cur_frm.appframe.add_button(frappe._("Gantt Chart"), function() {
|
cur_frm.appframe.add_button(__("Gantt Chart"), function() {
|
||||||
frappe.route_options = {"project": doc.name}
|
frappe.route_options = {"project": doc.name}
|
||||||
frappe.set_route("Gantt", "Task");
|
frappe.set_route("Gantt", "Task");
|
||||||
}, "icon-tasks");
|
}, "icon-tasks");
|
||||||
cur_frm.add_custom_button(frappe._("Tasks"), function() {
|
cur_frm.add_custom_button(__("Tasks"), function() {
|
||||||
frappe.route_options = {"project": doc.name}
|
frappe.route_options = {"project": doc.name}
|
||||||
frappe.set_route("List", "Task");
|
frappe.set_route("List", "Task");
|
||||||
}, "icon-list");
|
}, "icon-list");
|
||||||
|
@ -6,7 +6,7 @@ frappe.views.calendar["Task"] = {
|
|||||||
"start": "exp_start_date",
|
"start": "exp_start_date",
|
||||||
"end": "exp_end_date",
|
"end": "exp_end_date",
|
||||||
"id": "name",
|
"id": "name",
|
||||||
"title": frappe._("subject"),
|
"title": __("subject"),
|
||||||
"allDay": "allDay"
|
"allDay": "allDay"
|
||||||
},
|
},
|
||||||
gantt: true,
|
gantt: true,
|
||||||
@ -15,7 +15,7 @@ frappe.views.calendar["Task"] = {
|
|||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"fieldname": "project",
|
"fieldname": "project",
|
||||||
"options": "Project",
|
"options": "Project",
|
||||||
"label": frappe._("Project")
|
"label": __("Project")
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
get_events_method: "erpnext.projects.doctype.task.task.get_events"
|
get_events_method: "erpnext.projects.doctype.task.task.get_events"
|
||||||
|
@ -6,22 +6,22 @@ frappe.listview_settings['Time Log'] = {
|
|||||||
add_fields: ["`tabTime Log`.`status`", "`tabTime Log`.`billable`", "`tabTime Log`.`activity_type`"],
|
add_fields: ["`tabTime Log`.`status`", "`tabTime Log`.`billable`", "`tabTime Log`.`activity_type`"],
|
||||||
selectable: true,
|
selectable: true,
|
||||||
onload: function(me) {
|
onload: function(me) {
|
||||||
me.appframe.add_button(frappe._("Make Time Log Batch"), function() {
|
me.appframe.add_button(__("Make Time Log Batch"), function() {
|
||||||
var selected = me.get_checked_items() || [];
|
var selected = me.get_checked_items() || [];
|
||||||
|
|
||||||
if(!selected.length) {
|
if(!selected.length) {
|
||||||
msgprint(frappe._("Please select Time Logs."))
|
msgprint(__("Please select Time Logs."))
|
||||||
}
|
}
|
||||||
|
|
||||||
// select only billable time logs
|
// select only billable time logs
|
||||||
for(var i in selected) {
|
for(var i in selected) {
|
||||||
var d = selected[i];
|
var d = selected[i];
|
||||||
if(!d.billable) {
|
if(!d.billable) {
|
||||||
msgprint(frappe._("Time Log is not billable") + ": " + d.name);
|
msgprint(__("Time Log is not billable") + ": " + d.name);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(d.status!="Submitted") {
|
if(d.status!="Submitted") {
|
||||||
msgprint(frappe._("Time Log Status must be Submitted."));
|
msgprint(__("Time Log Status must be Submitted."));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -18,14 +18,14 @@ cur_frm.set_query("time_log", "time_log_batch_details", function(doc) {
|
|||||||
$.extend(cur_frm.cscript, {
|
$.extend(cur_frm.cscript, {
|
||||||
refresh: function(doc) {
|
refresh: function(doc) {
|
||||||
cur_frm.set_intro({
|
cur_frm.set_intro({
|
||||||
"Draft": frappe._("Select Time Logs and Submit to create a new Sales Invoice."),
|
"Draft": __("Select Time Logs and Submit to create a new Sales Invoice."),
|
||||||
"Submitted": frappe._("Click on 'Make Sales Invoice' button to create a new Sales Invoice."),
|
"Submitted": __("Click on 'Make Sales Invoice' button to create a new Sales Invoice."),
|
||||||
"Billed": frappe._("This Time Log Batch has been billed."),
|
"Billed": __("This Time Log Batch has been billed."),
|
||||||
"Cancelled": frappe._("This Time Log Batch has been cancelled.")
|
"Cancelled": __("This Time Log Batch has been cancelled.")
|
||||||
}[doc.status]);
|
}[doc.status]);
|
||||||
|
|
||||||
if(doc.status=="Submitted") {
|
if(doc.status=="Submitted") {
|
||||||
cur_frm.add_custom_button(frappe._("Make Sales Invoice"), function() { cur_frm.cscript.make_invoice() },
|
cur_frm.add_custom_button(__("Make Sales Invoice"), function() { cur_frm.cscript.make_invoice() },
|
||||||
"icon-file-alt");
|
"icon-file-alt");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -5,13 +5,13 @@ frappe.query_reports["Daily Time Log Summary"] = {
|
|||||||
"filters": [
|
"filters": [
|
||||||
{
|
{
|
||||||
"fieldname":"from_date",
|
"fieldname":"from_date",
|
||||||
"label": frappe._("From Date"),
|
"label": __("From Date"),
|
||||||
"fieldtype": "Date",
|
"fieldtype": "Date",
|
||||||
"default": frappe.datetime.get_today()
|
"default": frappe.datetime.get_today()
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname":"to_date",
|
"fieldname":"to_date",
|
||||||
"label": frappe._("To Date"),
|
"label": __("To Date"),
|
||||||
"fieldtype": "Date",
|
"fieldtype": "Date",
|
||||||
"default": frappe.datetime.get_today()
|
"default": frappe.datetime.get_today()
|
||||||
},
|
},
|
||||||
|
@ -37,39 +37,39 @@ erpnext.AccountTreeGrid = frappe.views.TreeGridReport.extend({
|
|||||||
},
|
},
|
||||||
setup_columns: function() {
|
setup_columns: function() {
|
||||||
this.columns = [
|
this.columns = [
|
||||||
{id: "name", name: frappe._("Account"), field: "name", width: 300, cssClass: "cell-title",
|
{id: "name", name: __("Account"), field: "name", width: 300, cssClass: "cell-title",
|
||||||
formatter: this.tree_formatter},
|
formatter: this.tree_formatter},
|
||||||
{id: "opening_dr", name: frappe._("Opening (Dr)"), field: "opening_dr", width: 100,
|
{id: "opening_dr", name: __("Opening (Dr)"), field: "opening_dr", width: 100,
|
||||||
formatter: this.currency_formatter},
|
formatter: this.currency_formatter},
|
||||||
{id: "opening_cr", name: frappe._("Opening (Cr)"), field: "opening_cr", width: 100,
|
{id: "opening_cr", name: __("Opening (Cr)"), field: "opening_cr", width: 100,
|
||||||
formatter: this.currency_formatter},
|
formatter: this.currency_formatter},
|
||||||
{id: "debit", name: frappe._("Debit"), field: "debit", width: 100,
|
{id: "debit", name: __("Debit"), field: "debit", width: 100,
|
||||||
formatter: this.currency_formatter},
|
formatter: this.currency_formatter},
|
||||||
{id: "credit", name: frappe._("Credit"), field: "credit", width: 100,
|
{id: "credit", name: __("Credit"), field: "credit", width: 100,
|
||||||
formatter: this.currency_formatter},
|
formatter: this.currency_formatter},
|
||||||
{id: "closing_dr", name: frappe._("Closing (Dr)"), field: "closing_dr", width: 100,
|
{id: "closing_dr", name: __("Closing (Dr)"), field: "closing_dr", width: 100,
|
||||||
formatter: this.currency_formatter},
|
formatter: this.currency_formatter},
|
||||||
{id: "closing_cr", name: frappe._("Closing (Cr)"), field: "closing_cr", width: 100,
|
{id: "closing_cr", name: __("Closing (Cr)"), field: "closing_cr", width: 100,
|
||||||
formatter: this.currency_formatter}
|
formatter: this.currency_formatter}
|
||||||
];
|
];
|
||||||
|
|
||||||
},
|
},
|
||||||
filters: [
|
filters: [
|
||||||
{fieldtype: "Select", label: frappe._("Company"), link:"Company", default_value: "Select Company...",
|
{fieldtype: "Select", label: __("Company"), link:"Company", default_value: "Select Company...",
|
||||||
filter: function(val, item, opts, me) {
|
filter: function(val, item, opts, me) {
|
||||||
if (item.company == val || val == opts.default_value) {
|
if (item.company == val || val == opts.default_value) {
|
||||||
return me.apply_zero_filter(val, item, opts, me);
|
return me.apply_zero_filter(val, item, opts, me);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}},
|
}},
|
||||||
{fieldtype: "Select", label: frappe._("Fiscal Year"), link:"Fiscal Year",
|
{fieldtype: "Select", label: __("Fiscal Year"), link:"Fiscal Year",
|
||||||
default_value: "Select Fiscal Year..."},
|
default_value: "Select Fiscal Year..."},
|
||||||
{fieldtype: "Date", label: frappe._("From Date")},
|
{fieldtype: "Date", label: __("From Date")},
|
||||||
{fieldtype: "Label", label: frappe._("To")},
|
{fieldtype: "Label", label: __("To")},
|
||||||
{fieldtype: "Date", label: frappe._("To Date")},
|
{fieldtype: "Date", label: __("To Date")},
|
||||||
{fieldtype: "Button", label: frappe._("Refresh"), icon:"icon-refresh icon-white",
|
{fieldtype: "Button", label: __("Refresh"), icon:"icon-refresh icon-white",
|
||||||
cssClass:"btn-info"},
|
cssClass:"btn-info"},
|
||||||
{fieldtype: "Button", label: frappe._("Reset Filters")},
|
{fieldtype: "Button", label: __("Reset Filters")},
|
||||||
],
|
],
|
||||||
setup_filters: function() {
|
setup_filters: function() {
|
||||||
this._super();
|
this._super();
|
||||||
@ -207,7 +207,7 @@ erpnext.AccountTreeGrid = frappe.views.TreeGridReport.extend({
|
|||||||
|
|
||||||
set_fiscal_year: function() {
|
set_fiscal_year: function() {
|
||||||
if (this.opening_date > this.closing_date) {
|
if (this.opening_date > this.closing_date) {
|
||||||
msgprint(frappe._("Opening Date should be before Closing Date"));
|
msgprint(__("Opening Date should be before Closing Date"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -221,7 +221,7 @@ erpnext.AccountTreeGrid = frappe.views.TreeGridReport.extend({
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (!this.fiscal_year) {
|
if (!this.fiscal_year) {
|
||||||
msgprint(frappe._("Opening Date and Closing Date should be within same Fiscal Year"));
|
msgprint(__("Opening Date and Closing Date should be within same Fiscal Year"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -23,12 +23,12 @@ $(document).bind('toolbar_setup', function() {
|
|||||||
frappe.provide('frappe.ui.misc');
|
frappe.provide('frappe.ui.misc');
|
||||||
frappe.ui.misc.about = function() {
|
frappe.ui.misc.about = function() {
|
||||||
if(!frappe.ui.misc.about_dialog) {
|
if(!frappe.ui.misc.about_dialog) {
|
||||||
var d = new frappe.ui.Dialog({title: frappe._('About')})
|
var d = new frappe.ui.Dialog({title: __('About')})
|
||||||
|
|
||||||
$(d.body).html(repl("<div>\
|
$(d.body).html(repl("<div>\
|
||||||
<h2>ERPNext</h2> \
|
<h2>ERPNext</h2> \
|
||||||
<p>"+frappe._("An open source ERP made for the web.</p>") +
|
<p>"+__("An open source ERP made for the web.</p>") +
|
||||||
"<p>"+frappe._("To report an issue, go to ")+"<a href='https://github.com/frappe/erpnext/issues'>GitHub Issues</a></p> \
|
"<p>"+__("To report an issue, go to ")+"<a href='https://github.com/frappe/erpnext/issues'>GitHub Issues</a></p> \
|
||||||
<p><a href='http://erpnext.org' target='_blank'>http://erpnext.org</a>.</p>\
|
<p><a href='http://erpnext.org' target='_blank'>http://erpnext.org</a>.</p>\
|
||||||
<p><a href='http://www.gnu.org/copyleft/gpl.html'>License: GNU General Public License Version 3</a></p>\
|
<p><a href='http://www.gnu.org/copyleft/gpl.html'>License: GNU General Public License Version 3</a></p>\
|
||||||
<hr>\
|
<hr>\
|
||||||
|
@ -7,7 +7,7 @@ erpnext.stock.StockController = frappe.ui.form.Controller.extend({
|
|||||||
show_stock_ledger: function() {
|
show_stock_ledger: function() {
|
||||||
var me = this;
|
var me = this;
|
||||||
if(this.frm.doc.docstatus===1) {
|
if(this.frm.doc.docstatus===1) {
|
||||||
this.frm.appframe.add_button(frappe._("Stock Ledger"), function() {
|
this.frm.appframe.add_button(__("Stock Ledger"), function() {
|
||||||
frappe.route_options = {
|
frappe.route_options = {
|
||||||
voucher_no: me.frm.doc.name,
|
voucher_no: me.frm.doc.name,
|
||||||
from_date: me.frm.doc.posting_date,
|
from_date: me.frm.doc.posting_date,
|
||||||
@ -23,7 +23,7 @@ erpnext.stock.StockController = frappe.ui.form.Controller.extend({
|
|||||||
show_general_ledger: function() {
|
show_general_ledger: function() {
|
||||||
var me = this;
|
var me = this;
|
||||||
if(this.frm.doc.docstatus===1 && cint(frappe.defaults.get_default("auto_accounting_for_stock"))) {
|
if(this.frm.doc.docstatus===1 && cint(frappe.defaults.get_default("auto_accounting_for_stock"))) {
|
||||||
cur_frm.appframe.add_button(frappe._('Accounting Ledger'), function() {
|
cur_frm.appframe.add_button(__('Accounting Ledger'), function() {
|
||||||
frappe.route_options = {
|
frappe.route_options = {
|
||||||
voucher_no: me.frm.doc.name,
|
voucher_no: me.frm.doc.name,
|
||||||
from_date: me.frm.doc.posting_date,
|
from_date: me.frm.doc.posting_date,
|
||||||
|
@ -198,7 +198,7 @@ $(document).bind('form_refresh', function() {
|
|||||||
} else if(cur_frm.fields_dict[fort]) {
|
} else if(cur_frm.fields_dict[fort]) {
|
||||||
cur_frm.fields_dict[fort].grid.set_column_disp(pscript.feature_dict[sys_feat][cur_frm.doc.doctype][fort], false);
|
cur_frm.fields_dict[fort].grid.set_column_disp(pscript.feature_dict[sys_feat][cur_frm.doc.doctype][fort], false);
|
||||||
} else {
|
} else {
|
||||||
msgprint(frappe._('Grid "')+fort+frappe._('" does not exists'));
|
msgprint(__('Grid "')+fort+__('" does not exists'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,35 +5,35 @@ var get_filters = function(){
|
|||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
"fieldname":"period",
|
"fieldname":"period",
|
||||||
"label": frappe._("Period"),
|
"label": __("Period"),
|
||||||
"fieldtype": "Select",
|
"fieldtype": "Select",
|
||||||
"options": ["Monthly", "Quarterly", "Half-Yearly", "Yearly"].join("\n"),
|
"options": ["Monthly", "Quarterly", "Half-Yearly", "Yearly"].join("\n"),
|
||||||
"default": "Monthly"
|
"default": "Monthly"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname":"based_on",
|
"fieldname":"based_on",
|
||||||
"label": frappe._("Based On"),
|
"label": __("Based On"),
|
||||||
"fieldtype": "Select",
|
"fieldtype": "Select",
|
||||||
"options": ["Item", "Item Group", "Supplier", "Supplier Type", "Project"].join("\n"),
|
"options": ["Item", "Item Group", "Supplier", "Supplier Type", "Project"].join("\n"),
|
||||||
"default": "Item"
|
"default": "Item"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname":"group_by",
|
"fieldname":"group_by",
|
||||||
"label": frappe._("Group By"),
|
"label": __("Group By"),
|
||||||
"fieldtype": "Select",
|
"fieldtype": "Select",
|
||||||
"options": ["Item", "Supplier"].join("\n"),
|
"options": ["Item", "Supplier"].join("\n"),
|
||||||
"default": ""
|
"default": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname":"fiscal_year",
|
"fieldname":"fiscal_year",
|
||||||
"label": frappe._("Fiscal Year"),
|
"label": __("Fiscal Year"),
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"options":'Fiscal Year',
|
"options":'Fiscal Year',
|
||||||
"default": sys_defaults.fiscal_year
|
"default": sys_defaults.fiscal_year
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname":"company",
|
"fieldname":"company",
|
||||||
"label": frappe._("Company"),
|
"label": __("Company"),
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"options": "Company",
|
"options": "Company",
|
||||||
"default": frappe.defaults.get_user_default("company")
|
"default": frappe.defaults.get_user_default("company")
|
||||||
|
@ -38,8 +38,8 @@ $.extend(erpnext.queries, {
|
|||||||
|
|
||||||
customer_filter: function(doc) {
|
customer_filter: function(doc) {
|
||||||
if(!doc.customer) {
|
if(!doc.customer) {
|
||||||
frappe.throw(frappe._("Please specify a") + " " +
|
frappe.throw(__("Please specify a") + " " +
|
||||||
frappe._(frappe.meta.get_label(doc.doctype, "customer", doc.name)));
|
__(frappe.meta.get_label(doc.doctype, "customer", doc.name)));
|
||||||
}
|
}
|
||||||
|
|
||||||
return { filters: { customer: doc.customer } };
|
return { filters: { customer: doc.customer } };
|
||||||
@ -47,8 +47,8 @@ $.extend(erpnext.queries, {
|
|||||||
|
|
||||||
supplier_filter: function(doc) {
|
supplier_filter: function(doc) {
|
||||||
if(!doc.supplier) {
|
if(!doc.supplier) {
|
||||||
frappe.throw(frappe._("Please specify a") + " " +
|
frappe.throw(__("Please specify a") + " " +
|
||||||
frappe._(frappe.meta.get_label(doc.doctype, "supplier", doc.name)));
|
__(frappe.meta.get_label(doc.doctype, "supplier", doc.name)));
|
||||||
}
|
}
|
||||||
|
|
||||||
return { filters: { supplier: doc.supplier } };
|
return { filters: { supplier: doc.supplier } };
|
||||||
@ -56,8 +56,8 @@ $.extend(erpnext.queries, {
|
|||||||
|
|
||||||
lead_filter: function(doc) {
|
lead_filter: function(doc) {
|
||||||
if(!doc.lead) {
|
if(!doc.lead) {
|
||||||
frappe.throw(frappe._("Please specify a") + " " +
|
frappe.throw(__("Please specify a") + " " +
|
||||||
frappe._(frappe.meta.get_label(doc.doctype, "lead", doc.name)));
|
__(frappe.meta.get_label(doc.doctype, "lead", doc.name)));
|
||||||
}
|
}
|
||||||
|
|
||||||
return { filters: { lead: doc.lead } };
|
return { filters: { lead: doc.lead } };
|
||||||
|
@ -5,35 +5,35 @@ var get_filters = function(){
|
|||||||
return[
|
return[
|
||||||
{
|
{
|
||||||
"fieldname":"period",
|
"fieldname":"period",
|
||||||
"label": frappe._("Period"),
|
"label": __("Period"),
|
||||||
"fieldtype": "Select",
|
"fieldtype": "Select",
|
||||||
"options": ["Monthly", "Quarterly", "Half-Yearly", "Yearly"].join("\n"),
|
"options": ["Monthly", "Quarterly", "Half-Yearly", "Yearly"].join("\n"),
|
||||||
"default": "Monthly"
|
"default": "Monthly"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname":"based_on",
|
"fieldname":"based_on",
|
||||||
"label": frappe._("Based On"),
|
"label": __("Based On"),
|
||||||
"fieldtype": "Select",
|
"fieldtype": "Select",
|
||||||
"options": ["Item", "Item Group", "Customer", "Customer Group", "Territory", "Project"].join("\n"),
|
"options": ["Item", "Item Group", "Customer", "Customer Group", "Territory", "Project"].join("\n"),
|
||||||
"default": "Item"
|
"default": "Item"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname":"group_by",
|
"fieldname":"group_by",
|
||||||
"label": frappe._("Group By"),
|
"label": __("Group By"),
|
||||||
"fieldtype": "Select",
|
"fieldtype": "Select",
|
||||||
"options": ["Item", "Customer"].join("\n"),
|
"options": ["Item", "Customer"].join("\n"),
|
||||||
"default": ""
|
"default": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname":"fiscal_year",
|
"fieldname":"fiscal_year",
|
||||||
"label": frappe._("Fiscal Year"),
|
"label": __("Fiscal Year"),
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"options":'Fiscal Year',
|
"options":'Fiscal Year',
|
||||||
"default": sys_defaults.fiscal_year
|
"default": sys_defaults.fiscal_year
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname":"company",
|
"fieldname":"company",
|
||||||
"label": frappe._("Company"),
|
"label": __("Company"),
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"options": "Company",
|
"options": "Company",
|
||||||
"default": frappe.defaults.get_user_default("company")
|
"default": frappe.defaults.get_user_default("company")
|
||||||
|
@ -3,5 +3,5 @@
|
|||||||
|
|
||||||
// start
|
// start
|
||||||
$(document).on('startup', function() {
|
$(document).on('startup', function() {
|
||||||
console.log(frappe._('Starting up...'));
|
console.log(__('Starting up...'));
|
||||||
});
|
});
|
||||||
|
@ -6,7 +6,7 @@ frappe.require("assets/erpnext/js/stock_grid_report.js");
|
|||||||
erpnext.StockAnalytics = erpnext.StockGridReport.extend({
|
erpnext.StockAnalytics = erpnext.StockGridReport.extend({
|
||||||
init: function(wrapper, opts) {
|
init: function(wrapper, opts) {
|
||||||
var args = {
|
var args = {
|
||||||
title: frappe._("Stock Analytics"),
|
title: __("Stock Analytics"),
|
||||||
page: wrapper,
|
page: wrapper,
|
||||||
parent: $(wrapper).find('.layout-main'),
|
parent: $(wrapper).find('.layout-main'),
|
||||||
appframe: wrapper.appframe,
|
appframe: wrapper.appframe,
|
||||||
@ -36,13 +36,13 @@ erpnext.StockAnalytics = erpnext.StockGridReport.extend({
|
|||||||
},
|
},
|
||||||
setup_columns: function() {
|
setup_columns: function() {
|
||||||
var std_columns = [
|
var std_columns = [
|
||||||
{id: "check", name: frappe._("Plot"), field: "check", width: 30,
|
{id: "check", name: __("Plot"), field: "check", width: 30,
|
||||||
formatter: this.check_formatter},
|
formatter: this.check_formatter},
|
||||||
{id: "name", name: frappe._("Item"), field: "name", width: 300,
|
{id: "name", name: __("Item"), field: "name", width: 300,
|
||||||
formatter: this.tree_formatter},
|
formatter: this.tree_formatter},
|
||||||
{id: "brand", name: frappe._("Brand"), field: "brand", width: 100},
|
{id: "brand", name: __("Brand"), field: "brand", width: 100},
|
||||||
{id: "stock_uom", name: frappe._("UOM"), field: "stock_uom", width: 100},
|
{id: "stock_uom", name: __("UOM"), field: "stock_uom", width: 100},
|
||||||
{id: "opening", name: frappe._("Opening"), field: "opening", hidden: true,
|
{id: "opening", name: __("Opening"), field: "opening", hidden: true,
|
||||||
formatter: this.currency_formatter}
|
formatter: this.currency_formatter}
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -50,23 +50,23 @@ erpnext.StockAnalytics = erpnext.StockGridReport.extend({
|
|||||||
this.columns = std_columns.concat(this.columns);
|
this.columns = std_columns.concat(this.columns);
|
||||||
},
|
},
|
||||||
filters: [
|
filters: [
|
||||||
{fieldtype:"Select", label: frappe._("Value or Qty"), options:["Value", "Quantity"],
|
{fieldtype:"Select", label: __("Value or Qty"), options:["Value", "Quantity"],
|
||||||
filter: function(val, item, opts, me) {
|
filter: function(val, item, opts, me) {
|
||||||
return me.apply_zero_filter(val, item, opts, me);
|
return me.apply_zero_filter(val, item, opts, me);
|
||||||
}},
|
}},
|
||||||
{fieldtype:"Select", label: frappe._("Brand"), link:"Brand",
|
{fieldtype:"Select", label: __("Brand"), link:"Brand",
|
||||||
default_value: "Select Brand...", filter: function(val, item, opts) {
|
default_value: "Select Brand...", filter: function(val, item, opts) {
|
||||||
return val == opts.default_value || item.brand == val || item._show;
|
return val == opts.default_value || item.brand == val || item._show;
|
||||||
}, link_formatter: {filter_input: "brand"}},
|
}, link_formatter: {filter_input: "brand"}},
|
||||||
{fieldtype:"Select", label: frappe._("Warehouse"), link:"Warehouse",
|
{fieldtype:"Select", label: __("Warehouse"), link:"Warehouse",
|
||||||
default_value: "Select Warehouse..."},
|
default_value: "Select Warehouse..."},
|
||||||
{fieldtype:"Date", label: frappe._("From Date")},
|
{fieldtype:"Date", label: __("From Date")},
|
||||||
{fieldtype:"Label", label: frappe._("To")},
|
{fieldtype:"Label", label: __("To")},
|
||||||
{fieldtype:"Date", label: frappe._("To Date")},
|
{fieldtype:"Date", label: __("To Date")},
|
||||||
{fieldtype:"Select", label: frappe._("Range"),
|
{fieldtype:"Select", label: __("Range"),
|
||||||
options:["Daily", "Weekly", "Monthly", "Quarterly", "Yearly"]},
|
options:["Daily", "Weekly", "Monthly", "Quarterly", "Yearly"]},
|
||||||
{fieldtype:"Button", label: frappe._("Refresh"), icon:"icon-refresh icon-white"},
|
{fieldtype:"Button", label: __("Refresh"), icon:"icon-refresh icon-white"},
|
||||||
{fieldtype:"Button", label: frappe._("Reset Filters")}
|
{fieldtype:"Button", label: __("Reset Filters")}
|
||||||
],
|
],
|
||||||
setup_filters: function() {
|
setup_filters: function() {
|
||||||
var me = this;
|
var me = this;
|
||||||
|
@ -70,10 +70,10 @@ erpnext.TransactionController = erpnext.stock.StockController.extend({
|
|||||||
|
|
||||||
make_pos_btn: function() {
|
make_pos_btn: function() {
|
||||||
if(!this.pos_active) {
|
if(!this.pos_active) {
|
||||||
var btn_label = frappe._("POS View"),
|
var btn_label = __("POS View"),
|
||||||
icon = "icon-desktop";
|
icon = "icon-desktop";
|
||||||
} else {
|
} else {
|
||||||
var btn_label = frappe._(this.frm.doctype) + frappe._(" View"),
|
var btn_label = __(this.frm.doctype) + __(" View"),
|
||||||
icon = "icon-file-text";
|
icon = "icon-file-text";
|
||||||
}
|
}
|
||||||
var me = this;
|
var me = this;
|
||||||
@ -89,7 +89,7 @@ erpnext.TransactionController = erpnext.stock.StockController.extend({
|
|||||||
this.frm.doc.selling_price_list : this.frm.doc.buying_price_list;
|
this.frm.doc.selling_price_list : this.frm.doc.buying_price_list;
|
||||||
|
|
||||||
if (!price_list)
|
if (!price_list)
|
||||||
msgprint(frappe._("Please select Price List"))
|
msgprint(__("Please select Price List"))
|
||||||
else {
|
else {
|
||||||
if((show===true && this.pos_active) || (show===false && !this.pos_active)) return;
|
if((show===true && this.pos_active) || (show===false && !this.pos_active)) return;
|
||||||
|
|
||||||
@ -354,10 +354,10 @@ erpnext.TransactionController = erpnext.stock.StockController.extend({
|
|||||||
validate_on_previous_row: function(tax) {
|
validate_on_previous_row: function(tax) {
|
||||||
// validate if a valid row id is mentioned in case of
|
// validate if a valid row id is mentioned in case of
|
||||||
// On Previous Row Amount and On Previous Row Total
|
// On Previous Row Amount and On Previous Row Total
|
||||||
if(([frappe._("On Previous Row Amount"), frappe._("On Previous Row Total")].indexOf(tax.charge_type) != -1) &&
|
if(([__("On Previous Row Amount"), __("On Previous Row Total")].indexOf(tax.charge_type) != -1) &&
|
||||||
(!tax.row_id || cint(tax.row_id) >= tax.idx)) {
|
(!tax.row_id || cint(tax.row_id) >= tax.idx)) {
|
||||||
var msg = repl(frappe._("Row") + " # %(idx)s [%(doctype)s]: " +
|
var msg = repl(__("Row") + " # %(idx)s [%(doctype)s]: " +
|
||||||
frappe._("Please specify a valid") + " %(row_id_label)s", {
|
__("Please specify a valid") + " %(row_id_label)s", {
|
||||||
idx: tax.idx,
|
idx: tax.idx,
|
||||||
doctype: tax.doctype,
|
doctype: tax.doctype,
|
||||||
row_id_label: frappe.meta.get_label(tax.doctype, "row_id", tax.name)
|
row_id_label: frappe.meta.get_label(tax.doctype, "row_id", tax.name)
|
||||||
@ -370,9 +370,9 @@ erpnext.TransactionController = erpnext.stock.StockController.extend({
|
|||||||
if(!this.frm.tax_doclist) this.frm.tax_doclist = this.get_tax_doclist();
|
if(!this.frm.tax_doclist) this.frm.tax_doclist = this.get_tax_doclist();
|
||||||
|
|
||||||
var actual_type_error = function() {
|
var actual_type_error = function() {
|
||||||
var msg = repl(frappe._("For row") + " # %(idx)s [%(doctype)s]: " +
|
var msg = repl(__("For row") + " # %(idx)s [%(doctype)s]: " +
|
||||||
"%(charge_type_label)s = \"%(charge_type)s\" " +
|
"%(charge_type_label)s = \"%(charge_type)s\" " +
|
||||||
frappe._("cannot be included in Item's rate"), {
|
__("cannot be included in Item's rate"), {
|
||||||
idx: tax.idx,
|
idx: tax.idx,
|
||||||
doctype: tax.doctype,
|
doctype: tax.doctype,
|
||||||
charge_type_label: frappe.meta.get_label(tax.doctype, "charge_type", tax.name),
|
charge_type_label: frappe.meta.get_label(tax.doctype, "charge_type", tax.name),
|
||||||
@ -382,9 +382,9 @@ erpnext.TransactionController = erpnext.stock.StockController.extend({
|
|||||||
};
|
};
|
||||||
|
|
||||||
var on_previous_row_error = function(row_range) {
|
var on_previous_row_error = function(row_range) {
|
||||||
var msg = repl(frappe._("For row") + " # %(idx)s [%(doctype)s]: " +
|
var msg = repl(__("For row") + " # %(idx)s [%(doctype)s]: " +
|
||||||
frappe._("to be included in Item's rate, it is required that: ") +
|
__("to be included in Item's rate, it is required that: ") +
|
||||||
" [" + frappe._("Row") + " # %(row_range)s] " + frappe._("also be included in Item's rate"), {
|
" [" + __("Row") + " # %(row_range)s] " + __("also be included in Item's rate"), {
|
||||||
idx: tax.idx,
|
idx: tax.idx,
|
||||||
doctype: tax.doctype,
|
doctype: tax.doctype,
|
||||||
charge_type_label: frappe.meta.get_label(tax.doctype, "charge_type", tax.name),
|
charge_type_label: frappe.meta.get_label(tax.doctype, "charge_type", tax.name),
|
||||||
@ -454,7 +454,7 @@ erpnext.TransactionController = erpnext.stock.StockController.extend({
|
|||||||
tax_accounts.push([tax.name, tax.account_head]);
|
tax_accounts.push([tax.name, tax.account_head]);
|
||||||
});
|
});
|
||||||
|
|
||||||
var headings = $.map([frappe._("Item Name")].concat($.map(tax_accounts, function(head) { return head[1]; })),
|
var headings = $.map([__("Item Name")].concat($.map(tax_accounts, function(head) { return head[1]; })),
|
||||||
function(head) { return '<th style="min-width: 100px;">' + (head || "") + "</th>" }).join("\n");
|
function(head) { return '<th style="min-width: 100px;">' + (head || "") + "</th>" }).join("\n");
|
||||||
|
|
||||||
var distinct_item_names = [];
|
var distinct_item_names = [];
|
||||||
@ -494,9 +494,9 @@ erpnext.TransactionController = erpnext.stock.StockController.extend({
|
|||||||
$.each(["company", "customer"], function(i, fieldname) {
|
$.each(["company", "customer"], function(i, fieldname) {
|
||||||
if(frappe.meta.has_field(me.frm.doc.doctype, fieldname)) {
|
if(frappe.meta.has_field(me.frm.doc.doctype, fieldname)) {
|
||||||
if (!me.frm.doc[fieldname]) {
|
if (!me.frm.doc[fieldname]) {
|
||||||
msgprint(frappe._("Please specify") + ": " +
|
msgprint(__("Please specify") + ": " +
|
||||||
frappe.meta.get_label(me.frm.doc.doctype, fieldname, me.frm.doc.name) +
|
frappe.meta.get_label(me.frm.doc.doctype, fieldname, me.frm.doc.name) +
|
||||||
". " + frappe._("It is needed to fetch Item Details."));
|
". " + __("It is needed to fetch Item Details."));
|
||||||
valid = false;
|
valid = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -520,8 +520,8 @@ erpnext.TransactionController = erpnext.stock.StockController.extend({
|
|||||||
|
|
||||||
if(!this.frm.doc.conversion_rate) {
|
if(!this.frm.doc.conversion_rate) {
|
||||||
frappe.throw(repl('%(conversion_rate_label)s' +
|
frappe.throw(repl('%(conversion_rate_label)s' +
|
||||||
frappe._(' is mandatory. Maybe Currency Exchange record is not created for ') +
|
__(' is mandatory. Maybe Currency Exchange record is not created for ') +
|
||||||
'%(from_currency)s' + frappe._(" to ") + '%(to_currency)s',
|
'%(from_currency)s' + __(" to ") + '%(to_currency)s',
|
||||||
{
|
{
|
||||||
"conversion_rate_label": conversion_rate_label,
|
"conversion_rate_label": conversion_rate_label,
|
||||||
"from_currency": this.frm.doc.currency,
|
"from_currency": this.frm.doc.currency,
|
||||||
|
@ -44,19 +44,19 @@ $.extend(erpnext, {
|
|||||||
if(!grid_row.fields_dict.serial_no ||
|
if(!grid_row.fields_dict.serial_no ||
|
||||||
grid_row.fields_dict.serial_no.get_status()!=="Write") return;
|
grid_row.fields_dict.serial_no.get_status()!=="Write") return;
|
||||||
|
|
||||||
var $btn = $('<button class="btn btn-sm btn-default">'+frappe._("Add Serial No")+'</button>')
|
var $btn = $('<button class="btn btn-sm btn-default">'+__("Add Serial No")+'</button>')
|
||||||
.appendTo($("<div>")
|
.appendTo($("<div>")
|
||||||
.css({"margin-bottom": "10px", "margin-left": "15px"})
|
.css({"margin-bottom": "10px", "margin-left": "15px"})
|
||||||
.appendTo(grid_row.fields_dict.serial_no.$wrapper));
|
.appendTo(grid_row.fields_dict.serial_no.$wrapper));
|
||||||
|
|
||||||
$btn.on("click", function() {
|
$btn.on("click", function() {
|
||||||
var d = new frappe.ui.Dialog({
|
var d = new frappe.ui.Dialog({
|
||||||
title: frappe._("Add Serial No"),
|
title: __("Add Serial No"),
|
||||||
fields: [
|
fields: [
|
||||||
{
|
{
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"options": "Serial No",
|
"options": "Serial No",
|
||||||
"label": frappe._("Serial No"),
|
"label": __("Serial No"),
|
||||||
"get_query": {
|
"get_query": {
|
||||||
item_code: grid_row.doc.item_code,
|
item_code: grid_row.doc.item_code,
|
||||||
warehouse: grid_row.doc.warehouse
|
warehouse: grid_row.doc.warehouse
|
||||||
@ -64,7 +64,7 @@ $.extend(erpnext, {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldtype": "Button",
|
"fieldtype": "Button",
|
||||||
"label": frappe._("Add")
|
"label": __("Add")
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
@ -42,7 +42,7 @@ cur_frm.cscript.setup_dashboard = function(doc) {
|
|||||||
if(doc.__islocal)
|
if(doc.__islocal)
|
||||||
return;
|
return;
|
||||||
if (in_list(user_roles, "Accounts User") || in_list(user_roles, "Accounts Manager"))
|
if (in_list(user_roles, "Accounts User") || in_list(user_roles, "Accounts Manager"))
|
||||||
cur_frm.dashboard.set_headline('<span class="text-muted">'+ frappe._('Loading...')+ '</span>')
|
cur_frm.dashboard.set_headline('<span class="text-muted">'+ __('Loading...')+ '</span>')
|
||||||
|
|
||||||
cur_frm.dashboard.add_doctype_badge("Opportunity", "customer");
|
cur_frm.dashboard.add_doctype_badge("Opportunity", "customer");
|
||||||
cur_frm.dashboard.add_doctype_badge("Quotation", "customer");
|
cur_frm.dashboard.add_doctype_badge("Quotation", "customer");
|
||||||
@ -59,9 +59,9 @@ cur_frm.cscript.setup_dashboard = function(doc) {
|
|||||||
callback: function(r) {
|
callback: function(r) {
|
||||||
if (in_list(user_roles, "Accounts User") || in_list(user_roles, "Accounts Manager")) {
|
if (in_list(user_roles, "Accounts User") || in_list(user_roles, "Accounts Manager")) {
|
||||||
cur_frm.dashboard.set_headline(
|
cur_frm.dashboard.set_headline(
|
||||||
frappe._("Total Billing This Year: ") + "<b>"
|
__("Total Billing This Year: ") + "<b>"
|
||||||
+ format_currency(r.message.total_billing, erpnext.get_currency(cur_frm.doc.company))
|
+ format_currency(r.message.total_billing, erpnext.get_currency(cur_frm.doc.company))
|
||||||
+ '</b> / <span class="text-muted">' + frappe._("Unpaid") + ": <b>"
|
+ '</b> / <span class="text-muted">' + __("Unpaid") + ": <b>"
|
||||||
+ format_currency(r.message.total_unpaid, erpnext.get_currency(cur_frm.doc.company))
|
+ format_currency(r.message.total_unpaid, erpnext.get_currency(cur_frm.doc.company))
|
||||||
+ '</b></span>');
|
+ '</b></span>');
|
||||||
}
|
}
|
||||||
@ -80,7 +80,7 @@ cur_frm.cscript.make_address = function() {
|
|||||||
return "select name, address_type, address_line1, address_line2, city, state, country, pincode, fax, email_id, phone, is_primary_address, is_shipping_address from tabAddress where customer='"+cur_frm.docname+"' and docstatus != 2 order by is_primary_address desc"
|
return "select name, address_type, address_line1, address_line2, city, state, country, pincode, fax, email_id, phone, is_primary_address, is_shipping_address from tabAddress where customer='"+cur_frm.docname+"' and docstatus != 2 order by is_primary_address desc"
|
||||||
},
|
},
|
||||||
as_dict: 1,
|
as_dict: 1,
|
||||||
no_results_message: frappe._('No addresses created'),
|
no_results_message: __('No addresses created'),
|
||||||
render_row: cur_frm.cscript.render_address_row,
|
render_row: cur_frm.cscript.render_address_row,
|
||||||
});
|
});
|
||||||
// note: render_address_row is defined in contact_control.js
|
// note: render_address_row is defined in contact_control.js
|
||||||
@ -98,7 +98,7 @@ cur_frm.cscript.make_contact = function() {
|
|||||||
return "select name, first_name, last_name, email_id, phone, mobile_no, department, designation, is_primary_contact from tabContact where customer='"+cur_frm.docname+"' and docstatus != 2 order by is_primary_contact desc"
|
return "select name, first_name, last_name, email_id, phone, mobile_no, department, designation, is_primary_contact from tabContact where customer='"+cur_frm.docname+"' and docstatus != 2 order by is_primary_contact desc"
|
||||||
},
|
},
|
||||||
as_dict: 1,
|
as_dict: 1,
|
||||||
no_results_message: frappe._('No contacts created'),
|
no_results_message: __('No contacts created'),
|
||||||
render_row: cur_frm.cscript.render_contact_row,
|
render_row: cur_frm.cscript.render_contact_row,
|
||||||
});
|
});
|
||||||
// note: render_contact_row is defined in contact_control.js
|
// note: render_contact_row is defined in contact_control.js
|
||||||
|
@ -49,7 +49,7 @@ erpnext.selling.InstallationNote = frappe.ui.form.Controller.extend({
|
|||||||
|
|
||||||
refresh: function() {
|
refresh: function() {
|
||||||
if (this.frm.doc.docstatus===0) {
|
if (this.frm.doc.docstatus===0) {
|
||||||
cur_frm.add_custom_button(frappe._('From Delivery Note'),
|
cur_frm.add_custom_button(__('From Delivery Note'),
|
||||||
function() {
|
function() {
|
||||||
frappe.model.map_current_doc({
|
frappe.model.map_current_doc({
|
||||||
method: "erpnext.stock.doctype.delivery_note.delivery_note.make_installation_note",
|
method: "erpnext.stock.doctype.delivery_note.delivery_note.make_installation_note",
|
||||||
|
@ -23,8 +23,8 @@ erpnext.LeadController = frappe.ui.form.Controller.extend({
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(in_list(user_roles,'System Manager')) {
|
if(in_list(user_roles,'System Manager')) {
|
||||||
cur_frm.footer.help_area.innerHTML = '<p><a href="#Form/Sales Email Settings">'+frappe._('Sales Email Settings')+'</a><br>\
|
cur_frm.footer.help_area.innerHTML = '<p><a href="#Form/Sales Email Settings">'+__('Sales Email Settings')+'</a><br>\
|
||||||
<span class="help">'+frappe._('Automatically extract Leads from a mail box e.g.')+' "sales@example.com"</span></p>';
|
<span class="help">'+__('Automatically extract Leads from a mail box e.g.')+' "sales@example.com"</span></p>';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -35,9 +35,9 @@ erpnext.LeadController = frappe.ui.form.Controller.extend({
|
|||||||
|
|
||||||
this.frm.__is_customer = this.frm.__is_customer || this.frm.doc.__is_customer;
|
this.frm.__is_customer = this.frm.__is_customer || this.frm.doc.__is_customer;
|
||||||
if(!this.frm.doc.__islocal && !this.frm.doc.__is_customer) {
|
if(!this.frm.doc.__islocal && !this.frm.doc.__is_customer) {
|
||||||
this.frm.add_custom_button(frappe._("Create Customer"), this.create_customer);
|
this.frm.add_custom_button(__("Create Customer"), this.create_customer);
|
||||||
this.frm.add_custom_button(frappe._("Create Opportunity"), this.create_opportunity);
|
this.frm.add_custom_button(__("Create Opportunity"), this.create_opportunity);
|
||||||
this.frm.appframe.add_button(frappe._("Send SMS"), this.frm.cscript.send_sms, "icon-mobile-phone");
|
this.frm.appframe.add_button(__("Send SMS"), this.frm.cscript.send_sms, "icon-mobile-phone");
|
||||||
}
|
}
|
||||||
|
|
||||||
cur_frm.communication_view = new frappe.views.CommunicationList({
|
cur_frm.communication_view = new frappe.views.CommunicationList({
|
||||||
@ -67,7 +67,7 @@ erpnext.LeadController = frappe.ui.form.Controller.extend({
|
|||||||
order by is_primary_address, is_shipping_address desc'
|
order by is_primary_address, is_shipping_address desc'
|
||||||
},
|
},
|
||||||
as_dict: 1,
|
as_dict: 1,
|
||||||
no_results_message: frappe._('No addresses created'),
|
no_results_message: __('No addresses created'),
|
||||||
render_row: this.render_address_row,
|
render_row: this.render_address_row,
|
||||||
});
|
});
|
||||||
// note: render_address_row is defined in contact_control.js
|
// note: render_address_row is defined in contact_control.js
|
||||||
|
@ -85,11 +85,11 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) {
|
|||||||
cur_frm.clear_custom_buttons();
|
cur_frm.clear_custom_buttons();
|
||||||
|
|
||||||
if(doc.docstatus === 1 && doc.status!=="Lost") {
|
if(doc.docstatus === 1 && doc.status!=="Lost") {
|
||||||
cur_frm.add_custom_button(frappe._('Create Quotation'), cur_frm.cscript.create_quotation);
|
cur_frm.add_custom_button(__('Create Quotation'), cur_frm.cscript.create_quotation);
|
||||||
if(doc.status!=="Quotation")
|
if(doc.status!=="Quotation")
|
||||||
cur_frm.add_custom_button(frappe._('Opportunity Lost'), cur_frm.cscript['Declare Opportunity Lost']);
|
cur_frm.add_custom_button(__('Opportunity Lost'), cur_frm.cscript['Declare Opportunity Lost']);
|
||||||
|
|
||||||
cur_frm.add_custom_button(frappe._('Send SMS'), cur_frm.cscript.send_sms, "icon-mobile-phone");
|
cur_frm.add_custom_button(__('Send SMS'), cur_frm.cscript.send_sms, "icon-mobile-phone");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -116,11 +116,11 @@ cur_frm.cscript.lead = function(doc, cdt, cdn) {
|
|||||||
|
|
||||||
cur_frm.cscript['Declare Opportunity Lost'] = function() {
|
cur_frm.cscript['Declare Opportunity Lost'] = function() {
|
||||||
var dialog = new frappe.ui.Dialog({
|
var dialog = new frappe.ui.Dialog({
|
||||||
title: frappe._("Set as Lost"),
|
title: __("Set as Lost"),
|
||||||
fields: [
|
fields: [
|
||||||
{"fieldtype": "Text", "label": frappe._("Reason for losing"), "fieldname": "reason",
|
{"fieldtype": "Text", "label": __("Reason for losing"), "fieldname": "reason",
|
||||||
"reqd": 1 },
|
"reqd": 1 },
|
||||||
{"fieldtype": "Button", "label": frappe._("Update"), "fieldname": "update"},
|
{"fieldtype": "Button", "label": __("Update"), "fieldname": "update"},
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -133,7 +133,7 @@ cur_frm.cscript['Declare Opportunity Lost'] = function() {
|
|||||||
args: args.reason,
|
args: args.reason,
|
||||||
callback: function(r) {
|
callback: function(r) {
|
||||||
if(r.exc) {
|
if(r.exc) {
|
||||||
msgprint(frappe._("There were errors."));
|
msgprint(__("There were errors."));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
dialog.hide();
|
dialog.hide();
|
||||||
|
@ -26,17 +26,17 @@ erpnext.selling.QuotationController = erpnext.selling.SellingController.extend({
|
|||||||
this._super(doc, dt, dn);
|
this._super(doc, dt, dn);
|
||||||
|
|
||||||
if(doc.docstatus == 1 && doc.status!=='Lost') {
|
if(doc.docstatus == 1 && doc.status!=='Lost') {
|
||||||
cur_frm.add_custom_button(frappe._('Make Sales Order'),
|
cur_frm.add_custom_button(__('Make Sales Order'),
|
||||||
cur_frm.cscript['Make Sales Order']);
|
cur_frm.cscript['Make Sales Order']);
|
||||||
if(doc.status!=="Ordered") {
|
if(doc.status!=="Ordered") {
|
||||||
cur_frm.add_custom_button(frappe._('Set as Lost'),
|
cur_frm.add_custom_button(__('Set as Lost'),
|
||||||
cur_frm.cscript['Declare Order Lost'], "icon-exclamation");
|
cur_frm.cscript['Declare Order Lost'], "icon-exclamation");
|
||||||
}
|
}
|
||||||
cur_frm.appframe.add_button(frappe._('Send SMS'), cur_frm.cscript.send_sms, "icon-mobile-phone");
|
cur_frm.appframe.add_button(__('Send SMS'), cur_frm.cscript.send_sms, "icon-mobile-phone");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.frm.doc.docstatus===0) {
|
if (this.frm.doc.docstatus===0) {
|
||||||
cur_frm.add_custom_button(frappe._('From Opportunity'),
|
cur_frm.add_custom_button(__('From Opportunity'),
|
||||||
function() {
|
function() {
|
||||||
frappe.model.map_current_doc({
|
frappe.model.map_current_doc({
|
||||||
method: "erpnext.selling.doctype.opportunity.opportunity.make_quotation",
|
method: "erpnext.selling.doctype.opportunity.opportunity.make_quotation",
|
||||||
@ -90,8 +90,7 @@ erpnext.selling.QuotationController = erpnext.selling.SellingController.extend({
|
|||||||
|
|
||||||
validate_company_and_party: function(party_field) {
|
validate_company_and_party: function(party_field) {
|
||||||
if(!this.frm.doc.quotation_to) {
|
if(!this.frm.doc.quotation_to) {
|
||||||
msgprint(frappe._("Please select a value for" + " " +
|
msgprint(__("Please select a value for {0} quotation_to {1}", [this.frm.doc.doctype, this.frm.doc.name]));
|
||||||
frappe.meta.get_label(this.frm.doc.doctype, "quotation_to", this.frm.doc.name)));
|
|
||||||
return false;
|
return false;
|
||||||
} else if (this.frm.doc.quotation_to == "Lead") {
|
} else if (this.frm.doc.quotation_to == "Lead") {
|
||||||
return true;
|
return true;
|
||||||
@ -135,9 +134,9 @@ cur_frm.cscript['Declare Order Lost'] = function(){
|
|||||||
var dialog = new frappe.ui.Dialog({
|
var dialog = new frappe.ui.Dialog({
|
||||||
title: "Set as Lost",
|
title: "Set as Lost",
|
||||||
fields: [
|
fields: [
|
||||||
{"fieldtype": "Text", "label": frappe._("Reason for losing"), "fieldname": "reason",
|
{"fieldtype": "Text", "label": __("Reason for losing"), "fieldname": "reason",
|
||||||
"reqd": 1 },
|
"reqd": 1 },
|
||||||
{"fieldtype": "Button", "label": frappe._("Update"), "fieldname": "update"},
|
{"fieldtype": "Button", "label": __("Update"), "fieldname": "update"},
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -150,7 +149,7 @@ cur_frm.cscript['Declare Order Lost'] = function(){
|
|||||||
args: args.reason,
|
args: args.reason,
|
||||||
callback: function(r) {
|
callback: function(r) {
|
||||||
if(r.exc) {
|
if(r.exc) {
|
||||||
msgprint(frappe._("There were errors."));
|
msgprint(__("There were errors."));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
dialog.hide();
|
dialog.hide();
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
cur_frm.cscript.refresh = function(doc, cdt, cdn) {
|
cur_frm.cscript.refresh = function(doc, cdt, cdn) {
|
||||||
cur_frm.toggle_enable('new_item_code', doc.__islocal);
|
cur_frm.toggle_enable('new_item_code', doc.__islocal);
|
||||||
if(!doc.__islocal) {
|
if(!doc.__islocal) {
|
||||||
cur_frm.add_custom_button(frappe._("Check for Duplicates"), function() {
|
cur_frm.add_custom_button(__("Check for Duplicates"), function() {
|
||||||
return cur_frm.call_server('check_duplicate', 1)
|
return cur_frm.call_server('check_duplicate', 1)
|
||||||
}, 'icon-search')
|
}, 'icon-search')
|
||||||
}
|
}
|
||||||
@ -15,8 +15,7 @@ cur_frm.fields_dict.new_item_code.get_query = function() {
|
|||||||
query: "selling.doctype.sales_bom.sales_bom.get_new_item_code"
|
query: "selling.doctype.sales_bom.sales_bom.get_new_item_code"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
cur_frm.fields_dict.new_item_code.query_description = frappe._('Select Item where "Is Stock Item" is "No"')+
|
cur_frm.fields_dict.new_item_code.query_description = __('Please select Item where "Is Stock Item" is "No" and "Is Sales Item" is "Yes" and there is no other Sales BOM');
|
||||||
frappe._('and "Is Sales Item" is "Yes" and there is no other Sales BOM');
|
|
||||||
|
|
||||||
cur_frm.cscript.item_code = function(doc, dt, dn) {
|
cur_frm.cscript.item_code = function(doc, dt, dn) {
|
||||||
var d = locals[dt][dn];
|
var d = locals[dt][dn];
|
||||||
|
@ -21,44 +21,44 @@ erpnext.selling.SalesOrderController = erpnext.selling.SellingController.extend(
|
|||||||
if(doc.docstatus==1) {
|
if(doc.docstatus==1) {
|
||||||
if(doc.status != 'Stopped') {
|
if(doc.status != 'Stopped') {
|
||||||
|
|
||||||
cur_frm.dashboard.add_progress(cint(doc.per_delivered) + frappe._("% Delivered"),
|
cur_frm.dashboard.add_progress(cint(doc.per_delivered) + __("% Delivered"),
|
||||||
doc.per_delivered);
|
doc.per_delivered);
|
||||||
cur_frm.dashboard.add_progress(cint(doc.per_billed) + frappe._("% Billed"),
|
cur_frm.dashboard.add_progress(cint(doc.per_billed) + __("% Billed"),
|
||||||
doc.per_billed);
|
doc.per_billed);
|
||||||
|
|
||||||
cur_frm.add_custom_button(frappe._('Send SMS'), cur_frm.cscript.send_sms, "icon-mobile-phone");
|
cur_frm.add_custom_button(__('Send SMS'), cur_frm.cscript.send_sms, "icon-mobile-phone");
|
||||||
// delivery note
|
// delivery note
|
||||||
if(flt(doc.per_delivered, 2) < 100 && doc.order_type=='Sales')
|
if(flt(doc.per_delivered, 2) < 100 && doc.order_type=='Sales')
|
||||||
cur_frm.add_custom_button(frappe._('Make Delivery'), this.make_delivery_note);
|
cur_frm.add_custom_button(__('Make Delivery'), this.make_delivery_note);
|
||||||
|
|
||||||
// maintenance
|
// maintenance
|
||||||
if(flt(doc.per_delivered, 2) < 100 && (doc.order_type !='Sales')) {
|
if(flt(doc.per_delivered, 2) < 100 && (doc.order_type !='Sales')) {
|
||||||
cur_frm.add_custom_button(frappe._('Make Maint. Visit'), this.make_maintenance_visit);
|
cur_frm.add_custom_button(__('Make Maint. Visit'), this.make_maintenance_visit);
|
||||||
cur_frm.add_custom_button(frappe._('Make Maint. Schedule'),
|
cur_frm.add_custom_button(__('Make Maint. Schedule'),
|
||||||
this.make_maintenance_schedule);
|
this.make_maintenance_schedule);
|
||||||
}
|
}
|
||||||
|
|
||||||
// indent
|
// indent
|
||||||
if(!doc.order_type || (doc.order_type == 'Sales'))
|
if(!doc.order_type || (doc.order_type == 'Sales'))
|
||||||
cur_frm.add_custom_button(frappe._('Make ') + frappe._('Material Request'),
|
cur_frm.add_custom_button(__('Make ') + __('Material Request'),
|
||||||
this.make_material_request);
|
this.make_material_request);
|
||||||
|
|
||||||
// sales invoice
|
// sales invoice
|
||||||
if(flt(doc.per_billed, 2) < 100)
|
if(flt(doc.per_billed, 2) < 100)
|
||||||
cur_frm.add_custom_button(frappe._('Make Invoice'), this.make_sales_invoice);
|
cur_frm.add_custom_button(__('Make Invoice'), this.make_sales_invoice);
|
||||||
|
|
||||||
// stop
|
// stop
|
||||||
if(flt(doc.per_delivered, 2) < 100 || doc.per_billed < 100)
|
if(flt(doc.per_delivered, 2) < 100 || doc.per_billed < 100)
|
||||||
cur_frm.add_custom_button(frappe._('Stop!'), cur_frm.cscript['Stop Sales Order'],"icon-exclamation");
|
cur_frm.add_custom_button(__('Stop!'), cur_frm.cscript['Stop Sales Order'],"icon-exclamation");
|
||||||
} else {
|
} else {
|
||||||
// un-stop
|
// un-stop
|
||||||
cur_frm.dashboard.set_headline_alert(frappe._("Stopped"), "alert-danger", "icon-stop");
|
cur_frm.dashboard.set_headline_alert(__("Stopped"), "alert-danger", "icon-stop");
|
||||||
cur_frm.add_custom_button(frappe._('Unstop'), cur_frm.cscript['Unstop Sales Order'], "icon-check");
|
cur_frm.add_custom_button(__('Unstop'), cur_frm.cscript['Unstop Sales Order'], "icon-check");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.frm.doc.docstatus===0) {
|
if (this.frm.doc.docstatus===0) {
|
||||||
cur_frm.add_custom_button(frappe._('From Quotation'),
|
cur_frm.add_custom_button(__('From Quotation'),
|
||||||
function() {
|
function() {
|
||||||
frappe.model.map_current_doc({
|
frappe.model.map_current_doc({
|
||||||
method: "erpnext.selling.doctype.quotation.quotation.make_sales_order",
|
method: "erpnext.selling.doctype.quotation.quotation.make_sales_order",
|
||||||
@ -157,7 +157,7 @@ cur_frm.fields_dict['project_name'].get_query = function(doc, cdt, cdn) {
|
|||||||
cur_frm.cscript['Stop Sales Order'] = function() {
|
cur_frm.cscript['Stop Sales Order'] = function() {
|
||||||
var doc = cur_frm.doc;
|
var doc = cur_frm.doc;
|
||||||
|
|
||||||
var check = confirm(frappe._("Are you sure you want to STOP ") + doc.name);
|
var check = confirm(__("Are you sure you want to STOP ") + doc.name);
|
||||||
|
|
||||||
if (check) {
|
if (check) {
|
||||||
return $c('runserverobj', {
|
return $c('runserverobj', {
|
||||||
@ -172,7 +172,7 @@ cur_frm.cscript['Stop Sales Order'] = function() {
|
|||||||
cur_frm.cscript['Unstop Sales Order'] = function() {
|
cur_frm.cscript['Unstop Sales Order'] = function() {
|
||||||
var doc = cur_frm.doc;
|
var doc = cur_frm.doc;
|
||||||
|
|
||||||
var check = confirm(frappe._("Are you sure you want to UNSTOP ") + doc.name);
|
var check = confirm(__("Are you sure you want to UNSTOP ") + doc.name);
|
||||||
|
|
||||||
if (check) {
|
if (check) {
|
||||||
return $c('runserverobj', {
|
return $c('runserverobj', {
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
frappe.pages['sales-analytics'].onload = function(wrapper) {
|
frappe.pages['sales-analytics'].onload = function(wrapper) {
|
||||||
frappe.ui.make_app_page({
|
frappe.ui.make_app_page({
|
||||||
parent: wrapper,
|
parent: wrapper,
|
||||||
title: frappe._('Sales Analytics'),
|
title: __('Sales Analytics'),
|
||||||
single_column: true
|
single_column: true
|
||||||
});
|
});
|
||||||
new erpnext.SalesAnalytics(wrapper);
|
new erpnext.SalesAnalytics(wrapper);
|
||||||
@ -17,7 +17,7 @@ frappe.pages['sales-analytics'].onload = function(wrapper) {
|
|||||||
erpnext.SalesAnalytics = frappe.views.TreeGridReport.extend({
|
erpnext.SalesAnalytics = frappe.views.TreeGridReport.extend({
|
||||||
init: function(wrapper) {
|
init: function(wrapper) {
|
||||||
this._super({
|
this._super({
|
||||||
title: frappe._("Sales Analytics"),
|
title: __("Sales Analytics"),
|
||||||
page: wrapper,
|
page: wrapper,
|
||||||
parent: $(wrapper).find('.layout-main'),
|
parent: $(wrapper).find('.layout-main'),
|
||||||
appframe: wrapper.appframe,
|
appframe: wrapper.appframe,
|
||||||
@ -30,14 +30,14 @@ erpnext.SalesAnalytics = frappe.views.TreeGridReport.extend({
|
|||||||
|
|
||||||
this.tree_grids = {
|
this.tree_grids = {
|
||||||
"Customer Group": {
|
"Customer Group": {
|
||||||
label: frappe._("Customer Group / Customer"),
|
label: __("Customer Group / Customer"),
|
||||||
show: true,
|
show: true,
|
||||||
item_key: "customer",
|
item_key: "customer",
|
||||||
parent_field: "parent_customer_group",
|
parent_field: "parent_customer_group",
|
||||||
formatter: function(item) { return item.name; }
|
formatter: function(item) { return item.name; }
|
||||||
},
|
},
|
||||||
"Customer": {
|
"Customer": {
|
||||||
label: frappe._("Customer"),
|
label: __("Customer"),
|
||||||
show: false,
|
show: false,
|
||||||
item_key: "customer",
|
item_key: "customer",
|
||||||
formatter: function(item) {
|
formatter: function(item) {
|
||||||
@ -45,7 +45,7 @@ erpnext.SalesAnalytics = frappe.views.TreeGridReport.extend({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Item Group": {
|
"Item Group": {
|
||||||
label: frappe._("Item"),
|
label: __("Item"),
|
||||||
show: true,
|
show: true,
|
||||||
parent_field: "parent_item_group",
|
parent_field: "parent_item_group",
|
||||||
item_key: "item_code",
|
item_key: "item_code",
|
||||||
@ -54,7 +54,7 @@ erpnext.SalesAnalytics = frappe.views.TreeGridReport.extend({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Item": {
|
"Item": {
|
||||||
label: frappe._("Item"),
|
label: __("Item"),
|
||||||
show: false,
|
show: false,
|
||||||
item_key: "item_code",
|
item_key: "item_code",
|
||||||
formatter: function(item) {
|
formatter: function(item) {
|
||||||
@ -62,7 +62,7 @@ erpnext.SalesAnalytics = frappe.views.TreeGridReport.extend({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Territory": {
|
"Territory": {
|
||||||
label: frappe._("Territory / Customer"),
|
label: __("Territory / Customer"),
|
||||||
show: true,
|
show: true,
|
||||||
item_key: "customer",
|
item_key: "customer",
|
||||||
parent_field: "parent_territory",
|
parent_field: "parent_territory",
|
||||||
@ -88,23 +88,23 @@ erpnext.SalesAnalytics = frappe.views.TreeGridReport.extend({
|
|||||||
this.columns = std_columns.concat(this.columns);
|
this.columns = std_columns.concat(this.columns);
|
||||||
},
|
},
|
||||||
filters: [
|
filters: [
|
||||||
{fieldtype:"Select", fieldname: "tree_type", label: frappe._("Tree Type"), options:["Customer Group", "Customer",
|
{fieldtype:"Select", fieldname: "tree_type", label: __("Tree Type"), options:["Customer Group", "Customer",
|
||||||
"Item Group", "Item", "Territory"],
|
"Item Group", "Item", "Territory"],
|
||||||
filter: function(val, item, opts, me) {
|
filter: function(val, item, opts, me) {
|
||||||
return me.apply_zero_filter(val, item, opts, me);
|
return me.apply_zero_filter(val, item, opts, me);
|
||||||
}},
|
}},
|
||||||
{fieldtype:"Select", fieldname: "based_on", label: frappe._("Based On"), options:["Sales Invoice",
|
{fieldtype:"Select", fieldname: "based_on", label: __("Based On"), options:["Sales Invoice",
|
||||||
"Sales Order", "Delivery Note"]},
|
"Sales Order", "Delivery Note"]},
|
||||||
{fieldtype:"Select", fieldname: "value_or_qty", label: frappe._("Value or Qty"), options:["Value", "Quantity"]},
|
{fieldtype:"Select", fieldname: "value_or_qty", label: __("Value or Qty"), options:["Value", "Quantity"]},
|
||||||
{fieldtype:"Select", fieldname: "company", label: frappe._("Company"), link:"Company",
|
{fieldtype:"Select", fieldname: "company", label: __("Company"), link:"Company",
|
||||||
default_value: "Select Company..."},
|
default_value: "Select Company..."},
|
||||||
{fieldtype:"Date", fieldname: "from_date", label: frappe._("From Date")},
|
{fieldtype:"Date", fieldname: "from_date", label: __("From Date")},
|
||||||
{fieldtype:"Label", fieldname: "to", label: frappe._("To")},
|
{fieldtype:"Label", fieldname: "to", label: __("To")},
|
||||||
{fieldtype:"Date", fieldname: "to_date", label: frappe._("To Date")},
|
{fieldtype:"Date", fieldname: "to_date", label: __("To Date")},
|
||||||
{fieldtype:"Select", fieldname: "range", label: frappe._("Range"),
|
{fieldtype:"Select", fieldname: "range", label: __("Range"),
|
||||||
options:["Daily", "Weekly", "Monthly", "Quarterly", "Yearly"]},
|
options:["Daily", "Weekly", "Monthly", "Quarterly", "Yearly"]},
|
||||||
{fieldtype:"Button", fieldname: "refresh", label: frappe._("Refresh"), icon:"icon-refresh"},
|
{fieldtype:"Button", fieldname: "refresh", label: __("Refresh"), icon:"icon-refresh"},
|
||||||
{fieldtype:"Button", fieldname: "reset_filters", label: frappe._("Reset Filters"), icon:"icon-filter"}
|
{fieldtype:"Button", fieldname: "reset_filters", label: __("Reset Filters"), icon:"icon-filter"}
|
||||||
],
|
],
|
||||||
setup_filters: function() {
|
setup_filters: function() {
|
||||||
var me = this;
|
var me = this;
|
||||||
|
@ -16,8 +16,8 @@ pscript['onload_Sales Browser'] = function(wrapper){
|
|||||||
$(wrapper)
|
$(wrapper)
|
||||||
.find(".layout-side-section")
|
.find(".layout-side-section")
|
||||||
.html('<div class="text-muted">'+
|
.html('<div class="text-muted">'+
|
||||||
frappe._('Click on a link to get options to expand get options ') +
|
__('Click on a link to get options to expand get options ') +
|
||||||
frappe._('Add') + ' / ' + frappe._('Edit') + ' / '+ frappe._('Delete') + '.</div>')
|
__('Add') + ' / ' + __('Edit') + ' / '+ __('Delete') + '.</div>')
|
||||||
|
|
||||||
wrapper.make_tree = function() {
|
wrapper.make_tree = function() {
|
||||||
var ctype = frappe.get_route()[1] || 'Territory';
|
var ctype = frappe.get_route()[1] || 'Territory';
|
||||||
@ -114,18 +114,18 @@ erpnext.SalesChart = Class.extend({
|
|||||||
{fieldtype:'Data', fieldname: 'name_field',
|
{fieldtype:'Data', fieldname: 'name_field',
|
||||||
label:'New ' + me.ctype + ' Name', reqd:true},
|
label:'New ' + me.ctype + ' Name', reqd:true},
|
||||||
{fieldtype:'Select', fieldname:'is_group', label:'Group Node', options:'No\nYes',
|
{fieldtype:'Select', fieldname:'is_group', label:'Group Node', options:'No\nYes',
|
||||||
description: frappe._("Further nodes can be only created under 'Group' type nodes")},
|
description: __("Further nodes can be only created under 'Group' type nodes")},
|
||||||
{fieldtype:'Button', fieldname:'create_new', label:'Create New' }
|
{fieldtype:'Button', fieldname:'create_new', label:'Create New' }
|
||||||
]
|
]
|
||||||
|
|
||||||
if(me.ctype == "Sales Person") {
|
if(me.ctype == "Sales Person") {
|
||||||
fields.splice(-1, 0, {fieldtype:'Link', fieldname:'employee', label:'Employee',
|
fields.splice(-1, 0, {fieldtype:'Link', fieldname:'employee', label:'Employee',
|
||||||
options:'Employee', description: frappe._("Please enter Employee Id of this sales parson")});
|
options:'Employee', description: __("Please enter Employee Id of this sales parson")});
|
||||||
}
|
}
|
||||||
|
|
||||||
// the dialog
|
// the dialog
|
||||||
var d = new frappe.ui.Dialog({
|
var d = new frappe.ui.Dialog({
|
||||||
title: frappe._('New ') + frappe._(me.ctype),
|
title: __('New ') + __(me.ctype),
|
||||||
fields: fields
|
fields: fields
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -5,20 +5,20 @@ frappe.query_reports["Customer Acquisition and Loyalty"] = {
|
|||||||
"filters": [
|
"filters": [
|
||||||
{
|
{
|
||||||
"fieldname":"company",
|
"fieldname":"company",
|
||||||
"label": frappe._("Company"),
|
"label": __("Company"),
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"options": "Company",
|
"options": "Company",
|
||||||
"default": frappe.defaults.get_user_default("company")
|
"default": frappe.defaults.get_user_default("company")
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname":"from_date",
|
"fieldname":"from_date",
|
||||||
"label": frappe._("From Date"),
|
"label": __("From Date"),
|
||||||
"fieldtype": "Date",
|
"fieldtype": "Date",
|
||||||
"default": frappe.defaults.get_user_default("year_start_date")
|
"default": frappe.defaults.get_user_default("year_start_date")
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname":"to_date",
|
"fieldname":"to_date",
|
||||||
"label": frappe._("To Date"),
|
"label": __("To Date"),
|
||||||
"fieldtype": "Date",
|
"fieldtype": "Date",
|
||||||
"default": frappe.defaults.get_user_default("year_end_date")
|
"default": frappe.defaults.get_user_default("year_end_date")
|
||||||
},
|
},
|
||||||
|
@ -5,7 +5,7 @@ frappe.query_reports["Customers Not Buying Since Long Time"] = {
|
|||||||
"filters": [
|
"filters": [
|
||||||
{
|
{
|
||||||
"fieldname":"days_since_last_order",
|
"fieldname":"days_since_last_order",
|
||||||
"label": frappe._("Days Since Last Order"),
|
"label": __("Days Since Last Order"),
|
||||||
"fieldtype": "Int",
|
"fieldtype": "Int",
|
||||||
"default": 60
|
"default": 60
|
||||||
}
|
}
|
||||||
|
@ -5,21 +5,21 @@ frappe.query_reports["Sales Person Target Variance Item Group-Wise"] = {
|
|||||||
"filters": [
|
"filters": [
|
||||||
{
|
{
|
||||||
fieldname: "fiscal_year",
|
fieldname: "fiscal_year",
|
||||||
label: frappe._("Fiscal Year"),
|
label: __("Fiscal Year"),
|
||||||
fieldtype: "Link",
|
fieldtype: "Link",
|
||||||
options: "Fiscal Year",
|
options: "Fiscal Year",
|
||||||
default: sys_defaults.fiscal_year
|
default: sys_defaults.fiscal_year
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
fieldname: "period",
|
fieldname: "period",
|
||||||
label: frappe._("Period"),
|
label: __("Period"),
|
||||||
fieldtype: "Select",
|
fieldtype: "Select",
|
||||||
options: "Monthly\nQuarterly\nHalf-Yearly\nYearly",
|
options: "Monthly\nQuarterly\nHalf-Yearly\nYearly",
|
||||||
default: "Monthly"
|
default: "Monthly"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
fieldname: "target_on",
|
fieldname: "target_on",
|
||||||
label: frappe._("Target On"),
|
label: __("Target On"),
|
||||||
fieldtype: "Select",
|
fieldtype: "Select",
|
||||||
options: "Quantity\nAmount",
|
options: "Quantity\nAmount",
|
||||||
default: "Quantity"
|
default: "Quantity"
|
||||||
|
@ -5,57 +5,57 @@ frappe.query_reports["Sales Person-wise Transaction Summary"] = {
|
|||||||
"filters": [
|
"filters": [
|
||||||
{
|
{
|
||||||
fieldname: "sales_person",
|
fieldname: "sales_person",
|
||||||
label: frappe._("Sales Person"),
|
label: __("Sales Person"),
|
||||||
fieldtype: "Link",
|
fieldtype: "Link",
|
||||||
options: "Sales Person"
|
options: "Sales Person"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
fieldname: "doc_type",
|
fieldname: "doc_type",
|
||||||
label: frappe._("Document Type"),
|
label: __("Document Type"),
|
||||||
fieldtype: "Select",
|
fieldtype: "Select",
|
||||||
options: "Sales Order\nDelivery Note\nSales Invoice",
|
options: "Sales Order\nDelivery Note\nSales Invoice",
|
||||||
default: "Sales Order"
|
default: "Sales Order"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
fieldname: "from_date",
|
fieldname: "from_date",
|
||||||
label: frappe._("From Date"),
|
label: __("From Date"),
|
||||||
fieldtype: "Date",
|
fieldtype: "Date",
|
||||||
default: frappe.defaults.get_user_default("year_start_date"),
|
default: frappe.defaults.get_user_default("year_start_date"),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
fieldname:"to_date",
|
fieldname:"to_date",
|
||||||
label: frappe._("To Date"),
|
label: __("To Date"),
|
||||||
fieldtype: "Date",
|
fieldtype: "Date",
|
||||||
default: get_today()
|
default: get_today()
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
fieldname:"company",
|
fieldname:"company",
|
||||||
label: frappe._("Company"),
|
label: __("Company"),
|
||||||
fieldtype: "Link",
|
fieldtype: "Link",
|
||||||
options: "Company",
|
options: "Company",
|
||||||
default: frappe.defaults.get_user_default("company")
|
default: frappe.defaults.get_user_default("company")
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
fieldname:"item_group",
|
fieldname:"item_group",
|
||||||
label: frappe._("Item Group"),
|
label: __("Item Group"),
|
||||||
fieldtype: "Link",
|
fieldtype: "Link",
|
||||||
options: "Item Group",
|
options: "Item Group",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
fieldname:"brand",
|
fieldname:"brand",
|
||||||
label: frappe._("Brand"),
|
label: __("Brand"),
|
||||||
fieldtype: "Link",
|
fieldtype: "Link",
|
||||||
options: "Brand",
|
options: "Brand",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
fieldname:"customer",
|
fieldname:"customer",
|
||||||
label: frappe._("Customer"),
|
label: __("Customer"),
|
||||||
fieldtype: "Link",
|
fieldtype: "Link",
|
||||||
options: "Customer",
|
options: "Customer",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
fieldname:"territory",
|
fieldname:"territory",
|
||||||
label: frappe._("Territory"),
|
label: __("Territory"),
|
||||||
fieldtype: "Link",
|
fieldtype: "Link",
|
||||||
options: "Territory",
|
options: "Territory",
|
||||||
},
|
},
|
||||||
|
@ -5,21 +5,21 @@ frappe.query_reports["Territory Target Variance Item Group-Wise"] = {
|
|||||||
"filters": [
|
"filters": [
|
||||||
{
|
{
|
||||||
fieldname: "fiscal_year",
|
fieldname: "fiscal_year",
|
||||||
label: frappe._("Fiscal Year"),
|
label: __("Fiscal Year"),
|
||||||
fieldtype: "Link",
|
fieldtype: "Link",
|
||||||
options: "Fiscal Year",
|
options: "Fiscal Year",
|
||||||
default: sys_defaults.fiscal_year
|
default: sys_defaults.fiscal_year
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
fieldname: "period",
|
fieldname: "period",
|
||||||
label: frappe._("Period"),
|
label: __("Period"),
|
||||||
fieldtype: "Select",
|
fieldtype: "Select",
|
||||||
options: "Monthly\nQuarterly\nHalf-Yearly\nYearly",
|
options: "Monthly\nQuarterly\nHalf-Yearly\nYearly",
|
||||||
default: "Monthly"
|
default: "Monthly"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
fieldname: "target_on",
|
fieldname: "target_on",
|
||||||
label: frappe._("Target On"),
|
label: __("Target On"),
|
||||||
fieldtype: "Select",
|
fieldtype: "Select",
|
||||||
options: "Quantity\nAmount",
|
options: "Quantity\nAmount",
|
||||||
default: "Quantity"
|
default: "Quantity"
|
||||||
|
@ -72,7 +72,7 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({
|
|||||||
this.frm.set_query("batch_no", this.fname, function(doc, cdt, cdn) {
|
this.frm.set_query("batch_no", this.fname, function(doc, cdt, cdn) {
|
||||||
var item = frappe.get_doc(cdt, cdn);
|
var item = frappe.get_doc(cdt, cdn);
|
||||||
if(!item.item_code) {
|
if(!item.item_code) {
|
||||||
frappe.throw(frappe._("Please enter Item Code to get batch no"));
|
frappe.throw(__("Please enter Item Code to get batch no"));
|
||||||
} else {
|
} else {
|
||||||
filters = {
|
filters = {
|
||||||
'item_code': item.item_code,
|
'item_code': item.item_code,
|
||||||
@ -174,10 +174,10 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({
|
|||||||
frappe.model.round_floats_in(this.frm.doc, ["net_total", "total_commission"]);
|
frappe.model.round_floats_in(this.frm.doc, ["net_total", "total_commission"]);
|
||||||
|
|
||||||
if(this.frm.doc.net_total < this.frm.doc.total_commission) {
|
if(this.frm.doc.net_total < this.frm.doc.total_commission) {
|
||||||
var msg = (frappe._("[Error]") + " " +
|
var msg = (__("[Error]") + " " +
|
||||||
frappe._(frappe.meta.get_label(this.frm.doc.doctype, "total_commission",
|
__(frappe.meta.get_label(this.frm.doc.doctype, "total_commission",
|
||||||
this.frm.doc.name)) + " > " +
|
this.frm.doc.name)) + " > " +
|
||||||
frappe._(frappe.meta.get_label(this.frm.doc.doctype, "net_total", this.frm.doc.name)));
|
__(frappe.meta.get_label(this.frm.doc.doctype, "net_total", this.frm.doc.name)));
|
||||||
msgprint(msg);
|
msgprint(msg);
|
||||||
throw msg;
|
throw msg;
|
||||||
}
|
}
|
||||||
@ -421,8 +421,8 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({
|
|||||||
calculate_commission: function() {
|
calculate_commission: function() {
|
||||||
if(this.frm.fields_dict.commission_rate) {
|
if(this.frm.fields_dict.commission_rate) {
|
||||||
if(this.frm.doc.commission_rate > 100) {
|
if(this.frm.doc.commission_rate > 100) {
|
||||||
var msg = frappe._(frappe.meta.get_label(this.frm.doc.doctype, "commission_rate", this.frm.doc.name)) +
|
var msg = __(frappe.meta.get_label(this.frm.doc.doctype, "commission_rate", this.frm.doc.name)) +
|
||||||
" " + frappe._("cannot be greater than 100");
|
" " + __("cannot be greater than 100");
|
||||||
msgprint(msg);
|
msgprint(msg);
|
||||||
throw msg;
|
throw msg;
|
||||||
}
|
}
|
||||||
@ -477,7 +477,7 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({
|
|||||||
$.each(fields_list, function(i, fname) {
|
$.each(fields_list, function(i, fname) {
|
||||||
var docfield = frappe.meta.docfield_map[me.frm.doc.doctype][fname];
|
var docfield = frappe.meta.docfield_map[me.frm.doc.doctype][fname];
|
||||||
if(docfield) {
|
if(docfield) {
|
||||||
var label = frappe._(docfield.label || "").replace(/\([^\)]*\)/g, "");
|
var label = __(docfield.label || "").replace(/\([^\)]*\)/g, "");
|
||||||
field_label_map[fname] = label.trim() + " (" + currency + ")";
|
field_label_map[fname] = label.trim() + " (" + currency + ")";
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -521,7 +521,7 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({
|
|||||||
$.each(fields_list, function(i, fname) {
|
$.each(fields_list, function(i, fname) {
|
||||||
var docfield = frappe.meta.docfield_map[grid_doctype][fname];
|
var docfield = frappe.meta.docfield_map[grid_doctype][fname];
|
||||||
if(docfield) {
|
if(docfield) {
|
||||||
var label = frappe._(docfield.label || "").replace(/\([^\)]*\)/g, "");
|
var label = __(docfield.label || "").replace(/\([^\)]*\)/g, "");
|
||||||
field_label_map[grid_doctype + "-" + fname] =
|
field_label_map[grid_doctype + "-" + fname] =
|
||||||
label.trim() + " (" + currency + ")";
|
label.trim() + " (" + currency + ")";
|
||||||
}
|
}
|
||||||
@ -570,10 +570,7 @@ var set_sales_bom_help = function(doc) {
|
|||||||
|
|
||||||
if (inList(['Delivery Note', 'Sales Invoice'], doc.doctype)) {
|
if (inList(['Delivery Note', 'Sales Invoice'], doc.doctype)) {
|
||||||
help_msg = "<div class='alert alert-warning'>" +
|
help_msg = "<div class='alert alert-warning'>" +
|
||||||
frappe._("For 'Sales BOM' items, warehouse, serial no and batch no \
|
__("For 'Sales BOM' items, warehouse, serial no and batch no will be considered from the 'Packing List' table. If warehouse and batch no are same for all packing items for any 'Sales BOM' item, those values can be entered in the main item table, values will be copied to 'Packing List' table.")+
|
||||||
will be considered from the 'Packing List' table. \
|
|
||||||
If warehouse and batch no are same for all packing items for any 'Sales BOM' item, \
|
|
||||||
those values can be entered in the main item table, values will be copied to 'Packing List' table.")+
|
|
||||||
"</div>";
|
"</div>";
|
||||||
frappe.meta.get_docfield(doc.doctype, 'sales_bom_help', doc.name).options = help_msg;
|
frappe.meta.get_docfield(doc.doctype, 'sales_bom_help', doc.name).options = help_msg;
|
||||||
}
|
}
|
||||||
|
@ -7,12 +7,11 @@ $.extend(cur_frm.cscript, {
|
|||||||
|
|
||||||
if(!(cint(cur_frm.doc.dropbox_access_allowed) ||
|
if(!(cint(cur_frm.doc.dropbox_access_allowed) ||
|
||||||
cint(cur_frm.doc.gdrive_access_allowed))) {
|
cint(cur_frm.doc.gdrive_access_allowed))) {
|
||||||
cur_frm.set_intro(frappe._("You can start by selecting backup frequency and \
|
cur_frm.set_intro(__("You can start by selecting backup frequency and granting access for sync"));
|
||||||
granting access for sync"));
|
|
||||||
} else {
|
} else {
|
||||||
var services = {
|
var services = {
|
||||||
"dropbox": frappe._("Dropbox"),
|
"dropbox": __("Dropbox"),
|
||||||
"gdrive": frappe._("Google Drive")
|
"gdrive": __("Google Drive")
|
||||||
}
|
}
|
||||||
var active_services = [];
|
var active_services = [];
|
||||||
|
|
||||||
@ -25,7 +24,7 @@ $.extend(cur_frm.cscript, {
|
|||||||
});
|
});
|
||||||
|
|
||||||
if(active_services.length > 0) {
|
if(active_services.length > 0) {
|
||||||
cur_frm.set_intro(frappe._("Backups will be uploaded to") + ": " +
|
cur_frm.set_intro(__("Backups will be uploaded to") + ": " +
|
||||||
frappe.utils.comma_and(active_services));
|
frappe.utils.comma_and(active_services));
|
||||||
} else {
|
} else {
|
||||||
cur_frm.set_intro("");
|
cur_frm.set_intro("");
|
||||||
@ -36,8 +35,8 @@ $.extend(cur_frm.cscript, {
|
|||||||
|
|
||||||
validate_send_notifications_to: function() {
|
validate_send_notifications_to: function() {
|
||||||
if(!cur_frm.doc.send_notifications_to) {
|
if(!cur_frm.doc.send_notifications_to) {
|
||||||
msgprint(frappe._("Please specify") + ": " +
|
msgprint(__("Please specify") + ": " +
|
||||||
frappe._(frappe.meta.get_label(cur_frm.doctype, "send_notifications_to")));
|
__(frappe.meta.get_label(cur_frm.doctype, "send_notifications_to")));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ cur_frm.cscript.replace_abbr = function() {
|
|||||||
},
|
},
|
||||||
callback: function(r) {
|
callback: function(r) {
|
||||||
if(r.exc) {
|
if(r.exc) {
|
||||||
msgprint(frappe._("There were errors."));
|
msgprint(__("There were errors."));
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
cur_frm.set_value("abbr", args.new_abbr);
|
cur_frm.set_value("abbr", args.new_abbr);
|
||||||
@ -61,8 +61,8 @@ cur_frm.cscript.has_special_chars = function(t) {
|
|||||||
|
|
||||||
cur_frm.cscript.company_name = function(doc){
|
cur_frm.cscript.company_name = function(doc){
|
||||||
if(doc.company_name && cur_frm.cscript.has_special_chars(doc.company_name)){
|
if(doc.company_name && cur_frm.cscript.has_special_chars(doc.company_name)){
|
||||||
msgprint(("<font color=red>"+frappe._("Special Characters")+" <b>! @ # $ % ^ * + = - [ ] ' ; , / { } | : < > ?</b> "+
|
msgprint(("<font color=red>"+__("Special Characters")+" <b>! @ # $ % ^ * + = - [ ] ' ; , / { } | : < > ?</b> "+
|
||||||
frappe._("are not allowed for ")+"</font>\n"+frappe._("Company Name")+" <b> "+ doc.company_name +"</b>"))
|
__("are not allowed for ")+"</font>\n"+__("Company Name")+" <b> "+ doc.company_name +"</b>"))
|
||||||
doc.company_name = '';
|
doc.company_name = '';
|
||||||
refresh_field('company_name');
|
refresh_field('company_name');
|
||||||
}
|
}
|
||||||
@ -70,8 +70,8 @@ cur_frm.cscript.company_name = function(doc){
|
|||||||
|
|
||||||
cur_frm.cscript.abbr = function(doc){
|
cur_frm.cscript.abbr = function(doc){
|
||||||
if(doc.abbr && cur_frm.cscript.has_special_chars(doc.abbr)){
|
if(doc.abbr && cur_frm.cscript.has_special_chars(doc.abbr)){
|
||||||
msgprint("<font color=red>"+frappe._("Special Characters ")+"<b>! @ # $ % ^ * + = - [ ] ' ; , / { } | : < > ?</b>" +
|
msgprint("<font color=red>"+__("Special Characters ")+"<b>! @ # $ % ^ * + = - [ ] ' ; , / { } | : < > ?</b>" +
|
||||||
frappe._("are not allowed for")+ "</font>\nAbbr <b>" + doc.abbr +"</b>")
|
__("are not allowed for")+ "</font>\nAbbr <b>" + doc.abbr +"</b>")
|
||||||
doc.abbr = '';
|
doc.abbr = '';
|
||||||
refresh_field('abbr');
|
refresh_field('abbr');
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,6 @@
|
|||||||
cur_frm.cscript.refresh = function(doc) {
|
cur_frm.cscript.refresh = function(doc) {
|
||||||
cur_frm.set_intro("");
|
cur_frm.set_intro("");
|
||||||
if(!cur_frm.doc.enabled) {
|
if(!cur_frm.doc.enabled) {
|
||||||
cur_frm.set_intro(frappe._("This Currency is disabled. Enable to use in transactions"))
|
cur_frm.set_intro(__("This Currency is disabled. Enable to use in transactions"))
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -22,7 +22,7 @@ $.extend(cur_frm.cscript, {
|
|||||||
|
|
||||||
set_exchange_rate_label: function() {
|
set_exchange_rate_label: function() {
|
||||||
if(cur_frm.doc.from_currency && cur_frm.doc.to_currency) {
|
if(cur_frm.doc.from_currency && cur_frm.doc.to_currency) {
|
||||||
var default_label = frappe._(frappe.meta.docfield_map[cur_frm.doctype]["exchange_rate"].label);
|
var default_label = __(frappe.meta.docfield_map[cur_frm.doctype]["exchange_rate"].label);
|
||||||
cur_frm.fields_dict.exchange_rate.set_label(default_label +
|
cur_frm.fields_dict.exchange_rate.set_label(default_label +
|
||||||
repl(" (1 %(from_currency)s = [?] %(to_currency)s)", cur_frm.doc));
|
repl(" (1 %(from_currency)s = [?] %(to_currency)s)", cur_frm.doc));
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,7 @@ cur_frm.cscript.set_root_readonly = function(doc) {
|
|||||||
// read-only for root customer group
|
// read-only for root customer group
|
||||||
if(!doc.parent_customer_group) {
|
if(!doc.parent_customer_group) {
|
||||||
cur_frm.set_read_only();
|
cur_frm.set_read_only();
|
||||||
cur_frm.set_intro(frappe._("This is a root customer group and cannot be edited."));
|
cur_frm.set_intro(__("This is a root customer group and cannot be edited."));
|
||||||
} else {
|
} else {
|
||||||
cur_frm.set_intro(null);
|
cur_frm.set_intro(null);
|
||||||
}
|
}
|
||||||
|
@ -3,10 +3,10 @@
|
|||||||
|
|
||||||
cur_frm.cscript.refresh = function(doc, dt, dn) {
|
cur_frm.cscript.refresh = function(doc, dt, dn) {
|
||||||
doc = locals[dt][dn];
|
doc = locals[dt][dn];
|
||||||
var save_msg = frappe._("You must ")+ "<b>"+frappe._("Save ")+"</b>"+frappe._("the form before proceeding");
|
var save_msg = __("You must Save the form before proceeding");
|
||||||
var err_msg = frappe._("There was an error. One probable reason could be that you haven't saved the form. Please contact support@erpnext.com if the problem persists.")
|
var err_msg = __("There was an error. One probable reason could be that you haven't saved the form. Please contact support@erpnext.com if the problem persists.")
|
||||||
|
|
||||||
cur_frm.add_custom_button(frappe._('View Now'), function() {
|
cur_frm.add_custom_button(__('View Now'), function() {
|
||||||
doc = locals[dt][dn];
|
doc = locals[dt][dn];
|
||||||
if(doc.__unsaved != 1) {
|
if(doc.__unsaved != 1) {
|
||||||
return $c_obj(doc, 'get_digest_msg', '', function(r, rt) {
|
return $c_obj(doc, 'get_digest_msg', '', function(r, rt) {
|
||||||
@ -16,7 +16,7 @@ cur_frm.cscript.refresh = function(doc, dt, dn) {
|
|||||||
} else {
|
} else {
|
||||||
//console.log(arguments);
|
//console.log(arguments);
|
||||||
var d = new frappe.ui.Dialog({
|
var d = new frappe.ui.Dialog({
|
||||||
title: frappe._('Email Digest: ') + dn,
|
title: __('Email Digest: ') + dn,
|
||||||
width: 800
|
width: 800
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -29,7 +29,7 @@ cur_frm.cscript.refresh = function(doc, dt, dn) {
|
|||||||
msgprint(save_msg);
|
msgprint(save_msg);
|
||||||
}
|
}
|
||||||
}, 1);
|
}, 1);
|
||||||
cur_frm.add_custom_button(frappe._('Send Now'), function() {
|
cur_frm.add_custom_button(__('Send Now'), function() {
|
||||||
doc = locals[dt][dn];
|
doc = locals[dt][dn];
|
||||||
if(doc.__unsaved != 1) {
|
if(doc.__unsaved != 1) {
|
||||||
return $c_obj(doc, 'send', '', function(r, rt) {
|
return $c_obj(doc, 'send', '', function(r, rt) {
|
||||||
@ -38,7 +38,7 @@ cur_frm.cscript.refresh = function(doc, dt, dn) {
|
|||||||
console.log(r.exc);
|
console.log(r.exc);
|
||||||
} else {
|
} else {
|
||||||
//console.log(arguments);
|
//console.log(arguments);
|
||||||
msgprint(frappe._('Message Sent'));
|
msgprint(__('Message Sent'));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
@ -56,7 +56,7 @@ cur_frm.cscript.addremove_recipients = function(doc, dt, dn) {
|
|||||||
// Open a dialog and display checkboxes against email addresses
|
// Open a dialog and display checkboxes against email addresses
|
||||||
doc = locals[dt][dn];
|
doc = locals[dt][dn];
|
||||||
var d = new frappe.ui.Dialog({
|
var d = new frappe.ui.Dialog({
|
||||||
title: frappe._('Add/Remove Recipients'),
|
title: __('Add/Remove Recipients'),
|
||||||
width: 400
|
width: 400
|
||||||
});
|
});
|
||||||
var dialog_div = $a(d.body, 'div', 'dialog-div', '', '');
|
var dialog_div = $a(d.body, 'div', 'dialog-div', '', '');
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
cur_frm.cscript.refresh = function(doc, cdt, cdn) {
|
cur_frm.cscript.refresh = function(doc, cdt, cdn) {
|
||||||
cur_frm.cscript.set_root_readonly(doc);
|
cur_frm.cscript.set_root_readonly(doc);
|
||||||
cur_frm.appframe.add_button(frappe._("Item Group Tree"), function() {
|
cur_frm.appframe.add_button(__("Item Group Tree"), function() {
|
||||||
frappe.set_route("Sales Browser", "Item Group");
|
frappe.set_route("Sales Browser", "Item Group");
|
||||||
}, "icon-sitemap")
|
}, "icon-sitemap")
|
||||||
|
|
||||||
@ -19,7 +19,7 @@ cur_frm.cscript.set_root_readonly = function(doc) {
|
|||||||
// read-only for root item group
|
// read-only for root item group
|
||||||
if(!doc.parent_item_group) {
|
if(!doc.parent_item_group) {
|
||||||
cur_frm.set_read_only();
|
cur_frm.set_read_only();
|
||||||
cur_frm.set_intro(frappe._("This is a root item group and cannot be edited."));
|
cur_frm.set_intro(__("This is a root item group and cannot be edited."));
|
||||||
} else {
|
} else {
|
||||||
cur_frm.set_intro(null);
|
cur_frm.set_intro(null);
|
||||||
}
|
}
|
||||||
|
@ -7,9 +7,9 @@ cur_frm.cscript = {
|
|||||||
refresh: function(doc) {
|
refresh: function(doc) {
|
||||||
cur_frm.set_intro("");
|
cur_frm.set_intro("");
|
||||||
if(doc.extract_emails) {
|
if(doc.extract_emails) {
|
||||||
cur_frm.set_intro(frappe._("Active: Will extract emails from ") + doc.email_id);
|
cur_frm.set_intro(__("Active: Will extract emails from ") + doc.email_id);
|
||||||
} else {
|
} else {
|
||||||
cur_frm.set_intro(frappe._("Not Active"));
|
cur_frm.set_intro(__("Not Active"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -7,9 +7,9 @@ cur_frm.cscript = {
|
|||||||
refresh: function(doc) {
|
refresh: function(doc) {
|
||||||
cur_frm.set_intro("");
|
cur_frm.set_intro("");
|
||||||
if(doc.extract_emails) {
|
if(doc.extract_emails) {
|
||||||
cur_frm.set_intro(frappe._("Active: Will extract emails from ") + doc.email_id);
|
cur_frm.set_intro(__("Active: Will extract emails from ") + doc.email_id);
|
||||||
} else {
|
} else {
|
||||||
cur_frm.set_intro(frappe._("Not Active"));
|
cur_frm.set_intro(__("Not Active"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -39,7 +39,7 @@ cur_frm.cscript.make_address = function() {
|
|||||||
return "select name, address_type, address_line1, address_line2, city, state, country, pincode, fax, email_id, phone, is_primary_address, is_shipping_address from tabAddress where sales_partner='"+cur_frm.docname+"' and docstatus != 2 order by is_primary_address desc"
|
return "select name, address_type, address_line1, address_line2, city, state, country, pincode, fax, email_id, phone, is_primary_address, is_shipping_address from tabAddress where sales_partner='"+cur_frm.docname+"' and docstatus != 2 order by is_primary_address desc"
|
||||||
},
|
},
|
||||||
as_dict: 1,
|
as_dict: 1,
|
||||||
no_results_message: frappe._('No addresses created'),
|
no_results_message: __('No addresses created'),
|
||||||
render_row: function(wrapper, data) {
|
render_row: function(wrapper, data) {
|
||||||
$(wrapper).css('padding','5px 0px');
|
$(wrapper).css('padding','5px 0px');
|
||||||
var link = $ln(wrapper,cstr(data.name), function() { loaddoc("Address", this.dn); }, {fontWeight:'bold'});
|
var link = $ln(wrapper,cstr(data.name), function() { loaddoc("Address", this.dn); }, {fontWeight:'bold'});
|
||||||
@ -69,7 +69,7 @@ cur_frm.cscript.make_contact = function() {
|
|||||||
return "select name, first_name, last_name, email_id, phone, mobile_no, department, designation, is_primary_contact from tabContact where sales_partner='"+cur_frm.docname+"' and docstatus != 2 order by is_primary_contact desc"
|
return "select name, first_name, last_name, email_id, phone, mobile_no, department, designation, is_primary_contact from tabContact where sales_partner='"+cur_frm.docname+"' and docstatus != 2 order by is_primary_contact desc"
|
||||||
},
|
},
|
||||||
as_dict: 1,
|
as_dict: 1,
|
||||||
no_results_message: frappe._('No contacts created'),
|
no_results_message: __('No contacts created'),
|
||||||
render_row: function(wrapper, data) {
|
render_row: function(wrapper, data) {
|
||||||
$(wrapper).css('padding', '5px 0px');
|
$(wrapper).css('padding', '5px 0px');
|
||||||
var link = $ln(wrapper, cstr(data.name), function() { loaddoc("Contact", this.dn); }, {fontWeight:'bold'});
|
var link = $ln(wrapper, cstr(data.name), function() { loaddoc("Contact", this.dn); }, {fontWeight:'bold'});
|
||||||
|
@ -9,7 +9,7 @@ cur_frm.cscript.set_root_readonly = function(doc) {
|
|||||||
// read-only for root
|
// read-only for root
|
||||||
if(!doc.parent_sales_person) {
|
if(!doc.parent_sales_person) {
|
||||||
cur_frm.set_read_only();
|
cur_frm.set_read_only();
|
||||||
cur_frm.set_intro(frappe._("This is a root sales person and cannot be edited."));
|
cur_frm.set_intro(__("This is a root sales person and cannot be edited."));
|
||||||
} else {
|
} else {
|
||||||
cur_frm.set_intro(null);
|
cur_frm.set_intro(null);
|
||||||
}
|
}
|
||||||
|
@ -2,5 +2,5 @@
|
|||||||
// License: GNU General Public License v3. See license.txt
|
// License: GNU General Public License v3. See license.txt
|
||||||
|
|
||||||
cur_frm.cscript.refresh = function(doc) {
|
cur_frm.cscript.refresh = function(doc) {
|
||||||
cur_frm.set_intro(doc.__islocal ? "" : frappe._("There is nothing to edit."))
|
cur_frm.set_intro(doc.__islocal ? "" : __("There is nothing to edit."))
|
||||||
}
|
}
|
@ -9,7 +9,7 @@ cur_frm.cscript.set_root_readonly = function(doc) {
|
|||||||
// read-only for root territory
|
// read-only for root territory
|
||||||
if(!doc.parent_territory) {
|
if(!doc.parent_territory) {
|
||||||
cur_frm.set_read_only();
|
cur_frm.set_read_only();
|
||||||
cur_frm.set_intro(frappe._("This is a root territory and cannot be edited."));
|
cur_frm.set_intro(__("This is a root territory and cannot be edited."));
|
||||||
} else {
|
} else {
|
||||||
cur_frm.set_intro(null);
|
cur_frm.set_intro(null);
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,7 @@ frappe.pages['setup-wizard'].onload = function(wrapper) {
|
|||||||
args: values,
|
args: values,
|
||||||
callback: function(r) {
|
callback: function(r) {
|
||||||
if(r.exc) {
|
if(r.exc) {
|
||||||
var d = msgprint(frappe._("There were errors."));
|
var d = msgprint(__("There were errors."));
|
||||||
d.custom_onhide = function() {
|
d.custom_onhide = function() {
|
||||||
frappe.set_route(erpnext.wiz.page_name, "0");
|
frappe.set_route(erpnext.wiz.page_name, "0");
|
||||||
}
|
}
|
||||||
@ -25,7 +25,7 @@ frappe.pages['setup-wizard'].onload = function(wrapper) {
|
|||||||
wiz.show_complete();
|
wiz.show_complete();
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
if(user==="Administrator") {
|
if(user==="Administrator") {
|
||||||
msgprint(frappe._("Login with your new User ID") + ":" + values.email);
|
msgprint(__("Login with your new User ID") + ":" + values.email);
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
frappe.app.logout();
|
frappe.app.logout();
|
||||||
}, 2000);
|
}, 2000);
|
||||||
@ -37,40 +37,40 @@ frappe.pages['setup-wizard'].onload = function(wrapper) {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
title: frappe._("ERPNext Setup Guide"),
|
title: __("ERPNext Setup Guide"),
|
||||||
welcome_html: '<h1 class="text-muted text-center"><i class="icon-magic"></i></h1>\
|
welcome_html: '<h1 class="text-muted text-center"><i class="icon-magic"></i></h1>\
|
||||||
<h2 class="text-center">'+frappe._('ERPNext Setup')+'</h2>\
|
<h2 class="text-center">'+__('ERPNext Setup')+'</h2>\
|
||||||
<p class="text-center" style="margin: 0px 100px">' +
|
<p class="text-center" style="margin: 0px 100px">' +
|
||||||
frappe._('Welcome to ERPNext. Over the next few minutes we will help you setup your ERPNext account. Try and fill in as much information as you have even if it takes a bit longer. It will save you a lot of time later. Good Luck!') +
|
__('Welcome to ERPNext. Over the next few minutes we will help you setup your ERPNext account. Try and fill in as much information as you have even if it takes a bit longer. It will save you a lot of time later. Good Luck!') +
|
||||||
'</p>',
|
'</p>',
|
||||||
working_html: '<h3 class="text-muted text-center"><i class="icon-refresh icon-spin"></i></h3>\
|
working_html: '<h3 class="text-muted text-center"><i class="icon-refresh icon-spin"></i></h3>\
|
||||||
<h2 class="text-center">'+frappe._('Setting up...')+'</h2>\
|
<h2 class="text-center">'+__('Setting up...')+'</h2>\
|
||||||
<p class="text-center">' +
|
<p class="text-center">' +
|
||||||
frappe._('Sit tight while your system is being setup. This may take a few moments.') +
|
__('Sit tight while your system is being setup. This may take a few moments.') +
|
||||||
'</p>',
|
'</p>',
|
||||||
complete_html: '<h1 class="text-muted text-center"><i class="icon-thumbs-up"></i></h1>\
|
complete_html: '<h1 class="text-muted text-center"><i class="icon-thumbs-up"></i></h1>\
|
||||||
<h2 class="text-center">'+frappe._('Setup Complete!')+'</h2>\
|
<h2 class="text-center">'+__('Setup Complete!')+'</h2>\
|
||||||
<p class="text-center">' +
|
<p class="text-center">' +
|
||||||
frappe._('Your setup is complete. Refreshing...') +
|
__('Your setup is complete. Refreshing...') +
|
||||||
'</p>',
|
'</p>',
|
||||||
slides: [
|
slides: [
|
||||||
// User
|
// User
|
||||||
{
|
{
|
||||||
title: frappe._("The First User: You"),
|
title: __("The First User: You"),
|
||||||
icon: "icon-user",
|
icon: "icon-user",
|
||||||
fields: [
|
fields: [
|
||||||
{"fieldname": "first_name", "label": frappe._("First Name"), "fieldtype": "Data",
|
{"fieldname": "first_name", "label": __("First Name"), "fieldtype": "Data",
|
||||||
reqd:1},
|
reqd:1},
|
||||||
{"fieldname": "last_name", "label": frappe._("Last Name"), "fieldtype": "Data",
|
{"fieldname": "last_name", "label": __("Last Name"), "fieldtype": "Data",
|
||||||
reqd:1},
|
reqd:1},
|
||||||
{"fieldname": "email", "label": frappe._("Email Id"), "fieldtype": "Data",
|
{"fieldname": "email", "label": __("Email Id"), "fieldtype": "Data",
|
||||||
reqd:1, "description":"Your Login Id", "options":"Email"},
|
reqd:1, "description":"Your Login Id", "options":"Email"},
|
||||||
{"fieldname": "password", "label": frappe._("Password"), "fieldtype": "Password",
|
{"fieldname": "password", "label": __("Password"), "fieldtype": "Password",
|
||||||
reqd:1},
|
reqd:1},
|
||||||
{fieldtype:"Attach Image", fieldname:"attach_user",
|
{fieldtype:"Attach Image", fieldname:"attach_user",
|
||||||
label:"Attach Your User..."},
|
label:"Attach Your User..."},
|
||||||
],
|
],
|
||||||
help: frappe._('The first user will become the System Manager (you can change that later).'),
|
help: __('The first user will become the System Manager (you can change that later).'),
|
||||||
onload: function(slide) {
|
onload: function(slide) {
|
||||||
if(user!=="Administrator") {
|
if(user!=="Administrator") {
|
||||||
slide.form.fields_dict.password.$wrapper.toggle(false);
|
slide.form.fields_dict.password.$wrapper.toggle(false);
|
||||||
@ -86,21 +86,21 @@ frappe.pages['setup-wizard'].onload = function(wrapper) {
|
|||||||
|
|
||||||
// Organization
|
// Organization
|
||||||
{
|
{
|
||||||
title: frappe._("The Organization"),
|
title: __("The Organization"),
|
||||||
icon: "icon-building",
|
icon: "icon-building",
|
||||||
fields: [
|
fields: [
|
||||||
{fieldname:'company_name', label: frappe._('Company Name'), fieldtype:'Data', reqd:1,
|
{fieldname:'company_name', label: __('Company Name'), fieldtype:'Data', reqd:1,
|
||||||
placeholder: 'e.g. "My Company LLC"'},
|
placeholder: 'e.g. "My Company LLC"'},
|
||||||
{fieldname:'company_abbr', label: frappe._('Company Abbreviation'), fieldtype:'Data',
|
{fieldname:'company_abbr', label: __('Company Abbreviation'), fieldtype:'Data',
|
||||||
placeholder:'e.g. "MC"',reqd:1},
|
placeholder:'e.g. "MC"',reqd:1},
|
||||||
{fieldname:'fy_start_date', label:'Financial Year Start Date', fieldtype:'Date',
|
{fieldname:'fy_start_date', label:'Financial Year Start Date', fieldtype:'Date',
|
||||||
description:'Your financial year begins on', reqd:1},
|
description:'Your financial year begins on', reqd:1},
|
||||||
{fieldname:'fy_end_date', label:'Financial Year End Date', fieldtype:'Date',
|
{fieldname:'fy_end_date', label:'Financial Year End Date', fieldtype:'Date',
|
||||||
description:'Your financial year ends on', reqd:1},
|
description:'Your financial year ends on', reqd:1},
|
||||||
{fieldname:'company_tagline', label: frappe._('What does it do?'), fieldtype:'Data',
|
{fieldname:'company_tagline', label: __('What does it do?'), fieldtype:'Data',
|
||||||
placeholder:'e.g. "Build tools for builders"', reqd:1},
|
placeholder:'e.g. "Build tools for builders"', reqd:1},
|
||||||
],
|
],
|
||||||
help: frappe._('The name of your company for which you are setting up this system.'),
|
help: __('The name of your company for which you are setting up this system.'),
|
||||||
onload: function(slide) {
|
onload: function(slide) {
|
||||||
slide.get_input("company_name").on("change", function() {
|
slide.get_input("company_name").on("change", function() {
|
||||||
var parts = slide.get_input("company_name").val().split(" ");
|
var parts = slide.get_input("company_name").val().split(" ");
|
||||||
@ -120,19 +120,19 @@ frappe.pages['setup-wizard'].onload = function(wrapper) {
|
|||||||
|
|
||||||
// Country
|
// Country
|
||||||
{
|
{
|
||||||
title: frappe._("Country, Timezone and Currency"),
|
title: __("Country, Timezone and Currency"),
|
||||||
icon: "icon-flag",
|
icon: "icon-flag",
|
||||||
fields: [
|
fields: [
|
||||||
{fieldname:'country', label: frappe._('Country'), reqd:1,
|
{fieldname:'country', label: __('Country'), reqd:1,
|
||||||
options: "", fieldtype: 'Select'},
|
options: "", fieldtype: 'Select'},
|
||||||
{fieldname:'currency', label: frappe._('Default Currency'), reqd:1,
|
{fieldname:'currency', label: __('Default Currency'), reqd:1,
|
||||||
options: "", fieldtype: 'Select'},
|
options: "", fieldtype: 'Select'},
|
||||||
{fieldname:'timezone', label: frappe._('Time Zone'), reqd:1,
|
{fieldname:'timezone', label: __('Time Zone'), reqd:1,
|
||||||
options: "", fieldtype: 'Select'},
|
options: "", fieldtype: 'Select'},
|
||||||
{fieldname:'chart_of_accounts', label: frappe._('Chart of Accounts'),
|
{fieldname:'chart_of_accounts', label: __('Chart of Accounts'),
|
||||||
options: "", fieldtype: 'Select'}
|
options: "", fieldtype: 'Select'}
|
||||||
],
|
],
|
||||||
help: frappe._('Select your home country and check the timezone and currency.'),
|
help: __('Select your home country and check the timezone and currency.'),
|
||||||
onload: function(slide, form) {
|
onload: function(slide, form) {
|
||||||
frappe.call({
|
frappe.call({
|
||||||
method:"frappe.country_info.get_country_timezone_info",
|
method:"frappe.country_info.get_country_timezone_info",
|
||||||
@ -179,8 +179,8 @@ frappe.pages['setup-wizard'].onload = function(wrapper) {
|
|||||||
// Logo
|
// Logo
|
||||||
{
|
{
|
||||||
icon: "icon-bookmark",
|
icon: "icon-bookmark",
|
||||||
title: frappe._("Logo and Letter Heads"),
|
title: __("Logo and Letter Heads"),
|
||||||
help: frappe._('Upload your letter head and logo - you can edit them later.'),
|
help: __('Upload your letter head and logo - you can edit them later.'),
|
||||||
fields: [
|
fields: [
|
||||||
{fieldtype:"Attach Image", fieldname:"attach_letterhead", label:"Attach Letterhead..."},
|
{fieldtype:"Attach Image", fieldname:"attach_letterhead", label:"Attach Letterhead..."},
|
||||||
{fieldtype:"Attach Image", fieldname:"attach_logo", label:"Attach Logo..."},
|
{fieldtype:"Attach Image", fieldname:"attach_logo", label:"Attach Logo..."},
|
||||||
@ -190,40 +190,40 @@ frappe.pages['setup-wizard'].onload = function(wrapper) {
|
|||||||
// Taxes
|
// Taxes
|
||||||
{
|
{
|
||||||
icon: "icon-money",
|
icon: "icon-money",
|
||||||
"title": frappe._("Add Taxes"),
|
"title": __("Add Taxes"),
|
||||||
"help": frappe._("List your tax heads (e.g. VAT, Excise) (upto 3) and their standard rates. This will create a standard template, you can edit and add more later."),
|
"help": __("List your tax heads (e.g. VAT, Excise) (upto 3) and their standard rates. This will create a standard template, you can edit and add more later."),
|
||||||
"fields": [],
|
"fields": [],
|
||||||
},
|
},
|
||||||
|
|
||||||
// Customers
|
// Customers
|
||||||
{
|
{
|
||||||
icon: "icon-group",
|
icon: "icon-group",
|
||||||
"title": frappe._("Your Customers"),
|
"title": __("Your Customers"),
|
||||||
"help": frappe._("List a few of your customers. They could be organizations or individuals."),
|
"help": __("List a few of your customers. They could be organizations or individuals."),
|
||||||
"fields": [],
|
"fields": [],
|
||||||
},
|
},
|
||||||
|
|
||||||
// Items to Sell
|
// Items to Sell
|
||||||
{
|
{
|
||||||
icon: "icon-barcode",
|
icon: "icon-barcode",
|
||||||
"title": frappe._("Your Products or Services"),
|
"title": __("Your Products or Services"),
|
||||||
"help": frappe._("List your products or services that you sell to your customers. Make sure to check the Item Group, Unit of Measure and other properties when you start."),
|
"help": __("List your products or services that you sell to your customers. Make sure to check the Item Group, Unit of Measure and other properties when you start."),
|
||||||
"fields": [],
|
"fields": [],
|
||||||
},
|
},
|
||||||
|
|
||||||
// Suppliers
|
// Suppliers
|
||||||
{
|
{
|
||||||
icon: "icon-group",
|
icon: "icon-group",
|
||||||
"title": frappe._("Your Suppliers"),
|
"title": __("Your Suppliers"),
|
||||||
"help": frappe._("List a few of your suppliers. They could be organizations or individuals."),
|
"help": __("List a few of your suppliers. They could be organizations or individuals."),
|
||||||
"fields": [],
|
"fields": [],
|
||||||
},
|
},
|
||||||
|
|
||||||
// Items to Buy
|
// Items to Buy
|
||||||
{
|
{
|
||||||
icon: "icon-barcode",
|
icon: "icon-barcode",
|
||||||
"title": frappe._("Products or Services You Buy"),
|
"title": __("Products or Services You Buy"),
|
||||||
"help": frappe._("List a few products or services you buy from your suppliers or vendors. If these are same as your products, then do not add them."),
|
"help": __("List a few products or services you buy from your suppliers or vendors. If these are same as your products, then do not add them."),
|
||||||
"fields": [],
|
"fields": [],
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -324,7 +324,7 @@ frappe.wiz.Wizard = Class.extend({
|
|||||||
return;
|
return;
|
||||||
var me = this;
|
var me = this;
|
||||||
this.$welcome = this.get_message(this.welcome_html +
|
this.$welcome = this.get_message(this.welcome_html +
|
||||||
'<br><p class="text-center"><button class="btn btn-primary">'+frappe._("Start")+'</button></p>')
|
'<br><p class="text-center"><button class="btn btn-primary">'+__("Start")+'</button></p>')
|
||||||
.appendTo(this.parent);
|
.appendTo(this.parent);
|
||||||
|
|
||||||
this.$welcome.find(".btn").click(function() {
|
this.$welcome.find(".btn").click(function() {
|
||||||
|
@ -25,20 +25,20 @@ erpnext.stock.DeliveryNoteController = erpnext.selling.SellingController.extend(
|
|||||||
});
|
});
|
||||||
|
|
||||||
if(!from_sales_invoice)
|
if(!from_sales_invoice)
|
||||||
cur_frm.add_custom_button(frappe._('Make Invoice'), this.make_sales_invoice);
|
cur_frm.add_custom_button(__('Make Invoice'), this.make_sales_invoice);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(flt(doc.per_installed, 2) < 100 && doc.docstatus==1)
|
if(flt(doc.per_installed, 2) < 100 && doc.docstatus==1)
|
||||||
cur_frm.add_custom_button(frappe._('Make Installation Note'), this.make_installation_note);
|
cur_frm.add_custom_button(__('Make Installation Note'), this.make_installation_note);
|
||||||
|
|
||||||
if (doc.docstatus==1) {
|
if (doc.docstatus==1) {
|
||||||
cur_frm.appframe.add_button(frappe._('Send SMS'), cur_frm.cscript.send_sms, "icon-mobile-phone");
|
cur_frm.appframe.add_button(__('Send SMS'), cur_frm.cscript.send_sms, "icon-mobile-phone");
|
||||||
this.show_stock_ledger();
|
this.show_stock_ledger();
|
||||||
this.show_general_ledger();
|
this.show_general_ledger();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(doc.docstatus==0 && !doc.__islocal) {
|
if(doc.docstatus==0 && !doc.__islocal) {
|
||||||
cur_frm.add_custom_button(frappe._('Make Packing Slip'), cur_frm.cscript['Make Packing Slip']);
|
cur_frm.add_custom_button(__('Make Packing Slip'), cur_frm.cscript['Make Packing Slip']);
|
||||||
}
|
}
|
||||||
|
|
||||||
set_print_hide(doc, dt, dn);
|
set_print_hide(doc, dt, dn);
|
||||||
@ -48,7 +48,7 @@ erpnext.stock.DeliveryNoteController = erpnext.selling.SellingController.extend(
|
|||||||
cur_frm.fields_dict[cur_frm.cscript.fname].grid.set_column_disp(["expense_account", "cost_center"], aii_enabled);
|
cur_frm.fields_dict[cur_frm.cscript.fname].grid.set_column_disp(["expense_account", "cost_center"], aii_enabled);
|
||||||
|
|
||||||
if (this.frm.doc.docstatus===0) {
|
if (this.frm.doc.docstatus===0) {
|
||||||
cur_frm.add_custom_button(frappe._('From Sales Order'),
|
cur_frm.add_custom_button(__('From Sales Order'),
|
||||||
function() {
|
function() {
|
||||||
frappe.model.map_current_doc({
|
frappe.model.map_current_doc({
|
||||||
method: "erpnext.selling.doctype.sales_order.sales_order.make_delivery_note",
|
method: "erpnext.selling.doctype.sales_order.sales_order.make_delivery_note",
|
||||||
|
@ -130,7 +130,7 @@ cur_frm.fields_dict['item_group'].get_query = function(doc,cdt,cdn) {
|
|||||||
|
|
||||||
cur_frm.cscript.add_image = function(doc, dt, dn) {
|
cur_frm.cscript.add_image = function(doc, dt, dn) {
|
||||||
if(!doc.image) {
|
if(!doc.image) {
|
||||||
msgprint(frappe._('Please select an "Image" first'));
|
msgprint(__('Please select an "Image" first'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -145,7 +145,7 @@ cur_frm.cscript.add_image = function(doc, dt, dn) {
|
|||||||
// Quotation to validation - either customer or lead mandatory
|
// Quotation to validation - either customer or lead mandatory
|
||||||
cur_frm.cscript.weight_to_validate = function(doc, cdt, cdn){
|
cur_frm.cscript.weight_to_validate = function(doc, cdt, cdn){
|
||||||
if((doc.nett_weight || doc.gross_weight) && !doc.weight_uom) {
|
if((doc.nett_weight || doc.gross_weight) && !doc.weight_uom) {
|
||||||
msgprint(frappe._('Weight is mentioned,\nPlease mention "Weight UOM" too'));
|
msgprint(__('Weight is mentioned,\nPlease mention "Weight UOM" too'));
|
||||||
validated = 0;
|
validated = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -181,7 +181,6 @@ cur_frm.cscript.image = function() {
|
|||||||
if(!cur_frm.doc.description_html)
|
if(!cur_frm.doc.description_html)
|
||||||
cur_frm.cscript.add_image(cur_frm.doc);
|
cur_frm.cscript.add_image(cur_frm.doc);
|
||||||
else {
|
else {
|
||||||
msgprint(frappe._("You may need to update: ") +
|
msgprint(__("You may need to update: {0}", [frappe.meta.get_docfield(cur_frm.doc.doctype, "description_html").label]));
|
||||||
frappe.meta.get_docfield(cur_frm.doc.doctype, "description_html").label);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,7 @@ erpnext.stock.LandedCostWizard = erpnext.stock.StockController.extend({
|
|||||||
var me = this;
|
var me = this;
|
||||||
this.frm.fields_dict.lc_pr_details.grid.get_field('purchase_receipt').get_query =
|
this.frm.fields_dict.lc_pr_details.grid.get_field('purchase_receipt').get_query =
|
||||||
function() {
|
function() {
|
||||||
if(!me.frm.doc.company) msgprint(frappe._("Please enter company first"));
|
if(!me.frm.doc.company) msgprint(__("Please enter company first"));
|
||||||
return {
|
return {
|
||||||
filters:[
|
filters:[
|
||||||
['Purchase Receipt', 'docstatus', '=', '1'],
|
['Purchase Receipt', 'docstatus', '=', '1'],
|
||||||
@ -20,7 +20,7 @@ erpnext.stock.LandedCostWizard = erpnext.stock.StockController.extend({
|
|||||||
};
|
};
|
||||||
|
|
||||||
this.frm.fields_dict.landed_cost_details.grid.get_field('account_head').get_query = function() {
|
this.frm.fields_dict.landed_cost_details.grid.get_field('account_head').get_query = function() {
|
||||||
if(!me.frm.doc.company) msgprint(frappe._("Please enter company first"));
|
if(!me.frm.doc.company) msgprint(__("Please enter company first"));
|
||||||
return {
|
return {
|
||||||
filters:[
|
filters:[
|
||||||
['Account', 'group_or_ledger', '=', 'Ledger'],
|
['Account', 'group_or_ledger', '=', 'Ledger'],
|
||||||
@ -32,7 +32,7 @@ erpnext.stock.LandedCostWizard = erpnext.stock.StockController.extend({
|
|||||||
|
|
||||||
this.frm.fields_dict.landed_cost_details.grid.get_field('cost_center').get_query =
|
this.frm.fields_dict.landed_cost_details.grid.get_field('cost_center').get_query =
|
||||||
function() {
|
function() {
|
||||||
if(!me.frm.doc.company) msgprint(frappe._("Please enter company first"));
|
if(!me.frm.doc.company) msgprint(__("Please enter company first"));
|
||||||
return {
|
return {
|
||||||
filters:[
|
filters:[
|
||||||
['Cost Center', 'group_or_ledger', '=', 'Ledger'],
|
['Cost Center', 'group_or_ledger', '=', 'Ledger'],
|
||||||
|
@ -25,38 +25,38 @@ erpnext.buying.MaterialRequestController = erpnext.buying.BuyingController.exten
|
|||||||
cur_frm.dashboard.reset();
|
cur_frm.dashboard.reset();
|
||||||
if(doc.docstatus===1) {
|
if(doc.docstatus===1) {
|
||||||
if(doc.status==="Stopped") {
|
if(doc.status==="Stopped") {
|
||||||
cur_frm.dashboard.set_headline_alert(frappe._("Stopped"), "alert-danger", "icon-stop")
|
cur_frm.dashboard.set_headline_alert(__("Stopped"), "alert-danger", "icon-stop")
|
||||||
}
|
}
|
||||||
cur_frm.dashboard.add_progress(cint(doc.per_ordered) + "% "
|
cur_frm.dashboard.add_progress(cint(doc.per_ordered) + "% "
|
||||||
+ frappe._("Fulfilled"), cint(doc.per_ordered));
|
+ __("Fulfilled"), cint(doc.per_ordered));
|
||||||
}
|
}
|
||||||
|
|
||||||
if(doc.docstatus==0) {
|
if(doc.docstatus==0) {
|
||||||
cur_frm.add_custom_button(frappe._("Get Items from BOM"), cur_frm.cscript.get_items_from_bom, "icon-sitemap");
|
cur_frm.add_custom_button(__("Get Items from BOM"), cur_frm.cscript.get_items_from_bom, "icon-sitemap");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(doc.docstatus == 1 && doc.status != 'Stopped') {
|
if(doc.docstatus == 1 && doc.status != 'Stopped') {
|
||||||
if(doc.material_request_type === "Purchase")
|
if(doc.material_request_type === "Purchase")
|
||||||
cur_frm.add_custom_button(frappe._("Make Supplier Quotation"),
|
cur_frm.add_custom_button(__("Make Supplier Quotation"),
|
||||||
this.make_supplier_quotation);
|
this.make_supplier_quotation);
|
||||||
|
|
||||||
if(doc.material_request_type === "Transfer" && doc.status === "Submitted")
|
if(doc.material_request_type === "Transfer" && doc.status === "Submitted")
|
||||||
cur_frm.add_custom_button(frappe._("Transfer Material"), this.make_stock_entry);
|
cur_frm.add_custom_button(__("Transfer Material"), this.make_stock_entry);
|
||||||
|
|
||||||
if(flt(doc.per_ordered, 2) < 100) {
|
if(flt(doc.per_ordered, 2) < 100) {
|
||||||
if(doc.material_request_type === "Purchase")
|
if(doc.material_request_type === "Purchase")
|
||||||
cur_frm.add_custom_button(frappe._('Make Purchase Order'),
|
cur_frm.add_custom_button(__('Make Purchase Order'),
|
||||||
this.make_purchase_order);
|
this.make_purchase_order);
|
||||||
|
|
||||||
cur_frm.add_custom_button(frappe._('Stop Material Request'),
|
cur_frm.add_custom_button(__('Stop Material Request'),
|
||||||
cur_frm.cscript['Stop Material Request'], "icon-exclamation");
|
cur_frm.cscript['Stop Material Request'], "icon-exclamation");
|
||||||
}
|
}
|
||||||
cur_frm.add_custom_button(frappe._('Send SMS'), cur_frm.cscript.send_sms, "icon-mobile-phone");
|
cur_frm.add_custom_button(__('Send SMS'), cur_frm.cscript.send_sms, "icon-mobile-phone");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.frm.doc.docstatus===0) {
|
if (this.frm.doc.docstatus===0) {
|
||||||
cur_frm.add_custom_button(frappe._('From Sales Order'),
|
cur_frm.add_custom_button(__('From Sales Order'),
|
||||||
function() {
|
function() {
|
||||||
frappe.model.map_current_doc({
|
frappe.model.map_current_doc({
|
||||||
method: "erpnext.selling.doctype.sales_order.sales_order.make_material_request",
|
method: "erpnext.selling.doctype.sales_order.sales_order.make_material_request",
|
||||||
@ -72,7 +72,7 @@ erpnext.buying.MaterialRequestController = erpnext.buying.BuyingController.exten
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(doc.docstatus == 1 && doc.status == 'Stopped')
|
if(doc.docstatus == 1 && doc.status == 'Stopped')
|
||||||
cur_frm.add_custom_button(frappe._('Unstop Material Request'),
|
cur_frm.add_custom_button(__('Unstop Material Request'),
|
||||||
cur_frm.cscript['Unstop Material Request'], "icon-check");
|
cur_frm.cscript['Unstop Material Request'], "icon-check");
|
||||||
|
|
||||||
},
|
},
|
||||||
@ -91,13 +91,13 @@ erpnext.buying.MaterialRequestController = erpnext.buying.BuyingController.exten
|
|||||||
|
|
||||||
get_items_from_bom: function() {
|
get_items_from_bom: function() {
|
||||||
var d = new frappe.ui.Dialog({
|
var d = new frappe.ui.Dialog({
|
||||||
title: frappe._("Get Items from BOM"),
|
title: __("Get Items from BOM"),
|
||||||
fields: [
|
fields: [
|
||||||
{"fieldname":"bom", "fieldtype":"Link", "label":frappe._("BOM"),
|
{"fieldname":"bom", "fieldtype":"Link", "label":__("BOM"),
|
||||||
options:"BOM"},
|
options:"BOM"},
|
||||||
{"fieldname":"fetch_exploded", "fieldtype":"Check",
|
{"fieldname":"fetch_exploded", "fieldtype":"Check",
|
||||||
"label":frappe._("Fetch exploded BOM (including sub-assemblies)"), "default":1},
|
"label":__("Fetch exploded BOM (including sub-assemblies)"), "default":1},
|
||||||
{fieldname:"fetch", "label":frappe._("Get Items from BOM"), "fieldtype":"Button"}
|
{fieldname:"fetch", "label":__("Get Items from BOM"), "fieldtype":"Button"}
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
d.get_input("fetch").on("click", function() {
|
d.get_input("fetch").on("click", function() {
|
||||||
@ -164,12 +164,12 @@ $.extend(cur_frm.cscript, new erpnext.buying.MaterialRequestController({frm: cur
|
|||||||
cur_frm.cscript.qty = function(doc, cdt, cdn) {
|
cur_frm.cscript.qty = function(doc, cdt, cdn) {
|
||||||
var d = locals[cdt][cdn];
|
var d = locals[cdt][cdn];
|
||||||
if (flt(d.qty) < flt(d.min_order_qty))
|
if (flt(d.qty) < flt(d.min_order_qty))
|
||||||
alert(frappe._("Warning: Material Requested Qty is less than Minimum Order Qty"));
|
alert(__("Warning: Material Requested Qty is less than Minimum Order Qty"));
|
||||||
};
|
};
|
||||||
|
|
||||||
cur_frm.cscript['Stop Material Request'] = function() {
|
cur_frm.cscript['Stop Material Request'] = function() {
|
||||||
var doc = cur_frm.doc;
|
var doc = cur_frm.doc;
|
||||||
var check = confirm(frappe._("Do you really want to STOP this Material Request?"));
|
var check = confirm(__("Do you really want to STOP this Material Request?"));
|
||||||
|
|
||||||
if (check) {
|
if (check) {
|
||||||
return $c('runserverobj', args={'method':'update_status', 'arg': 'Stopped', 'docs': doc}, function(r,rt) {
|
return $c('runserverobj', args={'method':'update_status', 'arg': 'Stopped', 'docs': doc}, function(r,rt) {
|
||||||
@ -180,7 +180,7 @@ cur_frm.cscript['Stop Material Request'] = function() {
|
|||||||
|
|
||||||
cur_frm.cscript['Unstop Material Request'] = function(){
|
cur_frm.cscript['Unstop Material Request'] = function(){
|
||||||
var doc = cur_frm.doc;
|
var doc = cur_frm.doc;
|
||||||
var check = confirm(frappe._("Do you really want to UNSTOP this Material Request?"));
|
var check = confirm(__("Do you really want to UNSTOP this Material Request?"));
|
||||||
|
|
||||||
if (check) {
|
if (check) {
|
||||||
return $c('runserverobj', args={'method':'update_status', 'arg': 'Submitted','docs': doc}, function(r,rt) {
|
return $c('runserverobj', args={'method':'update_status', 'arg': 'Submitted','docs': doc}, function(r,rt) {
|
||||||
|
@ -45,13 +45,13 @@ cur_frm.cscript.validate = function(doc, cdt, cdn) {
|
|||||||
cur_frm.cscript.validate_case_nos = function(doc) {
|
cur_frm.cscript.validate_case_nos = function(doc) {
|
||||||
doc = locals[doc.doctype][doc.name];
|
doc = locals[doc.doctype][doc.name];
|
||||||
if(cint(doc.from_case_no)==0) {
|
if(cint(doc.from_case_no)==0) {
|
||||||
msgprint(frappe._("Case No. cannot be 0"))
|
msgprint(__("Case No. cannot be 0"))
|
||||||
validated = false;
|
validated = false;
|
||||||
} else if(!cint(doc.to_case_no)) {
|
} else if(!cint(doc.to_case_no)) {
|
||||||
doc.to_case_no = doc.from_case_no;
|
doc.to_case_no = doc.from_case_no;
|
||||||
refresh_field('to_case_no');
|
refresh_field('to_case_no');
|
||||||
} else if(cint(doc.to_case_no) < cint(doc.from_case_no)) {
|
} else if(cint(doc.to_case_no) < cint(doc.from_case_no)) {
|
||||||
msgprint(frappe._("'To Case No.' cannot be less than 'From Case No.'"));
|
msgprint(__("'To Case No.' cannot be less than 'From Case No.'"));
|
||||||
validated = false;
|
validated = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -72,14 +72,13 @@ cur_frm.cscript.validate_duplicate_items = function(doc, ps_detail) {
|
|||||||
for(var i=0; i<ps_detail.length; i++) {
|
for(var i=0; i<ps_detail.length; i++) {
|
||||||
for(var j=0; j<ps_detail.length; j++) {
|
for(var j=0; j<ps_detail.length; j++) {
|
||||||
if(i!=j && ps_detail[i].item_code && ps_detail[i].item_code==ps_detail[j].item_code) {
|
if(i!=j && ps_detail[i].item_code && ps_detail[i].item_code==ps_detail[j].item_code) {
|
||||||
msgprint(frappe._("You have entered duplicate items. Please rectify and try again."));
|
msgprint(__("You have entered duplicate items. Please rectify and try again."));
|
||||||
validated = false;
|
validated = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(flt(ps_detail[i].qty)<=0) {
|
if(flt(ps_detail[i].qty)<=0) {
|
||||||
msgprint(frappe._("Invalid quantity specified for item ") + ps_detail[i].item_code +
|
msgprint(__("Invalid quantity specified for item {0}. Quantity should be greater than 0.", [ps_detail[i].item_code]));
|
||||||
"."+frappe._(" Quantity should be greater than 0."));
|
|
||||||
validated = false;
|
validated = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -95,9 +94,7 @@ cur_frm.cscript.calc_net_total_pkg = function(doc, ps_detail) {
|
|||||||
for(var i=0; i<ps_detail.length; i++) {
|
for(var i=0; i<ps_detail.length; i++) {
|
||||||
var item = ps_detail[i];
|
var item = ps_detail[i];
|
||||||
if(item.weight_uom != doc.net_weight_uom) {
|
if(item.weight_uom != doc.net_weight_uom) {
|
||||||
msgprint(frappe._("Different UOM for items will lead to incorrect")+
|
msgprint(__("Different UOM for items will lead to incorrect (Total) Net Weight value. Make sure that Net Weight of each item is in the same UOM."));
|
||||||
frappe._("(Total) Net Weight value. Make sure that Net Weight of each item is")+
|
|
||||||
frappe._("in the same UOM."))
|
|
||||||
validated = false;
|
validated = false;
|
||||||
}
|
}
|
||||||
net_weight_pkg += flt(item.net_weight) * flt(item.qty);
|
net_weight_pkg += flt(item.net_weight) * flt(item.qty);
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user