[fixed] frappe.require is now async 💥
This commit is contained in:
parent
127de729b2
commit
be2ee18de4
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
//c-form js file
|
//c-form js file
|
||||||
// -----------------------------
|
// -----------------------------
|
||||||
frappe.require("assets/erpnext/js/utils.js");
|
|
||||||
|
|
||||||
cur_frm.fields_dict.invoices.grid.get_field("invoice_no").get_query = function(doc) {
|
cur_frm.fields_dict.invoices.grid.get_field("invoice_no").get_query = function(doc) {
|
||||||
return {
|
return {
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
frappe.provide("erpnext.accounts");
|
frappe.provide("erpnext.accounts");
|
||||||
frappe.provide("erpnext.journal_entry");
|
frappe.provide("erpnext.journal_entry");
|
||||||
frappe.require("assets/erpnext/js/utils.js");
|
|
||||||
|
|
||||||
frappe.ui.form.on("Journal Entry", {
|
frappe.ui.form.on("Journal Entry", {
|
||||||
refresh: function(frm) {
|
refresh: function(frm) {
|
||||||
|
@ -13,9 +13,10 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"fieldname": "invoice_type",
|
"fieldname": "invoice_type",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Select",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Invoice Type",
|
"label": "Invoice Type",
|
||||||
@ -24,6 +25,7 @@
|
|||||||
"options": "Sales Invoice\nPurchase Invoice\nJournal Entry",
|
"options": "Sales Invoice\nPurchase Invoice\nJournal Entry",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
"read_only": 1,
|
"read_only": 1,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
@ -36,17 +38,19 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"fieldname": "invoice_number",
|
"fieldname": "invoice_number",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Dynamic Link",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Invoice Number",
|
"label": "Invoice Number",
|
||||||
"length": 0,
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"options": "",
|
"options": "invoice_type",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
"read_only": 1,
|
"read_only": 1,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
@ -62,6 +66,7 @@
|
|||||||
"fieldtype": "Date",
|
"fieldtype": "Date",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Invoice Date",
|
"label": "Invoice Date",
|
||||||
@ -69,6 +74,7 @@
|
|||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
"read_only": 1,
|
"read_only": 1,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
@ -84,6 +90,7 @@
|
|||||||
"fieldtype": "Column Break",
|
"fieldtype": "Column Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "",
|
"label": "",
|
||||||
@ -91,6 +98,7 @@
|
|||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
@ -106,6 +114,7 @@
|
|||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Amount",
|
"label": "Amount",
|
||||||
@ -113,6 +122,7 @@
|
|||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
"read_only": 1,
|
"read_only": 1,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
@ -128,6 +138,7 @@
|
|||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Outstanding Amount",
|
"label": "Outstanding Amount",
|
||||||
@ -135,6 +146,7 @@
|
|||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
"read_only": 1,
|
"read_only": 1,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
@ -145,21 +157,24 @@
|
|||||||
],
|
],
|
||||||
"hide_heading": 0,
|
"hide_heading": 0,
|
||||||
"hide_toolbar": 0,
|
"hide_toolbar": 0,
|
||||||
|
"idx": 0,
|
||||||
"in_create": 0,
|
"in_create": 0,
|
||||||
"in_dialog": 0,
|
"in_dialog": 0,
|
||||||
"is_submittable": 0,
|
"is_submittable": 0,
|
||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 1,
|
"istable": 1,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"modified": "2015-11-16 06:29:51.516537",
|
"modified": "2016-04-29 05:47:14.124370",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Payment Reconciliation Invoice",
|
"name": "Payment Reconciliation Invoice",
|
||||||
"name_case": "",
|
"name_case": "",
|
||||||
"owner": "Administrator",
|
"owner": "Administrator",
|
||||||
"permissions": [],
|
"permissions": [],
|
||||||
|
"quick_entry": 1,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"read_only_onload": 0,
|
"read_only_onload": 0,
|
||||||
"sort_field": "modified",
|
"sort_field": "modified",
|
||||||
"sort_order": "DESC"
|
"sort_order": "DESC",
|
||||||
|
"track_seen": 0
|
||||||
}
|
}
|
@ -12,7 +12,7 @@ frappe.pages['financial-analytics'].on_page_load = function(wrapper) {
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
frappe.require("assets/erpnext/js/account_tree_grid.js");
|
{% include "erpnext/public/js/account_tree_grid.js" %}
|
||||||
|
|
||||||
erpnext.FinancialAnalytics = erpnext.AccountTreeGrid.extend({
|
erpnext.FinancialAnalytics = erpnext.AccountTreeGrid.extend({
|
||||||
filters: [
|
filters: [
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
||||||
// License: GNU General Public License v3. See license.txt
|
// License: GNU General Public License v3. See license.txt
|
||||||
|
|
||||||
frappe.require("assets/erpnext/js/financial_statements.js");
|
frappe.require("assets/erpnext/js/financial_statements.js", function() {
|
||||||
|
|
||||||
frappe.query_reports["Balance Sheet"] = erpnext.financial_statements;
|
frappe.query_reports["Balance Sheet"] = erpnext.financial_statements;
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
// Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors
|
// Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors
|
||||||
// For license information, please see license.txt
|
// For license information, please see license.txt
|
||||||
|
|
||||||
frappe.require("assets/erpnext/js/financial_statements.js");
|
frappe.require("assets/erpnext/js/financial_statements.js", function() {
|
||||||
|
|
||||||
frappe.query_reports["Cash Flow"] = erpnext.financial_statements;
|
frappe.query_reports["Cash Flow"] = erpnext.financial_statements;
|
||||||
|
|
||||||
frappe.query_reports["Cash Flow"]["filters"].push({
|
frappe.query_reports["Cash Flow"]["filters"].push({
|
||||||
"fieldname": "accumulated_values",
|
"fieldname": "accumulated_values",
|
||||||
"label": __("Accumulated Values"),
|
"label": __("Accumulated Values"),
|
||||||
"fieldtype": "Check"
|
"fieldtype": "Check"
|
||||||
})
|
});
|
||||||
|
});
|
@ -1,8 +1,7 @@
|
|||||||
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
||||||
// License: GNU General Public License v3. See license.txt
|
// License: GNU General Public License v3. See license.txt
|
||||||
|
|
||||||
frappe.require("assets/erpnext/js/financial_statements.js");
|
frappe.require("assets/erpnext/js/financial_statements.js", function() {
|
||||||
|
|
||||||
frappe.query_reports["Profit and Loss Statement"] = $.extend({}, erpnext.financial_statements);
|
frappe.query_reports["Profit and Loss Statement"] = $.extend({}, erpnext.financial_statements);
|
||||||
|
|
||||||
frappe.query_reports["Profit and Loss Statement"]["filters"].push({
|
frappe.query_reports["Profit and Loss Statement"]["filters"].push({
|
||||||
@ -10,6 +9,4 @@ frappe.query_reports["Profit and Loss Statement"]["filters"].push({
|
|||||||
"label": __("Accumulated Values"),
|
"label": __("Accumulated Values"),
|
||||||
"fieldtype": "Check"
|
"fieldtype": "Check"
|
||||||
});
|
});
|
||||||
|
});
|
||||||
console.log(frappe.query_reports["Profit and Loss Statement"]);
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
|||||||
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
||||||
// License: GNU General Public License v3. See license.txt
|
// License: GNU General Public License v3. See license.txt
|
||||||
|
|
||||||
frappe.require("assets/erpnext/js/purchase_trends_filters.js");
|
frappe.require("assets/erpnext/js/purchase_trends_filters.js", function() {
|
||||||
|
|
||||||
frappe.query_reports["Purchase Invoice Trends"] = {
|
frappe.query_reports["Purchase Invoice Trends"] = {
|
||||||
filters: get_filters()
|
filters: get_filters()
|
||||||
}
|
}
|
||||||
|
});
|
@ -1,8 +1,8 @@
|
|||||||
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
||||||
// License: GNU General Public License v3. See license.txt
|
// License: GNU General Public License v3. See license.txt
|
||||||
|
|
||||||
frappe.require("assets/erpnext/js/sales_trends_filters.js");
|
frappe.require("assets/erpnext/js/sales_trends_filters.js", function() {
|
||||||
|
|
||||||
frappe.query_reports["Sales Invoice Trends"] = {
|
frappe.query_reports["Sales Invoice Trends"] = {
|
||||||
filters: get_filters()
|
filters: get_filters()
|
||||||
}
|
}
|
||||||
|
});
|
@ -1,8 +1,7 @@
|
|||||||
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
||||||
// License: GNU General Public License v3. See license.txt
|
// License: GNU General Public License v3. See license.txt
|
||||||
|
|
||||||
frappe.require("assets/erpnext/js/financial_statements.js");
|
frappe.require("assets/erpnext/js/financial_statements.js", function() {
|
||||||
|
|
||||||
frappe.query_reports["Trial Balance"] = {
|
frappe.query_reports["Trial Balance"] = {
|
||||||
"filters": [
|
"filters": [
|
||||||
{
|
{
|
||||||
@ -63,3 +62,5 @@ frappe.query_reports["Trial Balance"] = {
|
|||||||
"parent_field": "parent_account",
|
"parent_field": "parent_account",
|
||||||
"initial_depth": 3
|
"initial_depth": 3
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
@ -4,9 +4,8 @@
|
|||||||
frappe.provide("erpnext.buying");
|
frappe.provide("erpnext.buying");
|
||||||
|
|
||||||
cur_frm.cscript.tax_table = "Purchase Taxes and Charges";
|
cur_frm.cscript.tax_table = "Purchase Taxes and Charges";
|
||||||
{% include 'erpnext/accounts/doctype/purchase_taxes_and_charges_template/purchase_taxes_and_charges_template.js' %}
|
|
||||||
|
|
||||||
frappe.require("assets/erpnext/js/controllers/transaction.js");
|
{% include 'erpnext/accounts/doctype/purchase_taxes_and_charges_template/purchase_taxes_and_charges_template.js' %}
|
||||||
|
|
||||||
cur_frm.email_field = "contact_email";
|
cur_frm.email_field = "contact_email";
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
{% include 'erpnext/buying/doctype/purchase_common/purchase_common.js' %};
|
{% include 'erpnext/buying/doctype/purchase_common/purchase_common.js' %};
|
||||||
|
|
||||||
frappe.require("assets/erpnext/js/utils.js");
|
|
||||||
|
|
||||||
frappe.ui.form.on("Request for Quotation",{
|
frappe.ui.form.on("Request for Quotation",{
|
||||||
setup: function(frm){
|
setup: function(frm){
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
||||||
// License: GNU General Public License v3. See license.txt
|
// License: GNU General Public License v3. See license.txt
|
||||||
|
|
||||||
frappe.require("assets/erpnext/js/purchase_trends_filters.js");
|
frappe.require("assets/erpnext/js/purchase_trends_filters.js", function() {
|
||||||
|
|
||||||
frappe.query_reports["Purchase Order Trends"] = {
|
frappe.query_reports["Purchase Order Trends"] = {
|
||||||
filters: get_filters()
|
filters: get_filters()
|
||||||
}
|
}
|
||||||
|
});
|
@ -2,7 +2,7 @@
|
|||||||
// License: GNU General Public License v3. See license.txt
|
// License: GNU General Public License v3. See license.txt
|
||||||
|
|
||||||
frappe.provide("erpnext.crm");
|
frappe.provide("erpnext.crm");
|
||||||
frappe.require("assets/erpnext/js/utils.js");
|
|
||||||
cur_frm.email_field = "contact_email";
|
cur_frm.email_field = "contact_email";
|
||||||
frappe.ui.form.on("Opportunity", {
|
frappe.ui.form.on("Opportunity", {
|
||||||
customer: function(frm) {
|
customer: function(frm) {
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
// License: GNU General Public License v3. See license.txt
|
// License: GNU General Public License v3. See license.txt
|
||||||
|
|
||||||
|
|
||||||
frappe.require("assets/erpnext/js/utils.js");
|
|
||||||
frappe.provide("erpnext.hr");
|
frappe.provide("erpnext.hr");
|
||||||
|
|
||||||
erpnext.hr.AttendanceControlPanel = frappe.ui.form.Controller.extend({
|
erpnext.hr.AttendanceControlPanel = frappe.ui.form.Controller.extend({
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
||||||
// License: GNU General Public License v3. See license.txt
|
// License: GNU General Public License v3. See license.txt
|
||||||
|
|
||||||
frappe.require("assets/erpnext/js/utils.js");
|
|
||||||
|
|
||||||
cur_frm.cscript.onload = function(doc) {
|
cur_frm.cscript.onload = function(doc) {
|
||||||
cur_frm.set_value("company", frappe.defaults.get_user_default("Company"))
|
cur_frm.set_value("company", frappe.defaults.get_user_default("Company"))
|
||||||
|
@ -43,20 +43,9 @@ frappe.ui.form.on("Project", {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
frm.dashboard.show_heatmap = true;
|
||||||
|
frm.dashboard.heatmap_message = __('This is based on the Time Logs created against this project');
|
||||||
frm.dashboard.show_dashboard();
|
frm.dashboard.show_dashboard();
|
||||||
// frm.dashboard.add_section(frappe.render_template('project_dashboard', {project: frm.doc}));
|
|
||||||
|
|
||||||
// var bars = [];
|
|
||||||
// bars.push({
|
|
||||||
// 'title': __('Percent Complete'),
|
|
||||||
// 'width': (frm.doc.percent_complete || 1) + '%',
|
|
||||||
// 'progress_class': 'progress-bar-success'
|
|
||||||
// })
|
|
||||||
//
|
|
||||||
// var message = __("{0}% complete", [frm.doc.percent_complete]);
|
|
||||||
//
|
|
||||||
// frm.dashboard.add_progress(__('Status'), bars, message);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -154,8 +154,17 @@ def get_dashboard_data(name):
|
|||||||
from frappe.desk.notifications import get_open_count
|
from frappe.desk.notifications import get_open_count
|
||||||
return {
|
return {
|
||||||
'count': get_open_count('Project', name),
|
'count': get_open_count('Project', name),
|
||||||
|
'timeline_data': get_timeline_data(name)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def get_timeline_data(name):
|
||||||
|
'''Return timeline for attendance'''
|
||||||
|
return dict(frappe.db.sql('''select unix_timestamp(from_time), count(*)
|
||||||
|
from `tabTime Log` where project=%s
|
||||||
|
and from_time > date_sub(curdate(), interval 1 year)
|
||||||
|
and docstatus < 2
|
||||||
|
group by date(from_time)''', name))
|
||||||
|
|
||||||
def get_project_list(doctype, txt, filters, limit_start, limit_page_length=20):
|
def get_project_list(doctype, txt, filters, limit_start, limit_page_length=20):
|
||||||
return frappe.db.sql('''select distinct project.*
|
return frappe.db.sql('''select distinct project.*
|
||||||
from tabProject project, `tabProject User` project_user
|
from tabProject project, `tabProject User` project_user
|
||||||
|
@ -461,7 +461,7 @@
|
|||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"depends_on": "eval:doc.for_manufacturing",
|
"depends_on": "for_manufacturing",
|
||||||
"fieldname": "section_break_11",
|
"fieldname": "section_break_11",
|
||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -645,7 +645,8 @@
|
|||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"depends_on": "",
|
"collapsible_depends_on": "",
|
||||||
|
"depends_on": "costing_rate",
|
||||||
"fieldname": "section_break_24",
|
"fieldname": "section_break_24",
|
||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -653,6 +654,7 @@
|
|||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
|
"label": "Cost",
|
||||||
"length": 0,
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
@ -748,6 +750,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"default": "0",
|
"default": "0",
|
||||||
|
"depends_on": "billable",
|
||||||
"description": "",
|
"description": "",
|
||||||
"fieldname": "billing_rate",
|
"fieldname": "billing_rate",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
@ -801,6 +804,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"default": "0",
|
"default": "0",
|
||||||
|
"depends_on": "billable",
|
||||||
"description": "Will be updated only if Time Log is 'Billable'",
|
"description": "Will be updated only if Time Log is 'Billable'",
|
||||||
"fieldname": "billing_amount",
|
"fieldname": "billing_amount",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
@ -935,7 +939,7 @@
|
|||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"modified": "2016-04-29 03:45:50.096299",
|
"modified": "2016-04-29 05:19:18.247260",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Projects",
|
"module": "Projects",
|
||||||
"name": "Time Log",
|
"name": "Time Log",
|
||||||
|
@ -11,15 +11,20 @@
|
|||||||
"public/js/feature_setup.js",
|
"public/js/feature_setup.js",
|
||||||
"public/js/utils.js",
|
"public/js/utils.js",
|
||||||
"public/js/queries.js",
|
"public/js/queries.js",
|
||||||
|
"public/js/sms_manager.js",
|
||||||
"public/js/utils/party.js",
|
"public/js/utils/party.js",
|
||||||
"public/js/templates/address_list.html",
|
"public/js/templates/address_list.html",
|
||||||
"public/js/templates/contact_list.html",
|
"public/js/templates/contact_list.html",
|
||||||
|
"public/js/controllers/stock_controller.js",
|
||||||
|
"public/js/controllers/taxes_and_totals.js",
|
||||||
|
"public/js/controllers/transaction.js",
|
||||||
"public/js/pos/pos.html",
|
"public/js/pos/pos.html",
|
||||||
"public/js/pos/pos_bill_item.html",
|
"public/js/pos/pos_bill_item.html",
|
||||||
"public/js/pos/pos_item.html",
|
"public/js/pos/pos_item.html",
|
||||||
"public/js/pos/pos_tax_row.html",
|
"public/js/pos/pos_tax_row.html",
|
||||||
"public/js/pos/pos.js",
|
"public/js/pos/pos.js",
|
||||||
"public/js/templates/item_selector.html"
|
"public/js/templates/item_selector.html",
|
||||||
|
"public/js/utils/item_selector.js"
|
||||||
],
|
],
|
||||||
"js/item-dashboard.min.js": [
|
"js/item-dashboard.min.js": [
|
||||||
"stock/dashboard/item_dashboard.html",
|
"stock/dashboard/item_dashboard.html",
|
||||||
|
@ -1,9 +1,6 @@
|
|||||||
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
||||||
// License: GNU General Public License v3. See license.txt
|
// License: GNU General Public License v3. See license.txt
|
||||||
|
|
||||||
frappe.provide("erpnext");
|
|
||||||
frappe.require("assets/erpnext/js/controllers/stock_controller.js");
|
|
||||||
|
|
||||||
erpnext.taxes_and_totals = erpnext.stock.StockController.extend({
|
erpnext.taxes_and_totals = erpnext.stock.StockController.extend({
|
||||||
calculate_taxes_and_totals: function(update_paid_amount) {
|
calculate_taxes_and_totals: function(update_paid_amount) {
|
||||||
this.discount_amount_applied = false;
|
this.discount_amount_applied = false;
|
||||||
|
@ -1,13 +1,85 @@
|
|||||||
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
||||||
// License: GNU General Public License v3. See license.txt
|
// License: GNU General Public License v3. See license.txt
|
||||||
|
|
||||||
frappe.provide("erpnext");
|
|
||||||
frappe.require([
|
|
||||||
"assets/erpnext/js/controllers/taxes_and_totals.js",
|
|
||||||
"assets/erpnext/js/utils.js",
|
|
||||||
"assets/erpnext/js/utils/item_selector.js"]);
|
|
||||||
|
|
||||||
erpnext.TransactionController = erpnext.taxes_and_totals.extend({
|
erpnext.TransactionController = erpnext.taxes_and_totals.extend({
|
||||||
|
setup: function() {
|
||||||
|
frappe.ui.form.on(this.frm.doctype + " Item", "rate", function(frm, cdt, cdn) {
|
||||||
|
var item = frappe.get_doc(cdt, cdn);
|
||||||
|
frappe.model.round_floats_in(item, ["rate", "price_list_rate"]);
|
||||||
|
|
||||||
|
if(item.price_list_rate) {
|
||||||
|
item.discount_percentage = flt((1 - item.rate / item.price_list_rate) * 100.0, precision("discount_percentage", item));
|
||||||
|
} else {
|
||||||
|
item.discount_percentage = 0.0;
|
||||||
|
}
|
||||||
|
|
||||||
|
cur_frm.cscript.set_gross_profit(item);
|
||||||
|
cur_frm.cscript.calculate_taxes_and_totals();
|
||||||
|
})
|
||||||
|
|
||||||
|
frappe.ui.form.on(this.frm.cscript.tax_table, "rate", function(frm, cdt, cdn) {
|
||||||
|
cur_frm.cscript.calculate_taxes_and_totals();
|
||||||
|
})
|
||||||
|
|
||||||
|
frappe.ui.form.on(this.frm.cscript.tax_table, "tax_amount", function(frm, cdt, cdn) {
|
||||||
|
cur_frm.cscript.calculate_taxes_and_totals();
|
||||||
|
})
|
||||||
|
|
||||||
|
frappe.ui.form.on(this.frm.cscript.tax_table, "row_id", function(frm, cdt, cdn) {
|
||||||
|
cur_frm.cscript.calculate_taxes_and_totals();
|
||||||
|
})
|
||||||
|
|
||||||
|
frappe.ui.form.on(this.frm.cscript.tax_table, "included_in_print_rate", function(frm, cdt, cdn) {
|
||||||
|
cur_frm.cscript.set_dynamic_labels();
|
||||||
|
cur_frm.cscript.calculate_taxes_and_totals();
|
||||||
|
})
|
||||||
|
|
||||||
|
frappe.ui.form.on(this.frm.doctype, "apply_discount_on", function(frm) {
|
||||||
|
if(frm.doc.additional_discount_percentage) {
|
||||||
|
frm.trigger("additional_discount_percentage");
|
||||||
|
} else {
|
||||||
|
cur_frm.cscript.calculate_taxes_and_totals();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
frappe.ui.form.on(this.frm.doctype, "additional_discount_percentage", function(frm) {
|
||||||
|
if (frm.via_discount_amount) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!frm.doc.apply_discount_on) {
|
||||||
|
frappe.msgprint(__("Please set 'Apply Additional Discount On'"));
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
frm.via_discount_percentage = true;
|
||||||
|
|
||||||
|
if(frm.doc.additional_discount_percentage && frm.doc.discount_amount) {
|
||||||
|
// Reset discount amount and net / grand total
|
||||||
|
frm.set_value("discount_amount", 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
var total = flt(frm.doc[frappe.model.scrub(frm.doc.apply_discount_on)]);
|
||||||
|
var discount_amount = flt(total*flt(frm.doc.additional_discount_percentage) / 100,
|
||||||
|
precision("discount_amount"));
|
||||||
|
|
||||||
|
frm.set_value("discount_amount", discount_amount);
|
||||||
|
delete frm.via_discount_percentage;
|
||||||
|
});
|
||||||
|
|
||||||
|
frappe.ui.form.on(this.frm.doctype, "discount_amount", function(frm) {
|
||||||
|
frm.cscript.set_dynamic_labels();
|
||||||
|
|
||||||
|
if (!frm.via_discount_percentage) {
|
||||||
|
frm.via_discount_amount = true;
|
||||||
|
frm.set_value("additional_discount_percentage", 0);
|
||||||
|
delete frm.via_discount_amount;
|
||||||
|
}
|
||||||
|
|
||||||
|
frm.cscript.calculate_taxes_and_totals();
|
||||||
|
});
|
||||||
|
|
||||||
|
},
|
||||||
onload: function() {
|
onload: function() {
|
||||||
var me = this;
|
var me = this;
|
||||||
//this.frm.show_print_first = true;
|
//this.frm.show_print_first = true;
|
||||||
@ -128,7 +200,6 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
|
|||||||
},
|
},
|
||||||
|
|
||||||
send_sms: function() {
|
send_sms: function() {
|
||||||
frappe.require("assets/erpnext/js/sms_manager.js");
|
|
||||||
var sms_man = new SMSManager(this.frm.doc);
|
var sms_man = new SMSManager(this.frm.doc);
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -912,79 +983,3 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
|
|||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
frappe.ui.form.on(cur_frm.doctype + " Item", "rate", function(frm, cdt, cdn) {
|
|
||||||
var item = frappe.get_doc(cdt, cdn);
|
|
||||||
frappe.model.round_floats_in(item, ["rate", "price_list_rate"]);
|
|
||||||
|
|
||||||
if(item.price_list_rate) {
|
|
||||||
item.discount_percentage = flt((1 - item.rate / item.price_list_rate) * 100.0, precision("discount_percentage", item));
|
|
||||||
} else {
|
|
||||||
item.discount_percentage = 0.0;
|
|
||||||
}
|
|
||||||
|
|
||||||
cur_frm.cscript.set_gross_profit(item);
|
|
||||||
cur_frm.cscript.calculate_taxes_and_totals();
|
|
||||||
})
|
|
||||||
|
|
||||||
frappe.ui.form.on(cur_frm.cscript.tax_table, "rate", function(frm, cdt, cdn) {
|
|
||||||
cur_frm.cscript.calculate_taxes_and_totals();
|
|
||||||
})
|
|
||||||
|
|
||||||
frappe.ui.form.on(cur_frm.cscript.tax_table, "tax_amount", function(frm, cdt, cdn) {
|
|
||||||
cur_frm.cscript.calculate_taxes_and_totals();
|
|
||||||
})
|
|
||||||
|
|
||||||
frappe.ui.form.on(cur_frm.cscript.tax_table, "row_id", function(frm, cdt, cdn) {
|
|
||||||
cur_frm.cscript.calculate_taxes_and_totals();
|
|
||||||
})
|
|
||||||
|
|
||||||
frappe.ui.form.on(cur_frm.cscript.tax_table, "included_in_print_rate", function(frm, cdt, cdn) {
|
|
||||||
cur_frm.cscript.set_dynamic_labels();
|
|
||||||
cur_frm.cscript.calculate_taxes_and_totals();
|
|
||||||
})
|
|
||||||
|
|
||||||
frappe.ui.form.on(cur_frm.doctype, "apply_discount_on", function(frm) {
|
|
||||||
if(frm.doc.additional_discount_percentage) {
|
|
||||||
frm.trigger("additional_discount_percentage");
|
|
||||||
} else {
|
|
||||||
cur_frm.cscript.calculate_taxes_and_totals();
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
frappe.ui.form.on(cur_frm.doctype, "additional_discount_percentage", function(frm) {
|
|
||||||
if (frm.via_discount_amount) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!frm.doc.apply_discount_on) {
|
|
||||||
frappe.msgprint(__("Please set 'Apply Additional Discount On'"));
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
frm.via_discount_percentage = true;
|
|
||||||
|
|
||||||
if(frm.doc.additional_discount_percentage && frm.doc.discount_amount) {
|
|
||||||
// Reset discount amount and net / grand total
|
|
||||||
frm.set_value("discount_amount", 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
var total = flt(frm.doc[frappe.model.scrub(frm.doc.apply_discount_on)]);
|
|
||||||
var discount_amount = flt(total*flt(frm.doc.additional_discount_percentage) / 100,
|
|
||||||
precision("discount_amount"));
|
|
||||||
|
|
||||||
frm.set_value("discount_amount", discount_amount);
|
|
||||||
delete frm.via_discount_percentage;
|
|
||||||
});
|
|
||||||
|
|
||||||
frappe.ui.form.on(cur_frm.doctype, "discount_amount", function(frm) {
|
|
||||||
frm.cscript.set_dynamic_labels();
|
|
||||||
|
|
||||||
if (!frm.via_discount_percentage) {
|
|
||||||
frm.via_discount_amount = true;
|
|
||||||
frm.set_value("additional_discount_percentage", 0);
|
|
||||||
delete frm.via_discount_amount;
|
|
||||||
}
|
|
||||||
|
|
||||||
frm.cscript.calculate_taxes_and_totals();
|
|
||||||
});
|
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
||||||
// License: GNU General Public License v3. See license.txt
|
// License: GNU General Public License v3. See license.txt
|
||||||
|
|
||||||
frappe.require("assets/erpnext/js/stock_grid_report.js");
|
frappe.require("assets/erpnext/js/stock_grid_report.js", function() {
|
||||||
|
|
||||||
erpnext.StockAnalytics = erpnext.StockGridReport.extend({
|
erpnext.StockAnalytics = erpnext.StockGridReport.extend({
|
||||||
init: function(wrapper, opts) {
|
init: function(wrapper, opts) {
|
||||||
var args = {
|
var args = {
|
||||||
@ -211,3 +210,5 @@ erpnext.StockAnalytics = erpnext.StockGridReport.extend({
|
|||||||
frappe.set_route("query-report", "Stock Ledger");
|
frappe.set_route("query-report", "Stock Ledger");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
||||||
// License: GNU General Public License v3. See license.txt
|
// License: GNU General Public License v3. See license.txt
|
||||||
|
|
||||||
frappe.require("assets/erpnext/js/utils.js");
|
|
||||||
|
|
||||||
frappe.ui.form.on_change("Installation Note", "customer",
|
frappe.ui.form.on_change("Installation Note", "customer",
|
||||||
function(frm) { erpnext.utils.get_party_details(frm); });
|
function(frm) { erpnext.utils.get_party_details(frm); });
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
||||||
// License: GNU General Public License v3. See license.txt
|
// License: GNU General Public License v3. See license.txt
|
||||||
|
|
||||||
frappe.require("assets/erpnext/js/sales_trends_filters.js");
|
frappe.require("assets/erpnext/js/sales_trends_filters.js", function() {
|
||||||
|
|
||||||
frappe.query_reports["Quotation Trends"] = {
|
frappe.query_reports["Quotation Trends"] = {
|
||||||
filters: get_filters()
|
filters: get_filters()
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
||||||
// License: GNU General Public License v3. See license.txt
|
// License: GNU General Public License v3. See license.txt
|
||||||
|
|
||||||
frappe.require("assets/erpnext/js/sales_trends_filters.js");
|
frappe.require("assets/erpnext/js/sales_trends_filters.js", function() {
|
||||||
|
|
||||||
frappe.query_reports["Sales Order Trends"] = {
|
frappe.query_reports["Sales Order Trends"] = {
|
||||||
filters: get_filters()
|
filters: get_filters()
|
||||||
}
|
}
|
||||||
|
});
|
@ -5,11 +5,10 @@
|
|||||||
cur_frm.cscript.tax_table = "Sales Taxes and Charges";
|
cur_frm.cscript.tax_table = "Sales Taxes and Charges";
|
||||||
{% include 'erpnext/accounts/doctype/sales_taxes_and_charges_template/sales_taxes_and_charges_template.js' %}
|
{% include 'erpnext/accounts/doctype/sales_taxes_and_charges_template/sales_taxes_and_charges_template.js' %}
|
||||||
|
|
||||||
frappe.provide("erpnext.selling");
|
|
||||||
frappe.require("assets/erpnext/js/controllers/transaction.js");
|
|
||||||
|
|
||||||
cur_frm.email_field = "contact_email";
|
cur_frm.email_field = "contact_email";
|
||||||
|
|
||||||
|
frappe.provide("erpnext.selling");
|
||||||
erpnext.selling.SellingController = erpnext.TransactionController.extend({
|
erpnext.selling.SellingController = erpnext.TransactionController.extend({
|
||||||
onload: function() {
|
onload: function() {
|
||||||
this._super();
|
this._super();
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
// License: GNU General Public License v3. See license.txt
|
// License: GNU General Public License v3. See license.txt
|
||||||
|
|
||||||
frappe.provide("erpnext.item");
|
frappe.provide("erpnext.item");
|
||||||
frappe.require('assets/js/item-dashboard.min.js');
|
|
||||||
|
|
||||||
frappe.ui.form.on("Item", {
|
frappe.ui.form.on("Item", {
|
||||||
onload: function(frm) {
|
onload: function(frm) {
|
||||||
@ -77,17 +76,6 @@ frappe.ui.form.on("Item", {
|
|||||||
|
|
||||||
erpnext.item.toggle_attributes(frm);
|
erpnext.item.toggle_attributes(frm);
|
||||||
|
|
||||||
frm.dashboard.show_heatmap = frm.doc.is_stock_item;
|
|
||||||
frm.dashboard.heatmap_message = __('This is based on stock movement. See {0} for details',
|
|
||||||
['<a href="#query-report/Stock Ledger">' + __('Stock Ledger') + '</a>']);
|
|
||||||
frm.dashboard.show_dashboard();
|
|
||||||
|
|
||||||
var section = frm.dashboard.add_section('<h5 style="margin-top: 0px;">Stock Levels</h5>');
|
|
||||||
erpnext.item.item_dashboard = new erpnext.stock.ItemDashboard({
|
|
||||||
parent: section,
|
|
||||||
item_code: frm.doc.name
|
|
||||||
});
|
|
||||||
erpnext.item.item_dashboard.refresh();
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -184,6 +172,20 @@ $.extend(erpnext.item, {
|
|||||||
frm.dashboard.reset();
|
frm.dashboard.reset();
|
||||||
if(frm.doc.__islocal)
|
if(frm.doc.__islocal)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
frm.dashboard.show_heatmap = frm.doc.is_stock_item;
|
||||||
|
frm.dashboard.heatmap_message = __('This is based on stock movement. See {0} for details',
|
||||||
|
['<a href="#query-report/Stock Ledger">' + __('Stock Ledger') + '</a>']);
|
||||||
|
frm.dashboard.show_dashboard();
|
||||||
|
|
||||||
|
frappe.require('assets/js/item-dashboard.min.js', function() {
|
||||||
|
var section = frm.dashboard.add_section('<h5 style="margin-top: 0px;">Stock Levels</h5>');
|
||||||
|
erpnext.item.item_dashboard = new erpnext.stock.ItemDashboard({
|
||||||
|
parent: section,
|
||||||
|
item_code: frm.doc.name
|
||||||
|
});
|
||||||
|
erpnext.item.item_dashboard.refresh();
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
edit_prices_button: function(frm) {
|
edit_prices_button: function(frm) {
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
|
|
||||||
|
|
||||||
frappe.provide("erpnext.stock");
|
frappe.provide("erpnext.stock");
|
||||||
frappe.require("assets/erpnext/js/controllers/stock_controller.js");
|
|
||||||
|
|
||||||
erpnext.stock.LandedCostVoucher = erpnext.stock.StockController.extend({
|
erpnext.stock.LandedCostVoucher = erpnext.stock.StockController.extend({
|
||||||
setup: function() {
|
setup: function() {
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
{% include 'erpnext/buying/doctype/purchase_common/purchase_common.js' %};
|
{% include 'erpnext/buying/doctype/purchase_common/purchase_common.js' %};
|
||||||
|
|
||||||
frappe.require("assets/erpnext/js/utils.js");
|
|
||||||
|
|
||||||
frappe.ui.form.on("Material Request Item", {
|
frappe.ui.form.on("Material Request Item", {
|
||||||
"qty": function(frm, doctype, name) {
|
"qty": function(frm, doctype, name) {
|
||||||
|
@ -1,10 +1,5 @@
|
|||||||
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors // License: GNU General Public License v3. See license.txt
|
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors // License: GNU General Public License v3. See license.txt
|
||||||
|
|
||||||
frappe.require([
|
|
||||||
"assets/erpnext/js/controllers/stock_controller.js",
|
|
||||||
"assets/erpnext/js/utils.js",
|
|
||||||
"assets/erpnext/js/utils/item_selector.js"]);
|
|
||||||
|
|
||||||
frappe.provide("erpnext.stock");
|
frappe.provide("erpnext.stock");
|
||||||
|
|
||||||
erpnext.stock.StockEntry = erpnext.stock.StockController.extend({
|
erpnext.stock.StockEntry = erpnext.stock.StockController.extend({
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
||||||
// License: GNU General Public License v3. See license.txt
|
// License: GNU General Public License v3. See license.txt
|
||||||
|
|
||||||
frappe.require("assets/erpnext/js/controllers/stock_controller.js");
|
|
||||||
frappe.require("assets/erpnext/js/utils.js");
|
|
||||||
frappe.provide("erpnext.stock");
|
frappe.provide("erpnext.stock");
|
||||||
|
|
||||||
frappe.ui.form.on("Stock Reconciliation", {
|
frappe.ui.form.on("Stock Reconciliation", {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
||||||
// License: GNU General Public License v3. See license.txt
|
// License: GNU General Public License v3. See license.txt
|
||||||
|
|
||||||
|
frappe.require("assets/erpnext/js/stock_analytics.js", function() {
|
||||||
frappe.pages['stock-analytics'].on_page_load = function(wrapper) {
|
frappe.pages['stock-analytics'].on_page_load = function(wrapper) {
|
||||||
frappe.ui.make_app_page({
|
frappe.ui.make_app_page({
|
||||||
parent: wrapper,
|
parent: wrapper,
|
||||||
@ -11,9 +11,6 @@ frappe.pages['stock-analytics'].on_page_load = function(wrapper) {
|
|||||||
|
|
||||||
new erpnext.StockAnalytics(wrapper);
|
new erpnext.StockAnalytics(wrapper);
|
||||||
|
|
||||||
|
|
||||||
frappe.breadcrumbs.add("Stock")
|
frappe.breadcrumbs.add("Stock")
|
||||||
|
|
||||||
};
|
};
|
||||||
|
});
|
||||||
frappe.require("assets/erpnext/js/stock_analytics.js");
|
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
frappe.require('assets/js/item-dashboard.min.js');
|
|
||||||
|
|
||||||
frappe.pages['stock-balance'].on_page_load = function(wrapper) {
|
frappe.pages['stock-balance'].on_page_load = function(wrapper) {
|
||||||
var page = frappe.ui.make_app_page({
|
var page = frappe.ui.make_app_page({
|
||||||
parent: wrapper,
|
parent: wrapper,
|
||||||
@ -52,6 +50,7 @@ frappe.pages['stock-balance'].on_page_load = function(wrapper) {
|
|||||||
|
|
||||||
page.sort_selector.wrapper.css({'margin-right': '15px', 'margin-top': '4px'});
|
page.sort_selector.wrapper.css({'margin-right': '15px', 'margin-top': '4px'});
|
||||||
|
|
||||||
|
frappe.require('assets/js/item-dashboard.min.js', function() {
|
||||||
page.item_dashboard = new erpnext.stock.ItemDashboard({
|
page.item_dashboard = new erpnext.stock.ItemDashboard({
|
||||||
parent: page.main,
|
parent: page.main,
|
||||||
})
|
})
|
||||||
@ -79,5 +78,7 @@ frappe.pages['stock-balance'].on_page_load = function(wrapper) {
|
|||||||
|
|
||||||
setup_click('Item');
|
setup_click('Item');
|
||||||
setup_click('Warehouse');
|
setup_click('Warehouse');
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
@ -1,8 +1,9 @@
|
|||||||
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
||||||
// License: GNU General Public License v3. See license.txt
|
// License: GNU General Public License v3. See license.txt
|
||||||
|
|
||||||
frappe.require("assets/erpnext/js/sales_trends_filters.js");
|
frappe.require("assets/erpnext/js/sales_trends_filters.js", function() {
|
||||||
|
|
||||||
frappe.query_reports["Delivery Note Trends"] = {
|
frappe.query_reports["Delivery Note Trends"] = {
|
||||||
filters: get_filters()
|
filters: get_filters()
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
||||||
// License: GNU General Public License v3. See license.txt
|
// License: GNU General Public License v3. See license.txt
|
||||||
|
|
||||||
frappe.require("assets/erpnext/js/purchase_trends_filters.js");
|
frappe.require("assets/erpnext/js/purchase_trends_filters.js", function() {
|
||||||
|
|
||||||
frappe.query_reports["Purchase Receipt Trends"] = {
|
frappe.query_reports["Purchase Receipt Trends"] = {
|
||||||
filters: get_filters()
|
filters: get_filters()
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
// License: GNU General Public License v3. See license.txt
|
// License: GNU General Public License v3. See license.txt
|
||||||
|
|
||||||
frappe.provide("erpnext.support");
|
frappe.provide("erpnext.support");
|
||||||
frappe.require("assets/erpnext/js/utils.js");
|
|
||||||
|
|
||||||
frappe.ui.form.on_change("Maintenance Visit", "customer", function(frm) {
|
frappe.ui.form.on_change("Maintenance Visit", "customer", function(frm) {
|
||||||
erpnext.utils.get_party_details(frm) });
|
erpnext.utils.get_party_details(frm) });
|
||||||
|
@ -2,7 +2,8 @@
|
|||||||
// License: GNU General Public License v3. See license.txt
|
// License: GNU General Public License v3. See license.txt
|
||||||
|
|
||||||
frappe.provide("erpnext.support");
|
frappe.provide("erpnext.support");
|
||||||
frappe.require("assets/erpnext/js/utils.js");
|
|
||||||
|
{% include "erpnext/public/js/utils.js" %}
|
||||||
|
|
||||||
frappe.ui.form.on("Warranty Claim", {
|
frappe.ui.form.on("Warranty Claim", {
|
||||||
customer: function(frm) {
|
customer: function(frm) {
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-6 col-xs-8">
|
<div class="col-sm-6 col-xs-8">
|
||||||
{% if(doc.warehouse) {
|
{% if(doc.warehouse) {
|
||||||
var label_class = "label-default",
|
var color = "grey",
|
||||||
title = "Warehouse",
|
title = "Warehouse",
|
||||||
actual_qty = (frm.doc.doctype==="Sales Order"
|
actual_qty = (frm.doc.doctype==="Sales Order"
|
||||||
? doc.projected_qty : doc.actual_qty);
|
? doc.projected_qty : doc.actual_qty);
|
||||||
@ -21,16 +21,16 @@
|
|||||||
&& in_list(["Sales Order Item", "Delivery Note Item"], doc.doctype)) {
|
&& in_list(["Sales Order Item", "Delivery Note Item"], doc.doctype)) {
|
||||||
if(actual_qty != undefined) {
|
if(actual_qty != undefined) {
|
||||||
if(actual_qty >= doc.qty) {
|
if(actual_qty >= doc.qty) {
|
||||||
var label_class = "label-success";
|
var color = "green";
|
||||||
var title = "In Stock"
|
var title = "In Stock"
|
||||||
} else {
|
} else {
|
||||||
var label_class = "label-danger";
|
var color = "red";
|
||||||
var title = "Not In Stock"
|
var title = "Not In Stock"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} %}
|
} %}
|
||||||
<span class="pull-right" title="{%= title %}">
|
<span class="pull-right" title="{%= title %}" style="margin-left: 10px;">
|
||||||
<span class="label {%= label_class %}">
|
<span class="indicator {{ color }}">
|
||||||
{%= doc.warehouse %}
|
{%= doc.warehouse %}
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
|
@ -16,21 +16,27 @@
|
|||||||
{% if(doc.item_name != doc.item_code) { %}
|
{% if(doc.item_name != doc.item_code) { %}
|
||||||
<br>{%= doc.item_name %}{% } %}
|
<br>{%= doc.item_name %}{% } %}
|
||||||
{% include "templates/form_grid/includes/visible_cols.html" %}
|
{% include "templates/form_grid/includes/visible_cols.html" %}
|
||||||
{% if(frm.doc.docstatus==0 && doc.s_warehouse && doc.actual_qty < doc.qty) { %}
|
|
||||||
<span class="text-danger small" style="margin-left: 15px;">
|
|
||||||
Not in Stock
|
|
||||||
</span>
|
|
||||||
{% } %}
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- warehouse -->
|
<!-- warehouse -->
|
||||||
<div class="col-sm-3 col-xs-4">
|
<div class="col-sm-3 col-xs-4">
|
||||||
{% if(doc.s_warehouse) { %}
|
{% if(doc.s_warehouse) {
|
||||||
<span class="label label-default grid-label" title="{% __("Source" )%}">
|
if(frm.doc.docstatus==0) {
|
||||||
{%= doc.s_warehouse || "" %}</span>
|
var color = (doc.s_warehouse && doc.actual_qty < doc.qty) ? "red" : "green";
|
||||||
{% } %}
|
var title = color === "red" ? __("Not in Stock") : __("In Stock");
|
||||||
{% if(doc.t_warehouse) { %}<span class="label label-primary grid-label" title="{% __("Target" )%}">
|
} else {
|
||||||
{%= doc.t_warehouse || "" %}</span>{% } %}
|
var color = "grey";
|
||||||
|
var title = __("Source");
|
||||||
|
}
|
||||||
|
%}
|
||||||
|
<span class="indicator {{ color }}" title="{{ title }}">
|
||||||
|
{%= doc.s_warehouse %}</span>
|
||||||
|
{% }; %}
|
||||||
|
{% if(doc.t_warehouse) { %}
|
||||||
|
<div><span class="indicator {{ doc.docstatus==1 ? "blue" : "grey" }}" title="{{ __("Target" ) }}">
|
||||||
|
{%= doc.t_warehouse %}</span>
|
||||||
|
</div>
|
||||||
|
{% }; %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- qty -->
|
<!-- qty -->
|
||||||
|
Loading…
x
Reference in New Issue
Block a user