From fd19678bc7d2e3ae428fb5179dee042da3040245 Mon Sep 17 00:00:00 2001 From: Anurag Mishra Date: Thu, 6 Jun 2019 18:37:10 +0530 Subject: [PATCH 01/12] fix: show cost center in print fromat of report trial balance --- erpnext/accounts/report/financial_statements.html | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/accounts/report/financial_statements.html b/erpnext/accounts/report/financial_statements.html index cb853fd1dc..1087c28b81 100644 --- a/erpnext/accounts/report/financial_statements.html +++ b/erpnext/accounts/report/financial_statements.html @@ -23,6 +23,7 @@ {% } %}

{%= __(report.report_name) %}

{%= filters.company %}

+

{%= filters.cost_center %}

{%= filters.fiscal_year %}

{%= __("Currency") %} : {%= filters.presentation_currency || erpnext.get_currency(filters.company) %}
{% if (filters.from_date) { %} From 9a792c2eedb3c3bc545328c4d82058f4fbda1e55 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Wed, 15 May 2019 12:42:37 +0530 Subject: [PATCH 02/12] stock_entry: set COGS for material issue only --- .../stock/doctype/stock_entry/stock_entry.py | 34 +++++++++---------- erpnext/stock/get_item_details.py | 10 ++++-- 2 files changed, 25 insertions(+), 19 deletions(-) diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.py b/erpnext/stock/doctype/stock_entry/stock_entry.py index 9de639402f..96c856651a 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.py +++ b/erpnext/stock/doctype/stock_entry/stock_entry.py @@ -676,35 +676,36 @@ class StockEntry(StockController): ret = frappe._dict({ 'uom' : item.stock_uom, - 'stock_uom' : item.stock_uom, + 'stock_uom' : item.stock_uom, 'description' : item.description, - 'image' : item.image, + 'image' : item.image, 'item_name' : item.item_name, - 'expense_account' : args.get("expense_account"), - 'cost_center' : get_default_cost_center(args, item, item_group_defaults, brand_defaults), - 'qty' : args.get("qty"), + 'cost_center' : get_default_cost_center(args, item, item_group_defaults, brand_defaults, self.company), + 'qty' : args.get("qty"), 'transfer_qty' : args.get('qty'), 'conversion_factor' : 1, - 'batch_no' : '', + 'batch_no' : '', 'actual_qty' : 0, 'basic_rate' : 0, - 'serial_no' : '', + 'serial_no' : '', 'has_serial_no' : item.has_serial_no, 'has_batch_no' : item.has_batch_no, 'sample_quantity' : item.sample_quantity }) - for d in [["Account", "expense_account", "default_expense_account"], - ["Cost Center", "cost_center", "cost_center"]]: - company = frappe.db.get_value(d[0], ret.get(d[1]), "company") - if not ret[d[1]] or (company and self.company != company): - ret[d[1]] = frappe.get_cached_value('Company', self.company, d[2]) if d[2] else None # update uom if args.get("uom") and for_update: ret.update(get_uom_details(args.get('item_code'), args.get('uom'), args.get('qty'))) - if not ret["expense_account"]: - ret["expense_account"] = frappe.get_cached_value('Company', self.company, "stock_adjustment_account") + if self.purpose == 'Material Issue': + ret["expense_account"] = (item.get("expense_account") or + item_group_defaults.get("expense_account") or + frappe.get_cached_value('Company', self.company, "default_expense_account")) + + for company_field, field in {'stock_adjustment_account': 'expense_account', + 'cost_center': 'cost_center'}.items(): + if not ret.get(field): + ret[field] = frappe.get_cached_value('Company', self.company, company_field) args['posting_date'] = self.posting_date args['posting_time'] = self.posting_time @@ -1084,8 +1085,7 @@ class StockEntry(StockController): return item_dict def add_to_stock_entry_detail(self, item_dict, bom_no=None): - expense_account, cost_center = frappe.db.get_values("Company", self.company, \ - ["default_expense_account", "cost_center"])[0] + cost_center = frappe.db.get_value("Company", self.company, 'cost_center') for d in item_dict: stock_uom = item_dict[d].get("stock_uom") or frappe.db.get_value("Item", d, "stock_uom") @@ -1099,7 +1099,7 @@ class StockEntry(StockController): se_child.uom = item_dict[d]["uom"] if item_dict[d].get("uom") else stock_uom se_child.stock_uom = stock_uom se_child.qty = flt(item_dict[d]["qty"], se_child.precision("qty")) - se_child.expense_account = item_dict[d].get("expense_account") or expense_account + se_child.expense_account = item_dict[d].get("expense_account") se_child.cost_center = item_dict[d].get("cost_center") or cost_center se_child.allow_alternative_item = item_dict[d].get("allow_alternative_item", 0) se_child.subcontracted_item = item_dict[d].get("main_item_code") diff --git a/erpnext/stock/get_item_details.py b/erpnext/stock/get_item_details.py index f694af8481..59fd9231d5 100644 --- a/erpnext/stock/get_item_details.py +++ b/erpnext/stock/get_item_details.py @@ -414,7 +414,7 @@ def get_default_deferred_account(args, item, fieldname=None): else: return None -def get_default_cost_center(args, item, item_group, brand): +def get_default_cost_center(args, item, item_group, brand, company=None): cost_center = None if args.get('project'): cost_center = frappe.db.get_value("Project", args.get("project"), "cost_center", cache=True) @@ -425,7 +425,13 @@ def get_default_cost_center(args, item, item_group, brand): else: cost_center = item.get('buying_cost_center') or item_group.get('buying_cost_center') or brand.get('buying_cost_center') - return cost_center or args.get("cost_center") + cost_center = cost_center or args.get("cost_center") + + if (company and cost_center + and frappe.get_cached_value("Cost Center", cost_center, "company") != company): + return None + + return cost_center def get_default_supplier(args, item, item_group, brand): return (item.get("default_supplier") From 9510e69910a14a829e676011b5fdcf7b5f96d7ae Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Mon, 10 Jun 2019 10:53:25 +0530 Subject: [PATCH 03/12] fix (lms): null cards visible on xs --- erpnext/www/lms/macros/card.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/www/lms/macros/card.html b/erpnext/www/lms/macros/card.html index 9964d2df34..076061d41b 100644 --- a/erpnext/www/lms/macros/card.html +++ b/erpnext/www/lms/macros/card.html @@ -28,7 +28,7 @@ {% macro null_card() %}
-
+
{% endmacro %} \ No newline at end of file From b9102bba48ee879c795da5d982814c63a3c0dc00 Mon Sep 17 00:00:00 2001 From: Deepesh Garg <42651287+deepeshgarg007@users.noreply.github.com> Date: Mon, 10 Jun 2019 17:39:23 +0530 Subject: [PATCH 04/12] fix: GSTR-1 Report fixes (#17885) --- erpnext/regional/report/gstr_1/gstr_1.py | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/erpnext/regional/report/gstr_1/gstr_1.py b/erpnext/regional/report/gstr_1/gstr_1.py index 5aa2441ee6..a6de94a9da 100644 --- a/erpnext/regional/report/gstr_1/gstr_1.py +++ b/erpnext/regional/report/gstr_1/gstr_1.py @@ -60,8 +60,11 @@ class Gstr1Report(object): else: for inv, items_based_on_rate in self.items_based_on_tax_rate.items(): invoice_details = self.invoices.get(inv) - for rate, items in items_based_on_rate.items(): - row, taxable_value = self.get_row_data_for_invoice(inv, invoice_details, rate, items) + for key, items in items_based_on_rate.items(): + rate = key[0] + account = key[1] + + row, taxable_value = self.get_row_data_for_invoice(inv, invoice_details, rate, account, items) if self.filters.get("type_of_business") == "CDNR": row.append("Y" if invoice_details.posting_date <= date(2017, 7, 1) else "N") @@ -100,7 +103,7 @@ class Gstr1Report(object): for key, value in iteritems(b2cs_output): self.data.append(value) - def get_row_data_for_invoice(self, invoice, invoice_details, tax_rate, items): + def get_row_data_for_invoice(self, invoice, invoice_details, tax_rate, account, items): row = [] for fieldname in self.invoice_fields: if self.filters.get("type_of_business") == "CDNR" and fieldname == "invoice_value": @@ -117,8 +120,10 @@ class Gstr1Report(object): taxable_value = 0 for item_code, net_amount in self.invoice_items.get(invoice).items(): if item_code in items: - if self.item_tax_rate.get(invoice) and tax_rate == self.item_tax_rate.get(invoice, {}).get(item_code): - taxable_value += abs(net_amount) + if self.item_tax_rate.get(invoice) and self.item_tax_rate.get(invoice, {}).get(item_code): + item_tax_rate = self.item_tax_rate.get(invoice, {}).get(item_code) + if account in item_tax_rate and tax_rate == item_tax_rate.get(account): + taxable_value += abs(net_amount) elif not self.item_tax_rate.get(invoice): taxable_value += abs(net_amount) @@ -207,8 +212,7 @@ class Gstr1Report(object): item_tax_rate = json.loads(d.item_tax_rate) if item_tax_rate: - for account, rate in item_tax_rate.items(): - self.item_tax_rate.setdefault(d.parent, {}).setdefault(d.item_code, rate) + self.item_tax_rate.setdefault(d.parent, {}).setdefault(d.item_code, item_tax_rate) def get_items_based_on_tax_rate(self): self.tax_details = frappe.db.sql(""" @@ -248,7 +252,7 @@ class Gstr1Report(object): tax_rate *= 2 rate_based_dict = self.items_based_on_tax_rate\ - .setdefault(parent, {}).setdefault(tax_rate, []) + .setdefault(parent, {}).setdefault((tax_rate, account), []) if item_code not in rate_based_dict: rate_based_dict.append(item_code) except ValueError: From 3720126ee9e6153adc39528391926a1926ba065c Mon Sep 17 00:00:00 2001 From: sahil28297 <37302950+sahil28297@users.noreply.github.com> Date: Mon, 10 Jun 2019 17:39:42 +0530 Subject: [PATCH 05/12] fix(patch): escape illegal characters to avoid SQL syntax error (#17890) --- erpnext/patches/v11_0/update_total_qty_field.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/patches/v11_0/update_total_qty_field.py b/erpnext/patches/v11_0/update_total_qty_field.py index 992454ac7c..51358e9545 100644 --- a/erpnext/patches/v11_0/update_total_qty_field.py +++ b/erpnext/patches/v11_0/update_total_qty_field.py @@ -40,7 +40,7 @@ def execute(): # This is probably never used anywhere else as of now, but should be values = [] for d in batch_transactions: - values.append("('{}', {})".format(d.parent, d.qty)) + values.append("('{}', {})".format(frappe.db.escape(d.parent), d.qty)) conditions = ",".join(values) frappe.db.sql(""" INSERT INTO `tab{}` (name, total_qty) VALUES {} From ebeafa55ca8ac4636159f3c2669ce8ef724068e6 Mon Sep 17 00:00:00 2001 From: Deepesh Garg <42651287+deepeshgarg007@users.noreply.github.com> Date: Mon, 10 Jun 2019 17:42:52 +0530 Subject: [PATCH 06/12] fix: Total Amount fix in journal entry (#17880) --- erpnext/accounts/doctype/journal_entry/journal_entry.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/journal_entry/journal_entry.py b/erpnext/accounts/doctype/journal_entry/journal_entry.py index 26fbc23b4c..d082b60211 100644 --- a/erpnext/accounts/doctype/journal_entry/journal_entry.py +++ b/erpnext/accounts/doctype/journal_entry/journal_entry.py @@ -458,8 +458,9 @@ class JournalEntry(AccountsController): pay_to_recd_from = frappe.db.get_value(d.party_type, d.party, "customer_name" if d.party_type=="Customer" else "supplier_name") - party_amount += (d.debit_in_account_currency or d.credit_in_account_currency) - party_account_currency = d.account_currency + if pay_to_recd_from and pay_to_recd_from == d.party: + party_amount += (d.debit_in_account_currency or d.credit_in_account_currency) + party_account_currency = d.account_currency elif frappe.db.get_value("Account", d.account, "account_type") in ["Bank", "Cash"]: bank_amount += (d.debit_in_account_currency or d.credit_in_account_currency) From 5f41a3333bd6c6b0c64e8711edfa74b9ff038e76 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Mon, 10 Jun 2019 17:21:34 +0530 Subject: [PATCH 07/12] fix: accounts receivable for PDC not showing 120 days column --- .../accounts_receivable.html | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.html b/erpnext/accounts/report/accounts_receivable/accounts_receivable.html index d7aa0c0d19..192b6d7be3 100644 --- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.html +++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.html @@ -46,6 +46,8 @@ var range2 = report.columns[12].label; var range3 = report.columns[13].label; var range4 = report.columns[14].label; + var range5 = report.columns[15].label; + var range6 = report.columns[16].label; %} {% if(balance_row) { %} @@ -56,8 +58,10 @@ - - + + + + @@ -67,16 +71,20 @@ + + - + + + @@ -86,6 +94,8 @@ + + @@ -95,6 +105,8 @@ + + From ef5dd879281975c7f9a7f5ceb31a03283d9503d4 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Mon, 10 Jun 2019 18:31:41 +0530 Subject: [PATCH 08/12] fix: debit and credit showing in the same row if the group by is set as group by voucher (consolidated) --- erpnext/accounts/report/general_ledger/general_ledger.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/report/general_ledger/general_ledger.py b/erpnext/accounts/report/general_ledger/general_ledger.py index 492df4bbb6..307b72d4e8 100644 --- a/erpnext/accounts/report/general_ledger/general_ledger.py +++ b/erpnext/accounts/report/general_ledger/general_ledger.py @@ -128,7 +128,7 @@ def get_gl_entries(filters): order_by_statement = "order by posting_date, voucher_type, voucher_no" if filters.get("group_by") == _("Group by Voucher (Consolidated)"): - group_by_statement = "group by voucher_type, voucher_no, account, cost_center" + group_by_statement = "group by voucher_type, voucher_no, account, cost_center, against_voucher" select_fields = """, sum(debit) as debit, sum(credit) as credit, sum(debit_in_account_currency) as debit_in_account_currency, sum(credit_in_account_currency) as credit_in_account_currency""" From acae7a903b5fcf4309c6da07bda63cbcd14260db Mon Sep 17 00:00:00 2001 From: Anurag Mishra Date: Tue, 11 Jun 2019 11:12:28 +0530 Subject: [PATCH 09/12] fix: requested changes --- erpnext/accounts/report/financial_statements.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/report/financial_statements.html b/erpnext/accounts/report/financial_statements.html index 1087c28b81..4081723bf0 100644 --- a/erpnext/accounts/report/financial_statements.html +++ b/erpnext/accounts/report/financial_statements.html @@ -23,7 +23,9 @@ {% } %}

{%= __(report.report_name) %}

{%= filters.company %}

-

{%= filters.cost_center %}

+{% if 'cost_center' in filters %} +

{%= filters.cost_center %}

+{% endif %}

{%= filters.fiscal_year %}

{%= __("Currency") %} : {%= filters.presentation_currency || erpnext.get_currency(filters.company) %}
{% if (filters.from_date) { %} From 44ac3580d9e696dcd3d5037180248bbc135b0645 Mon Sep 17 00:00:00 2001 From: deepeshgarg007 Date: Tue, 11 Jun 2019 18:35:01 +0530 Subject: [PATCH 10/12] fix: Fix breaking patch on develop branch --- erpnext/patches/v11_0/update_total_qty_field.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/patches/v11_0/update_total_qty_field.py b/erpnext/patches/v11_0/update_total_qty_field.py index 51358e9545..9407256acf 100644 --- a/erpnext/patches/v11_0/update_total_qty_field.py +++ b/erpnext/patches/v11_0/update_total_qty_field.py @@ -40,7 +40,7 @@ def execute(): # This is probably never used anywhere else as of now, but should be values = [] for d in batch_transactions: - values.append("('{}', {})".format(frappe.db.escape(d.parent), d.qty)) + values.append("({0}, {1})".format(frappe.db.escape(d.parent), d.qty)) conditions = ",".join(values) frappe.db.sql(""" INSERT INTO `tab{}` (name, total_qty) VALUES {} From add002bb0f3983fca70877a5249cf50154583f3e Mon Sep 17 00:00:00 2001 From: Kenneth Sequeira <33246109+kennethsequeira@users.noreply.github.com> Date: Wed, 12 Jun 2019 12:25:48 +0530 Subject: [PATCH 11/12] fix: Make Travel Request Document Submittable (#17874) * make travel request submittable * add patch * remove patch --- erpnext/hr/doctype/travel_request/travel_request.json | 10 ++++++++++ erpnext/patches.txt | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/erpnext/hr/doctype/travel_request/travel_request.json b/erpnext/hr/doctype/travel_request/travel_request.json index 31dfe96734..c1c6524af3 100644 --- a/erpnext/hr/doctype/travel_request/travel_request.json +++ b/erpnext/hr/doctype/travel_request/travel_request.json @@ -192,6 +192,15 @@ "fieldtype": "Text", "label": "Other Details" }, + { + "fieldname": "amended_from", + "fieldtype": "Link", + "label": "Amended From", + "no_copy": 1, + "options": "Travel Request", + "print_hide": 1, + "read_only": 1 + }, { "collapsible": 1, "fieldname": "accounting_dimensions_section", @@ -203,6 +212,7 @@ "fieldtype": "Column Break" } ], + "is_submittable": 1, "modified": "2019-05-25 23:15:00.609186", "modified_by": "Administrator", "module": "HR", diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 56c51b102c..15fd82ea72 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -604,4 +604,4 @@ execute:frappe.delete_doc("Report", "Inactive Items") erpnext.patches.v11_1.delete_scheduling_tool erpnext.patches.v12_0.make_custom_fields_for_bank_remittance execute:frappe.delete_doc_if_exists("Page", "support-analytics") -erpnext.patches.v12_0.make_item_manufacturer +erpnext.patches.v12_0.make_item_manufacturer \ No newline at end of file From a9508862b2ed69a3cb93328245b03dd2535d5201 Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Wed, 12 Jun 2019 12:39:12 +0530 Subject: [PATCH 12/12] refactor: doctype settings for lms --- .../education/doctype/article/article.json | 175 ++---------------- erpnext/education/doctype/course/course.json | 38 +--- .../education/doctype/program/program.json | 52 +++--- erpnext/education/doctype/quiz/quiz.json | 4 +- .../doctype/quiz_question/quiz_question.json | 138 ++++---------- erpnext/education/doctype/topic/topic.json | 26 +-- erpnext/education/doctype/video/video.json | 20 +- 7 files changed, 103 insertions(+), 350 deletions(-) diff --git a/erpnext/education/doctype/article/article.json b/erpnext/education/doctype/article/article.json index c30cd189d6..2fad5af8d3 100644 --- a/erpnext/education/doctype/article/article.json +++ b/erpnext/education/doctype/article/article.json @@ -1,230 +1,81 @@ { - "allow_copy": 0, - "allow_events_in_timeline": 0, - "allow_guest_to_view": 0, "allow_import": 1, - "allow_rename": 0, + "allow_rename": 1, "autoname": "field:title", - "beta": 0, "creation": "2018-10-17 05:45:38.471670", - "custom": 0, - "docstatus": 0, "doctype": "DocType", - "document_type": "", "editable_grid": 1, "engine": "InnoDB", + "field_order": [ + "title", + "author", + "content", + "publish_date" + ], "fields": [ { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, "fieldname": "title", "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": "Title", - "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": 1 }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, "fieldname": "author", "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": "Author", - "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 + "label": "Author" }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, "fieldname": "content", "fieldtype": "Text Editor", - "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": "Content", - "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 + "label": "Content" }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, "fieldname": "publish_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": "Publish 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": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 + "label": "Publish Date" } ], - "has_web_view": 0, - "hide_heading": 0, - "hide_toolbar": 0, - "idx": 0, - "image_view": 0, - "in_create": 0, - "is_submittable": 0, - "issingle": 0, - "istable": 0, - "max_attachments": 0, - "modified": "2018-11-25 19:06:56.016865", + "modified": "2019-06-12 12:36:58.740340", "modified_by": "Administrator", "module": "Education", "name": "Article", - "name_case": "", "owner": "Administrator", "permissions": [ { - "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": "Academics 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": "Instructor", - "set_user_permissions": 0, "share": 1, - "submit": 0, "write": 1 }, { - "amend": 0, - "cancel": 0, - "create": 0, - "delete": 0, "email": 1, "export": 1, - "if_owner": 0, - "import": 0, - "permlevel": 0, "print": 1, "read": 1, "report": 1, "role": "LMS User", - "set_user_permissions": 0, - "share": 1, - "submit": 0, - "write": 0 + "share": 1 } ], - "quick_entry": 1, - "read_only": 0, - "read_only_onload": 0, - "show_name_in_global_search": 0, "sort_field": "modified", "sort_order": "DESC", - "track_changes": 1, - "track_seen": 0, - "track_views": 0 + "track_changes": 1 } \ No newline at end of file diff --git a/erpnext/education/doctype/course/course.json b/erpnext/education/doctype/course/course.json index 7d8b07397e..68426c36be 100644 --- a/erpnext/education/doctype/course/course.json +++ b/erpnext/education/doctype/course/course.json @@ -1,17 +1,13 @@ { "allow_import": 1, "allow_rename": 1, - "autoname": "field:course_code", + "autoname": "field:course_name", "creation": "2015-09-07 12:39:55.181893", "doctype": "DocType", "engine": "InnoDB", "field_order": [ "course_name", "department", - "parent_course", - "column_break_3", - "course_code", - "course_abbreviation", "section_break_6", "topics", "description", @@ -26,7 +22,8 @@ "fieldtype": "Data", "in_list_view": 1, "label": "Course Name", - "reqd": 1 + "reqd": 1, + "unique": 1 }, { "fieldname": "department", @@ -36,31 +33,10 @@ "label": "Department", "options": "Department" }, - { - "fieldname": "parent_course", - "fieldtype": "Data", - "label": "Parent Course (Leave blank, if this isn't part of Parent Course)" - }, - { - "fieldname": "column_break_3", - "fieldtype": "Column Break" - }, - { - "fieldname": "course_code", - "fieldtype": "Data", - "label": "Course Code", - "reqd": 1, - "unique": 1 - }, - { - "fieldname": "course_abbreviation", - "fieldtype": "Data", - "in_list_view": 1, - "label": "Course Abbreviation" - }, { "fieldname": "section_break_6", - "fieldtype": "Section Break" + "fieldtype": "Section Break", + "label": "Portal Settings" }, { "fieldname": "topics", @@ -71,6 +47,7 @@ { "fieldname": "hero_image", "fieldtype": "Attach Image", + "hidden": 1, "label": "Hero Image" }, { @@ -96,7 +73,8 @@ "label": "Description" } ], - "modified": "2019-06-05 18:39:11.870605", + "image_field": "hero_image", + "modified": "2019-06-12 12:34:23.748157", "modified_by": "Administrator", "module": "Education", "name": "Course", diff --git a/erpnext/education/doctype/program/program.json b/erpnext/education/doctype/program/program.json index a0a2aa2e2b..2dfe50b2f0 100644 --- a/erpnext/education/doctype/program/program.json +++ b/erpnext/education/doctype/program/program.json @@ -1,7 +1,7 @@ { "allow_import": 1, "allow_rename": 1, - "autoname": "field:program_code", + "autoname": "field:program_name", "creation": "2015-09-07 12:54:03.609282", "doctype": "DocType", "engine": "InnoDB", @@ -9,18 +9,17 @@ "program_name", "department", "column_break_3", - "program_code", "program_abbreviation", - "section_break_5", + "section_break_courses", "courses", - "section_break_9", - "description", + "section_break_5", + "is_published", + "allow_self_enroll", + "is_featured", + "column_break_11", "intro_video", "hero_image", - "column_break_11", - "is_published", - "is_featured", - "allow_self_enroll" + "description" ], "fields": [ { @@ -28,7 +27,8 @@ "fieldtype": "Data", "in_list_view": 1, "label": "Program Name", - "reqd": 1 + "reqd": 1, + "unique": 1 }, { "fieldname": "department", @@ -42,13 +42,6 @@ "fieldname": "column_break_3", "fieldtype": "Column Break" }, - { - "fieldname": "program_code", - "fieldtype": "Data", - "label": "Program Code", - "reqd": 1, - "unique": 1 - }, { "fieldname": "program_abbreviation", "fieldtype": "Data", @@ -67,16 +60,13 @@ "options": "Program Course" }, { - "fieldname": "section_break_9", - "fieldtype": "Section Break", - "label": "LMS Settings" - }, - { + "depends_on": "is_published", "fieldname": "description", "fieldtype": "Small Text", "label": "Description" }, { + "depends_on": "is_published", "fieldname": "intro_video", "fieldtype": "Data", "label": "Intro Video" @@ -84,12 +74,9 @@ { "fieldname": "hero_image", "fieldtype": "Attach Image", + "hidden": 1, "label": "Hero Image" }, - { - "fieldname": "column_break_11", - "fieldtype": "Column Break" - }, { "default": "0", "fieldname": "is_published", @@ -106,13 +93,22 @@ { "default": "0", "depends_on": "eval: doc.is_published == 1", - "description": "Allow students to enroll themselves from the portal", "fieldname": "allow_self_enroll", "fieldtype": "Check", "label": "Allow Self Enroll" + }, + { + "fieldname": "section_break_courses", + "fieldtype": "Section Break", + "label": "Courses" + }, + { + "fieldname": "column_break_11", + "fieldtype": "Column Break" } ], - "modified": "2019-06-05 17:47:26.877296", + "image_field": "hero_image", + "modified": "2019-06-12 12:31:14.999346", "modified_by": "Administrator", "module": "Education", "name": "Program", diff --git a/erpnext/education/doctype/quiz/quiz.json b/erpnext/education/doctype/quiz/quiz.json index b4903fc285..569c281f4c 100644 --- a/erpnext/education/doctype/quiz/quiz.json +++ b/erpnext/education/doctype/quiz/quiz.json @@ -1,4 +1,6 @@ { + "allow_import": 1, + "allow_rename": 1, "autoname": "field:title", "creation": "2018-10-17 05:52:50.149904", "doctype": "DocType", @@ -58,7 +60,7 @@ "options": "Latest Highest Score\nLatest Attempt" } ], - "modified": "2019-05-30 18:50:54.218571", + "modified": "2019-06-12 12:23:57.020508", "modified_by": "Administrator", "module": "Education", "name": "Quiz", diff --git a/erpnext/education/doctype/quiz_question/quiz_question.json b/erpnext/education/doctype/quiz_question/quiz_question.json index 3857c5ca8d..0564482516 100644 --- a/erpnext/education/doctype/quiz_question/quiz_question.json +++ b/erpnext/education/doctype/quiz_question/quiz_question.json @@ -1,110 +1,40 @@ { - "allow_copy": 0, - "allow_events_in_timeline": 0, - "allow_guest_to_view": 0, - "allow_import": 0, - "allow_rename": 0, - "beta": 0, - "creation": "2018-10-17 06:13:00.098883", - "custom": 0, - "docstatus": 0, - "doctype": "DocType", - "document_type": "", - "editable_grid": 1, - "engine": "InnoDB", + "allow_rename": 1, + "creation": "2018-10-17 06:13:00.098883", + "doctype": "DocType", + "editable_grid": 1, + "engine": "InnoDB", + "field_order": [ + "question_link", + "question" + ], "fields": [ { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "question_link", - "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": "Question Link", - "length": 0, - "no_copy": 0, - "options": "Question", - "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 - }, + "fieldname": "question_link", + "fieldtype": "Link", + "in_list_view": 1, + "label": "Question Link", + "options": "Question", + "reqd": 1 + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_from": "question_link.question", - "fieldname": "question", - "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": "Question", - "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 + "fetch_from": "question_link.question", + "fieldname": "question", + "fieldtype": "Data", + "in_list_view": 1, + "label": "Question", + "read_only": 1 } - ], - "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": "2018-10-18 15:35:12.195250", - "modified_by": "Administrator", - "module": "Education", - "name": "Quiz Question", - "name_case": "", - "owner": "Administrator", - "permissions": [], - "quick_entry": 1, - "read_only": 0, - "read_only_onload": 0, - "show_name_in_global_search": 0, - "sort_field": "modified", - "sort_order": "DESC", - "track_changes": 1, - "track_seen": 0, - "track_views": 0 + ], + "istable": 1, + "modified": "2019-06-12 12:24:02.312577", + "modified_by": "Administrator", + "module": "Education", + "name": "Quiz Question", + "owner": "Administrator", + "permissions": [], + "quick_entry": 1, + "sort_field": "modified", + "sort_order": "DESC", + "track_changes": 1 } \ No newline at end of file diff --git a/erpnext/education/doctype/topic/topic.json b/erpnext/education/doctype/topic/topic.json index 6e748fddce..305458bf67 100644 --- a/erpnext/education/doctype/topic/topic.json +++ b/erpnext/education/doctype/topic/topic.json @@ -1,14 +1,13 @@ { - "autoname": "field:topic_code", + "allow_import": 1, + "allow_rename": 1, + "autoname": "field:topic_name", "creation": "2018-12-12 11:37:39.917760", "doctype": "DocType", "editable_grid": 1, "engine": "InnoDB", "field_order": [ "topic_name", - "column_break_2", - "topic_code", - "section_break_4", "topic_content", "description", "hero_image" @@ -19,24 +18,9 @@ "fieldtype": "Data", "in_list_view": 1, "label": "Name", - "reqd": 1 - }, - { - "fieldname": "column_break_2", - "fieldtype": "Column Break" - }, - { - "fieldname": "topic_code", - "fieldtype": "Data", - "in_list_view": 1, - "label": "Code", "reqd": 1, "unique": 1 }, - { - "fieldname": "section_break_4", - "fieldtype": "Section Break" - }, { "fieldname": "topic_content", "fieldtype": "Table", @@ -46,6 +30,7 @@ { "fieldname": "hero_image", "fieldtype": "Attach Image", + "hidden": 1, "label": "Hero Image" }, { @@ -54,7 +39,8 @@ "label": "Description" } ], - "modified": "2019-06-05 18:38:44.029711", + "image_field": "hero_image", + "modified": "2019-06-12 12:34:49.911300", "modified_by": "Administrator", "module": "Education", "name": "Topic", diff --git a/erpnext/education/doctype/video/video.json b/erpnext/education/doctype/video/video.json index 3d11bd256f..e912eb32cb 100644 --- a/erpnext/education/doctype/video/video.json +++ b/erpnext/education/doctype/video/video.json @@ -1,5 +1,6 @@ { "allow_import": 1, + "allow_rename": 1, "autoname": "field:title", "creation": "2018-10-17 05:47:13.087395", "doctype": "DocType", @@ -7,11 +8,13 @@ "engine": "InnoDB", "field_order": [ "title", - "description", - "duration", "provider", "url", - "publish_date" + "column_break_4", + "publish_date", + "duration", + "section_break_7", + "description" ], "fields": [ { @@ -53,9 +56,17 @@ "label": "Provider", "options": "YouTube\nVimeo", "reqd": 1 + }, + { + "fieldname": "column_break_4", + "fieldtype": "Column Break" + }, + { + "fieldname": "section_break_7", + "fieldtype": "Section Break" } ], - "modified": "2019-05-20 15:11:53.075093", + "modified": "2019-06-12 12:36:48.753092", "modified_by": "Administrator", "module": "Education", "name": "Video", @@ -95,7 +106,6 @@ "share": 1 } ], - "quick_entry": 1, "sort_field": "modified", "sort_order": "DESC", "track_changes": 1
{%= __(range2) %} {%= __(range3) %} {%= __(range4) %}{%= __(range5) %}{%= __(range6) %} {%= __("Total") %}
{%= __("Total Outstanding") %}{%= format_currency(balance_row[range1]) %}{%= format_number(balance_row[range1], null, 2) %} {%= format_currency(balance_row[range2]) %} {%= format_currency(balance_row[range3]) %} {%= format_currency(balance_row[range4]) %}{%= format_currency(balance_row[range5]) %}{%= format_currency(balance_row[range6]) %} {%= format_currency(flt(balance_row[("outstanding_amount")]), data[data.length-1]["currency"]) %} {%= format_currency(flt(balance_row[("pdc/lc_amount")]), data[data.length-1]["currency"]) %} {%= format_currency(flt(balance_row[("outstanding_amount")]-balance_row[("pdc/lc_amount")]), data[data.length-1]["currency"]) %}