From 41236ed0e5a73ed3c767cd9812ddaf7cc6b51e90 Mon Sep 17 00:00:00 2001 From: Saif Ur Rehman Date: Wed, 12 Dec 2018 05:12:20 +0500 Subject: [PATCH 001/169] feat: Customer Ledger Summary report --- .../customer_ledger_summary/__init__.py | 0 .../customer_ledger_summary.js | 97 +++++++ .../customer_ledger_summary.json | 26 ++ .../customer_ledger_summary.py | 264 ++++++++++++++++++ 4 files changed, 387 insertions(+) create mode 100644 erpnext/accounts/report/customer_ledger_summary/__init__.py create mode 100644 erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.js create mode 100644 erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.json create mode 100644 erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.py diff --git a/erpnext/accounts/report/customer_ledger_summary/__init__.py b/erpnext/accounts/report/customer_ledger_summary/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.js b/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.js new file mode 100644 index 00000000000..105977b6e4d --- /dev/null +++ b/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.js @@ -0,0 +1,97 @@ +// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors +// For license information, please see license.txt +/* eslint-disable */ + +frappe.query_reports["Customer Ledger Summary"] = { + "filters": [ + { + "fieldname":"company", + "label": __("Company"), + "fieldtype": "Link", + "options": "Company", + "default": frappe.defaults.get_user_default("Company") + }, + { + "fieldname":"from_date", + "label": __("From Date"), + "fieldtype": "Date", + "default": frappe.datetime.add_months(frappe.datetime.get_today(), -1), + "reqd": 1, + "width": "60px" + }, + { + "fieldname":"to_date", + "label": __("To Date"), + "fieldtype": "Date", + "default": frappe.datetime.get_today(), + "reqd": 1, + "width": "60px" + }, + { + "fieldname":"finance_book", + "label": __("Finance Book"), + "fieldtype": "Link", + "options": "Finance Book" + }, + { + "fieldname":"party", + "label": __("Customer"), + "fieldtype": "Link", + "options": "Customer", + on_change: () => { + var customer = frappe.query_report.get_filter_value('customer'); + if (customer) { + frappe.db.get_value('Customer', customer, ["tax_id", "customer_name", "credit_limit", "payment_terms"], function(value) { + frappe.query_report.set_filter_value('tax_id', value["tax_id"]); + frappe.query_report.set_filter_value('customer_name', value["customer_name"]); + }); + } else { + frappe.query_report.set_filter_value('tax_id', ""); + frappe.query_report.set_filter_value('customer_name', ""); + } + } + }, + { + "fieldname":"customer_group", + "label": __("Customer Group"), + "fieldtype": "Link", + "options": "Customer Group" + }, + { + "fieldname":"payment_terms_template", + "label": __("Payment Terms Template"), + "fieldtype": "Link", + "options": "Payment Terms Template" + }, + { + "fieldname":"territory", + "label": __("Territory"), + "fieldtype": "Link", + "options": "Territory" + }, + { + "fieldname":"sales_partner", + "label": __("Sales Partner"), + "fieldtype": "Link", + "options": "Sales Partner" + }, + { + "fieldname":"sales_person", + "label": __("Sales Person"), + "fieldtype": "Link", + "options": "Sales Person" + }, + { + "fieldname":"tax_id", + "label": __("Tax Id"), + "fieldtype": "Data", + "hidden": 1 + }, + { + "fieldname":"customer_name", + "label": __("Customer Name"), + "fieldtype": "Data", + "hidden": 1 + } + ] +}; diff --git a/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.json b/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.json new file mode 100644 index 00000000000..91e4e197d3a --- /dev/null +++ b/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.json @@ -0,0 +1,26 @@ +{ + "add_total_row": 1, + "creation": "2018-12-11 00:58:19.078506", + "disabled": 0, + "docstatus": 0, + "doctype": "Report", + "idx": 0, + "is_standard": "Yes", + "modified": "2018-12-11 00:59:21.708343", + "modified_by": "Administrator", + "module": "Accounts", + "name": "Customer Ledger Summary", + "owner": "Administrator", + "prepared_report": 0, + "ref_doctype": "Sales Invoice", + "report_name": "Customer Ledger Summary", + "report_type": "Script Report", + "roles": [ + { + "role": "Accounts Manager" + }, + { + "role": "Accounts User" + } + ] +} \ No newline at end of file diff --git a/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.py b/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.py new file mode 100644 index 00000000000..0b590db49dc --- /dev/null +++ b/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.py @@ -0,0 +1,264 @@ +# Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors +# For license information, please see license.txt + +from __future__ import unicode_literals +import frappe +import erpnext +from frappe import _, scrub +from frappe.utils import getdate, nowdate, flt, cint + +class PartyLedgerSummaryReport(object): + def __init__(self, filters=None): + self.filters = frappe._dict(filters or {}) + self.filters.from_date = getdate(self.filters.from_date or nowdate()) + self.filters.to_date = getdate(self.filters.to_date or nowdate()) + + def run(self, args): + if self.filters.from_date > self.filters.to_date: + frappe.throw(_("From Date must be before To Date")) + + self.filters.party_type = args.get("party_type") + self.party_naming_by = frappe.db.get_value(args.get("naming_by")[0], None, args.get("naming_by")[1]) + + columns = self.get_columns() + data = self.get_data() + return columns, data + + def get_columns(self): + columns = [{ + "label": _(self.filters.party_type), + "fieldtype": "Link", + "fieldname": "party", + "options": self.filters.party_type, + "width": 200 + }] + + if self.party_naming_by == "Naming Series": + columns.append({ + "label": _(self.filters.party_type + "Name"), + "fieldtype": "Data", + "fieldname": "party_name", + "width": 110 + }) + + credit_or_debit_note = "Credit Note" if self.filters.party_type == "Customer" else "Debit Note" + columns += [ + { + "label": _("Opening Balance"), + "fieldname": "opening_balance", + "fieldtype": "Currency", + "width": 120 + }, + { + "label": _("Invoiced Amount"), + "fieldname": "invoiced_amount", + "fieldtype": "Currency", + "width": 120 + }, + { + "label": _("Paid Amount"), + "fieldname": "paid_amount", + "fieldtype": "Currency", + "width": 120 + }, + { + "label": _(credit_or_debit_note), + "fieldname": "return_amount", + "fieldtype": "Currency", + "width": 120 + }, + { + "label": _("Write Off Amount"), + "fieldname": "write_off_amount", + "fieldtype": "Currency", + "width": 120 + }, + { + "label": _("Closing Balance"), + "fieldname": "closing_balance", + "fieldtype": "Currency", + "width": 120 + } + ] + + return columns + + def get_data(self): + if not self.filters.get("company"): + self.filters["company"] = frappe.db.get_single_value('Global Defaults', 'default_company') + + credit_or_debit_note = "Credit Note" if self.filters.party_type == "Customer" else "Debit Note" + invoice_dr_or_cr = "debit" if self.filters.party_type == "Customer" else "credit" + reverse_dr_or_cr = "credit" if self.filters.party_type == "Customer" else "debit" + + self.get_gl_entries() + self.get_return_invoices() + self.get_party_write_off_amounts() + + self.party_data = frappe._dict({}) + for gle in self.gl_entries: + self.party_data.setdefault(gle.party, frappe._dict({ + "party": gle.party, + "party_name": "", # TODO add party_name + "opening_balance": 0, + "invoiced_amount": 0, + "paid_amount": -self.party_write_off_amounts.get(gle.party, 0), + "return_amount": 0, + "write_off_amount": self.party_write_off_amounts.get(gle.party, 0), + "closing_balance": 0 + })) + + amount = gle.get(invoice_dr_or_cr) - gle.get(reverse_dr_or_cr) + self.party_data[gle.party].closing_balance += amount + + if gle.posting_date < self.filters.from_date: + self.party_data[gle.party].opening_balance += amount + else: + if amount > 0: + self.party_data[gle.party].invoiced_amount += amount + elif gle.voucher_no in self.return_invoices: + self.party_data[gle.party].return_amount -= amount + else: + self.party_data[gle.party].paid_amount -= amount + + return [d for d in self.party_data.values() if d.opening_balance or d.invoiced_amount or d.paid_amount + or d.return_amount or d.write_off_amount or d.closing_amount] + + def get_gl_entries(self): + conditions = self.prepare_conditions() + + self.gl_entries = frappe.db.sql(""" + select + posting_date, party, voucher_type, voucher_no, against_voucher_type, against_voucher, debit, credit + from + `tabGL Entry` + where + docstatus < 2 and party_type=%(party_type)s and ifnull(party, '') != '' and posting_date <= %(to_date)s + {0} + order by posting_date""".format(conditions), self.filters, as_dict=True) + + def prepare_conditions(self): + conditions = [""] + + if self.filters.company: + conditions.append("company=%(company)s") + + self.filters.company_finance_book = erpnext.get_default_finance_book(self.filters.company) + + if not self.filters.finance_book or (self.filters.finance_book == self.filters.company_finance_book): + conditions.append("ifnull(finance_book,'') in (%(company_finance_book)s, '')") + elif self.filters.finance_book: + conditions.append("ifnull(finance_book,'') = %(finance_book)s") + + if self.filters.get("party"): + conditions.append("party=%(party)s") + + if self.filters.party_type == "Customer": + if self.filters.get("customer_group"): + lft, rgt = frappe.db.get_value("Customer Group", + self.filters.get("customer_group"), ["lft", "rgt"]) + + conditions.append("""party in (select name from tabCustomer + where exists(select name from `tabCustomer Group` where lft >= {0} and rgt <= {1} + and name=tabCustomer.customer_group))""".format(lft, rgt)) + + if self.filters.get("territory"): + lft, rgt = frappe.db.get_value("Territory", + self.filters.get("territory"), ["lft", "rgt"]) + + conditions.append("""party in (select name from tabCustomer + where exists(select name from `tabTerritory` where lft >= {0} and rgt <= {1} + and name=tabCustomer.territory))""".format(lft, rgt)) + + if self.filters.get("payment_terms_template"): + conditions.append("party in (select name from tabCustomer where payment_terms=%(payment_terms_template)s)") + + if self.filters.get("sales_partner"): + conditions.append("party in (select name from tabCustomer where default_sales_partner=%(sales_partner)s)") + + if self.filters.get("sales_person"): + lft, rgt = frappe.db.get_value("Sales Person", + self.filters.get("sales_person"), ["lft", "rgt"]) + + conditions.append("""party in (select parent from `tabSales Team` + where parenttype = 'Customer' and exists(select name from `tabSales Person` + where lft >= {0} and rgt <= {1} and name=`tabSales Team`.sales_person))""".format(lft, rgt)) + + if self.filters.party_type == "Supplier": + if self.filters.get("supplier_group"): + conditions.append("""party in (select name from tabSupplier + where supplier_group=%(supplier_group)s)""") + + return " and ".join(conditions) + + def get_return_invoices(self): + doctype = "Sales Invoice" if self.filters.party_type == "Customer" else "Purchase Invoice" + self.return_invoices = [d.name for d in frappe.get_all(doctype, filters={"is_return": 1, "docstatus": 1, + "posting_date": ["between", [self.filters.from_date, self.filters.to_date]]})] + + def get_party_write_off_amounts(self): + conditions = self.prepare_conditions() + income_or_expense = "Expense Account" if self.filters.party_type == "Customer" else "Income Account" + invoice_dr_or_cr = "debit" if self.filters.party_type == "Customer" else "credit" + reverse_dr_or_cr = "credit" if self.filters.party_type == "Customer" else "debit" + round_off_account = frappe.get_cached_value('Company', self.filters.company, "round_off_account") + + gl_entries = frappe.db.sql(""" + select + posting_date, account, party, voucher_type, voucher_no, debit, credit + from + `tabGL Entry` + where + docstatus < 2 + and (voucher_type, voucher_no) in ( + select voucher_type, voucher_no from `tabGL Entry` gle, `tabAccount` acc + where acc.name = gle.account and acc.account_type = '{income_or_expense}' + and gle.posting_date between %(from_date)s and %(to_date)s and gle.docstatus < 2 + ) and (voucher_type, voucher_no) in ( + select voucher_type, voucher_no from `tabGL Entry` gle + where gle.party_type=%(party_type)s and ifnull(party, '') != '' + and gle.posting_date between %(from_date)s and %(to_date)s and gle.docstatus < 2 {conditions} + ) + order by posting_date + """.format(conditions=conditions, income_or_expense=income_or_expense), self.filters, as_dict=True) + + self.party_write_off_amounts = {} + write_off_voucher_entries = {} + for gle in gl_entries: + write_off_voucher_entries.setdefault((gle.voucher_type, gle.voucher_no), []) + write_off_voucher_entries[(gle.voucher_type, gle.voucher_no)].append(gle) + + for voucher, voucher_gl_entries in write_off_voucher_entries.iteritems(): + parties = {} + write_offs = {} + has_irrelevant_entry = False + + for gle in voucher_gl_entries: + if gle.account == round_off_account: + continue + elif gle.party: + parties.setdefault(gle.party, 0) + parties[gle.party] += gle.get(reverse_dr_or_cr) - gle.get(invoice_dr_or_cr) + elif frappe.get_cached_value("Account", gle.account, "account_type") == income_or_expense: + write_offs.setdefault(gle.account, 0) + write_offs[gle.account] += gle.get(invoice_dr_or_cr) - gle.get(reverse_dr_or_cr) + else: + has_irrelevant_entry = True + + if parties and write_offs: + if len(parties) == 1: + for account, amount in write_offs.iteritems(): + party = parties.keys()[0] + self.party_write_off_amounts.setdefault(party, 0) + self.party_write_off_amounts[party] += amount + elif len(write_offs) == 1 and not has_irrelevant_entry: + for party, amount in parties.iteritems(): + self.party_write_off_amounts.setdefault(party, 0) + self.party_write_off_amounts[party] += amount + +def execute(filters=None): + args = { + "party_type": "Customer", + "naming_by": ["Selling Settings", "cust_master_name"], + } + return PartyLedgerSummaryReport(filters).run(args) \ No newline at end of file From b07d108beeb361309df1cb11d3be831e5f24841c Mon Sep 17 00:00:00 2001 From: Saif Ur Rehman Date: Wed, 12 Dec 2018 05:45:49 +0500 Subject: [PATCH 002/169] feat: Supplier Ledger Summary --- .../customer_ledger_summary.js | 6 +- .../customer_ledger_summary.py | 18 +++- .../supplier_ledger_summary/__init__.py | 0 .../supplier_ledger_summary.js | 97 +++++++++++++++++++ .../supplier_ledger_summary.json | 27 ++++++ .../supplier_ledger_summary.py | 13 +++ 6 files changed, 156 insertions(+), 5 deletions(-) create mode 100644 erpnext/accounts/report/supplier_ledger_summary/__init__.py create mode 100644 erpnext/accounts/report/supplier_ledger_summary/supplier_ledger_summary.js create mode 100644 erpnext/accounts/report/supplier_ledger_summary/supplier_ledger_summary.json create mode 100644 erpnext/accounts/report/supplier_ledger_summary/supplier_ledger_summary.py diff --git a/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.js b/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.js index 105977b6e4d..a1236316638 100644 --- a/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.js +++ b/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.js @@ -39,9 +39,9 @@ frappe.query_reports["Customer Ledger Summary"] = { "fieldtype": "Link", "options": "Customer", on_change: () => { - var customer = frappe.query_report.get_filter_value('customer'); - if (customer) { - frappe.db.get_value('Customer', customer, ["tax_id", "customer_name", "credit_limit", "payment_terms"], function(value) { + var party = frappe.query_report.get_filter_value('party'); + if (party) { + frappe.db.get_value('Customer', party, ["tax_id", "customer_name"], function(value) { frappe.query_report.set_filter_value('tax_id', value["tax_id"]); frappe.query_report.set_filter_value('customer_name', value["customer_name"]); }); diff --git a/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.py b/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.py index 0b590db49dc..63a3498f004 100644 --- a/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.py +++ b/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.py @@ -47,37 +47,50 @@ class PartyLedgerSummaryReport(object): "label": _("Opening Balance"), "fieldname": "opening_balance", "fieldtype": "Currency", + "options": "currency", "width": 120 }, { "label": _("Invoiced Amount"), "fieldname": "invoiced_amount", "fieldtype": "Currency", + "options": "currency", "width": 120 }, { "label": _("Paid Amount"), "fieldname": "paid_amount", "fieldtype": "Currency", + "options": "currency", "width": 120 }, { "label": _(credit_or_debit_note), "fieldname": "return_amount", "fieldtype": "Currency", + "options": "currency", "width": 120 }, { "label": _("Write Off Amount"), "fieldname": "write_off_amount", "fieldtype": "Currency", + "options": "currency", "width": 120 }, { "label": _("Closing Balance"), "fieldname": "closing_balance", "fieldtype": "Currency", + "options": "currency", "width": 120 + }, + { + "label": _("Currency"), + "fieldname": "currency", + "fieldtype": "Link", + "options": "Currency", + "width": 50 } ] @@ -87,7 +100,7 @@ class PartyLedgerSummaryReport(object): if not self.filters.get("company"): self.filters["company"] = frappe.db.get_single_value('Global Defaults', 'default_company') - credit_or_debit_note = "Credit Note" if self.filters.party_type == "Customer" else "Debit Note" + company_currency = frappe.get_cached_value('Company', self.filters.get("company"), "default_currency") invoice_dr_or_cr = "debit" if self.filters.party_type == "Customer" else "credit" reverse_dr_or_cr = "credit" if self.filters.party_type == "Customer" else "debit" @@ -105,7 +118,8 @@ class PartyLedgerSummaryReport(object): "paid_amount": -self.party_write_off_amounts.get(gle.party, 0), "return_amount": 0, "write_off_amount": self.party_write_off_amounts.get(gle.party, 0), - "closing_balance": 0 + "closing_balance": 0, + "currency": company_currency })) amount = gle.get(invoice_dr_or_cr) - gle.get(reverse_dr_or_cr) diff --git a/erpnext/accounts/report/supplier_ledger_summary/__init__.py b/erpnext/accounts/report/supplier_ledger_summary/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/erpnext/accounts/report/supplier_ledger_summary/supplier_ledger_summary.js b/erpnext/accounts/report/supplier_ledger_summary/supplier_ledger_summary.js new file mode 100644 index 00000000000..6fd16f20908 --- /dev/null +++ b/erpnext/accounts/report/supplier_ledger_summary/supplier_ledger_summary.js @@ -0,0 +1,97 @@ +// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors +// For license information, please see license.txt +/* eslint-disable */ + +frappe.query_reports["Supplier Ledger Summary"] = { + "filters": [ + { + "fieldname":"company", + "label": __("Company"), + "fieldtype": "Link", + "options": "Company", + "default": frappe.defaults.get_user_default("Company") + }, + { + "fieldname":"from_date", + "label": __("From Date"), + "fieldtype": "Date", + "default": frappe.datetime.add_months(frappe.datetime.get_today(), -1), + "reqd": 1, + "width": "60px" + }, + { + "fieldname":"to_date", + "label": __("To Date"), + "fieldtype": "Date", + "default": frappe.datetime.get_today(), + "reqd": 1, + "width": "60px" + }, + { + "fieldname":"finance_book", + "label": __("Finance Book"), + "fieldtype": "Link", + "options": "Finance Book" + }, + { + "fieldname":"party", + "label": __("Customer"), + "fieldtype": "Link", + "options": "Customer", + on_change: () => { + var party = frappe.query_report.get_filter_value('party'); + if (party) { + frappe.db.get_value('Supplier', party, ["tax_id", "supplier_name"], function(value) { + frappe.query_report.set_filter_value('tax_id', value["tax_id"]); + frappe.query_report.set_filter_value('supplier_name', value["supplier_name"]); + }); + } else { + frappe.query_report.set_filter_value('tax_id', ""); + frappe.query_report.set_filter_value('supplier_name', ""); + } + } + }, + { + "fieldname":"supplier_group", + "label": __("Supplier Group"), + "fieldtype": "Link", + "options": "Supplier Group" + }, + { + "fieldname":"payment_terms_template", + "label": __("Payment Terms Template"), + "fieldtype": "Link", + "options": "Payment Terms Template" + }, + { + "fieldname":"territory", + "label": __("Territory"), + "fieldtype": "Link", + "options": "Territory" + }, + { + "fieldname":"sales_partner", + "label": __("Sales Partner"), + "fieldtype": "Link", + "options": "Sales Partner" + }, + { + "fieldname":"sales_person", + "label": __("Sales Person"), + "fieldtype": "Link", + "options": "Sales Person" + }, + { + "fieldname":"tax_id", + "label": __("Tax Id"), + "fieldtype": "Data", + "hidden": 1 + }, + { + "fieldname":"supplier_name", + "label": __("Supplier Name"), + "fieldtype": "Data", + "hidden": 1 + } + ] +}; diff --git a/erpnext/accounts/report/supplier_ledger_summary/supplier_ledger_summary.json b/erpnext/accounts/report/supplier_ledger_summary/supplier_ledger_summary.json new file mode 100644 index 00000000000..eb3b4123e23 --- /dev/null +++ b/erpnext/accounts/report/supplier_ledger_summary/supplier_ledger_summary.json @@ -0,0 +1,27 @@ +{ + "add_total_row": 1, + "creation": "2018-12-12 05:10:02.987274", + "disabled": 0, + "docstatus": 0, + "doctype": "Report", + "idx": 0, + "is_standard": "Yes", + "letter_head": "Capital Traders", + "modified": "2018-12-12 05:10:02.987274", + "modified_by": "Administrator", + "module": "Accounts", + "name": "Supplier Ledger Summary", + "owner": "Administrator", + "prepared_report": 0, + "ref_doctype": "Purchase Invoice", + "report_name": "Supplier Ledger Summary", + "report_type": "Script Report", + "roles": [ + { + "role": "Accounts Manager" + }, + { + "role": "Accounts User" + } + ] +} \ No newline at end of file diff --git a/erpnext/accounts/report/supplier_ledger_summary/supplier_ledger_summary.py b/erpnext/accounts/report/supplier_ledger_summary/supplier_ledger_summary.py new file mode 100644 index 00000000000..d2c23ee4e78 --- /dev/null +++ b/erpnext/accounts/report/supplier_ledger_summary/supplier_ledger_summary.py @@ -0,0 +1,13 @@ +# Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors +# For license information, please see license.txt + +from __future__ import unicode_literals +import frappe +from erpnext.accounts.report.customer_ledger_summary.customer_ledger_summary import PartyLedgerSummaryReport + +def execute(filters=None): + args = { + "party_type": "Supplier", + "naming_by": ["Buying Settings", "supp_master_name"], + } + return PartyLedgerSummaryReport(filters).run(args) \ No newline at end of file From b53231595d5649ed9fb3d45853ab46ae73240e52 Mon Sep 17 00:00:00 2001 From: Saif Ur Rehman Date: Wed, 12 Dec 2018 15:46:50 +0500 Subject: [PATCH 003/169] Using same filter for Sales Person from Accounts Receivable Added Customer/Supplier Ledger Summary in Accounts Module page --- .../customer_ledger_summary.py | 11 +++-- erpnext/config/accounts.py | 48 ++++++++++++------- 2 files changed, 38 insertions(+), 21 deletions(-) diff --git a/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.py b/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.py index 63a3498f004..2b228fd6b6f 100644 --- a/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.py +++ b/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.py @@ -194,9 +194,14 @@ class PartyLedgerSummaryReport(object): lft, rgt = frappe.db.get_value("Sales Person", self.filters.get("sales_person"), ["lft", "rgt"]) - conditions.append("""party in (select parent from `tabSales Team` - where parenttype = 'Customer' and exists(select name from `tabSales Person` - where lft >= {0} and rgt <= {1} and name=`tabSales Team`.sales_person))""".format(lft, rgt)) + conditions.append("""exists(select name from `tabSales Team` steam where + steam.sales_person in (select name from `tabSales Person` where lft >= {0} and rgt <= {1}) + and ((steam.parent = voucher_no and steam.parenttype = voucher_type) + or (steam.parent = against_voucher and steam.parenttype = against_voucher_type) + or (steam.parent = party and steam.parenttype = 'Customer')))""".format(lft, rgt)) + #conditions.append("""party in (select parent from `tabSales Team` + # where parenttype = 'Customer' and exists(select name from `tabSales Person` + # where lft >= {0} and rgt <= {1} and name=`tabSales Team`.sales_person))""".format(lft, rgt)) if self.filters.party_type == "Supplier": if self.filters.get("supplier_group"): diff --git a/erpnext/config/accounts.py b/erpnext/config/accounts.py index 15996c3a44b..bfa71624008 100644 --- a/erpnext/config/accounts.py +++ b/erpnext/config/accounts.py @@ -351,6 +351,36 @@ def get_data(): "is_query_report": True, "doctype": "Sales Invoice" }, + { + "type": "report", + "name": "Item-wise Sales Register", + "is_query_report": True, + "doctype": "Sales Invoice" + }, + { + "type": "report", + "name": "Item-wise Purchase Register", + "is_query_report": True, + "doctype": "Purchase Invoice" + }, + { + "type": "report", + "name": "Profitability Analysis", + "doctype": "GL Entry", + "is_query_report": True, + }, + { + "type": "report", + "name": "Customer Ledger Summary", + "doctype": "Sales Invoice", + "is_query_report": True, + }, + { + "type": "report", + "name": "Supplier Ledger Summary", + "doctype": "Sales Invoice", + "is_query_report": True, + } ] }, { @@ -363,12 +393,6 @@ def get_data(): "doctype": "GL Entry", "is_query_report": True, }, - { - "type": "report", - "name": "Profitability Analysis", - "doctype": "GL Entry", - "is_query_report": True, - }, { "type": "report", "name": "Payment Period Based On Invoice Date", @@ -381,18 +405,6 @@ def get_data(): "is_query_report": True, "doctype": "Sales Invoice" }, - { - "type": "report", - "name": "Item-wise Sales Register", - "is_query_report": True, - "doctype": "Sales Invoice" - }, - { - "type": "report", - "name": "Item-wise Purchase Register", - "is_query_report": True, - "doctype": "Purchase Invoice" - }, { "type": "report", "name": "Accounts Receivable Summary", From f6f503a1f658cabe031c9b7a62253844e862cfc3 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Wed, 19 Dec 2018 15:06:44 +0530 Subject: [PATCH 004/169] [Fix] Is fixed asset checkbox not checked if user duplicate the existing invoice --- erpnext/assets/doctype/asset/test_asset.py | 12 +++++++++++- erpnext/controllers/accounts_controller.py | 3 +++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/erpnext/assets/doctype/asset/test_asset.py b/erpnext/assets/doctype/asset/test_asset.py index 76c46cff7ac..de164762ff6 100644 --- a/erpnext/assets/doctype/asset/test_asset.py +++ b/erpnext/assets/doctype/asset/test_asset.py @@ -49,7 +49,17 @@ class TestAsset(unittest.TestCase): self.assertFalse(frappe.db.get_value("GL Entry", {"voucher_type": "Purchase Invoice", "voucher_no": pi.name})) - + + def test_is_fixed_asset_set(self): + doc = frappe.new_doc('Purchase Invoice') + doc.supplier = '_Test Supplier' + doc.append('items', { + 'item_code': 'Macbook Pro', + 'qty': 1 + }) + + doc.set_missing_values() + self.assertEquals(doc.items[0].is_fixed_asset, 1) def test_schedule_for_straight_line_method(self): asset = frappe.get_doc("Asset", "Macbook Pro 1") diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index 68f4f731476..97536e7e82d 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -218,6 +218,9 @@ class AccountsController(TransactionBase): if stock_qty != len(get_serial_nos(item.get('serial_no'))): item.set(fieldname, value) + if self.doctype in ["Purchase Invoice", "Sales Invoice"] and item.meta.get_field('is_fixed_asset'): + item.set('is_fixed_asset', ret.get('is_fixed_asset', 0)) + if ret.get("pricing_rule"): # if user changed the discount percentage then set user's discount percentage ? item.set("discount_percentage", ret.get("discount_percentage")) From e2762df90be03f4829b23c827f2ba9a9b06804df Mon Sep 17 00:00:00 2001 From: scmmishra Date: Tue, 8 Jan 2019 17:38:28 +0530 Subject: [PATCH 005/169] Fix: Naming series not reflecting in leave application --- erpnext/hr/doctype/leave_application/leave_application.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/hr/doctype/leave_application/leave_application.json b/erpnext/hr/doctype/leave_application/leave_application.json index 7afbc4da898..eaef60cb623 100644 --- a/erpnext/hr/doctype/leave_application/leave_application.json +++ b/erpnext/hr/doctype/leave_application/leave_application.json @@ -3,7 +3,7 @@ "allow_guest_to_view": 0, "allow_import": 0, "allow_rename": 0, - "autoname": "LAP/.#####", + "autoname": "naming_series:", "beta": 0, "creation": "2013-02-20 11:18:11", "custom": 0, @@ -796,7 +796,7 @@ "issingle": 0, "istable": 0, "max_attachments": 3, - "modified": "2017-06-13 14:28:52.426044", + "modified": "2019-01-08 17:35:10.795225", "modified_by": "Administrator", "module": "HR", "name": "Leave Application", From b2c9268ece2feaef11dab0aaa07f60e576f771c9 Mon Sep 17 00:00:00 2001 From: Jamsheer Date: Mon, 19 Nov 2018 16:05:34 +0530 Subject: [PATCH 006/169] fix: Patient Appointment - Calendar - set color from appointment type --- .../patient_appointment/patient_appointment.py | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/erpnext/healthcare/doctype/patient_appointment/patient_appointment.py b/erpnext/healthcare/doctype/patient_appointment/patient_appointment.py index 5364031fce1..7ac44b6cc2d 100755 --- a/erpnext/healthcare/doctype/patient_appointment/patient_appointment.py +++ b/erpnext/healthcare/doctype/patient_appointment/patient_appointment.py @@ -337,11 +337,19 @@ def get_events(start, end, filters=None): from frappe.desk.calendar import get_event_conditions conditions = get_event_conditions("Patient Appointment", filters) - data = frappe.db.sql("""select name, patient, practitioner, status, - duration, timestamp(appointment_date, appointment_time) as - 'start' from `tabPatient Appointment` where - (appointment_date between %(start)s and %(end)s) - and docstatus < 2 {conditions}""".format(conditions=conditions), + data = frappe.db.sql(""" + select + `tabPatient Appointment`.name, `tabPatient Appointment`.patient, + `tabPatient Appointment`.practitioner, `tabPatient Appointment`.status, + `tabPatient Appointment`.duration, + timestamp(`tabPatient Appointment`.appointment_date, `tabPatient Appointment`.appointment_time) as 'start', + `tabAppointment Type`.color + from + `tabPatient Appointment` + left join `tabAppointment Type` on `tabPatient Appointment`.appointment_type=`tabAppointment Type`.name + where + (`tabPatient Appointment`.appointment_date between %(start)s and %(end)s) + and `tabPatient Appointment`.docstatus < 2 {conditions}""".format(conditions=conditions), {"start": start, "end": end}, as_dict=True, update={"allDay": 0}) for item in data: From f4d0fcb8361cd92a6f1df75322670f7875b7ae0b Mon Sep 17 00:00:00 2001 From: Jamsheer Date: Mon, 19 Nov 2018 16:10:13 +0530 Subject: [PATCH 007/169] fix: patient - user welcome email configuration --- erpnext/healthcare/doctype/patient/patient.py | 1 - 1 file changed, 1 deletion(-) diff --git a/erpnext/healthcare/doctype/patient/patient.py b/erpnext/healthcare/doctype/patient/patient.py index bff24f7ab29..bf15cad5d52 100644 --- a/erpnext/healthcare/doctype/patient/patient.py +++ b/erpnext/healthcare/doctype/patient/patient.py @@ -33,7 +33,6 @@ class Patient(Document): "email": self.email, "user_type": "Website User" }) - user.flags.no_welcome_email = True user.flags.ignore_permissions = True user.add_roles("Patient") From f3c4f5a901ab256a7eaf5699ff748b3850927992 Mon Sep 17 00:00:00 2001 From: Jamsheer Date: Mon, 19 Nov 2018 16:29:32 +0530 Subject: [PATCH 008/169] fix: Clinical Procedure - copy fields from appointment --- .../doctype/clinical_procedure/clinical_procedure.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/erpnext/healthcare/doctype/clinical_procedure/clinical_procedure.py b/erpnext/healthcare/doctype/clinical_procedure/clinical_procedure.py index a21f5acb7e2..beffe367d8b 100644 --- a/erpnext/healthcare/doctype/clinical_procedure/clinical_procedure.py +++ b/erpnext/healthcare/doctype/clinical_procedure/clinical_procedure.py @@ -183,13 +183,15 @@ def create_procedure(appointment): procedure.patient_age = appointment.patient_age procedure.patient_sex = appointment.patient_sex procedure.procedure_template = appointment.procedure_template - procedure.procedure_prescription = appointment.procedure_prescription + procedure.prescription = appointment.procedure_prescription + procedure.practitioner = appointment.practitioner procedure.invoiced = appointment.invoiced procedure.medical_department = appointment.department procedure.start_date = appointment.appointment_date procedure.start_time = appointment.appointment_time procedure.notes = appointment.notes procedure.service_unit = appointment.service_unit + procedure.company = appointment.company consume_stock = frappe.db.get_value("Clinical Procedure Template", appointment.procedure_template, "consume_stock") if consume_stock == 1: procedure.consume_stock = True @@ -203,7 +205,9 @@ def create_procedure(appointment): return procedure.as_dict() def insert_clinical_procedure_to_medical_record(doc): - subject = cstr(doc.procedure_template) +" "+ doc.practitioner + subject = cstr(doc.procedure_template) + if doc.practitioner: + subject += " "+doc.practitioner if subject and doc.notes: subject += "
"+doc.notes From 3e01891e229b966401d46050ffdf10779f57d228 Mon Sep 17 00:00:00 2001 From: Jamsheer Date: Mon, 19 Nov 2018 17:02:48 +0530 Subject: [PATCH 009/169] fix: Traverse note from procedure prescription to appointment --- .../doctype/patient_appointment/patient_appointment.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/erpnext/healthcare/doctype/patient_appointment/patient_appointment.py b/erpnext/healthcare/doctype/patient_appointment/patient_appointment.py index 7ac44b6cc2d..117608234ec 100755 --- a/erpnext/healthcare/doctype/patient_appointment/patient_appointment.py +++ b/erpnext/healthcare/doctype/patient_appointment/patient_appointment.py @@ -27,6 +27,10 @@ class PatientAppointment(Document): def after_insert(self): if self.procedure_prescription: frappe.db.set_value("Procedure Prescription", self.procedure_prescription, "appointment_booked", True) + if self.procedure_template: + comments = frappe.db.get_value("Procedure Prescription", self.procedure_prescription, "comments") + if comments: + frappe.db.set_value("Patient Appointment", self.name, "notes", comments) # Check fee validity exists appointment = self validity_exist = validity_exists(appointment.practitioner, appointment.patient) From fb7b5292b3e207ddcf7060f2c18d2c6f7842ead5 Mon Sep 17 00:00:00 2001 From: Jamsheer Date: Mon, 19 Nov 2018 17:07:35 +0530 Subject: [PATCH 010/169] fix: Clinical Procedure - consume stock if items present --- .../healthcare/doctype/clinical_procedure/clinical_procedure.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/healthcare/doctype/clinical_procedure/clinical_procedure.py b/erpnext/healthcare/doctype/clinical_procedure/clinical_procedure.py index beffe367d8b..7c6f4d5999e 100644 --- a/erpnext/healthcare/doctype/clinical_procedure/clinical_procedure.py +++ b/erpnext/healthcare/doctype/clinical_procedure/clinical_procedure.py @@ -43,7 +43,7 @@ class ClinicalProcedure(Document): self.reload() def complete(self): - if self.consume_stock: + if self.consume_stock and self.items: create_stock_entry(self) frappe.db.set_value("Clinical Procedure", self.name, "status", 'Completed') From c0097ad72935959164a3524d36e131fc98169832 Mon Sep 17 00:00:00 2001 From: Jamsheer Date: Fri, 23 Nov 2018 11:37:58 +0530 Subject: [PATCH 011/169] feat: Filter active Healthcare Practitioner --- .../healthcare_practitioner.json | 1910 +++++++++-------- .../healthcare_practitioner.py | 21 + erpnext/hooks.py | 3 +- 3 files changed, 995 insertions(+), 939 deletions(-) diff --git a/erpnext/healthcare/doctype/healthcare_practitioner/healthcare_practitioner.json b/erpnext/healthcare/doctype/healthcare_practitioner/healthcare_practitioner.json index ad68924d5a1..4a848a081da 100644 --- a/erpnext/healthcare/doctype/healthcare_practitioner/healthcare_practitioner.json +++ b/erpnext/healthcare/doctype/healthcare_practitioner/healthcare_practitioner.json @@ -1,1007 +1,1041 @@ { - "allow_copy": 1, - "allow_guest_to_view": 0, - "allow_import": 1, - "allow_rename": 1, - "autoname": "", - "beta": 1, - "creation": "2016-02-23 11:20:53.565119", - "custom": 0, - "docstatus": 0, - "doctype": "DocType", - "document_type": "Setup", - "editable_grid": 0, + "allow_copy": 1, + "allow_events_in_timeline": 0, + "allow_guest_to_view": 0, + "allow_import": 1, + "allow_rename": 1, + "autoname": "", + "beta": 1, + "creation": "2016-02-23 11:20:53.565119", + "custom": 0, + "docstatus": 0, + "doctype": "DocType", + "document_type": "Setup", + "editable_grid": 0, "fields": [ { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "first_name", - "fieldtype": "Data", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 1, - "label": "First Name", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 1, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "first_name", + "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 1, + "in_standard_filter": 1, + "label": "First Name", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 1, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "middle_name", - "fieldtype": "Data", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Middle Name (Optional)", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "middle_name", + "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Middle Name (Optional)", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "last_name", - "fieldtype": "Data", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Last Name", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "last_name", + "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 1, + "in_standard_filter": 0, + "label": "Last Name", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "image", - "fieldtype": "Attach Image", - "hidden": 1, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Image", - "length": 0, - "no_copy": 1, - "permlevel": 0, - "precision": "", - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "image", + "fieldtype": "Attach Image", + "hidden": 1, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Image", + "length": 0, + "no_copy": 1, + "permlevel": 0, + "precision": "", + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "employee", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 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, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "employee", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 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, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "user_id", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 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, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 1, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "user_id", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 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, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 1, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "designation", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 1, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 1, - "label": "Designation", - "length": 0, - "no_copy": 0, - "options": "Designation", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "designation", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 1, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 1, + "in_standard_filter": 1, + "label": "Designation", + "length": 0, + "no_copy": 0, + "options": "Designation", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "department", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 1, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 1, - "label": "Department", - "length": 0, - "no_copy": 0, - "options": "Medical Department", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "department", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 1, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 1, + "label": "Department", + "length": 0, + "no_copy": 0, + "options": "Medical Department", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "column_break_7", - "fieldtype": "Column Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "column_break_7", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "hospital", - "fieldtype": "Data", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Hospital", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "hospital", + "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Hospital", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "mobile_phone", - "fieldtype": "Data", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Mobile", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "mobile_phone", + "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 1, + "in_standard_filter": 0, + "label": "Mobile", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "residence_phone", - "fieldtype": "Data", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Phone (R)", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "residence_phone", + "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Phone (R)", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "office_phone", - "fieldtype": "Data", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Phone (Office)", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "office_phone", + "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 1, + "in_standard_filter": 0, + "label": "Phone (Office)", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "appointments", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Appointments", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "default": "1", + "fieldname": "active", + "fieldtype": "Check", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Active", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "practitioner_schedules", - "fieldtype": "Table", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Practitioner Schedules", - "length": 0, - "no_copy": 0, - "options": "Practitioner Service Unit Schedule", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "appointments", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Appointments", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "charges", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Charges", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "practitioner_schedules", + "fieldtype": "Table", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Practitioner Schedules", + "length": 0, + "no_copy": 0, + "options": "Practitioner Service Unit Schedule", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "op_consulting_charge_item", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Out Patient Consulting Charge Item", - "length": 0, - "no_copy": 0, - "options": "Item", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "charges", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Charges", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "op_consulting_charge", - "fieldtype": "Currency", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "OP Consulting Charge", - "length": 0, - "no_copy": 0, - "options": "Currency", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "op_consulting_charge_item", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Out Patient Consulting Charge Item", + "length": 0, + "no_copy": 0, + "options": "Item", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "column_break_18", - "fieldtype": "Column Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "op_consulting_charge", + "fieldtype": "Currency", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "OP Consulting Charge", + "length": 0, + "no_copy": 0, + "options": "Currency", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "inpatient_visit_charge_item", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Inpatient Visit Charge Item", - "length": 0, - "no_copy": 0, - "options": "Item", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "column_break_18", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "inpatient_visit_charge", - "fieldtype": "Currency", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Inpatient Visit Charge", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "inpatient_visit_charge_item", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Inpatient Visit Charge Item", + "length": 0, + "no_copy": 0, + "options": "Item", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "contacts_and_address", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Contacts and Address", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "inpatient_visit_charge", + "fieldtype": "Currency", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Inpatient Visit Charge", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "address_html", - "fieldtype": "HTML", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Address HTML", - "length": 0, - "no_copy": 1, - "permlevel": 0, - "precision": "", - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 1, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "contacts_and_address", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Contacts and Address", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "column_break_19", - "fieldtype": "Column Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "address_html", + "fieldtype": "HTML", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Address HTML", + "length": 0, + "no_copy": 1, + "permlevel": 0, + "precision": "", + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 1, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "contact_html", - "fieldtype": "HTML", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Contact HTML", - "length": 0, - "no_copy": 1, - "permlevel": 0, - "precision": "", - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 1, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "column_break_19", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "account_details", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Account Details", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "contact_html", + "fieldtype": "HTML", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Contact HTML", + "length": 0, + "no_copy": 1, + "permlevel": 0, + "precision": "", + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 1, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "accounts", - "fieldtype": "Table", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Income Account", - "length": 0, - "no_copy": 0, - "options": "Party Account", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "account_details", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Account Details", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "default_currency", - "fieldtype": "Link", - "hidden": 1, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Default Currency", - "length": 0, - "no_copy": 1, - "options": "Currency", - "permlevel": 0, - "precision": "", - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 1, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "accounts", + "fieldtype": "Table", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Income Account", + "length": 0, + "no_copy": 0, + "options": "Party Account", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "default_currency", + "fieldtype": "Link", + "hidden": 1, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Default Currency", + "length": 0, + "no_copy": 1, + "options": "Currency", + "permlevel": 0, + "precision": "", + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 1, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 } - ], - "has_web_view": 0, - "hide_heading": 0, - "hide_toolbar": 0, - "idx": 0, - "image_field": "image", - "image_view": 0, - "in_create": 0, - "is_submittable": 0, - "issingle": 0, - "istable": 0, - "max_attachments": 0, - "modified": "2018-08-06 16:45:37.899084", - "modified_by": "Administrator", - "module": "Healthcare", - "name": "Healthcare Practitioner", - "name_case": "", - "owner": "Administrator", + ], + "has_web_view": 0, + "hide_heading": 0, + "hide_toolbar": 0, + "idx": 0, + "image_field": "image", + "image_view": 0, + "in_create": 0, + "is_submittable": 0, + "issingle": 0, + "istable": 0, + "max_attachments": 0, + "modified": "2018-11-23 08:54:51.442105", + "modified_by": "Administrator", + "module": "Healthcare", + "name": "Healthcare Practitioner", + "name_case": "", + "owner": "Administrator", "permissions": [ { - "amend": 0, - "cancel": 0, - "create": 1, - "delete": 0, - "email": 1, - "export": 0, - "if_owner": 0, - "import": 0, - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "Laboratory User", - "set_user_permissions": 0, - "share": 1, - "submit": 0, + "amend": 0, + "cancel": 0, + "create": 1, + "delete": 0, + "email": 1, + "export": 0, + "if_owner": 0, + "import": 0, + "permlevel": 0, + "print": 1, + "read": 1, + "report": 1, + "role": "Laboratory User", + "set_user_permissions": 0, + "share": 1, + "submit": 0, "write": 1 - }, + }, { - "amend": 0, - "cancel": 0, - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "if_owner": 0, - "import": 0, - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "Physician", - "set_user_permissions": 0, - "share": 1, - "submit": 0, + "amend": 0, + "cancel": 0, + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "if_owner": 0, + "import": 0, + "permlevel": 0, + "print": 1, + "read": 1, + "report": 1, + "role": "Physician", + "set_user_permissions": 0, + "share": 1, + "submit": 0, "write": 1 - }, + }, { - "amend": 0, - "cancel": 0, - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "if_owner": 0, - "import": 0, - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "Nursing User", - "set_user_permissions": 0, - "share": 1, - "submit": 0, + "amend": 0, + "cancel": 0, + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "if_owner": 0, + "import": 0, + "permlevel": 0, + "print": 1, + "read": 1, + "report": 1, + "role": "Nursing User", + "set_user_permissions": 0, + "share": 1, + "submit": 0, "write": 1 } - ], - "quick_entry": 0, - "read_only": 0, - "read_only_onload": 0, - "restrict_to_domain": "Healthcare", - "search_fields": "first_name,mobile_phone,office_phone", - "show_name_in_global_search": 1, - "sort_field": "modified", - "sort_order": "DESC", - "title_field": "first_name", - "track_changes": 1, - "track_seen": 0, + ], + "quick_entry": 0, + "read_only": 0, + "read_only_onload": 0, + "restrict_to_domain": "Healthcare", + "search_fields": "first_name,mobile_phone,office_phone", + "show_name_in_global_search": 1, + "sort_field": "modified", + "sort_order": "DESC", + "title_field": "first_name", + "track_changes": 1, + "track_seen": 0, "track_views": 0 } \ No newline at end of file diff --git a/erpnext/healthcare/doctype/healthcare_practitioner/healthcare_practitioner.py b/erpnext/healthcare/doctype/healthcare_practitioner/healthcare_practitioner.py index 8a087dd1b2f..891d86557f0 100644 --- a/erpnext/healthcare/doctype/healthcare_practitioner/healthcare_practitioner.py +++ b/erpnext/healthcare/doctype/healthcare_practitioner/healthcare_practitioner.py @@ -9,6 +9,7 @@ from frappe import throw, _ from frappe.utils import cstr from erpnext.accounts.party import validate_party_accounts from frappe.contacts.address_and_contact import load_address_and_contact, delete_contact_and_address +from frappe.desk.reportview import build_match_conditions, get_filters_cond class HealthcarePractitioner(Document): def onload(self): @@ -65,3 +66,23 @@ class HealthcarePractitioner(Document): def validate_service_item(item, msg): if frappe.db.get_value("Item", item, "is_stock_item") == 1: frappe.throw(_(msg)) + +def get_practitioner_list(doctype, txt, searchfield, start, page_len, filters=None): + fields = ["name", "first_name", "mobile_phone"] + match_conditions = build_match_conditions("Healthcare Practitioner") + match_conditions = "and {}".format(match_conditions) if match_conditions else "" + + if filters: + filter_conditions = get_filters_cond(doctype, filters, []) + match_conditions += "{}".format(filter_conditions) + + return frappe.db.sql("""select %s from `tabHealthcare Practitioner` where docstatus < 2 + and (%s like %s or first_name like %s) + and active = 1 + {match_conditions} + order by + case when name like %s then 0 else 1 end, + case when first_name like %s then 0 else 1 end, + name, first_name limit %s, %s""".format(match_conditions=match_conditions) % + (", ".join(fields), searchfield, "%s", "%s", "%s", "%s", "%s", "%s"), + ("%%%s%%" % txt, "%%%s%%" % txt, "%%%s%%" % txt, "%%%s%%" % txt, start, page_len)) diff --git a/erpnext/hooks.py b/erpnext/hooks.py index bf7e32ab78e..e8d3b076988 100644 --- a/erpnext/hooks.py +++ b/erpnext/hooks.py @@ -182,7 +182,8 @@ dump_report_map = "erpnext.startup.report_data_map.data_map" before_tests = "erpnext.setup.utils.before_tests" standard_queries = { - "Customer": "erpnext.selling.doctype.customer.customer.get_customer_list" + "Customer": "erpnext.selling.doctype.customer.customer.get_customer_list", + "Healthcare Practitioner": "erpnext.healthcare.doctype.healthcare_practitioner.healthcare_practitioner.get_practitioner_list" } doc_events = { From 52ac72e63e82b6502b325e29e06fabb55d09e896 Mon Sep 17 00:00:00 2001 From: Jamsheer Date: Fri, 23 Nov 2018 14:16:42 +0530 Subject: [PATCH 012/169] fix: Validate Patient Appointment --- .../patient_appointment.py | 23 ++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/erpnext/healthcare/doctype/patient_appointment/patient_appointment.py b/erpnext/healthcare/doctype/patient_appointment/patient_appointment.py index 117608234ec..1f7e1b7f42a 100755 --- a/erpnext/healthcare/doctype/patient_appointment/patient_appointment.py +++ b/erpnext/healthcare/doctype/patient_appointment/patient_appointment.py @@ -6,7 +6,7 @@ from __future__ import unicode_literals import frappe from frappe.model.document import Document import json -from frappe.utils import getdate, add_days +from frappe.utils import getdate, add_days, get_time from frappe import _ import datetime from frappe.core.doctype.sms_settings.sms_settings import send_sms @@ -24,6 +24,27 @@ class PatientAppointment(Document): frappe.db.set_value("Patient Appointment", self.name, "status", "Open") self.reload() + def validate(self): + end_time = datetime.datetime.combine(getdate(self.appointment_date), get_time(self.appointment_time)) + datetime.timedelta(minutes=float(self.duration)) + overlaps = frappe.db.sql(""" + select + name, practitioner, patient, appointment_time, duration + from + `tabPatient Appointment` + where + appointment_date=%s and name!=%s and status NOT IN ("Closed", "Cancelled") + and (practitioner=%s or patient=%s) and + ((appointment_time<%s and appointment_time + INTERVAL duration MINUTE>%s) or + (appointment_time>%s and appointment_time<%s) or + (appointment_time=%s)) + """, (self.appointment_date, self.name, self.practitioner, self.patient, + self.appointment_time, end_time.time(), self.appointment_time, end_time.time(), self.appointment_time)) + + print (overlaps) + if overlaps: + frappe.throw(_("""Appointment overlaps with {0}.
{1} has appointment scheduled + with {2} at {3} having {4} minute(s) duration.""").format(overlaps[0][0], overlaps[0][1], overlaps[0][2], overlaps[0][3], overlaps[0][4])) + def after_insert(self): if self.procedure_prescription: frappe.db.set_value("Procedure Prescription", self.procedure_prescription, "appointment_booked", True) From c3804230cdcad17c24f1d1409c8996194a4912fd Mon Sep 17 00:00:00 2001 From: Jamsheer Date: Fri, 23 Nov 2018 14:43:52 +0530 Subject: [PATCH 013/169] fix: Patient - Quick Entry enabled --- erpnext/healthcare/doctype/patient/patient.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/erpnext/healthcare/doctype/patient/patient.json b/erpnext/healthcare/doctype/patient/patient.json index 28e5351e67e..c195f4ddc78 100644 --- a/erpnext/healthcare/doctype/patient/patient.json +++ b/erpnext/healthcare/doctype/patient/patient.json @@ -219,7 +219,7 @@ "allow_bulk_edit": 0, "allow_in_quick_entry": 0, "allow_on_submit": 0, - "bold": 0, + "bold": 1, "collapsible": 0, "columns": 0, "fieldname": "blood_group", @@ -252,7 +252,7 @@ "allow_bulk_edit": 0, "allow_in_quick_entry": 0, "allow_on_submit": 0, - "bold": 0, + "bold": 1, "collapsible": 0, "columns": 0, "fieldname": "dob", @@ -480,7 +480,7 @@ "allow_bulk_edit": 0, "allow_in_quick_entry": 0, "allow_on_submit": 0, - "bold": 0, + "bold": 1, "collapsible": 0, "columns": 0, "fieldname": "mobile", @@ -512,7 +512,7 @@ "allow_bulk_edit": 0, "allow_in_quick_entry": 0, "allow_on_submit": 0, - "bold": 0, + "bold": 1, "collapsible": 0, "columns": 0, "fieldname": "email", @@ -1391,7 +1391,7 @@ "issingle": 0, "istable": 0, "max_attachments": 50, - "modified": "2018-10-14 22:09:39.849116", + "modified": "2018-11-23 12:11:14.336657", "modified_by": "Administrator", "module": "Healthcare", "name": "Patient", @@ -1456,7 +1456,7 @@ "write": 1 } ], - "quick_entry": 0, + "quick_entry": 1, "read_only": 0, "read_only_onload": 0, "restrict_to_domain": "Healthcare", From 17bb0da27863dec52cdf1199959b26b6935b8c38 Mon Sep 17 00:00:00 2001 From: Jamsheer Date: Fri, 23 Nov 2018 15:39:11 +0530 Subject: [PATCH 014/169] fix: remove print statement --- .../doctype/patient_appointment/patient_appointment.py | 1 - 1 file changed, 1 deletion(-) diff --git a/erpnext/healthcare/doctype/patient_appointment/patient_appointment.py b/erpnext/healthcare/doctype/patient_appointment/patient_appointment.py index 1f7e1b7f42a..dbc302e418f 100755 --- a/erpnext/healthcare/doctype/patient_appointment/patient_appointment.py +++ b/erpnext/healthcare/doctype/patient_appointment/patient_appointment.py @@ -40,7 +40,6 @@ class PatientAppointment(Document): """, (self.appointment_date, self.name, self.practitioner, self.patient, self.appointment_time, end_time.time(), self.appointment_time, end_time.time(), self.appointment_time)) - print (overlaps) if overlaps: frappe.throw(_("""Appointment overlaps with {0}.
{1} has appointment scheduled with {2} at {3} having {4} minute(s) duration.""").format(overlaps[0][0], overlaps[0][1], overlaps[0][2], overlaps[0][3], overlaps[0][4])) From f2d7e3309f87cd6f8b7dce59a7eba0e95c740e9a Mon Sep 17 00:00:00 2001 From: Jamsheer Date: Fri, 23 Nov 2018 16:29:30 +0530 Subject: [PATCH 015/169] fix: Patient Appointment - Calendar - status != Cancelled --- .../doctype/patient_appointment/patient_appointment.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/healthcare/doctype/patient_appointment/patient_appointment.py b/erpnext/healthcare/doctype/patient_appointment/patient_appointment.py index dbc302e418f..7aa41c546c0 100755 --- a/erpnext/healthcare/doctype/patient_appointment/patient_appointment.py +++ b/erpnext/healthcare/doctype/patient_appointment/patient_appointment.py @@ -373,7 +373,7 @@ def get_events(start, end, filters=None): left join `tabAppointment Type` on `tabPatient Appointment`.appointment_type=`tabAppointment Type`.name where (`tabPatient Appointment`.appointment_date between %(start)s and %(end)s) - and `tabPatient Appointment`.docstatus < 2 {conditions}""".format(conditions=conditions), + and `tabPatient Appointment`.status != 'Cancelled' and `tabPatient Appointment`.docstatus < 2 {conditions}""".format(conditions=conditions), {"start": start, "end": end}, as_dict=True, update={"allDay": 0}) for item in data: From 45c5138eafe6d2c21f1773de73ee9aa21f6f125b Mon Sep 17 00:00:00 2001 From: Jamsheer Date: Fri, 23 Nov 2018 16:48:10 +0530 Subject: [PATCH 016/169] fix: updated options for abdomen in Vital Signs --- .../doctype/vital_signs/vital_signs.json | 1861 +++++++++-------- 1 file changed, 931 insertions(+), 930 deletions(-) diff --git a/erpnext/healthcare/doctype/vital_signs/vital_signs.json b/erpnext/healthcare/doctype/vital_signs/vital_signs.json index 234871c75bd..1503f835a47 100644 --- a/erpnext/healthcare/doctype/vital_signs/vital_signs.json +++ b/erpnext/healthcare/doctype/vital_signs/vital_signs.json @@ -1,997 +1,998 @@ { - "allow_copy": 1, - "allow_guest_to_view": 0, - "allow_import": 1, - "allow_rename": 0, - "beta": 1, - "creation": "2017-02-02 11:00:24.853005", - "custom": 0, - "docstatus": 0, - "doctype": "DocType", - "document_type": "", - "editable_grid": 1, - "engine": "InnoDB", + "allow_copy": 1, + "allow_events_in_timeline": 0, + "allow_guest_to_view": 0, + "allow_import": 1, + "allow_rename": 0, + "beta": 1, + "creation": "2017-02-02 11:00:24.853005", + "custom": 0, + "docstatus": 0, + "doctype": "DocType", + "document_type": "", + "editable_grid": 1, + "engine": "InnoDB", "fields": [ { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_from": "patient.inpatient_record", - "fieldname": "inpatient_record", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Inpatient Record", - "length": 0, - "no_copy": 0, - "options": "Inpatient Record", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_from": "patient.inpatient_record", + "fieldname": "inpatient_record", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Inpatient Record", + "length": 0, + "no_copy": 0, + "options": "Inpatient Record", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_from": "inpatient_record.patient", - "fieldname": "patient", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 1, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 1, - "label": "Patient", - "length": 0, - "no_copy": 0, - "options": "Patient", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 1, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_from": "inpatient_record.patient", + "fieldname": "patient", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 1, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 1, + "in_standard_filter": 1, + "label": "Patient", + "length": 0, + "no_copy": 0, + "options": "Patient", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 1, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_from": "patient.patient_name", - "fieldname": "patient_name", - "fieldtype": "Data", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Patient Name", - "length": 0, - "no_copy": 0, - "options": "", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_from": "patient.patient_name", + "fieldname": "patient_name", + "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Patient Name", + "length": 0, + "no_copy": 0, + "options": "", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "appointment", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 1, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Appointment", - "length": 0, - "no_copy": 1, - "options": "Patient Appointment", - "permlevel": 0, - "precision": "", - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 1, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "appointment", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 1, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Appointment", + "length": 0, + "no_copy": 1, + "options": "Patient Appointment", + "permlevel": 0, + "precision": "", + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 1, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "encounter", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 1, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Patient Encounter", - "length": 0, - "no_copy": 1, - "options": "Patient Encounter", - "permlevel": 0, - "precision": "", - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 1, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "encounter", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 1, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Patient Encounter", + "length": 0, + "no_copy": 1, + "options": "Patient Encounter", + "permlevel": 0, + "precision": "", + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 1, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "column_break_2", - "fieldtype": "Column Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "column_break_2", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "default": "Today", - "fieldname": "signs_date", - "fieldtype": "Date", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Date", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 1, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "default": "Today", + "fieldname": "signs_date", + "fieldtype": "Date", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Date", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 1, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "default": "", - "fieldname": "signs_time", - "fieldtype": "Time", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Time", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 1, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "default": "", + "fieldname": "signs_time", + "fieldtype": "Time", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Time", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 1, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "sb_vs", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Vital Signs", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "sb_vs", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Vital Signs", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "description": "Presence of a fever (temp > 38.5 \u00b0C/101.3 \u00b0F or sustained temp > 38 \u00b0C/100.4 \u00b0F)", - "fieldname": "temperature", - "fieldtype": "Data", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 1, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Body Temperature", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "description": "Presence of a fever (temp > 38.5 \u00b0C/101.3 \u00b0F or sustained temp > 38 \u00b0C/100.4 \u00b0F)", + "fieldname": "temperature", + "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 1, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 1, + "in_standard_filter": 0, + "label": "Body Temperature", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "description": "Adults' pulse rate is anywhere between 50 and 80 beats per minute.", - "fieldname": "pulse", - "fieldtype": "Data", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 1, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Heart Rate / Pulse", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "description": "Adults' pulse rate is anywhere between 50 and 80 beats per minute.", + "fieldname": "pulse", + "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 1, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 1, + "in_standard_filter": 0, + "label": "Heart Rate / Pulse", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "description": "Normal reference range for an adult is 16\u201320 breaths/minute (RCP 2012)", - "fieldname": "respiratory_rate", - "fieldtype": "Data", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 1, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Respiratory rate", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "description": "Normal reference range for an adult is 16\u201320 breaths/minute (RCP 2012)", + "fieldname": "respiratory_rate", + "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 1, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 1, + "in_standard_filter": 0, + "label": "Respiratory rate", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "tongue", - "fieldtype": "Select", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Tongue", - "length": 0, - "no_copy": 0, - "options": "\nCoated\nVery Coated\nNormal\nFurry\nCuts", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "tongue", + "fieldtype": "Select", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Tongue", + "length": 0, + "no_copy": 0, + "options": "\nCoated\nVery Coated\nNormal\nFurry\nCuts", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "abdomen", - "fieldtype": "Select", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Abdomen", - "length": 0, - "no_copy": 0, - "options": "\nBloated\nFull\nFluid\nConstipated", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "abdomen", + "fieldtype": "Select", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Abdomen", + "length": 0, + "no_copy": 0, + "options": "\nNormal\nBloated\nFull\nFluid\nConstipated", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "column_break_8", - "fieldtype": "Column Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "column_break_8", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "reflexes", - "fieldtype": "Select", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Reflexes", - "length": 0, - "no_copy": 0, - "options": "\nNormal\nHyper\nVery Hyper\nOne Sided", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "reflexes", + "fieldtype": "Select", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Reflexes", + "length": 0, + "no_copy": 0, + "options": "\nNormal\nHyper\nVery Hyper\nOne Sided", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "bp_systolic", - "fieldtype": "Data", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 1, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Blood Pressure (systolic)", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "bp_systolic", + "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 1, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 1, + "in_standard_filter": 0, + "label": "Blood Pressure (systolic)", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "description": "", - "fieldname": "bp_diastolic", - "fieldtype": "Data", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 1, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Blood Pressure (diastolic)", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "description": "", + "fieldname": "bp_diastolic", + "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 1, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 1, + "in_standard_filter": 0, + "label": "Blood Pressure (diastolic)", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "description": "Normal resting blood pressure in an adult is approximately 120 mmHg systolic, and 80 mmHg diastolic, abbreviated \"120/80 mmHg\"", - "fieldname": "bp", - "fieldtype": "Data", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Blood Pressure", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "description": "Normal resting blood pressure in an adult is approximately 120 mmHg systolic, and 80 mmHg diastolic, abbreviated \"120/80 mmHg\"", + "fieldname": "bp", + "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Blood Pressure", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "vital_signs_note", - "fieldtype": "Small Text", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 1, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Notes", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "vital_signs_note", + "fieldtype": "Small Text", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 1, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Notes", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "sb_nutrition_values", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Nutrition Values", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "sb_nutrition_values", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Nutrition Values", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "height", - "fieldtype": "Float", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Height (In Meter)", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "height", + "fieldtype": "Float", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 1, + "in_standard_filter": 0, + "label": "Height (In Meter)", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "weight", - "fieldtype": "Float", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Weight (In Kilogram)", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "weight", + "fieldtype": "Float", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 1, + "in_standard_filter": 0, + "label": "Weight (In Kilogram)", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "default": "0.00", - "fieldname": "bmi", - "fieldtype": "Float", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "BMI", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "default": "0.00", + "fieldname": "bmi", + "fieldtype": "Float", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 1, + "in_standard_filter": 0, + "label": "BMI", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "column_break_14", - "fieldtype": "Column Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "column_break_14", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "nutrition_note", - "fieldtype": "Small Text", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 1, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Notes", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "nutrition_note", + "fieldtype": "Small Text", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 1, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Notes", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "company", - "fieldtype": "Link", - "hidden": 1, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Company", - "length": 0, - "no_copy": 0, - "options": "Company", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "company", + "fieldtype": "Link", + "hidden": 1, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Company", + "length": 0, + "no_copy": 0, + "options": "Company", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "amended_from", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Amended From", - "length": 0, - "no_copy": 1, - "options": "Vital Signs", - "permlevel": 0, - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "amended_from", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Amended From", + "length": 0, + "no_copy": 1, + "options": "Vital Signs", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 } - ], - "has_web_view": 0, - "hide_heading": 0, - "hide_toolbar": 0, - "idx": 0, - "image_view": 0, - "in_create": 0, - "is_submittable": 1, - "issingle": 0, - "istable": 0, - "max_attachments": 0, - "modified": "2018-08-26 10:26:20.896305", - "modified_by": "Administrator", - "module": "Healthcare", - "name": "Vital Signs", - "name_case": "", - "owner": "Administrator", + ], + "has_web_view": 0, + "hide_heading": 0, + "hide_toolbar": 0, + "idx": 0, + "image_view": 0, + "in_create": 0, + "is_submittable": 1, + "issingle": 0, + "istable": 0, + "max_attachments": 0, + "modified": "2018-11-23 14:14:05.933292", + "modified_by": "Administrator", + "module": "Healthcare", + "name": "Vital Signs", + "name_case": "", + "owner": "Administrator", "permissions": [ { - "amend": 0, - "cancel": 1, - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "if_owner": 0, - "import": 0, - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "Physician", - "set_user_permissions": 0, - "share": 1, - "submit": 1, + "amend": 0, + "cancel": 1, + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "if_owner": 0, + "import": 0, + "permlevel": 0, + "print": 1, + "read": 1, + "report": 1, + "role": "Physician", + "set_user_permissions": 0, + "share": 1, + "submit": 1, "write": 1 - }, + }, { - "amend": 0, - "cancel": 1, - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "if_owner": 0, - "import": 0, - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "Nursing User", - "set_user_permissions": 0, - "share": 1, - "submit": 1, + "amend": 0, + "cancel": 1, + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "if_owner": 0, + "import": 0, + "permlevel": 0, + "print": 1, + "read": 1, + "report": 1, + "role": "Nursing User", + "set_user_permissions": 0, + "share": 1, + "submit": 1, "write": 1 } - ], - "quick_entry": 0, - "read_only": 0, - "read_only_onload": 0, - "restrict_to_domain": "Healthcare", - "search_fields": "patient, signs_date", - "show_name_in_global_search": 1, - "sort_field": "modified", - "sort_order": "DESC", - "title_field": "patient", - "track_changes": 1, - "track_seen": 1, + ], + "quick_entry": 0, + "read_only": 0, + "read_only_onload": 0, + "restrict_to_domain": "Healthcare", + "search_fields": "patient, signs_date", + "show_name_in_global_search": 1, + "sort_field": "modified", + "sort_order": "DESC", + "title_field": "patient", + "track_changes": 1, + "track_seen": 1, "track_views": 0 } \ No newline at end of file From c0ac84977683cce7caa28048413c5ca91f245997 Mon Sep 17 00:00:00 2001 From: Jamsheer Date: Wed, 9 Jan 2019 11:48:41 +0530 Subject: [PATCH 017/169] fix: Helathcare Prcatitioner custom query escaped --- .../healthcare_practitioner.py | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/erpnext/healthcare/doctype/healthcare_practitioner/healthcare_practitioner.py b/erpnext/healthcare/doctype/healthcare_practitioner/healthcare_practitioner.py index 891d86557f0..ed9eae3529f 100644 --- a/erpnext/healthcare/doctype/healthcare_practitioner/healthcare_practitioner.py +++ b/erpnext/healthcare/doctype/healthcare_practitioner/healthcare_practitioner.py @@ -83,6 +83,19 @@ def get_practitioner_list(doctype, txt, searchfield, start, page_len, filters=No order by case when name like %s then 0 else 1 end, case when first_name like %s then 0 else 1 end, - name, first_name limit %s, %s""".format(match_conditions=match_conditions) % - (", ".join(fields), searchfield, "%s", "%s", "%s", "%s", "%s", "%s"), - ("%%%s%%" % txt, "%%%s%%" % txt, "%%%s%%" % txt, "%%%s%%" % txt, start, page_len)) + name, first_name limit %s, %s""".format( + match_conditions=match_conditions) % + ( + ", ".join(fields), + frappe.db.escape(searchfield), + "%s", "%s", "%s", "%s", "%s", "%s" + ), + ( + "%%%s%%" % frappe.db.escape(txt), + "%%%s%%" % frappe.db.escape(txt), + "%%%s%%" % frappe.db.escape(txt), + "%%%s%%" % frappe.db.escape(txt), + start, + page_len + ) + ) From 319ca86c81b0992369bde8cb883b630a8ee05599 Mon Sep 17 00:00:00 2001 From: Jamsheer Date: Wed, 9 Jan 2019 13:29:20 +0530 Subject: [PATCH 018/169] fix: Test Fee Validity --- erpnext/healthcare/doctype/fee_validity/test_fee_validity.py | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/healthcare/doctype/fee_validity/test_fee_validity.py b/erpnext/healthcare/doctype/fee_validity/test_fee_validity.py index b8305d748f8..26b14504630 100644 --- a/erpnext/healthcare/doctype/fee_validity/test_fee_validity.py +++ b/erpnext/healthcare/doctype/fee_validity/test_fee_validity.py @@ -68,6 +68,7 @@ def create_appointment(patient, practitioner, appointment_date, department): appointment.department = department appointment.appointment_date = appointment_date appointment.company = "_Test Company" + appointment.duration = 15 appointment.save(ignore_permissions=True) return appointment From 701c762a68d6d88f1a8553aa1f67b01cc5ba643a Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Wed, 9 Jan 2019 14:07:55 +0530 Subject: [PATCH 019/169] Show outward entries in negative for Bank Clearance Summary report --- .../report/bank_clearance_summary/bank_clearance_summary.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/accounts/report/bank_clearance_summary/bank_clearance_summary.py b/erpnext/accounts/report/bank_clearance_summary/bank_clearance_summary.py index 13424dbcb56..0861b20f14a 100644 --- a/erpnext/accounts/report/bank_clearance_summary/bank_clearance_summary.py +++ b/erpnext/accounts/report/bank_clearance_summary/bank_clearance_summary.py @@ -36,8 +36,8 @@ def get_conditions(filters): def get_entries(filters): conditions = get_conditions(filters) journal_entries = frappe.db.sql("""SELECT - "Journal Entry", jv.name, jv.posting_date, jv.cheque_no, jv.clearance_date, jvd.against_account, - if((jvd.debit - jvd.credit) < 0, (jvd.debit - jvd.credit) * -1, (jvd.debit - jvd.credit)) + "Journal Entry", jv.name, jv.posting_date, jv.cheque_no, + jv.clearance_date, jvd.against_account, jvd.debit - jvd.credit FROM `tabJournal Entry Account` jvd, `tabJournal Entry` jv WHERE @@ -46,7 +46,7 @@ def get_entries(filters): payment_entries = frappe.db.sql("""SELECT "Payment Entry", name, posting_date, reference_no, clearance_date, party, - if(paid_from=%(account)s, paid_amount, received_amount) + if(paid_from=%(account)s, paid_amount * -1, received_amount) FROM `tabPayment Entry` WHERE From f86123ad5a5a0da9be7e74f7b6e1360f3f9733f9 Mon Sep 17 00:00:00 2001 From: Saif Ur Rehman Date: Tue, 15 Jan 2019 15:18:43 +0500 Subject: [PATCH 020/169] feat(Party Ledger Summary): Include columns for discount and other adjustments --- .../customer_ledger_summary.py | 91 +++++++++++++------ erpnext/setup/doctype/company/company.js | 2 + erpnext/setup/doctype/company/company.json | 68 +++++++++++++- 3 files changed, 131 insertions(+), 30 deletions(-) diff --git a/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.py b/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.py index 2b228fd6b6f..c8044c532aa 100644 --- a/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.py +++ b/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.py @@ -6,6 +6,7 @@ import frappe import erpnext from frappe import _, scrub from frappe.utils import getdate, nowdate, flt, cint +from six import iteritems class PartyLedgerSummaryReport(object): def __init__(self, filters=None): @@ -20,6 +21,11 @@ class PartyLedgerSummaryReport(object): self.filters.party_type = args.get("party_type") self.party_naming_by = frappe.db.get_value(args.get("naming_by")[0], None, args.get("naming_by")[1]) + discount_account_field = "discount_allowed_account" if self.filters.party_type == "Customer" \ + else "discount_received_account" + self.round_off_account, self.write_off_account, self.discount_account = frappe.get_cached_value('Company', + self.filters.company, ["round_off_account", "write_off_account", discount_account_field]) + columns = self.get_columns() data = self.get_data() return columns, data @@ -42,6 +48,8 @@ class PartyLedgerSummaryReport(object): }) credit_or_debit_note = "Credit Note" if self.filters.party_type == "Customer" else "Debit Note" + discount_allowed_or_received = "Discount Allowed" if self.filters.party_type == "Customer" else "Discount Received" + columns += [ { "label": _("Opening Balance"), @@ -71,6 +79,13 @@ class PartyLedgerSummaryReport(object): "options": "currency", "width": 120 }, + { + "label": _(discount_allowed_or_received), + "fieldname": "discount_amount", + "fieldtype": "Currency", + "options": "currency", + "width": 120 + }, { "label": _("Write Off Amount"), "fieldname": "write_off_amount", @@ -78,6 +93,13 @@ class PartyLedgerSummaryReport(object): "options": "currency", "width": 120 }, + { + "label": _("Other Adjustments"), + "fieldname": "adjustment_amount", + "fieldtype": "Currency", + "options": "currency", + "width": 120 + }, { "label": _("Closing Balance"), "fieldname": "closing_balance", @@ -106,18 +128,17 @@ class PartyLedgerSummaryReport(object): self.get_gl_entries() self.get_return_invoices() - self.get_party_write_off_amounts() + self.get_party_adjustment_amounts() self.party_data = frappe._dict({}) for gle in self.gl_entries: self.party_data.setdefault(gle.party, frappe._dict({ "party": gle.party, - "party_name": "", # TODO add party_name + "party_name": "", # TODO add party_name "opening_balance": 0, "invoiced_amount": 0, - "paid_amount": -self.party_write_off_amounts.get(gle.party, 0), + "paid_amount": 0, "return_amount": 0, - "write_off_amount": self.party_write_off_amounts.get(gle.party, 0), "closing_balance": 0, "currency": company_currency })) @@ -135,8 +156,18 @@ class PartyLedgerSummaryReport(object): else: self.party_data[gle.party].paid_amount -= amount - return [d for d in self.party_data.values() if d.opening_balance or d.invoiced_amount or d.paid_amount - or d.return_amount or d.write_off_amount or d.closing_amount] + out = [] + for party, row in iteritems(self.party_data): + if row.opening_balance or row.invoiced_amount or row.paid_amount or row.return_amount or row.closing_amount: + total_party_adjustment = sum([amount for account, amount in iteritems(self.party_adjustment_details.get(party, {}))]) + row.paid_amount -= total_party_adjustment + row.discount_amount = self.party_adjustment_details.get(party, {}).get(self.discount_account, 0) + row.write_off_amount = self.party_adjustment_details.get(party, {}).get(self.write_off_account, 0) + row.adjustment_amount = total_party_adjustment - row.discount_amount - row.write_off_amount + + out.append(row) + + return out def get_gl_entries(self): conditions = self.prepare_conditions() @@ -215,12 +246,11 @@ class PartyLedgerSummaryReport(object): self.return_invoices = [d.name for d in frappe.get_all(doctype, filters={"is_return": 1, "docstatus": 1, "posting_date": ["between", [self.filters.from_date, self.filters.to_date]]})] - def get_party_write_off_amounts(self): + def get_party_adjustment_amounts(self): conditions = self.prepare_conditions() - income_or_expense = "Expense Account" if self.filters.party_type == "Customer" else "Income Account" + income_or_expense = "Expense" if self.filters.party_type == "Customer" else "Income" invoice_dr_or_cr = "debit" if self.filters.party_type == "Customer" else "credit" reverse_dr_or_cr = "credit" if self.filters.party_type == "Customer" else "debit" - round_off_account = frappe.get_cached_value('Company', self.filters.company, "round_off_account") gl_entries = frappe.db.sql(""" select @@ -231,7 +261,7 @@ class PartyLedgerSummaryReport(object): docstatus < 2 and (voucher_type, voucher_no) in ( select voucher_type, voucher_no from `tabGL Entry` gle, `tabAccount` acc - where acc.name = gle.account and acc.account_type = '{income_or_expense}' + where acc.name = gle.account and acc.root_type = '{income_or_expense}' and gle.posting_date between %(from_date)s and %(to_date)s and gle.docstatus < 2 ) and (voucher_type, voucher_no) in ( select voucher_type, voucher_no from `tabGL Entry` gle @@ -241,39 +271,42 @@ class PartyLedgerSummaryReport(object): order by posting_date """.format(conditions=conditions, income_or_expense=income_or_expense), self.filters, as_dict=True) - self.party_write_off_amounts = {} - write_off_voucher_entries = {} + self.party_adjustment_details = {} + adjustment_voucher_entries = {} for gle in gl_entries: - write_off_voucher_entries.setdefault((gle.voucher_type, gle.voucher_no), []) - write_off_voucher_entries[(gle.voucher_type, gle.voucher_no)].append(gle) + adjustment_voucher_entries.setdefault((gle.voucher_type, gle.voucher_no), []) + adjustment_voucher_entries[(gle.voucher_type, gle.voucher_no)].append(gle) - for voucher, voucher_gl_entries in write_off_voucher_entries.iteritems(): + for voucher, voucher_gl_entries in iteritems(adjustment_voucher_entries): parties = {} - write_offs = {} + accounts = {} has_irrelevant_entry = False for gle in voucher_gl_entries: - if gle.account == round_off_account: + if gle.account == self.round_off_account: continue elif gle.party: parties.setdefault(gle.party, 0) parties[gle.party] += gle.get(reverse_dr_or_cr) - gle.get(invoice_dr_or_cr) - elif frappe.get_cached_value("Account", gle.account, "account_type") == income_or_expense: - write_offs.setdefault(gle.account, 0) - write_offs[gle.account] += gle.get(invoice_dr_or_cr) - gle.get(reverse_dr_or_cr) + elif frappe.get_cached_value("Account", gle.account, "root_type") == income_or_expense: + accounts.setdefault(gle.account, 0) + accounts[gle.account] += gle.get(invoice_dr_or_cr) - gle.get(reverse_dr_or_cr) else: has_irrelevant_entry = True - if parties and write_offs: + if parties and accounts: if len(parties) == 1: - for account, amount in write_offs.iteritems(): - party = parties.keys()[0] - self.party_write_off_amounts.setdefault(party, 0) - self.party_write_off_amounts[party] += amount - elif len(write_offs) == 1 and not has_irrelevant_entry: - for party, amount in parties.iteritems(): - self.party_write_off_amounts.setdefault(party, 0) - self.party_write_off_amounts[party] += amount + party = parties.keys()[0] + for account, amount in iteritems(accounts): + self.party_adjustment_details.setdefault(party, {}) + self.party_adjustment_details[party].setdefault(account, 0) + self.party_adjustment_details[party][account] += amount + elif len(accounts) == 1 and not has_irrelevant_entry: + account = accounts.keys()[0] + for party, amount in iteritems(parties): + self.party_adjustment_details.setdefault(party, {}) + self.party_adjustment_details[party].setdefault(account, 0) + self.party_adjustment_details[party][account] += amount def execute(filters=None): args = { diff --git a/erpnext/setup/doctype/company/company.js b/erpnext/setup/doctype/company/company.js index 16676ac78af..70e047a4e80 100644 --- a/erpnext/setup/doctype/company/company.js +++ b/erpnext/setup/doctype/company/company.js @@ -206,6 +206,8 @@ erpnext.company.setup_queries = function(frm) { ["default_payroll_payable_account", {"root_type": "Liability"}], ["round_off_account", {"root_type": "Expense"}], ["write_off_account", {"root_type": "Expense"}], + ["discount_allowed_account", {"root_type": "Expense"}], + ["discount_received_account", {"root_type": "Income"}], ["exchange_gain_loss_account", {"root_type": "Expense"}], ["unrealized_exchange_gain_loss_account", {"root_type": "Expense"}], ["accumulated_depreciation_account", diff --git a/erpnext/setup/doctype/company/company.json b/erpnext/setup/doctype/company/company.json index 01f8956a826..77c371e0cdd 100644 --- a/erpnext/setup/doctype/company/company.json +++ b/erpnext/setup/doctype/company/company.json @@ -1250,6 +1250,72 @@ "translatable": 0, "unique": 0 }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "discount_allowed_account", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Discount Allowed Account", + "length": 0, + "no_copy": 0, + "options": "Account", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "discount_received_account", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Discount Received Account", + "length": 0, + "no_copy": 0, + "options": "Account", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, { "allow_bulk_edit": 0, "allow_in_quick_entry": 0, @@ -2903,7 +2969,7 @@ "istable": 0, "max_attachments": 0, "menu_index": 0, - "modified": "2018-10-24 12:57:46.776452", + "modified": "2019-01-15 13:29:54.510379", "modified_by": "Administrator", "module": "Setup", "name": "Company", From 55566b7f8e838fbeb349d754e6235737581af032 Mon Sep 17 00:00:00 2001 From: Saif Ur Rehman Date: Sat, 19 Jan 2019 15:12:08 +0500 Subject: [PATCH 021/169] fix(Party Ledger Summary): Codacy fix --- .../customer_ledger_summary.py | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.py b/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.py index c8044c532aa..47116cf3366 100644 --- a/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.py +++ b/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.py @@ -4,9 +4,9 @@ from __future__ import unicode_literals import frappe import erpnext -from frappe import _, scrub -from frappe.utils import getdate, nowdate, flt, cint -from six import iteritems +from frappe import _ +from frappe.utils import getdate, nowdate +from six import iteritems, itervalues class PartyLedgerSummaryReport(object): def __init__(self, filters=None): @@ -159,7 +159,7 @@ class PartyLedgerSummaryReport(object): out = [] for party, row in iteritems(self.party_data): if row.opening_balance or row.invoiced_amount or row.paid_amount or row.return_amount or row.closing_amount: - total_party_adjustment = sum([amount for account, amount in iteritems(self.party_adjustment_details.get(party, {}))]) + total_party_adjustment = sum([amount for amount in itervalues(self.party_adjustment_details.get(party, {}))]) row.paid_amount -= total_party_adjustment row.discount_amount = self.party_adjustment_details.get(party, {}).get(self.discount_account, 0) row.write_off_amount = self.party_adjustment_details.get(party, {}).get(self.write_off_account, 0) @@ -230,9 +230,6 @@ class PartyLedgerSummaryReport(object): and ((steam.parent = voucher_no and steam.parenttype = voucher_type) or (steam.parent = against_voucher and steam.parenttype = against_voucher_type) or (steam.parent = party and steam.parenttype = 'Customer')))""".format(lft, rgt)) - #conditions.append("""party in (select parent from `tabSales Team` - # where parenttype = 'Customer' and exists(select name from `tabSales Person` - # where lft >= {0} and rgt <= {1} and name=`tabSales Team`.sales_person))""".format(lft, rgt)) if self.filters.party_type == "Supplier": if self.filters.get("supplier_group"): @@ -277,7 +274,7 @@ class PartyLedgerSummaryReport(object): adjustment_voucher_entries.setdefault((gle.voucher_type, gle.voucher_no), []) adjustment_voucher_entries[(gle.voucher_type, gle.voucher_no)].append(gle) - for voucher, voucher_gl_entries in iteritems(adjustment_voucher_entries): + for voucher_gl_entries in itervalues(adjustment_voucher_entries): parties = {} accounts = {} has_irrelevant_entry = False @@ -313,4 +310,4 @@ def execute(filters=None): "party_type": "Customer", "naming_by": ["Selling Settings", "cust_master_name"], } - return PartyLedgerSummaryReport(filters).run(args) \ No newline at end of file + return PartyLedgerSummaryReport(filters).run(args) From 31d58eac01d2ef5f96185be15295e0f08172ccb7 Mon Sep 17 00:00:00 2001 From: Saif Ur Rehman Date: Sat, 19 Jan 2019 15:28:40 +0500 Subject: [PATCH 022/169] fix(Party Ledger Summary): Added Supplier/Customer Name column --- .../customer_ledger_summary.py | 24 ++++++++++++------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.py b/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.py index 47116cf3366..e33bd61411e 100644 --- a/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.py +++ b/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.py @@ -134,7 +134,7 @@ class PartyLedgerSummaryReport(object): for gle in self.gl_entries: self.party_data.setdefault(gle.party, frappe._dict({ "party": gle.party, - "party_name": "", # TODO add party_name + "party_name": gle.party_name, "opening_balance": 0, "invoiced_amount": 0, "paid_amount": 0, @@ -171,16 +171,25 @@ class PartyLedgerSummaryReport(object): def get_gl_entries(self): conditions = self.prepare_conditions() + join = join_field = "" + if self.filters.party_type == "Customer": + join_field = ", p.customer_name as party_name" + join = "left join `tabCustomer` p on gle.party = p.name" + elif self.filters.party_type == "Supplier": + join_field = ", p.supplier_name as party_name" + join = "left join `tabSupplier` p on gle.party = p.name" self.gl_entries = frappe.db.sql(""" select - posting_date, party, voucher_type, voucher_no, against_voucher_type, against_voucher, debit, credit - from - `tabGL Entry` + gle.posting_date, gle.party, gle.voucher_type, gle.voucher_no, gle.against_voucher_type, + gle.against_voucher, gle.debit, gle.credit {join_field} + from `tabGL Entry` gle + {join} where - docstatus < 2 and party_type=%(party_type)s and ifnull(party, '') != '' and posting_date <= %(to_date)s - {0} - order by posting_date""".format(conditions), self.filters, as_dict=True) + gle.docstatus < 2 and gle.party_type=%(party_type)s and ifnull(gle.party, '') != '' + and gle.posting_date <= %(to_date)s {conditions} + order by gle.posting_date + """.format(join=join, join_field=join_field, conditions=conditions), self.filters, as_dict=True) def prepare_conditions(self): conditions = [""] @@ -265,7 +274,6 @@ class PartyLedgerSummaryReport(object): where gle.party_type=%(party_type)s and ifnull(party, '') != '' and gle.posting_date between %(from_date)s and %(to_date)s and gle.docstatus < 2 {conditions} ) - order by posting_date """.format(conditions=conditions, income_or_expense=income_or_expense), self.filters, as_dict=True) self.party_adjustment_details = {} From dd461636e3067c33a14210d70582ef822684e6cc Mon Sep 17 00:00:00 2001 From: scmmishra Date: Mon, 21 Jan 2019 19:35:02 +0530 Subject: [PATCH 023/169] [feat] Updated all help_links --- erpnext/public/js/help_links.js | 356 ++++++++++++++++---------------- 1 file changed, 178 insertions(+), 178 deletions(-) diff --git a/erpnext/public/js/help_links.js b/erpnext/public/js/help_links.js index b8d0019e28d..20ba56a5ece 100644 --- a/erpnext/public/js/help_links.js +++ b/erpnext/public/js/help_links.js @@ -1,524 +1,524 @@ frappe.provide('frappe.help.help_links'); frappe.help.help_links['Form/Rename Tool'] = [ - { label: 'Bulk Rename', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/data/bulk-rename' }, + { label: 'Bulk Rename', url: 'https://erpnext.com/docs/user/manual/en/setting-up/data/bulk-rename' }, ] //Setup frappe.help.help_links['List/User'] = [ - { label: 'New User', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/users-and-permissions/adding-users' }, - { label: 'Rename User', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/articles/rename-user' }, + { label: 'New User', url: 'https://erpnext.com/docs/user/manual/en/setting-up/users-and-permissions/adding-users' }, + { label: 'Rename User', url: 'https://erpnext.com/docs/user/manual/en/setting-up/articles/rename-user' }, ] frappe.help.help_links['permission-manager'] = [ - { label: 'Role Permissions Manager', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/users-and-permissions/role-based-permissions' }, - { label: 'Managing Perm Level in Permissions Manager', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/articles/managing-perm-level' }, - { label: 'User Permissions', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/users-and-permissions/user-permissions' }, - { label: 'Sharing', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/users-and-permissions/sharing' }, - { label: 'Password', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/articles/change-password' }, + { label: 'Role Permissions Manager', url: 'https://erpnext.com/docs/user/manual/en/setting-up/users-and-permissions/role-based-permissions' }, + { label: 'Managing Perm Level in Permissions Manager', url: 'https://erpnext.com/docs/user/manual/en/setting-up/articles/managing-perm-level' }, + { label: 'User Permissions', url: 'https://erpnext.com/docs/user/manual/en/setting-up/users-and-permissions/user-permissions' }, + { label: 'Sharing', url: 'https://erpnext.com/docs/user/manual/en/setting-up/users-and-permissions/sharing' }, + { label: 'Password', url: 'https://erpnext.com/docs/user/manual/en/setting-up/articles/change-password' }, ] frappe.help.help_links['Form/System Settings'] = [ - { label: 'Naming Series', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/settings/system-settings' }, + { label: 'Naming Series', url: 'https://erpnext.com/docs/user/manual/en/setting-up/settings/system-settings' }, ] frappe.help.help_links['data-import-tool'] = [ - { label: 'Importing and Exporting Data', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/data/data-import-tool' }, - { label: 'Overwriting Data from Data Import Tool', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/articles/overwriting-data-from-data-import-tool' }, + { label: 'Importing and Exporting Data', url: 'https://erpnext.com/docs/user/manual/en/setting-up/data/data-import-tool' }, + { label: 'Overwriting Data from Data Import Tool', url: 'https://erpnext.com/docs/user/manual/en/setting-up/articles/overwriting-data-from-data-import-tool' }, ] frappe.help.help_links['module_setup'] = [ - { label: 'Role Permissions Manager', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/users-and-permissions/role-based-permissions' }, + { label: 'Role Permissions Manager', url: 'https://erpnext.com/docs/user/manual/en/setting-up/users-and-permissions/role-based-permissions' }, ] frappe.help.help_links['Form/Naming Series'] = [ - { label: 'Naming Series', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/settings/naming-series' }, - { label: 'Setting the Current Value for Naming Series', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/articles/naming-series-current-value' }, + { label: 'Naming Series', url: 'https://erpnext.com/docs/user/manual/en/setting-up/settings/naming-series' }, + { label: 'Setting the Current Value for Naming Series', url: 'https://erpnext.com/docs/user/manual/en/setting-up/articles/naming-series-current-value' }, ] frappe.help.help_links['Form/Global Defaults'] = [ - { label: 'Global Settings', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/settings/global-defaults' }, + { label: 'Global Settings', url: 'https://erpnext.com/docs/user/manual/en/setting-up/settings/global-defaults' }, ] frappe.help.help_links['Form/Email Digest'] = [ - { label: 'Email Digest', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/email/email-digest' }, + { label: 'Email Digest', url: 'https://erpnext.com/docs/user/manual/en/setting-up/email/email-digest' }, ] frappe.help.help_links['List/Print Heading'] = [ - { label: 'Print Heading', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/print/print-headings' }, + { label: 'Print Heading', url: 'https://erpnext.com/docs/user/manual/en/setting-up/print/print-headings' }, ] frappe.help.help_links['List/Letter Head'] = [ - { label: 'Letter Head', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/print/letter-head' }, + { label: 'Letter Head', url: 'https://erpnext.com/docs/user/manual/en/setting-up/print/letter-head' }, ] frappe.help.help_links['List/Address Template'] = [ - { label: 'Address Template', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/print/address-template' }, + { label: 'Address Template', url: 'https://erpnext.com/docs/user/manual/en/setting-up/print/address-template' }, ] frappe.help.help_links['List/Terms and Conditions'] = [ - { label: 'Terms and Conditions', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/print/terms-and-conditions' }, + { label: 'Terms and Conditions', url: 'https://erpnext.com/docs/user/manual/en/setting-up/print/terms-and-conditions' }, ] frappe.help.help_links['List/Cheque Print Template'] = [ - { label: 'Cheque Print Template', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/print/cheque-print-template' }, + { label: 'Cheque Print Template', url: 'https://erpnext.com/docs/user/manual/en/setting-up/print/cheque-print-template' }, ] frappe.help.help_links['List/Email Account'] = [ - { label: 'Email Account', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/email/email-account' }, + { label: 'Email Account', url: 'https://erpnext.com/docs/user/manual/en/setting-up/email/email-account' }, ] frappe.help.help_links['List/Notification'] = [ - { label: 'Notification', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/email/notifications' }, + { label: 'Notification', url: 'https://erpnext.com/docs/user/manual/en/setting-up/email/notifications' }, ] frappe.help.help_links['Form/Notification'] = [ - { label: 'Notification', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/email/notifications' }, + { label: 'Notification', url: 'https://erpnext.com/docs/user/manual/en/setting-up/email/notifications' }, ] frappe.help.help_links['List/Email Digest'] = [ - { label: 'Email Digest', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/email/email-digest' }, + { label: 'Email Digest', url: 'https://erpnext.com/docs/user/manual/en/setting-up/email/email-digest' }, ] frappe.help.help_links['List/Auto Email Report'] = [ - { label: 'Auto Email Reports', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/email/email-reports' }, + { label: 'Auto Email Reports', url: 'https://erpnext.com/docs/user/manual/en/setting-up/email/email-reports' }, ] frappe.help.help_links['Form/Print Settings'] = [ - { label: 'Print Settings', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/print/print-settings' }, + { label: 'Print Settings', url: 'https://erpnext.com/docs/user/manual/en/setting-up/print/print-settings' }, ] frappe.help.help_links['print-format-builder'] = [ - { label: 'Print Format Builder', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/print/print-settings' }, + { label: 'Print Format Builder', url: 'https://erpnext.com/docs/user/manual/en/setting-up/print/print-settings' }, ] frappe.help.help_links['List/Print Heading'] = [ - { label: 'Print Heading', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/print/print-headings' }, + { label: 'Print Heading', url: 'https://erpnext.com/docs/user/manual/en/setting-up/print/print-headings' }, ] //setup-integrations frappe.help.help_links['Form/PayPal Settings'] = [ - { label: 'PayPal Settings', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/integrations/paypal-integration' }, + { label: 'PayPal Settings', url: 'https://erpnext.com/docs/user/manual/en/setting-up/integrations/paypal-integration' }, ] frappe.help.help_links['Form/Razorpay Settings'] = [ - { label: 'Razorpay Settings', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/integrations/razorpay-integration' }, + { label: 'Razorpay Settings', url: 'https://erpnext.com/docs/user/manual/en/setting-up/integrations/razorpay-integration' }, ] frappe.help.help_links['Form/Dropbox Settings'] = [ - { label: 'Dropbox Settings', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/integrations/dropbox-backup' }, + { label: 'Dropbox Settings', url: 'https://erpnext.com/docs/user/manual/en/setting-up/integrations/dropbox-backup' }, ] frappe.help.help_links['Form/LDAP Settings'] = [ - { label: 'LDAP Settings', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/integrations/ldap-integration' }, + { label: 'LDAP Settings', url: 'https://erpnext.com/docs/user/manual/en/setting-up/integrations/ldap-integration' }, ] frappe.help.help_links['Form/Stripe Settings'] = [ - { label: 'Stripe Settings', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/integrations/stripe-integration' }, + { label: 'Stripe Settings', url: 'https://erpnext.com/docs/user/manual/en/setting-up/integrations/stripe-integration' }, ] //Sales frappe.help.help_links['Form/Quotation'] = [ - { label: 'Quotation', url: 'https://frappe.github.io/erpnext/user/manual/en/selling/quotation' }, - { label: 'Applying Discount', url: 'https://frappe.github.io/erpnext/user/manual/en/selling/articles/applying-discount' }, - { label: 'Sales Person', url: 'https://frappe.github.io/erpnext/user/manual/en/selling/articles/sales-persons-in-the-sales-transactions' }, - { label: 'Applying Margin', url: 'https://frappe.github.io/erpnext/user/manual/en/selling/articles/adding-margin' }, + { label: 'Quotation', url: 'https://erpnext.com/docs/user/manual/en/selling/quotation' }, + { label: 'Applying Discount', url: 'https://erpnext.com/docs/user/manual/en/selling/articles/applying-discount' }, + { label: 'Sales Person', url: 'https://erpnext.com/docs/user/manual/en/selling/articles/sales-persons-in-the-sales-transactions' }, + { label: 'Applying Margin', url: 'https://erpnext.com/docs/user/manual/en/selling/articles/adding-margin' }, ] frappe.help.help_links['List/Customer'] = [ - { label: 'Customer', url: 'https://frappe.github.io/erpnext/user/manual/en/CRM/customer' }, - { label: 'Credit Limit', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/credit-limit' }, + { label: 'Customer', url: 'https://erpnext.com/docs/user/manual/en/CRM/customer' }, + { label: 'Credit Limit', url: 'https://erpnext.com/docs/user/manual/en/accounts/credit-limit' }, ] frappe.help.help_links['Form/Customer'] = [ - { label: 'Customer', url: 'https://frappe.github.io/erpnext/user/manual/en/CRM/customer' }, - { label: 'Credit Limit', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/credit-limit' }, + { label: 'Customer', url: 'https://erpnext.com/docs/user/manual/en/CRM/customer' }, + { label: 'Credit Limit', url: 'https://erpnext.com/docs/user/manual/en/accounts/credit-limit' }, ] frappe.help.help_links['List/Sales Taxes and Charges Template'] = [ - { label: 'Setting Up Taxes', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/setting-up-taxes' }, + { label: 'Setting Up Taxes', url: 'https://erpnext.com/docs/user/manual/en/setting-up/setting-up-taxes' }, ] frappe.help.help_links['Form/Sales Taxes and Charges Template'] = [ - { label: 'Setting Up Taxes', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/setting-up-taxes' }, + { label: 'Setting Up Taxes', url: 'https://erpnext.com/docs/user/manual/en/setting-up/setting-up-taxes' }, ] frappe.help.help_links['List/Sales Order'] = [ - { label: 'Sales Order', url: 'https://frappe.github.io/erpnext/user/manual/en/selling/sales-order' }, - { label: 'Recurring Sales Order', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/recurring-orders-and-invoices' }, - { label: 'Applying Discount', url: 'https://frappe.github.io/erpnext/user/manual/en/selling/articles/applying-discount' }, + { label: 'Sales Order', url: 'https://erpnext.com/docs/user/manual/en/selling/sales-order' }, + { label: 'Recurring Sales Order', url: 'https://erpnext.com/docs/user/manual/en/accounts/recurring-orders-and-invoices' }, + { label: 'Applying Discount', url: 'https://erpnext.com/docs/user/manual/en/selling/articles/applying-discount' }, ] frappe.help.help_links['Form/Sales Order'] = [ - { label: 'Sales Order', url: 'https://frappe.github.io/erpnext/user/manual/en/selling/sales-order' }, - { label: 'Recurring Sales Order', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/recurring-orders-and-invoices' }, - { label: 'Applying Discount', url: 'https://frappe.github.io/erpnext/user/manual/en/selling/articles/applying-discount' }, - { label: 'Drop Shipping', url: 'https://frappe.github.io/erpnext/user/manual/en/selling/articles/drop-shipping' }, - { label: 'Sales Person', url: 'https://frappe.github.io/erpnext/user/manual/en/selling/articles/sales-persons-in-the-sales-transactions' }, - { label: 'Close Sales Order', url: 'https://frappe.github.io/erpnext/user/manual/en/selling/articles/close-sales-order' }, - { label: 'Applying Margin', url: 'https://frappe.github.io/erpnext/user/manual/en/selling/articles/adding-margin' }, + { label: 'Sales Order', url: 'https://erpnext.com/docs/user/manual/en/selling/sales-order' }, + { label: 'Recurring Sales Order', url: 'https://erpnext.com/docs/user/manual/en/accounts/recurring-orders-and-invoices' }, + { label: 'Applying Discount', url: 'https://erpnext.com/docs/user/manual/en/selling/articles/applying-discount' }, + { label: 'Drop Shipping', url: 'https://erpnext.com/docs/user/manual/en/selling/articles/drop-shipping' }, + { label: 'Sales Person', url: 'https://erpnext.com/docs/user/manual/en/selling/articles/sales-persons-in-the-sales-transactions' }, + { label: 'Close Sales Order', url: 'https://erpnext.com/docs/user/manual/en/selling/articles/close-sales-order' }, + { label: 'Applying Margin', url: 'https://erpnext.com/docs/user/manual/en/selling/articles/adding-margin' }, ] frappe.help.help_links['Form/Product Bundle'] = [ - { label: 'Product Bundle', url: 'https://frappe.github.io/erpnext/user/manual/en/selling/setup/product-bundle' }, + { label: 'Product Bundle', url: 'https://erpnext.com/docs/user/manual/en/selling/setup/product-bundle' }, ] frappe.help.help_links['Form/Selling Settings'] = [ - { label: 'Selling Settings', url: 'https://frappe.github.io/erpnext/user/manual/en/selling/setup/selling-settings' }, + { label: 'Selling Settings', url: 'https://erpnext.com/docs/user/manual/en/selling/setup/selling-settings' }, ] //Buying frappe.help.help_links['List/Supplier'] = [ - { label: 'Supplier', url: 'https://frappe.github.io/erpnext/user/manual/en/buying/supplier' }, + { label: 'Supplier', url: 'https://erpnext.com/docs/user/manual/en/buying/supplier' }, ] frappe.help.help_links['Form/Supplier'] = [ - { label: 'Supplier', url: 'https://frappe.github.io/erpnext/user/manual/en/buying/supplier' }, + { label: 'Supplier', url: 'https://erpnext.com/docs/user/manual/en/buying/supplier' }, ] frappe.help.help_links['Form/Request for Quotation'] = [ - { label: 'Request for Quotation', url: 'https://frappe.github.io/erpnext/user/manual/en/buying/request-for-quotation' }, - { label: 'RFQ Video', url: 'https://frappe.github.io/erpnext/user/videos/learn/request-for-quotation.html' }, + { label: 'Request for Quotation', url: 'https://erpnext.com/docs/user/manual/en/buying/request-for-quotation' }, + { label: 'RFQ Video', url: 'https://erpnext.com/docs/user/videos/learn/request-for-quotation.html' }, ] frappe.help.help_links['Form/Supplier Quotation'] = [ - { label: 'Supplier Quotation', url: 'https://frappe.github.io/erpnext/user/manual/en/buying/supplier-quotation' }, + { label: 'Supplier Quotation', url: 'https://erpnext.com/docs/user/manual/en/buying/supplier-quotation' }, ] frappe.help.help_links['Form/Buying Settings'] = [ - { label: 'Buying Settings', url: 'https://frappe.github.io/erpnext/user/manual/en/buying/setup/buying-settings' }, + { label: 'Buying Settings', url: 'https://erpnext.com/docs/user/manual/en/buying/setup/buying-settings' }, ] frappe.help.help_links['List/Purchase Order'] = [ - { label: 'Purchase Order', url: 'https://frappe.github.io/erpnext/user/manual/en/buying/purchase-order' }, - { label: 'Recurring Purchase Order', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/recurring-orders-and-invoices' }, + { label: 'Purchase Order', url: 'https://erpnext.com/docs/user/manual/en/buying/purchase-order' }, + { label: 'Recurring Purchase Order', url: 'https://erpnext.com/docs/user/manual/en/accounts/recurring-orders-and-invoices' }, ] frappe.help.help_links['Form/Purchase Order'] = [ - { label: 'Purchase Order', url: 'https://frappe.github.io/erpnext/user/manual/en/buying/purchase-order' }, - { label: 'Item UoM', url: 'https://frappe.github.io/erpnext/user/manual/en/buying/articles/purchasing-in-different-unit' }, - { label: 'Supplier Item Code', url: 'https://frappe.github.io/erpnext/user/manual/en/buying/articles/maintaining-suppliers-part-no-in-item' }, - { label: 'Recurring Purchase Order', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/recurring-orders-and-invoices' }, - { label: 'Subcontracting', url: 'https://frappe.github.io/erpnext/user/manual/en/manufacturing/subcontracting' }, + { label: 'Purchase Order', url: 'https://erpnext.com/docs/user/manual/en/buying/purchase-order' }, + { label: 'Item UoM', url: 'https://erpnext.com/docs/user/manual/en/buying/articles/purchasing-in-different-unit' }, + { label: 'Supplier Item Code', url: 'https://erpnext.com/docs/user/manual/en/buying/articles/maintaining-suppliers-part-no-in-item' }, + { label: 'Recurring Purchase Order', url: 'https://erpnext.com/docs/user/manual/en/accounts/recurring-orders-and-invoices' }, + { label: 'Subcontracting', url: 'https://erpnext.com/docs/user/manual/en/manufacturing/subcontracting' }, ] frappe.help.help_links['List/Purchase Taxes and Charges Template'] = [ - { label: 'Setting Up Taxes', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/setting-up-taxes' }, + { label: 'Setting Up Taxes', url: 'https://erpnext.com/docs/user/manual/en/setting-up/setting-up-taxes' }, ] frappe.help.help_links['List/POS Profile'] = [ - { label: 'POS Profile', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/pos-setting' }, + { label: 'POS Profile', url: 'https://erpnext.com/docs/user/manual/en/setting-up/pos-setting' }, ] frappe.help.help_links['List/Price List'] = [ - { label: 'Price List', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/price-lists' }, + { label: 'Price List', url: 'https://erpnext.com/docs/user/manual/en/setting-up/price-lists' }, ] frappe.help.help_links['List/Authorization Rule'] = [ - { label: 'Authorization Rule', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/authorization-rule' }, + { label: 'Authorization Rule', url: 'https://erpnext.com/docs/user/manual/en/setting-up/authorization-rule' }, ] frappe.help.help_links['Form/SMS Settings'] = [ - { label: 'SMS Settings', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/sms-setting' }, + { label: 'SMS Settings', url: 'https://erpnext.com/docs/user/manual/en/setting-up/sms-setting' }, ] frappe.help.help_links['List/Stock Reconciliation'] = [ - { label: 'Stock Reconciliation', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/stock-reconciliation-for-non-serialized-item' }, + { label: 'Stock Reconciliation', url: 'https://erpnext.com/docs/user/manual/en/setting-up/stock-reconciliation-for-non-serialized-item' }, ] frappe.help.help_links['Tree/Territory'] = [ - { label: 'Territory', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/territory' }, + { label: 'Territory', url: 'https://erpnext.com/docs/user/manual/en/setting-up/territory' }, ] frappe.help.help_links['Form/Dropbox Backup'] = [ - { label: 'Dropbox Backup', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/third-party-backups' }, - { label: 'Setting Up Dropbox Backup', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/articles/setting-up-dropbox-backups' }, + { label: 'Dropbox Backup', url: 'https://erpnext.com/docs/user/manual/en/setting-up/third-party-backups' }, + { label: 'Setting Up Dropbox Backup', url: 'https://erpnext.com/docs/user/manual/en/setting-up/articles/setting-up-dropbox-backups' }, ] frappe.help.help_links['List/Workflow'] = [ - { label: 'Workflow', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/workflows' }, + { label: 'Workflow', url: 'https://erpnext.com/docs/user/manual/en/setting-up/workflows' }, ] frappe.help.help_links['List/Company'] = [ - { label: 'Company', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/company-setup' }, - { label: 'Managing Multiple Companies', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/articles/managing-multiple-companies' }, - { label: 'Delete All Related Transactions for a Company', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/articles/delete-a-company-and-all-related-transactions' }, + { label: 'Company', url: 'https://erpnext.com/docs/user/manual/en/setting-up/company-setup' }, + { label: 'Managing Multiple Companies', url: 'https://erpnext.com/docs/user/manual/en/setting-up/articles/managing-multiple-companies' }, + { label: 'Delete All Related Transactions for a Company', url: 'https://erpnext.com/docs/user/manual/en/setting-up/articles/delete-a-company-and-all-related-transactions' }, ] //Accounts frappe.help.help_links['modules/Accounts'] = [ - { label: 'Introduction to Accounts', url: 'http://frappe.github.io/erpnext/user/manual/en/accounts/' }, - { label: 'Chart of Accounts', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/chart-of-accounts.html' }, - { label: 'Multi Currency Accounting', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/multi-currency-accounting' }, + { label: 'Introduction to Accounts', url: 'http://erpnext.com/docs/user/manual/en/accounts/' }, + { label: 'Chart of Accounts', url: 'https://erpnext.com/docs/user/manual/en/accounts/chart-of-accounts.html' }, + { label: 'Multi Currency Accounting', url: 'https://erpnext.com/docs/user/manual/en/accounts/multi-currency-accounting' }, ] frappe.help.help_links['Tree/Account'] = [ - { label: 'Chart of Accounts', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/chart-of-accounts' }, - { label: 'Managing Tree Mastes', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/articles/managing-tree-structure-masters' }, + { label: 'Chart of Accounts', url: 'https://erpnext.com/docs/user/manual/en/accounts/chart-of-accounts' }, + { label: 'Managing Tree Mastes', url: 'https://erpnext.com/docs/user/manual/en/setting-up/articles/managing-tree-structure-masters' }, ] frappe.help.help_links['Form/Sales Invoice'] = [ - { label: 'Sales Invoice', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/sales-invoice' }, - { label: 'Accounts Opening Balance', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/opening-accounts' }, - { label: 'Sales Return', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/sales-return' }, - { label: 'Recurring Sales Invoice', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/recurring-orders-and-invoices' }, + { label: 'Sales Invoice', url: 'https://erpnext.com/docs/user/manual/en/accounts/sales-invoice' }, + { label: 'Accounts Opening Balance', url: 'https://erpnext.com/docs/user/manual/en/accounts/opening-accounts' }, + { label: 'Sales Return', url: 'https://erpnext.com/docs/user/manual/en/stock/sales-return' }, + { label: 'Recurring Sales Invoice', url: 'https://erpnext.com/docs/user/manual/en/accounts/recurring-orders-and-invoices' }, ] frappe.help.help_links['List/Sales Invoice'] = [ - { label: 'Sales Invoice', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/sales-invoice' }, - { label: 'Accounts Opening Balance', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/opening-accounts' }, - { label: 'Sales Return', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/sales-return' }, - { label: 'Recurring Sales Invoice', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/recurring-orders-and-invoices' }, + { label: 'Sales Invoice', url: 'https://erpnext.com/docs/user/manual/en/accounts/sales-invoice' }, + { label: 'Accounts Opening Balance', url: 'https://erpnext.com/docs/user/manual/en/accounts/opening-accounts' }, + { label: 'Sales Return', url: 'https://erpnext.com/docs/user/manual/en/stock/sales-return' }, + { label: 'Recurring Sales Invoice', url: 'https://erpnext.com/docs/user/manual/en/accounts/recurring-orders-and-invoices' }, ] frappe.help.help_links['pos'] = [ - { label: 'Point of Sale Invoice', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/point-of-sale-pos-invoice' }, + { label: 'Point of Sale Invoice', url: 'https://erpnext.com/docs/user/manual/en/accounts/point-of-sale-pos-invoice' }, ] frappe.help.help_links['List/POS Profile'] = [ - { label: 'Point of Sale Profile', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/pos-setting' }, + { label: 'Point of Sale Profile', url: 'https://erpnext.com/docs/user/manual/en/setting-up/pos-setting' }, ] frappe.help.help_links['List/Purchase Invoice'] = [ - { label: 'Purchase Invoice', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/purchase-invoice' }, - { label: 'Accounts Opening Balance', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/opening-accounts' }, - { label: 'Recurring Purchase Invoice', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/recurring-orders-and-invoices' }, + { label: 'Purchase Invoice', url: 'https://erpnext.com/docs/user/manual/en/accounts/purchase-invoice' }, + { label: 'Accounts Opening Balance', url: 'https://erpnext.com/docs/user/manual/en/accounts/opening-accounts' }, + { label: 'Recurring Purchase Invoice', url: 'https://erpnext.com/docs/user/manual/en/accounts/recurring-orders-and-invoices' }, ] frappe.help.help_links['List/Journal Entry'] = [ - { label: 'Journal Entry', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/journal-entry' }, - { label: 'Advance Payment Entry', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/advance-payment-entry' }, - { label: 'Accounts Opening Balance', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/opening-accounts' }, + { label: 'Journal Entry', url: 'https://erpnext.com/docs/user/manual/en/accounts/journal-entry' }, + { label: 'Advance Payment Entry', url: 'https://erpnext.com/docs/user/manual/en/accounts/advance-payment-entry' }, + { label: 'Accounts Opening Balance', url: 'https://erpnext.com/docs/user/manual/en/accounts/opening-accounts' }, ] frappe.help.help_links['List/Payment Entry'] = [ - { label: 'Payment Entry', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/payment-entry' }, + { label: 'Payment Entry', url: 'https://erpnext.com/docs/user/manual/en/accounts/payment-entry' }, ] frappe.help.help_links['List/Payment Request'] = [ - { label: 'Payment Request', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/payment-request' }, + { label: 'Payment Request', url: 'https://erpnext.com/docs/user/manual/en/accounts/payment-request' }, ] frappe.help.help_links['List/Asset'] = [ - { label: 'Managing Fixed Assets', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/managing-fixed-assets' }, + { label: 'Managing Fixed Assets', url: 'https://erpnext.com/docs/user/manual/en/accounts/managing-fixed-assets' }, ] frappe.help.help_links['List/Asset Category'] = [ - { label: 'Asset Category', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/managing-fixed-assets' }, + { label: 'Asset Category', url: 'https://erpnext.com/docs/user/manual/en/accounts/managing-fixed-assets' }, ] frappe.help.help_links['Tree/Cost Center'] = [ - { label: 'Budgeting', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/budgeting' }, + { label: 'Budgeting', url: 'https://erpnext.com/docs/user/manual/en/accounts/budgeting' }, ] frappe.help.help_links['List/Item'] = [ - { label: 'Item', url: 'http://frappe.github.io/erpnext/user/manual/en/stock/item' }, - { label: 'Item Price', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/item/item-price' }, - { label: 'Barcode', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/articles/track-items-using-barcode' }, - { label: 'Item Wise Taxation', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/item-wise-taxation' }, - { label: 'Managing Fixed Assets', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/managing-fixed-assets' }, - { label: 'Item Codification', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/item/item-codification' }, - { label: 'Item Variants', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/item/item-variants' }, - { label: 'Item Valuation', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/item/item-valuation-fifo-and-moving-average' }, + { label: 'Item', url: 'http://erpnext.com/docs/user/manual/en/stock/item' }, + { label: 'Item Price', url: 'https://erpnext.com/docs/user/manual/en/stock/item/item-price' }, + { label: 'Barcode', url: 'https://erpnext.com/docs/user/manual/en/stock/articles/track-items-using-barcode' }, + { label: 'Item Wise Taxation', url: 'https://erpnext.com/docs/user/manual/en/accounts/item-wise-taxation' }, + { label: 'Managing Fixed Assets', url: 'https://erpnext.com/docs/user/manual/en/accounts/managing-fixed-assets' }, + { label: 'Item Codification', url: 'https://erpnext.com/docs/user/manual/en/stock/item/item-codification' }, + { label: 'Item Variants', url: 'https://erpnext.com/docs/user/manual/en/stock/item/item-variants' }, + { label: 'Item Valuation', url: 'https://erpnext.com/docs/user/manual/en/stock/item/item-valuation-fifo-and-moving-average' }, ] frappe.help.help_links['Form/Item'] = [ - { label: 'Item', url: 'http://frappe.github.io/erpnext/user/manual/en/stock/item' }, - { label: 'Item Price', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/item/item-price' }, - { label: 'Barcode', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/articles/track-items-using-barcode' }, - { label: 'Item Wise Taxation', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/item-wise-taxation' }, - { label: 'Managing Fixed Assets', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/managing-fixed-assets' }, - { label: 'Item Codification', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/item/item-codification' }, - { label: 'Item Variants', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/item/item-variants' }, - { label: 'Item Valuation', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/item/item-valuation-fifo-and-moving-average' }, + { label: 'Item', url: 'http://erpnext.com/docs/user/manual/en/stock/item' }, + { label: 'Item Price', url: 'https://erpnext.com/docs/user/manual/en/stock/item/item-price' }, + { label: 'Barcode', url: 'https://erpnext.com/docs/user/manual/en/stock/articles/track-items-using-barcode' }, + { label: 'Item Wise Taxation', url: 'https://erpnext.com/docs/user/manual/en/accounts/item-wise-taxation' }, + { label: 'Managing Fixed Assets', url: 'https://erpnext.com/docs/user/manual/en/accounts/managing-fixed-assets' }, + { label: 'Item Codification', url: 'https://erpnext.com/docs/user/manual/en/stock/item/item-codification' }, + { label: 'Item Variants', url: 'https://erpnext.com/docs/user/manual/en/stock/item/item-variants' }, + { label: 'Item Valuation', url: 'https://erpnext.com/docs/user/manual/en/stock/item/item-valuation-fifo-and-moving-average' }, ] frappe.help.help_links['List/Purchase Receipt'] = [ - { label: 'Purchase Receipt', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/purchase-receipt' }, - { label: 'Barcode', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/articles/track-items-using-barcode' }, + { label: 'Purchase Receipt', url: 'https://erpnext.com/docs/user/manual/en/stock/purchase-receipt' }, + { label: 'Barcode', url: 'https://erpnext.com/docs/user/manual/en/stock/articles/track-items-using-barcode' }, ] frappe.help.help_links['List/Delivery Note'] = [ - { label: 'Delivery Note', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/delivery-note' }, - { label: 'Barcode', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/articles/track-items-using-barcode' }, - { label: 'Sales Return', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/sales-return' }, + { label: 'Delivery Note', url: 'https://erpnext.com/docs/user/manual/en/stock/delivery-note' }, + { label: 'Barcode', url: 'https://erpnext.com/docs/user/manual/en/stock/articles/track-items-using-barcode' }, + { label: 'Sales Return', url: 'https://erpnext.com/docs/user/manual/en/stock/sales-return' }, ] frappe.help.help_links['Form/Delivery Note'] = [ - { label: 'Delivery Note', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/delivery-note' }, - { label: 'Sales Return', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/sales-return' }, - { label: 'Barcode', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/articles/track-items-using-barcode' }, - { label: 'Subcontracting', url: 'https://frappe.github.io/erpnext/user/manual/en/manufacturing/subcontracting' }, + { label: 'Delivery Note', url: 'https://erpnext.com/docs/user/manual/en/stock/delivery-note' }, + { label: 'Sales Return', url: 'https://erpnext.com/docs/user/manual/en/stock/sales-return' }, + { label: 'Barcode', url: 'https://erpnext.com/docs/user/manual/en/stock/articles/track-items-using-barcode' }, + { label: 'Subcontracting', url: 'https://erpnext.com/docs/user/manual/en/manufacturing/subcontracting' }, ] frappe.help.help_links['List/Installation Note'] = [ - { label: 'Installation Note', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/installation-note' }, + { label: 'Installation Note', url: 'https://erpnext.com/docs/user/manual/en/stock/installation-note' }, ] frappe.help.help_links['Tree'] = [ - { label: 'Managing Tree Structure Masters', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/articles/managing-tree-structure-masters' }, + { label: 'Managing Tree Structure Masters', url: 'https://erpnext.com/docs/user/manual/en/setting-up/articles/managing-tree-structure-masters' }, ] frappe.help.help_links['List/Budget'] = [ - { label: 'Budgeting', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/budgeting' }, + { label: 'Budgeting', url: 'https://erpnext.com/docs/user/manual/en/accounts/budgeting' }, ] //Stock frappe.help.help_links['List/Material Request'] = [ - { label: 'Material Request', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/material-request' }, - { label: 'Auto-creation of Material Request', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/articles/auto-creation-of-material-request' }, + { label: 'Material Request', url: 'https://erpnext.com/docs/user/manual/en/stock/material-request' }, + { label: 'Auto-creation of Material Request', url: 'https://erpnext.com/docs/user/manual/en/stock/articles/auto-creation-of-material-request' }, ] frappe.help.help_links['Form/Material Request'] = [ - { label: 'Material Request', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/material-request' }, - { label: 'Auto-creation of Material Request', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/articles/auto-creation-of-material-request' }, + { label: 'Material Request', url: 'https://erpnext.com/docs/user/manual/en/stock/material-request' }, + { label: 'Auto-creation of Material Request', url: 'https://erpnext.com/docs/user/manual/en/stock/articles/auto-creation-of-material-request' }, ] frappe.help.help_links['Form/Stock Entry'] = [ - { label: 'Stock Entry', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/stock-entry' }, - { label: 'Stock Entry Types', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/articles/stock-entry-purpose' }, - { label: 'Repack Entry', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/articles/repack-entry' }, - { label: 'Opening Stock', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/opening-stock' }, - { label: 'Subcontracting', url: 'https://frappe.github.io/erpnext/user/manual/en/manufacturing/subcontracting' }, + { label: 'Stock Entry', url: 'https://erpnext.com/docs/user/manual/en/stock/stock-entry' }, + { label: 'Stock Entry Types', url: 'https://erpnext.com/docs/user/manual/en/stock/articles/stock-entry-purpose' }, + { label: 'Repack Entry', url: 'https://erpnext.com/docs/user/manual/en/stock/articles/repack-entry' }, + { label: 'Opening Stock', url: 'https://erpnext.com/docs/user/manual/en/stock/opening-stock' }, + { label: 'Subcontracting', url: 'https://erpnext.com/docs/user/manual/en/manufacturing/subcontracting' }, ] frappe.help.help_links['List/Stock Entry'] = [ - { label: 'Stock Entry', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/stock-entry' }, + { label: 'Stock Entry', url: 'https://erpnext.com/docs/user/manual/en/stock/stock-entry' }, ] frappe.help.help_links['Tree/Warehouse'] = [ - { label: 'Warehouse', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/warehouse' }, + { label: 'Warehouse', url: 'https://erpnext.com/docs/user/manual/en/stock/warehouse' }, ] frappe.help.help_links['List/Serial No'] = [ - { label: 'Serial No', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/serial-no' }, + { label: 'Serial No', url: 'https://erpnext.com/docs/user/manual/en/stock/serial-no' }, ] frappe.help.help_links['Form/Serial No'] = [ - { label: 'Serial No', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/serial-no' }, + { label: 'Serial No', url: 'https://erpnext.com/docs/user/manual/en/stock/serial-no' }, ] frappe.help.help_links['Form/Batch'] = [ - { label: 'Batch', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/batch' }, + { label: 'Batch', url: 'https://erpnext.com/docs/user/manual/en/stock/batch' }, ] frappe.help.help_links['Form/Packing Slip'] = [ - { label: 'Packing Slip', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/tools/packing-slip' }, + { label: 'Packing Slip', url: 'https://erpnext.com/docs/user/manual/en/stock/tools/packing-slip' }, ] frappe.help.help_links['Form/Quality Inspection'] = [ - { label: 'Quality Inspection', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/tools/quality-inspection' }, + { label: 'Quality Inspection', url: 'https://erpnext.com/docs/user/manual/en/stock/tools/quality-inspection' }, ] frappe.help.help_links['Form/Landed Cost Voucher'] = [ - { label: 'Landed Cost Voucher', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/tools/landed-cost-voucher' }, + { label: 'Landed Cost Voucher', url: 'https://erpnext.com/docs/user/manual/en/stock/tools/landed-cost-voucher' }, ] frappe.help.help_links['Tree/Item Group'] = [ - { label: 'Item Group', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/setup/item-group' }, + { label: 'Item Group', url: 'https://erpnext.com/docs/user/manual/en/stock/setup/item-group' }, ] frappe.help.help_links['Form/Item Attribute'] = [ - { label: 'Item Attribute', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/setup/item-attribute' }, + { label: 'Item Attribute', url: 'https://erpnext.com/docs/user/manual/en/stock/setup/item-attribute' }, ] frappe.help.help_links['Form/UOM'] = [ - { label: 'Fractions in UOM', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/articles/managing-fractions-in-uom' }, + { label: 'Fractions in UOM', url: 'https://erpnext.com/docs/user/manual/en/stock/articles/managing-fractions-in-uom' }, ] frappe.help.help_links['Form/Stock Reconciliation'] = [ - { label: 'Opening Stock Entry', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/opening-stock' }, + { label: 'Opening Stock Entry', url: 'https://erpnext.com/docs/user/manual/en/stock/opening-stock' }, ] //CRM frappe.help.help_links['Form/Lead'] = [ - { label: 'Lead', url: 'https://frappe.github.io/erpnext/user/manual/en/CRM/lead' }, + { label: 'Lead', url: 'https://erpnext.com/docs/user/manual/en/CRM/lead' }, ] frappe.help.help_links['Form/Opportunity'] = [ - { label: 'Opportunity', url: 'https://frappe.github.io/erpnext/user/manual/en/CRM/opportunity' }, + { label: 'Opportunity', url: 'https://erpnext.com/docs/user/manual/en/CRM/opportunity' }, ] frappe.help.help_links['Form/Address'] = [ - { label: 'Address', url: 'https://frappe.github.io/erpnext/user/manual/en/CRM/contact' }, + { label: 'Address', url: 'https://erpnext.com/docs/user/manual/en/CRM/contact' }, ] frappe.help.help_links['Form/Contact'] = [ - { label: 'Contact', url: 'https://frappe.github.io/erpnext/user/manual/en/CRM/contact' }, + { label: 'Contact', url: 'https://erpnext.com/docs/user/manual/en/CRM/contact' }, ] frappe.help.help_links['Form/Newsletter'] = [ - { label: 'Newsletter', url: 'https://frappe.github.io/erpnext/user/manual/en/CRM/newsletter' }, + { label: 'Newsletter', url: 'https://erpnext.com/docs/user/manual/en/CRM/newsletter' }, ] frappe.help.help_links['Form/Campaign'] = [ - { label: 'Campaign', url: 'https://frappe.github.io/erpnext/user/manual/en/CRM/setup/campaign' }, + { label: 'Campaign', url: 'https://erpnext.com/docs/user/manual/en/CRM/setup/campaign' }, ] frappe.help.help_links['Tree/Sales Person'] = [ - { label: 'Sales Person', url: 'https://frappe.github.io/erpnext/user/manual/en/CRM/setup/sales-person' }, + { label: 'Sales Person', url: 'https://erpnext.com/docs/user/manual/en/CRM/setup/sales-person' }, ] frappe.help.help_links['Form/Sales Person'] = [ - { label: 'Sales Person Target', url: 'https://frappe.github.io/erpnext/user/manual/en/selling/setup/sales-person-target-allocation' }, + { label: 'Sales Person Target', url: 'https://erpnext.com/docs/user/manual/en/selling/setup/sales-person-target-allocation' }, ] //Support frappe.help.help_links['List/Feedback Trigger'] = [ - { label: 'Feedback Trigger', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/feedback/setting-up-feedback' }, + { label: 'Feedback Trigger', url: 'https://erpnext.com/docs/user/manual/en/setting-up/feedback/setting-up-feedback' }, ] frappe.help.help_links['List/Feedback Request'] = [ - { label: 'Feedback Request', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/feedback/submit-feedback' }, + { label: 'Feedback Request', url: 'https://erpnext.com/docs/user/manual/en/setting-up/feedback/submit-feedback' }, ] frappe.help.help_links['List/Feedback Request'] = [ - { label: 'Feedback Request', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/feedback/submit-feedback' }, + { label: 'Feedback Request', url: 'https://erpnext.com/docs/user/manual/en/setting-up/feedback/submit-feedback' }, ] //Manufacturing frappe.help.help_links['Form/BOM'] = [ - { label: 'Bill of Material', url: 'https://frappe.github.io/erpnext/user/manual/en/manufacturing/bill-of-materials' }, - { label: 'Nested BOM Structure', url: 'https://frappe.github.io/erpnext/user/manual/en/manufacturing/articles/nested-bom-structure' }, + { label: 'Bill of Material', url: 'https://erpnext.com/docs/user/manual/en/manufacturing/bill-of-materials' }, + { label: 'Nested BOM Structure', url: 'https://erpnext.com/docs/user/manual/en/manufacturing/articles/nested-bom-structure' }, ] frappe.help.help_links['Form/Work Order'] = [ - { label: 'Work Order', url: 'https://frappe.github.io/erpnext/user/manual/en/manufacturing/work-order' }, + { label: 'Work Order', url: 'https://erpnext.com/docs/user/manual/en/manufacturing/work-order' }, ] frappe.help.help_links['Form/Workstation'] = [ - { label: 'Workstation', url: 'https://frappe.github.io/erpnext/user/manual/en/manufacturing/workstation' }, + { label: 'Workstation', url: 'https://erpnext.com/docs/user/manual/en/manufacturing/workstation' }, ] frappe.help.help_links['Form/Operation'] = [ - { label: 'Operation', url: 'https://frappe.github.io/erpnext/user/manual/en/manufacturing/operation' }, + { label: 'Operation', url: 'https://erpnext.com/docs/user/manual/en/manufacturing/operation' }, ] frappe.help.help_links['Form/BOM Update Tool'] = [ - { label: 'BOM Update Tool', url: 'https://frappe.github.io/erpnext/user/manual/en/manufacturing/tools/bom-update-tool' }, + { label: 'BOM Update Tool', url: 'https://erpnext.com/docs/user/manual/en/manufacturing/tools/bom-update-tool' }, ] //Customize frappe.help.help_links['Form/Customize Form'] = [ - { label: 'Custom Field', url: 'https://frappe.github.io/erpnext/user/manual/en/customize-erpnext/custom-field' }, - { label: 'Customize Field', url: 'https://frappe.github.io/erpnext/user/manual/en/customize-erpnext/customize-form' }, + { label: 'Custom Field', url: 'https://erpnext.com/docs/user/manual/en/customize-erpnext/custom-field' }, + { label: 'Customize Field', url: 'https://erpnext.com/docs/user/manual/en/customize-erpnext/customize-form' }, ] frappe.help.help_links['Form/Custom Field'] = [ - { label: 'Custom Field', url: 'https://frappe.github.io/erpnext/user/manual/en/customize-erpnext/custom-field' }, + { label: 'Custom Field', url: 'https://erpnext.com/docs/user/manual/en/customize-erpnext/custom-field' }, ] frappe.help.help_links['Form/Custom Field'] = [ - { label: 'Custom Field', url: 'https://frappe.github.io/erpnext/user/manual/en/customize-erpnext/custom-field' }, + { label: 'Custom Field', url: 'https://erpnext.com/docs/user/manual/en/customize-erpnext/custom-field' }, ] \ No newline at end of file From f2d0be729978bc85ca9b79bcac755337699e468f Mon Sep 17 00:00:00 2001 From: scmmishra Date: Mon, 21 Jan 2019 19:35:46 +0530 Subject: [PATCH 024/169] [feat] Modified help config --- erpnext/public/js/conf.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/erpnext/public/js/conf.js b/erpnext/public/js/conf.js index 32081550e69..7eb59e0489c 100644 --- a/erpnext/public/js/conf.js +++ b/erpnext/public/js/conf.js @@ -14,7 +14,7 @@ $(document).bind('toolbar_setup', function() { $('.navbar-home').html(''); - $('[data-link="docs"]').attr("href", "https://frappe.github.io/erpnext/") + $('[data-link="docs"]').attr("href", "https://erpnext.com/docs") $('[data-link="issues"]').attr("href", "https://github.com/frappe/erpnext/issues") @@ -23,7 +23,8 @@ $(document).bind('toolbar_setup', function() { // additional help links for erpnext var $help_menu = $('.dropdown-help ul .documentation-links'); - + $('
  • '+__('Documentation')+'
  • ').insertBefore($help_menu); $('
  • '+__('User Forum')+'
  • ').insertBefore($help_menu); $('
  • '+__('Documentation')+'
  • ').insertBefore($help_menu); $('
  • '+__('User Forum')+'
  • ').insertBefore($help_menu); diff --git a/erpnext/setup/page/welcome_to_erpnext/welcome_to_erpnext.html b/erpnext/setup/page/welcome_to_erpnext/welcome_to_erpnext.html index 57fce28eeb7..5808ce73ee9 100644 --- a/erpnext/setup/page/welcome_to_erpnext/welcome_to_erpnext.html +++ b/erpnext/setup/page/welcome_to_erpnext/welcome_to_erpnext.html @@ -22,7 +22,7 @@ diff --git a/erpnext/utilities/user_progress.py b/erpnext/utilities/user_progress.py index 2901d522762..71a5f904649 100644 --- a/erpnext/utilities/user_progress.py +++ b/erpnext/utilities/user_progress.py @@ -33,7 +33,7 @@ def get_slide_settings(): help_links=[ { "label": _("Chart of Accounts"), - "url": ["https://erpnext.org/docs/user/manual/en/accounts/chart-of-accounts"] + "url": ["https://erpnext.com/docs/user/manual/en/accounts/chart-of-accounts"] }, { "label": _("Opening Balances"), @@ -56,7 +56,7 @@ def get_slide_settings(): help_links=[ { "label": _('Learn More'), - "url": ["https://erpnext.org/docs/user/manual/en/setting-up/setting-company-sales-goal"] + "url": ["https://erpnext.com/docs/user/manual/en/setting-up/setting-company-sales-goal"] } ] ), @@ -80,7 +80,7 @@ def get_slide_settings(): help_links=[ { "label": _('Learn More'), - "url": ["https://erpnext.org/docs/user/manual/en/CRM/customer.html"] + "url": ["https://erpnext.com/docs/user/manual/en/CRM/customer.html"] } ] ), @@ -123,7 +123,7 @@ def get_slide_settings(): help_links=[ { "label": _('Learn More'), - "url": ["https://erpnext.org/docs/user/manual/en/buying/supplier"] + "url": ["https://erpnext.com/docs/user/manual/en/buying/supplier"] }, { "label": _('Customers and Suppliers'), @@ -261,7 +261,7 @@ def get_slide_settings(): help_links=[ { "label": _('Learn More'), - "url": ["https://erpnext.org/docs/user/manual/en/setting-up/users-and-permissions"] + "url": ["https://erpnext.com/docs/user/manual/en/setting-up/users-and-permissions"] }, { "label": _('Users and Permissions'), From 9731a02657026132ada006505e61fb5e7d9eba4d Mon Sep 17 00:00:00 2001 From: scmmishra Date: Fri, 25 Jan 2019 13:14:11 +0530 Subject: [PATCH 053/169] [feat] Added docsUrl variable to configure help_links --- erpnext/public/js/help_links.js | 352 ++++++++++++++++---------------- 1 file changed, 177 insertions(+), 175 deletions(-) diff --git a/erpnext/public/js/help_links.js b/erpnext/public/js/help_links.js index 20ba56a5ece..d3cc688cd20 100644 --- a/erpnext/public/js/help_links.js +++ b/erpnext/public/js/help_links.js @@ -1,524 +1,526 @@ frappe.provide('frappe.help.help_links'); +const docsUrl = 'https://erpnext.com/docs/' + frappe.help.help_links['Form/Rename Tool'] = [ - { label: 'Bulk Rename', url: 'https://erpnext.com/docs/user/manual/en/setting-up/data/bulk-rename' }, + { label: 'Bulk Rename', url: docsUrl + 'user/manual/en/setting-up/data/bulk-rename' }, ] //Setup frappe.help.help_links['List/User'] = [ - { label: 'New User', url: 'https://erpnext.com/docs/user/manual/en/setting-up/users-and-permissions/adding-users' }, - { label: 'Rename User', url: 'https://erpnext.com/docs/user/manual/en/setting-up/articles/rename-user' }, + { label: 'New User', url: docsUrl + 'user/manual/en/setting-up/users-and-permissions/adding-users' }, + { label: 'Rename User', url: docsUrl + 'user/manual/en/setting-up/articles/rename-user' }, ] frappe.help.help_links['permission-manager'] = [ - { label: 'Role Permissions Manager', url: 'https://erpnext.com/docs/user/manual/en/setting-up/users-and-permissions/role-based-permissions' }, - { label: 'Managing Perm Level in Permissions Manager', url: 'https://erpnext.com/docs/user/manual/en/setting-up/articles/managing-perm-level' }, - { label: 'User Permissions', url: 'https://erpnext.com/docs/user/manual/en/setting-up/users-and-permissions/user-permissions' }, - { label: 'Sharing', url: 'https://erpnext.com/docs/user/manual/en/setting-up/users-and-permissions/sharing' }, - { label: 'Password', url: 'https://erpnext.com/docs/user/manual/en/setting-up/articles/change-password' }, + { label: 'Role Permissions Manager', url: docsUrl + 'user/manual/en/setting-up/users-and-permissions/role-based-permissions' }, + { label: 'Managing Perm Level in Permissions Manager', url: docsUrl + 'user/manual/en/setting-up/articles/managing-perm-level' }, + { label: 'User Permissions', url: docsUrl + 'user/manual/en/setting-up/users-and-permissions/user-permissions' }, + { label: 'Sharing', url: docsUrl + 'user/manual/en/setting-up/users-and-permissions/sharing' }, + { label: 'Password', url: docsUrl + 'user/manual/en/setting-up/articles/change-password' }, ] frappe.help.help_links['Form/System Settings'] = [ - { label: 'Naming Series', url: 'https://erpnext.com/docs/user/manual/en/setting-up/settings/system-settings' }, + { label: 'Naming Series', url: docsUrl + 'user/manual/en/setting-up/settings/system-settings' }, ] frappe.help.help_links['data-import-tool'] = [ - { label: 'Importing and Exporting Data', url: 'https://erpnext.com/docs/user/manual/en/setting-up/data/data-import-tool' }, - { label: 'Overwriting Data from Data Import Tool', url: 'https://erpnext.com/docs/user/manual/en/setting-up/articles/overwriting-data-from-data-import-tool' }, + { label: 'Importing and Exporting Data', url: docsUrl + 'user/manual/en/setting-up/data/data-import-tool' }, + { label: 'Overwriting Data from Data Import Tool', url: docsUrl + 'user/manual/en/setting-up/articles/overwriting-data-from-data-import-tool' }, ] frappe.help.help_links['module_setup'] = [ - { label: 'Role Permissions Manager', url: 'https://erpnext.com/docs/user/manual/en/setting-up/users-and-permissions/role-based-permissions' }, + { label: 'Role Permissions Manager', url: docsUrl + 'user/manual/en/setting-up/users-and-permissions/role-based-permissions' }, ] frappe.help.help_links['Form/Naming Series'] = [ - { label: 'Naming Series', url: 'https://erpnext.com/docs/user/manual/en/setting-up/settings/naming-series' }, - { label: 'Setting the Current Value for Naming Series', url: 'https://erpnext.com/docs/user/manual/en/setting-up/articles/naming-series-current-value' }, + { label: 'Naming Series', url: docsUrl + 'user/manual/en/setting-up/settings/naming-series' }, + { label: 'Setting the Current Value for Naming Series', url: docsUrl + 'user/manual/en/setting-up/articles/naming-series-current-value' }, ] frappe.help.help_links['Form/Global Defaults'] = [ - { label: 'Global Settings', url: 'https://erpnext.com/docs/user/manual/en/setting-up/settings/global-defaults' }, + { label: 'Global Settings', url: docsUrl + 'user/manual/en/setting-up/settings/global-defaults' }, ] frappe.help.help_links['Form/Email Digest'] = [ - { label: 'Email Digest', url: 'https://erpnext.com/docs/user/manual/en/setting-up/email/email-digest' }, + { label: 'Email Digest', url: docsUrl + 'user/manual/en/setting-up/email/email-digest' }, ] frappe.help.help_links['List/Print Heading'] = [ - { label: 'Print Heading', url: 'https://erpnext.com/docs/user/manual/en/setting-up/print/print-headings' }, + { label: 'Print Heading', url: docsUrl + 'user/manual/en/setting-up/print/print-headings' }, ] frappe.help.help_links['List/Letter Head'] = [ - { label: 'Letter Head', url: 'https://erpnext.com/docs/user/manual/en/setting-up/print/letter-head' }, + { label: 'Letter Head', url: docsUrl + 'user/manual/en/setting-up/print/letter-head' }, ] frappe.help.help_links['List/Address Template'] = [ - { label: 'Address Template', url: 'https://erpnext.com/docs/user/manual/en/setting-up/print/address-template' }, + { label: 'Address Template', url: docsUrl + 'user/manual/en/setting-up/print/address-template' }, ] frappe.help.help_links['List/Terms and Conditions'] = [ - { label: 'Terms and Conditions', url: 'https://erpnext.com/docs/user/manual/en/setting-up/print/terms-and-conditions' }, + { label: 'Terms and Conditions', url: docsUrl + 'user/manual/en/setting-up/print/terms-and-conditions' }, ] frappe.help.help_links['List/Cheque Print Template'] = [ - { label: 'Cheque Print Template', url: 'https://erpnext.com/docs/user/manual/en/setting-up/print/cheque-print-template' }, + { label: 'Cheque Print Template', url: docsUrl + 'user/manual/en/setting-up/print/cheque-print-template' }, ] frappe.help.help_links['List/Email Account'] = [ - { label: 'Email Account', url: 'https://erpnext.com/docs/user/manual/en/setting-up/email/email-account' }, + { label: 'Email Account', url: docsUrl + 'user/manual/en/setting-up/email/email-account' }, ] frappe.help.help_links['List/Notification'] = [ - { label: 'Notification', url: 'https://erpnext.com/docs/user/manual/en/setting-up/email/notifications' }, + { label: 'Notification', url: docsUrl + 'user/manual/en/setting-up/email/notifications' }, ] frappe.help.help_links['Form/Notification'] = [ - { label: 'Notification', url: 'https://erpnext.com/docs/user/manual/en/setting-up/email/notifications' }, + { label: 'Notification', url: docsUrl + 'user/manual/en/setting-up/email/notifications' }, ] frappe.help.help_links['List/Email Digest'] = [ - { label: 'Email Digest', url: 'https://erpnext.com/docs/user/manual/en/setting-up/email/email-digest' }, + { label: 'Email Digest', url: docsUrl + 'user/manual/en/setting-up/email/email-digest' }, ] frappe.help.help_links['List/Auto Email Report'] = [ - { label: 'Auto Email Reports', url: 'https://erpnext.com/docs/user/manual/en/setting-up/email/email-reports' }, + { label: 'Auto Email Reports', url: docsUrl + 'user/manual/en/setting-up/email/email-reports' }, ] frappe.help.help_links['Form/Print Settings'] = [ - { label: 'Print Settings', url: 'https://erpnext.com/docs/user/manual/en/setting-up/print/print-settings' }, + { label: 'Print Settings', url: docsUrl + 'user/manual/en/setting-up/print/print-settings' }, ] frappe.help.help_links['print-format-builder'] = [ - { label: 'Print Format Builder', url: 'https://erpnext.com/docs/user/manual/en/setting-up/print/print-settings' }, + { label: 'Print Format Builder', url: docsUrl + 'user/manual/en/setting-up/print/print-settings' }, ] frappe.help.help_links['List/Print Heading'] = [ - { label: 'Print Heading', url: 'https://erpnext.com/docs/user/manual/en/setting-up/print/print-headings' }, + { label: 'Print Heading', url: docsUrl + 'user/manual/en/setting-up/print/print-headings' }, ] //setup-integrations frappe.help.help_links['Form/PayPal Settings'] = [ - { label: 'PayPal Settings', url: 'https://erpnext.com/docs/user/manual/en/setting-up/integrations/paypal-integration' }, + { label: 'PayPal Settings', url: docsUrl + 'user/manual/en/setting-up/integrations/paypal-integration' }, ] frappe.help.help_links['Form/Razorpay Settings'] = [ - { label: 'Razorpay Settings', url: 'https://erpnext.com/docs/user/manual/en/setting-up/integrations/razorpay-integration' }, + { label: 'Razorpay Settings', url: docsUrl + 'user/manual/en/setting-up/integrations/razorpay-integration' }, ] frappe.help.help_links['Form/Dropbox Settings'] = [ - { label: 'Dropbox Settings', url: 'https://erpnext.com/docs/user/manual/en/setting-up/integrations/dropbox-backup' }, + { label: 'Dropbox Settings', url: docsUrl + 'user/manual/en/setting-up/integrations/dropbox-backup' }, ] frappe.help.help_links['Form/LDAP Settings'] = [ - { label: 'LDAP Settings', url: 'https://erpnext.com/docs/user/manual/en/setting-up/integrations/ldap-integration' }, + { label: 'LDAP Settings', url: docsUrl + 'user/manual/en/setting-up/integrations/ldap-integration' }, ] frappe.help.help_links['Form/Stripe Settings'] = [ - { label: 'Stripe Settings', url: 'https://erpnext.com/docs/user/manual/en/setting-up/integrations/stripe-integration' }, + { label: 'Stripe Settings', url: docsUrl + 'user/manual/en/setting-up/integrations/stripe-integration' }, ] //Sales frappe.help.help_links['Form/Quotation'] = [ - { label: 'Quotation', url: 'https://erpnext.com/docs/user/manual/en/selling/quotation' }, - { label: 'Applying Discount', url: 'https://erpnext.com/docs/user/manual/en/selling/articles/applying-discount' }, - { label: 'Sales Person', url: 'https://erpnext.com/docs/user/manual/en/selling/articles/sales-persons-in-the-sales-transactions' }, - { label: 'Applying Margin', url: 'https://erpnext.com/docs/user/manual/en/selling/articles/adding-margin' }, + { label: 'Quotation', url: docsUrl + 'user/manual/en/selling/quotation' }, + { label: 'Applying Discount', url: docsUrl + 'user/manual/en/selling/articles/applying-discount' }, + { label: 'Sales Person', url: docsUrl + 'user/manual/en/selling/articles/sales-persons-in-the-sales-transactions' }, + { label: 'Applying Margin', url: docsUrl + 'user/manual/en/selling/articles/adding-margin' }, ] frappe.help.help_links['List/Customer'] = [ - { label: 'Customer', url: 'https://erpnext.com/docs/user/manual/en/CRM/customer' }, - { label: 'Credit Limit', url: 'https://erpnext.com/docs/user/manual/en/accounts/credit-limit' }, + { label: 'Customer', url: docsUrl + 'user/manual/en/CRM/customer' }, + { label: 'Credit Limit', url: docsUrl + 'user/manual/en/accounts/credit-limit' }, ] frappe.help.help_links['Form/Customer'] = [ - { label: 'Customer', url: 'https://erpnext.com/docs/user/manual/en/CRM/customer' }, - { label: 'Credit Limit', url: 'https://erpnext.com/docs/user/manual/en/accounts/credit-limit' }, + { label: 'Customer', url: docsUrl + 'user/manual/en/CRM/customer' }, + { label: 'Credit Limit', url: docsUrl + 'user/manual/en/accounts/credit-limit' }, ] frappe.help.help_links['List/Sales Taxes and Charges Template'] = [ - { label: 'Setting Up Taxes', url: 'https://erpnext.com/docs/user/manual/en/setting-up/setting-up-taxes' }, + { label: 'Setting Up Taxes', url: docsUrl + 'user/manual/en/setting-up/setting-up-taxes' }, ] frappe.help.help_links['Form/Sales Taxes and Charges Template'] = [ - { label: 'Setting Up Taxes', url: 'https://erpnext.com/docs/user/manual/en/setting-up/setting-up-taxes' }, + { label: 'Setting Up Taxes', url: docsUrl + 'user/manual/en/setting-up/setting-up-taxes' }, ] frappe.help.help_links['List/Sales Order'] = [ - { label: 'Sales Order', url: 'https://erpnext.com/docs/user/manual/en/selling/sales-order' }, - { label: 'Recurring Sales Order', url: 'https://erpnext.com/docs/user/manual/en/accounts/recurring-orders-and-invoices' }, - { label: 'Applying Discount', url: 'https://erpnext.com/docs/user/manual/en/selling/articles/applying-discount' }, + { label: 'Sales Order', url: docsUrl + 'user/manual/en/selling/sales-order' }, + { label: 'Recurring Sales Order', url: docsUrl + 'user/manual/en/accounts/recurring-orders-and-invoices' }, + { label: 'Applying Discount', url: docsUrl + 'user/manual/en/selling/articles/applying-discount' }, ] frappe.help.help_links['Form/Sales Order'] = [ - { label: 'Sales Order', url: 'https://erpnext.com/docs/user/manual/en/selling/sales-order' }, - { label: 'Recurring Sales Order', url: 'https://erpnext.com/docs/user/manual/en/accounts/recurring-orders-and-invoices' }, - { label: 'Applying Discount', url: 'https://erpnext.com/docs/user/manual/en/selling/articles/applying-discount' }, - { label: 'Drop Shipping', url: 'https://erpnext.com/docs/user/manual/en/selling/articles/drop-shipping' }, - { label: 'Sales Person', url: 'https://erpnext.com/docs/user/manual/en/selling/articles/sales-persons-in-the-sales-transactions' }, - { label: 'Close Sales Order', url: 'https://erpnext.com/docs/user/manual/en/selling/articles/close-sales-order' }, - { label: 'Applying Margin', url: 'https://erpnext.com/docs/user/manual/en/selling/articles/adding-margin' }, + { label: 'Sales Order', url: docsUrl + 'user/manual/en/selling/sales-order' }, + { label: 'Recurring Sales Order', url: docsUrl + 'user/manual/en/accounts/recurring-orders-and-invoices' }, + { label: 'Applying Discount', url: docsUrl + 'user/manual/en/selling/articles/applying-discount' }, + { label: 'Drop Shipping', url: docsUrl + 'user/manual/en/selling/articles/drop-shipping' }, + { label: 'Sales Person', url: docsUrl + 'user/manual/en/selling/articles/sales-persons-in-the-sales-transactions' }, + { label: 'Close Sales Order', url: docsUrl + 'user/manual/en/selling/articles/close-sales-order' }, + { label: 'Applying Margin', url: docsUrl + 'user/manual/en/selling/articles/adding-margin' }, ] frappe.help.help_links['Form/Product Bundle'] = [ - { label: 'Product Bundle', url: 'https://erpnext.com/docs/user/manual/en/selling/setup/product-bundle' }, + { label: 'Product Bundle', url: docsUrl + 'user/manual/en/selling/setup/product-bundle' }, ] frappe.help.help_links['Form/Selling Settings'] = [ - { label: 'Selling Settings', url: 'https://erpnext.com/docs/user/manual/en/selling/setup/selling-settings' }, + { label: 'Selling Settings', url: docsUrl + 'user/manual/en/selling/setup/selling-settings' }, ] //Buying frappe.help.help_links['List/Supplier'] = [ - { label: 'Supplier', url: 'https://erpnext.com/docs/user/manual/en/buying/supplier' }, + { label: 'Supplier', url: docsUrl + 'user/manual/en/buying/supplier' }, ] frappe.help.help_links['Form/Supplier'] = [ - { label: 'Supplier', url: 'https://erpnext.com/docs/user/manual/en/buying/supplier' }, + { label: 'Supplier', url: docsUrl + 'user/manual/en/buying/supplier' }, ] frappe.help.help_links['Form/Request for Quotation'] = [ - { label: 'Request for Quotation', url: 'https://erpnext.com/docs/user/manual/en/buying/request-for-quotation' }, - { label: 'RFQ Video', url: 'https://erpnext.com/docs/user/videos/learn/request-for-quotation.html' }, + { label: 'Request for Quotation', url: docsUrl + 'user/manual/en/buying/request-for-quotation' }, + { label: 'RFQ Video', url: docsUrl + 'user/videos/learn/request-for-quotation.html' }, ] frappe.help.help_links['Form/Supplier Quotation'] = [ - { label: 'Supplier Quotation', url: 'https://erpnext.com/docs/user/manual/en/buying/supplier-quotation' }, + { label: 'Supplier Quotation', url: docsUrl + 'user/manual/en/buying/supplier-quotation' }, ] frappe.help.help_links['Form/Buying Settings'] = [ - { label: 'Buying Settings', url: 'https://erpnext.com/docs/user/manual/en/buying/setup/buying-settings' }, + { label: 'Buying Settings', url: docsUrl + 'user/manual/en/buying/setup/buying-settings' }, ] frappe.help.help_links['List/Purchase Order'] = [ - { label: 'Purchase Order', url: 'https://erpnext.com/docs/user/manual/en/buying/purchase-order' }, - { label: 'Recurring Purchase Order', url: 'https://erpnext.com/docs/user/manual/en/accounts/recurring-orders-and-invoices' }, + { label: 'Purchase Order', url: docsUrl + 'user/manual/en/buying/purchase-order' }, + { label: 'Recurring Purchase Order', url: docsUrl + 'user/manual/en/accounts/recurring-orders-and-invoices' }, ] frappe.help.help_links['Form/Purchase Order'] = [ - { label: 'Purchase Order', url: 'https://erpnext.com/docs/user/manual/en/buying/purchase-order' }, - { label: 'Item UoM', url: 'https://erpnext.com/docs/user/manual/en/buying/articles/purchasing-in-different-unit' }, - { label: 'Supplier Item Code', url: 'https://erpnext.com/docs/user/manual/en/buying/articles/maintaining-suppliers-part-no-in-item' }, - { label: 'Recurring Purchase Order', url: 'https://erpnext.com/docs/user/manual/en/accounts/recurring-orders-and-invoices' }, - { label: 'Subcontracting', url: 'https://erpnext.com/docs/user/manual/en/manufacturing/subcontracting' }, + { label: 'Purchase Order', url: docsUrl + 'user/manual/en/buying/purchase-order' }, + { label: 'Item UoM', url: docsUrl + 'user/manual/en/buying/articles/purchasing-in-different-unit' }, + { label: 'Supplier Item Code', url: docsUrl + 'user/manual/en/buying/articles/maintaining-suppliers-part-no-in-item' }, + { label: 'Recurring Purchase Order', url: docsUrl + 'user/manual/en/accounts/recurring-orders-and-invoices' }, + { label: 'Subcontracting', url: docsUrl + 'user/manual/en/manufacturing/subcontracting' }, ] frappe.help.help_links['List/Purchase Taxes and Charges Template'] = [ - { label: 'Setting Up Taxes', url: 'https://erpnext.com/docs/user/manual/en/setting-up/setting-up-taxes' }, + { label: 'Setting Up Taxes', url: docsUrl + 'user/manual/en/setting-up/setting-up-taxes' }, ] frappe.help.help_links['List/POS Profile'] = [ - { label: 'POS Profile', url: 'https://erpnext.com/docs/user/manual/en/setting-up/pos-setting' }, + { label: 'POS Profile', url: docsUrl + 'user/manual/en/setting-up/pos-setting' }, ] frappe.help.help_links['List/Price List'] = [ - { label: 'Price List', url: 'https://erpnext.com/docs/user/manual/en/setting-up/price-lists' }, + { label: 'Price List', url: docsUrl + 'user/manual/en/setting-up/price-lists' }, ] frappe.help.help_links['List/Authorization Rule'] = [ - { label: 'Authorization Rule', url: 'https://erpnext.com/docs/user/manual/en/setting-up/authorization-rule' }, + { label: 'Authorization Rule', url: docsUrl + 'user/manual/en/setting-up/authorization-rule' }, ] frappe.help.help_links['Form/SMS Settings'] = [ - { label: 'SMS Settings', url: 'https://erpnext.com/docs/user/manual/en/setting-up/sms-setting' }, + { label: 'SMS Settings', url: docsUrl + 'user/manual/en/setting-up/sms-setting' }, ] frappe.help.help_links['List/Stock Reconciliation'] = [ - { label: 'Stock Reconciliation', url: 'https://erpnext.com/docs/user/manual/en/setting-up/stock-reconciliation-for-non-serialized-item' }, + { label: 'Stock Reconciliation', url: docsUrl + 'user/manual/en/setting-up/stock-reconciliation-for-non-serialized-item' }, ] frappe.help.help_links['Tree/Territory'] = [ - { label: 'Territory', url: 'https://erpnext.com/docs/user/manual/en/setting-up/territory' }, + { label: 'Territory', url: docsUrl + 'user/manual/en/setting-up/territory' }, ] frappe.help.help_links['Form/Dropbox Backup'] = [ - { label: 'Dropbox Backup', url: 'https://erpnext.com/docs/user/manual/en/setting-up/third-party-backups' }, - { label: 'Setting Up Dropbox Backup', url: 'https://erpnext.com/docs/user/manual/en/setting-up/articles/setting-up-dropbox-backups' }, + { label: 'Dropbox Backup', url: docsUrl + 'user/manual/en/setting-up/third-party-backups' }, + { label: 'Setting Up Dropbox Backup', url: docsUrl + 'user/manual/en/setting-up/articles/setting-up-dropbox-backups' }, ] frappe.help.help_links['List/Workflow'] = [ - { label: 'Workflow', url: 'https://erpnext.com/docs/user/manual/en/setting-up/workflows' }, + { label: 'Workflow', url: docsUrl + 'user/manual/en/setting-up/workflows' }, ] frappe.help.help_links['List/Company'] = [ - { label: 'Company', url: 'https://erpnext.com/docs/user/manual/en/setting-up/company-setup' }, - { label: 'Managing Multiple Companies', url: 'https://erpnext.com/docs/user/manual/en/setting-up/articles/managing-multiple-companies' }, - { label: 'Delete All Related Transactions for a Company', url: 'https://erpnext.com/docs/user/manual/en/setting-up/articles/delete-a-company-and-all-related-transactions' }, + { label: 'Company', url: docsUrl + 'user/manual/en/setting-up/company-setup' }, + { label: 'Managing Multiple Companies', url: docsUrl + 'user/manual/en/setting-up/articles/managing-multiple-companies' }, + { label: 'Delete All Related Transactions for a Company', url: docsUrl + 'user/manual/en/setting-up/articles/delete-a-company-and-all-related-transactions' }, ] //Accounts frappe.help.help_links['modules/Accounts'] = [ { label: 'Introduction to Accounts', url: 'http://erpnext.com/docs/user/manual/en/accounts/' }, - { label: 'Chart of Accounts', url: 'https://erpnext.com/docs/user/manual/en/accounts/chart-of-accounts.html' }, - { label: 'Multi Currency Accounting', url: 'https://erpnext.com/docs/user/manual/en/accounts/multi-currency-accounting' }, + { label: 'Chart of Accounts', url: docsUrl + 'user/manual/en/accounts/chart-of-accounts.html' }, + { label: 'Multi Currency Accounting', url: docsUrl + 'user/manual/en/accounts/multi-currency-accounting' }, ] frappe.help.help_links['Tree/Account'] = [ - { label: 'Chart of Accounts', url: 'https://erpnext.com/docs/user/manual/en/accounts/chart-of-accounts' }, - { label: 'Managing Tree Mastes', url: 'https://erpnext.com/docs/user/manual/en/setting-up/articles/managing-tree-structure-masters' }, + { label: 'Chart of Accounts', url: docsUrl + 'user/manual/en/accounts/chart-of-accounts' }, + { label: 'Managing Tree Mastes', url: docsUrl + 'user/manual/en/setting-up/articles/managing-tree-structure-masters' }, ] frappe.help.help_links['Form/Sales Invoice'] = [ - { label: 'Sales Invoice', url: 'https://erpnext.com/docs/user/manual/en/accounts/sales-invoice' }, - { label: 'Accounts Opening Balance', url: 'https://erpnext.com/docs/user/manual/en/accounts/opening-accounts' }, - { label: 'Sales Return', url: 'https://erpnext.com/docs/user/manual/en/stock/sales-return' }, - { label: 'Recurring Sales Invoice', url: 'https://erpnext.com/docs/user/manual/en/accounts/recurring-orders-and-invoices' }, + { label: 'Sales Invoice', url: docsUrl + 'user/manual/en/accounts/sales-invoice' }, + { label: 'Accounts Opening Balance', url: docsUrl + 'user/manual/en/accounts/opening-accounts' }, + { label: 'Sales Return', url: docsUrl + 'user/manual/en/stock/sales-return' }, + { label: 'Recurring Sales Invoice', url: docsUrl + 'user/manual/en/accounts/recurring-orders-and-invoices' }, ] frappe.help.help_links['List/Sales Invoice'] = [ - { label: 'Sales Invoice', url: 'https://erpnext.com/docs/user/manual/en/accounts/sales-invoice' }, - { label: 'Accounts Opening Balance', url: 'https://erpnext.com/docs/user/manual/en/accounts/opening-accounts' }, - { label: 'Sales Return', url: 'https://erpnext.com/docs/user/manual/en/stock/sales-return' }, - { label: 'Recurring Sales Invoice', url: 'https://erpnext.com/docs/user/manual/en/accounts/recurring-orders-and-invoices' }, + { label: 'Sales Invoice', url: docsUrl + 'user/manual/en/accounts/sales-invoice' }, + { label: 'Accounts Opening Balance', url: docsUrl + 'user/manual/en/accounts/opening-accounts' }, + { label: 'Sales Return', url: docsUrl + 'user/manual/en/stock/sales-return' }, + { label: 'Recurring Sales Invoice', url: docsUrl + 'user/manual/en/accounts/recurring-orders-and-invoices' }, ] frappe.help.help_links['pos'] = [ - { label: 'Point of Sale Invoice', url: 'https://erpnext.com/docs/user/manual/en/accounts/point-of-sale-pos-invoice' }, + { label: 'Point of Sale Invoice', url: docsUrl + 'user/manual/en/accounts/point-of-sale-pos-invoice' }, ] frappe.help.help_links['List/POS Profile'] = [ - { label: 'Point of Sale Profile', url: 'https://erpnext.com/docs/user/manual/en/setting-up/pos-setting' }, + { label: 'Point of Sale Profile', url: docsUrl + 'user/manual/en/setting-up/pos-setting' }, ] frappe.help.help_links['List/Purchase Invoice'] = [ - { label: 'Purchase Invoice', url: 'https://erpnext.com/docs/user/manual/en/accounts/purchase-invoice' }, - { label: 'Accounts Opening Balance', url: 'https://erpnext.com/docs/user/manual/en/accounts/opening-accounts' }, - { label: 'Recurring Purchase Invoice', url: 'https://erpnext.com/docs/user/manual/en/accounts/recurring-orders-and-invoices' }, + { label: 'Purchase Invoice', url: docsUrl + 'user/manual/en/accounts/purchase-invoice' }, + { label: 'Accounts Opening Balance', url: docsUrl + 'user/manual/en/accounts/opening-accounts' }, + { label: 'Recurring Purchase Invoice', url: docsUrl + 'user/manual/en/accounts/recurring-orders-and-invoices' }, ] frappe.help.help_links['List/Journal Entry'] = [ - { label: 'Journal Entry', url: 'https://erpnext.com/docs/user/manual/en/accounts/journal-entry' }, - { label: 'Advance Payment Entry', url: 'https://erpnext.com/docs/user/manual/en/accounts/advance-payment-entry' }, - { label: 'Accounts Opening Balance', url: 'https://erpnext.com/docs/user/manual/en/accounts/opening-accounts' }, + { label: 'Journal Entry', url: docsUrl + 'user/manual/en/accounts/journal-entry' }, + { label: 'Advance Payment Entry', url: docsUrl + 'user/manual/en/accounts/advance-payment-entry' }, + { label: 'Accounts Opening Balance', url: docsUrl + 'user/manual/en/accounts/opening-accounts' }, ] frappe.help.help_links['List/Payment Entry'] = [ - { label: 'Payment Entry', url: 'https://erpnext.com/docs/user/manual/en/accounts/payment-entry' }, + { label: 'Payment Entry', url: docsUrl + 'user/manual/en/accounts/payment-entry' }, ] frappe.help.help_links['List/Payment Request'] = [ - { label: 'Payment Request', url: 'https://erpnext.com/docs/user/manual/en/accounts/payment-request' }, + { label: 'Payment Request', url: docsUrl + 'user/manual/en/accounts/payment-request' }, ] frappe.help.help_links['List/Asset'] = [ - { label: 'Managing Fixed Assets', url: 'https://erpnext.com/docs/user/manual/en/accounts/managing-fixed-assets' }, + { label: 'Managing Fixed Assets', url: docsUrl + 'user/manual/en/accounts/managing-fixed-assets' }, ] frappe.help.help_links['List/Asset Category'] = [ - { label: 'Asset Category', url: 'https://erpnext.com/docs/user/manual/en/accounts/managing-fixed-assets' }, + { label: 'Asset Category', url: docsUrl + 'user/manual/en/accounts/managing-fixed-assets' }, ] frappe.help.help_links['Tree/Cost Center'] = [ - { label: 'Budgeting', url: 'https://erpnext.com/docs/user/manual/en/accounts/budgeting' }, + { label: 'Budgeting', url: docsUrl + 'user/manual/en/accounts/budgeting' }, ] frappe.help.help_links['List/Item'] = [ { label: 'Item', url: 'http://erpnext.com/docs/user/manual/en/stock/item' }, - { label: 'Item Price', url: 'https://erpnext.com/docs/user/manual/en/stock/item/item-price' }, - { label: 'Barcode', url: 'https://erpnext.com/docs/user/manual/en/stock/articles/track-items-using-barcode' }, - { label: 'Item Wise Taxation', url: 'https://erpnext.com/docs/user/manual/en/accounts/item-wise-taxation' }, - { label: 'Managing Fixed Assets', url: 'https://erpnext.com/docs/user/manual/en/accounts/managing-fixed-assets' }, - { label: 'Item Codification', url: 'https://erpnext.com/docs/user/manual/en/stock/item/item-codification' }, - { label: 'Item Variants', url: 'https://erpnext.com/docs/user/manual/en/stock/item/item-variants' }, - { label: 'Item Valuation', url: 'https://erpnext.com/docs/user/manual/en/stock/item/item-valuation-fifo-and-moving-average' }, + { label: 'Item Price', url: docsUrl + 'user/manual/en/stock/item/item-price' }, + { label: 'Barcode', url: docsUrl + 'user/manual/en/stock/articles/track-items-using-barcode' }, + { label: 'Item Wise Taxation', url: docsUrl + 'user/manual/en/accounts/item-wise-taxation' }, + { label: 'Managing Fixed Assets', url: docsUrl + 'user/manual/en/accounts/managing-fixed-assets' }, + { label: 'Item Codification', url: docsUrl + 'user/manual/en/stock/item/item-codification' }, + { label: 'Item Variants', url: docsUrl + 'user/manual/en/stock/item/item-variants' }, + { label: 'Item Valuation', url: docsUrl + 'user/manual/en/stock/item/item-valuation-fifo-and-moving-average' }, ] frappe.help.help_links['Form/Item'] = [ { label: 'Item', url: 'http://erpnext.com/docs/user/manual/en/stock/item' }, - { label: 'Item Price', url: 'https://erpnext.com/docs/user/manual/en/stock/item/item-price' }, - { label: 'Barcode', url: 'https://erpnext.com/docs/user/manual/en/stock/articles/track-items-using-barcode' }, - { label: 'Item Wise Taxation', url: 'https://erpnext.com/docs/user/manual/en/accounts/item-wise-taxation' }, - { label: 'Managing Fixed Assets', url: 'https://erpnext.com/docs/user/manual/en/accounts/managing-fixed-assets' }, - { label: 'Item Codification', url: 'https://erpnext.com/docs/user/manual/en/stock/item/item-codification' }, - { label: 'Item Variants', url: 'https://erpnext.com/docs/user/manual/en/stock/item/item-variants' }, - { label: 'Item Valuation', url: 'https://erpnext.com/docs/user/manual/en/stock/item/item-valuation-fifo-and-moving-average' }, + { label: 'Item Price', url: docsUrl + 'user/manual/en/stock/item/item-price' }, + { label: 'Barcode', url: docsUrl + 'user/manual/en/stock/articles/track-items-using-barcode' }, + { label: 'Item Wise Taxation', url: docsUrl + 'user/manual/en/accounts/item-wise-taxation' }, + { label: 'Managing Fixed Assets', url: docsUrl + 'user/manual/en/accounts/managing-fixed-assets' }, + { label: 'Item Codification', url: docsUrl + 'user/manual/en/stock/item/item-codification' }, + { label: 'Item Variants', url: docsUrl + 'user/manual/en/stock/item/item-variants' }, + { label: 'Item Valuation', url: docsUrl + 'user/manual/en/stock/item/item-valuation-fifo-and-moving-average' }, ] frappe.help.help_links['List/Purchase Receipt'] = [ - { label: 'Purchase Receipt', url: 'https://erpnext.com/docs/user/manual/en/stock/purchase-receipt' }, - { label: 'Barcode', url: 'https://erpnext.com/docs/user/manual/en/stock/articles/track-items-using-barcode' }, + { label: 'Purchase Receipt', url: docsUrl + 'user/manual/en/stock/purchase-receipt' }, + { label: 'Barcode', url: docsUrl + 'user/manual/en/stock/articles/track-items-using-barcode' }, ] frappe.help.help_links['List/Delivery Note'] = [ - { label: 'Delivery Note', url: 'https://erpnext.com/docs/user/manual/en/stock/delivery-note' }, - { label: 'Barcode', url: 'https://erpnext.com/docs/user/manual/en/stock/articles/track-items-using-barcode' }, - { label: 'Sales Return', url: 'https://erpnext.com/docs/user/manual/en/stock/sales-return' }, + { label: 'Delivery Note', url: docsUrl + 'user/manual/en/stock/delivery-note' }, + { label: 'Barcode', url: docsUrl + 'user/manual/en/stock/articles/track-items-using-barcode' }, + { label: 'Sales Return', url: docsUrl + 'user/manual/en/stock/sales-return' }, ] frappe.help.help_links['Form/Delivery Note'] = [ - { label: 'Delivery Note', url: 'https://erpnext.com/docs/user/manual/en/stock/delivery-note' }, - { label: 'Sales Return', url: 'https://erpnext.com/docs/user/manual/en/stock/sales-return' }, - { label: 'Barcode', url: 'https://erpnext.com/docs/user/manual/en/stock/articles/track-items-using-barcode' }, - { label: 'Subcontracting', url: 'https://erpnext.com/docs/user/manual/en/manufacturing/subcontracting' }, + { label: 'Delivery Note', url: docsUrl + 'user/manual/en/stock/delivery-note' }, + { label: 'Sales Return', url: docsUrl + 'user/manual/en/stock/sales-return' }, + { label: 'Barcode', url: docsUrl + 'user/manual/en/stock/articles/track-items-using-barcode' }, + { label: 'Subcontracting', url: docsUrl + 'user/manual/en/manufacturing/subcontracting' }, ] frappe.help.help_links['List/Installation Note'] = [ - { label: 'Installation Note', url: 'https://erpnext.com/docs/user/manual/en/stock/installation-note' }, + { label: 'Installation Note', url: docsUrl + 'user/manual/en/stock/installation-note' }, ] frappe.help.help_links['Tree'] = [ - { label: 'Managing Tree Structure Masters', url: 'https://erpnext.com/docs/user/manual/en/setting-up/articles/managing-tree-structure-masters' }, + { label: 'Managing Tree Structure Masters', url: docsUrl + 'user/manual/en/setting-up/articles/managing-tree-structure-masters' }, ] frappe.help.help_links['List/Budget'] = [ - { label: 'Budgeting', url: 'https://erpnext.com/docs/user/manual/en/accounts/budgeting' }, + { label: 'Budgeting', url: docsUrl + 'user/manual/en/accounts/budgeting' }, ] //Stock frappe.help.help_links['List/Material Request'] = [ - { label: 'Material Request', url: 'https://erpnext.com/docs/user/manual/en/stock/material-request' }, - { label: 'Auto-creation of Material Request', url: 'https://erpnext.com/docs/user/manual/en/stock/articles/auto-creation-of-material-request' }, + { label: 'Material Request', url: docsUrl + 'user/manual/en/stock/material-request' }, + { label: 'Auto-creation of Material Request', url: docsUrl + 'user/manual/en/stock/articles/auto-creation-of-material-request' }, ] frappe.help.help_links['Form/Material Request'] = [ - { label: 'Material Request', url: 'https://erpnext.com/docs/user/manual/en/stock/material-request' }, - { label: 'Auto-creation of Material Request', url: 'https://erpnext.com/docs/user/manual/en/stock/articles/auto-creation-of-material-request' }, + { label: 'Material Request', url: docsUrl + 'user/manual/en/stock/material-request' }, + { label: 'Auto-creation of Material Request', url: docsUrl + 'user/manual/en/stock/articles/auto-creation-of-material-request' }, ] frappe.help.help_links['Form/Stock Entry'] = [ - { label: 'Stock Entry', url: 'https://erpnext.com/docs/user/manual/en/stock/stock-entry' }, - { label: 'Stock Entry Types', url: 'https://erpnext.com/docs/user/manual/en/stock/articles/stock-entry-purpose' }, - { label: 'Repack Entry', url: 'https://erpnext.com/docs/user/manual/en/stock/articles/repack-entry' }, - { label: 'Opening Stock', url: 'https://erpnext.com/docs/user/manual/en/stock/opening-stock' }, - { label: 'Subcontracting', url: 'https://erpnext.com/docs/user/manual/en/manufacturing/subcontracting' }, + { label: 'Stock Entry', url: docsUrl + 'user/manual/en/stock/stock-entry' }, + { label: 'Stock Entry Types', url: docsUrl + 'user/manual/en/stock/articles/stock-entry-purpose' }, + { label: 'Repack Entry', url: docsUrl + 'user/manual/en/stock/articles/repack-entry' }, + { label: 'Opening Stock', url: docsUrl + 'user/manual/en/stock/opening-stock' }, + { label: 'Subcontracting', url: docsUrl + 'user/manual/en/manufacturing/subcontracting' }, ] frappe.help.help_links['List/Stock Entry'] = [ - { label: 'Stock Entry', url: 'https://erpnext.com/docs/user/manual/en/stock/stock-entry' }, + { label: 'Stock Entry', url: docsUrl + 'user/manual/en/stock/stock-entry' }, ] frappe.help.help_links['Tree/Warehouse'] = [ - { label: 'Warehouse', url: 'https://erpnext.com/docs/user/manual/en/stock/warehouse' }, + { label: 'Warehouse', url: docsUrl + 'user/manual/en/stock/warehouse' }, ] frappe.help.help_links['List/Serial No'] = [ - { label: 'Serial No', url: 'https://erpnext.com/docs/user/manual/en/stock/serial-no' }, + { label: 'Serial No', url: docsUrl + 'user/manual/en/stock/serial-no' }, ] frappe.help.help_links['Form/Serial No'] = [ - { label: 'Serial No', url: 'https://erpnext.com/docs/user/manual/en/stock/serial-no' }, + { label: 'Serial No', url: docsUrl + 'user/manual/en/stock/serial-no' }, ] frappe.help.help_links['Form/Batch'] = [ - { label: 'Batch', url: 'https://erpnext.com/docs/user/manual/en/stock/batch' }, + { label: 'Batch', url: docsUrl + 'user/manual/en/stock/batch' }, ] frappe.help.help_links['Form/Packing Slip'] = [ - { label: 'Packing Slip', url: 'https://erpnext.com/docs/user/manual/en/stock/tools/packing-slip' }, + { label: 'Packing Slip', url: docsUrl + 'user/manual/en/stock/tools/packing-slip' }, ] frappe.help.help_links['Form/Quality Inspection'] = [ - { label: 'Quality Inspection', url: 'https://erpnext.com/docs/user/manual/en/stock/tools/quality-inspection' }, + { label: 'Quality Inspection', url: docsUrl + 'user/manual/en/stock/tools/quality-inspection' }, ] frappe.help.help_links['Form/Landed Cost Voucher'] = [ - { label: 'Landed Cost Voucher', url: 'https://erpnext.com/docs/user/manual/en/stock/tools/landed-cost-voucher' }, + { label: 'Landed Cost Voucher', url: docsUrl + 'user/manual/en/stock/tools/landed-cost-voucher' }, ] frappe.help.help_links['Tree/Item Group'] = [ - { label: 'Item Group', url: 'https://erpnext.com/docs/user/manual/en/stock/setup/item-group' }, + { label: 'Item Group', url: docsUrl + 'user/manual/en/stock/setup/item-group' }, ] frappe.help.help_links['Form/Item Attribute'] = [ - { label: 'Item Attribute', url: 'https://erpnext.com/docs/user/manual/en/stock/setup/item-attribute' }, + { label: 'Item Attribute', url: docsUrl + 'user/manual/en/stock/setup/item-attribute' }, ] frappe.help.help_links['Form/UOM'] = [ - { label: 'Fractions in UOM', url: 'https://erpnext.com/docs/user/manual/en/stock/articles/managing-fractions-in-uom' }, + { label: 'Fractions in UOM', url: docsUrl + 'user/manual/en/stock/articles/managing-fractions-in-uom' }, ] frappe.help.help_links['Form/Stock Reconciliation'] = [ - { label: 'Opening Stock Entry', url: 'https://erpnext.com/docs/user/manual/en/stock/opening-stock' }, + { label: 'Opening Stock Entry', url: docsUrl + 'user/manual/en/stock/opening-stock' }, ] //CRM frappe.help.help_links['Form/Lead'] = [ - { label: 'Lead', url: 'https://erpnext.com/docs/user/manual/en/CRM/lead' }, + { label: 'Lead', url: docsUrl + 'user/manual/en/CRM/lead' }, ] frappe.help.help_links['Form/Opportunity'] = [ - { label: 'Opportunity', url: 'https://erpnext.com/docs/user/manual/en/CRM/opportunity' }, + { label: 'Opportunity', url: docsUrl + 'user/manual/en/CRM/opportunity' }, ] frappe.help.help_links['Form/Address'] = [ - { label: 'Address', url: 'https://erpnext.com/docs/user/manual/en/CRM/contact' }, + { label: 'Address', url: docsUrl + 'user/manual/en/CRM/contact' }, ] frappe.help.help_links['Form/Contact'] = [ - { label: 'Contact', url: 'https://erpnext.com/docs/user/manual/en/CRM/contact' }, + { label: 'Contact', url: docsUrl + 'user/manual/en/CRM/contact' }, ] frappe.help.help_links['Form/Newsletter'] = [ - { label: 'Newsletter', url: 'https://erpnext.com/docs/user/manual/en/CRM/newsletter' }, + { label: 'Newsletter', url: docsUrl + 'user/manual/en/CRM/newsletter' }, ] frappe.help.help_links['Form/Campaign'] = [ - { label: 'Campaign', url: 'https://erpnext.com/docs/user/manual/en/CRM/setup/campaign' }, + { label: 'Campaign', url: docsUrl + 'user/manual/en/CRM/setup/campaign' }, ] frappe.help.help_links['Tree/Sales Person'] = [ - { label: 'Sales Person', url: 'https://erpnext.com/docs/user/manual/en/CRM/setup/sales-person' }, + { label: 'Sales Person', url: docsUrl + 'user/manual/en/CRM/setup/sales-person' }, ] frappe.help.help_links['Form/Sales Person'] = [ - { label: 'Sales Person Target', url: 'https://erpnext.com/docs/user/manual/en/selling/setup/sales-person-target-allocation' }, + { label: 'Sales Person Target', url: docsUrl + 'user/manual/en/selling/setup/sales-person-target-allocation' }, ] //Support frappe.help.help_links['List/Feedback Trigger'] = [ - { label: 'Feedback Trigger', url: 'https://erpnext.com/docs/user/manual/en/setting-up/feedback/setting-up-feedback' }, + { label: 'Feedback Trigger', url: docsUrl + 'user/manual/en/setting-up/feedback/setting-up-feedback' }, ] frappe.help.help_links['List/Feedback Request'] = [ - { label: 'Feedback Request', url: 'https://erpnext.com/docs/user/manual/en/setting-up/feedback/submit-feedback' }, + { label: 'Feedback Request', url: docsUrl + 'user/manual/en/setting-up/feedback/submit-feedback' }, ] frappe.help.help_links['List/Feedback Request'] = [ - { label: 'Feedback Request', url: 'https://erpnext.com/docs/user/manual/en/setting-up/feedback/submit-feedback' }, + { label: 'Feedback Request', url: docsUrl + 'user/manual/en/setting-up/feedback/submit-feedback' }, ] //Manufacturing frappe.help.help_links['Form/BOM'] = [ - { label: 'Bill of Material', url: 'https://erpnext.com/docs/user/manual/en/manufacturing/bill-of-materials' }, - { label: 'Nested BOM Structure', url: 'https://erpnext.com/docs/user/manual/en/manufacturing/articles/nested-bom-structure' }, + { label: 'Bill of Material', url: docsUrl + 'user/manual/en/manufacturing/bill-of-materials' }, + { label: 'Nested BOM Structure', url: docsUrl + 'user/manual/en/manufacturing/articles/nested-bom-structure' }, ] frappe.help.help_links['Form/Work Order'] = [ - { label: 'Work Order', url: 'https://erpnext.com/docs/user/manual/en/manufacturing/work-order' }, + { label: 'Work Order', url: docsUrl + 'user/manual/en/manufacturing/work-order' }, ] frappe.help.help_links['Form/Workstation'] = [ - { label: 'Workstation', url: 'https://erpnext.com/docs/user/manual/en/manufacturing/workstation' }, + { label: 'Workstation', url: docsUrl + 'user/manual/en/manufacturing/workstation' }, ] frappe.help.help_links['Form/Operation'] = [ - { label: 'Operation', url: 'https://erpnext.com/docs/user/manual/en/manufacturing/operation' }, + { label: 'Operation', url: docsUrl + 'user/manual/en/manufacturing/operation' }, ] frappe.help.help_links['Form/BOM Update Tool'] = [ - { label: 'BOM Update Tool', url: 'https://erpnext.com/docs/user/manual/en/manufacturing/tools/bom-update-tool' }, + { label: 'BOM Update Tool', url: docsUrl + 'user/manual/en/manufacturing/tools/bom-update-tool' }, ] //Customize frappe.help.help_links['Form/Customize Form'] = [ - { label: 'Custom Field', url: 'https://erpnext.com/docs/user/manual/en/customize-erpnext/custom-field' }, - { label: 'Customize Field', url: 'https://erpnext.com/docs/user/manual/en/customize-erpnext/customize-form' }, + { label: 'Custom Field', url: docsUrl + 'user/manual/en/customize-erpnext/custom-field' }, + { label: 'Customize Field', url: docsUrl + 'user/manual/en/customize-erpnext/customize-form' }, ] frappe.help.help_links['Form/Custom Field'] = [ - { label: 'Custom Field', url: 'https://erpnext.com/docs/user/manual/en/customize-erpnext/custom-field' }, + { label: 'Custom Field', url: docsUrl + 'user/manual/en/customize-erpnext/custom-field' }, ] frappe.help.help_links['Form/Custom Field'] = [ - { label: 'Custom Field', url: 'https://erpnext.com/docs/user/manual/en/customize-erpnext/custom-field' }, + { label: 'Custom Field', url: docsUrl + 'user/manual/en/customize-erpnext/custom-field' }, ] \ No newline at end of file From d71de2a23e1dd3d1f7a3b866f8b0a73a90207cf5 Mon Sep 17 00:00:00 2001 From: scmmishra Date: Fri, 25 Jan 2019 14:27:23 +0530 Subject: [PATCH 054/169] [fix] Code formatting, removed trailing spaces --- erpnext/public/js/help_links.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/erpnext/public/js/help_links.js b/erpnext/public/js/help_links.js index d3cc688cd20..23e7deb6e9e 100644 --- a/erpnext/public/js/help_links.js +++ b/erpnext/public/js/help_links.js @@ -1,6 +1,6 @@ frappe.provide('frappe.help.help_links'); -const docsUrl = 'https://erpnext.com/docs/' +const docsUrl = 'https://erpnext.com/docs/'; frappe.help.help_links['Form/Rename Tool'] = [ { label: 'Bulk Rename', url: docsUrl + 'user/manual/en/setting-up/data/bulk-rename' }, @@ -320,12 +320,12 @@ frappe.help.help_links['Tree/Cost Center'] = [ frappe.help.help_links['List/Item'] = [ { label: 'Item', url: 'http://erpnext.com/docs/user/manual/en/stock/item' }, - { label: 'Item Price', url: docsUrl + 'user/manual/en/stock/item/item-price' }, + { label: 'Item Price', url: docsUrl + 'user/manual/en/stock/item/item-price' }, { label: 'Barcode', url: docsUrl + 'user/manual/en/stock/articles/track-items-using-barcode' }, { label: 'Item Wise Taxation', url: docsUrl + 'user/manual/en/accounts/item-wise-taxation' }, { label: 'Managing Fixed Assets', url: docsUrl + 'user/manual/en/accounts/managing-fixed-assets' }, { label: 'Item Codification', url: docsUrl + 'user/manual/en/stock/item/item-codification' }, - { label: 'Item Variants', url: docsUrl + 'user/manual/en/stock/item/item-variants' }, + { label: 'Item Variants', url: docsUrl + 'user/manual/en/stock/item/item-variants' }, { label: 'Item Valuation', url: docsUrl + 'user/manual/en/stock/item/item-valuation-fifo-and-moving-average' }, ] @@ -336,8 +336,8 @@ frappe.help.help_links['Form/Item'] = [ { label: 'Item Wise Taxation', url: docsUrl + 'user/manual/en/accounts/item-wise-taxation' }, { label: 'Managing Fixed Assets', url: docsUrl + 'user/manual/en/accounts/managing-fixed-assets' }, { label: 'Item Codification', url: docsUrl + 'user/manual/en/stock/item/item-codification' }, - { label: 'Item Variants', url: docsUrl + 'user/manual/en/stock/item/item-variants' }, - { label: 'Item Valuation', url: docsUrl + 'user/manual/en/stock/item/item-valuation-fifo-and-moving-average' }, + { label: 'Item Variants', url: docsUrl + 'user/manual/en/stock/item/item-variants' }, + { label: 'Item Valuation', url: docsUrl + 'user/manual/en/stock/item/item-valuation-fifo-and-moving-average' }, ] frappe.help.help_links['List/Purchase Receipt'] = [ From f44dfb158287726d0f60613796855f1404e6917d Mon Sep 17 00:00:00 2001 From: scmmishra Date: Fri, 25 Jan 2019 14:56:30 +0530 Subject: [PATCH 055/169] [fix] Formatting issues --- erpnext/public/js/help_links.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/public/js/help_links.js b/erpnext/public/js/help_links.js index 23e7deb6e9e..458276eceb2 100644 --- a/erpnext/public/js/help_links.js +++ b/erpnext/public/js/help_links.js @@ -326,12 +326,12 @@ frappe.help.help_links['List/Item'] = [ { label: 'Managing Fixed Assets', url: docsUrl + 'user/manual/en/accounts/managing-fixed-assets' }, { label: 'Item Codification', url: docsUrl + 'user/manual/en/stock/item/item-codification' }, { label: 'Item Variants', url: docsUrl + 'user/manual/en/stock/item/item-variants' }, - { label: 'Item Valuation', url: docsUrl + 'user/manual/en/stock/item/item-valuation-fifo-and-moving-average' }, + { label: 'Item Valuation', url: docsUrl + 'user/manual/en/stock/item/item-valuation-fifo-and-moving-average' }, ] frappe.help.help_links['Form/Item'] = [ { label: 'Item', url: 'http://erpnext.com/docs/user/manual/en/stock/item' }, - { label: 'Item Price', url: docsUrl + 'user/manual/en/stock/item/item-price' }, + { label: 'Item Price', url: docsUrl + 'user/manual/en/stock/item/item-price' }, { label: 'Barcode', url: docsUrl + 'user/manual/en/stock/articles/track-items-using-barcode' }, { label: 'Item Wise Taxation', url: docsUrl + 'user/manual/en/accounts/item-wise-taxation' }, { label: 'Managing Fixed Assets', url: docsUrl + 'user/manual/en/accounts/managing-fixed-assets' }, From 67c338fd51f46ef263c3ab9cb0ba49854f32e8a5 Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Fri, 25 Jan 2019 15:17:44 +0530 Subject: [PATCH 056/169] [fix] Fixed links Previous commit missed the links starting with `http://` --- erpnext/public/js/help_links.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/erpnext/public/js/help_links.js b/erpnext/public/js/help_links.js index 458276eceb2..17b726ee18f 100644 --- a/erpnext/public/js/help_links.js +++ b/erpnext/public/js/help_links.js @@ -254,7 +254,7 @@ frappe.help.help_links['List/Company'] = [ //Accounts frappe.help.help_links['modules/Accounts'] = [ - { label: 'Introduction to Accounts', url: 'http://erpnext.com/docs/user/manual/en/accounts/' }, + { label: 'Introduction to Accounts', url: docsUrl + 'user/manual/en/accounts/' }, { label: 'Chart of Accounts', url: docsUrl + 'user/manual/en/accounts/chart-of-accounts.html' }, { label: 'Multi Currency Accounting', url: docsUrl + 'user/manual/en/accounts/multi-currency-accounting' }, ] @@ -319,7 +319,7 @@ frappe.help.help_links['Tree/Cost Center'] = [ ] frappe.help.help_links['List/Item'] = [ - { label: 'Item', url: 'http://erpnext.com/docs/user/manual/en/stock/item' }, + { label: 'Item', url: docsUrl + 'user/manual/en/stock/item' }, { label: 'Item Price', url: docsUrl + 'user/manual/en/stock/item/item-price' }, { label: 'Barcode', url: docsUrl + 'user/manual/en/stock/articles/track-items-using-barcode' }, { label: 'Item Wise Taxation', url: docsUrl + 'user/manual/en/accounts/item-wise-taxation' }, @@ -330,7 +330,7 @@ frappe.help.help_links['List/Item'] = [ ] frappe.help.help_links['Form/Item'] = [ - { label: 'Item', url: 'http://erpnext.com/docs/user/manual/en/stock/item' }, + { label: 'Item', url: docsUrl + 'user/manual/en/stock/item' }, { label: 'Item Price', url: docsUrl + 'user/manual/en/stock/item/item-price' }, { label: 'Barcode', url: docsUrl + 'user/manual/en/stock/articles/track-items-using-barcode' }, { label: 'Item Wise Taxation', url: docsUrl + 'user/manual/en/accounts/item-wise-taxation' }, @@ -523,4 +523,4 @@ frappe.help.help_links['Form/Custom Field'] = [ frappe.help.help_links['Form/Custom Field'] = [ { label: 'Custom Field', url: docsUrl + 'user/manual/en/customize-erpnext/custom-field' }, -] \ No newline at end of file +] From 3476a457ad8448cc5648d3027d76fb0a97cc4c5c Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 25 Jan 2019 16:22:36 +0530 Subject: [PATCH 057/169] fix: minor --- erpnext/accounts/deferred_revenue.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/deferred_revenue.py b/erpnext/accounts/deferred_revenue.py index 2ff2644d185..9ff8b042810 100644 --- a/erpnext/accounts/deferred_revenue.py +++ b/erpnext/accounts/deferred_revenue.py @@ -29,7 +29,7 @@ def validate_service_stop_date(doc): if date_diff(item.service_stop_date, item.service_end_date) > 0: frappe.throw(_("Service Stop Date cannot be after Service End Date")) - if old_stop_dates and old_stop_dates[item.name] and item.service_stop_date!=old_stop_dates[item.name]: + if old_stop_dates and old_stop_dates.get(item.name) and item.service_stop_date!=old_stop_dates[item.name]: frappe.throw(_("Cannot change Service Stop Date for item in row {0}".format(item.idx))) def convert_deferred_expense_to_expense(start_date=None, end_date=None): From 01ca3e5e362f05bc80884ce5c2198f00f1d9a2d1 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 25 Jan 2019 16:25:15 +0530 Subject: [PATCH 058/169] fix(manufacturing): Get raw materials rate from price list ignoring party --- erpnext/manufacturing/doctype/bom/bom.py | 7 +++++-- erpnext/stock/get_item_details.py | 23 +++++++++++++---------- 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/erpnext/manufacturing/doctype/bom/bom.py b/erpnext/manufacturing/doctype/bom/bom.py index 57a1cc25936..2317634cfc5 100644 --- a/erpnext/manufacturing/doctype/bom/bom.py +++ b/erpnext/manufacturing/doctype/bom/bom.py @@ -189,7 +189,8 @@ class BOM(WebsiteGenerator): "currency": self.currency, "conversion_rate": self.conversion_rate or 1, "conversion_factor": arg.get("conversion_factor") or 1, - "plc_conversion_rate": 1 + "plc_conversion_rate": 1, + "ignore_party": True }) item_doc = frappe.get_doc("Item", arg.get("item_code")) out = frappe._dict() @@ -213,7 +214,7 @@ class BOM(WebsiteGenerator): existing_bom_cost = self.total_cost for d in self.get("items"): - d.rate = self.get_rm_rate({ + rate = self.get_rm_rate({ "item_code": d.item_code, "bom_no": d.bom_no, "qty": d.qty, @@ -221,6 +222,8 @@ class BOM(WebsiteGenerator): "stock_uom": d.stock_uom, "conversion_factor": d.conversion_factor }) + if rate: + d.rate = rate d.amount = flt(d.rate) * flt(d.qty) if self.docstatus == 1: diff --git a/erpnext/stock/get_item_details.py b/erpnext/stock/get_item_details.py index 9db04cd0ab4..e1607a927fe 100644 --- a/erpnext/stock/get_item_details.py +++ b/erpnext/stock/get_item_details.py @@ -424,7 +424,7 @@ def insert_item_price(args): frappe.msgprint(_("Item Price added for {0} in Price List {1}").format(args.item_code, args.price_list), alert=True) -def get_item_price(args, item_code): +def get_item_price(args, item_code, ignore_party=False): """ Get name, price_list_rate from Item Price based on conditions Check if the Derised qty is within the increment of the packing list. @@ -434,17 +434,20 @@ def get_item_price(args, item_code): """ args['item_code'] = item_code - conditions = "where (customer is null or customer = '') and (supplier is null or supplier = '')" - if args.get("customer"): - conditions = "where customer=%(customer)s" - if args.get("supplier"): - conditions = "where supplier=%(supplier)s" - - conditions += """ and item_code=%(item_code)s + conditions = """where item_code=%(item_code)s and price_list=%(price_list)s and ifnull(uom, '') in ('', %(uom)s)""" + if not ignore_party: + conditions += " and (customer is null or customer = '') and (supplier is null or supplier = '')" + if args.get("customer"): + conditions += " and customer=%(customer)s" + + if args.get("supplier"): + conditions += " and supplier=%(supplier)s" + + if args.get('min_qty'): conditions += " and ifnull(min_qty, 0) <= %(min_qty)s" @@ -490,10 +493,10 @@ def get_price_list_rate_for(args, item_code): for field in ["customer", "supplier", "min_qty"]: del item_price_args[field] - general_price_list_rate = get_item_price(item_price_args, item_code) + general_price_list_rate = get_item_price(item_price_args, item_code, ignore_party=args.get("ignore_party")) if not general_price_list_rate and args.get("uom") != args.get("stock_uom"): item_price_args["args"] = args.get("stock_uom") - general_price_list_rate = get_item_price(item_price_args, item_code) + general_price_list_rate = get_item_price(item_price_args, item_code, ignore_party=args.get("ignore_party")) if general_price_list_rate: item_price_data = general_price_list_rate From 49cca7ac76f85f1e7449468d1fb6dae0cb249899 Mon Sep 17 00:00:00 2001 From: deepeshgarg007 Date: Fri, 25 Jan 2019 16:41:01 +0530 Subject: [PATCH 059/169] fix: Customer based price_list in online POS --- erpnext/public/js/controllers/transaction.js | 2 +- erpnext/selling/page/point_of_sale/point_of_sale.js | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index 4ef8b2e8be4..20e10988065 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -477,7 +477,7 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({ var me = this; var item = frappe.get_doc(cdt, cdn); - if (item.serial_no) { + if (item && item.serial_no) { if (!item.item_code) { this.frm.trigger("item_code", cdt, cdn); } diff --git a/erpnext/selling/page/point_of_sale/point_of_sale.js b/erpnext/selling/page/point_of_sale/point_of_sale.js index 1ee59712716..8b4d684466a 100644 --- a/erpnext/selling/page/point_of_sale/point_of_sale.js +++ b/erpnext/selling/page/point_of_sale/point_of_sale.js @@ -164,6 +164,12 @@ erpnext.pos.PointOfSale = class PointOfSale { } } }); + + frappe.ui.form.on('Sales Invoice', 'selling_price_list', (frm) => { + if(this.items) { + this.items.reset_items(); + } + }) } toggle_editing(flag) { @@ -1384,6 +1390,7 @@ class POSItems { } get_items({start = 0, page_length = 40, search_value='', item_group=this.parent_item_group}={}) { + const price_list = this.frm.doc.selling_price_list; return new Promise(res => { frappe.call({ method: "erpnext.selling.page.point_of_sale.point_of_sale.get_items", @@ -1391,10 +1398,10 @@ class POSItems { args: { start, page_length, - 'price_list': this.frm.doc.selling_price_list, + price_list, item_group, search_value, - 'pos_profile': this.frm.doc.pos_profile + pos_profile: this.frm.doc.pos_profile } }).then(r => { // const { items, serial_no, batch_no } = r.message; From 8c84b7b8884746966b735a187d681c4253eef6ed Mon Sep 17 00:00:00 2001 From: deepeshgarg007 Date: Fri, 25 Jan 2019 16:44:45 +0530 Subject: [PATCH 060/169] fix: Doctype Name correction --- erpnext/accounts/party.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/party.py b/erpnext/accounts/party.py index f412506a7c6..5855ac3bcd5 100644 --- a/erpnext/accounts/party.py +++ b/erpnext/accounts/party.py @@ -163,7 +163,7 @@ def set_price_list(out, party, party_type, given_price_list, pos=None): if customer_price_list: price_list = customer_price_list else: - pos_price_list = frappe.get_value('Pos Profile', pos, 'selling_price_list') + pos_price_list = frappe.get_value('POS Profile', pos, 'selling_price_list') price_list = pos_price_list or given_price_list else: price_list = get_default_price_list(party) or given_price_list From 1187d61b5663d81efc1a4b8ef160c290defaf394 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 25 Jan 2019 17:07:29 +0530 Subject: [PATCH 061/169] fix(stock): Escaping issue in stock ledger report --- .../stock/report/stock_ledger/stock_ledger.py | 24 ++++++++++++------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/erpnext/stock/report/stock_ledger/stock_ledger.py b/erpnext/stock/report/stock_ledger/stock_ledger.py index 578000bfa1f..ef9fbe41c02 100644 --- a/erpnext/stock/report/stock_ledger/stock_ledger.py +++ b/erpnext/stock/report/stock_ledger/stock_ledger.py @@ -110,16 +110,22 @@ def get_item_details(items, sl_entries, include_uom): cf_field = cf_join = "" if include_uom: cf_field = ", ucd.conversion_factor" - cf_join = "left join `tabUOM Conversion Detail` ucd on ucd.parent=item.name and ucd.uom=%(include_uom)s" + cf_join = "left join `tabUOM Conversion Detail` ucd on ucd.parent=item.name and ucd.uom='%s'" \ + % frappe.db.escape(include_uom) - for item in frappe.db.sql(""" - select item.name, item.item_name, item.description, item.item_group, item.brand, item.stock_uom{cf_field} - from `tabItem` item - {cf_join} - where item.name in ({names}) - """.format(cf_field=cf_field, cf_join=cf_join, names=', '.join(['"' + frappe.db.escape(i, percent=False) + '"' for i in items])), - {"include_uom": include_uom}, as_dict=1): - item_details.setdefault(item.name, item) + item_codes = ', '.join(['"' + frappe.db.escape(i, percent=False) + '"' for i in items]) + res = frappe.db.sql(""" + select + item.name, item.item_name, item.description, item.item_group, item.brand, item.stock_uom {cf_field} + from + `tabItem` item + {cf_join} + where + item.name in ({item_codes}) + """.format(cf_field=cf_field, cf_join=cf_join, item_codes=item_codes), as_dict=1) + + for item in res: + item_details.setdefault(item.name, item) return item_details From c6c1628c8a4363fdcda2e6dadb84cf7cf6670276 Mon Sep 17 00:00:00 2001 From: scmmishra Date: Mon, 21 Jan 2019 19:35:46 +0530 Subject: [PATCH 062/169] [feat] Modified help config --- erpnext/public/js/conf.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/erpnext/public/js/conf.js b/erpnext/public/js/conf.js index d256c08e13e..040726957b8 100644 --- a/erpnext/public/js/conf.js +++ b/erpnext/public/js/conf.js @@ -14,7 +14,7 @@ $(document).bind('toolbar_setup', function() { $('.navbar-home').html(''); - $('[data-link="docs"]').attr("href", "https://frappe.github.io/erpnext/") + $('[data-link="docs"]').attr("href", "https://erpnext.com/docs") $('[data-link="issues"]').attr("href", "https://github.com/frappe/erpnext/issues") @@ -23,7 +23,8 @@ $(document).bind('toolbar_setup', function() { // additional help links for erpnext var $help_menu = $('.dropdown-help ul .documentation-links'); - + $('
  • '+__('Documentation')+'
  • ').insertBefore($help_menu); $('
  • '+__('User Forum')+'
  • ').insertBefore($help_menu); $('
  • Date: Fri, 25 Jan 2019 12:56:27 +0530 Subject: [PATCH 063/169] [fix] Links now redirect to erpnext.com --- README.md | 2 +- erpnext/change_log/v6/v6_13_1.md | 2 +- erpnext/hooks.py | 2 -- erpnext/public/js/conf.js | 2 +- .../page/welcome_to_erpnext/welcome_to_erpnext.html | 2 +- erpnext/utilities/user_progress.py | 10 +++++----- 6 files changed, 9 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 74ea7fc8a5d..d719873c764 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Includes: Accounting, Inventory, Manufacturing, CRM, Sales, Purchase, Project Ma ERPNext is built on the [Frappé](https://github.com/frappe/frappe) Framework, a full-stack web app framework in Python & JavaScript. -- [User Guide](https://erpnext.org/docs/user) +- [User Guide](https://erpnext.com/docs/user) - [Discussion Forum](https://discuss.erpnext.com/) --- diff --git a/erpnext/change_log/v6/v6_13_1.md b/erpnext/change_log/v6/v6_13_1.md index 4b2c4a9cca2..d5a930e3b96 100644 --- a/erpnext/change_log/v6/v6_13_1.md +++ b/erpnext/change_log/v6/v6_13_1.md @@ -1 +1 @@ -- [ERPNext Manual in German](http://erpnext.org/docs/user/manual/de/) contributed by [CWT Connector & Wire Technology GmbH](http://www.cwt-assembly.com/) +- [ERPNext Manual in German](http://erpnext.com/docs/user/manual/de/) contributed by [CWT Connector & Wire Technology GmbH](http://www.cwt-assembly.com/) diff --git a/erpnext/hooks.py b/erpnext/hooks.py index ee31e32a3bb..5f1e7d4243c 100644 --- a/erpnext/hooks.py +++ b/erpnext/hooks.py @@ -15,8 +15,6 @@ develop_version = '10.x.x-develop' error_report_email = "support@erpnext.com" -docs_app = "foundation" - app_include_js = "assets/js/erpnext.min.js" app_include_css = "assets/css/erpnext.css" web_include_js = "assets/js/erpnext-web.min.js" diff --git a/erpnext/public/js/conf.js b/erpnext/public/js/conf.js index 040726957b8..32cf0651694 100644 --- a/erpnext/public/js/conf.js +++ b/erpnext/public/js/conf.js @@ -23,7 +23,7 @@ $(document).bind('toolbar_setup', function() { // additional help links for erpnext var $help_menu = $('.dropdown-help ul .documentation-links'); - $('
  • '+__('Documentation')+'
  • ').insertBefore($help_menu); $('
  • '+__('User Forum')+'
  • ').insertBefore($help_menu); diff --git a/erpnext/setup/page/welcome_to_erpnext/welcome_to_erpnext.html b/erpnext/setup/page/welcome_to_erpnext/welcome_to_erpnext.html index 57fce28eeb7..5808ce73ee9 100644 --- a/erpnext/setup/page/welcome_to_erpnext/welcome_to_erpnext.html +++ b/erpnext/setup/page/welcome_to_erpnext/welcome_to_erpnext.html @@ -22,7 +22,7 @@ diff --git a/erpnext/utilities/user_progress.py b/erpnext/utilities/user_progress.py index 9f5935e3cbb..a6b5b49f08d 100644 --- a/erpnext/utilities/user_progress.py +++ b/erpnext/utilities/user_progress.py @@ -33,7 +33,7 @@ def get_slide_settings(): help_links=[ { "label": _("Chart of Accounts"), - "url": ["https://erpnext.org/docs/user/manual/en/accounts/chart-of-accounts"] + "url": ["https://erpnext.com/docs/user/manual/en/accounts/chart-of-accounts"] }, { "label": _("Opening Balances"), @@ -56,7 +56,7 @@ def get_slide_settings(): help_links=[ { "label": _('Learn More'), - "url": ["https://erpnext.org/docs/user/manual/en/setting-up/setting-company-sales-goal"] + "url": ["https://erpnext.com/docs/user/manual/en/setting-up/setting-company-sales-goal"] } ] ), @@ -80,7 +80,7 @@ def get_slide_settings(): help_links=[ { "label": _('Learn More'), - "url": ["https://erpnext.org/docs/user/manual/en/CRM/customer.html"] + "url": ["https://erpnext.com/docs/user/manual/en/CRM/customer.html"] } ] ), @@ -123,7 +123,7 @@ def get_slide_settings(): help_links=[ { "label": _('Learn More'), - "url": ["https://erpnext.org/docs/user/manual/en/buying/supplier"] + "url": ["https://erpnext.com/docs/user/manual/en/buying/supplier"] }, { "label": _('Customers and Suppliers'), @@ -261,7 +261,7 @@ def get_slide_settings(): help_links=[ { "label": _('Learn More'), - "url": ["https://erpnext.org/docs/user/manual/en/setting-up/users-and-permissions"] + "url": ["https://erpnext.com/docs/user/manual/en/setting-up/users-and-permissions"] }, { "label": _('Users and Permissions'), From 000e2163548e6cb26f5d98e7c2475c06dcb6d2f2 Mon Sep 17 00:00:00 2001 From: scmmishra Date: Fri, 25 Jan 2019 13:14:11 +0530 Subject: [PATCH 064/169] [feat] Added docsUrl variable to configure help_links --- erpnext/public/js/help_links.js | 368 ++++++++++++++++---------------- 1 file changed, 183 insertions(+), 185 deletions(-) diff --git a/erpnext/public/js/help_links.js b/erpnext/public/js/help_links.js index d8af0e516d3..d3cc688cd20 100644 --- a/erpnext/public/js/help_links.js +++ b/erpnext/public/js/help_links.js @@ -1,528 +1,526 @@ frappe.provide('frappe.help.help_links'); +const docsUrl = 'https://erpnext.com/docs/' + frappe.help.help_links['Form/Rename Tool'] = [ - { label: 'Bulk Rename', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/data/bulk-rename' }, + { label: 'Bulk Rename', url: docsUrl + 'user/manual/en/setting-up/data/bulk-rename' }, ] //Setup frappe.help.help_links['List/User'] = [ - { label: 'New User', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/users-and-permissions/adding-users' }, - { label: 'Rename User', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/articles/rename-user' }, + { label: 'New User', url: docsUrl + 'user/manual/en/setting-up/users-and-permissions/adding-users' }, + { label: 'Rename User', url: docsUrl + 'user/manual/en/setting-up/articles/rename-user' }, ] frappe.help.help_links['permission-manager'] = [ - { label: 'Role Permissions Manager', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/users-and-permissions/role-based-permissions' }, - { label: 'Managing Perm Level in Permissions Manager', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/articles/managing-perm-level' }, - { label: 'User Permissions', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/users-and-permissions/user-permissions' }, - { label: 'Sharing', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/users-and-permissions/sharing' }, - { label: 'Password', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/articles/change-password' }, + { label: 'Role Permissions Manager', url: docsUrl + 'user/manual/en/setting-up/users-and-permissions/role-based-permissions' }, + { label: 'Managing Perm Level in Permissions Manager', url: docsUrl + 'user/manual/en/setting-up/articles/managing-perm-level' }, + { label: 'User Permissions', url: docsUrl + 'user/manual/en/setting-up/users-and-permissions/user-permissions' }, + { label: 'Sharing', url: docsUrl + 'user/manual/en/setting-up/users-and-permissions/sharing' }, + { label: 'Password', url: docsUrl + 'user/manual/en/setting-up/articles/change-password' }, ] frappe.help.help_links['Form/System Settings'] = [ - { label: 'Naming Series', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/settings/system-settings' }, + { label: 'Naming Series', url: docsUrl + 'user/manual/en/setting-up/settings/system-settings' }, ] frappe.help.help_links['data-import-tool'] = [ - { label: 'Importing and Exporting Data', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/data/data-import-tool' }, - { label: 'Overwriting Data from Data Import Tool', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/articles/overwriting-data-from-data-import-tool' }, + { label: 'Importing and Exporting Data', url: docsUrl + 'user/manual/en/setting-up/data/data-import-tool' }, + { label: 'Overwriting Data from Data Import Tool', url: docsUrl + 'user/manual/en/setting-up/articles/overwriting-data-from-data-import-tool' }, ] frappe.help.help_links['module_setup'] = [ - { label: 'Role Permissions Manager', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/users-and-permissions/role-based-permissions' }, + { label: 'Role Permissions Manager', url: docsUrl + 'user/manual/en/setting-up/users-and-permissions/role-based-permissions' }, ] frappe.help.help_links['Form/Naming Series'] = [ - { label: 'Naming Series', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/settings/naming-series' }, - { label: 'Setting the Current Value for Naming Series', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/articles/naming-series-current-value' }, + { label: 'Naming Series', url: docsUrl + 'user/manual/en/setting-up/settings/naming-series' }, + { label: 'Setting the Current Value for Naming Series', url: docsUrl + 'user/manual/en/setting-up/articles/naming-series-current-value' }, ] frappe.help.help_links['Form/Global Defaults'] = [ - { label: 'Global Settings', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/settings/global-defaults' }, + { label: 'Global Settings', url: docsUrl + 'user/manual/en/setting-up/settings/global-defaults' }, ] frappe.help.help_links['Form/Email Digest'] = [ - { label: 'Email Digest', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/email/email-digest' }, + { label: 'Email Digest', url: docsUrl + 'user/manual/en/setting-up/email/email-digest' }, ] frappe.help.help_links['List/Print Heading'] = [ - { label: 'Print Heading', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/print/print-headings' }, + { label: 'Print Heading', url: docsUrl + 'user/manual/en/setting-up/print/print-headings' }, ] frappe.help.help_links['List/Letter Head'] = [ - { label: 'Letter Head', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/print/letter-head' }, + { label: 'Letter Head', url: docsUrl + 'user/manual/en/setting-up/print/letter-head' }, ] frappe.help.help_links['List/Address Template'] = [ - { label: 'Address Template', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/print/address-template' }, + { label: 'Address Template', url: docsUrl + 'user/manual/en/setting-up/print/address-template' }, ] frappe.help.help_links['List/Terms and Conditions'] = [ - { label: 'Terms and Conditions', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/print/terms-and-conditions' }, + { label: 'Terms and Conditions', url: docsUrl + 'user/manual/en/setting-up/print/terms-and-conditions' }, ] frappe.help.help_links['List/Cheque Print Template'] = [ - { label: 'Cheque Print Template', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/print/cheque-print-template' }, + { label: 'Cheque Print Template', url: docsUrl + 'user/manual/en/setting-up/print/cheque-print-template' }, ] frappe.help.help_links['List/Email Account'] = [ - { label: 'Email Account', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/email/email-account' }, + { label: 'Email Account', url: docsUrl + 'user/manual/en/setting-up/email/email-account' }, ] -frappe.help.help_links['List/Email Alert'] = [ - { label: 'Email Alert', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/email/email-alerts' }, +frappe.help.help_links['List/Notification'] = [ + { label: 'Notification', url: docsUrl + 'user/manual/en/setting-up/email/notifications' }, ] -frappe.help.help_links['Form/Email Alert'] = [ - { label: 'Email Alert', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/email/email-alerts' }, +frappe.help.help_links['Form/Notification'] = [ + { label: 'Notification', url: docsUrl + 'user/manual/en/setting-up/email/notifications' }, ] frappe.help.help_links['List/Email Digest'] = [ - { label: 'Email Digest', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/email/email-digest' }, + { label: 'Email Digest', url: docsUrl + 'user/manual/en/setting-up/email/email-digest' }, ] frappe.help.help_links['List/Auto Email Report'] = [ - { label: 'Auto Email Reports', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/email/email-reports' }, + { label: 'Auto Email Reports', url: docsUrl + 'user/manual/en/setting-up/email/email-reports' }, ] frappe.help.help_links['Form/Print Settings'] = [ - { label: 'Print Settings', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/print/print-settings' }, + { label: 'Print Settings', url: docsUrl + 'user/manual/en/setting-up/print/print-settings' }, ] frappe.help.help_links['print-format-builder'] = [ - { label: 'Print Format Builder', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/print/print-settings' }, + { label: 'Print Format Builder', url: docsUrl + 'user/manual/en/setting-up/print/print-settings' }, ] frappe.help.help_links['List/Print Heading'] = [ - { label: 'Print Heading', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/print/print-headings' }, + { label: 'Print Heading', url: docsUrl + 'user/manual/en/setting-up/print/print-headings' }, ] //setup-integrations frappe.help.help_links['Form/PayPal Settings'] = [ - { label: 'PayPal Settings', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/integrations/paypal-integration' }, + { label: 'PayPal Settings', url: docsUrl + 'user/manual/en/setting-up/integrations/paypal-integration' }, ] frappe.help.help_links['Form/Razorpay Settings'] = [ - { label: 'Razorpay Settings', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/integrations/razorpay-integration' }, + { label: 'Razorpay Settings', url: docsUrl + 'user/manual/en/setting-up/integrations/razorpay-integration' }, ] frappe.help.help_links['Form/Dropbox Settings'] = [ - { label: 'Dropbox Settings', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/integrations/dropbox-backup' }, + { label: 'Dropbox Settings', url: docsUrl + 'user/manual/en/setting-up/integrations/dropbox-backup' }, ] frappe.help.help_links['Form/LDAP Settings'] = [ - { label: 'LDAP Settings', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/integrations/ldap-integration' }, + { label: 'LDAP Settings', url: docsUrl + 'user/manual/en/setting-up/integrations/ldap-integration' }, ] frappe.help.help_links['Form/Stripe Settings'] = [ - { label: 'Stripe Settings', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/integrations/stripe-integration' }, + { label: 'Stripe Settings', url: docsUrl + 'user/manual/en/setting-up/integrations/stripe-integration' }, ] //Sales frappe.help.help_links['Form/Quotation'] = [ - { label: 'Quotation', url: 'https://frappe.github.io/erpnext/user/manual/en/selling/quotation' }, - { label: 'Applying Discount', url: 'https://frappe.github.io/erpnext/user/manual/en/selling/articles/applying-discount' }, - { label: 'Sales Person', url: 'https://frappe.github.io/erpnext/user/manual/en/selling/articles/sales-persons-in-the-sales-transactions' }, - { label: 'Applying Margin', url: 'https://frappe.github.io/erpnext/user/manual/en/selling/articles/adding-margin' }, + { label: 'Quotation', url: docsUrl + 'user/manual/en/selling/quotation' }, + { label: 'Applying Discount', url: docsUrl + 'user/manual/en/selling/articles/applying-discount' }, + { label: 'Sales Person', url: docsUrl + 'user/manual/en/selling/articles/sales-persons-in-the-sales-transactions' }, + { label: 'Applying Margin', url: docsUrl + 'user/manual/en/selling/articles/adding-margin' }, ] frappe.help.help_links['List/Customer'] = [ - { label: 'Customer', url: 'https://frappe.github.io/erpnext/user/manual/en/CRM/customer' }, - { label: 'Credit Limit', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/credit-limit' }, + { label: 'Customer', url: docsUrl + 'user/manual/en/CRM/customer' }, + { label: 'Credit Limit', url: docsUrl + 'user/manual/en/accounts/credit-limit' }, ] frappe.help.help_links['Form/Customer'] = [ - { label: 'Customer', url: 'https://frappe.github.io/erpnext/user/manual/en/CRM/customer' }, - { label: 'Credit Limit', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/credit-limit' }, + { label: 'Customer', url: docsUrl + 'user/manual/en/CRM/customer' }, + { label: 'Credit Limit', url: docsUrl + 'user/manual/en/accounts/credit-limit' }, ] frappe.help.help_links['List/Sales Taxes and Charges Template'] = [ - { label: 'Setting Up Taxes', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/setting-up-taxes' }, + { label: 'Setting Up Taxes', url: docsUrl + 'user/manual/en/setting-up/setting-up-taxes' }, ] frappe.help.help_links['Form/Sales Taxes and Charges Template'] = [ - { label: 'Setting Up Taxes', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/setting-up-taxes' }, + { label: 'Setting Up Taxes', url: docsUrl + 'user/manual/en/setting-up/setting-up-taxes' }, ] frappe.help.help_links['List/Sales Order'] = [ - { label: 'Sales Order', url: 'https://frappe.github.io/erpnext/user/manual/en/selling/sales-order' }, - { label: 'Recurring Sales Order', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/recurring-orders-and-invoices' }, - { label: 'Applying Discount', url: 'https://frappe.github.io/erpnext/user/manual/en/selling/articles/applying-discount' }, + { label: 'Sales Order', url: docsUrl + 'user/manual/en/selling/sales-order' }, + { label: 'Recurring Sales Order', url: docsUrl + 'user/manual/en/accounts/recurring-orders-and-invoices' }, + { label: 'Applying Discount', url: docsUrl + 'user/manual/en/selling/articles/applying-discount' }, ] frappe.help.help_links['Form/Sales Order'] = [ - { label: 'Sales Order', url: 'https://frappe.github.io/erpnext/user/manual/en/selling/sales-order' }, - { label: 'Recurring Sales Order', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/recurring-orders-and-invoices' }, - { label: 'Applying Discount', url: 'https://frappe.github.io/erpnext/user/manual/en/selling/articles/applying-discount' }, - { label: 'Drop Shipping', url: 'https://frappe.github.io/erpnext/user/manual/en/selling/articles/drop-shipping' }, - { label: 'Sales Person', url: 'https://frappe.github.io/erpnext/user/manual/en/selling/articles/sales-persons-in-the-sales-transactions' }, - { label: 'Close Sales Order', url: 'https://frappe.github.io/erpnext/user/manual/en/selling/articles/close-sales-order' }, - { label: 'Applying Margin', url: 'https://frappe.github.io/erpnext/user/manual/en/selling/articles/adding-margin' }, + { label: 'Sales Order', url: docsUrl + 'user/manual/en/selling/sales-order' }, + { label: 'Recurring Sales Order', url: docsUrl + 'user/manual/en/accounts/recurring-orders-and-invoices' }, + { label: 'Applying Discount', url: docsUrl + 'user/manual/en/selling/articles/applying-discount' }, + { label: 'Drop Shipping', url: docsUrl + 'user/manual/en/selling/articles/drop-shipping' }, + { label: 'Sales Person', url: docsUrl + 'user/manual/en/selling/articles/sales-persons-in-the-sales-transactions' }, + { label: 'Close Sales Order', url: docsUrl + 'user/manual/en/selling/articles/close-sales-order' }, + { label: 'Applying Margin', url: docsUrl + 'user/manual/en/selling/articles/adding-margin' }, ] frappe.help.help_links['Form/Product Bundle'] = [ - { label: 'Product Bundle', url: 'https://frappe.github.io/erpnext/user/manual/en/selling/setup/product-bundle' }, + { label: 'Product Bundle', url: docsUrl + 'user/manual/en/selling/setup/product-bundle' }, ] frappe.help.help_links['Form/Selling Settings'] = [ - { label: 'Selling Settings', url: 'https://frappe.github.io/erpnext/user/manual/en/selling/setup/selling-settings' }, + { label: 'Selling Settings', url: docsUrl + 'user/manual/en/selling/setup/selling-settings' }, ] //Buying frappe.help.help_links['List/Supplier'] = [ - { label: 'Supplier', url: 'https://frappe.github.io/erpnext/user/manual/en/buying/supplier' }, + { label: 'Supplier', url: docsUrl + 'user/manual/en/buying/supplier' }, ] frappe.help.help_links['Form/Supplier'] = [ - { label: 'Supplier', url: 'https://frappe.github.io/erpnext/user/manual/en/buying/supplier' }, + { label: 'Supplier', url: docsUrl + 'user/manual/en/buying/supplier' }, ] frappe.help.help_links['Form/Request for Quotation'] = [ - { label: 'Request for Quotation', url: 'https://frappe.github.io/erpnext/user/manual/en/buying/request-for-quotation' }, - { label: 'RFQ Video', url: 'https://frappe.github.io/erpnext/user/videos/learn/request-for-quotation.html' }, + { label: 'Request for Quotation', url: docsUrl + 'user/manual/en/buying/request-for-quotation' }, + { label: 'RFQ Video', url: docsUrl + 'user/videos/learn/request-for-quotation.html' }, ] frappe.help.help_links['Form/Supplier Quotation'] = [ - { label: 'Supplier Quotation', url: 'https://frappe.github.io/erpnext/user/manual/en/buying/supplier-quotation' }, + { label: 'Supplier Quotation', url: docsUrl + 'user/manual/en/buying/supplier-quotation' }, ] frappe.help.help_links['Form/Buying Settings'] = [ - { label: 'Buying Settings', url: 'https://frappe.github.io/erpnext/user/manual/en/buying/setup/buying-settings' }, + { label: 'Buying Settings', url: docsUrl + 'user/manual/en/buying/setup/buying-settings' }, ] frappe.help.help_links['List/Purchase Order'] = [ - { label: 'Purchase Order', url: 'https://frappe.github.io/erpnext/user/manual/en/buying/purchase-order' }, - { label: 'Recurring Purchase Order', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/recurring-orders-and-invoices' }, + { label: 'Purchase Order', url: docsUrl + 'user/manual/en/buying/purchase-order' }, + { label: 'Recurring Purchase Order', url: docsUrl + 'user/manual/en/accounts/recurring-orders-and-invoices' }, ] frappe.help.help_links['Form/Purchase Order'] = [ - { label: 'Purchase Order', url: 'https://frappe.github.io/erpnext/user/manual/en/buying/purchase-order' }, - { label: 'Item UoM', url: 'https://frappe.github.io/erpnext/user/manual/en/buying/articles/purchasing-in-different-unit' }, - { label: 'Supplier Item Code', url: 'https://frappe.github.io/erpnext/user/manual/en/buying/articles/maintaining-suppliers-part-no-in-item' }, - { label: 'Recurring Purchase Order', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/recurring-orders-and-invoices' }, - { label: 'Subcontracting', url: 'https://frappe.github.io/erpnext/user/manual/en/manufacturing/subcontracting' }, + { label: 'Purchase Order', url: docsUrl + 'user/manual/en/buying/purchase-order' }, + { label: 'Item UoM', url: docsUrl + 'user/manual/en/buying/articles/purchasing-in-different-unit' }, + { label: 'Supplier Item Code', url: docsUrl + 'user/manual/en/buying/articles/maintaining-suppliers-part-no-in-item' }, + { label: 'Recurring Purchase Order', url: docsUrl + 'user/manual/en/accounts/recurring-orders-and-invoices' }, + { label: 'Subcontracting', url: docsUrl + 'user/manual/en/manufacturing/subcontracting' }, ] frappe.help.help_links['List/Purchase Taxes and Charges Template'] = [ - { label: 'Setting Up Taxes', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/setting-up-taxes' }, + { label: 'Setting Up Taxes', url: docsUrl + 'user/manual/en/setting-up/setting-up-taxes' }, ] frappe.help.help_links['List/POS Profile'] = [ - { label: 'POS Profile', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/pos-setting' }, + { label: 'POS Profile', url: docsUrl + 'user/manual/en/setting-up/pos-setting' }, ] frappe.help.help_links['List/Price List'] = [ - { label: 'Price List', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/price-lists' }, + { label: 'Price List', url: docsUrl + 'user/manual/en/setting-up/price-lists' }, ] frappe.help.help_links['List/Authorization Rule'] = [ - { label: 'Authorization Rule', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/authorization-rule' }, + { label: 'Authorization Rule', url: docsUrl + 'user/manual/en/setting-up/authorization-rule' }, ] frappe.help.help_links['Form/SMS Settings'] = [ - { label: 'SMS Settings', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/sms-setting' }, + { label: 'SMS Settings', url: docsUrl + 'user/manual/en/setting-up/sms-setting' }, ] frappe.help.help_links['List/Stock Reconciliation'] = [ - { label: 'Stock Reconciliation', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/stock-reconciliation-for-non-serialized-item' }, + { label: 'Stock Reconciliation', url: docsUrl + 'user/manual/en/setting-up/stock-reconciliation-for-non-serialized-item' }, ] frappe.help.help_links['Tree/Territory'] = [ - { label: 'Territory', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/territory' }, + { label: 'Territory', url: docsUrl + 'user/manual/en/setting-up/territory' }, ] frappe.help.help_links['Form/Dropbox Backup'] = [ - { label: 'Dropbox Backup', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/third-party-backups' }, - { label: 'Setting Up Dropbox Backup', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/articles/setting-up-dropbox-backups' }, + { label: 'Dropbox Backup', url: docsUrl + 'user/manual/en/setting-up/third-party-backups' }, + { label: 'Setting Up Dropbox Backup', url: docsUrl + 'user/manual/en/setting-up/articles/setting-up-dropbox-backups' }, ] frappe.help.help_links['List/Workflow'] = [ - { label: 'Workflow', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/workflows' }, + { label: 'Workflow', url: docsUrl + 'user/manual/en/setting-up/workflows' }, ] frappe.help.help_links['List/Company'] = [ - { label: 'Company', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/company-setup' }, - { label: 'Managing Multiple Companies', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/articles/managing-multiple-companies' }, - { label: 'Delete All Related Transactions for a Company', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/articles/delete-a-company-and-all-related-transactions' }, + { label: 'Company', url: docsUrl + 'user/manual/en/setting-up/company-setup' }, + { label: 'Managing Multiple Companies', url: docsUrl + 'user/manual/en/setting-up/articles/managing-multiple-companies' }, + { label: 'Delete All Related Transactions for a Company', url: docsUrl + 'user/manual/en/setting-up/articles/delete-a-company-and-all-related-transactions' }, ] //Accounts frappe.help.help_links['modules/Accounts'] = [ - { label: 'Introduction to Accounts', url: 'http://frappe.github.io/erpnext/user/manual/en/accounts/' }, - { label: 'Chart of Accounts', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/chart-of-accounts.html' }, - { label: 'Multi Currency Accounting', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/multi-currency-accounting' }, + { label: 'Introduction to Accounts', url: 'http://erpnext.com/docs/user/manual/en/accounts/' }, + { label: 'Chart of Accounts', url: docsUrl + 'user/manual/en/accounts/chart-of-accounts.html' }, + { label: 'Multi Currency Accounting', url: docsUrl + 'user/manual/en/accounts/multi-currency-accounting' }, ] frappe.help.help_links['Tree/Account'] = [ - { label: 'Chart of Accounts', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/chart-of-accounts' }, - { label: 'Managing Tree Mastes', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/articles/managing-tree-structure-masters' }, + { label: 'Chart of Accounts', url: docsUrl + 'user/manual/en/accounts/chart-of-accounts' }, + { label: 'Managing Tree Mastes', url: docsUrl + 'user/manual/en/setting-up/articles/managing-tree-structure-masters' }, ] frappe.help.help_links['Form/Sales Invoice'] = [ - { label: 'Sales Invoice', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/sales-invoice' }, - { label: 'Accounts Opening Balance', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/opening-accounts' }, - { label: 'Sales Return', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/sales-return' }, - { label: 'Recurring Sales Invoice', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/recurring-orders-and-invoices' }, + { label: 'Sales Invoice', url: docsUrl + 'user/manual/en/accounts/sales-invoice' }, + { label: 'Accounts Opening Balance', url: docsUrl + 'user/manual/en/accounts/opening-accounts' }, + { label: 'Sales Return', url: docsUrl + 'user/manual/en/stock/sales-return' }, + { label: 'Recurring Sales Invoice', url: docsUrl + 'user/manual/en/accounts/recurring-orders-and-invoices' }, ] frappe.help.help_links['List/Sales Invoice'] = [ - { label: 'Sales Invoice', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/sales-invoice' }, - { label: 'Accounts Opening Balance', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/opening-accounts' }, - { label: 'Sales Return', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/sales-return' }, - { label: 'Recurring Sales Invoice', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/recurring-orders-and-invoices' }, + { label: 'Sales Invoice', url: docsUrl + 'user/manual/en/accounts/sales-invoice' }, + { label: 'Accounts Opening Balance', url: docsUrl + 'user/manual/en/accounts/opening-accounts' }, + { label: 'Sales Return', url: docsUrl + 'user/manual/en/stock/sales-return' }, + { label: 'Recurring Sales Invoice', url: docsUrl + 'user/manual/en/accounts/recurring-orders-and-invoices' }, ] frappe.help.help_links['pos'] = [ - { label: 'Point of Sale Invoice', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/point-of-sale-pos-invoice' }, + { label: 'Point of Sale Invoice', url: docsUrl + 'user/manual/en/accounts/point-of-sale-pos-invoice' }, ] frappe.help.help_links['List/POS Profile'] = [ - { label: 'Point of Sale Profile', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/pos-setting' }, + { label: 'Point of Sale Profile', url: docsUrl + 'user/manual/en/setting-up/pos-setting' }, ] frappe.help.help_links['List/Purchase Invoice'] = [ - { label: 'Purchase Invoice', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/purchase-invoice' }, - { label: 'Accounts Opening Balance', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/opening-accounts' }, - { label: 'Recurring Purchase Invoice', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/recurring-orders-and-invoices' }, + { label: 'Purchase Invoice', url: docsUrl + 'user/manual/en/accounts/purchase-invoice' }, + { label: 'Accounts Opening Balance', url: docsUrl + 'user/manual/en/accounts/opening-accounts' }, + { label: 'Recurring Purchase Invoice', url: docsUrl + 'user/manual/en/accounts/recurring-orders-and-invoices' }, ] frappe.help.help_links['List/Journal Entry'] = [ - { label: 'Journal Entry', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/journal-entry' }, - { label: 'Advance Payment Entry', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/advance-payment-entry' }, - { label: 'Accounts Opening Balance', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/opening-accounts' }, + { label: 'Journal Entry', url: docsUrl + 'user/manual/en/accounts/journal-entry' }, + { label: 'Advance Payment Entry', url: docsUrl + 'user/manual/en/accounts/advance-payment-entry' }, + { label: 'Accounts Opening Balance', url: docsUrl + 'user/manual/en/accounts/opening-accounts' }, ] frappe.help.help_links['List/Payment Entry'] = [ - { label: 'Payment Entry', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/payment-entry' }, + { label: 'Payment Entry', url: docsUrl + 'user/manual/en/accounts/payment-entry' }, ] frappe.help.help_links['List/Payment Request'] = [ - { label: 'Payment Request', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/payment-request' }, + { label: 'Payment Request', url: docsUrl + 'user/manual/en/accounts/payment-request' }, ] frappe.help.help_links['List/Asset'] = [ - { label: 'Managing Fixed Assets', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/managing-fixed-assets' }, + { label: 'Managing Fixed Assets', url: docsUrl + 'user/manual/en/accounts/managing-fixed-assets' }, ] frappe.help.help_links['List/Asset Category'] = [ - { label: 'Asset Category', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/managing-fixed-assets' }, + { label: 'Asset Category', url: docsUrl + 'user/manual/en/accounts/managing-fixed-assets' }, ] frappe.help.help_links['Tree/Cost Center'] = [ - { label: 'Budgeting', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/budgeting' }, + { label: 'Budgeting', url: docsUrl + 'user/manual/en/accounts/budgeting' }, ] frappe.help.help_links['List/Item'] = [ - { label: 'Item', url: 'http://frappe.github.io/erpnext/user/manual/en/stock/item' }, - { label: 'Item Price', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/item/item-price' }, - { label: 'Barcode', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/articles/track-items-using-barcode' }, - { label: 'Item Wise Taxation', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/item-wise-taxation' }, - { label: 'Managing Fixed Assets', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/managing-fixed-assets' }, - { label: 'Item Codification', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/item/item-codification' }, - { label: 'Item Variants', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/item/item-variants' }, - { label: 'Item Valuation', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/item/item-valuation-fifo-and-moving-average' }, + { label: 'Item', url: 'http://erpnext.com/docs/user/manual/en/stock/item' }, + { label: 'Item Price', url: docsUrl + 'user/manual/en/stock/item/item-price' }, + { label: 'Barcode', url: docsUrl + 'user/manual/en/stock/articles/track-items-using-barcode' }, + { label: 'Item Wise Taxation', url: docsUrl + 'user/manual/en/accounts/item-wise-taxation' }, + { label: 'Managing Fixed Assets', url: docsUrl + 'user/manual/en/accounts/managing-fixed-assets' }, + { label: 'Item Codification', url: docsUrl + 'user/manual/en/stock/item/item-codification' }, + { label: 'Item Variants', url: docsUrl + 'user/manual/en/stock/item/item-variants' }, + { label: 'Item Valuation', url: docsUrl + 'user/manual/en/stock/item/item-valuation-fifo-and-moving-average' }, ] frappe.help.help_links['Form/Item'] = [ - { label: 'Item', url: 'http://frappe.github.io/erpnext/user/manual/en/stock/item' }, - { label: 'Item Price', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/item/item-price' }, - { label: 'Barcode', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/articles/track-items-using-barcode' }, - { label: 'Item Wise Taxation', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/item-wise-taxation' }, - { label: 'Managing Fixed Assets', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/managing-fixed-assets' }, - { label: 'Item Codification', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/item/item-codification' }, - { label: 'Item Variants', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/item/item-variants' }, - { label: 'Item Valuation', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/item/item-valuation-fifo-and-moving-average' }, + { label: 'Item', url: 'http://erpnext.com/docs/user/manual/en/stock/item' }, + { label: 'Item Price', url: docsUrl + 'user/manual/en/stock/item/item-price' }, + { label: 'Barcode', url: docsUrl + 'user/manual/en/stock/articles/track-items-using-barcode' }, + { label: 'Item Wise Taxation', url: docsUrl + 'user/manual/en/accounts/item-wise-taxation' }, + { label: 'Managing Fixed Assets', url: docsUrl + 'user/manual/en/accounts/managing-fixed-assets' }, + { label: 'Item Codification', url: docsUrl + 'user/manual/en/stock/item/item-codification' }, + { label: 'Item Variants', url: docsUrl + 'user/manual/en/stock/item/item-variants' }, + { label: 'Item Valuation', url: docsUrl + 'user/manual/en/stock/item/item-valuation-fifo-and-moving-average' }, ] frappe.help.help_links['List/Purchase Receipt'] = [ - { label: 'Purchase Receipt', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/purchase-receipt' }, - { label: 'Barcode', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/articles/track-items-using-barcode' }, + { label: 'Purchase Receipt', url: docsUrl + 'user/manual/en/stock/purchase-receipt' }, + { label: 'Barcode', url: docsUrl + 'user/manual/en/stock/articles/track-items-using-barcode' }, ] frappe.help.help_links['List/Delivery Note'] = [ - { label: 'Delivery Note', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/delivery-note' }, - { label: 'Barcode', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/articles/track-items-using-barcode' }, - { label: 'Sales Return', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/sales-return' }, + { label: 'Delivery Note', url: docsUrl + 'user/manual/en/stock/delivery-note' }, + { label: 'Barcode', url: docsUrl + 'user/manual/en/stock/articles/track-items-using-barcode' }, + { label: 'Sales Return', url: docsUrl + 'user/manual/en/stock/sales-return' }, ] frappe.help.help_links['Form/Delivery Note'] = [ - { label: 'Delivery Note', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/delivery-note' }, - { label: 'Sales Return', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/sales-return' }, - { label: 'Barcode', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/articles/track-items-using-barcode' }, - { label: 'Subcontracting', url: 'https://frappe.github.io/erpnext/user/manual/en/manufacturing/subcontracting' }, + { label: 'Delivery Note', url: docsUrl + 'user/manual/en/stock/delivery-note' }, + { label: 'Sales Return', url: docsUrl + 'user/manual/en/stock/sales-return' }, + { label: 'Barcode', url: docsUrl + 'user/manual/en/stock/articles/track-items-using-barcode' }, + { label: 'Subcontracting', url: docsUrl + 'user/manual/en/manufacturing/subcontracting' }, ] frappe.help.help_links['List/Installation Note'] = [ - { label: 'Installation Note', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/installation-note' }, + { label: 'Installation Note', url: docsUrl + 'user/manual/en/stock/installation-note' }, ] frappe.help.help_links['Tree'] = [ - { label: 'Managing Tree Structure Masters', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/articles/managing-tree-structure-masters' }, + { label: 'Managing Tree Structure Masters', url: docsUrl + 'user/manual/en/setting-up/articles/managing-tree-structure-masters' }, ] frappe.help.help_links['List/Budget'] = [ - { label: 'Budgeting', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/budgeting' }, + { label: 'Budgeting', url: docsUrl + 'user/manual/en/accounts/budgeting' }, ] //Stock frappe.help.help_links['List/Material Request'] = [ - { label: 'Material Request', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/material-request' }, - { label: 'Auto-creation of Material Request', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/articles/auto-creation-of-material-request' }, + { label: 'Material Request', url: docsUrl + 'user/manual/en/stock/material-request' }, + { label: 'Auto-creation of Material Request', url: docsUrl + 'user/manual/en/stock/articles/auto-creation-of-material-request' }, ] frappe.help.help_links['Form/Material Request'] = [ - { label: 'Material Request', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/material-request' }, - { label: 'Auto-creation of Material Request', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/articles/auto-creation-of-material-request' }, + { label: 'Material Request', url: docsUrl + 'user/manual/en/stock/material-request' }, + { label: 'Auto-creation of Material Request', url: docsUrl + 'user/manual/en/stock/articles/auto-creation-of-material-request' }, ] frappe.help.help_links['Form/Stock Entry'] = [ - { label: 'Stock Entry', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/stock-entry' }, - { label: 'Stock Entry Types', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/articles/stock-entry-purpose' }, - { label: 'Repack Entry', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/articles/repack-entry' }, - { label: 'Opening Stock', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/opening-stock' }, - { label: 'Subcontracting', url: 'https://frappe.github.io/erpnext/user/manual/en/manufacturing/subcontracting' }, + { label: 'Stock Entry', url: docsUrl + 'user/manual/en/stock/stock-entry' }, + { label: 'Stock Entry Types', url: docsUrl + 'user/manual/en/stock/articles/stock-entry-purpose' }, + { label: 'Repack Entry', url: docsUrl + 'user/manual/en/stock/articles/repack-entry' }, + { label: 'Opening Stock', url: docsUrl + 'user/manual/en/stock/opening-stock' }, + { label: 'Subcontracting', url: docsUrl + 'user/manual/en/manufacturing/subcontracting' }, ] frappe.help.help_links['List/Stock Entry'] = [ - { label: 'Stock Entry', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/stock-entry' }, + { label: 'Stock Entry', url: docsUrl + 'user/manual/en/stock/stock-entry' }, ] frappe.help.help_links['Tree/Warehouse'] = [ - { label: 'Warehouse', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/warehouse' }, + { label: 'Warehouse', url: docsUrl + 'user/manual/en/stock/warehouse' }, ] frappe.help.help_links['List/Serial No'] = [ - { label: 'Serial No', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/serial-no' }, + { label: 'Serial No', url: docsUrl + 'user/manual/en/stock/serial-no' }, ] frappe.help.help_links['Form/Serial No'] = [ - { label: 'Serial No', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/serial-no' }, + { label: 'Serial No', url: docsUrl + 'user/manual/en/stock/serial-no' }, ] frappe.help.help_links['Form/Batch'] = [ - { label: 'Batch', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/batch' }, + { label: 'Batch', url: docsUrl + 'user/manual/en/stock/batch' }, ] frappe.help.help_links['Form/Packing Slip'] = [ - { label: 'Packing Slip', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/tools/packing-slip' }, + { label: 'Packing Slip', url: docsUrl + 'user/manual/en/stock/tools/packing-slip' }, ] frappe.help.help_links['Form/Quality Inspection'] = [ - { label: 'Quality Inspection', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/tools/quality-inspection' }, + { label: 'Quality Inspection', url: docsUrl + 'user/manual/en/stock/tools/quality-inspection' }, ] frappe.help.help_links['Form/Landed Cost Voucher'] = [ - { label: 'Landed Cost Voucher', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/tools/landed-cost-voucher' }, + { label: 'Landed Cost Voucher', url: docsUrl + 'user/manual/en/stock/tools/landed-cost-voucher' }, ] frappe.help.help_links['Tree/Item Group'] = [ - { label: 'Item Group', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/setup/item-group' }, + { label: 'Item Group', url: docsUrl + 'user/manual/en/stock/setup/item-group' }, ] frappe.help.help_links['Form/Item Attribute'] = [ - { label: 'Item Attribute', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/setup/item-attribute' }, + { label: 'Item Attribute', url: docsUrl + 'user/manual/en/stock/setup/item-attribute' }, ] frappe.help.help_links['Form/UOM'] = [ - { label: 'Fractions in UOM', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/articles/managing-fractions-in-uom' }, + { label: 'Fractions in UOM', url: docsUrl + 'user/manual/en/stock/articles/managing-fractions-in-uom' }, ] frappe.help.help_links['Form/Stock Reconciliation'] = [ - { label: 'Opening Stock Entry', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/opening-stock' }, + { label: 'Opening Stock Entry', url: docsUrl + 'user/manual/en/stock/opening-stock' }, ] //CRM frappe.help.help_links['Form/Lead'] = [ - { label: 'Lead', url: 'https://frappe.github.io/erpnext/user/manual/en/CRM/lead' }, + { label: 'Lead', url: docsUrl + 'user/manual/en/CRM/lead' }, ] frappe.help.help_links['Form/Opportunity'] = [ - { label: 'Opportunity', url: 'https://frappe.github.io/erpnext/user/manual/en/CRM/opportunity' }, + { label: 'Opportunity', url: docsUrl + 'user/manual/en/CRM/opportunity' }, ] frappe.help.help_links['Form/Address'] = [ - { label: 'Address', url: 'https://frappe.github.io/erpnext/user/manual/en/CRM/contact' }, + { label: 'Address', url: docsUrl + 'user/manual/en/CRM/contact' }, ] frappe.help.help_links['Form/Contact'] = [ - { label: 'Contact', url: 'https://frappe.github.io/erpnext/user/manual/en/CRM/contact' }, + { label: 'Contact', url: docsUrl + 'user/manual/en/CRM/contact' }, ] frappe.help.help_links['Form/Newsletter'] = [ - { label: 'Newsletter', url: 'https://frappe.github.io/erpnext/user/manual/en/CRM/newsletter' }, + { label: 'Newsletter', url: docsUrl + 'user/manual/en/CRM/newsletter' }, ] frappe.help.help_links['Form/Campaign'] = [ - { label: 'Campaign', url: 'https://frappe.github.io/erpnext/user/manual/en/CRM/setup/campaign' }, + { label: 'Campaign', url: docsUrl + 'user/manual/en/CRM/setup/campaign' }, ] frappe.help.help_links['Tree/Sales Person'] = [ - { label: 'Sales Person', url: 'https://frappe.github.io/erpnext/user/manual/en/CRM/setup/sales-person' }, + { label: 'Sales Person', url: docsUrl + 'user/manual/en/CRM/setup/sales-person' }, ] frappe.help.help_links['Form/Sales Person'] = [ - { label: 'Sales Person Target', url: 'https://frappe.github.io/erpnext/user/manual/en/selling/setup/sales-person-target-allocation' }, + { label: 'Sales Person Target', url: docsUrl + 'user/manual/en/selling/setup/sales-person-target-allocation' }, ] //Support frappe.help.help_links['List/Feedback Trigger'] = [ - { label: 'Feedback Trigger', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/feedback/setting-up-feedback' }, + { label: 'Feedback Trigger', url: docsUrl + 'user/manual/en/setting-up/feedback/setting-up-feedback' }, ] frappe.help.help_links['List/Feedback Request'] = [ - { label: 'Feedback Request', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/feedback/submit-feedback' }, + { label: 'Feedback Request', url: docsUrl + 'user/manual/en/setting-up/feedback/submit-feedback' }, ] frappe.help.help_links['List/Feedback Request'] = [ - { label: 'Feedback Request', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/feedback/submit-feedback' }, + { label: 'Feedback Request', url: docsUrl + 'user/manual/en/setting-up/feedback/submit-feedback' }, ] //Manufacturing frappe.help.help_links['Form/BOM'] = [ - { label: 'Bill of Material', url: 'https://frappe.github.io/erpnext/user/manual/en/manufacturing/bill-of-materials' }, - { label: 'Nested BOM Structure', url: 'https://frappe.github.io/erpnext/user/manual/en/manufacturing/articles/nested-bom-structure' }, + { label: 'Bill of Material', url: docsUrl + 'user/manual/en/manufacturing/bill-of-materials' }, + { label: 'Nested BOM Structure', url: docsUrl + 'user/manual/en/manufacturing/articles/nested-bom-structure' }, ] -frappe.help.help_links['Form/Production Order'] = [ - { label: 'Production Order', url: 'https://frappe.github.io/erpnext/user/manual/en/manufacturing/production-order' }, +frappe.help.help_links['Form/Work Order'] = [ + { label: 'Work Order', url: docsUrl + 'user/manual/en/manufacturing/work-order' }, ] frappe.help.help_links['Form/Workstation'] = [ - { label: 'Workstation', url: 'https://frappe.github.io/erpnext/user/manual/en/manufacturing/workstation' }, + { label: 'Workstation', url: docsUrl + 'user/manual/en/manufacturing/workstation' }, ] frappe.help.help_links['Form/Operation'] = [ - { label: 'Operation', url: 'https://frappe.github.io/erpnext/user/manual/en/manufacturing/operation' }, -] - -frappe.help.help_links['Form/Production Planning Tool'] = [ - { label: 'Production Planning Tool', url: 'https://frappe.github.io/erpnext/user/manual/en/manufacturing/tools/production-planning-tool' }, + { label: 'Operation', url: docsUrl + 'user/manual/en/manufacturing/operation' }, ] frappe.help.help_links['Form/BOM Update Tool'] = [ - { label: 'BOM Update Tool', url: 'https://frappe.github.io/erpnext/user/manual/en/manufacturing/tools/bom-update-tool' }, + { label: 'BOM Update Tool', url: docsUrl + 'user/manual/en/manufacturing/tools/bom-update-tool' }, ] //Customize frappe.help.help_links['Form/Customize Form'] = [ - { label: 'Custom Field', url: 'https://frappe.github.io/erpnext/user/manual/en/customize-erpnext/custom-field' }, - { label: 'Customize Field', url: 'https://frappe.github.io/erpnext/user/manual/en/customize-erpnext/customize-form' }, + { label: 'Custom Field', url: docsUrl + 'user/manual/en/customize-erpnext/custom-field' }, + { label: 'Customize Field', url: docsUrl + 'user/manual/en/customize-erpnext/customize-form' }, ] frappe.help.help_links['Form/Custom Field'] = [ - { label: 'Custom Field', url: 'https://frappe.github.io/erpnext/user/manual/en/customize-erpnext/custom-field' }, + { label: 'Custom Field', url: docsUrl + 'user/manual/en/customize-erpnext/custom-field' }, ] frappe.help.help_links['Form/Custom Field'] = [ - { label: 'Custom Field', url: 'https://frappe.github.io/erpnext/user/manual/en/customize-erpnext/custom-field' }, + { label: 'Custom Field', url: docsUrl + 'user/manual/en/customize-erpnext/custom-field' }, ] \ No newline at end of file From e1f5d22a02e2a139867c296edfc5b0b09a0035c2 Mon Sep 17 00:00:00 2001 From: scmmishra Date: Fri, 25 Jan 2019 14:27:23 +0530 Subject: [PATCH 065/169] [fix] Code formatting, removed trailing spaces --- erpnext/public/js/help_links.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/erpnext/public/js/help_links.js b/erpnext/public/js/help_links.js index d3cc688cd20..23e7deb6e9e 100644 --- a/erpnext/public/js/help_links.js +++ b/erpnext/public/js/help_links.js @@ -1,6 +1,6 @@ frappe.provide('frappe.help.help_links'); -const docsUrl = 'https://erpnext.com/docs/' +const docsUrl = 'https://erpnext.com/docs/'; frappe.help.help_links['Form/Rename Tool'] = [ { label: 'Bulk Rename', url: docsUrl + 'user/manual/en/setting-up/data/bulk-rename' }, @@ -320,12 +320,12 @@ frappe.help.help_links['Tree/Cost Center'] = [ frappe.help.help_links['List/Item'] = [ { label: 'Item', url: 'http://erpnext.com/docs/user/manual/en/stock/item' }, - { label: 'Item Price', url: docsUrl + 'user/manual/en/stock/item/item-price' }, + { label: 'Item Price', url: docsUrl + 'user/manual/en/stock/item/item-price' }, { label: 'Barcode', url: docsUrl + 'user/manual/en/stock/articles/track-items-using-barcode' }, { label: 'Item Wise Taxation', url: docsUrl + 'user/manual/en/accounts/item-wise-taxation' }, { label: 'Managing Fixed Assets', url: docsUrl + 'user/manual/en/accounts/managing-fixed-assets' }, { label: 'Item Codification', url: docsUrl + 'user/manual/en/stock/item/item-codification' }, - { label: 'Item Variants', url: docsUrl + 'user/manual/en/stock/item/item-variants' }, + { label: 'Item Variants', url: docsUrl + 'user/manual/en/stock/item/item-variants' }, { label: 'Item Valuation', url: docsUrl + 'user/manual/en/stock/item/item-valuation-fifo-and-moving-average' }, ] @@ -336,8 +336,8 @@ frappe.help.help_links['Form/Item'] = [ { label: 'Item Wise Taxation', url: docsUrl + 'user/manual/en/accounts/item-wise-taxation' }, { label: 'Managing Fixed Assets', url: docsUrl + 'user/manual/en/accounts/managing-fixed-assets' }, { label: 'Item Codification', url: docsUrl + 'user/manual/en/stock/item/item-codification' }, - { label: 'Item Variants', url: docsUrl + 'user/manual/en/stock/item/item-variants' }, - { label: 'Item Valuation', url: docsUrl + 'user/manual/en/stock/item/item-valuation-fifo-and-moving-average' }, + { label: 'Item Variants', url: docsUrl + 'user/manual/en/stock/item/item-variants' }, + { label: 'Item Valuation', url: docsUrl + 'user/manual/en/stock/item/item-valuation-fifo-and-moving-average' }, ] frappe.help.help_links['List/Purchase Receipt'] = [ From 1b63fa19207977cc5c7ccdf0343afc30fe914b0a Mon Sep 17 00:00:00 2001 From: scmmishra Date: Fri, 25 Jan 2019 14:56:30 +0530 Subject: [PATCH 066/169] [fix] Formatting issues --- erpnext/public/js/help_links.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/public/js/help_links.js b/erpnext/public/js/help_links.js index 23e7deb6e9e..458276eceb2 100644 --- a/erpnext/public/js/help_links.js +++ b/erpnext/public/js/help_links.js @@ -326,12 +326,12 @@ frappe.help.help_links['List/Item'] = [ { label: 'Managing Fixed Assets', url: docsUrl + 'user/manual/en/accounts/managing-fixed-assets' }, { label: 'Item Codification', url: docsUrl + 'user/manual/en/stock/item/item-codification' }, { label: 'Item Variants', url: docsUrl + 'user/manual/en/stock/item/item-variants' }, - { label: 'Item Valuation', url: docsUrl + 'user/manual/en/stock/item/item-valuation-fifo-and-moving-average' }, + { label: 'Item Valuation', url: docsUrl + 'user/manual/en/stock/item/item-valuation-fifo-and-moving-average' }, ] frappe.help.help_links['Form/Item'] = [ { label: 'Item', url: 'http://erpnext.com/docs/user/manual/en/stock/item' }, - { label: 'Item Price', url: docsUrl + 'user/manual/en/stock/item/item-price' }, + { label: 'Item Price', url: docsUrl + 'user/manual/en/stock/item/item-price' }, { label: 'Barcode', url: docsUrl + 'user/manual/en/stock/articles/track-items-using-barcode' }, { label: 'Item Wise Taxation', url: docsUrl + 'user/manual/en/accounts/item-wise-taxation' }, { label: 'Managing Fixed Assets', url: docsUrl + 'user/manual/en/accounts/managing-fixed-assets' }, From c2ffcc5e71a0112c0044a023200263a783fe4beb Mon Sep 17 00:00:00 2001 From: deepeshgarg007 Date: Sun, 27 Jan 2019 16:09:07 +0530 Subject: [PATCH 067/169] feat(POS): Customer wise price list in offline mode and enhancement in POS closing voucher --- erpnext/accounts/doctype/sales_invoice/pos.py | 16 ++ erpnext/accounts/page/pos/pos.js | 31 ++- .../pos_closing_voucher.js | 14 ++ .../pos_closing_voucher.json | 194 +++++++++++++++++- 4 files changed, 249 insertions(+), 6 deletions(-) diff --git a/erpnext/accounts/doctype/sales_invoice/pos.py b/erpnext/accounts/doctype/sales_invoice/pos.py index 287da08ef5f..74ec0b30c7d 100755 --- a/erpnext/accounts/doctype/sales_invoice/pos.py +++ b/erpnext/accounts/doctype/sales_invoice/pos.py @@ -55,6 +55,7 @@ def get_pos_data(): 'barcode_data': get_barcode_data(items_list), 'tax_data': get_item_tax_data(), 'price_list_data': get_price_list_data(doc.selling_price_list), + 'customer_wise_price_list': get_customer_wise_price_list(), 'bin_data': get_bin_data(pos_profile), 'pricing_rules': get_pricing_rule_data(doc), 'print_template': print_template, @@ -328,6 +329,21 @@ def get_price_list_data(selling_price_list): return itemwise_price_list +def get_customer_wise_price_list(): + customer_wise_price = {} + customer_price_list_mapping = frappe._dict(frappe.get_all('Customer',fields = ['default_price_list', 'name'], as_list=1)) + + price_lists = frappe.db.sql(""" Select ifnull(price_list_rate, 0) as price_list_rate, + item_code, price_list from `tabItem Price` """, as_dict=1) + + for item in price_lists: + if item.price_list and customer_price_list_mapping.get(item.price_list): + + customer_wise_price.setdefault(customer_price_list_mapping.get(item.price_list),{}).setdefault( + item.item_code, item.price_list_rate + ) + + return customer_wise_price def get_bin_data(pos_profile): itemwise_bin_data = {} diff --git a/erpnext/accounts/page/pos/pos.js b/erpnext/accounts/page/pos/pos.js index c89035c33f3..17d6d0ddfc5 100755 --- a/erpnext/accounts/page/pos/pos.js +++ b/erpnext/accounts/page/pos/pos.js @@ -125,7 +125,7 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({ this.page.add_menu_item(__("Cashier Closing"), function () { frappe.set_route('List', 'Cashier Closing'); - }); + }); this.page.add_menu_item(__("POS Profile"), function () { frappe.set_route('List', 'POS Profile'); @@ -313,6 +313,7 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({ this.contacts = r.message.contacts; this.address = r.message.address || {}; this.price_list_data = r.message.price_list_data; + this.customer_wise_price_list = r.message.customer_wise_price_list this.bin_data = r.message.bin_data; this.pricing_rules = r.message.pricing_rules; this.print_template = r.message.print_template; @@ -798,6 +799,7 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({ if (item.action) { $(this).val(""); } + me.make_item_list(item.customer_name); }); }, @@ -1037,7 +1039,7 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({ this.numeric_keypad.show(); }, - make_item_list: function () { + make_item_list: function (customer=null) { var me = this; if (!this.price_list) { frappe.msgprint(__("Price List not found or disabled")); @@ -1051,10 +1053,17 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({ if (this.items.length > 0) { $.each(this.items, function(index, obj) { + let customer_price_list = me.customer_wise_price_list[customer]; + let item_price + if (customer && customer_price_list && customer_price_list[obj.name]) { + item_price = format_currency(customer_price_list[obj.name], me.frm.doc.currency); + } else { + item_price = format_currency(me.price_list_data[obj.name], me.frm.doc.currency); + } if(index < me.page_len) { $(frappe.render_template("pos_item", { item_code: obj.name, - item_price: format_currency(me.price_list_data[obj.name], me.frm.doc.currency), + item_price: item_price, item_name: obj.name === obj.item_name ? "" : obj.item_name, item_image: obj.image, item_stock: __('Stock Qty') + ": " + me.get_actual_qty(obj), @@ -1417,8 +1426,20 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({ this.child.income_account = this.pos_profile_data['income_account'] || this.items[0].income_account; this.child.warehouse = (this.item_serial_no[this.child.item_code] ? this.item_serial_no[this.child.item_code][1] : (this.pos_profile_data['warehouse'] || this.items[0].default_warehouse)); - this.child.price_list_rate = flt(this.price_list_data[this.child.item_code] * this.child.conversion_factor, 9) / flt(this.frm.doc.conversion_rate, 9); - this.child.rate = flt(this.price_list_data[this.child.item_code] * this.child.conversion_factor, 9) / flt(this.frm.doc.conversion_rate, 9); + + customer = this.frm.doc.customer; + let rate + + customer_price_list = this.customer_wise_price_list[customer] + if (customer_price_list && customer_price_list[this.child.item_code]){ + rate = flt(this.customer_wise_price_list[customer][this.child.item_code] * this.child.conversion_factor, 9) / flt(this.frm.doc.conversion_rate, 9); + } + else{ + rate = flt(this.price_list_data[this.child.item_code] * this.child.conversion_factor, 9) / flt(this.frm.doc.conversion_rate, 9); + } + + this.child.price_list_rate = rate; + this.child.rate = rate; this.child.actual_qty = me.get_actual_qty(this.items[0]); this.child.amount = flt(this.child.qty) * flt(this.child.rate); this.child.batch_no = this.item_batch_no[this.child.item_code]; diff --git a/erpnext/selling/doctype/pos_closing_voucher/pos_closing_voucher.js b/erpnext/selling/doctype/pos_closing_voucher/pos_closing_voucher.js index 67ff8cb649c..13bd87867b9 100644 --- a/erpnext/selling/doctype/pos_closing_voucher/pos_closing_voucher.js +++ b/erpnext/selling/doctype/pos_closing_voucher/pos_closing_voucher.js @@ -20,6 +20,16 @@ frappe.ui.form.on('POS Closing Voucher', { }; }); }, + + total_amount: function(frm) { + get_difference_amount(frm); + }, + custody_amount: function(frm){ + get_difference_amount(frm); + }, + expense_amount: function(frm){ + get_difference_amount(frm); + }, refresh: function(frm) { get_closing_voucher_details(frm); }, @@ -47,6 +57,10 @@ frappe.ui.form.on('POS Closing Voucher Details', { } }); +var get_difference_amount = function(frm){ + frm.doc.difference = frm.doc.total_amount - frm.doc.custody_amount - frm.doc.expense_amount; + refresh_field("difference"); +}; var get_closing_voucher_details = function(frm) { if (frm.doc.period_end_date && frm.doc.period_start_date && frm.doc.company && frm.doc.pos_profile && frm.doc.user) { diff --git a/erpnext/selling/doctype/pos_closing_voucher/pos_closing_voucher.json b/erpnext/selling/doctype/pos_closing_voucher/pos_closing_voucher.json index e24239526ac..0ebea83e601 100644 --- a/erpnext/selling/doctype/pos_closing_voucher/pos_closing_voucher.json +++ b/erpnext/selling/doctype/pos_closing_voucher/pos_closing_voucher.json @@ -1,5 +1,6 @@ { "allow_copy": 0, + "allow_events_in_timeline": 0, "allow_guest_to_view": 0, "allow_import": 0, "allow_rename": 0, @@ -307,6 +308,197 @@ "translatable": 0, "unique": 0 }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "expense_details_section", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Expense Details", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "expense_amount", + "fieldtype": "Currency", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Expense Amount", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "custody_amount", + "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Amount in Custody", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "column_break_13", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "total_amount", + "fieldtype": "Currency", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Total Collected Amount", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "difference", + "fieldtype": "Currency", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 1, + "in_standard_filter": 0, + "label": "Difference", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, { "allow_bulk_edit": 0, "allow_in_quick_entry": 0, @@ -766,7 +958,7 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2018-08-21 16:15:54.363636", + "modified": "2019-01-26 13:23:49.192650", "modified_by": "Administrator", "module": "Selling", "name": "POS Closing Voucher", From aac404a155c5d0d3b2a7cfcc5b940ee2aa33248d Mon Sep 17 00:00:00 2001 From: navdeepghai1 Date: Mon, 28 Jan 2019 10:42:16 +0400 Subject: [PATCH 068/169] Fixed net_pay calculation issue --- erpnext/hr/doctype/salary_slip/salary_slip.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/hr/doctype/salary_slip/salary_slip.py b/erpnext/hr/doctype/salary_slip/salary_slip.py index 3ee98e6be03..901ede11976 100644 --- a/erpnext/hr/doctype/salary_slip/salary_slip.py +++ b/erpnext/hr/doctype/salary_slip/salary_slip.py @@ -360,7 +360,7 @@ class SalarySlip(TransactionBase): elif not d.amount: d.amount = d.default_amount if not d.do_not_include_in_total: - self.set(total_field, self.get(total_field) + flt(d.amount)) + self.set(total_field, self.get(total_field) + flt(d.amount, 2)) def calculate_net_pay(self): if self.salary_structure: @@ -473,4 +473,4 @@ def unlink_ref_doc_from_salary_slip(ref_no): if linked_ss: for ss in linked_ss: ss_doc = frappe.get_doc("Salary Slip", ss) - frappe.db.set_value("Salary Slip", ss_doc.name, "journal_entry", "") \ No newline at end of file + frappe.db.set_value("Salary Slip", ss_doc.name, "journal_entry", "") From 0bee62b460865fda32ad5f1d2a32ec1c387402e2 Mon Sep 17 00:00:00 2001 From: deepeshgarg007 Date: Mon, 28 Jan 2019 12:45:11 +0530 Subject: [PATCH 069/169] fix: Made period fields read only and added validation for multiple entries by same user --- .../pos_closing_voucher/pos_closing_voucher.js | 1 + .../pos_closing_voucher.json | 6 +++--- .../pos_closing_voucher/pos_closing_voucher.py | 17 +++++++++++++++++ 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/erpnext/selling/doctype/pos_closing_voucher/pos_closing_voucher.js b/erpnext/selling/doctype/pos_closing_voucher/pos_closing_voucher.js index 13bd87867b9..f24caf767fe 100644 --- a/erpnext/selling/doctype/pos_closing_voucher/pos_closing_voucher.js +++ b/erpnext/selling/doctype/pos_closing_voucher/pos_closing_voucher.js @@ -76,6 +76,7 @@ var get_closing_voucher_details = function(frm) { refresh_field("grand_total"); refresh_field("net_total"); refresh_field("total_quantity"); + refresh_field("total_amount"); frm.get_field("payment_reconciliation_details").$wrapper.html(r.message); } diff --git a/erpnext/selling/doctype/pos_closing_voucher/pos_closing_voucher.json b/erpnext/selling/doctype/pos_closing_voucher/pos_closing_voucher.json index 0ebea83e601..2ac57794b4f 100644 --- a/erpnext/selling/doctype/pos_closing_voucher/pos_closing_voucher.json +++ b/erpnext/selling/doctype/pos_closing_voucher/pos_closing_voucher.json @@ -39,7 +39,7 @@ "precision": "", "print_hide": 0, "print_hide_if_no_value": 0, - "read_only": 0, + "read_only": 1, "remember_last_selected_value": 0, "report_hide": 0, "reqd": 1, @@ -72,7 +72,7 @@ "precision": "", "print_hide": 0, "print_hide_if_no_value": 0, - "read_only": 0, + "read_only": 1, "remember_last_selected_value": 0, "report_hide": 0, "reqd": 1, @@ -958,7 +958,7 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2019-01-26 13:23:49.192650", + "modified": "2019-01-28 12:33:45.217813", "modified_by": "Administrator", "module": "Selling", "name": "POS Closing Voucher", diff --git a/erpnext/selling/doctype/pos_closing_voucher/pos_closing_voucher.py b/erpnext/selling/doctype/pos_closing_voucher/pos_closing_voucher.py index e7fc85e05ac..c45571f57ca 100644 --- a/erpnext/selling/doctype/pos_closing_voucher/pos_closing_voucher.py +++ b/erpnext/selling/doctype/pos_closing_voucher/pos_closing_voucher.py @@ -4,6 +4,7 @@ from __future__ import unicode_literals import frappe +from frappe import _ from frappe.model.document import Document from collections import defaultdict from erpnext.controllers.taxes_and_totals import get_itemised_tax_breakup_data @@ -26,6 +27,7 @@ class POSClosingVoucher(Document): sales_summary = get_sales_summary(invoice_list) self.set_sales_summary_values(sales_summary) + self.total_amount = sales_summary['grand_total'] if not self.get('payment_reconciliation'): mop = get_mode_of_payment_details(invoice_list) @@ -36,6 +38,21 @@ class POSClosingVoucher(Document): return self.get_payment_reconciliation_details() + def validate(self): + user = frappe.get_all('POS Closing Voucher', + filters = { + 'user': self.user, + 'docstatus': 1 + }, + or_filters = { + 'period_start_date': ('between', [self.period_start_date, self.period_end_date]), + 'period_end_date': ('between', [self.period_start_date, self.period_end_date]) + }) + + if user: + frappe.throw(_("POS Closing Voucher alreday exists for {0} between date {1} and {2}" + .format(self.user, self.period_start_date, self.period_end_date))) + def set_invoice_list(self, invoice_list): self.sales_invoices_summary = [] for invoice in invoice_list: From f0cfe98860b468a7ca72c6094d871a630bf4adec Mon Sep 17 00:00:00 2001 From: deepeshgarg007 Date: Mon, 28 Jan 2019 17:58:44 +0530 Subject: [PATCH 070/169] fix: Added missing semicolon and removed null from parameter --- erpnext/accounts/page/pos/pos.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/page/pos/pos.js b/erpnext/accounts/page/pos/pos.js index 17d6d0ddfc5..1dcbdc67890 100755 --- a/erpnext/accounts/page/pos/pos.js +++ b/erpnext/accounts/page/pos/pos.js @@ -1039,7 +1039,7 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({ this.numeric_keypad.show(); }, - make_item_list: function (customer=null) { + make_item_list: function (customer) { var me = this; if (!this.price_list) { frappe.msgprint(__("Price List not found or disabled")); @@ -1428,7 +1428,7 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({ ? this.item_serial_no[this.child.item_code][1] : (this.pos_profile_data['warehouse'] || this.items[0].default_warehouse)); customer = this.frm.doc.customer; - let rate + let rate; customer_price_list = this.customer_wise_price_list[customer] if (customer_price_list && customer_price_list[this.child.item_code]){ From 92bb84aa70270a8f6b278c040eff9dbd1097b1b5 Mon Sep 17 00:00:00 2001 From: navdeepghai1 Date: Mon, 28 Jan 2019 16:54:58 +0400 Subject: [PATCH 071/169] Changed static precision(2) value to system setting currency_precision value --- erpnext/hr/doctype/salary_slip/salary_slip.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/erpnext/hr/doctype/salary_slip/salary_slip.py b/erpnext/hr/doctype/salary_slip/salary_slip.py index 901ede11976..11538cc368a 100644 --- a/erpnext/hr/doctype/salary_slip/salary_slip.py +++ b/erpnext/hr/doctype/salary_slip/salary_slip.py @@ -330,7 +330,7 @@ class SalarySlip(TransactionBase): if frappe.db.get_value('Timesheet', data.time_sheet, 'status') == 'Payrolled': frappe.throw(_("Salary Slip of employee {0} already created for time sheet {1}").format(self.employee, data.time_sheet)) - def sum_components(self, component_type, total_field): + def sum_components(self, component_type, total_field, precision): joining_date, relieving_date = frappe.db.get_value("Employee", self.employee, ["date_of_joining", "relieving_date"]) @@ -350,7 +350,7 @@ class SalarySlip(TransactionBase): )): d.amount = rounded( - (flt(d.default_amount) * flt(self.payment_days) + (flt(d.default_amount, precision) * flt(self.payment_days) / cint(self.total_working_days)), self.precision("amount", component_type) ) @@ -360,19 +360,19 @@ class SalarySlip(TransactionBase): elif not d.amount: d.amount = d.default_amount if not d.do_not_include_in_total: - self.set(total_field, self.get(total_field) + flt(d.amount, 2)) + self.set(total_field, self.get(total_field) + flt(d.amount, precision)) def calculate_net_pay(self): if self.salary_structure: self.calculate_component_amounts() disable_rounded_total = cint(frappe.db.get_value("Global Defaults", None, "disable_rounded_total")) - + precision = frappe.defaults.get_global_default("currency_precision") self.total_deduction = 0 self.gross_pay = 0 - self.sum_components('earnings', 'gross_pay') - self.sum_components('deductions', 'total_deduction') + self.sum_components('earnings', 'gross_pay', precision) + self.sum_components('deductions', 'total_deduction', precision) self.set_loan_repayment() From 9acb885e60f77cd4e9ea8c98bdc39c18abcac731 Mon Sep 17 00:00:00 2001 From: Aditya Hase Date: Tue, 29 Jan 2019 10:52:37 +0530 Subject: [PATCH 072/169] fix(sqli): Avoid SQL Injection with sender param (#16509) --- erpnext/templates/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/templates/utils.py b/erpnext/templates/utils.py index eb84bcc8d85..8e14c067f10 100644 --- a/erpnext/templates/utils.py +++ b/erpnext/templates/utils.py @@ -16,7 +16,7 @@ def send_message(subject="Website Query", message="", sender="", status="Open"): customer = frappe.db.sql("""select distinct dl.link_name from `tabDynamic Link` dl left join `tabContact` c on dl.parent=c.name where dl.link_doctype='Customer' - and c.email_id='{email_id}'""".format(email_id=sender)) + and c.email_id = %s""", sender) if not customer: lead = frappe.db.get_value('Lead', dict(email_id=sender)) From a8e743e3c42b3d48ab443384c76279c30a2324a1 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Mon, 28 Jan 2019 11:27:35 +0530 Subject: [PATCH 073/169] fix: fiscal year always be for 12 months --- erpnext/accounts/doctype/fiscal_year/fiscal_year.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/erpnext/accounts/doctype/fiscal_year/fiscal_year.py b/erpnext/accounts/doctype/fiscal_year/fiscal_year.py index a00aebe5a23..d749c89f34d 100644 --- a/erpnext/accounts/doctype/fiscal_year/fiscal_year.py +++ b/erpnext/accounts/doctype/fiscal_year/fiscal_year.py @@ -37,9 +37,10 @@ class FiscalYear(Document): if getdate(self.year_start_date) > getdate(self.year_end_date): frappe.throw(_("Fiscal Year Start Date should not be greater than Fiscal Year End Date")) - if (getdate(self.year_end_date) - getdate(self.year_start_date)).days > 366: - date = getdate(self.year_start_date) + relativedelta(years=1) - relativedelta(days=1) - self.year_end_date = date.strftime("%Y-%m-%d") + date = getdate(self.year_start_date) + relativedelta(years=1) - relativedelta(days=1) + + if getdate(self.year_end_date) != date: + frappe.throw(_("The difference between the year start date and year end date must be 12 months.")) def on_update(self): check_duplicate_fiscal_year(self) From 07f75a3e549c4a5ee7b6edd8d0f2bb3aa92e9e6f Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Tue, 29 Jan 2019 12:01:54 +0530 Subject: [PATCH 074/169] feat: on click of pay button and on focus out of qty field remove the zero qty items from the cart --- erpnext/accounts/page/pos/pos.js | 46 +++++++++++++++++++++++++------- 1 file changed, 36 insertions(+), 10 deletions(-) diff --git a/erpnext/accounts/page/pos/pos.js b/erpnext/accounts/page/pos/pos.js index c89035c33f3..7fcd2cb27d7 100755 --- a/erpnext/accounts/page/pos/pos.js +++ b/erpnext/accounts/page/pos/pos.js @@ -602,7 +602,7 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({ this.remove_item = [] idx = $(this.wrapper).find(".pos-selected-item-action").attr("data-idx") this.remove_item.push(idx) - this.remove_zero_qty_item() + this.remove_zero_qty_items_from_cart() this.update_paid_amount_status(false) }, @@ -1167,20 +1167,27 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({ $(this.wrapper).on("change", ".pos-item-qty", function () { var item_code = $(this).parents(".pos-selected-item-action").attr("data-item-code"); var qty = $(this).val(); - me.update_qty(item_code, qty) - me.update_value() + me.update_qty(item_code, qty); + me.update_value(); + }) + + $(this.wrapper).on("focusout", ".pos-item-qty", function () { + var item_code = $(this).parents(".pos-selected-item-action").attr("data-item-code"); + var qty = $(this).val(); + me.update_qty(item_code, qty, true); + me.update_value(); }) $(this.wrapper).find("[data-action='increase-qty']").on("click", function () { var item_code = $(this).parents(".pos-bill-item").attr("data-item-code"); var qty = flt($(this).parents(".pos-bill-item").find('.pos-item-qty').val()) + 1; - me.update_qty(item_code, qty) + me.update_qty(item_code, qty); }) $(this.wrapper).find("[data-action='decrease-qty']").on("click", function () { var item_code = $(this).parents(".pos-bill-item").attr("data-item-code"); var qty = flt($(this).parents(".pos-bill-item").find('.pos-item-qty').val()) - 1; - me.update_qty(item_code, qty) + me.update_qty(item_code, qty); }) $(this.wrapper).on("change", ".pos-item-disc", function () { @@ -1219,11 +1226,11 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({ me.bind_delete_event() }, - update_qty: function (item_code, qty) { + update_qty: function (item_code, qty, remove_zero_qty_items) { var me = this; this.items = this.get_items(item_code); this.validate_serial_no() - this.set_item_details(item_code, "qty", qty); + this.set_item_details(item_code, "qty", qty, remove_zero_qty_items); }, update_discount: function(item_code, discount) { @@ -1284,7 +1291,7 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({ }) }, - set_item_details: function (item_code, field, value) { + set_item_details: function (item_code, field, value, remove_zero_qty_items) { var me = this; if (value < 0) { frappe.throw(__("Enter value must be positive")); @@ -1299,7 +1306,7 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({ d[field] = flt(value); d.amount = flt(d.rate) * flt(d.qty); - if (d.qty == 0) { + if (d.qty == 0 && remove_zero_qty_items) { me.remove_item.push(d.idx) } @@ -1309,10 +1316,14 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({ } }); + if (field == 'qty') { + this.remove_zero_qty_items_from_cart(); + } + this.update_paid_amount_status(false) }, - remove_zero_qty_item: function () { + remove_zero_qty_items_from_cart: function () { var me = this; var idx = 0; this.items = [] @@ -1826,10 +1837,25 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({ validate: function () { var me = this; this.customer_validate(); + this.validate_zero_qty_items(); this.item_validate(); this.validate_mode_of_payments(); }, + validate_zero_qty_items: function() { + this.remove_item = []; + + this.frm.doc.items.forEach(d => { + if (d.qty == 0) { + this.remove_item.push(d.idx); + } + }); + + if(this.remove_item) { + this.remove_zero_qty_items_from_cart(); + } + }, + item_validate: function () { if (this.frm.doc.items.length == 0) { frappe.throw(__("Select items to save the invoice")) From 9520e345bd1f61e242c3f8d3e2a1c2b4d1cded17 Mon Sep 17 00:00:00 2001 From: Sagar Vora Date: Tue, 29 Jan 2019 13:03:46 +0530 Subject: [PATCH 075/169] fix: better error messages --- erpnext/accounts/doctype/fiscal_year/fiscal_year.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/fiscal_year/fiscal_year.py b/erpnext/accounts/doctype/fiscal_year/fiscal_year.py index d749c89f34d..6bb71b667f1 100644 --- a/erpnext/accounts/doctype/fiscal_year/fiscal_year.py +++ b/erpnext/accounts/doctype/fiscal_year/fiscal_year.py @@ -35,12 +35,12 @@ class FiscalYear(Document): def validate_dates(self): if getdate(self.year_start_date) > getdate(self.year_end_date): - frappe.throw(_("Fiscal Year Start Date should not be greater than Fiscal Year End Date")) + frappe.throw(_("Fiscal Year Start Date should be one year earlier than Fiscal Year End Date")) date = getdate(self.year_start_date) + relativedelta(years=1) - relativedelta(days=1) if getdate(self.year_end_date) != date: - frappe.throw(_("The difference between the year start date and year end date must be 12 months.")) + frappe.throw(_("Fiscal Year End Date should be one year after Fiscal Year Start Date")) def on_update(self): check_duplicate_fiscal_year(self) From 4e45663297d01d2621e2ed2cdd6aa9702481cc67 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Tue, 29 Jan 2019 14:02:08 +0530 Subject: [PATCH 076/169] fix(stock): get item price based on party --- erpnext/stock/get_item_details.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/erpnext/stock/get_item_details.py b/erpnext/stock/get_item_details.py index e1607a927fe..ec1031c70f2 100644 --- a/erpnext/stock/get_item_details.py +++ b/erpnext/stock/get_item_details.py @@ -440,13 +440,12 @@ def get_item_price(args, item_code, ignore_party=False): and ifnull(uom, '') in ('', %(uom)s)""" if not ignore_party: - conditions += " and (customer is null or customer = '') and (supplier is null or supplier = '')" if args.get("customer"): conditions += " and customer=%(customer)s" - - if args.get("supplier"): + elif args.get("supplier"): conditions += " and supplier=%(supplier)s" - + else: + conditions += " and (customer is null or customer = '') and (supplier is null or supplier = '')" if args.get('min_qty'): conditions += " and ifnull(min_qty, 0) <= %(min_qty)s" From 115a252f55393b3753b6fddbdb8cbfa5b669be0c Mon Sep 17 00:00:00 2001 From: Sagar Vora Date: Tue, 29 Jan 2019 14:40:10 +0530 Subject: [PATCH 077/169] docs: changelog for v11.0.4 --- erpnext/change_log/v11/v11_0_4.md | 72 +++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 erpnext/change_log/v11/v11_0_4.md diff --git a/erpnext/change_log/v11/v11_0_4.md b/erpnext/change_log/v11/v11_0_4.md new file mode 100644 index 00000000000..0c4325f3b47 --- /dev/null +++ b/erpnext/change_log/v11/v11_0_4.md @@ -0,0 +1,72 @@ +- Enhancements + + - Accounting + + - Company Tree + - Multiple Finance Books + - Bank Statement Upload + - Tax Withholding + - Subscriptions and Deferred Revenue + - Inter Company Transactions + - Standalone Credit / Debit Note + - Reverse Journal Entry + - Enhanced Bank Guarantee + - Cost Center Numbering + + - Human Resource + + - Department Hierarchy + - Leave Management + - Leave Period + - New Leave Types + - Leave Encashment + - Compensatory Leave + - Attendance Request + - Enhanced Payroll + - New Salary Structure + - Additional Salary + - Payroll Period + - Employee Benefits + - Employee Tax Exemptions + - Auto Calculation of Tax Deduction + - Enhanced Salary Processing + - Employee Lifecycle + - Employee Onboarding + - Employee Separation + - Employee Transfer and Promotion + - Shift Planning + - Staffing Plan + + - Asset Management + + - Capital-Work-in-Progress (CWIP) Accounting + - Multiple depreciation schedule based on finance book + - Asset Value Adjustment + - Improved Asset Movement between location or employee + - New Depreciation method Written Down Value (WDV) + + - POS + + - Allow draft mode print in online POS + - Allowed print before pay + - Save the invoice before print + + - Other Features + + - A free marketplace where any ERPNext user can list their products and be discovered by thousands of other companies using ERPNext + - Loyalty Management + - Subscriptions + - Shareholder Management + - Production Plan and Job Card + - Delivery Trip + - Updated Timesheets + - Lead Notes + + - GST (India) + - Auto selection of GST tax template based on company and shipping address + - GSTR-1 based on the address + - HSN-wise summary of outwards supplies + +- Changes have been made to ensure ERPNext is compatible with Python 3 +- Better documentation is now available with support for more languages +- A lot of other fixes have been done to ensure a better overall user experience \ No newline at end of file From 7ef69b68f80ca3cda0055aeb4b1014c69d332758 Mon Sep 17 00:00:00 2001 From: Sagar Vora Date: Tue, 29 Jan 2019 15:52:57 +0530 Subject: [PATCH 078/169] Update v11_0_4.md --- erpnext/change_log/v11/v11_0_4.md | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/erpnext/change_log/v11/v11_0_4.md b/erpnext/change_log/v11/v11_0_4.md index 0c4325f3b47..771c80be019 100644 --- a/erpnext/change_log/v11/v11_0_4.md +++ b/erpnext/change_log/v11/v11_0_4.md @@ -6,14 +6,17 @@ - Multiple Finance Books - Bank Statement Upload - Tax Withholding - - Subscriptions and Deferred Revenue + - Subscriptions + - Deferred Revenue and Expenses + - Exchange Rate Revaluation - Inter Company Transactions - Standalone Credit / Debit Note - Reverse Journal Entry - Enhanced Bank Guarantee - Cost Center Numbering + - Loyalty Points Management - - Human Resource + - Human Resources - Department Hierarchy - Leave Management @@ -30,10 +33,12 @@ - Employee Tax Exemptions - Auto Calculation of Tax Deduction - Enhanced Salary Processing - - Employee Lifecycle - Employee Onboarding - Employee Separation - - Employee Transfer and Promotion + - Employee Transfer + - Employee Promotion + - Employee Incentive + - Retention Bonus - Shift Planning - Staffing Plan @@ -54,8 +59,8 @@ - Other Features - A free marketplace where any ERPNext user can list their products and be discovered by thousands of other companies using ERPNext - - Loyalty Management - - Subscriptions + - Add/Update quantity in Sales & Purchase Order without amending document + - Enhanced Item Price (Based on UOM, Party, Min. Qty, etc.) - Shareholder Management - Production Plan and Job Card - Delivery Trip @@ -69,4 +74,4 @@ - Changes have been made to ensure ERPNext is compatible with Python 3 - Better documentation is now available with support for more languages -- A lot of other fixes have been done to ensure a better overall user experience \ No newline at end of file +- A lot of other fixes have been done to ensure a better overall user experience From bad36ef3efbef8c724d6e5c1fa0d4d9aad47bfed Mon Sep 17 00:00:00 2001 From: Sagar Vora Date: Tue, 29 Jan 2019 16:00:45 +0530 Subject: [PATCH 079/169] fix: add node_modules to gitignore (#16515) --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 68272c7d4d1..16522447c22 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ erpnext/docs/current *.swo __pycache__ *~ +node_modules/ \ No newline at end of file From 9f33c208d7bb0ea9c2af6c5f8d29daa70b9c2225 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Tue, 29 Jan 2019 16:07:07 +0530 Subject: [PATCH 080/169] Update v11_0_4.md --- erpnext/change_log/v11/v11_0_4.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/erpnext/change_log/v11/v11_0_4.md b/erpnext/change_log/v11/v11_0_4.md index 771c80be019..f4dfe16faf3 100644 --- a/erpnext/change_log/v11/v11_0_4.md +++ b/erpnext/change_log/v11/v11_0_4.md @@ -15,6 +15,7 @@ - Enhanced Bank Guarantee - Cost Center Numbering - Loyalty Points Management + - Enhanced General ledger report - Human Resources @@ -66,6 +67,8 @@ - Delivery Trip - Updated Timesheets - Lead Notes + - Better Sales / Purchase / Stock Analytics report + - Currency exchange API is changed to frankfurter public domain - GST (India) - Auto selection of GST tax template based on company and shipping address From a95ed44d3df7f8534956db71ddf8c5cc37e8783f Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Tue, 29 Jan 2019 16:24:53 +0530 Subject: [PATCH 081/169] fix: test case for fiscal year (#16516) --- erpnext/accounts/doctype/fiscal_year/fiscal_year.py | 8 ++++++-- erpnext/accounts/doctype/fiscal_year/test_fiscal_year.py | 6 ++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/erpnext/accounts/doctype/fiscal_year/fiscal_year.py b/erpnext/accounts/doctype/fiscal_year/fiscal_year.py index 6bb71b667f1..d80bc7fad10 100644 --- a/erpnext/accounts/doctype/fiscal_year/fiscal_year.py +++ b/erpnext/accounts/doctype/fiscal_year/fiscal_year.py @@ -9,6 +9,8 @@ from dateutil.relativedelta import relativedelta from frappe.model.document import Document +class FiscalYearIncorrectDate(frappe.ValidationError): pass + class FiscalYear(Document): def set_as_default(self): frappe.db.set_value("Global Defaults", None, "current_fiscal_year", self.name) @@ -35,12 +37,14 @@ class FiscalYear(Document): def validate_dates(self): if getdate(self.year_start_date) > getdate(self.year_end_date): - frappe.throw(_("Fiscal Year Start Date should be one year earlier than Fiscal Year End Date")) + frappe.throw(_("Fiscal Year Start Date should be one year earlier than Fiscal Year End Date"), + FiscalYearIncorrectDate) date = getdate(self.year_start_date) + relativedelta(years=1) - relativedelta(days=1) if getdate(self.year_end_date) != date: - frappe.throw(_("Fiscal Year End Date should be one year after Fiscal Year Start Date")) + frappe.throw(_("Fiscal Year End Date should be one year after Fiscal Year Start Date"), + FiscalYearIncorrectDate) def on_update(self): check_duplicate_fiscal_year(self) diff --git a/erpnext/accounts/doctype/fiscal_year/test_fiscal_year.py b/erpnext/accounts/doctype/fiscal_year/test_fiscal_year.py index 5f90bb38670..f7b77827668 100644 --- a/erpnext/accounts/doctype/fiscal_year/test_fiscal_year.py +++ b/erpnext/accounts/doctype/fiscal_year/test_fiscal_year.py @@ -5,6 +5,8 @@ from __future__ import unicode_literals import frappe, unittest +from erpnext.accounts.doctype.fiscal_year.fiscal_year import FiscalYearIncorrectDate + test_records = frappe.get_test_records('Fiscal Year') test_ignore = ["Company"] @@ -12,12 +14,12 @@ class TestFiscalYear(unittest.TestCase): def test_extra_year(self): if frappe.db.exists("Fiscal Year", "_Test Fiscal Year 2000"): frappe.delete_doc("Fiscal Year", "_Test Fiscal Year 2000") + fy = frappe.get_doc({ "doctype": "Fiscal Year", "year": "_Test Fiscal Year 2000", "year_end_date": "2002-12-31", "year_start_date": "2000-04-01" }) - fy.insert() - self.assertEqual(fy.year_end_date, '2001-03-31') + self.assertRaises(FiscalYearIncorrectDate, fy.insert) From b32d9458b5ed456fbb3c629cfd886fcb7eb1375d Mon Sep 17 00:00:00 2001 From: Sagar Vora Date: Tue, 29 Jan 2019 17:30:19 +0550 Subject: [PATCH 082/169] bumped to version 10.1.81 --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 847618232c7..c1090e9e0a7 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -5,7 +5,7 @@ import frappe from erpnext.hooks import regional_overrides from frappe.utils import getdate -__version__ = '10.1.80' +__version__ = '10.1.81' def get_default_company(user=None): '''Get default company for user''' From 51a27b3524d79adee63b3a0d86fcc091f89581d3 Mon Sep 17 00:00:00 2001 From: Sagar Vora Date: Tue, 29 Jan 2019 17:52:47 +0530 Subject: [PATCH 083/169] fix: unsaved merge conflict --- .../hr/doctype/payroll_entry/payroll_entry.py | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/erpnext/hr/doctype/payroll_entry/payroll_entry.py b/erpnext/hr/doctype/payroll_entry/payroll_entry.py index 9dbca5ec66a..af5e3d0570e 100644 --- a/erpnext/hr/doctype/payroll_entry/payroll_entry.py +++ b/erpnext/hr/doctype/payroll_entry/payroll_entry.py @@ -115,7 +115,7 @@ class PayrollEntry(Document): frappe.enqueue(create_salary_slips_for_employees, timeout=600, employees=emp_list, args=args) else: create_salary_slips_for_employees(emp_list, args, publish_progress=False) - + def get_sal_slip_list(self, ss_status, as_dict=False): """ Returns list of salary slips based on selected criteria @@ -196,7 +196,7 @@ class PayrollEntry(Document): return account_dict def get_default_payroll_payable_account(self): - payroll_payable_account = frappe.get_cached_value('Company', + payroll_payable_account = frappe.get_cached_value('Company', {"company_name": self.company}, "default_payroll_payable_account") if not payroll_payable_account: @@ -482,7 +482,6 @@ def payroll_entry_has_bank_entries(name): return response -<<<<<<< HEAD def create_salary_slips_for_employees(employees, args, publish_progress=True): salary_slips_exists_for = get_existing_salary_slips(employees, args) count=0 @@ -505,9 +504,9 @@ def create_salary_slips_for_employees(employees, args, publish_progress=True): def get_existing_salary_slips(employees, args): return frappe.db.sql_list(""" - select distinct employee from `tabSalary Slip` + select distinct employee from `tabSalary Slip` where docstatus!= 2 and company = %s - and start_date >= %s and end_date <= %s + and start_date >= %s and end_date <= %s and employee in (%s) """ % ('%s', '%s', '%s', ', '.join(['%s']*len(employees))), [args.company, args.start_date, args.end_date] + employees) @@ -528,7 +527,7 @@ def submit_salary_slips_for_employees(payroll_entry, salary_slips, publish_progr submitted_ss.append(ss_obj) except frappe.ValidationError: not_submitted_ss.append(ss[0]) - + count += 1 if publish_progress: frappe.publish_progress(count*100/len(salary_slips), title = _("Submitting Salary Slips...")) @@ -539,7 +538,7 @@ def submit_salary_slips_for_employees(payroll_entry, salary_slips, publish_progr .format(ss_obj.start_date, ss_obj.end_date)) payroll_entry.email_salary_slip(submitted_ss) - + payroll_entry.db_set("salary_slips_submitted", 1) payroll_entry.notify_update() @@ -547,8 +546,7 @@ def submit_salary_slips_for_employees(payroll_entry, salary_slips, publish_progr frappe.msgprint(_("No salary slip found to submit for the above selected criteria OR salary slip already submitted")) if not_submitted_ss: - frappe.msgprint(_("Could not submit some Salary Slips")) -======= + frappe.msgprint(_("Could not submit some Salary Slips")) def get_payroll_entries_for_jv(doctype, txt, searchfield, start, page_len, filters): return frappe.db.sql(""" select name from `tabPayroll Entry` @@ -561,4 +559,3 @@ def get_payroll_entries_for_jv(doctype, txt, searchfield, start, page_len, filte 'txt': "%%%s%%" % frappe.db.escape(txt), 'start': start, 'page_len': page_len }) ->>>>>>> master From b5dda63dddf6bddc9acb660b01bd36e84d33aa72 Mon Sep 17 00:00:00 2001 From: Sagar Vora Date: Tue, 29 Jan 2019 17:54:47 +0530 Subject: [PATCH 084/169] fix: change changelog version to 11.1.0 --- erpnext/change_log/v11/v11_0_4.md | 80 ------------------------------- 1 file changed, 80 deletions(-) delete mode 100644 erpnext/change_log/v11/v11_0_4.md diff --git a/erpnext/change_log/v11/v11_0_4.md b/erpnext/change_log/v11/v11_0_4.md deleted file mode 100644 index f4dfe16faf3..00000000000 --- a/erpnext/change_log/v11/v11_0_4.md +++ /dev/null @@ -1,80 +0,0 @@ -- Enhancements - - - Accounting - - - Company Tree - - Multiple Finance Books - - Bank Statement Upload - - Tax Withholding - - Subscriptions - - Deferred Revenue and Expenses - - Exchange Rate Revaluation - - Inter Company Transactions - - Standalone Credit / Debit Note - - Reverse Journal Entry - - Enhanced Bank Guarantee - - Cost Center Numbering - - Loyalty Points Management - - Enhanced General ledger report - - - Human Resources - - - Department Hierarchy - - Leave Management - - Leave Period - - New Leave Types - - Leave Encashment - - Compensatory Leave - - Attendance Request - - Enhanced Payroll - - New Salary Structure - - Additional Salary - - Payroll Period - - Employee Benefits - - Employee Tax Exemptions - - Auto Calculation of Tax Deduction - - Enhanced Salary Processing - - Employee Onboarding - - Employee Separation - - Employee Transfer - - Employee Promotion - - Employee Incentive - - Retention Bonus - - Shift Planning - - Staffing Plan - - - Asset Management - - - Capital-Work-in-Progress (CWIP) Accounting - - Multiple depreciation schedule based on finance book - - Asset Value Adjustment - - Improved Asset Movement between location or employee - - New Depreciation method Written Down Value (WDV) - - - POS - - - Allow draft mode print in online POS - - Allowed print before pay - - Save the invoice before print - - - Other Features - - - A free marketplace where any ERPNext user can list their products and be discovered by thousands of other companies using ERPNext - - Add/Update quantity in Sales & Purchase Order without amending document - - Enhanced Item Price (Based on UOM, Party, Min. Qty, etc.) - - Shareholder Management - - Production Plan and Job Card - - Delivery Trip - - Updated Timesheets - - Lead Notes - - Better Sales / Purchase / Stock Analytics report - - Currency exchange API is changed to frankfurter public domain - - - GST (India) - - Auto selection of GST tax template based on company and shipping address - - GSTR-1 based on the address - - HSN-wise summary of outwards supplies - -- Changes have been made to ensure ERPNext is compatible with Python 3 -- Better documentation is now available with support for more languages -- A lot of other fixes have been done to ensure a better overall user experience From 606bd37316c96b9e2750610c3638adcfc4f260eb Mon Sep 17 00:00:00 2001 From: Sagar Vora Date: Tue, 29 Jan 2019 17:55:46 +0530 Subject: [PATCH 085/169] fix: change changelog version to 11.1.0 --- erpnext/change_log/v11/v11_1_0.md | 80 +++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 erpnext/change_log/v11/v11_1_0.md diff --git a/erpnext/change_log/v11/v11_1_0.md b/erpnext/change_log/v11/v11_1_0.md new file mode 100644 index 00000000000..f4dfe16faf3 --- /dev/null +++ b/erpnext/change_log/v11/v11_1_0.md @@ -0,0 +1,80 @@ +- Enhancements + + - Accounting + + - Company Tree + - Multiple Finance Books + - Bank Statement Upload + - Tax Withholding + - Subscriptions + - Deferred Revenue and Expenses + - Exchange Rate Revaluation + - Inter Company Transactions + - Standalone Credit / Debit Note + - Reverse Journal Entry + - Enhanced Bank Guarantee + - Cost Center Numbering + - Loyalty Points Management + - Enhanced General ledger report + + - Human Resources + + - Department Hierarchy + - Leave Management + - Leave Period + - New Leave Types + - Leave Encashment + - Compensatory Leave + - Attendance Request + - Enhanced Payroll + - New Salary Structure + - Additional Salary + - Payroll Period + - Employee Benefits + - Employee Tax Exemptions + - Auto Calculation of Tax Deduction + - Enhanced Salary Processing + - Employee Onboarding + - Employee Separation + - Employee Transfer + - Employee Promotion + - Employee Incentive + - Retention Bonus + - Shift Planning + - Staffing Plan + + - Asset Management + + - Capital-Work-in-Progress (CWIP) Accounting + - Multiple depreciation schedule based on finance book + - Asset Value Adjustment + - Improved Asset Movement between location or employee + - New Depreciation method Written Down Value (WDV) + + - POS + + - Allow draft mode print in online POS + - Allowed print before pay + - Save the invoice before print + + - Other Features + + - A free marketplace where any ERPNext user can list their products and be discovered by thousands of other companies using ERPNext + - Add/Update quantity in Sales & Purchase Order without amending document + - Enhanced Item Price (Based on UOM, Party, Min. Qty, etc.) + - Shareholder Management + - Production Plan and Job Card + - Delivery Trip + - Updated Timesheets + - Lead Notes + - Better Sales / Purchase / Stock Analytics report + - Currency exchange API is changed to frankfurter public domain + + - GST (India) + - Auto selection of GST tax template based on company and shipping address + - GSTR-1 based on the address + - HSN-wise summary of outwards supplies + +- Changes have been made to ensure ERPNext is compatible with Python 3 +- Better documentation is now available with support for more languages +- A lot of other fixes have been done to ensure a better overall user experience From 1a4cd3b66a1fdb835eb7991e4e400a27ab4cd335 Mon Sep 17 00:00:00 2001 From: Sagar Vora Date: Tue, 29 Jan 2019 18:46:34 +0550 Subject: [PATCH 086/169] bumped to version 11.1.0 --- erpnext/hooks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/hooks.py b/erpnext/hooks.py index fd129e5b8e6..5fdef885ffa 100644 --- a/erpnext/hooks.py +++ b/erpnext/hooks.py @@ -12,7 +12,7 @@ app_license = "GNU General Public License (v3)" source_link = "https://github.com/frappe/erpnext" develop_version = '12.x.x-develop' -staging_version = '11.0.3-beta.37' +staging_version = '11.1.0' error_report_email = "support@erpnext.com" From 1c44a6a0bae00e79396e98587198804748ce2f52 Mon Sep 17 00:00:00 2001 From: Sagar Vora Date: Tue, 29 Jan 2019 18:52:50 +0530 Subject: [PATCH 087/169] fix: set version to 11.1.0, remove staging_version --- erpnext/__init__.py | 8 ++++---- erpnext/hooks.py | 1 - 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 635f189ec26..0e715255120 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -5,7 +5,7 @@ import frappe from erpnext.hooks import regional_overrides from frappe.utils import getdate -__version__ = '10.1.81' +__version__ = '11.1.0' def get_default_company(user=None): '''Get default company for user''' @@ -74,7 +74,7 @@ def is_perpetual_inventory_enabled(company): frappe.local.enable_perpetual_inventory = {} if not company in frappe.local.enable_perpetual_inventory: - frappe.local.enable_perpetual_inventory[company] = frappe.get_cached_value('Company', + frappe.local.enable_perpetual_inventory[company] = frappe.get_cached_value('Company', company, "enable_perpetual_inventory") or 0 return frappe.local.enable_perpetual_inventory[company] @@ -87,7 +87,7 @@ def get_default_finance_book(company=None): frappe.local.default_finance_book = {} if not company in frappe.local.default_finance_book: - frappe.local.default_finance_book[company] = frappe.get_cached_value('Company', + frappe.local.default_finance_book[company] = frappe.get_cached_value('Company', company, "default_finance_book") return frappe.local.default_finance_book[company] @@ -108,7 +108,7 @@ def get_region(company=None): You can also set global company flag in `frappe.flags.company` ''' if company or frappe.flags.company: - return frappe.get_cached_value('Company', + return frappe.get_cached_value('Company', company or frappe.flags.company, 'country') elif frappe.flags.country: return frappe.flags.country diff --git a/erpnext/hooks.py b/erpnext/hooks.py index 5fdef885ffa..7d77f90afae 100644 --- a/erpnext/hooks.py +++ b/erpnext/hooks.py @@ -12,7 +12,6 @@ app_license = "GNU General Public License (v3)" source_link = "https://github.com/frappe/erpnext" develop_version = '12.x.x-develop' -staging_version = '11.1.0' error_report_email = "support@erpnext.com" From 25e63e806c6f23f96ef40d517369d92bb1c7d68e Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Wed, 30 Jan 2019 11:46:34 +0530 Subject: [PATCH 088/169] fix: modified date (#16520) --- .../doctype/instructor/instructor.json | 3 +- erpnext/hr/doctype/appraisal/appraisal.json | 3 +- erpnext/hr/doctype/attendance/attendance.json | 5 +- .../employee_advance/employee_advance.json | 3 +- .../doctype/expense_claim/expense_claim.json | 3 +- .../leave_allocation/leave_allocation.json | 3 +- .../leave_application/leave_application.json | 3 +- .../payroll_employee_detail.json | 31 ++-- .../hr/doctype/salary_slip/salary_slip.json | 3 +- .../training_event_employee.json | 86 +++++----- .../training_feedback/training_feedback.json | 3 +- .../training_result_employee.json | 151 ++++++++++-------- .../doctype/activity_cost/activity_cost.json | 3 +- .../projects/doctype/timesheet/timesheet.json | 2 +- .../doctype/sales_person/sales_person.json | 3 +- 15 files changed, 171 insertions(+), 134 deletions(-) diff --git a/erpnext/education/doctype/instructor/instructor.json b/erpnext/education/doctype/instructor/instructor.json index 80d3ee29632..5367c0e66f5 100644 --- a/erpnext/education/doctype/instructor/instructor.json +++ b/erpnext/education/doctype/instructor/instructor.json @@ -1,5 +1,6 @@ { "allow_copy": 0, + "allow_events_in_timeline": 0, "allow_guest_to_view": 0, "allow_import": 1, "allow_rename": 0, @@ -287,7 +288,7 @@ "istable": 0, "max_attachments": 0, "menu_index": 0, - "modified": "2018-08-21 14:44:36.714519", + "modified": "2019-01-30 11:28:17.571207", "modified_by": "Administrator", "module": "Education", "name": "Instructor", diff --git a/erpnext/hr/doctype/appraisal/appraisal.json b/erpnext/hr/doctype/appraisal/appraisal.json index d5365db5a9f..4f6da975d5f 100644 --- a/erpnext/hr/doctype/appraisal/appraisal.json +++ b/erpnext/hr/doctype/appraisal/appraisal.json @@ -1,5 +1,6 @@ { "allow_copy": 0, + "allow_events_in_timeline": 0, "allow_guest_to_view": 0, "allow_import": 0, "allow_rename": 0, @@ -695,7 +696,7 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2018-08-21 14:44:41.966708", + "modified": "2019-01-30 11:28:08.401459", "modified_by": "Administrator", "module": "HR", "name": "Appraisal", diff --git a/erpnext/hr/doctype/attendance/attendance.json b/erpnext/hr/doctype/attendance/attendance.json index 20f44ec2fe1..97d28e7e88f 100644 --- a/erpnext/hr/doctype/attendance/attendance.json +++ b/erpnext/hr/doctype/attendance/attendance.json @@ -1,5 +1,6 @@ { "allow_copy": 0, + "allow_events_in_timeline": 0, "allow_guest_to_view": 0, "allow_import": 1, "allow_rename": 0, @@ -427,7 +428,7 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2018-08-29 06:27:04.865541", + "modified": "2019-01-30 11:28:13.075959", "modified_by": "Administrator", "module": "HR", "name": "Attendance", @@ -494,7 +495,7 @@ "quick_entry": 0, "read_only": 0, "read_only_onload": 0, - "search_fields": "employee, employee_name, attendance_date, status", + "search_fields": "employee,employee_name,attendance_date,status", "show_name_in_global_search": 0, "sort_field": "modified", "sort_order": "DESC", diff --git a/erpnext/hr/doctype/employee_advance/employee_advance.json b/erpnext/hr/doctype/employee_advance/employee_advance.json index 33afe17d83e..3597e76f1e6 100644 --- a/erpnext/hr/doctype/employee_advance/employee_advance.json +++ b/erpnext/hr/doctype/employee_advance/employee_advance.json @@ -1,5 +1,6 @@ { "allow_copy": 0, + "allow_events_in_timeline": 0, "allow_guest_to_view": 0, "allow_import": 1, "allow_rename": 0, @@ -677,7 +678,7 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2018-08-21 14:44:38.800542", + "modified": "2019-01-30 11:28:15.529649", "modified_by": "Administrator", "module": "HR", "name": "Employee Advance", diff --git a/erpnext/hr/doctype/expense_claim/expense_claim.json b/erpnext/hr/doctype/expense_claim/expense_claim.json index fb4166d53c1..44b70c67a13 100644 --- a/erpnext/hr/doctype/expense_claim/expense_claim.json +++ b/erpnext/hr/doctype/expense_claim/expense_claim.json @@ -1,5 +1,6 @@ { "allow_copy": 0, + "allow_events_in_timeline": 0, "allow_guest_to_view": 0, "allow_import": 1, "allow_rename": 0, @@ -1153,7 +1154,7 @@ "istable": 0, "max_attachments": 0, "menu_index": 0, - "modified": "2018-08-21 14:44:42.340662", + "modified": "2019-01-30 11:28:10.324137", "modified_by": "Administrator", "module": "HR", "name": "Expense Claim", diff --git a/erpnext/hr/doctype/leave_allocation/leave_allocation.json b/erpnext/hr/doctype/leave_allocation/leave_allocation.json index 5f84b52506b..6d61fe3d5c2 100644 --- a/erpnext/hr/doctype/leave_allocation/leave_allocation.json +++ b/erpnext/hr/doctype/leave_allocation/leave_allocation.json @@ -1,5 +1,6 @@ { "allow_copy": 0, + "allow_events_in_timeline": 0, "allow_guest_to_view": 0, "allow_import": 1, "allow_rename": 0, @@ -676,7 +677,7 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2018-08-29 23:52:52.683844", + "modified": "2019-01-30 11:28:09.360525", "modified_by": "Administrator", "module": "HR", "name": "Leave Allocation", diff --git a/erpnext/hr/doctype/leave_application/leave_application.json b/erpnext/hr/doctype/leave_application/leave_application.json index 58567cb9493..d7b2c9f8753 100644 --- a/erpnext/hr/doctype/leave_application/leave_application.json +++ b/erpnext/hr/doctype/leave_application/leave_application.json @@ -1,5 +1,6 @@ { "allow_copy": 0, + "allow_events_in_timeline": 0, "allow_guest_to_view": 0, "allow_import": 1, "allow_rename": 0, @@ -949,7 +950,7 @@ "issingle": 0, "istable": 0, "max_attachments": 3, - "modified": "2019-01-08 17:35:10.795225", + "modified": "2019-01-30 11:28:14.745572", "modified_by": "Administrator", "module": "HR", "name": "Leave Application", diff --git a/erpnext/hr/doctype/payroll_employee_detail/payroll_employee_detail.json b/erpnext/hr/doctype/payroll_employee_detail/payroll_employee_detail.json index fdd102e4118..0dd3403d665 100644 --- a/erpnext/hr/doctype/payroll_employee_detail/payroll_employee_detail.json +++ b/erpnext/hr/doctype/payroll_employee_detail/payroll_employee_detail.json @@ -1,5 +1,6 @@ { "allow_copy": 0, + "allow_events_in_timeline": 0, "allow_guest_to_view": 0, "allow_import": 0, "allow_rename": 0, @@ -14,6 +15,7 @@ "fields": [ { "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -41,16 +43,17 @@ "reqd": 0, "search_index": 0, "set_only_once": 0, - "translatable": 0, + "translatable": 0, "unique": 0 }, { "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, "columns": 0, - "fetch_from": "employee.employee_name", + "fetch_from": "employee.employee_name", "fieldname": "employee_name", "fieldtype": "Data", "hidden": 0, @@ -74,11 +77,12 @@ "reqd": 0, "search_index": 0, "set_only_once": 0, - "translatable": 0, + "translatable": 0, "unique": 0 }, { "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -104,18 +108,19 @@ "reqd": 0, "search_index": 0, "set_only_once": 0, - "translatable": 0, + "translatable": 0, "unique": 0 }, { "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, "columns": 0, - "fetch_from": "employee.department", + "fetch_from": "employee.department", "fieldname": "department", - "fieldtype": "Link", + "fieldtype": "Link", "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, @@ -126,7 +131,7 @@ "label": "Department", "length": 0, "no_copy": 0, - "options": "Department", + "options": "Department", "permlevel": 0, "precision": "", "print_hide": 0, @@ -137,16 +142,17 @@ "reqd": 0, "search_index": 0, "set_only_once": 0, - "translatable": 0, + "translatable": 0, "unique": 0 }, { "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, "columns": 0, - "fetch_from": "employee.designation", + "fetch_from": "employee.designation", "fieldname": "designation", "fieldtype": "Data", "hidden": 0, @@ -170,7 +176,7 @@ "reqd": 0, "search_index": 0, "set_only_once": 0, - "translatable": 0, + "translatable": 0, "unique": 0 } ], @@ -184,7 +190,7 @@ "issingle": 0, "istable": 1, "max_attachments": 0, - "modified": "2018-05-17 10:32:12.974763", + "modified": "2019-01-30 11:28:16.544471", "modified_by": "Administrator", "module": "HR", "name": "Payroll Employee Detail", @@ -198,5 +204,6 @@ "sort_field": "modified", "sort_order": "DESC", "track_changes": 1, - "track_seen": 0 + "track_seen": 0, + "track_views": 0 } \ No newline at end of file diff --git a/erpnext/hr/doctype/salary_slip/salary_slip.json b/erpnext/hr/doctype/salary_slip/salary_slip.json index 2e2856d5346..83afa8c6b5b 100644 --- a/erpnext/hr/doctype/salary_slip/salary_slip.json +++ b/erpnext/hr/doctype/salary_slip/salary_slip.json @@ -1,5 +1,6 @@ { "allow_copy": 0, + "allow_events_in_timeline": 0, "allow_guest_to_view": 0, "allow_import": 0, "allow_rename": 0, @@ -1905,7 +1906,7 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2018-07-27 19:23:35.587516", + "modified": "2019-01-30 11:28:11.774739", "modified_by": "Administrator", "module": "HR", "name": "Salary Slip", diff --git a/erpnext/hr/doctype/training_event_employee/training_event_employee.json b/erpnext/hr/doctype/training_event_employee/training_event_employee.json index d8b514830d7..e3a40649b4d 100644 --- a/erpnext/hr/doctype/training_event_employee/training_event_employee.json +++ b/erpnext/hr/doctype/training_event_employee/training_event_employee.json @@ -1,5 +1,6 @@ { "allow_copy": 0, + "allow_events_in_timeline": 0, "allow_guest_to_view": 0, "allow_import": 0, "allow_rename": 0, @@ -13,6 +14,7 @@ "fields": [ { "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -40,16 +42,17 @@ "reqd": 0, "search_index": 0, "set_only_once": 0, - "translatable": 0, + "translatable": 0, "unique": 0 }, { "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, "columns": 0, - "fetch_from": "employee.employee_name", + "fetch_from": "employee.employee_name", "fieldname": "employee_name", "fieldtype": "Read Only", "hidden": 0, @@ -73,48 +76,50 @@ "reqd": 0, "search_index": 0, "set_only_once": 0, - "translatable": 0, + "translatable": 0, "unique": 0 }, { "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, "columns": 0, - "fetch_from": "employee.department", - "fieldname": "department", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Department", - "length": 0, - "no_copy": 0, - "options": "Department", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "fetch_from": "employee.department", + "fieldname": "department", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Department", + "length": 0, + "no_copy": 0, + "options": "Department", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, "fieldname": "column_break_3", "fieldtype": "Column Break", "hidden": 0, @@ -136,11 +141,12 @@ "reqd": 0, "search_index": 0, "set_only_once": 0, - "translatable": 0, + "translatable": 0, "unique": 0 }, { "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, "allow_on_submit": 1, "bold": 0, "collapsible": 0, @@ -169,11 +175,12 @@ "reqd": 0, "search_index": 0, "set_only_once": 0, - "translatable": 0, + "translatable": 0, "unique": 0 }, { "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -201,7 +208,7 @@ "reqd": 0, "search_index": 0, "set_only_once": 0, - "translatable": 0, + "translatable": 0, "unique": 0 } ], @@ -215,7 +222,7 @@ "issingle": 0, "istable": 1, "max_attachments": 0, - "modified": "2018-05-17 10:19:51.899523", + "modified": "2019-01-30 11:28:16.170333", "modified_by": "Administrator", "module": "HR", "name": "Training Event Employee", @@ -229,5 +236,6 @@ "sort_field": "modified", "sort_order": "DESC", "track_changes": 0, - "track_seen": 0 + "track_seen": 0, + "track_views": 0 } \ No newline at end of file diff --git a/erpnext/hr/doctype/training_feedback/training_feedback.json b/erpnext/hr/doctype/training_feedback/training_feedback.json index 0123332de90..cd967d514f4 100644 --- a/erpnext/hr/doctype/training_feedback/training_feedback.json +++ b/erpnext/hr/doctype/training_feedback/training_feedback.json @@ -1,5 +1,6 @@ { "allow_copy": 0, + "allow_events_in_timeline": 0, "allow_guest_to_view": 0, "allow_import": 0, "allow_rename": 0, @@ -383,7 +384,7 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2018-08-21 16:15:34.125368", + "modified": "2019-01-30 11:28:13.849860", "modified_by": "Administrator", "module": "HR", "name": "Training Feedback", diff --git a/erpnext/hr/doctype/training_result_employee/training_result_employee.json b/erpnext/hr/doctype/training_result_employee/training_result_employee.json index ca71bf1bf5c..c4747545d04 100644 --- a/erpnext/hr/doctype/training_result_employee/training_result_employee.json +++ b/erpnext/hr/doctype/training_result_employee/training_result_employee.json @@ -1,6 +1,7 @@ { "allow_copy": 0, - "allow_guest_to_view": 0, + "allow_events_in_timeline": 0, + "allow_guest_to_view": 0, "allow_import": 0, "allow_rename": 0, "beta": 0, @@ -13,7 +14,8 @@ "engine": "InnoDB", "fields": [ { - "allow_bulk_edit": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -24,7 +26,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, - "in_global_search": 0, + "in_global_search": 0, "in_list_view": 1, "in_standard_filter": 0, "label": "Employee", @@ -36,16 +38,17 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, - "remember_last_selected_value": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, "set_only_once": 0, - "translatable": 0, + "translatable": 0, "unique": 0 }, { - "allow_bulk_edit": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -56,7 +59,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, - "in_global_search": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -66,28 +69,29 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, - "remember_last_selected_value": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, "set_only_once": 0, - "translatable": 0, + "translatable": 0, "unique": 0 }, { - "allow_bulk_edit": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, "columns": 0, - "fetch_from": "employee.employee_name", + "fetch_from": "employee.employee_name", "fieldname": "employee_name", "fieldtype": "Read Only", "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, - "in_global_search": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Employee Name", @@ -99,53 +103,55 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, - "remember_last_selected_value": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, "set_only_once": 0, - "translatable": 0, + "translatable": 0, "unique": 0 }, { - "allow_bulk_edit": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, "columns": 0, - "fetch_from": "employee.department", - "fieldname": "department", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Department", - "length": 0, - "no_copy": 0, - "options": "Department", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "fetch_from": "employee.department", + "fieldname": "department", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Department", + "length": 0, + "no_copy": 0, + "options": "Department", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, "depends_on": "", "fieldname": "section_break_5", "fieldtype": "Section Break", @@ -153,7 +159,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, - "in_global_search": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -163,16 +169,17 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, - "remember_last_selected_value": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, "set_only_once": 0, - "translatable": 0, + "translatable": 0, "unique": 0 }, { - "allow_bulk_edit": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, "allow_on_submit": 1, "bold": 0, "collapsible": 0, @@ -183,7 +190,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, - "in_global_search": 0, + "in_global_search": 0, "in_list_view": 1, "in_standard_filter": 0, "label": "Hours", @@ -194,16 +201,17 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, - "remember_last_selected_value": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, "set_only_once": 0, - "translatable": 0, + "translatable": 0, "unique": 0 }, { - "allow_bulk_edit": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, "allow_on_submit": 1, "bold": 0, "collapsible": 0, @@ -214,7 +222,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, - "in_global_search": 0, + "in_global_search": 0, "in_list_view": 1, "in_standard_filter": 0, "label": "Grade", @@ -225,16 +233,17 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, - "remember_last_selected_value": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, "set_only_once": 0, - "translatable": 0, + "translatable": 0, "unique": 0 }, { - "allow_bulk_edit": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -245,7 +254,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, - "in_global_search": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -255,16 +264,17 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, - "remember_last_selected_value": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, "set_only_once": 0, - "translatable": 0, + "translatable": 0, "unique": 0 }, { - "allow_bulk_edit": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, "allow_on_submit": 1, "bold": 0, "collapsible": 0, @@ -275,7 +285,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, - "in_global_search": 0, + "in_global_search": 0, "in_list_view": 1, "in_standard_filter": 0, "label": "Comments", @@ -286,16 +296,16 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, - "remember_last_selected_value": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, "set_only_once": 0, - "translatable": 0, + "translatable": 0, "unique": 0 } ], - "has_web_view": 0, + "has_web_view": 0, "hide_heading": 0, "hide_toolbar": 0, "idx": 0, @@ -305,7 +315,7 @@ "issingle": 0, "istable": 1, "max_attachments": 0, - "modified": "2018-05-17 10:09:57.777384", + "modified": "2019-01-30 11:28:14.337778", "modified_by": "Administrator", "module": "HR", "name": "Training Result Employee", @@ -315,9 +325,10 @@ "quick_entry": 1, "read_only": 0, "read_only_onload": 0, - "show_name_in_global_search": 0, + "show_name_in_global_search": 0, "sort_field": "modified", "sort_order": "DESC", - "track_changes": 0, - "track_seen": 0 + "track_changes": 0, + "track_seen": 0, + "track_views": 0 } \ No newline at end of file diff --git a/erpnext/projects/doctype/activity_cost/activity_cost.json b/erpnext/projects/doctype/activity_cost/activity_cost.json index 662e00c3eed..0e929d91098 100644 --- a/erpnext/projects/doctype/activity_cost/activity_cost.json +++ b/erpnext/projects/doctype/activity_cost/activity_cost.json @@ -1,5 +1,6 @@ { "allow_copy": 0, + "allow_events_in_timeline": 0, "allow_guest_to_view": 0, "allow_import": 1, "allow_rename": 1, @@ -350,7 +351,7 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2018-08-21 16:15:35.363505", + "modified": "2019-01-30 11:28:17.991944", "modified_by": "Administrator", "module": "Projects", "name": "Activity Cost", diff --git a/erpnext/projects/doctype/timesheet/timesheet.json b/erpnext/projects/doctype/timesheet/timesheet.json index 0be147bfb1c..5ad2ab3a379 100644 --- a/erpnext/projects/doctype/timesheet/timesheet.json +++ b/erpnext/projects/doctype/timesheet/timesheet.json @@ -1000,7 +1000,7 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2018-11-15 07:58:42.629845", + "modified": "2019-01-30 11:28:18.518590", "modified_by": "Administrator", "module": "Projects", "name": "Timesheet", diff --git a/erpnext/setup/doctype/sales_person/sales_person.json b/erpnext/setup/doctype/sales_person/sales_person.json index 7eeb500f2a9..73f7623ba04 100644 --- a/erpnext/setup/doctype/sales_person/sales_person.json +++ b/erpnext/setup/doctype/sales_person/sales_person.json @@ -1,5 +1,6 @@ { "allow_copy": 0, + "allow_events_in_timeline": 0, "allow_guest_to_view": 0, "allow_import": 1, "allow_rename": 1, @@ -523,7 +524,7 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2018-09-12 16:41:06.378899", + "modified": "2019-01-30 11:28:16.966735", "modified_by": "Administrator", "module": "Setup", "name": "Sales Person", From 5c124907097ce2606a6516ed04d53f4ec5d3512e Mon Sep 17 00:00:00 2001 From: Saurabh Date: Wed, 30 Jan 2019 11:48:39 +0530 Subject: [PATCH 089/169] fix: patch to add guardian role if not exists --- erpnext/patches.txt | 1 + erpnext/patches/v11_1/__init__.py | 0 erpnext/patches/v11_1/setup_guardian_role.py | 10 ++++++++++ 3 files changed, 11 insertions(+) create mode 100644 erpnext/patches/v11_1/__init__.py create mode 100644 erpnext/patches/v11_1/setup_guardian_role.py diff --git a/erpnext/patches.txt b/erpnext/patches.txt index ef632ea8ceb..29c86196dab 100755 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -584,3 +584,4 @@ erpnext.patches.v11_0.rename_bom_wo_fields erpnext.patches.v11_0.rename_additional_salary_component_additional_salary erpnext.patches.v11_0.renamed_from_to_fields_in_project erpnext.patches.v11_0.add_permissions_in_gst_settings +erpnext.patches.v11_1.setup_guardian_role diff --git a/erpnext/patches/v11_1/__init__.py b/erpnext/patches/v11_1/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/erpnext/patches/v11_1/setup_guardian_role.py b/erpnext/patches/v11_1/setup_guardian_role.py new file mode 100644 index 00000000000..bb61f9818df --- /dev/null +++ b/erpnext/patches/v11_1/setup_guardian_role.py @@ -0,0 +1,10 @@ +from __future__ import unicode_literals +import frappe + +def execute(): + if 'Education' in frappe.get_active_domains() and not frappe.db.exists("Role", "Guardian"): + frappe.new_doc({ + "doctype": "Role", + "role_name": "Guardian", + "desk_access": 0 + }).insert(ignore_permissions=True) From bb2031941e47e7dd3fa6174bbcc2734d374a4993 Mon Sep 17 00:00:00 2001 From: Saurabh Date: Wed, 30 Jan 2019 13:08:00 +0600 Subject: [PATCH 090/169] bumped to version 11.1.1 --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 0e715255120..b6cf86c9c14 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -5,7 +5,7 @@ import frappe from erpnext.hooks import regional_overrides from frappe.utils import getdate -__version__ = '11.1.0' +__version__ = '11.1.1' def get_default_company(user=None): '''Get default company for user''' From 16d7b49d7323b7cb2f4a9d43ebb0b896d775f5d0 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Wed, 30 Jan 2019 17:27:08 +0530 Subject: [PATCH 091/169] fix: Default value for 'raw materials rate based on' in BOM --- erpnext/manufacturing/doctype/bom/bom.json | 3 ++- erpnext/manufacturing/doctype/bom/bom.py | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/erpnext/manufacturing/doctype/bom/bom.json b/erpnext/manufacturing/doctype/bom/bom.json index 0cf7dc4f816..79c883a734f 100644 --- a/erpnext/manufacturing/doctype/bom/bom.json +++ b/erpnext/manufacturing/doctype/bom/bom.json @@ -642,6 +642,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "default": "Valuation Rate", "fieldname": "rm_cost_as_per", "fieldtype": "Select", "hidden": 0, @@ -1977,7 +1978,7 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2018-12-13 17:45:44.843197", + "modified": "2019-01-30 16:39:34.353721", "modified_by": "Administrator", "module": "Manufacturing", "name": "BOM", diff --git a/erpnext/manufacturing/doctype/bom/bom.py b/erpnext/manufacturing/doctype/bom/bom.py index 2317634cfc5..ba3b7192a35 100644 --- a/erpnext/manufacturing/doctype/bom/bom.py +++ b/erpnext/manufacturing/doctype/bom/bom.py @@ -163,6 +163,8 @@ class BOM(WebsiteGenerator): def get_rm_rate(self, arg): """ Get raw material rate as per selected method, if bom exists takes bom cost """ rate = 0 + if not self.rm_cost_as_per: + self.rm_cost_as_per = "Valuation Rate" if arg.get('scrap_items'): rate = self.get_valuation_rate(arg) From 429996752de6f41262e8a0c88ab383523227b3de Mon Sep 17 00:00:00 2001 From: Saurabh Date: Wed, 30 Jan 2019 17:45:48 +0530 Subject: [PATCH 092/169] fix: patch fixes (#16524) --- erpnext/patches/v11_1/setup_guardian_role.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/erpnext/patches/v11_1/setup_guardian_role.py b/erpnext/patches/v11_1/setup_guardian_role.py index bb61f9818df..6ccfed9617c 100644 --- a/erpnext/patches/v11_1/setup_guardian_role.py +++ b/erpnext/patches/v11_1/setup_guardian_role.py @@ -3,8 +3,10 @@ import frappe def execute(): if 'Education' in frappe.get_active_domains() and not frappe.db.exists("Role", "Guardian"): - frappe.new_doc({ - "doctype": "Role", + doc = frappe.new_doc("Role") + doc.update({ "role_name": "Guardian", "desk_access": 0 - }).insert(ignore_permissions=True) + }) + + doc.insert(ignore_permissions=True) From 66833f109bba209e099c2eda7420a490a832fcc5 Mon Sep 17 00:00:00 2001 From: Aditya Hase Date: Wed, 30 Jan 2019 19:37:46 +0530 Subject: [PATCH 093/169] fix(accounts): fetch subscription details only if required fields are populated --- erpnext/accounts/doctype/payment_request/payment_request.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/payment_request/payment_request.js b/erpnext/accounts/doctype/payment_request/payment_request.js index ef930d04973..2fce7dd6c28 100644 --- a/erpnext/accounts/doctype/payment_request/payment_request.js +++ b/erpnext/accounts/doctype/payment_request/payment_request.js @@ -54,7 +54,7 @@ frappe.ui.form.on("Payment Request", "is_a_subscription", function(frm) { frm.toggle_reqd("payment_gateway_account", frm.doc.is_a_subscription); frm.toggle_reqd("subscription_plans", frm.doc.is_a_subscription); - if (frm.doc.is_a_subscription) { + if (frm.doc.is_a_subscription && frm.doc.reference_doctype && frm.doc.reference_name) { frappe.call({ method: "erpnext.accounts.doctype.payment_request.payment_request.get_subscription_details", args: {"reference_doctype": frm.doc.reference_doctype, "reference_name": frm.doc.reference_name}, From 245b73b94f08a0386288e044381016d4ba840270 Mon Sep 17 00:00:00 2001 From: Aditya Hase Date: Wed, 30 Jan 2019 19:56:04 +0530 Subject: [PATCH 094/169] fix(search): Fix possible reflected XSS attack vector (#16522) --- erpnext/templates/pages/product_search.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/templates/pages/product_search.html b/erpnext/templates/pages/product_search.html index d5a56b2cac8..f9efd485d32 100644 --- a/erpnext/templates/pages/product_search.html +++ b/erpnext/templates/pages/product_search.html @@ -10,7 +10,7 @@ + + diff --git a/erpnext/public/js/hub/pages/Item.vue b/erpnext/public/js/hub/pages/Item.vue index c379fc73431..841d0046db8 100644 --- a/erpnext/public/js/hub/pages/Item.vue +++ b/erpnext/public/js/hub/pages/Item.vue @@ -72,6 +72,11 @@ export default { condition: hub.is_user_registered() && !this.is_own_item, action: this.add_to_saved_items }, + { + label: __('Add to Featured Item'), + condition: hub.is_user_registered() && this.is_own_item, + action: this.add_to_featured_items + }, { label: __('Report this Item'), condition: !this.is_own_item, @@ -212,6 +217,21 @@ export default { }); }, + add_to_featured_items() { + hub.call('add_item_to_seller_featured_items', { + hub_item_name: this.hub_item_name, + hub_user: frappe.session.user + },) + .then(() => { + const featured_items_link = `${__('Added to Featured Items')}` + frappe.show_alert(featured_items_link); + erpnext.hub.trigger('action:item_feature'); + }) + .catch(e => { + console.error(e); + }); + }, + make_contact_seller_dialog() { this.contact_seller_dialog = new frappe.ui.Dialog({ title: __('Send a message'), From 4df6003bd9d230a874b655dfea3cf16754712f70 Mon Sep 17 00:00:00 2001 From: karthikeyan5 Date: Fri, 8 Feb 2019 17:51:01 +0530 Subject: [PATCH 137/169] feat(marketplace): seller profile page --- erpnext/public/js/hub/PageContainer.vue | 5 +- erpnext/public/js/hub/pages/Profile.vue | 81 ------------- erpnext/public/js/hub/pages/Seller.vue | 122 ++++++++++++++++++-- erpnext/public/js/hub/pages/SellerItems.vue | 57 +++++++++ 4 files changed, 170 insertions(+), 95 deletions(-) delete mode 100644 erpnext/public/js/hub/pages/Profile.vue create mode 100644 erpnext/public/js/hub/pages/SellerItems.vue diff --git a/erpnext/public/js/hub/PageContainer.vue b/erpnext/public/js/hub/PageContainer.vue index 79358376ffa..f151add8d5a 100644 --- a/erpnext/public/js/hub/PageContainer.vue +++ b/erpnext/public/js/hub/PageContainer.vue @@ -14,11 +14,11 @@ import FeaturedItems from './pages/FeaturedItems.vue'; import PublishedItems from './pages/PublishedItems.vue'; import Item from './pages/Item.vue'; import Seller from './pages/Seller.vue'; +import SellerItems from './pages/SellerItems.vue'; import Publish from './pages/Publish.vue'; import Buying from './pages/Buying.vue'; import Selling from './pages/Selling.vue'; import Messages from './pages/Messages.vue'; -import Profile from './pages/Profile.vue'; import NotFound from './pages/NotFound.vue'; function get_route_map() { @@ -28,10 +28,11 @@ function get_route_map() { 'marketplace/category/:category': Category, 'marketplace/item/:item': Item, 'marketplace/seller/:seller': Seller, + 'marketplace/seller/:seller/items': SellerItems, 'marketplace/not-found': NotFound, } const registered_routes = { - 'marketplace/profile': Profile, + 'marketplace/profile': Seller, 'marketplace/saved-items': SavedItems, 'marketplace/featured-items': FeaturedItems, 'marketplace/publish': Publish, diff --git a/erpnext/public/js/hub/pages/Profile.vue b/erpnext/public/js/hub/pages/Profile.vue deleted file mode 100644 index 91ed946761f..00000000000 --- a/erpnext/public/js/hub/pages/Profile.vue +++ /dev/null @@ -1,81 +0,0 @@ - - - - - diff --git a/erpnext/public/js/hub/pages/Seller.vue b/erpnext/public/js/hub/pages/Seller.vue index c80865bfbda..7d9b76e884b 100644 --- a/erpnext/public/js/hub/pages/Seller.vue +++ b/erpnext/public/js/hub/pages/Seller.vue @@ -22,30 +22,77 @@ -
    {{ item_container_heading }}
    - - +
    +
    + {{ item_container_heading }} + + Customize your Featured Items + +
    + + + Show all items +
    + +
    +
    Customer Reviews
    +
    +
    + + + + + {{ review.subject }} + +
    + by {{ review.username }} + + + + +
    +
    +
    + +
    +
    Stats
    +
    +
    + + + + + From 4324dc6ea890fb471e2927c9df70d04bf6df1aa2 Mon Sep 17 00:00:00 2001 From: karthikeyan5 Date: Tue, 12 Feb 2019 15:09:41 +0530 Subject: [PATCH 138/169] fix(marketplace): fixing hubmarket server specific error --- erpnext/public/js/hub/pages/Seller.vue | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/erpnext/public/js/hub/pages/Seller.vue b/erpnext/public/js/hub/pages/Seller.vue index 7d9b76e884b..e339eaa3e5b 100644 --- a/erpnext/public/js/hub/pages/Seller.vue +++ b/erpnext/public/js/hub/pages/Seller.vue @@ -125,15 +125,14 @@ export default { return hub.is_user_registered() }, get_seller_profile_and_items() { + let post_data = {company: this.seller_company} if (this.page_name == 'profile'){ this.seller_company = null; this.hub_seller = hub.settings.hub_seller_name + post_data = {hub_seller: this.hub_seller} } - hub.call( - 'get_hub_seller_page_info', - { company: this.seller_company, - hub_seller: this.hub_seller } - ).then(data => { + hub.call('get_hub_seller_page_info', post_data) + .then(data => { this.init = false; this.profile = data.profile; this.items = data.items; From 6837ae3377917742ef56d8b15b9019db5a83510f Mon Sep 17 00:00:00 2001 From: Sagar Vora Date: Tue, 12 Feb 2019 16:54:29 +0550 Subject: [PATCH 139/169] bumped to version 11.1.5 --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 89ac6d9b18c..40e094d1ba4 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -5,7 +5,7 @@ import frappe from erpnext.hooks import regional_overrides from frappe.utils import getdate -__version__ = '11.1.4' +__version__ = '11.1.5' def get_default_company(user=None): '''Get default company for user''' From 6447069e50403a9493b7f6a1e5dfdf47a451cf0b Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Tue, 12 Feb 2019 16:41:20 +0530 Subject: [PATCH 140/169] fix: show values in account/party currency based in actual entry, no conversion --- erpnext/accounts/report/general_ledger/general_ledger.py | 2 +- erpnext/accounts/report/utils.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/report/general_ledger/general_ledger.py b/erpnext/accounts/report/general_ledger/general_ledger.py index 8c3deaff484..be6633282ac 100644 --- a/erpnext/accounts/report/general_ledger/general_ledger.py +++ b/erpnext/accounts/report/general_ledger/general_ledger.py @@ -101,7 +101,7 @@ def set_account_currency(filters): frappe.db.get_value(filters.party_type, filters.party[0], "default_currency")) filters["account_currency"] = account_currency or filters.company_currency - if filters.account_currency != filters.company_currency: + if filters.account_currency != filters.company_currency and not filters.presentation_currency: filters.presentation_currency = filters.account_currency return filters diff --git a/erpnext/accounts/report/utils.py b/erpnext/accounts/report/utils.py index a8ae94f8799..8a397447383 100644 --- a/erpnext/accounts/report/utils.py +++ b/erpnext/accounts/report/utils.py @@ -104,7 +104,7 @@ def convert_to_presentation_currency(gl_entries, currency_info): credit_in_account_currency = flt(entry['credit_in_account_currency']) account_currency = entry['account_currency'] - if account_currency != presentation_currency or (account_currency == presentation_currency and not is_p_or_l_account(account)): + if account_currency != presentation_currency: value = debit or credit date = currency_info['report_date'] if not is_p_or_l_account(account) else entry['posting_date'] From 5631ffca683ff3175dce52c2a95e6ad5fb592ca5 Mon Sep 17 00:00:00 2001 From: Faris Ansari Date: Tue, 12 Feb 2019 17:12:48 +0530 Subject: [PATCH 141/169] fix: Barcode scanning UX --- erpnext/public/js/controllers/transaction.js | 69 ++++++++++---------- 1 file changed, 34 insertions(+), 35 deletions(-) diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index 20e10988065..cf62af7b70e 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -276,13 +276,11 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({ scan_barcode: function() { let scan_barcode_field = this.frm.fields_dict["scan_barcode"]; - let show_description = function(idx, item_code, exist=null) { - if(exist) { - scan_barcode_field.set_new_description(__('Row : ') + idx + ' ' + - item_code + __(' Qty increased by 1')); + let show_description = function(idx, exist = null) { + if (exist) { + scan_barcode_field.set_new_description(__('Row #{0}: Qty increased by 1', [idx])); } else { - scan_barcode_field.set_new_description(__('New row : ') + idx + ' ' + - item_code + __(' Created')); + scan_barcode_field.set_new_description(__('Row #{0}: Item added', [idx])); } } @@ -291,38 +289,39 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({ method: "erpnext.selling.page.point_of_sale.point_of_sale.search_serial_or_batch_or_barcode_number", args: { search_value: this.frm.doc.scan_barcode } }).then(r => { - - if(r && r.message && r.message.item_code) { - let child = ""; - let add_row_index = -1; - let cur_grid= this.frm.fields_dict["items"].grid; - - this.frm.doc.items.map(d => { - if(d.item_code==r.message.item_code){ - add_row_index = d.idx; - return; - } else if(!d.item_code && add_row_index==-1) { - add_row_index = d.idx; - } - }); - - if(add_row_index == -1) { - child = frappe.model.add_child(this.frm.doc, cur_grid.doctype, "items", add_row_index); - } else { - child = cur_grid.get_grid_row(add_row_index-1).doc; - } - show_description(child.idx, r.message.item_code, child.item_code); - - frappe.model.set_value(child.doctype, child.name, { - "item_code": r.message.item_code, - "qty": (child.qty || 0) + 1 - }); + const data = r && r.message; + if (!data) { + scan_barcode_field.set_new_description(__('Cannot find Item with this barcode')); + return; } - else{ - scan_barcode_field.set_new_description(this.frm.doc.scan_barcode +__(' does not exist!')); + + let cur_grid = this.frm.fields_dict.items.grid; + + let row_to_modify = null; + const existing_item_row = this.frm.doc.items.find(d => d.item_code === data.item_code); + const blank_item_row = this.frm.doc.items.find(d => !d.item_code); + + if (existing_item_row) { + row_to_modify = existing_item_row; + } else if (blank_item_row) { + row_to_modify = blank_item_row; } + + if (!row_to_modify) { + // add new row + row_to_modify = frappe.model.add_child(this.frm.doc, cur_grid.doctype, 'items'); + } + + show_description(row_to_modify.idx, row_to_modify.item_code); + + frappe.model.set_value(row_to_modify.doctype, row_to_modify.name, { + item_code: data.item_code, + qty: (row_to_modify.qty || 0) + 1 + }); + + this.frm.refresh_field('items'); }); - scan_barcode_field.set_value(""); + scan_barcode_field.set_value(''); } return false; }, From 1a3c27bbeae137d616c1641d3bd82cf744dbe25a Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Tue, 12 Feb 2019 17:38:37 +0530 Subject: [PATCH 142/169] fix: Make work order from production plan considering already ordered qty --- .../manufacturing/doctype/production_plan/production_plan.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/manufacturing/doctype/production_plan/production_plan.py b/erpnext/manufacturing/doctype/production_plan/production_plan.py index d17adf6369b..97a8ea7e3cf 100644 --- a/erpnext/manufacturing/doctype/production_plan/production_plan.py +++ b/erpnext/manufacturing/doctype/production_plan/production_plan.py @@ -276,8 +276,8 @@ class ProductionPlan(Document): item_dict[(d.item_code, d.material_request_item, d.warehouse)] = item_details else: item_details.update({ - "qty":flt(item_dict.get((d.item_code, d.sales_order, d.warehouse),{}) - .get("qty")) + flt(d.planned_qty) + "qty": flt(item_dict.get((d.item_code, d.sales_order, d.warehouse),{}) + .get("qty")) + (flt(d.planned_qty) - flt(d.ordered_qty)) }) item_dict[(d.item_code, d.sales_order, d.warehouse)] = item_details From db527bfb245a628b1963b2bc9b0aba60540bfc69 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Tue, 12 Feb 2019 18:30:00 +0530 Subject: [PATCH 143/169] fix: Enqueued item variants updation if there are more than 30 variants --- erpnext/stock/doctype/item/item.py | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/erpnext/stock/doctype/item/item.py b/erpnext/stock/doctype/item/item.py index 566b6386fec..bd06688caa2 100644 --- a/erpnext/stock/doctype/item/item.py +++ b/erpnext/stock/doctype/item/item.py @@ -700,15 +700,14 @@ class Item(WebsiteGenerator): frappe.db.get_single_value('Item Variant Settings', 'do_not_update_variants'): return if self.has_variants: - updated = [] variants = frappe.db.get_all("Item", fields=["item_code"], filters={"variant_of": self.name}) - for d in variants: - variant = frappe.get_doc("Item", d) - copy_attributes_to_variant(self, variant) - variant.save() - updated.append(d.item_code) - if updated: - frappe.msgprint(_("Item Variants {0} updated").format(", ".join(updated))) + if variants: + if len(variants) <= 30: + update_variants(variants, self, publish_progress=False) + frappe.msgprint(_("Item Variants updated")) + else: + frappe.enqueue("erpnext.stock.doctype.item.item.update_variants", + variants=variants, template=self, now=frappe.flags.in_test, timeout=600) def validate_has_variants(self): if not self.has_variants and frappe.db.get_value("Item", self.name, "has_variants"): @@ -997,3 +996,13 @@ def get_item_attribute(parent, attribute_value=''): return frappe.get_all("Item Attribute Value", fields = ["attribute_value"], filters = {'parent': parent, 'attribute_value': ("like", "%%%s%%" % attribute_value)}) + +def update_variants(variants, template, publish_progress=True): + count=0 + for d in variants: + variant = frappe.get_doc("Item", d) + copy_attributes_to_variant(template, variant) + variant.save() + count+=1 + if publish_progress: + frappe.publish_progress(count*100/len(variants), title = _("Updating Variants...")) \ No newline at end of file From a748ca69e7ab744cb9022d211d69cd16af8eae2c Mon Sep 17 00:00:00 2001 From: Faris Ansari Date: Wed, 13 Feb 2019 13:02:39 +0530 Subject: [PATCH 144/169] fix: Validate invalid fields in Item Variant Settings - Some fields like barcodes cannot be copied in Item Variants - Wrote a patch that deletes the fields if they exist - Also, validate in controller --- erpnext/patches.txt | 1 + ...rcodes_field_from_copy_fields_to_variants.py | 7 +++++++ .../item_variant_settings.py | 17 +++++++++++++++-- 3 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 erpnext/patches/v11_0/remove_barcodes_field_from_copy_fields_to_variants.py diff --git a/erpnext/patches.txt b/erpnext/patches.txt index b8e2e358b1a..be97e81ddb5 100755 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -586,3 +586,4 @@ erpnext.patches.v11_0.renamed_from_to_fields_in_project erpnext.patches.v11_0.add_permissions_in_gst_settings erpnext.patches.v11_1.setup_guardian_role execute:frappe.delete_doc('DocType', 'Notification Control') +erpnext.patches.v11_0.remove_barcodes_field_from_copy_fields_to_variants #asdf diff --git a/erpnext/patches/v11_0/remove_barcodes_field_from_copy_fields_to_variants.py b/erpnext/patches/v11_0/remove_barcodes_field_from_copy_fields_to_variants.py new file mode 100644 index 00000000000..97ddd41ddb6 --- /dev/null +++ b/erpnext/patches/v11_0/remove_barcodes_field_from_copy_fields_to_variants.py @@ -0,0 +1,7 @@ +import frappe + +def execute(): + '''Remove barcodes field from "Copy Fields to Variants" table because barcodes must be unique''' + + settings = frappe.get_doc('Item Variant Settings') + settings.remove_invalid_fields_for_copy_fields_in_variants() diff --git a/erpnext/stock/doctype/item_variant_settings/item_variant_settings.py b/erpnext/stock/doctype/item_variant_settings/item_variant_settings.py index 678de1a9ba7..04224424a5e 100644 --- a/erpnext/stock/doctype/item_variant_settings/item_variant_settings.py +++ b/erpnext/stock/doctype/item_variant_settings/item_variant_settings.py @@ -5,14 +5,17 @@ from __future__ import unicode_literals import frappe from frappe.model.document import Document +from frappe import _ class ItemVariantSettings(Document): + invalid_fields_for_copy_fields_in_variants = ['barcodes'] + def set_default_fields(self): self.fields = [] fields = frappe.get_meta('Item').fields exclude_fields = ["naming_series", "item_code", "item_name", "show_in_website", "show_variant_in_website", "standard_rate", "opening_stock", "image", "description", - "variant_of", "valuation_rate", "description", + "variant_of", "valuation_rate", "description", "barcodes", "website_image", "thumbnail", "website_specifiations", "web_long_description"] for d in fields: @@ -20,4 +23,14 @@ class ItemVariantSettings(Document): d.fieldtype not in ['HTML', 'Section Break', 'Column Break', 'Button', 'Read Only']: self.append('fields', { 'field_name': d.fieldname - }) \ No newline at end of file + }) + + def remove_invalid_fields_for_copy_fields_in_variants(self): + fields = [row for row in self.fields if row.field_name not in self.invalid_fields_for_copy_fields_in_variants] + self.fields = fields + self.save() + + def validate(self): + for d in self.fields: + if d.field_name in self.invalid_fields_for_copy_fields_in_variants: + frappe.throw(_('Cannot set the field {0} for copying in variants').format(d.field_name)) From 4d1bc0ca853030bdbcaec5a6ca4fcd4063fe399e Mon Sep 17 00:00:00 2001 From: Deepesh Garg <42651287+deepeshgarg007@users.noreply.github.com> Date: Wed, 13 Feb 2019 16:58:46 +0530 Subject: [PATCH 145/169] fix: Add total row in analytics report (#16648) --- .../buying/report/purchase_analytics/purchase_analytics.json | 5 +++-- .../report/production_analytics/production_analytics.json | 5 +++-- erpnext/selling/report/sales_analytics/sales_analytics.json | 5 +++-- erpnext/stock/report/stock_analytics/stock_analytics.json | 5 +++-- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/erpnext/buying/report/purchase_analytics/purchase_analytics.json b/erpnext/buying/report/purchase_analytics/purchase_analytics.json index 996e3eef457..7ce779d773b 100644 --- a/erpnext/buying/report/purchase_analytics/purchase_analytics.json +++ b/erpnext/buying/report/purchase_analytics/purchase_analytics.json @@ -1,12 +1,13 @@ { - "add_total_row": 0, + "add_total_row": 1, "creation": "2018-10-05 16:08:24.156448", + "disable_prepared_report": 0, "disabled": 0, "docstatus": 0, "doctype": "Report", "idx": 0, "is_standard": "Yes", - "modified": "2018-10-05 16:08:33.272201", + "modified": "2019-02-12 14:32:29.107109", "modified_by": "Administrator", "module": "Buying", "name": "Purchase Analytics", diff --git a/erpnext/manufacturing/report/production_analytics/production_analytics.json b/erpnext/manufacturing/report/production_analytics/production_analytics.json index 023e0a89295..946cd33a1a2 100644 --- a/erpnext/manufacturing/report/production_analytics/production_analytics.json +++ b/erpnext/manufacturing/report/production_analytics/production_analytics.json @@ -1,13 +1,14 @@ { - "add_total_row": 0, + "add_total_row": 1, "creation": "2018-10-11 19:28:37.085066", + "disable_prepared_report": 0, "disabled": 0, "docstatus": 0, "doctype": "Report", "idx": 0, "is_standard": "Yes", "letter_head": "", - "modified": "2018-10-11 19:28:37.085066", + "modified": "2019-02-12 14:32:16.392521", "modified_by": "Administrator", "module": "Manufacturing", "name": "Production Analytics", diff --git a/erpnext/selling/report/sales_analytics/sales_analytics.json b/erpnext/selling/report/sales_analytics/sales_analytics.json index 5c95f284101..bd8230230ba 100644 --- a/erpnext/selling/report/sales_analytics/sales_analytics.json +++ b/erpnext/selling/report/sales_analytics/sales_analytics.json @@ -1,12 +1,13 @@ { - "add_total_row": 0, + "add_total_row": 1, "creation": "2018-09-21 12:46:29.451048", + "disable_prepared_report": 0, "disabled": 0, "docstatus": 0, "doctype": "Report", "idx": 0, "is_standard": "Yes", - "modified": "2018-09-21 12:46:29.451048", + "modified": "2019-02-12 14:30:40.043652", "modified_by": "Administrator", "module": "Selling", "name": "Sales Analytics", diff --git a/erpnext/stock/report/stock_analytics/stock_analytics.json b/erpnext/stock/report/stock_analytics/stock_analytics.json index efd5e99cbcc..7a2ed2bfc20 100644 --- a/erpnext/stock/report/stock_analytics/stock_analytics.json +++ b/erpnext/stock/report/stock_analytics/stock_analytics.json @@ -1,12 +1,13 @@ { - "add_total_row": 0, + "add_total_row": 1, "creation": "2018-10-08 12:11:32.133020", + "disable_prepared_report": 0, "disabled": 0, "docstatus": 0, "doctype": "Report", "idx": 0, "is_standard": "Yes", - "modified": "2018-10-08 12:18:42.834270", + "modified": "2019-02-12 14:32:22.874082", "modified_by": "Administrator", "module": "Stock", "name": "Stock Analytics", From 29fcb14c42130f87817f0da028cd1e3435b2a672 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Wed, 13 Feb 2019 17:18:12 +0530 Subject: [PATCH 146/169] fix: errors in deferred revenue booking --- erpnext/accounts/deferred_revenue.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/erpnext/accounts/deferred_revenue.py b/erpnext/accounts/deferred_revenue.py index 9ff8b042810..ae0b2593a17 100644 --- a/erpnext/accounts/deferred_revenue.py +++ b/erpnext/accounts/deferred_revenue.py @@ -60,7 +60,7 @@ def get_booking_dates(doc, item, start_date=None, end_date=None): deferred_account = "deferred_revenue_account" if doc.doctype=="Sales Invoice" else "deferred_expense_account" last_gl_entry, skip = False, False - booking_end_date = getdate(add_days(today(), -1)) if not end_date else end_date + booking_end_date = getdate(add_days(today(), -1) if not end_date else end_date) if booking_end_date < item.service_start_date or \ (item.service_stop_date and booking_end_date.month > item.service_stop_date.month): return None, None, None, True @@ -71,7 +71,7 @@ def get_booking_dates(doc, item, start_date=None, end_date=None): last_gl_entry = True booking_end_date = item.service_stop_date - booking_start_date = getdate(add_months(today(), -1)) if not start_date else start_date + booking_start_date = getdate(add_months(today(), -1) if not start_date else start_date) booking_start_date = booking_start_date \ if booking_start_date > item.service_start_date else item.service_start_date @@ -113,7 +113,6 @@ def calculate_amount_and_base_amount(doc, item, last_gl_entry, total_days, total group by voucher_detail_no '''.format(total_credit_debit, total_credit_debit_currency), (doc.company, item.get(deferred_account), doc.doctype, doc.name, item.name), as_dict=True) - already_booked_amount = gl_entries_details[0].total_credit if gl_entries_details else 0 base_amount = flt(item.base_net_amount - already_booked_amount, item.precision("base_net_amount")) if account_currency==doc.company_currency: @@ -136,7 +135,7 @@ def book_deferred_income_or_expense(doc, start_date=None, end_date=None): get_booking_dates(doc, item, start_date, end_date) if skip: continue - total_days = date_diff(item.service_end_date, item.service_start_date) + total_days = date_diff(item.service_end_date, item.service_start_date) + 1 total_booking_days = date_diff(booking_end_date, booking_start_date) + 1 account_currency = get_account_currency(item.expense_account) @@ -175,6 +174,10 @@ def book_deferred_income_or_expense(doc, start_date=None, end_date=None): 'project': project }, account_currency) ) - if gl_entries: - make_gl_entries(gl_entries, cancel=(doc.docstatus == 2), merge_entries=True) + try: + make_gl_entries(gl_entries, cancel=(doc.docstatus == 2), merge_entries=True) + frappe.db.commit() + except: + frappe.db.rollback() + frappe.log_error(message = frappe.get_traceback(), title = _("Error while processing deferred accounting for {0}").format(doc.name)) \ No newline at end of file From 34f4f24e214f99c9c075eb72eb26cfac573a7bf6 Mon Sep 17 00:00:00 2001 From: deepeshgarg007 Date: Thu, 14 Feb 2019 17:26:49 +0530 Subject: [PATCH 147/169] fix: Address and contact report --- .../report/address_and_contacts/address_and_contacts.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/selling/report/address_and_contacts/address_and_contacts.py b/erpnext/selling/report/address_and_contacts/address_and_contacts.py index a9e43034b48..eb242d0a737 100644 --- a/erpnext/selling/report/address_and_contacts/address_and_contacts.py +++ b/erpnext/selling/report/address_and_contacts/address_and_contacts.py @@ -102,7 +102,8 @@ def get_party_details(party_type, party_list, doctype, party_details): records = frappe.get_list(doctype, filters=filters, fields=fields, as_list=True) for d in records: details = party_details.get(d[0]) - details.setdefault(frappe.scrub(doctype), []).append(d[1:]) + if details: + details.setdefault(frappe.scrub(doctype), []).append(d[1:]) return party_details From 4902f7b2a05d4a54a6089f40f8b31af5e4877795 Mon Sep 17 00:00:00 2001 From: Deepesh Garg <42651287+deepeshgarg007@users.noreply.github.com> Date: Thu, 14 Feb 2019 17:32:52 +0530 Subject: [PATCH 148/169] fix: Show tasks in timesheet with status as Closed (#16660) --- erpnext/projects/doctype/timesheet/timesheet.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/projects/doctype/timesheet/timesheet.js b/erpnext/projects/doctype/timesheet/timesheet.js index e890befd1a2..8811ab95438 100644 --- a/erpnext/projects/doctype/timesheet/timesheet.js +++ b/erpnext/projects/doctype/timesheet/timesheet.js @@ -18,7 +18,7 @@ frappe.ui.form.on("Timesheet", { return{ filters: { 'project': child.project, - 'status': ["!=", "Closed"] + 'status': ["!=", "Cancelled"] } } } From 867ca63750f04cd6dcc081e31e682c55207bdf92 Mon Sep 17 00:00:00 2001 From: deepeshgarg007 Date: Thu, 14 Feb 2019 18:08:37 +0530 Subject: [PATCH 149/169] fix: Purchase order item description fix --- erpnext/buying/doctype/purchase_order/purchase_order.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.py b/erpnext/buying/doctype/purchase_order/purchase_order.py index 3c4ef2b17fe..a4a636d6baa 100644 --- a/erpnext/buying/doctype/purchase_order/purchase_order.py +++ b/erpnext/buying/doctype/purchase_order/purchase_order.py @@ -456,7 +456,7 @@ def make_rm_stock_entry(purchase_order, rm_items): items_dict = { rm_item_code: { "item_name": rm_item_data["item_name"], - "description": item_wh[rm_item_code].get('description'), + "description": item_wh.get(rm_item_code, {}).get('description', ""), 'qty': rm_item_data["qty"], 'from_warehouse': rm_item_data["warehouse"], 'stock_uom': rm_item_data["stock_uom"], From 0d1ccc357f522528e59511f431ccb3ca7ce42cb3 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 14 Feb 2019 18:30:10 +0530 Subject: [PATCH 150/169] fix: get item details --- erpnext/stock/get_item_details.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/erpnext/stock/get_item_details.py b/erpnext/stock/get_item_details.py index ec1031c70f2..74f35953e2a 100644 --- a/erpnext/stock/get_item_details.py +++ b/erpnext/stock/get_item_details.py @@ -16,6 +16,9 @@ from erpnext.setup.doctype.item_group.item_group import get_item_group_defaults from six import string_types, iteritems +sales_doctypes = ['Quotation', 'Sales Order', 'Delivery Note', 'Sales Invoice'] +purchase_doctypes = ['Material Request', 'Supplier Quotation', 'Purchase Order', 'Purchase Receipt', 'Purchase Invoice'] + @frappe.whitelist() def get_item_details(args): """ @@ -228,7 +231,7 @@ def get_basic_details(args, item): #Set the UOM to the Default Sales UOM or Default Purchase UOM if configured in the Item Master if not args.uom: - if args.get('doctype') in ['Quotation', 'Sales Order', 'Delivery Note', 'Sales Invoice']: + if args.get('doctype') in sales_doctypes: args.uom = item.sales_uom if item.sales_uom else item.stock_uom elif (args.get('doctype') in ['Purchase Order', 'Purchase Receipt', 'Purchase Invoice']) or \ (args.get('doctype') == 'Material Request' and args.get('material_request_type') == 'Purchase'): @@ -281,14 +284,15 @@ def get_basic_details(args, item): out.conversion_factor = 1.0 else: out.conversion_factor = args.conversion_factor or \ - get_conversion_factor(item.item_code, args.uom).get("conversion_factor") + get_conversion_factor(item.name, args.uom).get("conversion_factor") args.conversion_factor = out.conversion_factor out.stock_qty = out.qty * out.conversion_factor # calculate last purchase rate - from erpnext.buying.doctype.purchase_order.purchase_order import item_last_purchase_rate - out.last_purchase_rate = item_last_purchase_rate(args.name, args.conversion_rate, item.item_code, out.conversion_factor) + if args.get('doctype') in purchase_doctypes: + from erpnext.buying.doctype.purchase_order.purchase_order import item_last_purchase_rate + out.last_purchase_rate = item_last_purchase_rate(args.name, args.conversion_rate, item.name, out.conversion_factor) # if default specified in item is for another company, fetch from company for d in [ From 6f7a4d94cefb2458c4ec973e35d13d93510c0b0f Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 14 Feb 2019 19:34:43 +0530 Subject: [PATCH 151/169] fix: Consider parenttype while updating total qty in transactions --- erpnext/patches/v11_0/update_total_qty_field.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/erpnext/patches/v11_0/update_total_qty_field.py b/erpnext/patches/v11_0/update_total_qty_field.py index fcb76af459c..cc8524f3c21 100644 --- a/erpnext/patches/v11_0/update_total_qty_field.py +++ b/erpnext/patches/v11_0/update_total_qty_field.py @@ -19,9 +19,10 @@ def execute(): SELECT parent, SUM(qty) as qty FROM - `tab%s Item` + `tab{0} Item` + where parenttype = %s GROUP BY parent - ''' % (doctype), as_dict = True) + '''.format(doctype), doctype, as_dict = True) # Query to update total_qty might become too big, Update in batches # batch_size is chosen arbitrarily, Don't try too hard to reason about it From 4df7679c65b8b1ebe07d9d02cee6c72b01319507 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 15 Feb 2019 13:08:04 +0530 Subject: [PATCH 152/169] fix: Get outstanding invoices --- erpnext/accounts/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/utils.py b/erpnext/accounts/utils.py index 58e3e8793d6..d4e1840eb9c 100644 --- a/erpnext/accounts/utils.py +++ b/erpnext/accounts/utils.py @@ -615,7 +615,7 @@ def get_held_invoices(party_type, party): return held_invoices -def get_outstanding_invoices(party_type, party, account, condition=None, limit=1000): +def get_outstanding_invoices(party_type, party, account, condition=None, limit=None): outstanding_invoices = [] precision = frappe.get_precision("Sales Invoice", "outstanding_amount") or 2 @@ -628,7 +628,7 @@ def get_outstanding_invoices(party_type, party, account, condition=None, limit=1 invoice = 'Sales Invoice' if erpnext.get_party_account_type(party_type) == 'Receivable' else 'Purchase Invoice' held_invoices = get_held_invoices(party_type, party) - limit_cond = "limit %s" % (limit or 1000) + limit_cond = "limit %s" % limit if limit else "" invoice_list = frappe.db.sql(""" select From a0c9c7501b7aa378cf1001b1bc1c41f61db8bbd9 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 15 Feb 2019 14:24:08 +0530 Subject: [PATCH 153/169] Update update_total_qty_field.py --- erpnext/patches/v11_0/update_total_qty_field.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/patches/v11_0/update_total_qty_field.py b/erpnext/patches/v11_0/update_total_qty_field.py index cc8524f3c21..992454ac7c1 100644 --- a/erpnext/patches/v11_0/update_total_qty_field.py +++ b/erpnext/patches/v11_0/update_total_qty_field.py @@ -20,9 +20,9 @@ def execute(): parent, SUM(qty) as qty FROM `tab{0} Item` - where parenttype = %s + where parenttype = '{0}' GROUP BY parent - '''.format(doctype), doctype, as_dict = True) + '''.format(doctype), as_dict = True) # Query to update total_qty might become too big, Update in batches # batch_size is chosen arbitrarily, Don't try too hard to reason about it From 8a01342e484a66b3876eef70a9b6b69fba60bcf2 Mon Sep 17 00:00:00 2001 From: Faris Ansari Date: Fri, 15 Feb 2019 15:14:38 +0530 Subject: [PATCH 154/169] fix: Remove comment --- erpnext/patches.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/patches.txt b/erpnext/patches.txt index be97e81ddb5..c56557a8289 100755 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -586,4 +586,4 @@ erpnext.patches.v11_0.renamed_from_to_fields_in_project erpnext.patches.v11_0.add_permissions_in_gst_settings erpnext.patches.v11_1.setup_guardian_role execute:frappe.delete_doc('DocType', 'Notification Control') -erpnext.patches.v11_0.remove_barcodes_field_from_copy_fields_to_variants #asdf +erpnext.patches.v11_0.remove_barcodes_field_from_copy_fields_to_variants From acf26c8569f8c34354cdc2c15935beaaa558e19a Mon Sep 17 00:00:00 2001 From: Frappe Bot Date: Fri, 15 Feb 2019 10:22:32 +0000 Subject: [PATCH 155/169] bumped to version 11.1.6 --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 40e094d1ba4..465c283ad94 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -5,7 +5,7 @@ import frappe from erpnext.hooks import regional_overrides from frappe.utils import getdate -__version__ = '11.1.5' +__version__ = '11.1.6' def get_default_company(user=None): '''Get default company for user''' From cc0222a28a9a5d48f408937335507c7b9968cc7d Mon Sep 17 00:00:00 2001 From: Suraj Shetty Date: Sat, 16 Feb 2019 17:53:23 +0530 Subject: [PATCH 156/169] Remove unwanted barcode field from item --- erpnext/stock/doctype/item/item.json | 90 ++++++++++++++++++---------- 1 file changed, 58 insertions(+), 32 deletions(-) diff --git a/erpnext/stock/doctype/item/item.json b/erpnext/stock/doctype/item/item.json index 81997edfb4e..58c907793a7 100644 --- a/erpnext/stock/doctype/item/item.json +++ b/erpnext/stock/doctype/item/item.json @@ -38,6 +38,7 @@ "oldfieldtype": "Section Break", "options": "fa fa-flag", "permlevel": 0, + "precision": "", "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, @@ -70,6 +71,7 @@ "no_copy": 0, "options": "STO-ITEM-.YYYY.-", "permlevel": 0, + "precision": "", "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, @@ -104,6 +106,7 @@ "oldfieldname": "item_code", "oldfieldtype": "Data", "permlevel": 0, + "precision": "", "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, @@ -172,6 +175,7 @@ "oldfieldname": "item_name", "oldfieldtype": "Data", "permlevel": 0, + "precision": "", "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, @@ -183,37 +187,6 @@ "translatable": 0, "unique": 0 }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "barcode", - "fieldtype": "Data", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Barcode", - "length": 0, - "no_copy": 1, - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, { "allow_bulk_edit": 0, "allow_in_quick_entry": 0, @@ -238,6 +211,7 @@ "oldfieldtype": "Link", "options": "Item Group", "permlevel": 0, + "precision": "", "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, @@ -305,6 +279,7 @@ "oldfieldtype": "Link", "options": "UOM", "permlevel": 0, + "precision": "", "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, @@ -335,6 +310,7 @@ "length": 0, "no_copy": 0, "permlevel": 0, + "precision": "", "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, @@ -435,6 +411,7 @@ "oldfieldtype": "Select", "options": "", "permlevel": 0, + "precision": "", "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, @@ -701,6 +678,7 @@ "oldfieldname": "tolerance", "oldfieldtype": "Currency", "permlevel": 0, + "precision": "", "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, @@ -800,6 +778,7 @@ "oldfieldtype": "Link", "options": "Brand", "permlevel": 0, + "precision": "", "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 0, @@ -833,6 +812,7 @@ "oldfieldname": "description", "oldfieldtype": "Text", "permlevel": 0, + "precision": "", "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, @@ -933,6 +913,7 @@ "oldfieldtype": "Section Break", "options": "fa fa-truck", "permlevel": 0, + "precision": "", "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, @@ -1000,6 +981,7 @@ "oldfieldname": "end_of_life", "oldfieldtype": "Date", "permlevel": 0, + "precision": "", "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, @@ -1067,6 +1049,7 @@ "no_copy": 0, "options": "\nFIFO\nMoving Average", "permlevel": 0, + "precision": "", "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, @@ -1099,6 +1082,7 @@ "no_copy": 0, "oldfieldtype": "Column Break", "permlevel": 0, + "precision": "", "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, @@ -1134,6 +1118,7 @@ "oldfieldname": "warranty_period", "oldfieldtype": "Data", "permlevel": 0, + "precision": "", "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, @@ -1167,6 +1152,7 @@ "length": 0, "no_copy": 0, "permlevel": 0, + "precision": "", "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, @@ -1200,6 +1186,7 @@ "no_copy": 0, "options": "UOM", "permlevel": 0, + "precision": "", "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, @@ -1234,6 +1221,7 @@ "no_copy": 0, "options": "fa fa-rss", "permlevel": 0, + "precision": "", "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, @@ -1268,6 +1256,7 @@ "no_copy": 0, "options": "Item Reorder", "permlevel": 0, + "precision": "", "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, @@ -1337,6 +1326,7 @@ "oldfieldtype": "Table", "options": "UOM Conversion Detail", "permlevel": 0, + "precision": "", "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, @@ -1407,6 +1397,7 @@ "oldfieldtype": "Select", "options": "", "permlevel": 0, + "precision": "", "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, @@ -1643,6 +1634,7 @@ "oldfieldtype": "Select", "options": "", "permlevel": 0, + "precision": "", "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, @@ -1676,6 +1668,7 @@ "length": 0, "no_copy": 0, "permlevel": 0, + "precision": "", "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, @@ -1913,6 +1906,7 @@ "oldfieldtype": "Section Break", "options": "fa fa-shopping-cart", "permlevel": 0, + "precision": "", "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, @@ -2015,6 +2009,7 @@ "oldfieldname": "min_order_qty", "oldfieldtype": "Currency", "permlevel": 0, + "precision": "", "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, @@ -2114,6 +2109,7 @@ "oldfieldname": "lead_time_days", "oldfieldtype": "Int", "permlevel": 0, + "precision": "", "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, @@ -2148,6 +2144,7 @@ "oldfieldname": "last_purchase_rate", "oldfieldtype": "Currency", "permlevel": 0, + "precision": "", "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 1, @@ -2246,6 +2243,7 @@ "no_copy": 0, "options": "Manufacturer", "permlevel": 0, + "precision": "", "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, @@ -2278,6 +2276,7 @@ "length": 0, "no_copy": 0, "permlevel": 0, + "precision": "", "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, @@ -2311,6 +2310,7 @@ "no_copy": 0, "oldfieldtype": "Column Break", "permlevel": 0, + "precision": "", "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, @@ -2345,6 +2345,7 @@ "no_copy": 0, "options": "Item Supplier", "permlevel": 0, + "precision": "", "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, @@ -2507,6 +2508,7 @@ "oldfieldtype": "Section Break", "options": "fa fa-tag", "permlevel": 0, + "precision": "", "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, @@ -2606,6 +2608,7 @@ "no_copy": 0, "oldfieldtype": "Column Break", "permlevel": 0, + "precision": "", "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, @@ -2641,6 +2644,7 @@ "oldfieldname": "max_discount", "oldfieldtype": "Currency", "permlevel": 0, + "precision": "", "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, @@ -3031,6 +3035,7 @@ "no_copy": 0, "options": "Item Customer Detail", "permlevel": 0, + "precision": "", "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, @@ -3064,6 +3069,7 @@ "oldfieldtype": "Section Break", "options": "fa fa-money", "permlevel": 0, + "precision": "", "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, @@ -3099,6 +3105,7 @@ "oldfieldtype": "Table", "options": "Item Tax", "permlevel": 0, + "precision": "", "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, @@ -3132,6 +3139,7 @@ "oldfieldtype": "Section Break", "options": "fa fa-search", "permlevel": 0, + "precision": "", "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, @@ -3167,6 +3175,7 @@ "oldfieldtype": "Select", "options": "", "permlevel": 0, + "precision": "", "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, @@ -3267,6 +3276,7 @@ "oldfieldtype": "Section Break", "options": "fa fa-cogs", "permlevel": 0, + "precision": "", "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, @@ -3302,6 +3312,7 @@ "oldfieldtype": "Link", "options": "BOM", "permlevel": 0, + "precision": "", "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 1, @@ -3338,6 +3349,7 @@ "oldfieldtype": "Select", "options": "", "permlevel": 0, + "precision": "", "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, @@ -3400,6 +3412,7 @@ "length": 0, "no_copy": 1, "permlevel": 0, + "precision": "", "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 0, @@ -3432,6 +3445,7 @@ "no_copy": 0, "options": "fa fa-globe", "permlevel": 0, + "precision": "", "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, @@ -3464,6 +3478,7 @@ "length": 0, "no_copy": 0, "permlevel": 0, + "precision": "", "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, @@ -3563,6 +3578,7 @@ "length": 0, "no_copy": 0, "permlevel": 0, + "precision": "", "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, @@ -3597,6 +3613,7 @@ "no_copy": 0, "options": "Website Slideshow", "permlevel": 0, + "precision": "", "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, @@ -3631,6 +3648,7 @@ "no_copy": 0, "options": "", "permlevel": 0, + "precision": "", "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, @@ -3693,6 +3711,7 @@ "length": 0, "no_copy": 0, "permlevel": 0, + "precision": "", "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, @@ -3727,6 +3746,7 @@ "no_copy": 0, "options": "Warehouse", "permlevel": 0, + "precision": "", "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, @@ -3761,6 +3781,7 @@ "no_copy": 0, "options": "Website Item Group", "permlevel": 0, + "precision": "", "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, @@ -3794,6 +3815,7 @@ "length": 0, "no_copy": 0, "permlevel": 0, + "precision": "", "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, @@ -3826,6 +3848,7 @@ "length": 0, "no_copy": 0, "permlevel": 0, + "precision": "", "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, @@ -3859,6 +3882,7 @@ "no_copy": 0, "options": "Item Website Specification", "permlevel": 0, + "precision": "", "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, @@ -3891,6 +3915,7 @@ "length": 0, "no_copy": 0, "permlevel": 0, + "precision": "", "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, @@ -4114,10 +4139,11 @@ "issingle": 0, "istable": 0, "max_attachments": 1, - "modified": "2019-01-07 16:52:05.096907", + "modified": "2019-02-16 17:43:56.039611", "modified_by": "Administrator", "module": "Stock", "name": "Item", + "name_case": "", "owner": "Administrator", "permissions": [ { From 8cbe824c5b196d776e23eca9a4f85a593a955e72 Mon Sep 17 00:00:00 2001 From: Suraj Shetty Date: Sat, 16 Feb 2019 17:54:15 +0530 Subject: [PATCH 157/169] Rerun item_barcode_chidtable_migrate patch --- erpnext/patches.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/patches.txt b/erpnext/patches.txt index b8e2e358b1a..b3ccda666be 100755 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -488,7 +488,7 @@ erpnext.patches.v10_0.update_assessment_plan erpnext.patches.v10_0.update_assessment_result erpnext.patches.v10_0.set_default_payment_terms_based_on_company erpnext.patches.v10_0.update_sales_order_link_to_purchase_order -erpnext.patches.v10_0.item_barcode_childtable_migrate +erpnext.patches.v10_0.item_barcode_childtable_migrate # 16-02-2019 erpnext.patches.v10_0.rename_price_to_rate_in_pricing_rule erpnext.patches.v10_0.set_currency_in_pricing_rule erpnext.patches.v10_0.set_b2c_limit From 1399fbe986f6a0a10a5721571c32851766ef542f Mon Sep 17 00:00:00 2001 From: Suraj Shetty Date: Sat, 16 Feb 2019 21:02:34 +0530 Subject: [PATCH 158/169] Move patch --- erpnext/patches.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/patches.txt b/erpnext/patches.txt index b3ccda666be..2199491a714 100755 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -488,7 +488,6 @@ erpnext.patches.v10_0.update_assessment_plan erpnext.patches.v10_0.update_assessment_result erpnext.patches.v10_0.set_default_payment_terms_based_on_company erpnext.patches.v10_0.update_sales_order_link_to_purchase_order -erpnext.patches.v10_0.item_barcode_childtable_migrate # 16-02-2019 erpnext.patches.v10_0.rename_price_to_rate_in_pricing_rule erpnext.patches.v10_0.set_currency_in_pricing_rule erpnext.patches.v10_0.set_b2c_limit @@ -586,3 +585,4 @@ erpnext.patches.v11_0.renamed_from_to_fields_in_project erpnext.patches.v11_0.add_permissions_in_gst_settings erpnext.patches.v11_1.setup_guardian_role execute:frappe.delete_doc('DocType', 'Notification Control') +erpnext.patches.v10_0.item_barcode_childtable_migrate # 16-02-2019 \ No newline at end of file From 3a2f342ac180f53456b2def5bb809cd00047ef6d Mon Sep 17 00:00:00 2001 From: Suraj Shetty Date: Sat, 16 Feb 2019 21:09:24 +0530 Subject: [PATCH 159/169] Ignore duplicate entry --- .../v10_0/item_barcode_childtable_migrate.py | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/erpnext/patches/v10_0/item_barcode_childtable_migrate.py b/erpnext/patches/v10_0/item_barcode_childtable_migrate.py index c939dd5d33d..a2e25795eb1 100644 --- a/erpnext/patches/v10_0/item_barcode_childtable_migrate.py +++ b/erpnext/patches/v10_0/item_barcode_childtable_migrate.py @@ -16,11 +16,14 @@ def execute(): barcode = item.barcode.strip() if barcode and '<' not in barcode: - frappe.get_doc({ - 'idx': 0, - 'doctype': 'Item Barcode', - 'barcode': barcode, - 'parenttype': 'Item', - 'parent': item.name, - 'parentfield': 'barcodes' - }).insert() + try: + frappe.get_doc({ + 'idx': 0, + 'doctype': 'Item Barcode', + 'barcode': barcode, + 'parenttype': 'Item', + 'parent': item.name, + 'parentfield': 'barcodes' + }).insert() + except frappe.DuplicateEntryError: + continue From 053d6a2ca13b1f36a02fa3223092a10af35f6579 Mon Sep 17 00:00:00 2001 From: Suraj Shetty Date: Sun, 17 Feb 2019 11:24:51 +0530 Subject: [PATCH 160/169] Move reload doc before get query --- erpnext/patches/v10_0/item_barcode_childtable_migrate.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/erpnext/patches/v10_0/item_barcode_childtable_migrate.py b/erpnext/patches/v10_0/item_barcode_childtable_migrate.py index a2e25795eb1..bc6005677db 100644 --- a/erpnext/patches/v10_0/item_barcode_childtable_migrate.py +++ b/erpnext/patches/v10_0/item_barcode_childtable_migrate.py @@ -7,11 +7,13 @@ import frappe def execute(): - items_barcode = frappe.get_all('Item', ['name', 'barcode'], { 'barcode': ('!=', '') }) - - frappe.reload_doc("stock", "doctype", "item") frappe.reload_doc("stock", "doctype", "item_barcode") + items_barcode = frappe.get_all('Item', ['name', 'barcode'], { 'barcode': ('!=', '') }) + frappe.reload_doc("stock", "doctype", "item") + + + for item in items_barcode: barcode = item.barcode.strip() From 48a7262fae307274515333b61edcfda5a3752230 Mon Sep 17 00:00:00 2001 From: deepeshgarg007 Date: Mon, 18 Feb 2019 15:05:36 +0530 Subject: [PATCH 161/169] fix: Precision issue in POS payment --- .../sales_invoice_payment.json | 36 ++++++++++++------- 1 file changed, 23 insertions(+), 13 deletions(-) diff --git a/erpnext/accounts/doctype/sales_invoice_payment/sales_invoice_payment.json b/erpnext/accounts/doctype/sales_invoice_payment/sales_invoice_payment.json index 438328d60d3..ccdabfe5444 100644 --- a/erpnext/accounts/doctype/sales_invoice_payment/sales_invoice_payment.json +++ b/erpnext/accounts/doctype/sales_invoice_payment/sales_invoice_payment.json @@ -1,5 +1,6 @@ { "allow_copy": 0, + "allow_events_in_timeline": 0, "allow_guest_to_view": 0, "allow_import": 0, "allow_rename": 0, @@ -13,6 +14,7 @@ "fields": [ { "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -40,11 +42,12 @@ "reqd": 0, "search_index": 0, "set_only_once": 0, - "translatable": 0, + "translatable": 0, "unique": 0 }, { "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -72,16 +75,17 @@ "reqd": 1, "search_index": 0, "set_only_once": 0, - "translatable": 0, + "translatable": 0, "unique": 0 }, { "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, "columns": 0, - "default": "0.0", + "default": "", "depends_on": "eval:parent.doctype == 'Sales Invoice'", "fieldname": "amount", "fieldtype": "Currency", @@ -97,7 +101,7 @@ "no_copy": 0, "options": "currency", "permlevel": 0, - "precision": "2", + "precision": "", "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, @@ -106,11 +110,12 @@ "reqd": 1, "search_index": 0, "set_only_once": 0, - "translatable": 0, + "translatable": 0, "unique": 0 }, { "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -136,11 +141,12 @@ "reqd": 0, "search_index": 0, "set_only_once": 0, - "translatable": 0, + "translatable": 0, "unique": 0 }, { "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -168,16 +174,17 @@ "reqd": 0, "search_index": 0, "set_only_once": 0, - "translatable": 0, + "translatable": 0, "unique": 0 }, { "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, "columns": 0, - "fetch_from": "mode_of_payment.type", + "fetch_from": "mode_of_payment.type", "fieldname": "type", "fieldtype": "Read Only", "hidden": 0, @@ -201,11 +208,12 @@ "reqd": 0, "search_index": 0, "set_only_once": 0, - "translatable": 0, + "translatable": 0, "unique": 0 }, { "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -233,11 +241,12 @@ "reqd": 0, "search_index": 0, "set_only_once": 0, - "translatable": 0, + "translatable": 0, "unique": 0 }, { "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -264,7 +273,7 @@ "reqd": 0, "search_index": 0, "set_only_once": 0, - "translatable": 0, + "translatable": 0, "unique": 0 } ], @@ -278,7 +287,7 @@ "issingle": 0, "istable": 1, "max_attachments": 0, - "modified": "2018-05-16 22:42:52.033991", + "modified": "2019-02-18 15:03:59.720469", "modified_by": "Administrator", "module": "Accounts", "name": "Sales Invoice Payment", @@ -292,5 +301,6 @@ "sort_field": "modified", "sort_order": "DESC", "track_changes": 0, - "track_seen": 0 + "track_seen": 0, + "track_views": 0 } \ No newline at end of file From 99e736200679cdf10f26a047ee64c6a266fbe025 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Mon, 18 Feb 2019 18:26:50 +0530 Subject: [PATCH 162/169] fix: Allow to make material request from draft job card --- erpnext/manufacturing/doctype/job_card/job_card.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/erpnext/manufacturing/doctype/job_card/job_card.py b/erpnext/manufacturing/doctype/job_card/job_card.py index 5ed03be5451..ea9f714fc84 100644 --- a/erpnext/manufacturing/doctype/job_card/job_card.py +++ b/erpnext/manufacturing/doctype/job_card/job_card.py @@ -172,9 +172,6 @@ def make_material_request(source_name, target_doc=None): doclist = get_mapped_doc("Job Card", source_name, { "Job Card": { "doctype": "Material Request", - "validation": { - "docstatus": ["=", 1] - }, "field_map": { "name": "job_card", }, @@ -206,9 +203,6 @@ def make_stock_entry(source_name, target_doc=None): doclist = get_mapped_doc("Job Card", source_name, { "Job Card": { "doctype": "Stock Entry", - "validation": { - "docstatus": ["=", 1] - }, "field_map": { "name": "job_card", "for_quantity": "fg_completed_qty" From 9a19e06856798ce3b225ea9df974d136e746953a Mon Sep 17 00:00:00 2001 From: deepeshgarg007 Date: Mon, 18 Feb 2019 18:42:15 +0530 Subject: [PATCH 163/169] fix: Change Received qty to accepted qty and validation for indicators --- .../doctype/purchase_invoice/purchase_invoice.js | 9 ++++++--- .../purchase_invoice_item/purchase_invoice_item.json | 6 +++--- .../purchase_receipt_item/purchase_receipt_item.json | 4 ++-- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js index 263b5bb75e6..b4fd91f6e43 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js @@ -9,9 +9,12 @@ erpnext.accounts.PurchaseInvoice = erpnext.buying.BuyingController.extend({ this.setup_posting_date_time_check(); this._super(doc); - // formatter for material request item - this.frm.set_indicator_formatter('item_code', - function(doc) { return (doc.qty<=doc.received_qty) ? "green" : "orange" }) + // formatter for purchase invoice item + if(this.frm.doc.update_stock) { + this.frm.set_indicator_formatter('item_code', function(doc) { + return (doc.qty<=doc.received_qty) ? "green" : "orange"; + }); + } }, onload: function() { this._super(); diff --git a/erpnext/accounts/doctype/purchase_invoice_item/purchase_invoice_item.json b/erpnext/accounts/doctype/purchase_invoice_item/purchase_invoice_item.json index c2309b264a9..7734163f3ad 100644 --- a/erpnext/accounts/doctype/purchase_invoice_item/purchase_invoice_item.json +++ b/erpnext/accounts/doctype/purchase_invoice_item/purchase_invoice_item.json @@ -293,7 +293,7 @@ "length": 0, "no_copy": 0, "permlevel": 0, - "precision": "2", + "precision": "", "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, @@ -321,7 +321,7 @@ "in_global_search": 0, "in_list_view": 1, "in_standard_filter": 0, - "label": "Qty", + "label": "Accepted Qty", "length": 0, "no_copy": 0, "oldfieldname": "qty", @@ -2626,7 +2626,7 @@ "issingle": 0, "istable": 1, "max_attachments": 0, - "modified": "2019-01-07 16:52:00.749414", + "modified": "2019-02-18 18:13:40.390806", "modified_by": "Administrator", "module": "Accounts", "name": "Purchase Invoice Item", diff --git a/erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.json b/erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.json index 3746dfb2235..528f799aa70 100644 --- a/erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.json +++ b/erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.json @@ -417,7 +417,7 @@ "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, - "label": "Recd Quantity", + "label": "Received Quantity", "length": 0, "no_copy": 0, "oldfieldname": "received_qty", @@ -2608,7 +2608,7 @@ "issingle": 0, "istable": 1, "max_attachments": 0, - "modified": "2019-01-07 16:51:59.002215", + "modified": "2019-02-18 16:04:36.138776", "modified_by": "Administrator", "module": "Stock", "name": "Purchase Receipt Item", From 750fe6eaea0a9b3da7ac01b7da97e4baddffd2ea Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Mon, 18 Feb 2019 18:55:53 +0530 Subject: [PATCH 164/169] fix: get item rate in bom --- erpnext/manufacturing/doctype/bom/bom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/manufacturing/doctype/bom/bom.py b/erpnext/manufacturing/doctype/bom/bom.py index ba3b7192a35..88d346ff0f3 100644 --- a/erpnext/manufacturing/doctype/bom/bom.py +++ b/erpnext/manufacturing/doctype/bom/bom.py @@ -183,7 +183,7 @@ class BOM(WebsiteGenerator): args = frappe._dict({ "doctype": "BOM", "price_list": self.buying_price_list, - "qty": arg.get("qty"), + "qty": arg.get("qty") or 1, "uom": arg.get("uom") or arg.get("stock_uom"), "stock_uom": arg.get("stock_uom"), "transaction_type": "buying", From 5821b672adbdd20e91a641f635fcc027f6ce2415 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Mon, 18 Feb 2019 20:07:44 +0530 Subject: [PATCH 165/169] fix: multi-uom not working for the pricing rule rate --- erpnext/accounts/doctype/pricing_rule/pricing_rule.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/pricing_rule/pricing_rule.py b/erpnext/accounts/doctype/pricing_rule/pricing_rule.py index fe99763a351..ac0cd7e895c 100644 --- a/erpnext/accounts/doctype/pricing_rule/pricing_rule.py +++ b/erpnext/accounts/doctype/pricing_rule/pricing_rule.py @@ -196,8 +196,9 @@ def get_pricing_rule_for_item(args): pricing_rule_rate = 0.0 if pricing_rule.currency == args.currency: pricing_rule_rate = pricing_rule.rate + item_details.update({ - "price_list_rate": pricing_rule_rate, + "price_list_rate": pricing_rule_rate * args.get("conversion_factor"), "discount_percentage": 0.0 }) else: From de0f59b818142e55435c12e87f83804651425e34 Mon Sep 17 00:00:00 2001 From: deepeshgarg007 Date: Tue, 19 Feb 2019 08:40:16 +0530 Subject: [PATCH 166/169] fix: Removed precision from multiple doctypes --- .../cashier_closing/cashier_closing.json | 37 +++++++++++++---- .../cashier_closing_payments.json | 12 ++++-- .../journal_entry_account.json | 5 ++- .../payment_request/payment_request.json | 5 ++- .../purchase_invoice_item.json | 8 ++-- .../doctype/sales_invoice/sales_invoice.json | 4 +- .../sales_invoice_item.json | 6 +-- .../sales_invoice_timesheet.json | 23 +++++++++-- .../supplier_quotation_item.json | 4 +- .../hr/doctype/salary_slip/salary_slip.json | 10 ++--- .../salary_slip_timesheet.json | 27 ++++++++++-- .../salary_structure/salary_structure.json | 5 ++- .../timesheet_detail/timesheet_detail.json | 41 ++++++++++++++++--- .../quotation_item/quotation_item.json | 4 +- .../sales_order_item/sales_order_item.json | 4 +- .../delivery_note_item.json | 6 +-- 16 files changed, 149 insertions(+), 52 deletions(-) diff --git a/erpnext/accounts/doctype/cashier_closing/cashier_closing.json b/erpnext/accounts/doctype/cashier_closing/cashier_closing.json index 57a9c7aaddf..14e9070f302 100644 --- a/erpnext/accounts/doctype/cashier_closing/cashier_closing.json +++ b/erpnext/accounts/doctype/cashier_closing/cashier_closing.json @@ -1,5 +1,6 @@ { "allow_copy": 0, + "allow_events_in_timeline": 0, "allow_guest_to_view": 0, "allow_import": 0, "allow_rename": 0, @@ -15,6 +16,7 @@ "fields": [ { "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -32,7 +34,7 @@ "label": "Series", "length": 0, "no_copy": 0, - "options": "Cashier-closing-\n", + "options": "Cashier-closing-", "permlevel": 0, "precision": "", "print_hide": 0, @@ -43,10 +45,12 @@ "reqd": 0, "search_index": 0, "set_only_once": 0, + "translatable": 0, "unique": 0 }, { "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -74,10 +78,12 @@ "reqd": 1, "search_index": 0, "set_only_once": 0, + "translatable": 0, "unique": 0 }, { "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -105,10 +111,12 @@ "reqd": 0, "search_index": 0, "set_only_once": 0, + "translatable": 0, "unique": 0 }, { "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -135,10 +143,12 @@ "reqd": 1, "search_index": 0, "set_only_once": 0, + "translatable": 0, "unique": 0 }, { "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -166,10 +176,12 @@ "reqd": 1, "search_index": 0, "set_only_once": 0, + "translatable": 0, "unique": 0 }, { "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -188,7 +200,7 @@ "length": 0, "no_copy": 0, "permlevel": 0, - "precision": "2", + "precision": "", "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, @@ -197,10 +209,12 @@ "reqd": 0, "search_index": 0, "set_only_once": 0, + "translatable": 0, "unique": 0 }, { "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -219,7 +233,7 @@ "length": 0, "no_copy": 0, "permlevel": 0, - "precision": "2", + "precision": "", "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, @@ -228,10 +242,12 @@ "reqd": 0, "search_index": 0, "set_only_once": 0, + "translatable": 0, "unique": 0 }, { "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -250,7 +266,7 @@ "length": 0, "no_copy": 0, "permlevel": 0, - "precision": "2", + "precision": "", "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 1, @@ -259,10 +275,12 @@ "reqd": 0, "search_index": 0, "set_only_once": 0, + "translatable": 0, "unique": 0 }, { "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -291,10 +309,12 @@ "reqd": 0, "search_index": 0, "set_only_once": 0, + "translatable": 0, "unique": 0 }, { "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -321,10 +341,12 @@ "reqd": 0, "search_index": 0, "set_only_once": 0, + "translatable": 0, "unique": 0 }, { "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -351,6 +373,7 @@ "reqd": 0, "search_index": 0, "set_only_once": 0, + "translatable": 0, "unique": 0 } ], @@ -364,7 +387,7 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2018-09-03 10:59:54.500567", + "modified": "2019-02-19 08:35:23.157327", "modified_by": "Administrator", "module": "Accounts", "name": "Cashier Closing", @@ -373,7 +396,6 @@ "permissions": [ { "amend": 0, - "apply_user_permissions": 0, "cancel": 0, "create": 1, "delete": 1, @@ -399,5 +421,6 @@ "sort_field": "modified", "sort_order": "DESC", "track_changes": 1, - "track_seen": 0 + "track_seen": 0, + "track_views": 0 } \ No newline at end of file diff --git a/erpnext/accounts/doctype/cashier_closing_payments/cashier_closing_payments.json b/erpnext/accounts/doctype/cashier_closing_payments/cashier_closing_payments.json index bdfc70f8b18..7f16beafc31 100644 --- a/erpnext/accounts/doctype/cashier_closing_payments/cashier_closing_payments.json +++ b/erpnext/accounts/doctype/cashier_closing_payments/cashier_closing_payments.json @@ -1,5 +1,6 @@ { "allow_copy": 0, + "allow_events_in_timeline": 0, "allow_guest_to_view": 0, "allow_import": 0, "allow_rename": 0, @@ -14,6 +15,7 @@ "fields": [ { "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -41,10 +43,12 @@ "reqd": 1, "search_index": 0, "set_only_once": 0, + "translatable": 0, "unique": 0 }, { "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -63,7 +67,7 @@ "length": 0, "no_copy": 0, "permlevel": 0, - "precision": "2", + "precision": "", "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, @@ -72,6 +76,7 @@ "reqd": 0, "search_index": 0, "set_only_once": 0, + "translatable": 0, "unique": 0 } ], @@ -85,7 +90,7 @@ "issingle": 0, "istable": 1, "max_attachments": 0, - "modified": "2018-09-02 14:45:36.303520", + "modified": "2019-02-19 08:34:20.268037", "modified_by": "Administrator", "module": "Accounts", "name": "Cashier Closing Payments", @@ -99,5 +104,6 @@ "sort_field": "modified", "sort_order": "DESC", "track_changes": 1, - "track_seen": 0 + "track_seen": 0, + "track_views": 0 } \ No newline at end of file diff --git a/erpnext/accounts/doctype/journal_entry_account/journal_entry_account.json b/erpnext/accounts/doctype/journal_entry_account/journal_entry_account.json index 5a827bea819..32e49dbde49 100644 --- a/erpnext/accounts/doctype/journal_entry_account/journal_entry_account.json +++ b/erpnext/accounts/doctype/journal_entry_account/journal_entry_account.json @@ -1,5 +1,6 @@ { "allow_copy": 0, + "allow_events_in_timeline": 0, "allow_guest_to_view": 0, "allow_import": 0, "allow_rename": 0, @@ -398,7 +399,7 @@ "length": 0, "no_copy": 0, "permlevel": 0, - "precision": "6", + "precision": "9", "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 0, @@ -911,7 +912,7 @@ "issingle": 0, "istable": 1, "max_attachments": 0, - "modified": "2018-08-19 04:08:44.742510", + "modified": "2019-02-18 19:00:53.662788", "modified_by": "Administrator", "module": "Accounts", "name": "Journal Entry Account", diff --git a/erpnext/accounts/doctype/payment_request/payment_request.json b/erpnext/accounts/doctype/payment_request/payment_request.json index 76fe8841656..bff995ec5a5 100644 --- a/erpnext/accounts/doctype/payment_request/payment_request.json +++ b/erpnext/accounts/doctype/payment_request/payment_request.json @@ -1,5 +1,6 @@ { "allow_copy": 0, + "allow_events_in_timeline": 0, "allow_guest_to_view": 0, "allow_import": 0, "allow_rename": 0, @@ -425,7 +426,7 @@ "no_copy": 0, "options": "currency", "permlevel": 0, - "precision": "2", + "precision": "", "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, @@ -1501,7 +1502,7 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2018-09-06 14:44:43.563367", + "modified": "2019-02-18 18:52:34.203239", "modified_by": "Administrator", "module": "Accounts", "name": "Payment Request", diff --git a/erpnext/accounts/doctype/purchase_invoice_item/purchase_invoice_item.json b/erpnext/accounts/doctype/purchase_invoice_item/purchase_invoice_item.json index c2309b264a9..9e1d4bb9161 100644 --- a/erpnext/accounts/doctype/purchase_invoice_item/purchase_invoice_item.json +++ b/erpnext/accounts/doctype/purchase_invoice_item/purchase_invoice_item.json @@ -293,7 +293,7 @@ "length": 0, "no_copy": 0, "permlevel": 0, - "precision": "2", + "precision": "", "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, @@ -321,7 +321,7 @@ "in_global_search": 0, "in_list_view": 1, "in_standard_filter": 0, - "label": "Qty", + "label": "Accepted Qty", "length": 0, "no_copy": 0, "oldfieldname": "qty", @@ -358,7 +358,7 @@ "length": 0, "no_copy": 0, "permlevel": 0, - "precision": "2", + "precision": "", "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, @@ -2626,7 +2626,7 @@ "issingle": 0, "istable": 1, "max_attachments": 0, - "modified": "2019-01-07 16:52:00.749414", + "modified": "2019-02-18 19:03:19.250250", "modified_by": "Administrator", "module": "Accounts", "name": "Purchase Invoice Item", diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.json b/erpnext/accounts/doctype/sales_invoice/sales_invoice.json index 13ba053baeb..077d99512ac 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.json +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.json @@ -1966,7 +1966,7 @@ "length": 0, "no_copy": 0, "permlevel": 0, - "precision": "2", + "precision": "", "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 1, @@ -5644,7 +5644,7 @@ "istable": 0, "max_attachments": 0, "menu_index": 0, - "modified": "2019-01-07 16:51:53.914523", + "modified": "2019-02-18 18:56:51.265257", "modified_by": "Administrator", "module": "Accounts", "name": "Sales Invoice", diff --git a/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.json b/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.json index d6ce11536e5..a95f3146616 100644 --- a/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.json +++ b/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.json @@ -779,7 +779,7 @@ "no_copy": 0, "options": "currency", "permlevel": 0, - "precision": "2", + "precision": "", "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 1, @@ -913,7 +913,7 @@ "no_copy": 0, "options": "Company:company:default_currency", "permlevel": 0, - "precision": "2", + "precision": "", "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 1, @@ -2766,7 +2766,7 @@ "issingle": 0, "istable": 1, "max_attachments": 0, - "modified": "2019-01-07 16:51:55.018091", + "modified": "2019-02-18 18:59:52.223628", "modified_by": "Administrator", "module": "Accounts", "name": "Sales Invoice Item", diff --git a/erpnext/accounts/doctype/sales_invoice_timesheet/sales_invoice_timesheet.json b/erpnext/accounts/doctype/sales_invoice_timesheet/sales_invoice_timesheet.json index 50eed241d45..f7b9aef96cc 100644 --- a/erpnext/accounts/doctype/sales_invoice_timesheet/sales_invoice_timesheet.json +++ b/erpnext/accounts/doctype/sales_invoice_timesheet/sales_invoice_timesheet.json @@ -1,5 +1,7 @@ { "allow_copy": 0, + "allow_events_in_timeline": 0, + "allow_guest_to_view": 0, "allow_import": 0, "allow_rename": 0, "beta": 0, @@ -12,6 +14,8 @@ "engine": "InnoDB", "fields": [ { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -39,9 +43,12 @@ "reqd": 0, "search_index": 0, "set_only_once": 0, + "translatable": 0, "unique": 0 }, { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -68,9 +75,12 @@ "reqd": 0, "search_index": 0, "set_only_once": 0, + "translatable": 0, "unique": 0 }, { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -88,7 +98,7 @@ "length": 0, "no_copy": 0, "permlevel": 0, - "precision": "2", + "precision": "", "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 1, @@ -97,9 +107,12 @@ "reqd": 0, "search_index": 0, "set_only_once": 0, + "translatable": 0, "unique": 0 }, { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, "allow_on_submit": 1, "bold": 0, "collapsible": 0, @@ -126,20 +139,21 @@ "reqd": 0, "search_index": 0, "set_only_once": 0, + "translatable": 0, "unique": 0 } ], + "has_web_view": 0, "hide_heading": 0, "hide_toolbar": 0, "idx": 0, "image_view": 0, "in_create": 0, - "is_submittable": 0, "issingle": 0, "istable": 1, "max_attachments": 0, - "modified": "2017-02-17 16:47:04.413420", + "modified": "2019-02-18 18:50:44.770361", "modified_by": "Administrator", "module": "Accounts", "name": "Sales Invoice Timesheet", @@ -153,5 +167,6 @@ "sort_field": "modified", "sort_order": "DESC", "track_changes": 1, - "track_seen": 0 + "track_seen": 0, + "track_views": 0 } \ No newline at end of file diff --git a/erpnext/buying/doctype/supplier_quotation_item/supplier_quotation_item.json b/erpnext/buying/doctype/supplier_quotation_item/supplier_quotation_item.json index 94d93f6a61f..3c775cd6d9b 100644 --- a/erpnext/buying/doctype/supplier_quotation_item/supplier_quotation_item.json +++ b/erpnext/buying/doctype/supplier_quotation_item/supplier_quotation_item.json @@ -848,7 +848,7 @@ "oldfieldtype": "Currency", "options": "Company:company:default_currency", "permlevel": 0, - "precision": "2", + "precision": "", "print_hide": 1, "print_hide_if_no_value": 0, "print_width": "100px", @@ -1786,7 +1786,7 @@ "issingle": 0, "istable": 1, "max_attachments": 0, - "modified": "2019-01-07 16:52:02.125715", + "modified": "2019-02-18 18:58:10.351451", "modified_by": "Administrator", "module": "Buying", "name": "Supplier Quotation Item", diff --git a/erpnext/hr/doctype/salary_slip/salary_slip.json b/erpnext/hr/doctype/salary_slip/salary_slip.json index 76e43d6ea74..c9a5d87281a 100644 --- a/erpnext/hr/doctype/salary_slip/salary_slip.json +++ b/erpnext/hr/doctype/salary_slip/salary_slip.json @@ -195,7 +195,7 @@ "columns": 0, "fetch_from": "employee.branch", "fieldname": "branch", - "fieldtype": "Link", + "fieldtype": "Link", "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, @@ -208,11 +208,11 @@ "no_copy": 0, "oldfieldname": "branch", "oldfieldtype": "Link", - "options": "Branch", + "options": "Branch", "permlevel": 0, "print_hide": 0, "print_hide_if_no_value": 0, - "read_only": 1, + "read_only": 1, "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, @@ -901,7 +901,7 @@ "no_copy": 0, "options": "Company:company:default_currency", "permlevel": 0, - "precision": "2", + "precision": "", "print_hide": 0, "print_hide_if_no_value": 1, "read_only": 0, @@ -1906,7 +1906,7 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2019-02-12 11:24:20.848207", + "modified": "2019-02-18 18:54:36.161027", "modified_by": "Administrator", "module": "HR", "name": "Salary Slip", diff --git a/erpnext/hr/doctype/salary_slip_timesheet/salary_slip_timesheet.json b/erpnext/hr/doctype/salary_slip_timesheet/salary_slip_timesheet.json index 7a9393c332a..797f8f7c028 100644 --- a/erpnext/hr/doctype/salary_slip_timesheet/salary_slip_timesheet.json +++ b/erpnext/hr/doctype/salary_slip_timesheet/salary_slip_timesheet.json @@ -1,5 +1,7 @@ { "allow_copy": 0, + "allow_events_in_timeline": 0, + "allow_guest_to_view": 0, "allow_import": 0, "allow_rename": 0, "beta": 0, @@ -11,16 +13,21 @@ "editable_grid": 1, "fields": [ { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "time_sheet", "fieldtype": "Link", "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, + "in_standard_filter": 0, "label": "Time Sheet", "length": 0, "no_copy": 0, @@ -30,49 +37,58 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 1, "search_index": 0, "set_only_once": 0, + "translatable": 0, "unique": 0 }, { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "working_hours", "fieldtype": "Float", "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, + "in_standard_filter": 0, "label": "Working Hours", "length": 0, "no_copy": 1, "permlevel": 0, - "precision": "3", + "precision": "", "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, "set_only_once": 0, + "translatable": 0, "unique": 0 } ], + "has_web_view": 0, "hide_heading": 0, "hide_toolbar": 0, "idx": 0, "image_view": 0, "in_create": 0, - "is_submittable": 0, "issingle": 0, "istable": 1, "max_attachments": 0, - "modified": "2016-07-11 03:28:07.152366", + "modified": "2019-02-19 08:33:41.762144", "modified_by": "Administrator", "module": "HR", "name": "Salary Slip Timesheet", @@ -82,7 +98,10 @@ "quick_entry": 1, "read_only": 0, "read_only_onload": 0, + "show_name_in_global_search": 0, "sort_field": "modified", "sort_order": "DESC", - "track_seen": 0 + "track_changes": 0, + "track_seen": 0, + "track_views": 0 } \ No newline at end of file diff --git a/erpnext/hr/doctype/salary_structure/salary_structure.json b/erpnext/hr/doctype/salary_structure/salary_structure.json index ce8b64eb4dd..0e47278a3e1 100644 --- a/erpnext/hr/doctype/salary_structure/salary_structure.json +++ b/erpnext/hr/doctype/salary_structure/salary_structure.json @@ -1,5 +1,6 @@ { "allow_copy": 0, + "allow_events_in_timeline": 0, "allow_guest_to_view": 0, "allow_import": 1, "allow_rename": 1, @@ -365,7 +366,7 @@ "no_copy": 0, "options": "Company:company:default_currency", "permlevel": 0, - "precision": "2", + "precision": "", "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, @@ -950,7 +951,7 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2018-07-24 18:36:25.169098", + "modified": "2019-02-18 18:51:53.932518", "modified_by": "Administrator", "module": "HR", "name": "Salary Structure", diff --git a/erpnext/projects/doctype/timesheet_detail/timesheet_detail.json b/erpnext/projects/doctype/timesheet_detail/timesheet_detail.json index b1f737296d9..a9b3bfb06fb 100644 --- a/erpnext/projects/doctype/timesheet_detail/timesheet_detail.json +++ b/erpnext/projects/doctype/timesheet_detail/timesheet_detail.json @@ -1,5 +1,6 @@ { "allow_copy": 0, + "allow_events_in_timeline": 0, "allow_guest_to_view": 0, "allow_import": 0, "allow_rename": 0, @@ -13,6 +14,7 @@ "fields": [ { "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -44,6 +46,7 @@ }, { "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -75,6 +78,7 @@ }, { "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -105,6 +109,7 @@ }, { "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -136,6 +141,7 @@ }, { "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -166,6 +172,7 @@ }, { "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -197,6 +204,7 @@ }, { "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -230,6 +238,7 @@ }, { "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -260,6 +269,7 @@ }, { "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -278,7 +288,7 @@ "length": 0, "no_copy": 0, "permlevel": 0, - "precision": "2", + "precision": "", "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, @@ -292,6 +302,7 @@ }, { "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -325,6 +336,7 @@ }, { "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -355,6 +367,7 @@ }, { "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -388,6 +401,7 @@ }, { "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -420,6 +434,7 @@ }, { "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -450,6 +465,7 @@ }, { "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -482,6 +498,7 @@ }, { "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -512,6 +529,7 @@ }, { "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -545,6 +563,7 @@ }, { "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -575,6 +594,7 @@ }, { "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, "allow_on_submit": 1, "bold": 0, "collapsible": 0, @@ -607,6 +627,7 @@ }, { "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -637,6 +658,7 @@ }, { "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, "allow_on_submit": 1, "bold": 0, "collapsible": 0, @@ -669,6 +691,7 @@ }, { "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -700,6 +723,7 @@ }, { "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -718,7 +742,7 @@ "length": 0, "no_copy": 0, "permlevel": 1, - "precision": "2", + "precision": "", "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, @@ -732,6 +756,7 @@ }, { "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, "allow_on_submit": 1, "bold": 0, "collapsible": 0, @@ -752,7 +777,7 @@ "length": 0, "no_copy": 0, "permlevel": 1, - "precision": "2", + "precision": "", "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 1, @@ -766,6 +791,7 @@ }, { "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -796,6 +822,7 @@ }, { "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -827,6 +854,7 @@ }, { "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, "allow_on_submit": 1, "bold": 0, "collapsible": 0, @@ -860,6 +888,7 @@ }, { "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -891,6 +920,7 @@ }, { "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, "allow_on_submit": 1, "bold": 0, "collapsible": 0, @@ -932,7 +962,7 @@ "issingle": 0, "istable": 1, "max_attachments": 0, - "modified": "2018-05-07 15:12:31.510813", + "modified": "2019-02-18 18:55:53.190526", "modified_by": "Administrator", "module": "Projects", "name": "Timesheet Detail", @@ -944,5 +974,6 @@ "show_name_in_global_search": 0, "sort_order": "ASC", "track_changes": 0, - "track_seen": 0 + "track_seen": 0, + "track_views": 0 } \ No newline at end of file diff --git a/erpnext/selling/doctype/quotation_item/quotation_item.json b/erpnext/selling/doctype/quotation_item/quotation_item.json index 3a8b0df5c59..24cb405657e 100644 --- a/erpnext/selling/doctype/quotation_item/quotation_item.json +++ b/erpnext/selling/doctype/quotation_item/quotation_item.json @@ -762,7 +762,7 @@ "no_copy": 0, "options": "currency", "permlevel": 0, - "precision": "2", + "precision": "", "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 1, @@ -1914,7 +1914,7 @@ "istable": 1, "max_attachments": 0, "menu_index": 0, - "modified": "2019-01-07 16:51:56.248107", + "modified": "2019-02-18 18:57:25.277633", "modified_by": "Administrator", "module": "Selling", "name": "Quotation Item", diff --git a/erpnext/selling/doctype/sales_order_item/sales_order_item.json b/erpnext/selling/doctype/sales_order_item/sales_order_item.json index 19065dfa375..5ca2f818642 100644 --- a/erpnext/selling/doctype/sales_order_item/sales_order_item.json +++ b/erpnext/selling/doctype/sales_order_item/sales_order_item.json @@ -961,7 +961,7 @@ "no_copy": 0, "options": "Company:company:default_currency", "permlevel": 0, - "precision": "2", + "precision": "", "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 1, @@ -2477,7 +2477,7 @@ "istable": 1, "max_attachments": 0, "menu_index": 0, - "modified": "2019-01-07 16:51:51.852343", + "modified": "2019-02-18 18:53:23.425126", "modified_by": "Administrator", "module": "Selling", "name": "Sales Order Item", diff --git a/erpnext/stock/doctype/delivery_note_item/delivery_note_item.json b/erpnext/stock/doctype/delivery_note_item/delivery_note_item.json index 9fe741a11e2..1e73d68fef7 100644 --- a/erpnext/stock/doctype/delivery_note_item/delivery_note_item.json +++ b/erpnext/stock/doctype/delivery_note_item/delivery_note_item.json @@ -793,7 +793,7 @@ "no_copy": 0, "options": "currency", "permlevel": 0, - "precision": "2", + "precision": "", "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 1, @@ -928,7 +928,7 @@ "no_copy": 0, "options": "Company:company:default_currency", "permlevel": 0, - "precision": "2", + "precision": "", "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 1, @@ -2310,7 +2310,7 @@ "issingle": 0, "istable": 1, "max_attachments": 0, - "modified": "2019-01-07 16:51:53.322875", + "modified": "2019-02-18 18:58:51.342901", "modified_by": "Administrator", "module": "Stock", "name": "Delivery Note Item", From a4aa80fe0538830516576e2c116bdb900a938b78 Mon Sep 17 00:00:00 2001 From: Gaurav Date: Sun, 6 Jan 2019 12:40:28 +0530 Subject: [PATCH 167/169] feature(regional): Italian Localization Added setup.py for italy under regional Included fiscal regimes, tax exemption reasons and custom fields Issue #16259 --- erpnext/regional/italy/__init__.py | 32 ++++++++++++++++++++++++++ erpnext/regional/italy/setup.py | 37 ++++++++++++++++++++++++++++++ 2 files changed, 69 insertions(+) create mode 100644 erpnext/regional/italy/__init__.py create mode 100644 erpnext/regional/italy/setup.py diff --git a/erpnext/regional/italy/__init__.py b/erpnext/regional/italy/__init__.py new file mode 100644 index 00000000000..d7dbddce951 --- /dev/null +++ b/erpnext/regional/italy/__init__.py @@ -0,0 +1,32 @@ +# coding=utf-8 + +fiscal_regimes = [ + "RF01-Ordinario", + "RF02-Contribuenti minimi (art.1, c.96-117, L. 244/07)", + "RF04-Agricoltura e attività connesse e pesca (artt.34 e 34-bis, DPR 633/72)", + "RF05-Vendita sali e tabacchi (art.74, c.1, DPR. 633/72)", + "RF06-Commercio fiammiferi (art.74, c.1, DPR 633/72)", + "RF07-Editoria (art.74, c.1, DPR 633/72)", + "RF08-Gestione servizi telefonia pubblica (art.74, c.1, DPR 633/72)", + "RF09-Rivendita documenti di trasporto pubblico e di sosta (art.74, c.1, DPR 633/72)", + "RF10-Intrattenimenti, giochi e altre attività di cui alla tariffa allegata al DPR 640/72 (art.74, c.6, DPR 633/72)", + "RF11-Agenzie viaggi e turismo (art.74-ter, DPR 633/72)", + "RF12-Agriturismo (art.5, c.2, L. 413/91)", + "RF13-Vendite a domicilio (art.25-bis, c.6, DPR 600/73)", + "RF14-Rivendita beni usati, oggetti d’arte, d’antiquariato o da collezione (art.36, DL 41/95)", + "RF15-Agenzie di vendite all’asta di oggetti d’arte, antiquariato o da collezione (art.40-bis, DL 41/95)", + "RF16-IVA per cassa P.A. (art.6, c.5, DPR 633/72)", + "RF17-IVA per cassa (art. 32-bis, DL 83/2012)", + "RF18-Altro", + "RF19-Regime forfettario (art.1, c.54-89, L. 190/2014)" +] + +tax_exemption_reasons = [ + "N1-Escluse ex art. 15", + "N2-Non Soggette", + "N3-Non Imponibili", + "N4-Esenti", + "N5-Regime del margine / IVA non esposta in fattura", + "N6-Inversione Contabile", + "N7-IVA assolta in altro stato UE" +] diff --git a/erpnext/regional/italy/setup.py b/erpnext/regional/italy/setup.py new file mode 100644 index 00000000000..1931fdc581c --- /dev/null +++ b/erpnext/regional/italy/setup.py @@ -0,0 +1,37 @@ +# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors +# License: GNU General Public License v3. See license.txt +# coding=utf-8 + +from __future__ import unicode_literals + +import frappe +from frappe.custom.doctype.custom_field.custom_field import create_custom_fields +from erpnext.regional.italy import fiscal_regimes, tax_exemption_reasons + +def setup(company=None, patch=True): + make_custom_fields() + +def make_custom_fields(update=True): + fiscal_code_field = dict(fieldname='fiscal_code', label='Fiscal Code', fieldtype='Data', insert_after='tax_id', print_hide=1) + custom_fields = { + 'Company': [ + fiscal_code_field, + dict(fieldname='fiscal_regime', label='Fiscal Regime', + fieldtype='Select', insert_after='fiscal_code', print_hide=1, + options="\n".join(map(lambda x: x.decode('utf-8'), fiscal_regimes))) + ], + 'Customer': [ + fiscal_code_field, + dict(fieldname='recipient_code', label='Recipient Code', + fieldtype='Data', insert_after='fiscal_code', print_hide=1, default="0000000"), + dict(fieldname='pec', label='Recipient PEC', + fieldtype='Data', insert_after='fiscal_code', print_hide=1) + ], + 'Sales Taxes and Charges': [ + dict(fieldname='tax_exemption_reason', label='Tax Exemption Reason', + fieldtype='Select', insert_after='included_in_print_rate', print_hide=1, + options="\n".join(map(lambda x: x.decode('utf-8'), tax_exemption_reasons))) + ] + } + + create_custom_fields(custom_fields, ignore_validate = frappe.flags.in_patch, update=update) From f1e28e0e8dea00f92832022279cad20b5f0392ee Mon Sep 17 00:00:00 2001 From: Gaurav Date: Wed, 13 Feb 2019 16:46:24 +0530 Subject: [PATCH 168/169] mod(regional,italy): Updates to Italian Localization fixes: removed cleanup_files from italy/utils removed extract_doc_number from italy/utils added country filter to italian localization patch replaced dict assignment with dot operator in prepare_invoice correcions in e-invoice xml following changes in prepare_invoice added setup_report in patch added section for e-invoicing custom fields in company added Italy in test_company --- .../doctype/sales_invoice/sales_invoice.py | 5 + erpnext/controllers/accounts_controller.py | 14 + erpnext/hooks.py | 6 + erpnext/patches.txt | 3 +- .../v11_0/make_italian_localization_fields.py | 14 + erpnext/regional/italy/__init__.py | 31 +++ erpnext/regional/italy/e-invoice.xml | 208 +++++++++++++++ erpnext/regional/italy/setup.py | 147 +++++++++- erpnext/regional/italy/utils.py | 251 ++++++++++++++++++ .../electronic_invoice_register/__init__.py | 0 .../electronic_invoice_register.js | 53 ++++ .../electronic_invoice_register.json | 21 ++ .../electronic_invoice_register.py | 8 + erpnext/setup/doctype/company/test_company.py | 2 +- 14 files changed, 747 insertions(+), 16 deletions(-) create mode 100644 erpnext/patches/v11_0/make_italian_localization_fields.py create mode 100644 erpnext/regional/italy/e-invoice.xml create mode 100644 erpnext/regional/italy/utils.py create mode 100644 erpnext/regional/report/electronic_invoice_register/__init__.py create mode 100644 erpnext/regional/report/electronic_invoice_register/electronic_invoice_register.js create mode 100644 erpnext/regional/report/electronic_invoice_register/electronic_invoice_register.json create mode 100644 erpnext/regional/report/electronic_invoice_register/electronic_invoice_register.py diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index 895ca07da2f..abd201f5c70 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -24,6 +24,7 @@ from erpnext.accounts.general_ledger import get_round_off_account_and_cost_cente from erpnext.accounts.doctype.loyalty_program.loyalty_program import \ get_loyalty_program_details_with_points, get_loyalty_details, validate_loyalty_points from erpnext.accounts.deferred_revenue import validate_service_stop_date +from erpnext.controllers.accounts_controller import on_submit_regional, on_cancel_regional from erpnext.healthcare.utils import manage_invoice_submit_cancel @@ -198,6 +199,8 @@ class SalesInvoice(SellingController): if "Healthcare" in active_domains: manage_invoice_submit_cancel(self, "on_submit") + on_submit_regional(self) + def validate_pos_paid_amount(self): if len(self.payments) == 0 and self.is_pos: frappe.throw(_("At least one mode of payment is required for POS invoice.")) @@ -253,6 +256,8 @@ class SalesInvoice(SellingController): if "Healthcare" in active_domains: manage_invoice_submit_cancel(self, "on_cancel") + on_cancel_regional(self) + def update_status_updater_args(self): if cint(self.update_stock): self.status_updater.extend([{ diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index 0ba47edfc1e..5a765aa273e 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -94,6 +94,8 @@ class AccountsController(TransactionBase): if self.is_return: self.validate_qty() + validate_regional(self) + def validate_invoice_documents_schedule(self): self.validate_payment_schedule_dates() self.set_due_date() @@ -1132,3 +1134,15 @@ def update_child_qty_rate(parent_doctype, trans_items, parent_doctype_name): p_doctype.update_blanket_order() p_doctype.update_billing_percentage() p_doctype.set_status() + +@erpnext.allow_regional +def validate_regional(doc): + pass + +@erpnext.allow_regional +def on_submit_regional(doc): + pass + +@erpnext.allow_regional +def on_cancel_regional(doc): + pass diff --git a/erpnext/hooks.py b/erpnext/hooks.py index 7d77f90afae..2a871f0bc63 100644 --- a/erpnext/hooks.py +++ b/erpnext/hooks.py @@ -301,5 +301,11 @@ regional_overrides = { }, 'Saudi Arabia': { 'erpnext.controllers.taxes_and_totals.update_itemised_tax_data': 'erpnext.regional.united_arab_emirates.utils.update_itemised_tax_data' + }, + 'Italy': { + 'erpnext.controllers.taxes_and_totals.update_itemised_tax_data': 'erpnext.regional.italy.utils.update_itemised_tax_data', + 'erpnext.controllers.accounts_controller.validate_regional': 'erpnext.regional.italy.utils.sales_invoice_validate', + 'erpnext.controllers.accounts_controller.on_submit_regional': 'erpnext.regional.italy.utils.sales_invoice_on_submit', + 'erpnext.controllers.accounts_controller.on_cancel_regional': 'erpnext.regional.italy.utils.sales_invoice_on_cancel' } } diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 2199491a714..45ee8dc2d76 100755 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -585,4 +585,5 @@ erpnext.patches.v11_0.renamed_from_to_fields_in_project erpnext.patches.v11_0.add_permissions_in_gst_settings erpnext.patches.v11_1.setup_guardian_role execute:frappe.delete_doc('DocType', 'Notification Control') -erpnext.patches.v10_0.item_barcode_childtable_migrate # 16-02-2019 \ No newline at end of file +erpnext.patches.v10_0.item_barcode_childtable_migrate # 16-02-2019 +erpnext.patches.v11_0.make_italian_localization_fields diff --git a/erpnext/patches/v11_0/make_italian_localization_fields.py b/erpnext/patches/v11_0/make_italian_localization_fields.py new file mode 100644 index 00000000000..b0b5ef159b6 --- /dev/null +++ b/erpnext/patches/v11_0/make_italian_localization_fields.py @@ -0,0 +1,14 @@ +# Copyright (c) 2017, Frappe and Contributors +# License: GNU General Public License v3. See license.txt + +from __future__ import unicode_literals +from erpnext.regional.italy.setup import make_custom_fields, setup_report +import frappe + +def execute(): + company = frappe.get_all('Company', filters = {'country': 'Italy'}) + if not company: + return + + make_custom_fields() + setup_report() diff --git a/erpnext/regional/italy/__init__.py b/erpnext/regional/italy/__init__.py index d7dbddce951..22bf84e4d07 100644 --- a/erpnext/regional/italy/__init__.py +++ b/erpnext/regional/italy/__init__.py @@ -30,3 +30,34 @@ tax_exemption_reasons = [ "N6-Inversione Contabile", "N7-IVA assolta in altro stato UE" ] + +mode_of_payment_codes = [ + "MP01-Contanti", + "MP02-Assegno", + "MP03-Assegno circolare", + "MP04-Contanti presso Tesoreria", + "MP05-Bonifico", + "MP06-Vaglia cambiario", + "MP07-Bollettino bancario", + "MP08-Carta di pagamento", + "MP09-RID", + "MP10-RID utenze", + "MP11-RID veloce", + "MP12-RIBA", + "MP13-MAV", + "MP14-Quietanza erario", + "MP15-Giroconto su conti di contabilità speciale", + "MP16-Domiciliazione bancaria", + "MP17-Domiciliazione postale", + "MP18-Bollettino di c/c postale", + "MP19-SEPA Direct Debit", + "MP20-SEPA Direct Debit CORE", + "MP21-SEPA Direct Debit B2B", + "MP22-Trattenuta su somme già riscosse" +] + +vat_collectability_options = [ + "I-Immediata", + "D-Differita", + "S-Scissione dei Pagamenti" +] diff --git a/erpnext/regional/italy/e-invoice.xml b/erpnext/regional/italy/e-invoice.xml new file mode 100644 index 00000000000..84b7fffbbc3 --- /dev/null +++ b/erpnext/regional/italy/e-invoice.xml @@ -0,0 +1,208 @@ +{%- macro format_float(value) -%} +{{ "%.2f" % value|abs }} +{%- endmacro -%} + +{%- macro render_address(address) %} +{{ address.address_line1 }} +{{ address.pincode }} +{{ address.city }} +{%- if address.state %} +{{ address.state }} +{%- endif %} +{{ address.country_code|upper }} +{%- endmacro %} + +{%- macro render_discount_or_margin(item) -%} +{%- if item.discount_percentage > 0.0 or item.margin_type %} + + {%- if item.discount_percentage > 0.0 %} + SC + {{ format_float(item.discount_percentage) }} + {%- endif %} + {%- if item.margin_rate_or_amount > 0.0 -%} + MG + {%- if item.margin_type == "Percentage" -%} + {{ format_float(item.margin_rate_or_amount) }} + {%- elif item.margin_type == "Amount" -%} + {{ format_float(item.margin_rate_or_amount) }} + {%- endif -%} + {%- endif %} + +{%- endif -%} +{%- endmacro -%} + + + + + + + {{ doc.company_address_data.country_code|upper or "IT" }} + {{ doc.company_fiscal_code or doc.company_tax_id | replace("IT","") }} + + {{ doc.progressive_number }} + {{ doc.transmission_format_code }} + {{ doc.customer_data.recipient_code }} + {% if doc.company_data.phone or doc.company_data.email -%} + + {% if doc.company_data.phone -%}{{ doc.company_data.phone }}{%- endif %} + {% if doc.company_data.email -%}{{ doc.company_data.email }}{%- endif %} + + {% endif -%} + + + + + {{ doc.company_address_data.country_code|upper or "IT"}} + {{ doc.company_tax_id | replace("IT","") }} + + {%- if doc.company_fiscal_code %} + {{ doc.company_fiscal_code }} + {%- endif %} + + {{ doc.company }} + + {{ doc.company_fiscal_regime.split("-")[0] }} + + + {{ render_address(doc.company_address_data) }} + + {%- if doc.company_data.registration_number %} + + {{ doc.company_data.registrar_office_province }} + {{ doc.company_data.registration_number }} + {%- if doc.company_data.share_capital_amount %} + {{ format_float(doc.company_data.share_capital_amount) }} + {%- endif %} + {%- if doc.company_data.no_of_members %} + {{ doc.company_data.no_of_members.split("-")[0] }} + {%- endif %} + {%- if doc.company_data.liquidation_state %} + {{ doc.company_data.liquidation_state.split("-")[0] }} + {%- endif %} + + {%- endif %} + + + + {%- if doc.customer_data.customer_type == "Individual" %} + {{ doc.customer_data.fiscal_code }} + + {{ doc.customer_data.first_name }} + {{ doc.customer_data.last_name }} + + {%- else %} + {%- if doc.customer_data.is_public_administration %} + {{ doc.customer_data.fiscal_code }} + {%- else %} + + {{ doc.customer_address_data.country_code|upper or "IT" }} + {{ doc.tax_id | replace("IT","") }} + + {%- endif %} + + {{ doc.customer_name }} + + {%- endif %} + + {%- if doc.customer_address_data %} + + {{ render_address(doc.customer_address_data) }} + + {%- endif %} + + + + + + {{ doc.type_of_document }} + EUR + {{ doc.posting_date }} + {{ doc.unamended_name }} + {%- if doc.stamp_duty %} + + SI + {{ format_float(doc.stamp_duty) }} + + {%- endif %} + {{ format_float(doc.grand_total) }} + VENDITA + + {%- if doc.po_no %} + + {{ doc.po_no }} + {%- if doc.po_date %} + {{ doc.po_date }} + {%- endif %} + + {%- endif %} + {%- if doc.is_return and doc.return_against_unamended %} + + {{ doc.return_against_unamended }} + + {%- endif %} + {%- if doc.shipping_address_data %} + + + {{ render_address(doc.shipping_address_data) }} + + + {%- endif %} + + + {%- for item in doc.items %} + + {{ item.idx }} + + CODICE + {{ item.item_code }} + + {{ item.description or item.item_name }} + {{ format_float(item.qty) }} + {{ item.stock_uom }} + {{ format_float(item.price_list_rate or item.rate) }} + {{ render_discount_or_margin(item) }} + {{ format_float(item.amount) }} + {{ format_float(item.tax_rate) }} + {%- if item.tax_exemption_reason %} + {{ item.tax_exemption_reason.split("-")[0] }} + {%- endif %} + + {%- endfor %} + {%- for tax, data in doc.tax_data.items() %} + + {{ format_float(tax|flt) }} + {%- if data.tax_exemption_reason %} + {{ data.tax_exemption_reason.split("-")[0] }} + {%- endif %} + {{ format_float(data.taxable_amount) }} + {{ format_float(data.tax_amount) }} + {{ doc.vat_collectability.split("-")[0] }} + {%- if data.tax_exemption_law %} + {{ data.tax_exemption_law }} + {%- endif %} + + {%- endfor %} + + {%- if doc.payment_schedule %} + + {%- if payment_schedule|length > 1 %} + TP01 + {%- else %} + TP02 + {%- endif %} + {%- for payment_term in doc.payment_schedule %} + + {{ payment_term.mode_of_payment_code.split("-")[0] }} + {{ payment_term.due_date }} + {{ format_float(payment_term.payment_amount) }} + {%- if payment_term.bank_account_iban %}{{ payment_term.bank_account_iban }}{%- endif %} + + {%- endfor %} + + {%- endif %} + + diff --git a/erpnext/regional/italy/setup.py b/erpnext/regional/italy/setup.py index 1931fdc581c..b4ab26f9c73 100644 --- a/erpnext/regional/italy/setup.py +++ b/erpnext/regional/italy/setup.py @@ -5,33 +5,152 @@ from __future__ import unicode_literals import frappe +from frappe import _ from frappe.custom.doctype.custom_field.custom_field import create_custom_fields -from erpnext.regional.italy import fiscal_regimes, tax_exemption_reasons +from erpnext.regional.italy import fiscal_regimes, tax_exemption_reasons, mode_of_payment_codes, vat_collectability_options def setup(company=None, patch=True): - make_custom_fields() + make_custom_fields() + setup_report() def make_custom_fields(update=True): - fiscal_code_field = dict(fieldname='fiscal_code', label='Fiscal Code', fieldtype='Data', insert_after='tax_id', print_hide=1) + invoice_item_fields = [ + dict(fieldname='tax_rate', label='Tax Rate', + fieldtype='Float', insert_after='description', + print_hide=1, hidden=1, read_only=1), + dict(fieldname='tax_amount', label='Tax Amount', + fieldtype='Currency', insert_after='tax_rate', + print_hide=1, hidden=1, read_only=1, options="currency"), + dict(fieldname='total_amount', label='Total Amount', + fieldtype='Currency', insert_after='tax_amount', + print_hide=1, hidden=1, read_only=1, options="currency") + ] + custom_fields = { 'Company': [ - fiscal_code_field, + dict(fieldname='sb_e_invoicing', label='E-Invoicing', + fieldtype='Section Break', insert_after='date_of_establishment', print_hide=1), dict(fieldname='fiscal_regime', label='Fiscal Regime', - fieldtype='Select', insert_after='fiscal_code', print_hide=1, - options="\n".join(map(lambda x: x.decode('utf-8'), fiscal_regimes))) - ], - 'Customer': [ - fiscal_code_field, - dict(fieldname='recipient_code', label='Recipient Code', - fieldtype='Data', insert_after='fiscal_code', print_hide=1, default="0000000"), - dict(fieldname='pec', label='Recipient PEC', - fieldtype='Data', insert_after='fiscal_code', print_hide=1) + fieldtype='Select', insert_after='sb_e_invoicing', print_hide=1, + options="\n".join(map(lambda x: x.decode('utf-8'), fiscal_regimes))), + dict(fieldname='fiscal_code', label='Fiscal Code', fieldtype='Data', insert_after='fiscal_regime', print_hide=1, + description=_("Applicable if the company is an Individual or a Proprietorship")), + dict(fieldname='vat_collectability', label='VAT Collectability', + fieldtype='Select', insert_after='fiscal_code', print_hide=1, + options="\n".join(map(lambda x: x.decode('utf-8'), vat_collectability_options))), + dict(fieldname='cb_e_invoicing1', fieldtype='Column Break', insert_after='vat_collectability', print_hide=1), + dict(fieldname='registrar_office_province', label='Province of the Registrar Office', + fieldtype='Data', insert_after='cb_e_invoicing1', print_hide=1, length=2), + dict(fieldname='registration_number', label='Registration Number', + fieldtype='Data', insert_after='registrar_office_province', print_hide=1, length=20), + dict(fieldname='share_capital_amount', label='Share Capital', + fieldtype='Currency', insert_after='registration_number', print_hide=1, + description=_('Applicable if the company is SpA, SApA or SRL')), + dict(fieldname='no_of_members', label='No of Members', + fieldtype='Select', insert_after='share_capital_amount', print_hide=1, + options="\nSU-Socio Unico\nSM-Piu Soci", description=_("Applicable if the company is a limited liability company")), + dict(fieldname='liquidation_state', label='Liquidation State', + fieldtype='Select', insert_after='no_of_members', print_hide=1, + options="\nLS-In Liquidazione\nLN-Non in Liquidazione") ], 'Sales Taxes and Charges': [ dict(fieldname='tax_exemption_reason', label='Tax Exemption Reason', + fieldtype='Select', insert_after='included_in_print_rate', print_hide=1, + depends_on='eval:doc.charge_type!="Actual" && doc.rate==0.0', + options="\n" + "\n".join(map(lambda x: x.decode('utf-8'), tax_exemption_reasons))), + dict(fieldname='tax_exemption_law', label='Tax Exempt Under', + fieldtype='Text', insert_after='tax_exemption_reason', print_hide=1, + depends_on='eval:doc.charge_type!="Actual" && doc.rate==0.0') + ], + 'Customer': [ + dict(fieldname='fiscal_code', label='Fiscal Code', fieldtype='Data', insert_after='tax_id', print_hide=1), + dict(fieldname='recipient_code', label='Recipient Code', + fieldtype='Data', insert_after='fiscal_code', print_hide=1, default="0000000"), + dict(fieldname='pec', label='Recipient PEC', + fieldtype='Data', insert_after='fiscal_code', print_hide=1), + dict(fieldname='is_public_administration', label='Is Public Administration', + fieldtype='Check', insert_after='is_internal_customer', print_hide=1, + description=_("Set this if the customer is a Public Administration company."), + depends_on='eval:doc.customer_type=="Company"'), + dict(fieldname='first_name', label='First Name', fieldtype='Data', + insert_after='salutation', print_hide=1, depends_on='eval:doc.customer_type!="Company"'), + dict(fieldname='last_name', label='Last Name', fieldtype='Data', + insert_after='first_name', print_hide=1, depends_on='eval:doc.customer_type!="Company"') + ], + 'Mode of Payment': [ + dict(fieldname='mode_of_payment_code', label='Code', fieldtype='Select', insert_after='included_in_print_rate', print_hide=1, - options="\n".join(map(lambda x: x.decode('utf-8'), tax_exemption_reasons))) + options="\n".join(map(lambda x: x.decode('utf-8'), mode_of_payment_codes))) + ], + 'Payment Schedule': [ + dict(fieldname='mode_of_payment_code', label='Code', + fieldtype='Select', insert_after='mode_of_payment', print_hide=1, + options="\n".join(map(lambda x: x.decode('utf-8'), mode_of_payment_codes)), + fetch_from="mode_of_payment.mode_of_payment_code", read_only=1), + dict(fieldname='bank_account', label='Bank Account', + fieldtype='Link', insert_after='mode_of_payment_code', print_hide=1, + options="Bank Account"), + dict(fieldname='bank_account_name', label='Bank Account Name', + fieldtype='Data', insert_after='bank_account', print_hide=1, + fetch_from="bank_account.account_name", read_only=1), + dict(fieldname='bank_account_no', label='Bank Account No', + fieldtype='Data', insert_after='bank_account_name', print_hide=1, + fetch_from="bank_account.bank_account_no", read_only=1), + dict(fieldname='bank_account_iban', label='IBAN', + fieldtype='Data', insert_after='bank_account_name', print_hide=1, + fetch_from="bank_account.iban", read_only=1), + ], + "Sales Invoice": [ + dict(fieldname='vat_collectability', label='VAT Collectability', + fieldtype='Select', insert_after='taxes_and_charges', print_hide=1, + options="\n".join(map(lambda x: x.decode('utf-8'), vat_collectability_options)), + fetch_from="company.vat_collectability"), + dict(fieldname='sb_e_invoicing_reference', label='E-Invoicing', + fieldtype='Section Break', insert_after='pos_total_qty', print_hide=1), + dict(fieldname='company_tax_id', label='Company Tax ID', + fieldtype='Data', insert_after='sb_e_invoicing_reference', print_hide=1, read_only=1, + fetch_from="company.tax_id"), + dict(fieldname='company_fiscal_code', label='Company Fiscal Code', + fieldtype='Data', insert_after='company_tax_id', print_hide=1, read_only=1, + fetch_from="company.fiscal_code"), + dict(fieldname='company_fiscal_regime', label='Company Fiscal Regime', + fieldtype='Data', insert_after='company_fiscal_code', print_hide=1, read_only=1, + fetch_from="company.fiscal_regime"), + dict(fieldname='cb_e_invoicing_reference', fieldtype='Column Break', + insert_after='company_fiscal_regime', print_hide=1), + dict(fieldname='customer_fiscal_code', label='Customer Fiscal Code', + fieldtype='Data', insert_after='cb_e_invoicing_reference', read_only=1, + fetch_from="customer.fiscal_code"), + ], + 'Purchase Invoice Item': invoice_item_fields, + 'Sales Order Item': invoice_item_fields, + 'Delivery Note Item': invoice_item_fields, + 'Sales Invoice Item': invoice_item_fields, + 'Quotation Item': invoice_item_fields, + 'Purchase Order Item': invoice_item_fields, + 'Purchase Receipt Item': invoice_item_fields, + 'Supplier Quotation Item': invoice_item_fields, + 'Address': [ + dict(fieldname='country_code', label='Country Code', + fieldtype='Data', insert_after='country', print_hide=1, read_only=1, + fetch_from="country.code") ] } create_custom_fields(custom_fields, ignore_validate = frappe.flags.in_patch, update=update) + +def setup_report(): + report_name = 'Electronic Invoice Register' + + frappe.db.sql(""" update `tabReport` set disabled = 0 where + name = %s """, report_name) + + if not frappe.db.get_value('Custom Role', dict(report=report_name)): + frappe.get_doc(dict( + doctype='Custom Role', + report=report_name, + roles= [ + dict(role='Accounts User'), + dict(role='Accounts Manager') + ] + )).insert() diff --git a/erpnext/regional/italy/utils.py b/erpnext/regional/italy/utils.py new file mode 100644 index 00000000000..69f7b464c95 --- /dev/null +++ b/erpnext/regional/italy/utils.py @@ -0,0 +1,251 @@ +import frappe, json, os +from frappe.utils import flt +from erpnext.controllers.taxes_and_totals import get_itemised_tax +from frappe import _ +from frappe.utils.file_manager import save_file, remove_file +from frappe.desk.form.load import get_attachments + + +def update_itemised_tax_data(doc): + if not doc.taxes: return + + itemised_tax = get_itemised_tax(doc.taxes) + + for row in doc.items: + tax_rate = 0.0 + if itemised_tax.get(row.item_code): + tax_rate = sum([tax.get('tax_rate', 0) for d, tax in itemised_tax.get(row.item_code).items()]) + + row.tax_rate = flt(tax_rate, row.precision("tax_rate")) + row.tax_amount = flt((row.net_amount * tax_rate) / 100, row.precision("net_amount")) + row.total_amount = flt((row.net_amount + row.tax_amount), row.precision("total_amount")) + +@frappe.whitelist() +def export_invoices(filters=None): + saved_xmls = [] + + invoices = frappe.get_all("Sales Invoice", filters=get_conditions(filters), fields=["*"]) + + for invoice in invoices: + attachments = get_e_invoice_attachments(invoice) + saved_xmls += [attachment.file_name for attachment in attachments] + + zip_filename = "{0}-einvoices.zip".format(frappe.utils.get_datetime().strftime("%Y%m%d_%H%M%S")) + + download_zip(saved_xmls, zip_filename) + + +@frappe.whitelist() +def prepare_invoice(invoice, progressive_number): + #set company information + company = frappe.get_doc("Company", invoice.company) + + invoice.progressive_number = progressive_number + invoice.unamended_name = get_unamended_name(invoice) + invoice.company_data = company + company_address = frappe.get_doc("Address", invoice.company_address) + invoice.company_address_data = company_address + + #Set invoice type + if invoice.is_return and invoice.return_against: + invoice.type_of_document = "TD04" #Credit Note (Nota di Credito) + invoice.return_against_unamended = get_unamended_name(frappe.get_doc("Sales Invoice", invoice.return_against)) + else: + invoice.type_of_document = "TD01" #Sales Invoice (Fattura) + + #set customer information + invoice.customer_data = frappe.get_doc("Customer", invoice.customer) + customer_address = frappe.get_doc("Address", invoice.customer_address) + invoice.customer_address_data = customer_address + + if invoice.shipping_address_name: + invoice.shipping_address_data = frappe.get_doc("Address", invoice.shipping_address_name) + + if invoice.customer_data.is_public_administration: + invoice.transmission_format_code = "FPA12" + else: + invoice.transmission_format_code = "FPR12" + + tax_data = get_invoice_summary(invoice.items, invoice.taxes) + invoice.tax_data = tax_data + + #Check if stamp duty (Bollo) of 2 EUR exists. + stamp_duty_charge_row = next((tax for tax in invoice.taxes if tax.charge_type == _("Actual") and tax.tax_amount == 2.0 ), None) + if stamp_duty_charge_row: + invoice.stamp_duty = stamp_duty_charge_row.tax_amount + + for item in invoice.items: + if item.tax_rate == 0.0: + item.tax_exemption_reason = tax_data["0.0"]["tax_exemption_reason"] + + return invoice + +def get_conditions(filters): + filters = json.loads(filters) + + conditions = {"docstatus": 1} + + if filters.get("company"): conditions["company"] = filters["company"] + if filters.get("customer"): conditions["customer"] = filters["customer"] + + if filters.get("from_date"): conditions["posting_date"] = (">=", filters["from_date"]) + if filters.get("to_date"): conditions["posting_date"] = ("<=", filters["to_date"]) + + if filters.get("from_date") and filters.get("to_date"): + conditions["posting_date"] = ("between", [filters.get("from_date"), filters.get("to_date")]) + + return conditions + +#TODO: Use function from frappe once PR #6853 is merged. +def download_zip(files, output_filename): + from zipfile import ZipFile + + input_files = [frappe.get_site_path('private', 'files', filename) for filename in files] + output_path = frappe.get_site_path('private', 'files', output_filename) + + with ZipFile(output_path, 'w') as output_zip: + for input_file in input_files: + output_zip.write(input_file, arcname=os.path.basename(input_file)) + + with open(output_path, 'rb') as fileobj: + filedata = fileobj.read() + + frappe.local.response.filename = output_filename + frappe.local.response.filecontent = filedata + frappe.local.response.type = "download" + +def get_invoice_summary(items, taxes): + summary_data = frappe._dict() + for tax in taxes: + #Include only VAT charges. + if tax.charge_type == "Actual": + continue + + #Check item tax rates if tax rate is zero. + if tax.rate == 0: + for item in items: + item_tax_rate = json.loads(item.item_tax_rate) + if tax.account_head in item_tax_rate: + key = str(item_tax_rate[tax.account_head]) + summary_data.setdefault(key, {"tax_amount": 0.0, "taxable_amount": 0.0, "tax_exemption_reason": "", "tax_exemption_law": ""}) + summary_data[key]["tax_amount"] += item.tax_amount + summary_data[key]["taxable_amount"] += item.net_amount + if key == "0.0": + summary_data[key]["tax_exemption_reason"] = tax.tax_exemption_reason + summary_data[key]["tax_exemption_law"] = tax.tax_exemption_law + + if summary_data == {}: #Implies that Zero VAT has not been set on any item. + summary_data.setdefault("0.0", {"tax_amount": 0.0, "taxable_amount": tax.total, + "tax_exemption_reason": tax.tax_exemption_reason, "tax_exemption_law": tax.tax_exemption_law}) + + else: + item_wise_tax_detail = json.loads(tax.item_wise_tax_detail) + for rate_item in [tax_item for tax_item in item_wise_tax_detail.items() if tax_item[1][0] == tax.rate]: + key = str(tax.rate) + if not summary_data.get(key): summary_data.setdefault(key, {"tax_amount": 0.0, "taxable_amount": 0.0}) + summary_data[key]["tax_amount"] += rate_item[1][1] + summary_data[key]["taxable_amount"] += sum([item.net_amount for item in items if item.item_code == rate_item[0]]) + + return summary_data + +#Preflight for successful e-invoice export. +def sales_invoice_validate(doc): + #Validate company + if not doc.company_address: + frappe.throw(_("Please set an Address on the Company '%s'" % doc.company), title=_("E-Invoicing Information Missing")) + else: + validate_address(doc.company_address, "Company") + + if not doc.company_tax_id and not doc.company_fiscal_code: + frappe.throw(_("Please set either the Tax ID or Fiscal Code on Company '%s'" % doc.company), title=_("E-Invoicing Information Missing")) + + #Validate customer details + customer_type, is_public_administration = frappe.db.get_value("Customer", doc.customer, ["customer_type", "is_public_administration"]) + if customer_type == _("Individual"): + if not doc.customer_fiscal_code: + frappe.throw(_("Please set Fiscal Code for the customer '%s'" % doc.customer), title=_("E-Invoicing Information Missing")) + else: + if is_public_administration: + if not doc.customer_fiscal_code: + frappe.throw(_("Please set Fiscal Code for the public administration '%s'" % doc.customer), title=_("E-Invoicing Information Missing")) + else: + if not doc.tax_id: + frappe.throw(_("Please set Tax ID for the customer '%s'" % doc.customer), title=_("E-Invoicing Information Missing")) + + if not doc.customer_address: + frappe.throw(_("Please set the Customer Address"), title=_("E-Invoicing Information Missing")) + else: + validate_address(doc.customer_address, "Customer") + + if not len(doc.taxes): + frappe.throw(_("Please set at least one row in the Taxes and Charges Table"), title=_("E-Invoicing Information Missing")) + else: + for row in doc.taxes: + if row.rate == 0 and row.tax_amount == 0 and not row.tax_exemption_reason: + frappe.throw(_("Row {0}: Please set at Tax Exemption Reason in Sales Taxes and Charges".format(row.idx)), + title=_("E-Invoicing Information Missing")) + + +#Ensure payment details are valid for e-invoice. +def sales_invoice_on_submit(doc): + #Validate payment details + if not len(doc.payment_schedule): + frappe.throw(_("Please set the Payment Schedule"), title=_("E-Invoicing Information Missing")) + else: + for schedule in doc.payment_schedule: + if not schedule.mode_of_payment: + frappe.throw(_("Row {0}: Please set the Mode of Payment in Payment Schedule".format(schedule.idx)), + title=_("E-Invoicing Information Missing")) + + prepare_and_attach_invoice(doc) + +def prepare_and_attach_invoice(doc): + progressive_name, progressive_number = get_progressive_name_and_number(doc) + + invoice = prepare_invoice(doc, progressive_number) + invoice_xml = frappe.render_template('erpnext/regional/italy/e-invoice.xml', context={"doc": invoice}, is_path=True) + + xml_filename = progressive_name + ".xml" + save_file(xml_filename, invoice_xml, dt=doc.doctype, dn=doc.name, is_private=True) + +#Delete e-invoice attachment on cancel. +def sales_invoice_on_cancel(doc): + for attachment in get_e_invoice_attachments(doc): + remove_file(attachment.name, attached_to_doctype=doc.doctype, attached_to_name=doc.name) + +def get_e_invoice_attachments(invoice): + out = [] + attachments = get_attachments(invoice.doctype, invoice.name) + company_tax_id = invoice.company_tax_id if invoice.company_tax_id.startswith("IT") else "IT" + invoice.company_tax_id + + for attachment in attachments: + if attachment.file_name.startswith(company_tax_id) and attachment.file_name.endswith(".xml"): + out.append(attachment) + + return out + +def validate_address(address_name, address_context): + pincode, city = frappe.db.get_value("Address", address_name, ["pincode", "city"]) + if not pincode: + frappe.throw(_("Please set pin code on %s Address" % address_context), title=_("E-Invoicing Information Missing")) + if not city: + frappe.throw(_("Please set city on %s Address" % address_context), title=_("E-Invoicing Information Missing")) + + +def get_unamended_name(doc): + attributes = ["naming_series", "amended_from"] + for attribute in attributes: + if not hasattr(doc, attribute): + return doc.name + + if doc.amended_from: + return "-".join(doc.name.split("-")[:-1]) + else: + return doc.name + +def get_progressive_name_and_number(doc): + company_tax_id = doc.company_tax_id if doc.company_tax_id.startswith("IT") else "IT" + doc.company_tax_id + progressive_name = frappe.model.naming.make_autoname(company_tax_id + "_.#####") + progressive_number = progressive_name.split("_")[1] + + return progressive_name, progressive_number \ No newline at end of file diff --git a/erpnext/regional/report/electronic_invoice_register/__init__.py b/erpnext/regional/report/electronic_invoice_register/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/erpnext/regional/report/electronic_invoice_register/electronic_invoice_register.js b/erpnext/regional/report/electronic_invoice_register/electronic_invoice_register.js new file mode 100644 index 00000000000..67297f757ca --- /dev/null +++ b/erpnext/regional/report/electronic_invoice_register/electronic_invoice_register.js @@ -0,0 +1,53 @@ +// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors +// For license information, please see license.txt +/* eslint-disable */ + +frappe.query_reports["Electronic Invoice Register"] = { + "filters": [ + { + "fieldname":"from_date", + "label": __("From Date"), + "fieldtype": "Date", + "default": frappe.datetime.add_months(frappe.datetime.get_today(), -1), + "width": "80" + }, + { + "fieldname":"to_date", + "label": __("To Date"), + "fieldtype": "Date", + "default": frappe.datetime.get_today() + }, + { + "fieldname":"customer", + "label": __("Customer"), + "fieldtype": "Link", + "options": "Customer" + }, + { + "fieldname":"company", + "label": __("Company"), + "fieldtype": "Link", + "options": "Company", + "default": frappe.defaults.get_user_default("Company") + }, + ], + "onload": function(reportview) { + reportview.page.add_inner_button(__("Export E-Invoices"), function() { + //TODO: refactor condition to disallow export if report has no data. + if (!reportview.data.length) { + frappe.msgprint(__("No data to export")); + return + } + + var w = window.open( + frappe.urllib.get_full_url( + "/api/method/erpnext.regional.italy.utils.export_invoices?" + + "filters=" + JSON.stringify(reportview.get_filter_values()) + ) + ); + if (!w) { + frappe.msgprint(__("Please enable pop-ups")); return; + } + }) + } +} diff --git a/erpnext/regional/report/electronic_invoice_register/electronic_invoice_register.json b/erpnext/regional/report/electronic_invoice_register/electronic_invoice_register.json new file mode 100644 index 00000000000..5470c49c574 --- /dev/null +++ b/erpnext/regional/report/electronic_invoice_register/electronic_invoice_register.json @@ -0,0 +1,21 @@ +{ + "add_total_row": 0, + "color": "green", + "creation": "2019-01-13 17:43:21.903589", + "disabled": 1, + "docstatus": 0, + "doctype": "Report", + "icon": "fa fa-file-code-o", + "idx": 0, + "is_standard": "Yes", + "modified": "2019-01-13 19:03:56.187748", + "modified_by": "Administrator", + "module": "Regional", + "name": "Electronic Invoice Register", + "owner": "Administrator", + "prepared_report": 0, + "ref_doctype": "Sales Invoice", + "report_name": "Electronic Invoice Register", + "report_type": "Script Report", + "roles": [] +} \ No newline at end of file diff --git a/erpnext/regional/report/electronic_invoice_register/electronic_invoice_register.py b/erpnext/regional/report/electronic_invoice_register/electronic_invoice_register.py new file mode 100644 index 00000000000..376ba3ee471 --- /dev/null +++ b/erpnext/regional/report/electronic_invoice_register/electronic_invoice_register.py @@ -0,0 +1,8 @@ +# Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors +# For license information, please see license.txt + +from __future__ import unicode_literals +from erpnext.accounts.report.sales_register.sales_register import _execute + +def execute(filters=None): + return _execute(filters) diff --git a/erpnext/setup/doctype/company/test_company.py b/erpnext/setup/doctype/company/test_company.py index c3260ab9060..1b08a228b6c 100644 --- a/erpnext/setup/doctype/company/test_company.py +++ b/erpnext/setup/doctype/company/test_company.py @@ -46,7 +46,7 @@ class TestCompany(unittest.TestCase): def test_coa_based_on_country_template(self): countries = ["India", "Brazil", "United Arab Emirates", "Canada", "Germany", "France", - "Guatemala", "Indonesia", "Mexico", "Nicaragua", "Netherlands", "Singapore", + "Guatemala", "Indonesia", "Italy", "Mexico", "Nicaragua", "Netherlands", "Singapore", "Brazil", "Argentina", "Hungary", "Taiwan"] for country in countries: From 2670ad7eb251c78c206e0e32fad4b91300bdc9ac Mon Sep 17 00:00:00 2001 From: Gaurav Date: Tue, 19 Feb 2019 10:17:17 +0530 Subject: [PATCH 169/169] mod(regional,italy): adjusted calculation logic for charges validation for missing code on mode of payment UOM from settings Replace str with cstr --- erpnext/regional/italy/e-invoice.xml | 2 +- erpnext/regional/italy/utils.py | 46 ++++++++++++++++++++++++---- 2 files changed, 41 insertions(+), 7 deletions(-) diff --git a/erpnext/regional/italy/e-invoice.xml b/erpnext/regional/italy/e-invoice.xml index 84b7fffbbc3..1c416eeec63 100644 --- a/erpnext/regional/italy/e-invoice.xml +++ b/erpnext/regional/italy/e-invoice.xml @@ -153,7 +153,7 @@ {%- endif %} - {%- for item in doc.items %} + {%- for item in doc.e_invoice_items %} {{ item.idx }} diff --git a/erpnext/regional/italy/utils.py b/erpnext/regional/italy/utils.py index 69f7b464c95..85f744774f6 100644 --- a/erpnext/regional/italy/utils.py +++ b/erpnext/regional/italy/utils.py @@ -1,5 +1,7 @@ +from __future__ import unicode_literals + import frappe, json, os -from frappe.utils import flt +from frappe.utils import flt, cstr from erpnext.controllers.taxes_and_totals import get_itemised_tax from frappe import _ from frappe.utils.file_manager import save_file, remove_file @@ -66,7 +68,8 @@ def prepare_invoice(invoice, progressive_number): else: invoice.transmission_format_code = "FPR12" - tax_data = get_invoice_summary(invoice.items, invoice.taxes) + invoice.e_invoice_items = [item for item in invoice.items] + tax_data = get_invoice_summary(invoice.e_invoice_items, invoice.taxes) invoice.tax_data = tax_data #Check if stamp duty (Bollo) of 2 EUR exists. @@ -74,8 +77,8 @@ def prepare_invoice(invoice, progressive_number): if stamp_duty_charge_row: invoice.stamp_duty = stamp_duty_charge_row.tax_amount - for item in invoice.items: - if item.tax_rate == 0.0: + for item in invoice.e_invoice_items: + if item.tax_rate == 0.0 and item.tax_amount == 0.0: item.tax_exemption_reason = tax_data["0.0"]["tax_exemption_reason"] return invoice @@ -121,12 +124,34 @@ def get_invoice_summary(items, taxes): if tax.charge_type == "Actual": continue + #Charges to appear as items in the e-invoice. + if tax.charge_type in ["On Previous Row Total", "On Previous Row Amount"]: + reference_row = next((row for row in taxes if row.idx == int(tax.row_id or 0)), None) + if reference_row: + items.append( + frappe._dict( + idx=len(items)+1, + item_code=reference_row.description, + item_name=reference_row.description, + rate=reference_row.tax_amount, + qty=1.0, + amount=reference_row.tax_amount, + stock_uom=frappe.db.get_single_value("Stock Settings", "stock_uom") or _("Nos"), + tax_rate=tax.rate, + tax_amount=(reference_row.tax_amount * tax.rate) / 100, + net_amount=reference_row.tax_amount, + taxable_amount=reference_row.tax_amount, + item_tax_rate="{}", + charges=True + ) + ) + #Check item tax rates if tax rate is zero. if tax.rate == 0: for item in items: item_tax_rate = json.loads(item.item_tax_rate) if tax.account_head in item_tax_rate: - key = str(item_tax_rate[tax.account_head]) + key = cstr(item_tax_rate[tax.account_head]) summary_data.setdefault(key, {"tax_amount": 0.0, "taxable_amount": 0.0, "tax_exemption_reason": "", "tax_exemption_law": ""}) summary_data[key]["tax_amount"] += item.tax_amount summary_data[key]["taxable_amount"] += item.net_amount @@ -141,11 +166,17 @@ def get_invoice_summary(items, taxes): else: item_wise_tax_detail = json.loads(tax.item_wise_tax_detail) for rate_item in [tax_item for tax_item in item_wise_tax_detail.items() if tax_item[1][0] == tax.rate]: - key = str(tax.rate) + key = cstr(tax.rate) if not summary_data.get(key): summary_data.setdefault(key, {"tax_amount": 0.0, "taxable_amount": 0.0}) summary_data[key]["tax_amount"] += rate_item[1][1] summary_data[key]["taxable_amount"] += sum([item.net_amount for item in items if item.item_code == rate_item[0]]) + for item in items: + key = cstr(tax.rate) + if item.get("charges"): + if not summary_data.get(key): summary_data.setdefault(key, {"taxable_amount": 0.0}) + summary_data[key]["taxable_amount"] += item.taxable_amount + return summary_data #Preflight for successful e-invoice export. @@ -196,6 +227,9 @@ def sales_invoice_on_submit(doc): if not schedule.mode_of_payment: frappe.throw(_("Row {0}: Please set the Mode of Payment in Payment Schedule".format(schedule.idx)), title=_("E-Invoicing Information Missing")) + elif not frappe.db.get_value("Mode of Payment", schedule.mode_of_payment, "mode_of_payment_code"): + frappe.throw(_("Row {0}: Please set the correct code on Mode of Payment {1}".format(schedule.idx, schedule.mode_of_payment)), + title=_("E-Invoicing Information Missing")) prepare_and_attach_invoice(doc)