Merge pull request #4613 from nabinhait/fixes
[fix] Item query and exchange rate
diff --git a/erpnext/accounts/doctype/account/account.js b/erpnext/accounts/doctype/account/account.js
index a2eb714..703397e 100644
--- a/erpnext/accounts/doctype/account/account.js
+++ b/erpnext/accounts/doctype/account/account.js
@@ -48,13 +48,13 @@
cur_frm.cscript.add_toolbar_buttons = function(doc) {
cur_frm.add_custom_button(__('Chart of Accounts'),
- function() { frappe.set_route("Accounts Browser", "Account"); }, 'icon-sitemap')
+ function() { frappe.set_route("Accounts Browser", "Account"); }, __("View"))
if (doc.is_group == 1) {
- cur_frm.add_custom_button(__('Convert to non-Group'),
+ cur_frm.add_custom_button(__('Group to Non-Group'),
function() { cur_frm.cscript.convert_to_ledger(); }, 'icon-retweet', 'btn-default');
} else if (cint(doc.is_group) == 0) {
- cur_frm.add_custom_button(__('View Ledger'), function() {
+ cur_frm.add_custom_button(__('Ledger'), function() {
frappe.route_options = {
"account": doc.name,
"from_date": sys_defaults.year_start_date,
@@ -62,9 +62,9 @@
"company": doc.company
};
frappe.set_route("query-report", "General Ledger");
- }, "icon-table");
+ }, __("View"));
- cur_frm.add_custom_button(__('Convert to Group'),
+ cur_frm.add_custom_button(__('Group to Group'),
function() { cur_frm.cscript.convert_to_group(); }, 'icon-retweet', 'btn-default')
}
}
diff --git a/erpnext/accounts/doctype/account/account.py b/erpnext/accounts/doctype/account/account.py
index a8ebbea..1f9c74d 100644
--- a/erpnext/accounts/doctype/account/account.py
+++ b/erpnext/accounts/doctype/account/account.py
@@ -27,6 +27,7 @@
return
self.validate_parent()
self.validate_root_details()
+ self.validate_group_or_ledger()
self.set_root_and_report_type()
self.validate_mandatory()
self.validate_warehouse_account()
@@ -80,6 +81,20 @@
if not self.parent_account and not self.is_group:
frappe.throw(_("Root Account must be a group"))
+
+ def validate_group_or_ledger(self):
+ if self.get("__islocal"):
+ return
+
+ existing_is_group = frappe.db.get_value("Account", self.name, "is_group")
+ if self.is_group != existing_is_group:
+ if self.check_gle_exists():
+ throw(_("Account with existing transaction cannot be converted to ledger"))
+ elif self.is_group:
+ if self.account_type:
+ throw(_("Cannot covert to Group because Account Type is selected."))
+ elif self.check_if_child_exists():
+ throw(_("Account with child nodes cannot be set as ledger"))
def validate_frozen_accounts_modifier(self):
old_value = frappe.db.get_value("Account", self.name, "freeze_account")
diff --git a/erpnext/accounts/doctype/cost_center/cost_center.js b/erpnext/accounts/doctype/cost_center/cost_center.js
index e4db510..f66459b 100644
--- a/erpnext/accounts/doctype/cost_center/cost_center.js
+++ b/erpnext/accounts/doctype/cost_center/cost_center.js
@@ -51,7 +51,7 @@
cur_frm.set_intro(intro_txt);
cur_frm.add_custom_button(__('Chart of Cost Centers'),
- function() { frappe.set_route("Accounts Browser", "Cost Center"); }, 'icon-sitemap')
+ function() { frappe.set_route("Accounts Browser", "Cost Center"); }, __("View"))
}
cur_frm.cscript.parent_cost_center = function(doc, cdt, cdn) {
@@ -62,12 +62,12 @@
cur_frm.cscript.hide_unhide_group_ledger = function(doc) {
if (doc.is_group == 1) {
- cur_frm.add_custom_button(__('Convert to non-Group'),
- function() { cur_frm.cscript.convert_to_ledger(); }, 'icon-retweet',
+ cur_frm.add_custom_button(__('Convert to Non-Group'),
+ function() { cur_frm.cscript.convert_to_ledger(); }, "icon-retweet",
"btn-default")
} else if (doc.is_group == 0) {
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",
"btn-default")
}
}
diff --git a/erpnext/accounts/doctype/fiscal_year/fiscal_year.js b/erpnext/accounts/doctype/fiscal_year/fiscal_year.js
index cca01a4..e7812c3 100644
--- a/erpnext/accounts/doctype/fiscal_year/fiscal_year.js
+++ b/erpnext/accounts/doctype/fiscal_year/fiscal_year.js
@@ -14,7 +14,7 @@
this.frm.toggle_enable('year_end_date', doc.__islocal)
if (!doc.__islocal && (doc.name != sys_defaults.fiscal_year)) {
- this.frm.add_custom_button(__("Set as Default"),
+ this.frm.add_custom_button(__("Default"),
this.frm.cscript.set_as_default, "icon-star");
this.frm.set_intro(__("To set this Fiscal Year as Default, click on 'Set as Default'"));
} else {
diff --git a/erpnext/accounts/doctype/journal_entry/journal_entry.js b/erpnext/accounts/doctype/journal_entry/journal_entry.js
index dc24522..76f6ee5 100644
--- a/erpnext/accounts/doctype/journal_entry/journal_entry.js
+++ b/erpnext/accounts/doctype/journal_entry/journal_entry.js
@@ -11,7 +11,7 @@
frm.cscript.voucher_type(frm.doc);
if(frm.doc.docstatus==1) {
- frm.add_custom_button(__('View Ledger'), function() {
+ frm.add_custom_button(__('Ledger'), function() {
frappe.route_options = {
"voucher_no": frm.doc.name,
"from_date": frm.doc.posting_date,
diff --git a/erpnext/accounts/doctype/payment_request/payment_request.py b/erpnext/accounts/doctype/payment_request/payment_request.py
index 23fd5a8..9e29697 100644
--- a/erpnext/accounts/doctype/payment_request/payment_request.py
+++ b/erpnext/accounts/doctype/payment_request/payment_request.py
@@ -40,7 +40,6 @@
if not frappe.conf.paypal_username:
frappe.throw(_("PayPal Settings missing"))
-
def on_submit(self):
if not self.mute_email:
self.send_payment_request()
@@ -227,11 +226,8 @@
@frappe.whitelist(allow_guest=True)
def generate_payment_request(name):
- payment_url = frappe.get_doc("Payment Request", name).run_method("get_payment_url")
- if payment_url:
- frappe.local.response["type"] = "redirect"
- frappe.local.response["location"] = payment_url
-
+ frappe.get_doc("Payment Request", name).run_method("get_payment_url")
+
@frappe.whitelist(allow_guest=True)
def resend_payment_email(docname):
return frappe.get_doc("Payment Request", docname).send_email()
diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js
index 6eb29fa..4a52541 100644
--- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js
+++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js
@@ -25,13 +25,14 @@
if(!doc.is_return) {
if(doc.docstatus==1) {
if(doc.outstanding_amount != 0) {
- this.frm.add_custom_button(__('Payment'), this.make_bank_entry).addClass("btn-primary");
+ this.frm.add_custom_button(__('Payment'), this.make_bank_entry, __("Make"));
+ cur_frm.page.set_inner_btn_group_as_primary(__("Make"));
}
- cur_frm.add_custom_button(__('Debit Note'), this.make_debit_note);
+ cur_frm.add_custom_button(__('Debit Note'), this.make_debit_note, __("Make"));
}
if(doc.docstatus===0) {
- cur_frm.add_custom_button(__('From Purchase Order'), function() {
+ cur_frm.add_custom_button(__('Purchase Order'), function() {
frappe.model.map_current_doc({
method: "erpnext.buying.doctype.purchase_order.purchase_order.make_purchase_invoice",
source_doctype: "Purchase Order",
@@ -45,7 +46,7 @@
})
});
- cur_frm.add_custom_button(__('From Purchase Receipt'), function() {
+ cur_frm.add_custom_button(__('Purchase Receipt'), function() {
frappe.model.map_current_doc({
method: "erpnext.stock.doctype.purchase_receipt.purchase_receipt.make_purchase_invoice",
source_doctype: "Purchase Receipt",
diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js
index 6b03afa..3c8673c 100644
--- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js
+++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js
@@ -58,7 +58,8 @@
})
cur_frm.add_custom_button(doc.update_stock ? __('Sales Return') : __('Credit Note'),
- this.make_sales_return);
+ this.make_sales_return, __("Make"));
+ cur_frm.page.set_inner_btn_group_as_primary(__("Make"));
if(cint(doc.update_stock)!=1) {
// show Make Delivery Note button only if Sales Invoice is not created from Delivery Note
@@ -69,13 +70,13 @@
});
if(!from_delivery_note && !is_delivered_by_supplier) {
- cur_frm.add_custom_button(__('Delivery'), cur_frm.cscript['Make Delivery Note']).addClass("btn-primary");
+ cur_frm.add_custom_button(__('Delivery'), cur_frm.cscript['Make Delivery Note'], __("Make"));
}
}
if(doc.outstanding_amount!=0 && !cint(doc.is_return)) {
- cur_frm.add_custom_button(__('Payment'), cur_frm.cscript.make_bank_entry).addClass("btn-primary");
- cur_frm.add_custom_button(__('Make Payment Request'), this.make_payment_request);
+ cur_frm.add_custom_button(__('Make Payment Request'), this.make_payment_request, __("Make"));
+ cur_frm.add_custom_button(__('Payment'), cur_frm.cscript.make_bank_entry, __("Make"));
}
}
@@ -118,7 +119,7 @@
company: cur_frm.doc.company
}
})
- });
+ }, __("From"));
},
delivery_note_btn: function() {
@@ -138,7 +139,7 @@
};
}
});
- });
+ }, __("From"));
},
tc_name: function() {
diff --git a/erpnext/buying/doctype/purchase_common/purchase_common.js b/erpnext/buying/doctype/purchase_common/purchase_common.js
index 0860bca..85ce5b4 100644
--- a/erpnext/buying/doctype/purchase_common/purchase_common.js
+++ b/erpnext/buying/doctype/purchase_common/purchase_common.js
@@ -167,9 +167,9 @@
set_from_product_bundle: function() {
var me = this;
- this.frm.add_custom_button(__("From Product Bundle"), function() {
+ this.frm.add_custom_button(__("Product Bundle"), function() {
erpnext.buying.get_items_from_product_bundle(me.frm);
- });
+ }, __("From"));
}
});
diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.js b/erpnext/buying/doctype/purchase_order/purchase_order.js
index ba215c1..db7a544 100644
--- a/erpnext/buying/doctype/purchase_order/purchase_order.js
+++ b/erpnext/buying/doctype/purchase_order/purchase_order.js
@@ -37,49 +37,54 @@
}
cur_frm.set_df_property("drop_ship", "hidden", !is_drop_ship);
-
+
if(doc.docstatus == 1 && !in_list(["Stopped", "Closed", "Delivered"], doc.status)) {
if (this.frm.has_perm("submit")) {
if(flt(doc.per_billed, 2) < 100 || doc.per_received < 100) {
- cur_frm.add_custom_button(__('Stop'), this.stop_purchase_order);
+ cur_frm.add_custom_button(__('Stop'), this.stop_purchase_order, __("Status"));
}
- cur_frm.add_custom_button(__('Close'), this.close_purchase_order);
+ cur_frm.add_custom_button(__('Close'), this.close_purchase_order, __("Status"));
}
- if(flt(doc.per_billed)==0) {
- cur_frm.add_custom_button(__('Payment'), cur_frm.cscript.make_bank_entry);
- }
-
+
if(is_drop_ship && doc.status!="Delivered"){
- cur_frm.add_custom_button(__('Mark as Delivered'),
- this.delivered_by_supplier).addClass("btn-primary");
+ cur_frm.add_custom_button(__('Delivered'),
+ this.delivered_by_supplier, __("Status"));
+
+ cur_frm.page.set_inner_btn_group_as_primary(__("Status"));
}
} else if(doc.docstatus===0) {
cur_frm.add_custom_button(__('Get Last Purchase Rate'), this.get_last_purchase_rate);
cur_frm.cscript.add_from_mappers();
}
-
+
+ if(doc.docstatus == 1 && in_list(["Stopped", "Closed", "Delivered"], doc.status)) {
+ if (this.frm.has_perm("submit")) {
+ cur_frm.add_custom_button(__('Re-open'), this.unstop_purchase_order, __("Status"));
+ }
+ }
+
if(doc.docstatus == 1 && !in_list(["Stopped", "Closed"], doc.status)) {
if(flt(doc.per_received, 2) < 100 && allow_receipt) {
- cur_frm.add_custom_button(__('Receive'), this.make_purchase_receipt).addClass("btn-primary");
+ cur_frm.add_custom_button(__('Receive'), this.make_purchase_receipt, __("Make"));
if(doc.is_subcontracted==="Yes") {
- cur_frm.add_custom_button(__('Transfer Material to Supplier'),
- function() { me.make_stock_entry(); });
+ cur_frm.add_custom_button(__('Material to Supplier'),
+ function() { me.make_stock_entry(); }, __("Transfer"));
}
}
if(flt(doc.per_billed, 2) < 100)
cur_frm.add_custom_button(__('Invoice'),
- this.make_purchase_invoice).addClass("btn-primary");
- }
-
- if(doc.docstatus == 1 && in_list(["Stopped", "Closed", "Delivered"], doc.status)) {
- if (this.frm.has_perm("submit")) {
- cur_frm.add_custom_button(__('Re-open'), this.unstop_purchase_order).addClass("btn-primary");
+ this.make_purchase_invoice, __("Make"));
+
+ if(flt(doc.per_billed)==0 && doc.status != "Delivered") {
+ cur_frm.add_custom_button(__('Payment'), cur_frm.cscript.make_bank_entry, __("Make"));
}
+ cur_frm.page.set_inner_btn_group_as_primary(__("Make"));
+
}
},
@@ -126,7 +131,7 @@
},
add_from_mappers: function() {
- cur_frm.add_custom_button(__('From Material Request'),
+ cur_frm.add_custom_button(__('Material Request'),
function() {
frappe.model.map_current_doc({
method: "erpnext.stock.doctype.material_request.material_request.make_purchase_order",
@@ -139,10 +144,9 @@
company: cur_frm.doc.company
}
})
- }
- );
+ }, __("From"));
- cur_frm.add_custom_button(__('From Supplier Quotation'),
+ cur_frm.add_custom_button(__('Supplier Quotation'),
function() {
frappe.model.map_current_doc({
method: "erpnext.buying.doctype.supplier_quotation.supplier_quotation.make_purchase_order",
@@ -153,10 +157,9 @@
company: cur_frm.doc.company
}
})
- }
- );
+ }, __("From"));
- cur_frm.add_custom_button(__('For Supplier'),
+ cur_frm.add_custom_button(__('Supplier'),
function() {
frappe.model.map_current_doc({
method: "erpnext.stock.doctype.material_request.material_request.make_purchase_order_based_on_supplier",
@@ -165,8 +168,7 @@
docstatus: ["!=", 2],
}
})
- }
- );
+ }, __("For"));
},
tc_name: function() {
diff --git a/erpnext/buying/doctype/supplier_quotation/supplier_quotation.js b/erpnext/buying/doctype/supplier_quotation/supplier_quotation.js
index 67c8795..8922048 100644
--- a/erpnext/buying/doctype/supplier_quotation/supplier_quotation.js
+++ b/erpnext/buying/doctype/supplier_quotation/supplier_quotation.js
@@ -9,11 +9,12 @@
this._super();
if (this.frm.doc.docstatus === 1) {
- cur_frm.add_custom_button(__("Make Purchase Order"), this.make_purchase_order,
- frappe.boot.doctype_icons["Journal Entry"]);
+ cur_frm.add_custom_button(__("Purchase Order"), this.make_purchase_order,
+ __("Make"));
+ cur_frm.page.set_inner_btn_group_as_primary(__("Make"));
}
else if (this.frm.doc.docstatus===0) {
- cur_frm.add_custom_button(__('From Material Request'),
+ cur_frm.add_custom_button(__('Material Request'),
function() {
frappe.model.map_current_doc({
method: "erpnext.stock.doctype.material_request.material_request.make_supplier_quotation",
@@ -26,7 +27,7 @@
company: cur_frm.doc.company
}
})
- }, "icon-download", "btn-default");
+ }, __("From"));
}
},
diff --git a/erpnext/config/desktop.py b/erpnext/config/desktop.py
index a8ce6a7..863ad6d 100644
--- a/erpnext/config/desktop.py
+++ b/erpnext/config/desktop.py
@@ -2,32 +2,50 @@
from frappe import _
def get_data():
- return {
- "Accounts": {
+ return [
+ {
+ "module_name": "Accounts",
"color": "#3498db",
"icon": "octicon octicon-repo",
"type": "module"
},
- "Buying": {
+ {
+ "module_name": "CRM",
+ "color": "#EF4DB6",
+ "icon": "octicon octicon-broadcast",
+ "type": "module"
+ },
+ {
+ "module_name": "Selling",
+ "color": "#1abc9c",
+ "icon": "icon-tag",
+ "icon": "octicon octicon-tag",
+ "type": "module"
+ },
+ {
+ "module_name": "Buying",
"color": "#c0392b",
"icon": "icon-shopping-cart",
"icon": "octicon octicon-briefcase",
"type": "module"
},
- "HR": {
+ {
+ "module_name": "HR",
"color": "#2ecc71",
"icon": "icon-group",
"icon": "octicon octicon-organization",
"label": _("Human Resources"),
"type": "module"
},
- "Manufacturing": {
+ {
+ "module_name": "Manufacturing",
"color": "#7f8c8d",
"icon": "icon-cogs",
"icon": "octicon octicon-tools",
"type": "module"
},
- "POS": {
+ {
+ "module_name": "POS",
"color": "#589494",
"icon": "icon-th",
"icon": "octicon octicon-credit-card",
@@ -35,41 +53,33 @@
"link": "pos",
"label": _("POS")
},
- "Projects": {
+ {
+ "module_name": "Projects",
"color": "#8e44ad",
"icon": "icon-puzzle-piece",
"icon": "octicon octicon-rocket",
"type": "module"
},
- "Selling": {
- "color": "#1abc9c",
- "icon": "icon-tag",
- "icon": "octicon octicon-tag",
- "type": "module"
- },
- "CRM": {
- "color": "#EF4DB6",
- "icon": "octicon octicon-broadcast",
- "type": "module"
- },
- "Stock": {
+ {
+ "module_name": "Stock",
"color": "#f39c12",
"icon": "icon-truck",
"icon": "octicon octicon-package",
"type": "module"
},
- "Support": {
+ {
+ "module_name": "Support",
"color": "#2c3e50",
"icon": "icon-phone",
"icon": "octicon octicon-issue-opened",
"type": "module"
},
- "Learn": {
+ {
+ "module_name": "Learn",
"color": "#FF888B",
- "force_show": True,
"icon": "octicon octicon-device-camera-video",
"type": "module",
"is_help": True,
"label": _("Learn")
}
- }
+ ]
diff --git a/erpnext/controllers/js/contact_address_common.js b/erpnext/controllers/js/contact_address_common.js
index df3323f..c51ff46 100644
--- a/erpnext/controllers/js/contact_address_common.js
+++ b/erpnext/controllers/js/contact_address_common.js
@@ -33,7 +33,7 @@
cur_frm.set_value("address_title", cur_frm.doc.customer_name);
}
}
- if(["Supplier", "Supplier Quotation", "Purchase Order", "Purchase Invoice", "Purchase Receipt"]
+ else if(["Supplier", "Supplier Quotation", "Purchase Order", "Purchase Invoice", "Purchase Receipt"]
.indexOf(doctype)!==-1) {
var refdoc = frappe.get_doc(doctype, docname);
cur_frm.set_value("supplier", refdoc.supplier || refdoc.name);
@@ -41,7 +41,7 @@
if(cur_frm.doc.doctype==="Address")
cur_frm.set_value("address_title", cur_frm.doc.supplier_name);
}
- if(["Lead", "Opportunity", "Quotation"]
+ else if(["Lead", "Opportunity", "Quotation"]
.indexOf(doctype)!==-1) {
var refdoc = frappe.get_doc(doctype, docname);
@@ -53,6 +53,9 @@
cur_frm.set_value("address_title", cur_frm.doc.lead_name);
}
}
+ else if(doctype == "Sales Partner") {
+ cur_frm.set_value("sales_partner", docname);
+ }
}
}
}
diff --git a/erpnext/crm/doctype/lead/lead.js b/erpnext/crm/doctype/lead/lead.js
index 1dc8eb2..25d7588 100644
--- a/erpnext/crm/doctype/lead/lead.js
+++ b/erpnext/crm/doctype/lead/lead.js
@@ -27,12 +27,10 @@
erpnext.toggle_naming_series();
if(!this.frm.doc.__islocal && this.frm.doc.__onload && !this.frm.doc.__onload.is_customer) {
- this.frm.add_custom_button(__("Create Customer"), this.create_customer,
- frappe.boot.doctype_icons["Customer"], "btn-default");
- this.frm.add_custom_button(__("Create Opportunity"), this.create_opportunity,
- frappe.boot.doctype_icons["Opportunity"], "btn-default");
- this.frm.add_custom_button(__("Make Quotation"), this.make_quotation,
- frappe.boot.doctype_icons["Quotation"], "btn-default");
+ this.frm.add_custom_button(__("Customer"), this.create_customer, __("Make"));
+ this.frm.add_custom_button(__("Opportunity"), this.create_opportunity, __("Make"));
+ this.frm.add_custom_button(__("Make Quotation"), this.make_quotation, __("Make"));
+ cur_frm.page.set_inner_btn_group_as_primary(__("Make"));
}
if(!this.frm.doc.__islocal) {
diff --git a/erpnext/crm/doctype/newsletter_list/newsletter_list.js b/erpnext/crm/doctype/newsletter_list/newsletter_list.js
index ed0ac5e..d6cda45 100644
--- a/erpnext/crm/doctype/newsletter_list/newsletter_list.js
+++ b/erpnext/crm/doctype/newsletter_list/newsletter_list.js
@@ -3,7 +3,7 @@
frm.add_custom_button(__("View Subscribers"), function() {
frappe.route_options = {"newsletter_list": frm.doc.name};
frappe.set_route("Report", "Newsletter List Subscriber");
- });
+ }, __("View"));
frm.add_custom_button(__("Import Subscribers"), function() {
frappe.prompt({fieldtype:"Select", options: frm.doc.__onload.import_types,
@@ -19,7 +19,7 @@
}
})
}, __("Import Subscribers"), __("Import"));
- });
+ }, __("Action"));
frm.add_custom_button(__("Add Subscribers"), function() {
frappe.prompt({fieldtype:"Text",
@@ -35,12 +35,12 @@
}
})
}, __("Add Subscribers"), __("Add"));
- });
+ }, __("Action"));
frm.add_custom_button(__("New Newsletter"), function() {
frappe.route_options = {"newsletter_list": frm.doc.name};
new_doc("Newsletter");
- });
+ }, __("Action"));
}
});
diff --git a/erpnext/crm/doctype/opportunity/opportunity.js b/erpnext/crm/doctype/opportunity/opportunity.js
index 43e2dd5..b6abdaf 100644
--- a/erpnext/crm/doctype/opportunity/opportunity.js
+++ b/erpnext/crm/doctype/opportunity/opportunity.js
@@ -78,29 +78,30 @@
cur_frm.cscript.refresh = function(doc, cdt, cdn) {
erpnext.toggle_naming_series();
- if(doc.status!=="Lost") {
- cur_frm.add_custom_button(__('Create Quotation'),
- cur_frm.cscript.create_quotation, frappe.boot.doctype_icons["Quotation"],
- "btn-default");
- if(doc.status!=="Quotation")
- cur_frm.add_custom_button(__('Opportunity Lost'),
- cur_frm.cscript['Declare Opportunity Lost'], "icon-remove", "btn-default");
- }
-
var frm = cur_frm;
if(frm.perm[0].write && doc.docstatus==0) {
if(frm.doc.status==="Open") {
frm.add_custom_button(__("Close"), function() {
frm.set_value("status", "Closed");
frm.save();
- });
+ }, __("Status"));
} else {
frm.add_custom_button(__("Reopen"), function() {
frm.set_value("status", "Open");
frm.save();
- });
+ }, __("Status"));
}
}
+
+ if(doc.status!=="Lost") {
+ if(doc.status!=="Quotation") {
+ cur_frm.add_custom_button(__('Opportunity Lost'),
+ cur_frm.cscript['Declare Opportunity Lost'], __("Mark"));
+ }
+
+ cur_frm.add_custom_button(__('Quotation'),cur_frm.cscript.create_quotation, __("Make"));
+ cur_frm.page.set_inner_btn_group_as_primary(__("Make"));
+ }
}
diff --git a/erpnext/hr/doctype/employee/employee.js b/erpnext/hr/doctype/employee/employee.js
index 39af40e..8a20a09 100644
--- a/erpnext/hr/doctype/employee/employee.js
+++ b/erpnext/hr/doctype/employee/employee.js
@@ -24,8 +24,9 @@
erpnext.toggle_naming_series();
if(!this.frm.doc.__islocal && this.frm.doc.__onload &&
!this.frm.doc.__onload.salary_structure_exists) {
- cur_frm.add_custom_button(__('Make Salary Structure'), function() {
- me.make_salary_structure(this); }, frappe.boot.doctype_icons["Salary Structure"]);
+ cur_frm.add_custom_button(__('Salary Structure'), function() {
+ me.make_salary_structure(this); }, __("Make"));
+ cur_frm.page.set_inner_btn_group_as_primary(__("Make"));
}
},
diff --git a/erpnext/hr/doctype/expense_claim/expense_claim.js b/erpnext/hr/doctype/expense_claim/expense_claim.js
index 780cd70..85cd38d 100644
--- a/erpnext/hr/doctype/expense_claim/expense_claim.js
+++ b/erpnext/hr/doctype/expense_claim/expense_claim.js
@@ -97,8 +97,9 @@
if(doc.docstatus==1 && frappe.model.can_create("Journal Entry") &&
cint(doc.total_amount_reimbursed) < cint(doc.total_sanctioned_amount))
- cur_frm.add_custom_button(__("Make Bank Entry"),
- cur_frm.cscript.make_bank_entry, frappe.boot.doctype_icons["Journal Entry"]);
+ cur_frm.add_custom_button(__("Bank Entry"),
+ cur_frm.cscript.make_bank_entry, __("Make"));
+ cur_frm.page.set_inner_btn_group_as_primary(__("Make"));
}
}
diff --git a/erpnext/hr/doctype/job_applicant/job_applicant.js b/erpnext/hr/doctype/job_applicant/job_applicant.js
index 1ca750a..eac1a9a 100644
--- a/erpnext/hr/doctype/job_applicant/job_applicant.js
+++ b/erpnext/hr/doctype/job_applicant/job_applicant.js
@@ -10,18 +10,19 @@
refresh: function(frm) {
if (!frm.doc.__islocal) {
if (frm.doc.__onload && frm.doc.__onload.offer_letter) {
- frm.add_custom_button(__("View Offer Letter"), function() {
+ frm.add_custom_button(__("Offer Letter"), function() {
frappe.set_route("Form", "Offer Letter", frm.doc.__onload.offer_letter);
- });
+ }, __("View"));
} else {
- frm.add_custom_button(__("Make Offer Letter"), function() {
+ frm.add_custom_button(__("Offer Letter"), function() {
frappe.route_options = {
"job_applicant": frm.doc.name,
"applicant_name": frm.doc.applicant_name,
"designation": frm.doc.job_opening,
};
new_doc("Offer Letter");
- });
+ }, __("Make"));
+ cur_frm.page.set_inner_btn_group_as_primary(__("Make"));
}
}
diff --git a/erpnext/hr/doctype/salary_structure/salary_structure.js b/erpnext/hr/doctype/salary_structure/salary_structure.js
index 995c744..65aac1b 100644
--- a/erpnext/hr/doctype/salary_structure/salary_structure.js
+++ b/erpnext/hr/doctype/salary_structure/salary_structure.js
@@ -12,8 +12,9 @@
cur_frm.cscript.refresh = function(doc, dt, dn){
if((!doc.__islocal) && (doc.is_active == 'Yes')){
- cur_frm.add_custom_button(__('Make Salary Slip'),
- cur_frm.cscript['Make Salary Slip'], frappe.boot.doctype_icons["Salary Slip"]);
+ cur_frm.add_custom_button(__('Salary Slip'),
+ cur_frm.cscript['Make Salary Slip'], __("Make"));
+ cur_frm.page.set_inner_btn_group_as_primary(__("Make"));
}
}
diff --git a/erpnext/manufacturing/doctype/production_order/production_order.js b/erpnext/manufacturing/doctype/production_order/production_order.js
index f72163e..c4280da 100644
--- a/erpnext/manufacturing/doctype/production_order/production_order.js
+++ b/erpnext/manufacturing/doctype/production_order/production_order.js
@@ -61,30 +61,17 @@
set_custom_buttons: function(frm) {
var doc = frm.doc;
if (doc.docstatus === 1) {
-
- if (flt(doc.material_transferred_for_manufacturing) < flt(doc.qty)) {
- frm.add_custom_button(__('Transfer Materials for Manufacture'),
- cur_frm.cscript['Transfer Raw Materials'], frappe.boot.doctype_icons["Stock Entry"]);
- }
-
- if (flt(doc.produced_qty) < flt(doc.material_transferred_for_manufacturing)) {
- frm.add_custom_button(__('Update Finished Goods'),
- cur_frm.cscript['Update Finished Goods'], frappe.boot.doctype_icons["Stock Entry"]);
- }
-
frm.add_custom_button(__("Show Stock Entries"), function() {
frappe.route_options = {
production_order: frm.doc.name
}
frappe.set_route("List", "Stock Entry");
- });
+ }, __("View"));
if (doc.status != 'Stopped' && doc.status != 'Completed') {
- frm.add_custom_button(__('Stop'), cur_frm.cscript['Stop Production Order'],
- "icon-exclamation", "btn-default");
+ frm.add_custom_button(__('Stop'), cur_frm.cscript['Stop Production Order'], __("Status"));
} else if (doc.status == 'Stopped') {
- frm.add_custom_button(__('Re-open'), cur_frm.cscript['Unstop Production Order'],
- "icon-check", "btn-default");
+ frm.add_custom_button(__('Re-open'), cur_frm.cscript['Unstop Production Order'], __("Status"));
}
// opertions
@@ -92,7 +79,17 @@
frm.add_custom_button(__('Show Time Logs'), function() {
frappe.route_options = {"production_order": frm.doc.name};
frappe.set_route("List", "Time Log");
- });
+ }, __("View"));
+ }
+
+ if (flt(doc.material_transferred_for_manufacturing) < flt(doc.qty)) {
+ frm.add_custom_button(__('Transfer Materials for Manufacture'),
+ cur_frm.cscript['Transfer Raw Materials'], __("Stock Entry"));
+ }
+
+ if (flt(doc.produced_qty) < flt(doc.material_transferred_for_manufacturing)) {
+ frm.add_custom_button(__('Update Finished Goods'),
+ cur_frm.cscript['Update Finished Goods'], __("Stock Entry"));
}
}
diff --git a/erpnext/projects/doctype/project/project.js b/erpnext/projects/doctype/project/project.js
index 8c14347..b33386b 100644
--- a/erpnext/projects/doctype/project/project.js
+++ b/erpnext/projects/doctype/project/project.js
@@ -30,24 +30,24 @@
cur_frm.add_custom_button(__("Gantt Chart"), function() {
frappe.route_options = {"project": doc.name, "start": doc.expected_start_date, "end": doc.expected_end_date};
frappe.set_route("Gantt", "Task");
- }, "icon-tasks", true);
+ }, __("View"), true);
cur_frm.add_custom_button(__("Tasks"), function() {
frappe.route_options = {"project": doc.name}
frappe.set_route("List", "Task");
- }, "icon-list", true);
+ }, __("View"), true);
}
if(frappe.model.can_read("Time Log")) {
cur_frm.add_custom_button(__("Time Logs"), function() {
frappe.route_options = {"project": doc.name}
frappe.set_route("List", "Time Log");
- }, "icon-list", true);
+ }, __("View"), true);
}
if(frappe.model.can_read("Expense Claim")) {
cur_frm.add_custom_button(__("Expense Claims"), function() {
frappe.route_options = {"project": doc.name}
frappe.set_route("List", "Expense Claim");
- }, "icon-list", true);
+ }, __("View"), true);
}
}
}
diff --git a/erpnext/projects/doctype/task/task.js b/erpnext/projects/doctype/task/task.js
index 18f5ca0..a0bbe26 100644
--- a/erpnext/projects/doctype/task/task.js
+++ b/erpnext/projects/doctype/task/task.js
@@ -20,13 +20,13 @@
frm.add_custom_button(__("Time Logs"), function() {
frappe.route_options = {"project": doc.project, "task": doc.name}
frappe.set_route("List", "Time Log");
- }, "icon-list", true);
+ }, __("View"), true);
}
if(frappe.model.can_read("Expense Claim")) {
frm.add_custom_button(__("Expense Claims"), function() {
frappe.route_options = {"project": doc.project, "task": doc.name}
frappe.set_route("List", "Expense Claim");
- }, "icon-list", true);
+ }, __("View"), true);
}
if(frm.perm[0].write) {
@@ -34,12 +34,12 @@
frm.add_custom_button(__("Close"), function() {
frm.set_value("status", "Closed");
frm.save();
- });
+ }, __("Status"));
} else {
frm.add_custom_button(__("Reopen"), function() {
frm.set_value("status", "Open");
frm.save();
- });
+ }, __("Status"));
}
}
}
diff --git a/erpnext/projects/doctype/time_log/time_log.js b/erpnext/projects/doctype/time_log/time_log.js
index 3a01ca5..7648a53 100644
--- a/erpnext/projects/doctype/time_log/time_log.js
+++ b/erpnext/projects/doctype/time_log/time_log.js
@@ -53,12 +53,12 @@
var calculate_cost = function(frm) {
frm.set_value("costing_amount", frm.doc.costing_rate * frm.doc.hours);
if (frm.doc.billable==1){
- frm.set_value("billing_amount", frm.doc.billing_rate * frm.doc.hours);
+ frm.set_value("billing_amount", (frm.doc.billing_rate * frm.doc.hours) + frm.doc.additional_cost);
}
}
var get_activity_cost = function(frm) {
- if (frm.doc.employee && frm.doc.activity_type){
+ if (frm.doc.activity_type){
return frappe.call({
method: "erpnext.projects.doctype.time_log.time_log.get_activity_cost",
args: {
@@ -80,6 +80,10 @@
calculate_cost(frm);
});
+frappe.ui.form.on("Time Log", "additional_cost", function(frm) {
+ calculate_cost(frm);
+});
+
frappe.ui.form.on("Time Log", "activity_type", function(frm) {
get_activity_cost(frm);
});
@@ -94,6 +98,7 @@
}
else {
frm.set_value("billing_amount", 0);
+ frm.set_value("additional_cost", 0);
}
});
diff --git a/erpnext/projects/doctype/time_log/time_log.json b/erpnext/projects/doctype/time_log/time_log.json
index 4490f97..88eae1e 100644
--- a/erpnext/projects/doctype/time_log/time_log.json
+++ b/erpnext/projects/doctype/time_log/time_log.json
@@ -1,934 +1,950 @@
{
- "allow_copy": 0,
- "allow_import": 1,
- "allow_rename": 0,
- "autoname": "naming_series:",
- "creation": "2013-04-03 16:38:41",
- "custom": 0,
- "description": "Log of Activities performed by users against Tasks that can be used for tracking time, billing.",
- "docstatus": 0,
- "doctype": "DocType",
- "document_type": "Setup",
+ "allow_copy": 0,
+ "allow_import": 1,
+ "allow_rename": 0,
+ "autoname": "naming_series:",
+ "creation": "2013-04-03 16:38:41",
+ "custom": 0,
+ "description": "Log of Activities performed by users against Tasks that can be used for tracking time, billing.",
+ "docstatus": 0,
+ "doctype": "DocType",
+ "document_type": "Setup",
"fields": [
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "naming_series",
- "fieldtype": "Select",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Series",
- "length": 0,
- "no_copy": 0,
- "options": "TL-",
- "permlevel": 0,
- "print_hide": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 1,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 1,
+ "collapsible": 0,
+ "depends_on": "eval:!doc.for_manufacturing",
+ "fieldname": "activity_type",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Activity Type",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Activity Type",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "column_break_2",
- "fieldtype": "Column Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "naming_series",
+ "fieldtype": "Select",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Series",
+ "length": 0,
+ "no_copy": 0,
+ "options": "TL-",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 1,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "status",
- "fieldtype": "Select",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Status",
- "length": 0,
- "no_copy": 0,
- "options": "Draft\nSubmitted\nBatched for Billing\nBilled\nCancelled",
- "permlevel": 0,
- "print_hide": 0,
- "read_only": 1,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "depends_on": "",
+ "fieldname": "project",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 1,
+ "label": "Project",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Project",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "section_break_4",
- "fieldtype": "Section Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "depends_on": "",
+ "fieldname": "task",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Task",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Task",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "from_time",
- "fieldtype": "Datetime",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "From Time",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 1,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "status",
+ "fieldtype": "Select",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Status",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Draft\nSubmitted\nBatched for Billing\nBilled\nCancelled",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "default": "0",
- "fieldname": "hours",
- "fieldtype": "Float",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 1,
- "label": "Hours",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "column_break_2",
+ "fieldtype": "Column Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "to_time",
- "fieldtype": "Datetime",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "To Time",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 1,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "from_time",
+ "fieldtype": "Datetime",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "From Time",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 1,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "column_break_8",
- "fieldtype": "Column Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "default": "0",
+ "fieldname": "hours",
+ "fieldtype": "Float",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 1,
+ "label": "Hours",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "depends_on": "eval:!doc.for_manufacturing",
- "fieldname": "activity_type",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Activity Type",
- "length": 0,
- "no_copy": 0,
- "options": "Activity Type",
- "permlevel": 0,
- "print_hide": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "to_time",
+ "fieldtype": "Datetime",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "To Time",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 1,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "depends_on": "",
- "fieldname": "project",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 1,
- "label": "Project",
- "length": 0,
- "no_copy": 0,
- "options": "Project",
- "permlevel": 0,
- "print_hide": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "billable",
+ "fieldtype": "Check",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Billable",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "depends_on": "",
- "fieldname": "task",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Task",
- "length": 0,
- "no_copy": 0,
- "options": "Task",
- "permlevel": 0,
- "print_hide": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "section_break_7",
+ "fieldtype": "Section Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "section_break_12",
- "fieldtype": "Section Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "note",
+ "fieldtype": "Text Editor",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Note",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "user",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "User",
- "length": 0,
- "no_copy": 0,
- "options": "User",
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "section_break_12",
+ "fieldtype": "Section Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "employee",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Employee",
- "length": 0,
- "no_copy": 0,
- "options": "Employee",
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "user",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "User",
+ "length": 0,
+ "no_copy": 0,
+ "options": "User",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "column_break_3",
- "fieldtype": "Column Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "employee",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Employee",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Employee",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "for_manufacturing",
- "fieldtype": "Check",
- "hidden": 1,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "For Manufacturing",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "read_only": 1,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "column_break_3",
+ "fieldtype": "Column Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "billable",
- "fieldtype": "Check",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Billable",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "for_manufacturing",
+ "fieldtype": "Check",
+ "hidden": 1,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "For Manufacturing",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "depends_on": "eval:doc.for_manufacturing",
- "fieldname": "section_break_11",
- "fieldtype": "Section Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "depends_on": "eval:doc.for_manufacturing",
+ "fieldname": "section_break_11",
+ "fieldtype": "Section Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "depends_on": "",
- "fieldname": "production_order",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Production Order",
- "length": 0,
- "no_copy": 0,
- "options": "Production Order",
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "read_only": 1,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "depends_on": "",
+ "fieldname": "production_order",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Production Order",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Production Order",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "depends_on": "",
- "fieldname": "operation",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Operation",
- "length": 0,
- "no_copy": 0,
- "options": "Operation",
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "read_only": 1,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "depends_on": "",
+ "fieldname": "operation",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Operation",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Operation",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "depends_on": "",
- "fieldname": "operation_id",
- "fieldtype": "Data",
- "hidden": 1,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Operation ID",
- "length": 0,
- "no_copy": 0,
- "options": "",
- "permlevel": 0,
- "precision": "",
- "print_hide": 1,
- "read_only": 1,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "depends_on": "",
+ "fieldname": "operation_id",
+ "fieldtype": "Data",
+ "hidden": 1,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Operation ID",
+ "length": 0,
+ "no_copy": 0,
+ "options": "",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 1,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "column_break_14",
- "fieldtype": "Column Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "column_break_14",
+ "fieldtype": "Column Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "depends_on": "",
- "fieldname": "workstation",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Workstation",
- "length": 0,
- "no_copy": 0,
- "options": "Workstation",
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "read_only": 1,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "depends_on": "",
+ "fieldname": "workstation",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Workstation",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Workstation",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "depends_on": "",
- "description": "Operation completed for how many finished goods?",
- "fieldname": "completed_qty",
- "fieldtype": "Float",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Completed Qty",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "depends_on": "",
+ "description": "Operation completed for how many finished goods?",
+ "fieldname": "completed_qty",
+ "fieldtype": "Float",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Completed Qty",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "section_break_7",
- "fieldtype": "Section Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "depends_on": "",
+ "fieldname": "section_break_24",
+ "fieldtype": "Section Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "note",
- "fieldtype": "Text Editor",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Note",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "default": "0",
+ "description": "",
+ "fieldname": "costing_rate",
+ "fieldtype": "Currency",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Costing Rate based on Activity Type (per hour)",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "depends_on": "",
- "fieldname": "section_break_24",
- "fieldtype": "Section Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "default": "0",
+ "fieldname": "costing_amount",
+ "fieldtype": "Currency",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Costing Amount",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "default": "0",
- "description": "",
- "fieldname": "costing_rate",
- "fieldtype": "Currency",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Costing Rate based on Activity Type (per hour)",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "read_only": 1,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "column_break_25",
+ "fieldtype": "Column Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "default": "0",
- "fieldname": "costing_amount",
- "fieldtype": "Currency",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Costing Amount",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "read_only": 1,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "default": "0",
+ "description": "",
+ "fieldname": "billing_rate",
+ "fieldtype": "Currency",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Billing Rate based on Activity Type (per hour)",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "column_break_25",
- "fieldtype": "Column Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "depends_on": "eval:doc.billable",
+ "fieldname": "additional_cost",
+ "fieldtype": "Currency",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Additional Cost",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "default": "0",
- "description": "",
- "fieldname": "billing_rate",
- "fieldtype": "Currency",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Billing Rate based on Activity Type (per hour)",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "read_only": 1,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "default": "0",
+ "description": "Will be updated only if Time Log is 'Billable'",
+ "fieldname": "billing_amount",
+ "fieldtype": "Currency",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Billing Amount",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "default": "0",
- "description": "Will be updated only if Time Log is 'Billable'",
- "fieldname": "billing_amount",
- "fieldtype": "Currency",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Billing Amount",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "read_only": 1,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "section_break_29",
+ "fieldtype": "Section Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "section_break_29",
- "fieldtype": "Section Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "description": "Will be updated when batched.",
+ "fieldname": "time_log_batch",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Time Log Batch",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Time Log Batch",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "description": "Will be updated when batched.",
- "fieldname": "time_log_batch",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Time Log Batch",
- "length": 0,
- "no_copy": 0,
- "options": "Time Log Batch",
- "permlevel": 0,
- "print_hide": 0,
- "read_only": 1,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "description": "Will be updated when billed.",
+ "fieldname": "sales_invoice",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Sales Invoice",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Sales Invoice",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "description": "Will be updated when billed.",
- "fieldname": "sales_invoice",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Sales Invoice",
- "length": 0,
- "no_copy": 0,
- "options": "Sales Invoice",
- "permlevel": 0,
- "print_hide": 0,
- "read_only": 1,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "amended_from",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 1,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Amended From",
+ "length": 0,
+ "no_copy": 1,
+ "options": "Time Log",
+ "permlevel": 1,
+ "print_hide": 1,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "amended_from",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 1,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Amended From",
- "length": 0,
- "no_copy": 1,
- "options": "Time Log",
- "permlevel": 1,
- "print_hide": 1,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
- {
- "allow_on_submit": 1,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "title",
- "fieldtype": "Data",
- "hidden": 1,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Title",
- "length": 0,
- "no_copy": 1,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 1,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "title",
+ "fieldtype": "Data",
+ "hidden": 1,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Title",
+ "length": 0,
+ "no_copy": 1,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
}
- ],
- "hide_heading": 0,
- "hide_toolbar": 0,
- "icon": "icon-time",
- "idx": 1,
- "in_create": 0,
- "in_dialog": 0,
- "is_submittable": 1,
- "issingle": 0,
- "istable": 0,
- "max_attachments": 0,
- "modified": "2015-11-16 06:29:59.410559",
- "modified_by": "Administrator",
- "module": "Projects",
- "name": "Time Log",
- "owner": "Administrator",
+ ],
+ "hide_heading": 0,
+ "hide_toolbar": 0,
+ "icon": "icon-time",
+ "idx": 1,
+ "in_create": 0,
+ "in_dialog": 0,
+ "is_submittable": 1,
+ "issingle": 0,
+ "istable": 0,
+ "max_attachments": 0,
+ "modified": "2016-01-14 04:40:47.439032",
+ "modified_by": "Administrator",
+ "module": "Projects",
+ "name": "Time Log",
+ "owner": "Administrator",
"permissions": [
{
- "amend": 1,
- "apply_user_permissions": 0,
- "cancel": 1,
- "create": 1,
- "delete": 1,
- "email": 1,
- "export": 0,
- "if_owner": 0,
- "import": 0,
- "permlevel": 0,
- "print": 1,
- "read": 1,
- "report": 1,
- "role": "Projects User",
- "set_user_permissions": 0,
- "share": 1,
- "submit": 1,
+ "amend": 1,
+ "apply_user_permissions": 0,
+ "cancel": 1,
+ "create": 1,
+ "delete": 1,
+ "email": 1,
+ "export": 0,
+ "if_owner": 0,
+ "import": 0,
+ "permlevel": 0,
+ "print": 1,
+ "read": 1,
+ "report": 1,
+ "role": "Projects User",
+ "set_user_permissions": 0,
+ "share": 1,
+ "submit": 1,
"write": 1
- },
+ },
{
- "amend": 1,
- "apply_user_permissions": 0,
- "cancel": 1,
- "create": 0,
- "delete": 1,
- "email": 1,
- "export": 0,
- "if_owner": 0,
- "import": 0,
- "permlevel": 0,
- "print": 1,
- "read": 1,
- "report": 1,
- "role": "Projects Manager",
- "set_user_permissions": 0,
- "share": 1,
- "submit": 1,
+ "amend": 1,
+ "apply_user_permissions": 0,
+ "cancel": 1,
+ "create": 0,
+ "delete": 1,
+ "email": 1,
+ "export": 0,
+ "if_owner": 0,
+ "import": 0,
+ "permlevel": 0,
+ "print": 1,
+ "read": 1,
+ "report": 1,
+ "role": "Projects Manager",
+ "set_user_permissions": 0,
+ "share": 1,
+ "submit": 1,
"write": 1
}
- ],
- "read_only": 0,
- "read_only_onload": 0,
+ ],
+ "read_only": 0,
+ "read_only_onload": 0,
"title_field": "title"
-}
\ No newline at end of file
+}
diff --git a/erpnext/projects/doctype/time_log/time_log.py b/erpnext/projects/doctype/time_log/time_log.py
index cd20036..c2239df 100644
--- a/erpnext/projects/doctype/time_log/time_log.py
+++ b/erpnext/projects/doctype/time_log/time_log.py
@@ -236,6 +236,9 @@
self.billing_amount = self.billing_rate * self.hours
else:
self.billing_amount = 0
+
+ if self.additional_cost and self.billable:
+ self.billing_amount += self.additional_cost
def update_task_and_project(self):
"""Update costing rate in Task or Project if either is set"""
diff --git a/erpnext/projects/doctype/time_log_batch/time_log_batch.js b/erpnext/projects/doctype/time_log_batch/time_log_batch.js
index 6b5f080..b1c431c 100644
--- a/erpnext/projects/doctype/time_log_batch/time_log_batch.js
+++ b/erpnext/projects/doctype/time_log_batch/time_log_batch.js
@@ -37,14 +37,31 @@
}
});
-frappe.ui.form.on("Time Log Batch Detail", "time_log", function(frm, cdt, cdn) {
+frappe.ui.form.on("Time Log Batch Detail", "time_log", function(frm) {
+ calculate_time_and_amount(frm);
+});
+
+frappe.ui.form.on("Time Log Batch Detail", "time_logs_remove", function(frm) {
+ calculate_time_and_amount(frm);
+});
+
+frappe.ui.form.on("Time Log Batch", "onload", function(frm) {
+ if (frm.doc.__islocal && frm.doc.time_logs) {
+ calculate_time_and_amount(frm);
+ }
+});
+
+var calculate_time_and_amount = function(frm) {
var tl = frm.doc.time_logs || [];
total_hr = 0;
total_amt = 0;
for(var i=0; i<tl.length; i++) {
- total_hr += tl[i].hours;
- total_amt += tl[i].billing_amount;
+ if (tl[i].time_log) {
+ total_hr += tl[i].hours;
+ total_amt += tl[i].billing_amount;
+ }
}
cur_frm.set_value("total_hours", total_hr);
cur_frm.set_value("total_billing_amount", total_amt);
-});
\ No newline at end of file
+
+}
\ No newline at end of file
diff --git a/erpnext/public/js/controllers/stock_controller.js b/erpnext/public/js/controllers/stock_controller.js
index 9df7d0f..a360d91 100644
--- a/erpnext/public/js/controllers/stock_controller.js
+++ b/erpnext/public/js/controllers/stock_controller.js
@@ -29,7 +29,7 @@
company: me.frm.doc.company
};
frappe.set_route("query-report", "Stock Ledger");
- }, "icon-bar-chart");
+ }, __("View"));
}
},
@@ -46,7 +46,7 @@
group_by_voucher: false
};
frappe.set_route("query-report", "General Ledger");
- }, "icon-table");
+ }, __("View"));
}
}
});
diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js
index d3fa0a8..d768306 100644
--- a/erpnext/public/js/controllers/transaction.js
+++ b/erpnext/public/js/controllers/transaction.js
@@ -133,14 +133,14 @@
var me = this;
if (in_list(["Purchase Invoice", "Sales Invoice"], this.frm.doctype)) {
if(this.frm.doc.outstanding_amount !== this.frm.doc.base_grand_total) {
- this.frm.add_custom_button(__("Show Payments"), function() {
+ this.frm.add_custom_button(__("Payments"), function() {
frappe.route_options = {
"Journal Entry Account.reference_type": me.frm.doc.doctype,
"Journal Entry Account.reference_name": me.frm.doc.name
};
frappe.set_route("List", "Journal Entry");
- });
+ }, __("View"));
}
}
},
diff --git a/erpnext/public/js/pos/pos.js b/erpnext/public/js/pos/pos.js
index a348138..961071c 100644
--- a/erpnext/public/js/pos/pos.js
+++ b/erpnext/public/js/pos/pos.js
@@ -16,9 +16,9 @@
$(this.frm.wrapper).on("refresh-fields", function() {
me.refresh();
});
-
+
this.wrapper.find('input.discount-percentage').on("change", function() {
- frappe.model.set_value(me.frm.doctype, me.frm.docname,
+ frappe.model.set_value(me.frm.doctype, me.frm.docname,
"additional_discount_percentage", flt(this.value));
});
@@ -61,6 +61,9 @@
"placeholder": this.party
},
parent: this.wrapper.find(".party-area"),
+ frm: this.frm,
+ doctype: this.frm.doctype,
+ docname: this.frm.docname,
only_input: true,
});
this.party_field.make_input();
@@ -481,7 +484,7 @@
var paid_amount = flt((flt(values.paid_amount) - flt(values.change)), precision("paid_amount"));
me.frm.set_value("paid_amount", paid_amount);
-
+
// specifying writeoff amount here itself, so as to avoid recursion issue
me.frm.set_value("write_off_amount", me.frm.doc.grand_total - paid_amount);
me.frm.set_value("outstanding_amount", 0);
diff --git a/erpnext/selling/doctype/quotation/quotation.js b/erpnext/selling/doctype/quotation/quotation.js
index d717e20..8d1df4c 100644
--- a/erpnext/selling/doctype/quotation/quotation.js
+++ b/erpnext/selling/doctype/quotation/quotation.js
@@ -18,11 +18,12 @@
this._super(doc, dt, dn);
if(doc.docstatus == 1 && doc.status!=='Lost') {
- cur_frm.add_custom_button(__('Make Sales Order'),
- cur_frm.cscript['Make Sales Order'], frappe.boot.doctype_icons["Sales Order"]);
+ cur_frm.add_custom_button(__('Sales Order'),
+ cur_frm.cscript['Make Sales Order'], __("Make"));
+
if(doc.status!=="Ordered") {
- cur_frm.add_custom_button(__('Set as Lost'),
- cur_frm.cscript['Declare Order Lost'], "icon-exclamation", "btn-default");
+ cur_frm.add_custom_button(__('Lost'),
+ cur_frm.cscript['Declare Order Lost'], __("Mark"));
}
}
@@ -41,7 +42,7 @@
company: cur_frm.doc.company
}
})
- }, "icon-download", "btn-default");
+ }, __("From"), "btn-default");
}
this.toggle_reqd_lead_customer();
diff --git a/erpnext/selling/doctype/sales_order/sales_order.js b/erpnext/selling/doctype/sales_order/sales_order.js
index 74b5202..a6ec617 100644
--- a/erpnext/selling/doctype/sales_order/sales_order.js
+++ b/erpnext/selling/doctype/sales_order/sales_order.js
@@ -54,7 +54,7 @@
// delivery note
if(flt(doc.per_delivered, 2) < 100 && ["Sales", "Shopping Cart"].indexOf(doc.order_type)!==-1 && allow_delivery) {
cur_frm.add_custom_button(__('Delivery'), this.make_delivery_note, __("Make"));
- // cur_frm.page.set_inner_btn_group_as_primary(__("Make"));
+ cur_frm.page.set_inner_btn_group_as_primary(__("Make"));
}
// sales invoice
diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.js b/erpnext/stock/doctype/delivery_note/delivery_note.js
index c5a3bab..84e9d8d 100644
--- a/erpnext/stock/doctype/delivery_note/delivery_note.js
+++ b/erpnext/stock/doctype/delivery_note/delivery_note.js
@@ -11,19 +11,20 @@
if (!doc.is_return && doc.status!="Closed") {
if(flt(doc.per_installed, 2) < 100 && doc.docstatus==1)
- cur_frm.add_custom_button(__('Installation Note'), this.make_installation_note);
+ cur_frm.add_custom_button(__('Installation Note'), this.make_installation_note, __("Make"));
if (doc.docstatus==1) {
- cur_frm.add_custom_button(__('Sales Return'), this.make_sales_return);
+ cur_frm.add_custom_button(__('Sales Return'), this.make_sales_return, __("Make"));
}
if(doc.docstatus==0 && !doc.__islocal) {
cur_frm.add_custom_button(__('Packing Slip'),
- cur_frm.cscript['Make Packing Slip'], frappe.boot.doctype_icons["Packing Slip"]);
+ cur_frm.cscript['Make Packing Slip'], __("Make"));
}
-
+ cur_frm.page.set_inner_btn_group_as_primary(__("Make"));
+
if (this.frm.doc.docstatus===0) {
- cur_frm.add_custom_button(__('From Sales Order'),
+ cur_frm.add_custom_button(__('Sales Order'),
function() {
frappe.model.map_current_doc({
method: "erpnext.selling.doctype.sales_order.sales_order.make_delivery_note",
@@ -37,7 +38,7 @@
company: cur_frm.doc.company
}
})
- });
+ }, __("From"));
}
}
@@ -47,17 +48,25 @@
this.show_general_ledger();
}
if (this.frm.has_perm("submit") && (doc.status !== "Closed")
- && this.frm.doc.__onload && !this.frm.doc.__onload.has_return_entry) {
- cur_frm.add_custom_button(__("Close"), this.close_delivery_note)
+ && this.frm.doc.__onload && this.frm.doc.__onload.has_return_entry) {
+ cur_frm.add_custom_button(__("Close"), this.close_delivery_note, __("Status"))
}
}
- if(doc.docstatus==1 && !doc.is_return && doc.status!="Closed" && flt(doc.per_billed, 2) < 100) {
- cur_frm.add_custom_button(__('Invoice'), this.make_sales_invoice).addClass("btn-primary");
+ if(doc.__onload && !doc.__onload.billing_complete && doc.docstatus==1
+ && !doc.is_return && doc.status!="Closed") {
+ // show Make Invoice button only if Delivery Note is not created from Sales Invoice
+ var from_sales_invoice = false;
+ from_sales_invoice = cur_frm.doc.items.some(function(item) {
+ return item.against_sales_invoice ? true : false;
+ });
+
+ if(!from_sales_invoice)
+ cur_frm.add_custom_button(__('Invoice'), this.make_sales_invoice, __("Make"));
}
if(doc.docstatus==1 && doc.status === "Closed" && this.frm.has_perm("submit")) {
- cur_frm.add_custom_button(__('Reopen'), this.reopen_delivery_note)
+ cur_frm.add_custom_button(__('Reopen'), this.reopen_delivery_note, __("Status"))
}
erpnext.stock.delivery_note.set_print_hide(doc, dt, dn);
diff --git a/erpnext/stock/doctype/item/item.js b/erpnext/stock/doctype/item/item.js
index 2caade6..f6b424c 100644
--- a/erpnext/stock/doctype/item/item.js
+++ b/erpnext/stock/doctype/item/item.js
@@ -22,19 +22,19 @@
"item_code": frm.doc.name
}
frappe.set_route("query-report", "Stock Balance");
- });
+ }, __("View"));
frm.add_custom_button(__("Ledger"), function() {
frappe.route_options = {
"item_code": frm.doc.name
}
frappe.set_route("query-report", "Stock Ledger");
- });
+ }, __("View"));
frm.add_custom_button(__("Projected"), function() {
frappe.route_options = {
"item_code": frm.doc.name
}
frappe.set_route("query-report", "Stock Projected Qty");
- });
+ }, __("View"));
}
// make sensitive fields(has_serial_no, is_stock_item, valuation_method)
@@ -48,11 +48,12 @@
frm.set_intro(__("This Item is a Template and cannot be used in transactions. Item attributes will be copied over into the variants unless 'No Copy' is set"), true);
frm.add_custom_button(__("Show Variants"), function() {
frappe.set_route("List", "Item", {"variant_of": frm.doc.name});
- }, "icon-list", "btn-default");
+ }, __("View"));
- frm.add_custom_button(__("Make Variant"), function() {
+ frm.add_custom_button(__("Variant"), function() {
erpnext.item.make_variant()
- }, "icon-list", "btn-default");
+ }, __("Make"));
+ cur_frm.page.set_inner_btn_group_as_primary(__("Make"));
}
if (frm.doc.variant_of) {
frm.set_intro(__("This Item is a Variant of {0} (Template). Attributes will be copied over from the template unless 'No Copy' is set", [frm.doc.variant_of]), true);
@@ -192,7 +193,7 @@
edit_prices_button: function(frm) {
frm.add_custom_button(__("Add / Edit Prices"), function() {
frappe.set_route("Report", "Item Price", {"item_code": frm.doc.name});
- }, "icon-money", "btn-default");
+ }, __("View"));
},
weight_to_validate: function(frm){
diff --git a/erpnext/stock/doctype/material_request/material_request.js b/erpnext/stock/doctype/material_request/material_request.js
index 3ce6707..d5df93f 100644
--- a/erpnext/stock/doctype/material_request/material_request.js
+++ b/erpnext/stock/doctype/material_request/material_request.js
@@ -36,30 +36,29 @@
if(doc.docstatus == 1 && doc.status != 'Stopped') {
if(doc.material_request_type === "Purchase")
cur_frm.add_custom_button(__("Make Supplier Quotation"),
- this.make_supplier_quotation,
- frappe.boot.doctype_icons["Supplier Quotation"]);
+ this.make_supplier_quotation, __("Make"));
+
+ cur_frm.page.set_inner_btn_group_as_primary(__("Make"));
if(flt(doc.per_ordered, 2) < 100) {
if(doc.material_request_type === "Material Transfer" && doc.status === "Submitted")
- cur_frm.add_custom_button(__("Transfer Material"), this.make_stock_entry,
- frappe.boot.doctype_icons["Stock Entry"]);
+ cur_frm.add_custom_button(__("Transfer Material"), this.make_stock_entry, __("Make"));
if(doc.material_request_type === "Material Issue" && doc.status === "Submitted")
- cur_frm.add_custom_button(__("Issue Material"), this.make_stock_entry,
- frappe.boot.doctype_icons["Stock Entry"]);
+ cur_frm.add_custom_button(__("Issue Material"), this.make_stock_entry, __("Make"));
if(doc.material_request_type === "Purchase")
cur_frm.add_custom_button(__('Make Purchase Order'),
- this.make_purchase_order, frappe.boot.doctype_icons["Purchase Order"]);
+ this.make_purchase_order, __("Make"));
cur_frm.add_custom_button(__('Stop'),
- cur_frm.cscript['Stop Material Request'], "icon-exclamation", "btn-default");
+ cur_frm.cscript['Stop Material Request'], __("Status"));
}
}
if (this.frm.doc.docstatus===0) {
- cur_frm.add_custom_button(__('From Sales Order'),
+ cur_frm.add_custom_button(__('Sales Order'),
function() {
frappe.model.map_current_doc({
method: "erpnext.selling.doctype.sales_order.sales_order.make_material_request",
@@ -71,12 +70,12 @@
company: cur_frm.doc.company
}
})
- }, "icon-download", "btn-default");
+ }, __("From"));
}
if(doc.docstatus == 1 && doc.status == 'Stopped')
cur_frm.add_custom_button(__('Re-open'),
- cur_frm.cscript['Unstop Material Request'], "icon-check");
+ cur_frm.cscript['Unstop Material Request'], __("Status"));
},
diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.js b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.js
index eec1a6d..bda14ff 100644
--- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.js
+++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.js
@@ -38,7 +38,7 @@
if(!this.frm.doc.is_return && this.frm.doc.status!="Closed") {
if(this.frm.doc.docstatus==0) {
- cur_frm.add_custom_button(__('From Purchase Order'),
+ cur_frm.add_custom_button(__('Purchase Order'),
function() {
frappe.model.map_current_doc({
method: "erpnext.buying.doctype.purchase_order.purchase_order.make_purchase_receipt",
@@ -51,25 +51,27 @@
company: cur_frm.doc.company
}
})
- });
+ }, __("From"));
}
if(this.frm.doc.docstatus == 1 && this.frm.doc.status!="Closed") {
- cur_frm.add_custom_button(__('Return'), this.make_purchase_return);
+ if (this.frm.has_perm("submit") &&
+ this.frm.doc.__onload && this.frm.doc.__onload.has_return_entry) {
+ cur_frm.add_custom_button(__("Close"), this.close_purchase_receipt, __("Status"))
+ }
+
+ cur_frm.add_custom_button(__('Return'), this.make_purchase_return, __("Make"));
+
if(this.frm.doc.__onload && !this.frm.doc.__onload.billing_complete) {
- cur_frm.add_custom_button(__('Invoice'),
- this.make_purchase_invoice).addClass("btn-primary");
+ cur_frm.add_custom_button(__('Invoice'), this.make_purchase_invoice, __("Make"));
}
- if (this.frm.has_perm("submit") &&
- this.frm.doc.__onload && !this.frm.doc.__onload.has_return_entry) {
- cur_frm.add_custom_button(__("Close"), this.close_purchase_receipt)
- }
+ cur_frm.page.set_inner_btn_group_as_primary(__("Make"));
}
}
if(this.frm.doc.docstatus==1 && this.frm.doc.status === "Closed" && this.frm.has_perm("submit")) {
- cur_frm.add_custom_button(__('Reopen'), this.reopen_purchase_receipt)
+ cur_frm.add_custom_button(__('Reopen'), this.reopen_purchase_receipt, __("Status"))
}
this.frm.toggle_reqd("supplier_warehouse", this.frm.doc.is_subcontracted==="Yes");
diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.js b/erpnext/stock/doctype/stock_entry/stock_entry.js
index 585f8dd..9d6f590 100644
--- a/erpnext/stock/doctype/stock_entry/stock_entry.js
+++ b/erpnext/stock/doctype/stock_entry/stock_entry.js
@@ -176,12 +176,13 @@
add_excise_button: function() {
if(frappe.boot.sysdefaults.country === "India")
- this.frm.add_custom_button(__("Make Excise Invoice"), function() {
+ this.frm.add_custom_button(__("Excise Invoice"), function() {
var excise = frappe.model.make_new_doc_and_get_name('Journal Entry');
excise = locals['Journal Entry'][excise];
excise.voucher_type = 'Excise Entry';
loaddoc('Journal Entry', excise.name);
- }, frappe.boot.doctype_icons["Journal Entry"], "btn-default");
+ }, __("Make"));
+ cur_frm.page.set_inner_btn_group_as_primary(__("Make"));
},
items_add: function(doc, cdt, cdn) {
diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.py b/erpnext/stock/doctype/stock_entry/stock_entry.py
index 247ce78..28939ca 100644
--- a/erpnext/stock/doctype/stock_entry/stock_entry.py
+++ b/erpnext/stock/doctype/stock_entry/stock_entry.py
@@ -233,6 +233,7 @@
self.posting_date, self.posting_time, d.actual_qty, d.transfer_qty), NegativeStockError)
def get_stock_and_rate(self):
+ self.set_transfer_qty()
self.set_actual_qty()
self.calculate_rate_and_amount()
diff --git a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js
index ac10fb6..08c1df1 100644
--- a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js
+++ b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js
@@ -21,7 +21,7 @@
refresh: function(frm) {
if(frm.doc.docstatus < 1) {
- frm.add_custom_button(__("Get Items"), function() {
+ frm.add_custom_button(__("Items"), function() {
frm.events.get_items(frm);
});
}
diff --git a/erpnext/support/doctype/issue/issue.js b/erpnext/support/doctype/issue/issue.js
index 21ef5b8..15029a0 100644
--- a/erpnext/support/doctype/issue/issue.js
+++ b/erpnext/support/doctype/issue/issue.js
@@ -8,12 +8,12 @@
frm.add_custom_button(__("Close"), function() {
frm.set_value("status", "Closed");
frm.save();
- });
+ }, __("Status"));
} else {
frm.add_custom_button(__("Reopen"), function() {
frm.set_value("status", "Open");
frm.save();
- });
+ }, __("Status"));
}
}
});
diff --git a/erpnext/support/doctype/issue/issue.json b/erpnext/support/doctype/issue/issue.json
index 229eccf..b11eea9 100644
--- a/erpnext/support/doctype/issue/issue.json
+++ b/erpnext/support/doctype/issue/issue.json
@@ -1,7 +1,7 @@
{
"allow_copy": 0,
- "allow_import": 0,
- "allow_rename": 0,
+ "allow_import": 1,
+ "allow_rename": 1,
"autoname": "naming_series:",
"creation": "2013-02-01 10:36:25",
"custom": 0,
@@ -24,6 +24,7 @@
"options": "icon-flag",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -47,6 +48,7 @@
"options": "ISS-",
"permlevel": 0,
"print_hide": 1,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -69,6 +71,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@@ -90,6 +93,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -116,6 +120,7 @@
"options": "Open\nReplied\nHold\nClosed",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -142,6 +147,7 @@
"options": "Email",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -163,6 +169,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -185,6 +192,7 @@
"permlevel": 0,
"precision": "",
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -210,6 +218,7 @@
"oldfieldtype": "Text",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -232,6 +241,7 @@
"permlevel": 0,
"precision": "",
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -257,6 +267,7 @@
"oldfieldtype": "Date",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -279,6 +290,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -302,6 +314,7 @@
"options": "icon-pushpin",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -325,6 +338,7 @@
"options": "Lead",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -348,6 +362,7 @@
"options": "Contact",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -370,6 +385,7 @@
"permlevel": 0,
"precision": "",
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -395,6 +411,7 @@
"options": "Customer",
"permlevel": 0,
"print_hide": 1,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -419,6 +436,7 @@
"oldfieldtype": "Data",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -441,6 +459,7 @@
"permlevel": 0,
"precision": "",
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -466,6 +485,7 @@
"oldfieldtype": "Text",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -489,6 +509,7 @@
"oldfieldtype": "Column Break",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -514,6 +535,7 @@
"oldfieldtype": "Date",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -538,6 +560,7 @@
"oldfieldtype": "Time",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -561,6 +584,7 @@
"options": "Company",
"permlevel": 0,
"print_hide": 1,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -583,6 +607,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -606,6 +631,7 @@
"permlevel": 0,
"precision": "",
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -624,7 +650,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2015-11-16 06:29:47.774531",
+ "modified": "2016-01-14 07:45:55.840256",
"modified_by": "Administrator",
"module": "Support",
"name": "Issue",
diff --git a/erpnext/support/doctype/maintenance_schedule/maintenance_schedule.js b/erpnext/support/doctype/maintenance_schedule/maintenance_schedule.js
index 023ef6c..b24ae48 100644
--- a/erpnext/support/doctype/maintenance_schedule/maintenance_schedule.js
+++ b/erpnext/support/doctype/maintenance_schedule/maintenance_schedule.js
@@ -16,7 +16,7 @@
var me = this;
if (this.frm.doc.docstatus === 0) {
- this.frm.add_custom_button(__('From Sales Order'),
+ this.frm.add_custom_button(__('Sales Order'),
function() {
frappe.model.map_current_doc({
method: "erpnext.selling.doctype.sales_order.sales_order.make_maintenance_schedule",
@@ -28,7 +28,7 @@
company: me.frm.doc.company
}
});
- }, "icon-download", "btn-default");
+ }, __("From"));
} else if (this.frm.doc.docstatus === 1) {
this.frm.add_custom_button(__("Make Maintenance Visit"), function() {
frappe.model.open_mapped_doc({
@@ -36,7 +36,7 @@
source_name: me.frm.doc.name,
frm: me.frm
})
- }, frappe.boot.doctype_icons["Maintenance Visit"]);
+ }, __("Make"));
}
},
diff --git a/erpnext/support/doctype/maintenance_visit/maintenance_visit.js b/erpnext/support/doctype/maintenance_visit/maintenance_visit.js
index 7a803fb..91f7fa2 100644
--- a/erpnext/support/doctype/maintenance_visit/maintenance_visit.js
+++ b/erpnext/support/doctype/maintenance_visit/maintenance_visit.js
@@ -15,7 +15,7 @@
erpnext.support.MaintenanceVisit = frappe.ui.form.Controller.extend({
refresh: function() {
if (this.frm.doc.docstatus===0) {
- cur_frm.add_custom_button(__('From Maintenance Schedule'),
+ cur_frm.add_custom_button(__('Maintenance Schedule'),
function() {
frappe.model.map_current_doc({
method: "erpnext.support.doctype.maintenance_schedule.maintenance_schedule.make_maintenance_visit",
@@ -26,8 +26,8 @@
company: cur_frm.doc.company
}
})
- }, "icon-download", "btn-default");
- cur_frm.add_custom_button(__('From Warranty Claim'),
+ }, __("From"));
+ cur_frm.add_custom_button(__('Warranty Claim'),
function() {
frappe.model.map_current_doc({
method: "erpnext.support.doctype.warranty_claim.warranty_claim.make_maintenance_visit",
@@ -38,8 +38,8 @@
company: cur_frm.doc.company
}
})
- }, "icon-download", "btn-default");
- cur_frm.add_custom_button(__('From Sales Order'),
+ }, __("From"));
+ cur_frm.add_custom_button(__('Sales Order'),
function() {
frappe.model.map_current_doc({
method: "erpnext.selling.doctype.sales_order.sales_order.make_maintenance_visit",
@@ -51,7 +51,7 @@
company: cur_frm.doc.company
}
})
- }, "icon-download", "btn-default");
+ }, __("From"));
}
},
});
diff --git a/erpnext/support/doctype/warranty_claim/warranty_claim.js b/erpnext/support/doctype/warranty_claim/warranty_claim.js
index e33f9b2..991745a 100644
--- a/erpnext/support/doctype/warranty_claim/warranty_claim.js
+++ b/erpnext/support/doctype/warranty_claim/warranty_claim.js
@@ -15,8 +15,9 @@
refresh: function() {
if(!cur_frm.doc.__islocal &&
(cur_frm.doc.status=='Open' || cur_frm.doc.status == 'Work In Progress')) {
- cur_frm.add_custom_button(__('Make Maintenance Visit'),
- this.make_maintenance_visit, frappe.boot.doctype_icons["Maintenance Visit"], "btn-default")
+ cur_frm.add_custom_button(__('Maintenance Visit'),
+ this.make_maintenance_visit, __("Make"))
+ cur_frm.page.set_inner_btn_group_as_primary(__("Make"));
}
},