From be15e16b84f6f2b8bd3cf421c0a7ac06cc599988 Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Mon, 5 Jul 2021 14:58:32 +0530 Subject: [PATCH 01/95] feat(Accounts Settings): Add 'Enable Discount Accounting' checkbox --- .../doctype/accounts_settings/accounts_settings.json | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/accounts_settings/accounts_settings.json b/erpnext/accounts/doctype/accounts_settings/accounts_settings.json index 703e93c0757..676c6a8b479 100644 --- a/erpnext/accounts/doctype/accounts_settings/accounts_settings.json +++ b/erpnext/accounts/doctype/accounts_settings/accounts_settings.json @@ -12,6 +12,7 @@ "role_allowed_to_over_bill", "make_payment_via_journal_entry", "column_break_11", + "enable_discount_accounting", "check_supplier_invoice_uniqueness", "unlink_payment_on_cancellation_of_invoice", "automatically_fetch_payment_terms", @@ -261,6 +262,12 @@ "fieldname": "post_change_gl_entries", "fieldtype": "Check", "label": "Create Ledger Entries for Change Amount" + }, + { + "default": "0", + "fieldname": "enable_discount_accounting", + "fieldtype": "Check", + "label": "Enable Discount Accounting" } ], "icon": "icon-cog", @@ -268,7 +275,7 @@ "index_web_pages_for_search": 1, "issingle": 1, "links": [], - "modified": "2021-06-17 20:26:03.721202", + "modified": "2021-07-05 14:56:19.820731", "modified_by": "Administrator", "module": "Accounts", "name": "Accounts Settings", From 6e0d83d925241f04a9897fa39227624a043fe33f Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Mon, 5 Jul 2021 15:09:05 +0530 Subject: [PATCH 02/95] feat(Sales Invoice): Add 'Discount Account' field in Items table --- .../doctype/sales_invoice_item/sales_invoice_item.json | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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 8e6952a93c4..b65903bf5e8 100644 --- a/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.json +++ b/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.json @@ -63,6 +63,7 @@ "finance_book", "col_break4", "expense_account", + "discount_account", "deferred_revenue", "deferred_revenue_account", "service_stop_date", @@ -821,12 +822,18 @@ "no_copy": 1, "options": "currency", "read_only": 1 + }, + { + "fieldname": "discount_account", + "fieldtype": "Link", + "label": "Discount Account", + "options": "Account" } ], "idx": 1, "istable": 1, "links": [], - "modified": "2021-02-23 01:05:22.123527", + "modified": "2021-07-05 15:07:22.857128", "modified_by": "Administrator", "module": "Accounts", "name": "Sales Invoice Item", From cf7579e29f1bbf58eb13562016188f0552d64c93 Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Tue, 6 Jul 2021 00:36:06 +0530 Subject: [PATCH 03/95] feat: Create GL Entries for discount accounting --- .../doctype/sales_invoice/sales_invoice.py | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index 55a5b99907b..15e79513593 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -845,6 +845,7 @@ class SalesInvoice(SellingController): self.allocate_advance_taxes(gl_entries) self.make_item_gl_entries(gl_entries) + self.make_discount_gl_entries(gl_entries) # merge gl entries before adding pos entries gl_entries = merge_similar_entries(gl_entries) @@ -958,6 +959,40 @@ class SalesInvoice(SellingController): erpnext.is_perpetual_inventory_enabled(self.company): gl_entries += super(SalesInvoice, self).get_gl_entries() + def make_discount_gl_entries(self, gl_entries): + enable_discount_accounting = cint(frappe.db.get_single_value('Accounts Settings', 'enable_discount_accounting')) + + if enable_discount_accounting: + for item in self.get("items"): + if item.get('discount_amount') and item.get('discount_account'): + account_currency = get_account_currency(item.discount_account) + gl_entries.append( + self.get_gl_dict({ + "account": item.discount_account, + "against": self.customer, + "debit": flt(item.discount_amount), + "debit_in_account_currency": flt(item.discount_amount), + "cost_center": self.cost_center, + "project": self.project + }, account_currency, item=self) + ) + + income_account = (item.income_account + if (not item.enable_deferred_revenue or self.is_return) + else item.deferred_revenue_account) + + account_currency = get_account_currency(income_account) + gl_entries.append( + self.get_gl_dict({ + "account": income_account, + "against": self.customer, + "credit": flt(item.discount_amount), + "credit_in_account_currency": flt(item.discount_amount), + "cost_center": item.cost_center, + "project": item.project or self.project + }, account_currency, item=item) + ) + def make_loyalty_point_redemption_gle(self, gl_entries): if cint(self.redeem_loyalty_points): gl_entries.append( From b08bb1f1a2e679c3c0c01f4a304937243c84121d Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Tue, 6 Jul 2021 16:28:19 +0530 Subject: [PATCH 04/95] feat: Filter list for Discount Account field in Items table --- erpnext/accounts/doctype/sales_invoice/sales_invoice.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js index bb556516702..8672e7b1a69 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js @@ -510,6 +510,14 @@ cur_frm.set_query("income_account", "items", function(doc) { } }); +// Discount Account in Details Table +// -------------------------------- +cur_frm.set_query("discount_account", "items", function(doc) { + return{ + query: "erpnext.controllers.queries.get_income_account", + filters: {'company': doc.company} + } +}); // Cost Center in Details Table // ----------------------------- From ef667a9a64b5e4b23551c4b150b4371b6f0e72b7 Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Tue, 6 Jul 2021 16:29:19 +0530 Subject: [PATCH 05/95] feat: Add Default Discount Account field --- erpnext/stock/doctype/item/item.json | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/erpnext/stock/doctype/item/item.json b/erpnext/stock/doctype/item/item.json index 6fed9efa63f..f1c413e00a0 100644 --- a/erpnext/stock/doctype/item/item.json +++ b/erpnext/stock/doctype/item/item.json @@ -91,6 +91,7 @@ "is_sales_item", "column_break3", "max_discount", + "default_discount_account", "deferred_revenue", "deferred_revenue_account", "enable_deferred_revenue", @@ -1058,6 +1059,12 @@ "fieldname": "website_image_alt", "fieldtype": "Data", "label": "Image Description" + }, + { + "fieldname": "default_discount_account", + "fieldtype": "Link", + "label": "Default Discount Account", + "options": "Account" } ], "has_web_view": 1, @@ -1067,7 +1074,7 @@ "index_web_pages_for_search": 1, "links": [], "max_attachments": 1, - "modified": "2021-03-18 14:04:38.575519", + "modified": "2021-07-06 00:46:15.878648", "modified_by": "Administrator", "module": "Stock", "name": "Item", @@ -1138,4 +1145,4 @@ "sort_order": "DESC", "title_field": "item_name", "track_changes": 1 -} +} \ No newline at end of file From 657e9b5320d42f2622c0663c358bd08221282de3 Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Tue, 6 Jul 2021 16:51:12 +0530 Subject: [PATCH 06/95] feat: Assign Item's Default Discount Account if present --- erpnext/stock/get_item_details.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/erpnext/stock/get_item_details.py b/erpnext/stock/get_item_details.py index ca174a3f63c..662ca379096 100644 --- a/erpnext/stock/get_item_details.py +++ b/erpnext/stock/get_item_details.py @@ -288,6 +288,7 @@ def get_basic_details(args, item, overwrite_warehouse=True): "warehouse": warehouse, "income_account": get_default_income_account(args, item_defaults, item_group_defaults, brand_defaults), "expense_account": expense_account or get_default_expense_account(args, item_defaults, item_group_defaults, brand_defaults) , + "discount_account": None or get_default_discount_account(args, item_defaults), "cost_center": get_default_cost_center(args, item_defaults, item_group_defaults, brand_defaults), 'has_serial_no': item.has_serial_no, 'has_batch_no': item.has_batch_no, @@ -590,6 +591,10 @@ def get_default_expense_account(args, item, item_group, brand): or brand.get("expense_account") or args.expense_account) +def get_default_discount_account(args, item_defaults): + return (item_defaults.default_discount_account + or args.discount_account) + def get_default_deferred_account(args, item, fieldname=None): if item.get("enable_deferred_revenue") or item.get("enable_deferred_expense"): return (item.get(fieldname) From 3ea4f993b799685c4d11ddde003547faaba5da42 Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Tue, 6 Jul 2021 20:22:13 +0530 Subject: [PATCH 07/95] feat: Toggle display for discount accounting fields according to enable_discount_accounting --- .../doctype/accounts_settings/accounts_settings.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/erpnext/accounts/doctype/accounts_settings/accounts_settings.py b/erpnext/accounts/doctype/accounts_settings/accounts_settings.py index ac4a2d6f16d..9e33eb395b7 100644 --- a/erpnext/accounts/doctype/accounts_settings/accounts_settings.py +++ b/erpnext/accounts/doctype/accounts_settings/accounts_settings.py @@ -21,6 +21,7 @@ class AccountsSettings(Document): self.validate_stale_days() self.enable_payment_schedule_in_print() + self.toggle_discount_accounting_fields() def validate_stale_days(self): if not self.allow_stale and cint(self.stale_days) <= 0: @@ -33,3 +34,9 @@ class AccountsSettings(Document): for doctype in ("Sales Order", "Sales Invoice", "Purchase Order", "Purchase Invoice"): make_property_setter(doctype, "due_date", "print_hide", show_in_print, "Check", validate_fields_for_doctype=False) make_property_setter(doctype, "payment_schedule", "print_hide", 0 if show_in_print else 1, "Check", validate_fields_for_doctype=False) + + def toggle_discount_accounting_fields(self): + enable_discount_accounting = cint(self.enable_discount_accounting) + + make_property_setter("Sales Invoice Item", "discount_account", "hidden", not(enable_discount_accounting), "Check", validate_fields_for_doctype=False) + make_property_setter("Item", "default_discount_account", "hidden", not(enable_discount_accounting), "Check", validate_fields_for_doctype=False) \ No newline at end of file From 5a62467a3e028bb6d857a27a661d9bbeaee9d184 Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Fri, 9 Jul 2021 00:53:42 +0530 Subject: [PATCH 08/95] feat: Fetch Payment Terms from linked Purchase Order --- .../purchase_invoice/purchase_invoice.js | 21 +++++++++- .../purchase_invoice/purchase_invoice.py | 39 +++++++++++++++++++ 2 files changed, 59 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js index 7562418fd2f..10b83c027f7 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js @@ -508,6 +508,8 @@ frappe.ui.form.on("Purchase Invoice", { } } } + + frm.events.set_payment_terms(frm); }, refresh: function(frm) { @@ -570,4 +572,21 @@ frappe.ui.form.on("Purchase Invoice", { company: function(frm) { erpnext.accounts.dimensions.update_dimension(frm, frm.doctype); }, -}) + + set_payment_terms: function (frm) { + frappe.call({ + 'method': 'erpnext.accounts.doctype.purchase_invoice.purchase_invoice.set_payment_terms_from_po', + 'args': { + doc: frm.doc + }, + 'callback': (r) => { + if (r.message) { + var doc = frappe.model.sync(r.message)[0]; + console.log("doc: ", doc) + frappe.set_route("Form", doc.doctype, doc.name); + } + } + + }); + }, +}) \ No newline at end of file diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py index c1cc092554d..fb143b45cef 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py @@ -7,6 +7,8 @@ import frappe, erpnext from frappe.utils import cint, cstr, formatdate, flt, getdate, nowdate, get_link_to_form from frappe import _, throw import frappe.defaults +import json +import six from erpnext.assets.doctype.asset_category.asset_category import get_asset_category_account from erpnext.controllers.buying_controller import BuyingController @@ -1171,6 +1173,43 @@ class PurchaseInvoice(BuyingController): if update: self.db_set('status', self.status, update_modified = update_modified) +@frappe.whitelist() +def set_payment_terms_from_po(doc): + if isinstance(doc, six.string_types): + doc = json.loads(doc) + + purchase_order = doc.get('items')[0].get('purchase_order') + + if linked_po_has_payment_terms(doc, purchase_order) and all_items_have_same_po(doc, purchase_order): + purchase_order = frappe.get_cached_doc('Purchase Order', purchase_order) + doc['payment_terms_template'] = purchase_order.payment_terms_template + doc['terms'] = purchase_order.payment_terms_template + + for schedule in purchase_order.payment_schedule: + payment_schedule = { + 'payment_term': schedule.payment_term, + 'due_date': schedule.due_date, + 'invoice_portion': schedule.invoice_portion, + 'discount_type': schedule.discount_type, + 'discount': schedule.discount, + 'base_payment_amount': schedule.base_payment_amount, + 'payment_amount': schedule.payment_amount, + 'outstanding': schedule.outstanding + } + doc['payment_schedule'].append(payment_schedule) + + return doc + +def linked_po_has_payment_terms(doc, purchase_order): + return not doc.get('payment_schedule') and purchase_order + +def all_items_have_same_po(doc, purchase_order): + for item in doc.get('items'): + if item.get('purchase_order') != purchase_order: + return False + + return True + # to get details of purchase invoice/receipt from which this doc was created for exchange rate difference handling def get_purchase_document_details(doc): if doc.doctype == 'Purchase Invoice': From bf245e5e39cdeb2ccdd51a63ad1e2385fbedc24d Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Fri, 9 Jul 2021 01:44:34 +0530 Subject: [PATCH 09/95] fix: Clear Payment Schedule if PI has default Payment Schedule, but linked PO doensn't --- .../doctype/purchase_invoice/purchase_invoice.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py index fb143b45cef..f30af0c349e 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py @@ -1180,10 +1180,14 @@ def set_payment_terms_from_po(doc): purchase_order = doc.get('items')[0].get('purchase_order') - if linked_po_has_payment_terms(doc, purchase_order) and all_items_have_same_po(doc, purchase_order): + if purchase_order and all_items_have_same_po(doc, purchase_order): purchase_order = frappe.get_cached_doc('Purchase Order', purchase_order) + else: + return + + if has_default_payment_terms(doc) and not has_default_payment_terms(purchase_order): + doc['payment_schedule'] = [] doc['payment_terms_template'] = purchase_order.payment_terms_template - doc['terms'] = purchase_order.payment_terms_template for schedule in purchase_order.payment_schedule: payment_schedule = { @@ -1200,9 +1204,6 @@ def set_payment_terms_from_po(doc): return doc -def linked_po_has_payment_terms(doc, purchase_order): - return not doc.get('payment_schedule') and purchase_order - def all_items_have_same_po(doc, purchase_order): for item in doc.get('items'): if item.get('purchase_order') != purchase_order: @@ -1210,6 +1211,11 @@ def all_items_have_same_po(doc, purchase_order): return True +def has_default_payment_terms(doc): + if doc.get('payment_schedule')[0].get('invoice_portion') == 100: + return True + return False + # to get details of purchase invoice/receipt from which this doc was created for exchange rate difference handling def get_purchase_document_details(doc): if doc.doctype == 'Purchase Invoice': From 0d5ad3b1bb3933e225fdf98d6b04afae6647e357 Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Mon, 12 Jul 2021 18:56:06 +0530 Subject: [PATCH 10/95] fix: Add description for Enable Discount Accounting checkbox --- .../doctype/accounts_settings/accounts_settings.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/accounts_settings/accounts_settings.json b/erpnext/accounts/doctype/accounts_settings/accounts_settings.json index 676c6a8b479..49a2afee85f 100644 --- a/erpnext/accounts/doctype/accounts_settings/accounts_settings.json +++ b/erpnext/accounts/doctype/accounts_settings/accounts_settings.json @@ -12,7 +12,6 @@ "role_allowed_to_over_bill", "make_payment_via_journal_entry", "column_break_11", - "enable_discount_accounting", "check_supplier_invoice_uniqueness", "unlink_payment_on_cancellation_of_invoice", "automatically_fetch_payment_terms", @@ -20,6 +19,7 @@ "book_asset_depreciation_entry_automatically", "unlink_advance_payment_on_cancelation_of_order", "post_change_gl_entries", + "enable_discount_accounting", "tax_settings_section", "determine_address_tax_category_from", "column_break_19", @@ -265,6 +265,7 @@ }, { "default": "0", + "description": "If enabled, additional ledger entries will be made for discounts in a separate Discount Account", "fieldname": "enable_discount_accounting", "fieldtype": "Check", "label": "Enable Discount Accounting" @@ -275,7 +276,7 @@ "index_web_pages_for_search": 1, "issingle": 1, "links": [], - "modified": "2021-07-05 14:56:19.820731", + "modified": "2021-07-12 18:54:29.084958", "modified_by": "Administrator", "module": "Accounts", "name": "Accounts Settings", From b22dba1146b9a5d869b885cb47a1d989ecdd3b64 Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Mon, 12 Jul 2021 19:07:54 +0530 Subject: [PATCH 11/95] fix: Filter Discount Account list --- .../doctype/sales_invoice/sales_invoice.js | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js index 8672e7b1a69..f84b6463979 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js @@ -510,15 +510,6 @@ cur_frm.set_query("income_account", "items", function(doc) { } }); -// Discount Account in Details Table -// -------------------------------- -cur_frm.set_query("discount_account", "items", function(doc) { - return{ - query: "erpnext.controllers.queries.get_income_account", - filters: {'company': doc.company} - } -}); - // Cost Center in Details Table // ----------------------------- cur_frm.fields_dict["items"].grid.get_field("cost_center").get_query = function(doc) { @@ -626,6 +617,19 @@ frappe.ui.form.on('Sales Invoice', { } } + // discount account + frm.fields_dict['items'].grid.get_field('discount_account').get_query = function(doc) { + if (erpnext.is_perpetual_inventory_enabled(doc.company)) { + return { + filters: { + 'report_type': 'Profit and Loss', + 'company': doc.company, + "is_group": 0 + } + } + } + } + frm.fields_dict['items'].grid.get_field('deferred_revenue_account').get_query = function(doc) { return { filters: { From 4fcdc5d129ab3f3655108c2a0bbde4b48f15c3e2 Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Mon, 12 Jul 2021 22:32:38 +0530 Subject: [PATCH 12/95] fix: Copy discount account from first row to all Items --- erpnext/accounts/doctype/sales_invoice/sales_invoice.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js index f84b6463979..288e2a7566f 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js @@ -347,7 +347,7 @@ erpnext.accounts.SalesInvoiceController = class SalesInvoiceController extends e items_add(doc, cdt, cdn) { var row = frappe.get_doc(cdt, cdn); - this.frm.script_manager.copy_from_first_row("items", row, ["income_account", "cost_center"]); + this.frm.script_manager.copy_from_first_row("items", row, ["income_account", "discount_account", "cost_center"]); } set_dynamic_labels() { From 0b7d8fb3afb4ffa5662d7e657c357a49fde323b1 Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Tue, 13 Jul 2021 01:37:30 +0530 Subject: [PATCH 13/95] fix: Move Default Discount Account field to Item Defaults --- erpnext/stock/doctype/item/item.json | 9 +- .../doctype/item_default/item_default.json | 548 ++++-------------- erpnext/stock/get_item_details.py | 4 +- 3 files changed, 104 insertions(+), 457 deletions(-) diff --git a/erpnext/stock/doctype/item/item.json b/erpnext/stock/doctype/item/item.json index f1c413e00a0..f662bbd1c79 100644 --- a/erpnext/stock/doctype/item/item.json +++ b/erpnext/stock/doctype/item/item.json @@ -91,7 +91,6 @@ "is_sales_item", "column_break3", "max_discount", - "default_discount_account", "deferred_revenue", "deferred_revenue_account", "enable_deferred_revenue", @@ -1059,12 +1058,6 @@ "fieldname": "website_image_alt", "fieldtype": "Data", "label": "Image Description" - }, - { - "fieldname": "default_discount_account", - "fieldtype": "Link", - "label": "Default Discount Account", - "options": "Account" } ], "has_web_view": 1, @@ -1074,7 +1067,7 @@ "index_web_pages_for_search": 1, "links": [], "max_attachments": 1, - "modified": "2021-07-06 00:46:15.878648", + "modified": "2021-07-13 01:29:06.071827", "modified_by": "Administrator", "module": "Stock", "name": "Item", diff --git a/erpnext/stock/doctype/item_default/item_default.json b/erpnext/stock/doctype/item_default/item_default.json index 96b5dfdc8f7..bc171604f43 100644 --- a/erpnext/stock/doctype/item_default/item_default.json +++ b/erpnext/stock/doctype/item_default/item_default.json @@ -1,464 +1,118 @@ { - "allow_copy": 0, - "allow_events_in_timeline": 0, - "allow_guest_to_view": 0, - "allow_import": 0, - "allow_rename": 0, - "beta": 0, - "creation": "2018-05-03 02:29:24.444341", - "custom": 0, - "docstatus": 0, - "doctype": "DocType", - "document_type": "", - "editable_grid": 1, - "engine": "InnoDB", + "actions": [], + "creation": "2018-05-03 02:29:24.444341", + "doctype": "DocType", + "editable_grid": 1, + "engine": "InnoDB", + "field_order": [ + "company", + "default_warehouse", + "column_break_3", + "default_price_list", + "default_discount_account", + "purchase_defaults", + "buying_cost_center", + "default_supplier", + "column_break_8", + "expense_account", + "selling_defaults", + "selling_cost_center", + "column_break_12", + "income_account" + ], "fields": [ { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "company", - "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": 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": 1, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, + "fieldname": "company", + "fieldtype": "Link", + "ignore_user_permissions": 1, + "in_list_view": 1, + "label": "Company", + "options": "Company", + "reqd": 1 + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "default_warehouse", - "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": "Default Warehouse", - "length": 0, - "no_copy": 0, - "options": "Warehouse", - "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 - }, + "fieldname": "default_warehouse", + "fieldtype": "Link", + "in_list_view": 1, + "label": "Default Warehouse", + "options": "Warehouse" + }, { - "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, - "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 - }, + "fieldname": "column_break_3", + "fieldtype": "Column Break" + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "default_price_list", - "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": "Default Price List", - "length": 0, - "no_copy": 0, - "options": "Price List", - "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 - }, + "fieldname": "default_price_list", + "fieldtype": "Link", + "in_list_view": 1, + "label": "Default Price List", + "options": "Price List" + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "purchase_defaults", - "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": "Purchase Defaults", - "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 - }, + "fieldname": "purchase_defaults", + "fieldtype": "Section Break", + "label": "Purchase Defaults" + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "buying_cost_center", - "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": "Default Buying Cost Center", - "length": 0, - "no_copy": 0, - "options": "Cost Center", - "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 - }, + "fieldname": "buying_cost_center", + "fieldtype": "Link", + "label": "Default Buying Cost Center", + "options": "Cost Center" + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "default_supplier", - "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": "Default Supplier", - "length": 0, - "no_copy": 0, - "options": "Supplier", - "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 - }, + "fieldname": "default_supplier", + "fieldtype": "Link", + "label": "Default Supplier", + "options": "Supplier" + }, { - "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 - }, + "fieldname": "column_break_8", + "fieldtype": "Column Break" + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "expense_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": "Default Expense 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 - }, + "fieldname": "expense_account", + "fieldtype": "Link", + "label": "Default Expense Account", + "options": "Account" + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "selling_defaults", - "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": "Sales Defaults", - "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 - }, + "fieldname": "selling_defaults", + "fieldtype": "Section Break", + "label": "Sales Defaults" + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "selling_cost_center", - "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": "Default Selling Cost Center", - "length": 0, - "no_copy": 0, - "options": "Cost Center", - "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 - }, + "fieldname": "selling_cost_center", + "fieldtype": "Link", + "label": "Default Selling Cost Center", + "options": "Cost Center" + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "column_break_12", - "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 - }, + "fieldname": "column_break_12", + "fieldtype": "Column Break" + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "income_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": "Default Income 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 + "fieldname": "income_account", + "fieldtype": "Link", + "label": "Default Income Account", + "options": "Account" + }, + { + "fieldname": "default_discount_account", + "fieldtype": "Link", + "label": "Default Discount Account", + "options": "Account" } - ], - "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-12-07 11:48:07.638935", - "modified_by": "Administrator", - "module": "Stock", - "name": "Item Default", - "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, + "links": [], + "modified": "2021-07-13 01:26:03.860065", + "modified_by": "Administrator", + "module": "Stock", + "name": "Item Default", + "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/stock/get_item_details.py b/erpnext/stock/get_item_details.py index 662ca379096..cec485cc110 100644 --- a/erpnext/stock/get_item_details.py +++ b/erpnext/stock/get_item_details.py @@ -591,8 +591,8 @@ def get_default_expense_account(args, item, item_group, brand): or brand.get("expense_account") or args.expense_account) -def get_default_discount_account(args, item_defaults): - return (item_defaults.default_discount_account +def get_default_discount_account(args, item): + return (item.get("default_discount_account") or args.discount_account) def get_default_deferred_account(args, item, fieldname=None): From b85d3017a11a87cf69383229b25694c175ce30c9 Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Tue, 13 Jul 2021 01:43:41 +0530 Subject: [PATCH 14/95] fix: Filter options for Default Discount Account --- erpnext/stock/doctype/item/item.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/erpnext/stock/doctype/item/item.js b/erpnext/stock/doctype/item/item.js index 45e3c21b27d..4d8749683c5 100644 --- a/erpnext/stock/doctype/item/item.js +++ b/erpnext/stock/doctype/item/item.js @@ -275,6 +275,17 @@ $.extend(erpnext.item, { } } + frm.fields_dict["item_defaults"].grid.get_field("default_discount_account").get_query = function(doc, cdt, cdn) { + const row = locals[cdt][cdn]; + return { + filters: { + 'report_type': 'Profit and Loss', + 'company': row.company, + "is_group": 0 + } + } + } + frm.fields_dict["item_defaults"].grid.get_field("buying_cost_center").get_query = function(doc, cdt, cdn) { const row = locals[cdt][cdn]; return { From 555852c5ef22ef18b609a8e8a667e42b7f325d19 Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Tue, 13 Jul 2021 02:06:03 +0530 Subject: [PATCH 15/95] fix: Add Discount Account field --- .../purchase_invoice_item/purchase_invoice_item.json | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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 b39022dd758..922b567d152 100644 --- a/erpnext/accounts/doctype/purchase_invoice_item/purchase_invoice_item.json +++ b/erpnext/accounts/doctype/purchase_invoice_item/purchase_invoice_item.json @@ -73,6 +73,7 @@ "manufacturer_part_no", "accounting", "expense_account", + "discount_account", "col_break5", "is_fixed_asset", "asset_location", @@ -849,12 +850,18 @@ "options": "Company:company:default_currency", "print_hide": 1, "read_only": 1 + }, + { + "fieldname": "discount_account", + "fieldtype": "Link", + "label": "Discount Account", + "options": "Account" } ], "idx": 1, "istable": 1, "links": [], - "modified": "2021-06-16 19:43:51.099386", + "modified": "2021-07-13 02:04:37.787882", "modified_by": "Administrator", "module": "Accounts", "name": "Purchase Invoice Item", From 4b8918e8a774d48804e2e3670294c279e0ebfd3e Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Tue, 13 Jul 2021 02:07:46 +0530 Subject: [PATCH 16/95] fix: Display Discount Account only if Enable Discount Accounting is checked --- .../accounts/doctype/accounts_settings/accounts_settings.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/accounts_settings/accounts_settings.py b/erpnext/accounts/doctype/accounts_settings/accounts_settings.py index 9e33eb395b7..d1abdba3792 100644 --- a/erpnext/accounts/doctype/accounts_settings/accounts_settings.py +++ b/erpnext/accounts/doctype/accounts_settings/accounts_settings.py @@ -38,5 +38,7 @@ class AccountsSettings(Document): def toggle_discount_accounting_fields(self): enable_discount_accounting = cint(self.enable_discount_accounting) - make_property_setter("Sales Invoice Item", "discount_account", "hidden", not(enable_discount_accounting), "Check", validate_fields_for_doctype=False) + for doctype in ["Sales Invoice Item", "Purchase Invoice Item"]: + make_property_setter(doctype, "discount_account", "hidden", not(enable_discount_accounting), "Check", validate_fields_for_doctype=False) + make_property_setter("Item", "default_discount_account", "hidden", not(enable_discount_accounting), "Check", validate_fields_for_doctype=False) \ No newline at end of file From 81375aec1f05669503ff57437bd532e10ea9deaa Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Tue, 13 Jul 2021 02:09:40 +0530 Subject: [PATCH 17/95] fix: Copy Discount Account from first row --- erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js index 7562418fd2f..69c50b452ce 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js @@ -365,7 +365,7 @@ erpnext.accounts.PurchaseInvoice = class PurchaseInvoice extends erpnext.buying. items_add(doc, cdt, cdn) { var row = frappe.get_doc(cdt, cdn); this.frm.script_manager.copy_from_first_row("items", row, - ["expense_account", "cost_center", "project"]); + ["expense_account", "discount_account", "cost_center", "project"]); } on_submit() { From 65e2b9fee6406b2981baae5a9d2e90c96504089d Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Tue, 13 Jul 2021 02:14:18 +0530 Subject: [PATCH 18/95] fix: Filter options for Discount Account --- .../doctype/purchase_invoice/purchase_invoice.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js index 69c50b452ce..66fa15bc12e 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js @@ -508,6 +508,16 @@ frappe.ui.form.on("Purchase Invoice", { } } } + + frm.fields_dict['items'].grid.get_field('discount_account').get_query = function(doc) { + return { + filters: { + 'report_type': 'Profit and Loss', + 'company': doc.company, + "is_group": 0 + } + } + } }, refresh: function(frm) { From 8f7b0a17534faefc3b28dc3976e5a23e9d4597d3 Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Tue, 13 Jul 2021 03:01:02 +0530 Subject: [PATCH 19/95] fix: Create common function for discount accounting --- .../purchase_invoice/purchase_invoice.py | 1 + .../doctype/sales_invoice/sales_invoice.py | 34 -------------- erpnext/controllers/accounts_controller.py | 45 +++++++++++++++++++ 3 files changed, 46 insertions(+), 34 deletions(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py index c1cc092554d..fdaa7f091b4 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py @@ -446,6 +446,7 @@ class PurchaseInvoice(BuyingController): self.make_supplier_gl_entry(gl_entries) self.make_item_gl_entries(gl_entries) + self.make_discount_gl_entries(gl_entries) if self.check_asset_cwip_enabled(): self.get_asset_gl_entry(gl_entries) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index 15e79513593..02d847031fc 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -959,40 +959,6 @@ class SalesInvoice(SellingController): erpnext.is_perpetual_inventory_enabled(self.company): gl_entries += super(SalesInvoice, self).get_gl_entries() - def make_discount_gl_entries(self, gl_entries): - enable_discount_accounting = cint(frappe.db.get_single_value('Accounts Settings', 'enable_discount_accounting')) - - if enable_discount_accounting: - for item in self.get("items"): - if item.get('discount_amount') and item.get('discount_account'): - account_currency = get_account_currency(item.discount_account) - gl_entries.append( - self.get_gl_dict({ - "account": item.discount_account, - "against": self.customer, - "debit": flt(item.discount_amount), - "debit_in_account_currency": flt(item.discount_amount), - "cost_center": self.cost_center, - "project": self.project - }, account_currency, item=self) - ) - - income_account = (item.income_account - if (not item.enable_deferred_revenue or self.is_return) - else item.deferred_revenue_account) - - account_currency = get_account_currency(income_account) - gl_entries.append( - self.get_gl_dict({ - "account": income_account, - "against": self.customer, - "credit": flt(item.discount_amount), - "credit_in_account_currency": flt(item.discount_amount), - "cost_center": item.cost_center, - "project": item.project or self.project - }, account_currency, item=item) - ) - def make_loyalty_point_redemption_gle(self, gl_entries): if cint(self.redeem_loyalty_points): gl_entries.append( diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index 1c086e9edcd..dac7f0bd9e3 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -741,6 +741,51 @@ class AccountsController(TransactionBase): tax_map[tax.account_head] -= allocated_amount allocated_tax_map[tax.account_head] -= allocated_amount + def make_discount_gl_entries(self, gl_entries): + enable_discount_accounting = cint(frappe.db.get_single_value('Accounts Settings', 'enable_discount_accounting')) + + if enable_discount_accounting: + for item in self.get("items"): + if item.get('discount_amount') and item.get('discount_account'): + if self.doctype == "Purchase Invoice": + dr_or_cr = "credit" + rev_dr_cr = "debit" + supplier_or_customer = self.supplier + income_or_expense_account = (item.expense_account + if (not item.enable_deferred_expense or self.is_return) + else item.deferred_expense_account) + else: + dr_or_cr = "debit" + rev_dr_cr = "credit" + supplier_or_customer = self.customer + income_or_expense_account = (item.income_account + if (not item.enable_deferred_revenue or self.is_return) + else item.deferred_revenue_account) + + account_currency = get_account_currency(item.discount_account) + gl_entries.append( + self.get_gl_dict({ + "account": item.discount_account, + "against": supplier_or_customer, + dr_or_cr: flt(item.discount_amount), + dr_or_cr + "_in_account_currency": flt(item.discount_amount), + "cost_center": self.cost_center, + "project": self.project + }, account_currency, item=self) + ) + + account_currency = get_account_currency(income_or_expense_account) + gl_entries.append( + self.get_gl_dict({ + "account": income_or_expense_account, + "against": supplier_or_customer, + rev_dr_cr: flt(item.discount_amount), + rev_dr_cr + "_in_account_currency": flt(item.discount_amount), + "cost_center": item.cost_center, + "project": item.project or self.project + }, account_currency, item=item) + ) + def allocate_advance_taxes(self, gl_entries): tax_map = self.get_tax_map() for pe in self.get("advances"): From 2f4c607fc86ac7780491b52f5ef1540a0c8e3598 Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Tue, 13 Jul 2021 17:41:29 +0530 Subject: [PATCH 20/95] fix: Add tests for discount accounting --- .../purchase_invoice/test_purchase_invoice.py | 20 ++++++++++++++++++- .../sales_invoice/test_sales_invoice.py | 15 ++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py index 189260a29da..1dc048ade02 100644 --- a/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py @@ -251,6 +251,16 @@ class TestPurchaseInvoice(unittest.TestCase): self.assertEqual(discrepancy_caused_by_exchange_rate_diff, amount) + def test_purchase_invoice_with_discount_accounting_enabled(self): + enable_discount_accounting() + + discount_account = create_account(account_name="Discount Account", + parent_account="Indirect Expenses - _TC", company="_Test Company") + pi = make_purchase_invoice(discount_account=discount_account, discount_amount=100) + + discount_amount = frappe.db.get_value('GL Entry', {'account': discount_account, 'voucher_no': pi.name}, 'credit') + self.assertEqual(discount_amount, 100) + def test_purchase_invoice_change_naming_series(self): pi = frappe.copy_doc(test_records[1]) pi.insert() @@ -1077,6 +1087,11 @@ def unlink_payment_on_cancel_of_invoice(enable=1): accounts_settings.unlink_payment_on_cancellation_of_invoice = enable accounts_settings.save() +def enable_discount_accounting(enable=1): + accounts_settings = frappe.get_doc("Accounts Settings") + accounts_settings.enable_discount_accounting = enable + accounts_settings.save() + def make_purchase_invoice(**args): pi = frappe.new_doc("Purchase Invoice") args = frappe._dict(args) @@ -1099,6 +1114,7 @@ def make_purchase_invoice(**args): pi.return_against = args.return_against pi.is_subcontracted = args.is_subcontracted or "No" pi.supplier_warehouse = args.supplier_warehouse or "_Test Warehouse 1 - _TC" + pi.cost_center = args.cost_center or "_Test Cost Center - _TC" pi.append("items", { "item_code": args.item or args.item_code or "_Test Item", @@ -1107,7 +1123,9 @@ def make_purchase_invoice(**args): "received_qty": args.received_qty or 0, "rejected_qty": args.rejected_qty or 0, "rate": args.rate or 50, - 'expense_account': args.expense_account or '_Test Account Cost for Goods Sold - _TC', + "expense_account": args.expense_account or '_Test Account Cost for Goods Sold - _TC', + "discount_account": args.discount_account or None, + "discount_amount": args.discount_amount or 0, "conversion_factor": 1.0, "serial_no": args.serial_no, "stock_uom": args.uom or "_Test UOM", diff --git a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py index fe531d3b227..d90a00941f8 100644 --- a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py @@ -1984,6 +1984,18 @@ class TestSalesInvoice(unittest.TestCase): sales_invoice.save() self.assertEqual(sales_invoice.items[0].item_tax_template, "_Test Account Excise Duty @ 10 - _TC") + def test_sales_invoice_with_discount_accounting_enabled(self): + from erpnext.accounts.doctype.purchase_invoice.test_purchase_invoice import enable_discount_accounting + + enable_discount_accounting() + + discount_account = create_account(account_name="Discount Account", + parent_account="Indirect Expenses - _TC", company="_Test Company") + si = create_sales_invoice(discount_account=discount_account, discount_amount=100) + + discount_amount = frappe.db.get_value('GL Entry', {'account': discount_account, 'voucher_no': si.name}, 'debit') + self.assertEqual(discount_amount, 100) + def get_sales_invoice_for_e_invoice(): si = make_sales_invoice_for_ewaybill() si.naming_series = 'INV-2020-.#####' @@ -2151,6 +2163,7 @@ def create_sales_invoice(**args): si.currency=args.currency or "INR" si.conversion_rate = args.conversion_rate or 1 si.naming_series = args.naming_series or "T-SINV-" + si.cost_center = args.cost_center or "_Test Cost Center - _TC" si.append("items", { "item_code": args.item or args.item_code or "_Test Item", @@ -2164,6 +2177,8 @@ def create_sales_invoice(**args): "rate": args.rate if args.get("rate") is not None else 100, "income_account": args.income_account or "Sales - _TC", "expense_account": args.expense_account or "Cost of Goods Sold - _TC", + "discount_account": args.discount_account or None, + "discount_amount": args.discount_amount or 0, "cost_center": args.cost_center or "_Test Cost Center - _TC", "serial_no": args.serial_no, "conversion_factor": 1 From 4f2bf989667948a736738189ca8ff400902a26b4 Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Thu, 15 Jul 2021 22:01:02 +0530 Subject: [PATCH 21/95] fix: Add Additional Discount Account field --- .../accounts/doctype/sales_invoice/sales_invoice.json | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.json b/erpnext/accounts/doctype/sales_invoice/sales_invoice.json index e7dd6b8a606..5c09b71cf35 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.json +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.json @@ -104,6 +104,7 @@ "section_break_49", "apply_discount_on", "base_discount_amount", + "additional_discount_account", "column_break_51", "additional_discount_percentage", "discount_amount", @@ -1966,6 +1967,12 @@ "fieldname": "disable_rounded_total", "fieldtype": "Check", "label": "Disable Rounded Total" + }, + { + "fieldname": "additional_discount_account", + "fieldtype": "Link", + "label": "Additional Discount Account", + "options": "Account" } ], "icon": "fa fa-file-text", @@ -1978,7 +1985,7 @@ "link_fieldname": "consolidated_invoice" } ], - "modified": "2021-05-20 22:48:33.988881", + "modified": "2021-07-15 21:57:17.544279", "modified_by": "Administrator", "module": "Accounts", "name": "Sales Invoice", From 8e96e2d5a24121c74078b214690aeac4e5ff3a7f Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Thu, 15 Jul 2021 22:01:38 +0530 Subject: [PATCH 22/95] fix: Filter options for Additional Discount Account --- .../accounts/doctype/sales_invoice/sales_invoice.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js index 288e2a7566f..9beb593b4c0 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js @@ -591,6 +591,16 @@ frappe.ui.form.on('Sales Invoice', { }; }); + frm.set_query("additional_discount_account", function() { + return { + filters: { + company: frm.doc.company, + is_group: 0, + root_type: "Profit and Loss", + } + }; + }); + frm.custom_make_buttons = { 'Delivery Note': 'Delivery', 'Sales Invoice': 'Return / Credit Note', From 40412f7e618fd3f36eaa5b33c7805c0acc5c5127 Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Thu, 15 Jul 2021 22:02:43 +0530 Subject: [PATCH 23/95] fix: Only display Additional Discount Account if Enable Discount Accounting is checked --- .../accounts/doctype/accounts_settings/accounts_settings.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/accounts_settings/accounts_settings.py b/erpnext/accounts/doctype/accounts_settings/accounts_settings.py index d1abdba3792..053f061acc7 100644 --- a/erpnext/accounts/doctype/accounts_settings/accounts_settings.py +++ b/erpnext/accounts/doctype/accounts_settings/accounts_settings.py @@ -41,4 +41,5 @@ class AccountsSettings(Document): for doctype in ["Sales Invoice Item", "Purchase Invoice Item"]: make_property_setter(doctype, "discount_account", "hidden", not(enable_discount_accounting), "Check", validate_fields_for_doctype=False) - make_property_setter("Item", "default_discount_account", "hidden", not(enable_discount_accounting), "Check", validate_fields_for_doctype=False) \ No newline at end of file + make_property_setter("Item", "default_discount_account", "hidden", not(enable_discount_accounting), "Check", validate_fields_for_doctype=False) + make_property_setter("Sales Invoice", "additional_discount_account", "hidden", not(enable_discount_accounting), "Check", validate_fields_for_doctype=False) \ No newline at end of file From 857501cbe1e0ba8e5c6f13d3c7ad29038cdc084e Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Thu, 15 Jul 2021 22:03:46 +0530 Subject: [PATCH 24/95] fix: Make additional GL Entries for discount applied on taxes --- erpnext/controllers/accounts_controller.py | 36 ++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index dac7f0bd9e3..64ed67c40a6 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -785,6 +785,42 @@ class AccountsController(TransactionBase): "project": item.project or self.project }, account_currency, item=item) ) + + if self.get('discount_amount') and self.get('additional_discount_account'): + self.make_gle_for_additional_discount_applied_on_taxes(gl_entries) + + def make_gle_for_additional_discount_applied_on_taxes(self, gl_entries): + for tax in self.get("taxes"): + if flt(tax.base_tax_amount_after_discount_amount) and flt(tax.base_tax_amount): + account_currency = get_account_currency(tax.account_head) + additional_discount_applied_on_taxes = flt(tax.base_tax_amount) - flt(tax.base_tax_amount_after_discount_amount) + + gl_entries.append( + self.get_gl_dict({ + "account": tax.account_head, + "against": self.customer, + "credit": flt(additional_discount_applied_on_taxes, + tax.precision("tax_amount_after_discount_amount")), + "credit_in_account_currency": (flt(additional_discount_applied_on_taxes, + tax.precision("base_tax_amount_after_discount_amount")) if account_currency==self.company_currency else + flt(additional_discount_applied_on_taxes, tax.precision("tax_amount_after_discount_amount"))), + "cost_center": tax.cost_center + }, account_currency, item=tax) + ) + + gl_entries.append( + self.get_gl_dict({ + "account": self.additional_discount_account, + "against": self.customer, + "debit": flt(additional_discount_applied_on_taxes, + tax.precision("tax_amount_after_discount_amount")), + "debit_in_account_currency": (flt(additional_discount_applied_on_taxes, + tax.precision("base_tax_amount_after_discount_amount")) if account_currency==self.company_currency else + flt(additional_discount_applied_on_taxes, tax.precision("tax_amount_after_discount_amount"))), + "cost_center": tax.cost_center + }, account_currency, item=tax) + ) + def allocate_advance_taxes(self, gl_entries): tax_map = self.get_tax_map() From 6bff653cf0a0c8820967346bfd4ed1566c85c877 Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Fri, 16 Jul 2021 02:18:45 +0530 Subject: [PATCH 25/95] fix: Sider issues --- erpnext/stock/doctype/item/item.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/stock/doctype/item/item.js b/erpnext/stock/doctype/item/item.js index 4d8749683c5..77ffa4b71d4 100644 --- a/erpnext/stock/doctype/item/item.js +++ b/erpnext/stock/doctype/item/item.js @@ -283,8 +283,8 @@ $.extend(erpnext.item, { 'company': row.company, "is_group": 0 } - } - } + }; + }; frm.fields_dict["item_defaults"].grid.get_field("buying_cost_center").get_query = function(doc, cdt, cdn) { const row = locals[cdt][cdn]; From b0f21824bc08e1c84aac9cab494d7fdd89df7b86 Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Sat, 17 Jul 2021 17:34:50 +0530 Subject: [PATCH 26/95] fix: Check all expected GL Entries --- .../doctype/purchase_invoice/test_purchase_invoice.py | 11 +++++++++-- .../doctype/sales_invoice/test_sales_invoice.py | 9 +++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py index 1dc048ade02..0ac816ec726 100644 --- a/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py @@ -252,14 +252,21 @@ class TestPurchaseInvoice(unittest.TestCase): self.assertEqual(discrepancy_caused_by_exchange_rate_diff, amount) def test_purchase_invoice_with_discount_accounting_enabled(self): + from erpnext.accounts.doctype.sales_invoice.test_sales_invoice import check_gl_entries + enable_discount_accounting() discount_account = create_account(account_name="Discount Account", parent_account="Indirect Expenses - _TC", company="_Test Company") pi = make_purchase_invoice(discount_account=discount_account, discount_amount=100) - discount_amount = frappe.db.get_value('GL Entry', {'account': discount_account, 'voucher_no': pi.name}, 'credit') - self.assertEqual(discount_amount, 100) + expected_gle = [ + ["Discount Account - _TC", 0.0, 100.0, nowdate()], + ["_Test Account Cost for Goods Sold - _TC", 350.0, 0.0, nowdate()], + ["Creditors - _TC", 0.0, 250.0, nowdate()] + ] + + check_gl_entries(self, pi.name, expected_gle, nowdate()) def test_purchase_invoice_change_naming_series(self): pi = frappe.copy_doc(test_records[1]) diff --git a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py index d90a00941f8..4699732aca0 100644 --- a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py @@ -1992,9 +1992,14 @@ class TestSalesInvoice(unittest.TestCase): discount_account = create_account(account_name="Discount Account", parent_account="Indirect Expenses - _TC", company="_Test Company") si = create_sales_invoice(discount_account=discount_account, discount_amount=100) + + expected_gle = [ + ["Discount Account - _TC", 100.0, 0.0, nowdate()], + ["Sales - _TC", 0.0, 200.0, nowdate()], + ["Debtors - _TC", 100.0, 0.0, nowdate()] + ] - discount_amount = frappe.db.get_value('GL Entry', {'account': discount_account, 'voucher_no': si.name}, 'debit') - self.assertEqual(discount_amount, 100) + check_gl_entries(self, si.name, expected_gle, nowdate()) def get_sales_invoice_for_e_invoice(): si = make_sales_invoice_for_ewaybill() From 87d448e03943778ad0ddc8e47f0ee9049b39620d Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Sat, 17 Jul 2021 17:40:43 +0530 Subject: [PATCH 27/95] fix: Add Additional Discount Account field --- .../doctype/purchase_invoice/purchase_invoice.json | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json index 00ef7d5c184..96ae828f464 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json @@ -96,6 +96,7 @@ "section_break_44", "apply_discount_on", "base_discount_amount", + "additional_discount_account", "column_break_46", "additional_discount_percentage", "discount_amount", @@ -1377,13 +1378,19 @@ "no_copy": 1, "print_hide": 1, "read_only": 1 + }, + { + "fieldname": "additional_discount_account", + "fieldtype": "Link", + "label": "Additional Discount Account", + "options": "Account" } ], "icon": "fa fa-file-text", "idx": 204, "is_submittable": 1, "links": [], - "modified": "2021-06-15 18:20:56.806195", + "modified": "2021-07-17 17:37:50.570595", "modified_by": "Administrator", "module": "Accounts", "name": "Purchase Invoice", From 7bbc9a886da783f1149db8bed570c16b72c24ab7 Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Sat, 17 Jul 2021 17:41:06 +0530 Subject: [PATCH 28/95] fix: Filter options for Additional Discount Account --- .../doctype/purchase_invoice/purchase_invoice.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js index 66fa15bc12e..435fc1e0c1d 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js @@ -499,6 +499,16 @@ frappe.ui.form.on("Purchase Invoice", { 'Payment Entry': 'Payment' } + frm.set_query("additional_discount_account", function() { + return { + filters: { + company: frm.doc.company, + is_group: 0, + root_type: "Profit and Loss", + } + }; + }); + frm.fields_dict['items'].grid.get_field('deferred_expense_account').get_query = function(doc) { return { filters: { From fa4c03e7a111602fbdf6175f9960bbce0add9a0c Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Sat, 17 Jul 2021 17:42:36 +0530 Subject: [PATCH 29/95] fix: Create ledger entries for discount applied on taxes in make_tax_gl_entries --- .../accounts/doctype/purchase_invoice/purchase_invoice.py | 5 +++++ erpnext/accounts/doctype/sales_invoice/sales_invoice.py | 5 +++++ erpnext/controllers/accounts_controller.py | 3 --- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py index fdaa7f091b4..cdb9bb29249 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py @@ -917,6 +917,11 @@ class PurchaseInvoice(BuyingController): "remarks": self.remarks or "Accounting Entry for Stock" }, item=tax)) + enable_discount_accounting = cint(frappe.db.get_single_value('Accounts Settings', 'enable_discount_accounting')) + + if enable_discount_accounting and self.get('discount_amount') and self.get('additional_discount_account'): + self.make_gle_for_additional_discount_applied_on_taxes(gl_entries) + def make_internal_transfer_gl_entries(self, gl_entries): if self.is_internal_transfer() and flt(self.base_total_taxes_and_charges): account_currency = get_account_currency(self.unrealized_profit_loss_account) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index 02d847031fc..5ebc5e6339b 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -901,6 +901,11 @@ class SalesInvoice(SellingController): }, account_currency, item=tax) ) + enable_discount_accounting = cint(frappe.db.get_single_value('Accounts Settings', 'enable_discount_accounting')) + + if enable_discount_accounting and self.get('discount_amount') and self.get('additional_discount_account'): + self.make_gle_for_additional_discount_applied_on_taxes(gl_entries) + def make_internal_transfer_gl_entries(self, gl_entries): if self.is_internal_transfer() and flt(self.base_total_taxes_and_charges): account_currency = get_account_currency(self.unrealized_profit_loss_account) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index 64ed67c40a6..700a0e6645b 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -785,9 +785,6 @@ class AccountsController(TransactionBase): "project": item.project or self.project }, account_currency, item=item) ) - - if self.get('discount_amount') and self.get('additional_discount_account'): - self.make_gle_for_additional_discount_applied_on_taxes(gl_entries) def make_gle_for_additional_discount_applied_on_taxes(self, gl_entries): for tax in self.get("taxes"): From c2ba6897b09d2936fa2768cfb4cb720fafc2a99f Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Sat, 17 Jul 2021 17:45:35 +0530 Subject: [PATCH 30/95] fix: Only display Additional Discount Account if Enable Discount Accounting is checked --- .../accounts/doctype/accounts_settings/accounts_settings.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/accounts_settings/accounts_settings.py b/erpnext/accounts/doctype/accounts_settings/accounts_settings.py index 053f061acc7..24b0ec4d4a8 100644 --- a/erpnext/accounts/doctype/accounts_settings/accounts_settings.py +++ b/erpnext/accounts/doctype/accounts_settings/accounts_settings.py @@ -41,5 +41,7 @@ class AccountsSettings(Document): for doctype in ["Sales Invoice Item", "Purchase Invoice Item"]: make_property_setter(doctype, "discount_account", "hidden", not(enable_discount_accounting), "Check", validate_fields_for_doctype=False) - make_property_setter("Item", "default_discount_account", "hidden", not(enable_discount_accounting), "Check", validate_fields_for_doctype=False) - make_property_setter("Sales Invoice", "additional_discount_account", "hidden", not(enable_discount_accounting), "Check", validate_fields_for_doctype=False) \ No newline at end of file + for doctype in ["Sales Invoice", "Purchase Invoice"]: + make_property_setter(doctype, "additional_discount_account", "hidden", not(enable_discount_accounting), "Check", validate_fields_for_doctype=False) + + make_property_setter("Item", "default_discount_account", "hidden", not(enable_discount_accounting), "Check", validate_fields_for_doctype=False) \ No newline at end of file From c4d2dc0da336ff1811b0daca07e1386ebeea382f Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Sat, 17 Jul 2021 17:47:20 +0530 Subject: [PATCH 31/95] fix: Remove unnecessary condition --- .../accounts/doctype/sales_invoice/sales_invoice.js | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js index 9beb593b4c0..3fb20d9d510 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js @@ -629,13 +629,11 @@ frappe.ui.form.on('Sales Invoice', { // discount account frm.fields_dict['items'].grid.get_field('discount_account').get_query = function(doc) { - if (erpnext.is_perpetual_inventory_enabled(doc.company)) { - return { - filters: { - 'report_type': 'Profit and Loss', - 'company': doc.company, - "is_group": 0 - } + return { + filters: { + 'report_type': 'Profit and Loss', + 'company': doc.company, + "is_group": 0 } } } From 99551e9b7f25bb7092112a40b5282e087ecd3ecd Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Sat, 17 Jul 2021 18:45:21 +0530 Subject: [PATCH 32/95] fix: Add test for additional discount applied on taxes --- .../sales_invoice/test_sales_invoice.py | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py index 4699732aca0..8615963e4ad 100644 --- a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py @@ -2001,6 +2001,35 @@ class TestSalesInvoice(unittest.TestCase): check_gl_entries(self, si.name, expected_gle, nowdate()) + def test_additional_discount_for_sales_invoice_with_discount_accounting_enabled(self): + from erpnext.accounts.doctype.purchase_invoice.test_purchase_invoice import enable_discount_accounting + + enable_discount_accounting() + additional_discount_account = create_account(account_name="Discount Account", + parent_account="Indirect Expenses - _TC", company="_Test Company") + + si = create_sales_invoice(rate=75000, do_not_save=1) + si.apply_discount_on = "Grand Total" + si.additional_discount_account = additional_discount_account + si.additional_discount_percentage = 10 + si.append("taxes", { + "charge_type": "On Net Total", + "account_head": "CGST - _TC", + "cost_center": "Main - _TC", + "description": "CGST @ 9.0", + "rate": 9 + }) + si.submit() + + expected_gle = [ + ["Sales - _TC", 0.0, 67500.0, nowdate()], + ["Discount Account - _TC", 675.0, 0.0, nowdate()], + ["CGST - _TC", 0.0, 6750.0, nowdate()], + ["Debtors - _TC", 73575.0, 0.0, nowdate()] + ] + + check_gl_entries(self, si.name, expected_gle, nowdate()) + def get_sales_invoice_for_e_invoice(): si = make_sales_invoice_for_ewaybill() si.naming_series = 'INV-2020-.#####' From 228499369cc05f9aefed76f41db6b9faad7457b7 Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Sat, 17 Jul 2021 19:49:16 +0530 Subject: [PATCH 33/95] fix: Switch debit and credit for ledger entries for discount applied on taxes for Purchase Invoice --- erpnext/controllers/accounts_controller.py | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index 700a0e6645b..f32f5bdc954 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -791,14 +791,22 @@ class AccountsController(TransactionBase): if flt(tax.base_tax_amount_after_discount_amount) and flt(tax.base_tax_amount): account_currency = get_account_currency(tax.account_head) additional_discount_applied_on_taxes = flt(tax.base_tax_amount) - flt(tax.base_tax_amount_after_discount_amount) + if self.doctype == 'Purchase Invoice': + against = self.supplier + dr_or_cr = "debit" + rev_dr_cr = "credit" + else: + against = self.customer + dr_or_cr = "credit" + rev_dr_cr = "debit" gl_entries.append( self.get_gl_dict({ "account": tax.account_head, - "against": self.customer, - "credit": flt(additional_discount_applied_on_taxes, + "against": against, + dr_or_cr: flt(additional_discount_applied_on_taxes, tax.precision("tax_amount_after_discount_amount")), - "credit_in_account_currency": (flt(additional_discount_applied_on_taxes, + dr_or_cr + "_in_account_currency": (flt(additional_discount_applied_on_taxes, tax.precision("base_tax_amount_after_discount_amount")) if account_currency==self.company_currency else flt(additional_discount_applied_on_taxes, tax.precision("tax_amount_after_discount_amount"))), "cost_center": tax.cost_center @@ -808,17 +816,16 @@ class AccountsController(TransactionBase): gl_entries.append( self.get_gl_dict({ "account": self.additional_discount_account, - "against": self.customer, - "debit": flt(additional_discount_applied_on_taxes, + "against": against, + rev_dr_cr: flt(additional_discount_applied_on_taxes, tax.precision("tax_amount_after_discount_amount")), - "debit_in_account_currency": (flt(additional_discount_applied_on_taxes, + rev_dr_cr + "_in_account_currency": (flt(additional_discount_applied_on_taxes, tax.precision("base_tax_amount_after_discount_amount")) if account_currency==self.company_currency else flt(additional_discount_applied_on_taxes, tax.precision("tax_amount_after_discount_amount"))), "cost_center": tax.cost_center }, account_currency, item=tax) ) - def allocate_advance_taxes(self, gl_entries): tax_map = self.get_tax_map() for pe in self.get("advances"): From d6956ff075219293a761ff4c039f7bf476bb6a45 Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Sat, 17 Jul 2021 19:49:42 +0530 Subject: [PATCH 34/95] fix: Add test for additional discount applied on taxes --- .../purchase_invoice/test_purchase_invoice.py | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py index 0ac816ec726..3a09c96d825 100644 --- a/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py @@ -268,6 +268,35 @@ class TestPurchaseInvoice(unittest.TestCase): check_gl_entries(self, pi.name, expected_gle, nowdate()) + def test_additional_discount_for_purchase_invoice_with_discount_accounting_enabled(self): + from erpnext.accounts.doctype.sales_invoice.test_sales_invoice import check_gl_entries + + enable_discount_accounting() + additional_discount_account = create_account(account_name="Discount Account", + parent_account="Indirect Expenses - _TC", company="_Test Company") + + pi = make_purchase_invoice(qty=1, rate=75000, do_not_save=1) + pi.apply_discount_on = "Grand Total" + pi.additional_discount_account = additional_discount_account + pi.additional_discount_percentage = 10 + pi.append("taxes", { + "charge_type": "On Net Total", + "account_head": "CGST - _TC", + "cost_center": "Main - _TC", + "description": "CGST @ 9.0", + "rate": 9 + }) + pi.submit() + + expected_gle = [ + ["Discount Account - _TC", 0.0, 675.0, nowdate()], + ["CGST - _TC", 6750.0, 0.0, nowdate()], + ["_Test Account Cost for Goods Sold - _TC", 67500.0, 0.0, nowdate()], + ["Creditors - _TC", 0.0, 73575.0, nowdate()] + ] + + check_gl_entries(self, pi.name, expected_gle, nowdate()) + def test_purchase_invoice_change_naming_series(self): pi = frappe.copy_doc(test_records[1]) pi.insert() From cde0cc06785bb56521d4d1a13d23476070b3ac94 Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Sat, 17 Jul 2021 22:53:21 +0530 Subject: [PATCH 35/95] fix: Fetch Payment Terms from Sales/Purchase Orders --- .../purchase_invoice/purchase_invoice.js | 19 -------- .../purchase_invoice/purchase_invoice.py | 43 ------------------- .../doctype/purchase_order/purchase_order.py | 12 +++--- erpnext/controllers/accounts_controller.py | 43 +++++++++++++++++++ .../doctype/sales_order/sales_order.py | 6 +++ .../doctype/delivery_note/delivery_note.py | 6 +++ .../purchase_receipt/purchase_receipt.py | 5 +++ 7 files changed, 66 insertions(+), 68 deletions(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js index 10b83c027f7..54b10f583fd 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js @@ -508,8 +508,6 @@ frappe.ui.form.on("Purchase Invoice", { } } } - - frm.events.set_payment_terms(frm); }, refresh: function(frm) { @@ -572,21 +570,4 @@ frappe.ui.form.on("Purchase Invoice", { company: function(frm) { erpnext.accounts.dimensions.update_dimension(frm, frm.doctype); }, - - set_payment_terms: function (frm) { - frappe.call({ - 'method': 'erpnext.accounts.doctype.purchase_invoice.purchase_invoice.set_payment_terms_from_po', - 'args': { - doc: frm.doc - }, - 'callback': (r) => { - if (r.message) { - var doc = frappe.model.sync(r.message)[0]; - console.log("doc: ", doc) - frappe.set_route("Form", doc.doctype, doc.name); - } - } - - }); - }, }) \ No newline at end of file diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py index f30af0c349e..10c6cd6a49e 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py @@ -1173,49 +1173,6 @@ class PurchaseInvoice(BuyingController): if update: self.db_set('status', self.status, update_modified = update_modified) -@frappe.whitelist() -def set_payment_terms_from_po(doc): - if isinstance(doc, six.string_types): - doc = json.loads(doc) - - purchase_order = doc.get('items')[0].get('purchase_order') - - if purchase_order and all_items_have_same_po(doc, purchase_order): - purchase_order = frappe.get_cached_doc('Purchase Order', purchase_order) - else: - return - - if has_default_payment_terms(doc) and not has_default_payment_terms(purchase_order): - doc['payment_schedule'] = [] - doc['payment_terms_template'] = purchase_order.payment_terms_template - - for schedule in purchase_order.payment_schedule: - payment_schedule = { - 'payment_term': schedule.payment_term, - 'due_date': schedule.due_date, - 'invoice_portion': schedule.invoice_portion, - 'discount_type': schedule.discount_type, - 'discount': schedule.discount, - 'base_payment_amount': schedule.base_payment_amount, - 'payment_amount': schedule.payment_amount, - 'outstanding': schedule.outstanding - } - doc['payment_schedule'].append(payment_schedule) - - return doc - -def all_items_have_same_po(doc, purchase_order): - for item in doc.get('items'): - if item.get('purchase_order') != purchase_order: - return False - - return True - -def has_default_payment_terms(doc): - if doc.get('payment_schedule')[0].get('invoice_portion') == 100: - return True - return False - # to get details of purchase invoice/receipt from which this doc was created for exchange rate difference handling def get_purchase_document_details(doc): if doc.doctype == 'Purchase Invoice': diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.py b/erpnext/buying/doctype/purchase_order/purchase_order.py index eaa502ff7f0..a0bac51046f 100644 --- a/erpnext/buying/doctype/purchase_order/purchase_order.py +++ b/erpnext/buying/doctype/purchase_order/purchase_order.py @@ -443,6 +443,8 @@ def make_purchase_invoice_from_portal(purchase_order_name): frappe.response.location = '/purchase-invoices/' + doc.name def get_mapped_purchase_invoice(source_name, target_doc=None, ignore_permissions=False): + from erpnext.controllers.accounts_controller import fetch_payment_terms_from_order + def postprocess(source, target): target.flags.ignore_permissions = ignore_permissions set_missing_values(source, target) @@ -489,15 +491,13 @@ def get_mapped_purchase_invoice(source_name, target_doc=None, ignore_permissions }, } - if frappe.get_single("Accounts Settings").automatically_fetch_payment_terms == 1: - fields["Payment Schedule"] = { - "doctype": "Payment Schedule", - "add_if_empty": True - } - doc = get_mapped_doc("Purchase Order", source_name, fields, target_doc, postprocess, ignore_permissions=ignore_permissions) + automatically_fetch_payment_terms = cint(frappe.db.get_single_value('Accounts Settings', 'automatically_fetch_payment_terms')) + if automatically_fetch_payment_terms: + fetch_payment_terms_from_order(doc) + return doc @frappe.whitelist() diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index 1c086e9edcd..d38c2cbdb5a 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -1730,3 +1730,46 @@ def validate_regional(doc): @erpnext.allow_regional def validate_einvoice_fields(doc): pass + +def fetch_payment_terms_from_order(doc): + """ + Fetch Payment Terms from Purchase/Sales Order on creating a new Purchase/Sales Invoice. + """ + + if doc.doctype == "Sales Invoice": + po_or_so = doc.get('items')[0].get('sales_order') + po_or_so_doctype = "Sales Order" + po_or_so_doctype_name = "sales_order" + else: + po_or_so = doc.get('items')[0].get('purchase_order') + po_or_so_doctype = "Purchase Order" + po_or_so_doctype_name = "purchase_order" + + if po_or_so and all_items_have_same_po_or_so(doc, po_or_so, po_or_so_doctype_name): + po_or_so = frappe.get_cached_doc(po_or_so_doctype, po_or_so) + else: + doc.set_payment_schedule() + return + + doc.payment_schedule = [] + doc.payment_terms_template = po_or_so.payment_terms_template + + for schedule in po_or_so.payment_schedule: + payment_schedule = { + 'payment_term': schedule.payment_term, + 'due_date': schedule.due_date, + 'invoice_portion': schedule.invoice_portion, + 'discount_type': schedule.discount_type, + 'discount': schedule.discount, + 'base_payment_amount': schedule.base_payment_amount, + 'payment_amount': schedule.payment_amount, + 'outstanding': schedule.outstanding + } + doc.append("payment_schedule", payment_schedule) + +def all_items_have_same_po_or_so(doc, po_or_so, po_or_so_fieldname): + for item in doc.get('items'): + if item.get(po_or_so_fieldname) != po_or_so: + return False + + return True \ No newline at end of file diff --git a/erpnext/selling/doctype/sales_order/sales_order.py b/erpnext/selling/doctype/sales_order/sales_order.py index 41f57a34d3d..a58c381df35 100755 --- a/erpnext/selling/doctype/sales_order/sales_order.py +++ b/erpnext/selling/doctype/sales_order/sales_order.py @@ -621,6 +621,8 @@ def make_delivery_note(source_name, target_doc=None, skip_item_mapping=False): @frappe.whitelist() def make_sales_invoice(source_name, target_doc=None, ignore_permissions=False): + from erpnext.controllers.accounts_controller import fetch_payment_terms_from_order + def postprocess(source, target): set_missing_values(source, target) #Get the advance paid Journal Entries in Sales Invoice Advance @@ -693,6 +695,10 @@ def make_sales_invoice(source_name, target_doc=None, ignore_permissions=False): } }, target_doc, postprocess, ignore_permissions=ignore_permissions) + automatically_fetch_payment_terms = cint(frappe.db.get_single_value('Accounts Settings', 'automatically_fetch_payment_terms')) + if automatically_fetch_payment_terms: + fetch_payment_terms_from_order(doclist) + return doclist @frappe.whitelist() diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.py b/erpnext/stock/doctype/delivery_note/delivery_note.py index 4808e948fc6..1628f930191 100644 --- a/erpnext/stock/doctype/delivery_note/delivery_note.py +++ b/erpnext/stock/doctype/delivery_note/delivery_note.py @@ -414,6 +414,8 @@ def get_returned_qty_map(delivery_note): @frappe.whitelist() def make_sales_invoice(source_name, target_doc=None): + from erpnext.controllers.accounts_controller import fetch_payment_terms_from_order + doc = frappe.get_doc('Delivery Note', source_name) to_make_invoice_qty_map = {} @@ -503,6 +505,10 @@ def make_sales_invoice(source_name, target_doc=None): } }, target_doc, set_missing_values) + automatically_fetch_payment_terms = cint(frappe.db.get_single_value('Accounts Settings', 'automatically_fetch_payment_terms')) + if automatically_fetch_payment_terms: + fetch_payment_terms_from_order(doc) + return doc @frappe.whitelist() diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py index 41800e37151..6d72a5fa0bb 100644 --- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py +++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py @@ -604,6 +604,7 @@ def update_billing_percentage(pr_doc, update_modified=True): @frappe.whitelist() def make_purchase_invoice(source_name, target_doc=None): from erpnext.accounts.party import get_payment_terms_template + from erpnext.controllers.accounts_controller import fetch_payment_terms_from_order doc = frappe.get_doc('Purchase Receipt', source_name) returned_qty_map = get_returned_qty_map(source_name) @@ -675,6 +676,10 @@ def make_purchase_invoice(source_name, target_doc=None): } }, target_doc, set_missing_values) + automatically_fetch_payment_terms = cint(frappe.db.get_single_value('Accounts Settings', 'automatically_fetch_payment_terms')) + if automatically_fetch_payment_terms: + fetch_payment_terms_from_order(doclist) + return doclist def get_invoiced_qty_map(purchase_receipt): From 831f5edd027173f843d4475986bda3fd31589201 Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Sat, 17 Jul 2021 22:55:24 +0530 Subject: [PATCH 36/95] fix: Remove unused imports --- erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py index 10c6cd6a49e..c1cc092554d 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py @@ -7,8 +7,6 @@ import frappe, erpnext from frappe.utils import cint, cstr, formatdate, flt, getdate, nowdate, get_link_to_form from frappe import _, throw import frappe.defaults -import json -import six from erpnext.assets.doctype.asset_category.asset_category import get_asset_category_account from erpnext.controllers.buying_controller import BuyingController From 23b1c25ff5652b120585bab11d1a0e33a3ba24a2 Mon Sep 17 00:00:00 2001 From: Subin Tom Date: Mon, 19 Jul 2021 20:09:37 +0530 Subject: [PATCH 37/95] fix:Ignore mandatory fields while creating payment reconciliation Journal Entry --- .../doctype/payment_reconciliation/payment_reconciliation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py index 6635128f9ef..d788d91855e 100644 --- a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py +++ b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py @@ -306,5 +306,5 @@ def reconcile_dr_cr_note(dr_cr_notes, company): } ] }) - + jv.flags.ignore_mandatory = True jv.submit() \ No newline at end of file From 980798c6fd676c240632956fee182d21869c04b1 Mon Sep 17 00:00:00 2001 From: Ganga Manoj Date: Mon, 19 Jul 2021 23:43:36 +0530 Subject: [PATCH 38/95] fix: Use the item's cost centre instead of the Invoice's Co-authored-by: Deepesh Garg <42651287+deepeshgarg007@users.noreply.github.com> --- erpnext/controllers/accounts_controller.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index aa2fe29bc69..65dbe17ec1d 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -836,7 +836,7 @@ class AccountsController(TransactionBase): "against": supplier_or_customer, dr_or_cr: flt(item.discount_amount), dr_or_cr + "_in_account_currency": flt(item.discount_amount), - "cost_center": self.cost_center, + "cost_center": item.cost_center, "project": self.project }, account_currency, item=self) ) From 63b7ecd0fed3c8bbfd5766c18d28ab621781fac3 Mon Sep 17 00:00:00 2001 From: Ganga Manoj Date: Mon, 19 Jul 2021 23:44:21 +0530 Subject: [PATCH 39/95] fix: Use the item's project instead of the invoice's Co-authored-by: Deepesh Garg <42651287+deepeshgarg007@users.noreply.github.com> --- erpnext/controllers/accounts_controller.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index 65dbe17ec1d..2aac4968a28 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -837,7 +837,7 @@ class AccountsController(TransactionBase): dr_or_cr: flt(item.discount_amount), dr_or_cr + "_in_account_currency": flt(item.discount_amount), "cost_center": item.cost_center, - "project": self.project + "project": item.project }, account_currency, item=self) ) From 0ea2934cd51e2d0c8af9cc22a8db16d60dd0dd3f Mon Sep 17 00:00:00 2001 From: Ganga Manoj Date: Mon, 19 Jul 2021 23:44:55 +0530 Subject: [PATCH 40/95] fix: GL Entry creation Co-authored-by: Deepesh Garg <42651287+deepeshgarg007@users.noreply.github.com> --- erpnext/controllers/accounts_controller.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index 2aac4968a28..9b3336cde50 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -838,7 +838,7 @@ class AccountsController(TransactionBase): dr_or_cr + "_in_account_currency": flt(item.discount_amount), "cost_center": item.cost_center, "project": item.project - }, account_currency, item=self) + }, account_currency, item=item) ) account_currency = get_account_currency(income_or_expense_account) From 8fc9c13734e033ddb5327b29a3fe175ed5ded823 Mon Sep 17 00:00:00 2001 From: Ganga Manoj Date: Mon, 19 Jul 2021 23:46:38 +0530 Subject: [PATCH 41/95] fix: Filter for additional_discount_account Co-authored-by: Deepesh Garg <42651287+deepeshgarg007@users.noreply.github.com> --- erpnext/accounts/doctype/sales_invoice/sales_invoice.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js index 3fb20d9d510..2751b5509cc 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js @@ -596,7 +596,7 @@ frappe.ui.form.on('Sales Invoice', { filters: { company: frm.doc.company, is_group: 0, - root_type: "Profit and Loss", + report_type: "Profit and Loss", } }; }); From 1d830dfd92ca49a00b46915b13558489883d5979 Mon Sep 17 00:00:00 2001 From: Ganga Manoj Date: Mon, 19 Jul 2021 23:47:58 +0530 Subject: [PATCH 42/95] fix: Filter for additional_discount_account Co-authored-by: Deepesh Garg <42651287+deepeshgarg007@users.noreply.github.com> --- erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js index 435fc1e0c1d..d6bb69bcbf0 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js @@ -504,7 +504,7 @@ frappe.ui.form.on("Purchase Invoice", { filters: { company: frm.doc.company, is_group: 0, - root_type: "Profit and Loss", + report_type: "Profit and Loss", } }; }); From 4105e2713828dc6bd204b516dfed0ba9d322871a Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Tue, 20 Jul 2021 03:46:02 +0530 Subject: [PATCH 43/95] fix: Create GL Entries for Additional Discount Account --- .../purchase_invoice/purchase_invoice.py | 11 ++-- .../doctype/sales_invoice/sales_invoice.py | 25 +++++--- erpnext/controllers/accounts_controller.py | 60 ++++++------------- 3 files changed, 39 insertions(+), 57 deletions(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py index 95ad653c376..53ad849b1e1 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py @@ -611,7 +611,11 @@ class PurchaseInvoice(BuyingController): if (not item.enable_deferred_expense or self.is_return) else item.deferred_expense_account) if not item.is_fixed_asset: - amount = flt(item.base_net_amount, item.precision("base_net_amount")) + if frappe.db.get_single_value('Accounts Settings', 'enable_discount_accounting'): + amount = flt(item.base_amount, item.precision("base_amount")) + else: + amount = flt(item.base_net_amount, item.precision("base_net_amount")) + else: amount = flt(item.base_net_amount + item.item_tax_amount, item.precision("base_net_amount")) @@ -918,11 +922,6 @@ class PurchaseInvoice(BuyingController): "remarks": self.remarks or "Accounting Entry for Stock" }, item=tax)) - enable_discount_accounting = cint(frappe.db.get_single_value('Accounts Settings', 'enable_discount_accounting')) - - if enable_discount_accounting and self.get('discount_amount') and self.get('additional_discount_account'): - self.make_gle_for_additional_discount_applied_on_taxes(gl_entries) - def make_internal_transfer_gl_entries(self, gl_entries): if self.is_internal_transfer() and flt(self.base_total_taxes_and_charges): account_currency = get_account_currency(self.unrealized_profit_loss_account) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index 955f223eccb..7862f82f6f6 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -902,11 +902,6 @@ class SalesInvoice(SellingController): }, account_currency, item=tax) ) - enable_discount_accounting = cint(frappe.db.get_single_value('Accounts Settings', 'enable_discount_accounting')) - - if enable_discount_accounting and self.get('discount_amount') and self.get('additional_discount_account'): - self.make_gle_for_additional_discount_applied_on_taxes(gl_entries) - def make_internal_transfer_gl_entries(self, gl_entries): if self.is_internal_transfer() and flt(self.base_total_taxes_and_charges): account_currency = get_account_currency(self.unrealized_profit_loss_account) @@ -957,15 +952,17 @@ class SalesInvoice(SellingController): income_account = (item.income_account if (not item.enable_deferred_revenue or self.is_return) else item.deferred_revenue_account) + amount, base_amount = self.get_amount_and_base_amount(item) + account_currency = get_account_currency(income_account) gl_entries.append( self.get_gl_dict({ "account": income_account, "against": self.customer, - "credit": flt(item.base_net_amount, item.precision("base_net_amount")), - "credit_in_account_currency": (flt(item.base_net_amount, item.precision("base_net_amount")) + "credit": flt(base_amount, item.precision("base_net_amount")), + "credit_in_account_currency": (flt(base_amount, item.precision("base_net_amount")) if account_currency==self.company_currency - else flt(item.net_amount, item.precision("net_amount"))), + else flt(amount, item.precision("net_amount"))), "cost_center": item.cost_center, "project": item.project or self.project }, account_currency, item=item) @@ -976,6 +973,18 @@ class SalesInvoice(SellingController): erpnext.is_perpetual_inventory_enabled(self.company): gl_entries += super(SalesInvoice, self).get_gl_entries() + def get_amount_and_base_amount(self, item): + amount = item.net_amount + base_amount = item.base_net_amount + + enable_discount_accounting = cint(frappe.db.get_single_value('Accounts Settings', 'enable_discount_accounting')) + + if enable_discount_accounting and self.get('discount_amount') and self.get('additional_discount_account'): + amount = item.amount + base_amount = item.base_amount + + return amount, base_amount + def set_asset_status(self, asset): if self.is_return: asset.set_status() diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index 9b3336cde50..59879e0df58 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -812,19 +812,23 @@ class AccountsController(TransactionBase): enable_discount_accounting = cint(frappe.db.get_single_value('Accounts Settings', 'enable_discount_accounting')) if enable_discount_accounting: + if self.doctype == "Purchase Invoice": + dr_or_cr = "credit" + rev_dr_cr = "debit" + supplier_or_customer = self.supplier + + else: + dr_or_cr = "debit" + rev_dr_cr = "credit" + supplier_or_customer = self.customer + for item in self.get("items"): if item.get('discount_amount') and item.get('discount_account'): if self.doctype == "Purchase Invoice": - dr_or_cr = "credit" - rev_dr_cr = "debit" - supplier_or_customer = self.supplier income_or_expense_account = (item.expense_account if (not item.enable_deferred_expense or self.is_return) else item.deferred_expense_account) else: - dr_or_cr = "debit" - rev_dr_cr = "credit" - supplier_or_customer = self.customer income_or_expense_account = (item.income_account if (not item.enable_deferred_revenue or self.is_return) else item.deferred_revenue_account) @@ -853,46 +857,16 @@ class AccountsController(TransactionBase): }, account_currency, item=item) ) - def make_gle_for_additional_discount_applied_on_taxes(self, gl_entries): - for tax in self.get("taxes"): - if flt(tax.base_tax_amount_after_discount_amount) and flt(tax.base_tax_amount): - account_currency = get_account_currency(tax.account_head) - additional_discount_applied_on_taxes = flt(tax.base_tax_amount) - flt(tax.base_tax_amount_after_discount_amount) - if self.doctype == 'Purchase Invoice': - against = self.supplier - dr_or_cr = "debit" - rev_dr_cr = "credit" - else: - against = self.customer - dr_or_cr = "credit" - rev_dr_cr = "debit" - - gl_entries.append( - self.get_gl_dict({ - "account": tax.account_head, - "against": against, - dr_or_cr: flt(additional_discount_applied_on_taxes, - tax.precision("tax_amount_after_discount_amount")), - dr_or_cr + "_in_account_currency": (flt(additional_discount_applied_on_taxes, - tax.precision("base_tax_amount_after_discount_amount")) if account_currency==self.company_currency else - flt(additional_discount_applied_on_taxes, tax.precision("tax_amount_after_discount_amount"))), - "cost_center": tax.cost_center - }, account_currency, item=tax) - ) - + if self.get('discount_amount') and self.get('additional_discount_account'): gl_entries.append( self.get_gl_dict({ "account": self.additional_discount_account, - "against": against, - rev_dr_cr: flt(additional_discount_applied_on_taxes, - tax.precision("tax_amount_after_discount_amount")), - rev_dr_cr + "_in_account_currency": (flt(additional_discount_applied_on_taxes, - tax.precision("base_tax_amount_after_discount_amount")) if account_currency==self.company_currency else - flt(additional_discount_applied_on_taxes, tax.precision("tax_amount_after_discount_amount"))), - "cost_center": tax.cost_center - }, account_currency, item=tax) - ) - + "against": supplier_or_customer, + dr_or_cr: self.discount_amount, + "cost_center": self.cost_center + }, item=self) + ) + def allocate_advance_taxes(self, gl_entries): tax_map = self.get_tax_map() for pe in self.get("advances"): From 59ee6958aa7e67cbe00491093729ff260874efce Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Tue, 20 Jul 2021 03:52:39 +0530 Subject: [PATCH 44/95] fix: Make discount_account mandatory if discount accounting is enabled --- erpnext/accounts/doctype/accounts_settings/accounts_settings.py | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/accounts/doctype/accounts_settings/accounts_settings.py b/erpnext/accounts/doctype/accounts_settings/accounts_settings.py index 24b0ec4d4a8..a3a32d5e975 100644 --- a/erpnext/accounts/doctype/accounts_settings/accounts_settings.py +++ b/erpnext/accounts/doctype/accounts_settings/accounts_settings.py @@ -40,6 +40,7 @@ class AccountsSettings(Document): for doctype in ["Sales Invoice Item", "Purchase Invoice Item"]: make_property_setter(doctype, "discount_account", "hidden", not(enable_discount_accounting), "Check", validate_fields_for_doctype=False) + make_property_setter(doctype, "discount_account", "mandatory", enable_discount_accounting, "Check", validate_fields_for_doctype=False) for doctype in ["Sales Invoice", "Purchase Invoice"]: make_property_setter(doctype, "additional_discount_account", "hidden", not(enable_discount_accounting), "Check", validate_fields_for_doctype=False) From 82d147ea625f7e24959a63b47b11138f95fde536 Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Tue, 20 Jul 2021 05:16:33 +0530 Subject: [PATCH 45/95] fix: Tests --- .../purchase_invoice/test_purchase_invoice.py | 43 +++++++++++++------ .../sales_invoice/test_sales_invoice.py | 25 +++++------ 2 files changed, 43 insertions(+), 25 deletions(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py index 87bdb7cd4f0..7c26007b072 100644 --- a/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py @@ -252,8 +252,6 @@ class TestPurchaseInvoice(unittest.TestCase): self.assertEqual(discrepancy_caused_by_exchange_rate_diff, amount) def test_purchase_invoice_with_discount_accounting_enabled(self): - from erpnext.accounts.doctype.sales_invoice.test_sales_invoice import check_gl_entries - enable_discount_accounting() discount_account = create_account(account_name="Discount Account", @@ -261,38 +259,45 @@ class TestPurchaseInvoice(unittest.TestCase): pi = make_purchase_invoice(discount_account=discount_account, discount_amount=100) expected_gle = [ - ["Discount Account - _TC", 0.0, 100.0, nowdate()], ["_Test Account Cost for Goods Sold - _TC", 350.0, 0.0, nowdate()], - ["Creditors - _TC", 0.0, 250.0, nowdate()] + ["Creditors - _TC", 0.0, 250.0, nowdate()], + ["Discount Account - _TC", 0.0, 100.0, nowdate()] ] check_gl_entries(self, pi.name, expected_gle, nowdate()) def test_additional_discount_for_purchase_invoice_with_discount_accounting_enabled(self): - from erpnext.accounts.doctype.sales_invoice.test_sales_invoice import check_gl_entries - enable_discount_accounting() additional_discount_account = create_account(account_name="Discount Account", parent_account="Indirect Expenses - _TC", company="_Test Company") - pi = make_purchase_invoice(qty=1, rate=75000, do_not_save=1) + pi = make_purchase_invoice(qty=1, rate=100, do_not_save=1) pi.apply_discount_on = "Grand Total" pi.additional_discount_account = additional_discount_account - pi.additional_discount_percentage = 10 + pi.additional_discount_percentage = 20 pi.append("taxes", { "charge_type": "On Net Total", "account_head": "CGST - _TC", "cost_center": "Main - _TC", "description": "CGST @ 9.0", - "rate": 9 + "base_tax_amount": 20, + "base_tax_amount_after_discount_amount": 20 }) pi.submit() + # gle = frappe.get_all( + # "GL Entry", + # fields = ['account', 'debit', 'credit', 'posting_date'], + # filters = {'voucher_no': pi.name} + # ) + # for gl in gle: + # print(gl, "\n") + expected_gle = [ - ["Discount Account - _TC", 0.0, 675.0, nowdate()], - ["CGST - _TC", 6750.0, 0.0, nowdate()], - ["_Test Account Cost for Goods Sold - _TC", 67500.0, 0.0, nowdate()], - ["Creditors - _TC", 0.0, 73575.0, nowdate()] + ["CGST - _TC", 20.0, 0.0, nowdate()], + ["Creditors - _TC", 0.0, 96.0, nowdate()], + ["Discount Account - _TC", 0.0, 24.0, nowdate()], + ["_Test Account Cost for Goods Sold - _TC", 100.0, 0.0, nowdate()] ] check_gl_entries(self, pi.name, expected_gle, nowdate()) @@ -1207,6 +1212,18 @@ class TestPurchaseInvoice(unittest.TestCase): self.assertEqual(expected_gle[i][0], gle.account) self.assertEqual(expected_gle[i][1], gle.amount) +def check_gl_entries(doc, voucher_no, expected_gle, posting_date): + gl_entries = frappe.db.sql("""select account, debit, credit, posting_date + from `tabGL Entry` + where voucher_type='Purchase Invoice' and voucher_no=%s and posting_date >= %s + order by posting_date asc, account asc""", (voucher_no, posting_date), as_dict=1) + + for i, gle in enumerate(gl_entries): + doc.assertEqual(expected_gle[i][0], gle.account) + doc.assertEqual(expected_gle[i][1], gle.debit) + doc.assertEqual(expected_gle[i][2], gle.credit) + doc.assertEqual(getdate(expected_gle[i][3]), gle.posting_date) + def update_tax_witholding_category(company, account, date): from erpnext.accounts.utils import get_fiscal_year diff --git a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py index 00831febac9..eccc69fdb27 100644 --- a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py @@ -2025,12 +2025,12 @@ class TestSalesInvoice(unittest.TestCase): si = create_sales_invoice(discount_account=discount_account, discount_amount=100) expected_gle = [ + ["Debtors - _TC", 100.0, 0.0, nowdate()], ["Discount Account - _TC", 100.0, 0.0, nowdate()], - ["Sales - _TC", 0.0, 200.0, nowdate()], - ["Debtors - _TC", 100.0, 0.0, nowdate()] + ["Sales - _TC", 0.0, 200.0, nowdate()] ] - check_gl_entries(self, si.name, expected_gle, nowdate()) + check_gl_entries(self, si.name, expected_gle, add_days(nowdate(), -1)) def test_additional_discount_for_sales_invoice_with_discount_accounting_enabled(self): from erpnext.accounts.doctype.purchase_invoice.test_purchase_invoice import enable_discount_accounting @@ -2039,27 +2039,28 @@ class TestSalesInvoice(unittest.TestCase): additional_discount_account = create_account(account_name="Discount Account", parent_account="Indirect Expenses - _TC", company="_Test Company") - si = create_sales_invoice(rate=75000, do_not_save=1) + si = create_sales_invoice(rate=100, do_not_save=1) si.apply_discount_on = "Grand Total" si.additional_discount_account = additional_discount_account - si.additional_discount_percentage = 10 + si.additional_discount_percentage = 20 si.append("taxes", { - "charge_type": "On Net Total", + "charge_type": "Actual", "account_head": "CGST - _TC", "cost_center": "Main - _TC", "description": "CGST @ 9.0", - "rate": 9 + "rate": 0, + "tax_amount": 20 }) si.submit() expected_gle = [ - ["Sales - _TC", 0.0, 67500.0, nowdate()], - ["Discount Account - _TC", 675.0, 0.0, nowdate()], - ["CGST - _TC", 0.0, 6750.0, nowdate()], - ["Debtors - _TC", 73575.0, 0.0, nowdate()] + ["CGST - _TC", 0.0, 20.0, nowdate()], + ["Debtors - _TC", 96.0, 0.0, nowdate()], + ["Discount Account - _TC", 24.0, 0.0, nowdate()], + ["Sales - _TC", 0.0, 100.0, nowdate()] ] - check_gl_entries(self, si.name, expected_gle, nowdate()) + check_gl_entries(self, si.name, expected_gle, add_days(nowdate(), -1)) def get_sales_invoice_for_e_invoice(): si = make_sales_invoice_for_ewaybill() From 46bed5e6cca5eade886d85a9300fc5ebf00de18f Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Tue, 20 Jul 2021 22:03:44 +0530 Subject: [PATCH 46/95] fix: Add mandatory_depends_on property for Discount Account --- .../doctype/accounts_settings/accounts_settings.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/accounts_settings/accounts_settings.py b/erpnext/accounts/doctype/accounts_settings/accounts_settings.py index a3a32d5e975..55449132928 100644 --- a/erpnext/accounts/doctype/accounts_settings/accounts_settings.py +++ b/erpnext/accounts/doctype/accounts_settings/accounts_settings.py @@ -40,9 +40,16 @@ class AccountsSettings(Document): for doctype in ["Sales Invoice Item", "Purchase Invoice Item"]: make_property_setter(doctype, "discount_account", "hidden", not(enable_discount_accounting), "Check", validate_fields_for_doctype=False) - make_property_setter(doctype, "discount_account", "mandatory", enable_discount_accounting, "Check", validate_fields_for_doctype=False) + if enable_discount_accounting: + make_property_setter(doctype, "discount_account", "mandatory_depends_on", "eval: doc.discount_amount", "Code", validate_fields_for_doctype=False) + else: + make_property_setter(doctype, "discount_account", "mandatory_depends_on", "", "Code", validate_fields_for_doctype=False) for doctype in ["Sales Invoice", "Purchase Invoice"]: make_property_setter(doctype, "additional_discount_account", "hidden", not(enable_discount_accounting), "Check", validate_fields_for_doctype=False) + if enable_discount_accounting: + make_property_setter(doctype, "additional_discount_account", "mandatory_depends_on", "eval: doc.discount_amount", "Code", validate_fields_for_doctype=False) + else: + make_property_setter(doctype, "additional_discount_account", "mandatory_depends_on", "", "Code", validate_fields_for_doctype=False) make_property_setter("Item", "default_discount_account", "hidden", not(enable_discount_accounting), "Check", validate_fields_for_doctype=False) \ No newline at end of file From 4323f4bcac77f4c5e06439550cc94fee32fad32c Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Thu, 22 Jul 2021 05:57:42 +0530 Subject: [PATCH 47/95] fix: Modify set_payment_schedule() to include fetch_payment_terms_from_order() --- .../doctype/purchase_order/purchase_order.py | 4 +- erpnext/controllers/accounts_controller.py | 111 +++++++++++------- .../doctype/sales_order/sales_order.py | 4 +- .../doctype/delivery_note/delivery_note.py | 4 +- .../purchase_receipt/purchase_receipt.py | 3 +- 5 files changed, 70 insertions(+), 56 deletions(-) diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.py b/erpnext/buying/doctype/purchase_order/purchase_order.py index a0bac51046f..f68d81909a3 100644 --- a/erpnext/buying/doctype/purchase_order/purchase_order.py +++ b/erpnext/buying/doctype/purchase_order/purchase_order.py @@ -443,8 +443,6 @@ def make_purchase_invoice_from_portal(purchase_order_name): frappe.response.location = '/purchase-invoices/' + doc.name def get_mapped_purchase_invoice(source_name, target_doc=None, ignore_permissions=False): - from erpnext.controllers.accounts_controller import fetch_payment_terms_from_order - def postprocess(source, target): target.flags.ignore_permissions = ignore_permissions set_missing_values(source, target) @@ -496,7 +494,7 @@ def get_mapped_purchase_invoice(source_name, target_doc=None, ignore_permissions automatically_fetch_payment_terms = cint(frappe.db.get_single_value('Accounts Settings', 'automatically_fetch_payment_terms')) if automatically_fetch_payment_terms: - fetch_payment_terms_from_order(doc) + doc.set_payment_schedule() return doc diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index d38c2cbdb5a..77234aa999f 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -1038,7 +1038,14 @@ class AccountsController(TransactionBase): data = get_payment_terms(self.payment_terms_template, posting_date, grand_total, base_grand_total) for item in data: self.append("payment_schedule", item) - else: + + elif self.doctype in ["Sales Invoice", "Purchase Invoice"]: + po_or_so, doctype, fieldname = self.get_order_details() + + if self.linked_order_has_payment_terms(po_or_so, fieldname): + self.fetch_payment_terms_from_order(po_or_so, doctype) + + elif self.doctype not in ["Purchase Receipt"]: data = dict(due_date=due_date, invoice_portion=100, payment_amount=grand_total, base_payment_amount=base_grand_total) self.append("payment_schedule", data) else: @@ -1048,6 +1055,63 @@ class AccountsController(TransactionBase): d.base_payment_amount = flt(base_grand_total * flt(d.invoice_portion / 100), d.precision('payment_amount')) d.outstanding = d.payment_amount + def get_order_details(self): + if self.doctype == "Sales Invoice": + po_or_so = self.get('items')[0].get('sales_order') + po_or_so_doctype = "Sales Order" + po_or_so_doctype_name = "sales_order" + + else: + po_or_so = self.get('items')[0].get('purchase_order') + po_or_so_doctype = "Purchase Order" + po_or_so_doctype_name = "purchase_order" + + return po_or_so, po_or_so_doctype, po_or_so_doctype_name + + def linked_order_has_payment_terms(self, po_or_so, fieldname): + if po_or_so and self.all_items_have_same_po_or_so(po_or_so, fieldname): + if self.linked_order_has_payment_terms_template(po_or_so): + return True + elif self.linked_order_has_payment_schedule(po_or_so): + return True + + return False + + def all_items_have_same_po_or_so(self, po_or_so, fieldname): + for item in self.get('items'): + if item.get(fieldname) != po_or_so: + return False + + return True + + def linked_order_has_payment_terms_template(self, po_or_so): + return frappe.get_value('Sales Order', po_or_so, 'payment_terms_template') + + def linked_order_has_payment_schedule(self, po_or_so): + return frappe.get_all('Payment Schedule', filters={'parent': po_or_so}) + + def fetch_payment_terms_from_order(self, po_or_so, po_or_so_doctype): + """ + Fetch Payment Terms from Purchase/Sales Order on creating a new Purchase/Sales Invoice. + """ + po_or_so = frappe.get_cached_doc(po_or_so_doctype, po_or_so) + + self.payment_schedule = [] + self.payment_terms_template = po_or_so.payment_terms_template + + for schedule in po_or_so.payment_schedule: + payment_schedule = { + 'payment_term': schedule.payment_term, + 'due_date': schedule.due_date, + 'invoice_portion': schedule.invoice_portion, + 'discount_type': schedule.discount_type, + 'discount': schedule.discount, + 'base_payment_amount': schedule.base_payment_amount, + 'payment_amount': schedule.payment_amount, + 'outstanding': schedule.outstanding + } + self.append("payment_schedule", payment_schedule) + def set_due_date(self): due_dates = [d.due_date for d in self.get("payment_schedule") if d.due_date] if due_dates: @@ -1729,47 +1793,4 @@ def validate_regional(doc): @erpnext.allow_regional def validate_einvoice_fields(doc): - pass - -def fetch_payment_terms_from_order(doc): - """ - Fetch Payment Terms from Purchase/Sales Order on creating a new Purchase/Sales Invoice. - """ - - if doc.doctype == "Sales Invoice": - po_or_so = doc.get('items')[0].get('sales_order') - po_or_so_doctype = "Sales Order" - po_or_so_doctype_name = "sales_order" - else: - po_or_so = doc.get('items')[0].get('purchase_order') - po_or_so_doctype = "Purchase Order" - po_or_so_doctype_name = "purchase_order" - - if po_or_so and all_items_have_same_po_or_so(doc, po_or_so, po_or_so_doctype_name): - po_or_so = frappe.get_cached_doc(po_or_so_doctype, po_or_so) - else: - doc.set_payment_schedule() - return - - doc.payment_schedule = [] - doc.payment_terms_template = po_or_so.payment_terms_template - - for schedule in po_or_so.payment_schedule: - payment_schedule = { - 'payment_term': schedule.payment_term, - 'due_date': schedule.due_date, - 'invoice_portion': schedule.invoice_portion, - 'discount_type': schedule.discount_type, - 'discount': schedule.discount, - 'base_payment_amount': schedule.base_payment_amount, - 'payment_amount': schedule.payment_amount, - 'outstanding': schedule.outstanding - } - doc.append("payment_schedule", payment_schedule) - -def all_items_have_same_po_or_so(doc, po_or_so, po_or_so_fieldname): - for item in doc.get('items'): - if item.get(po_or_so_fieldname) != po_or_so: - return False - - return True \ No newline at end of file + pass \ No newline at end of file diff --git a/erpnext/selling/doctype/sales_order/sales_order.py b/erpnext/selling/doctype/sales_order/sales_order.py index a58c381df35..2b9d516e217 100755 --- a/erpnext/selling/doctype/sales_order/sales_order.py +++ b/erpnext/selling/doctype/sales_order/sales_order.py @@ -621,8 +621,6 @@ def make_delivery_note(source_name, target_doc=None, skip_item_mapping=False): @frappe.whitelist() def make_sales_invoice(source_name, target_doc=None, ignore_permissions=False): - from erpnext.controllers.accounts_controller import fetch_payment_terms_from_order - def postprocess(source, target): set_missing_values(source, target) #Get the advance paid Journal Entries in Sales Invoice Advance @@ -697,7 +695,7 @@ def make_sales_invoice(source_name, target_doc=None, ignore_permissions=False): automatically_fetch_payment_terms = cint(frappe.db.get_single_value('Accounts Settings', 'automatically_fetch_payment_terms')) if automatically_fetch_payment_terms: - fetch_payment_terms_from_order(doclist) + doclist.set_payment_schedule() return doclist diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.py b/erpnext/stock/doctype/delivery_note/delivery_note.py index 1628f930191..f99a01b8202 100644 --- a/erpnext/stock/doctype/delivery_note/delivery_note.py +++ b/erpnext/stock/doctype/delivery_note/delivery_note.py @@ -414,8 +414,6 @@ def get_returned_qty_map(delivery_note): @frappe.whitelist() def make_sales_invoice(source_name, target_doc=None): - from erpnext.controllers.accounts_controller import fetch_payment_terms_from_order - doc = frappe.get_doc('Delivery Note', source_name) to_make_invoice_qty_map = {} @@ -507,7 +505,7 @@ def make_sales_invoice(source_name, target_doc=None): automatically_fetch_payment_terms = cint(frappe.db.get_single_value('Accounts Settings', 'automatically_fetch_payment_terms')) if automatically_fetch_payment_terms: - fetch_payment_terms_from_order(doc) + doc.set_payment_schedule() return doc diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py index 6d72a5fa0bb..36f21465b5b 100644 --- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py +++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py @@ -604,7 +604,6 @@ def update_billing_percentage(pr_doc, update_modified=True): @frappe.whitelist() def make_purchase_invoice(source_name, target_doc=None): from erpnext.accounts.party import get_payment_terms_template - from erpnext.controllers.accounts_controller import fetch_payment_terms_from_order doc = frappe.get_doc('Purchase Receipt', source_name) returned_qty_map = get_returned_qty_map(source_name) @@ -678,7 +677,7 @@ def make_purchase_invoice(source_name, target_doc=None): automatically_fetch_payment_terms = cint(frappe.db.get_single_value('Accounts Settings', 'automatically_fetch_payment_terms')) if automatically_fetch_payment_terms: - fetch_payment_terms_from_order(doclist) + doc.set_payment_schedule() return doclist From caa106b3bd2d33c3c6952f6b475e7fa5cf67a016 Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Thu, 22 Jul 2021 22:58:45 +0530 Subject: [PATCH 48/95] fix: Add test to check if payment terms are fetched when creating a Sales Invoice --- .../doctype/sales_order/test_sales_order.py | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/erpnext/selling/doctype/sales_order/test_sales_order.py b/erpnext/selling/doctype/sales_order/test_sales_order.py index 974648d6d44..bf6925473ad 100644 --- a/erpnext/selling/doctype/sales_order/test_sales_order.py +++ b/erpnext/selling/doctype/sales_order/test_sales_order.py @@ -1229,7 +1229,42 @@ class TestSalesOrder(unittest.TestCase): self.assertRaises(frappe.ValidationError, so.cancel) + def test_payment_terms_are_fetched_when_creating_invoice(self): + from erpnext.accounts.doctype.payment_entry.test_payment_entry import create_payment_terms_template + from erpnext.accounts.doctype.sales_invoice.test_sales_invoice import create_sales_invoice + automatically_fetch_payment_terms() + + so = make_sales_order(uom="Nos", do_not_save=1) + create_payment_terms_template() + so.payment_terms_template = 'Test Receivable Template' + so.submit() + + si = create_sales_invoice(qty=10, do_not_save=1) + si.items[0].sales_order = so.name + si.items[0].so_detail = so.items[0].name + si.insert() + + self.assertEqual(so.payment_terms_template, si.payment_terms_template) + compare_payment_schedules(self, so, si) + +def automatically_fetch_payment_terms(enable=1): + accounts_settings = frappe.get_doc("Accounts Settings") + accounts_settings.automatically_fetch_payment_terms = enable + accounts_settings.save() + +def compare_payment_schedules(doc, doc1, doc2): + payment_schedule1 = frappe.db.sql("""select payment_term, description, due_date, mode_of_payment, invoice_portion, payment_amount + from `tabPayment Schedule` + where parenttype=%s and parent=%s + order by payment_term asc""", (doc1.doctype, doc1.name), as_dict=1) + + payment_schedule2 = frappe.db.sql("""select payment_term, description, due_date, mode_of_payment, invoice_portion, payment_amount + from `tabPayment Schedule` + where parenttype=%s and parent=%s + order by payment_term asc""", (doc2.doctype, doc2.name), as_dict=1) + + doc.assertEqual(payment_schedule1, payment_schedule2) def make_sales_order(**args): so = frappe.new_doc("Sales Order") From 9c07454f91e4eb619c7bf196b9e233d7eadaffec Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Fri, 23 Jul 2021 03:23:29 +0530 Subject: [PATCH 49/95] fix: Add test to check if payment terms are fetched when creating a Sales Invoice --- .../delivery_note/test_delivery_note.py | 27 ++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/erpnext/stock/doctype/delivery_note/test_delivery_note.py b/erpnext/stock/doctype/delivery_note/test_delivery_note.py index f981aeb13bb..8b1245eb403 100644 --- a/erpnext/stock/doctype/delivery_note/test_delivery_note.py +++ b/erpnext/stock/doctype/delivery_note/test_delivery_note.py @@ -17,7 +17,8 @@ from erpnext.stock.doctype.stock_entry.test_stock_entry \ from erpnext.stock.doctype.serial_no.serial_no import get_serial_nos, SerialNoWarehouseError from erpnext.stock.doctype.stock_reconciliation.test_stock_reconciliation \ import create_stock_reconciliation, set_valuation_method -from erpnext.selling.doctype.sales_order.test_sales_order import make_sales_order, create_dn_against_so +from erpnext.selling.doctype.sales_order.test_sales_order \ + import make_sales_order, create_dn_against_so, automatically_fetch_payment_terms, compare_payment_schedules from erpnext.accounts.doctype.account.test_account import get_inventory_account from erpnext.stock.doctype.warehouse.test_warehouse import get_warehouse from erpnext.stock.doctype.item.test_item import make_item @@ -759,6 +760,30 @@ class TestDeliveryNote(unittest.TestCase): self.assertTrue("TESTBATCH" in dn.packed_items[0].batch_no, "Batch number not added in packed item") + def test_payment_terms_are_fetched_when_creating_invoice(self): + from erpnext.accounts.doctype.payment_entry.test_payment_entry import create_payment_terms_template + from erpnext.accounts.doctype.sales_invoice.test_sales_invoice import create_sales_invoice + + automatically_fetch_payment_terms() + + so = make_sales_order(uom="Nos", do_not_save=1) + create_payment_terms_template() + so.payment_terms_template = 'Test Receivable Template' + so.submit() + + dn = create_dn_against_so(so.name, delivered_qty=10) + + si = create_sales_invoice(qty=10, do_not_save=1) + si.items[0].delivery_note= dn.name + si.items[0].dn_detail = dn.items[0].name + si.items[0].sales_order = so.name + si.items[0].so_detail = so.items[0].name + + si.insert() + si.submit() + + self.assertEqual(so.payment_terms_template, si.payment_terms_template) + compare_payment_schedules(self, so, si) def create_delivery_note(**args): dn = frappe.new_doc("Delivery Note") From de6d960381ff807c8632fb3fdf5321cff969a2ee Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Fri, 23 Jul 2021 03:36:37 +0530 Subject: [PATCH 50/95] fix: Add test to check if payment terms are fetched when creating a Purchase Invoice --- .../purchase_order/test_purchase_order.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/erpnext/buying/doctype/purchase_order/test_purchase_order.py b/erpnext/buying/doctype/purchase_order/test_purchase_order.py index 8563b97ab74..11cf39e5e2d 100644 --- a/erpnext/buying/doctype/purchase_order/test_purchase_order.py +++ b/erpnext/buying/doctype/purchase_order/test_purchase_order.py @@ -968,8 +968,25 @@ class TestPurchaseOrder(unittest.TestCase): # To test if the PO does NOT have a Blanket Order self.assertEqual(po_doc.items[0].blanket_order, None) + def test_payment_terms_are_fetched_when_creating_invoice(self): + from erpnext.accounts.doctype.payment_entry.test_payment_entry import create_payment_terms_template + from erpnext.accounts.doctype.purchase_invoice.test_purchase_invoice import make_purchase_invoice + from erpnext.selling.doctype.sales_order.test_sales_order import automatically_fetch_payment_terms, compare_payment_schedules + automatically_fetch_payment_terms() + po = create_purchase_order(qty=10, rate=100, do_not_save=1) + create_payment_terms_template() + po.payment_terms_template = 'Test Receivable Template' + po.submit() + + pi = make_purchase_invoice(qty=10, rate=100, do_not_save=1) + pi.items[0].purchase_order = po.name + pi.items[0].po_detail = po.items[0].name + pi.insert() + + # self.assertEqual(po.payment_terms_template, pi.payment_terms_template) + compare_payment_schedules(self, po, pi) def make_pr_against_po(po, received_qty=0): pr = make_purchase_receipt(po) From 13e7103ee096547f2b5288346f6d3f54b9cfa8a9 Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Fri, 23 Jul 2021 03:44:56 +0530 Subject: [PATCH 51/95] fix: Add test to check if payment terms are fetched when creating a Purchase Invoice --- .../purchase_receipt/test_purchase_receipt.py | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py b/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py index dbba21fde1b..89809733604 100644 --- a/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py +++ b/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py @@ -1079,6 +1079,31 @@ class TestPurchaseReceipt(unittest.TestCase): self.assertEqual(discrepancy_caused_by_exchange_rate_diff, amount) + def test_payment_terms_are_fetched_when_creating_invoice(self): + from erpnext.accounts.doctype.payment_entry.test_payment_entry import create_payment_terms_template + from erpnext.accounts.doctype.purchase_invoice.test_purchase_invoice import make_purchase_invoice + from erpnext.buying.doctype.purchase_order.test_purchase_order import create_purchase_order, make_pr_against_po + from erpnext.selling.doctype.sales_order.test_sales_order import automatically_fetch_payment_terms, compare_payment_schedules + + automatically_fetch_payment_terms() + + po = create_purchase_order(qty=10, rate=100, do_not_save=1) + create_payment_terms_template() + po.payment_terms_template = 'Test Receivable Template' + po.submit() + + pr = make_pr_against_po(po.name, received_qty=10) + + pi = make_purchase_invoice(qty=10, rate=100, do_not_save=1) + pi.items[0].purchase_receipt = pr.name + pi.items[0].pr_detail = pr.items[0].name + pi.items[0].purchase_order = po.name + pi.items[0].po_detail = po.items[0].name + pi.insert() + + # self.assertEqual(po.payment_terms_template, pi.payment_terms_template) + compare_payment_schedules(self, po, pi) + def get_sl_entries(voucher_type, voucher_no): return frappe.db.sql(""" select actual_qty, warehouse, stock_value_difference from `tabStock Ledger Entry` where voucher_type=%s and voucher_no=%s From aed39a23dc00396a23d49a8d9dbadcd054c76a4b Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Fri, 23 Jul 2021 03:45:59 +0530 Subject: [PATCH 52/95] fix: Rename tests --- erpnext/buying/doctype/purchase_order/test_purchase_order.py | 2 +- erpnext/selling/doctype/sales_order/test_sales_order.py | 2 +- erpnext/stock/doctype/delivery_note/test_delivery_note.py | 2 +- erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/erpnext/buying/doctype/purchase_order/test_purchase_order.py b/erpnext/buying/doctype/purchase_order/test_purchase_order.py index 11cf39e5e2d..474c9cf3df9 100644 --- a/erpnext/buying/doctype/purchase_order/test_purchase_order.py +++ b/erpnext/buying/doctype/purchase_order/test_purchase_order.py @@ -968,7 +968,7 @@ class TestPurchaseOrder(unittest.TestCase): # To test if the PO does NOT have a Blanket Order self.assertEqual(po_doc.items[0].blanket_order, None) - def test_payment_terms_are_fetched_when_creating_invoice(self): + def test_payment_terms_are_fetched_when_creating_purchase_invoice(self): from erpnext.accounts.doctype.payment_entry.test_payment_entry import create_payment_terms_template from erpnext.accounts.doctype.purchase_invoice.test_purchase_invoice import make_purchase_invoice from erpnext.selling.doctype.sales_order.test_sales_order import automatically_fetch_payment_terms, compare_payment_schedules diff --git a/erpnext/selling/doctype/sales_order/test_sales_order.py b/erpnext/selling/doctype/sales_order/test_sales_order.py index bf6925473ad..3fbe0afd10e 100644 --- a/erpnext/selling/doctype/sales_order/test_sales_order.py +++ b/erpnext/selling/doctype/sales_order/test_sales_order.py @@ -1229,7 +1229,7 @@ class TestSalesOrder(unittest.TestCase): self.assertRaises(frappe.ValidationError, so.cancel) - def test_payment_terms_are_fetched_when_creating_invoice(self): + def test_payment_terms_are_fetched_when_creating_sales_invoice(self): from erpnext.accounts.doctype.payment_entry.test_payment_entry import create_payment_terms_template from erpnext.accounts.doctype.sales_invoice.test_sales_invoice import create_sales_invoice diff --git a/erpnext/stock/doctype/delivery_note/test_delivery_note.py b/erpnext/stock/doctype/delivery_note/test_delivery_note.py index 8b1245eb403..ca8d8b99d31 100644 --- a/erpnext/stock/doctype/delivery_note/test_delivery_note.py +++ b/erpnext/stock/doctype/delivery_note/test_delivery_note.py @@ -760,7 +760,7 @@ class TestDeliveryNote(unittest.TestCase): self.assertTrue("TESTBATCH" in dn.packed_items[0].batch_no, "Batch number not added in packed item") - def test_payment_terms_are_fetched_when_creating_invoice(self): + def test_payment_terms_are_fetched_when_creating_sales_invoice(self): from erpnext.accounts.doctype.payment_entry.test_payment_entry import create_payment_terms_template from erpnext.accounts.doctype.sales_invoice.test_sales_invoice import create_sales_invoice diff --git a/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py b/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py index 89809733604..875814dc644 100644 --- a/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py +++ b/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py @@ -1079,7 +1079,7 @@ class TestPurchaseReceipt(unittest.TestCase): self.assertEqual(discrepancy_caused_by_exchange_rate_diff, amount) - def test_payment_terms_are_fetched_when_creating_invoice(self): + def test_payment_terms_are_fetched_when_creating_purchase_invoice(self): from erpnext.accounts.doctype.payment_entry.test_payment_entry import create_payment_terms_template from erpnext.accounts.doctype.purchase_invoice.test_purchase_invoice import make_purchase_invoice from erpnext.buying.doctype.purchase_order.test_purchase_order import create_purchase_order, make_pr_against_po From add2030553e1a6c633682856de78cd1873ca071d Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Fri, 23 Jul 2021 03:58:27 +0530 Subject: [PATCH 53/95] fix: Sider issues --- erpnext/selling/doctype/sales_order/test_sales_order.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/selling/doctype/sales_order/test_sales_order.py b/erpnext/selling/doctype/sales_order/test_sales_order.py index 3fbe0afd10e..f4a089bcef2 100644 --- a/erpnext/selling/doctype/sales_order/test_sales_order.py +++ b/erpnext/selling/doctype/sales_order/test_sales_order.py @@ -1249,9 +1249,9 @@ class TestSalesOrder(unittest.TestCase): compare_payment_schedules(self, so, si) def automatically_fetch_payment_terms(enable=1): - accounts_settings = frappe.get_doc("Accounts Settings") - accounts_settings.automatically_fetch_payment_terms = enable - accounts_settings.save() + accounts_settings = frappe.get_doc("Accounts Settings") + accounts_settings.automatically_fetch_payment_terms = enable + accounts_settings.save() def compare_payment_schedules(doc, doc1, doc2): payment_schedule1 = frappe.db.sql("""select payment_term, description, due_date, mode_of_payment, invoice_portion, payment_amount From 03a6c38f06034383b57593145f8c9e77c42d6370 Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Mon, 26 Jul 2021 22:24:25 +0530 Subject: [PATCH 54/95] test: fix test due to rename change --- erpnext/selling/doctype/sales_order/test_sales_order.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/erpnext/selling/doctype/sales_order/test_sales_order.py b/erpnext/selling/doctype/sales_order/test_sales_order.py index 974648d6d44..1de1e000975 100644 --- a/erpnext/selling/doctype/sales_order/test_sales_order.py +++ b/erpnext/selling/doctype/sales_order/test_sales_order.py @@ -673,6 +673,8 @@ class TestSalesOrder(unittest.TestCase): so.cancel() + dn.load_from_db() + self.assertRaises(frappe.CancelledLinkError, dn.submit) def test_service_type_product_bundle(self): From c7c90244feb2381d343711e3d1d322b5e56ccecc Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Thu, 29 Jul 2021 19:18:35 +0530 Subject: [PATCH 55/95] fix: Check if Purchase Order has Payment Terms Template --- erpnext/controllers/accounts_controller.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index 2bf5c77e61c..913e70b30c5 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -1109,7 +1109,7 @@ class AccountsController(TransactionBase): elif self.doctype in ["Sales Invoice", "Purchase Invoice"]: po_or_so, doctype, fieldname = self.get_order_details() - if self.linked_order_has_payment_terms(po_or_so, fieldname): + if self.linked_order_has_payment_terms(po_or_so, fieldname, doctype): self.fetch_payment_terms_from_order(po_or_so, doctype) elif self.doctype not in ["Purchase Receipt"]: @@ -1138,9 +1138,9 @@ class AccountsController(TransactionBase): return po_or_so, po_or_so_doctype, po_or_so_doctype_name - def linked_order_has_payment_terms(self, po_or_so, fieldname): + def linked_order_has_payment_terms(self, po_or_so, fieldname, doctype): if po_or_so and self.all_items_have_same_po_or_so(po_or_so, fieldname): - if self.linked_order_has_payment_terms_template(po_or_so): + if self.linked_order_has_payment_terms_template(po_or_so, doctype): return True elif self.linked_order_has_payment_schedule(po_or_so): return True @@ -1154,8 +1154,8 @@ class AccountsController(TransactionBase): return True - def linked_order_has_payment_terms_template(self, po_or_so): - return frappe.get_value('Sales Order', po_or_so, 'payment_terms_template') + def linked_order_has_payment_terms_template(self, po_or_so, doctype): + return frappe.get_value(doctype, po_or_so, 'payment_terms_template') def linked_order_has_payment_schedule(self, po_or_so): return frappe.get_all('Payment Schedule', filters={'parent': po_or_so}) From b7267f8f5f82dccc237615901e043baaaf58589a Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Wed, 21 Jul 2021 15:25:09 +0530 Subject: [PATCH 56/95] fix: Syntax Error --- erpnext/accounts/doctype/sales_invoice/sales_invoice.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js index 2751b5509cc..dbc42de583e 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js @@ -348,7 +348,7 @@ erpnext.accounts.SalesInvoiceController = class SalesInvoiceController extends e items_add(doc, cdt, cdn) { var row = frappe.get_doc(cdt, cdn); this.frm.script_manager.copy_from_first_row("items", row, ["income_account", "discount_account", "cost_center"]); - } + }, set_dynamic_labels() { super.set_dynamic_labels(); From 92f7a5a390aa6760e6fa27a867ff289628d504a9 Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Wed, 21 Jul 2021 15:25:40 +0530 Subject: [PATCH 57/95] fix: GL For taxes if discount applied on Grand Total --- .../doctype/sales_invoice/sales_invoice.py | 26 +++++++------------ erpnext/controllers/accounts_controller.py | 21 +++++++++++++++ 2 files changed, 31 insertions(+), 16 deletions(-) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index 7862f82f6f6..23d3064069c 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -886,18 +886,22 @@ class SalesInvoice(SellingController): ) def make_tax_gl_entries(self, gl_entries): + enable_discount_accounting = cint(frappe.db.get_single_value('Accounts Settings', 'enable_discount_accounting')) + for tax in self.get("taxes"): + amount, base_amount = self.get_tax_amounts(tax, enable_discount_accounting) + if flt(tax.base_tax_amount_after_discount_amount): account_currency = get_account_currency(tax.account_head) gl_entries.append( self.get_gl_dict({ "account": tax.account_head, "against": self.customer, - "credit": flt(tax.base_tax_amount_after_discount_amount, + "credit": flt(base_amount, tax.precision("tax_amount_after_discount_amount")), - "credit_in_account_currency": (flt(tax.base_tax_amount_after_discount_amount, + "credit_in_account_currency": (flt(base_amount, tax.precision("base_tax_amount_after_discount_amount")) if account_currency==self.company_currency else - flt(tax.tax_amount_after_discount_amount, tax.precision("tax_amount_after_discount_amount"))), + flt(amount, tax.precision("tax_amount_after_discount_amount"))), "cost_center": tax.cost_center }, account_currency, item=tax) ) @@ -916,6 +920,8 @@ class SalesInvoice(SellingController): def make_item_gl_entries(self, gl_entries): # income account gl entries + enable_discount_accounting = cint(frappe.db.get_single_value('Accounts Settings', 'enable_discount_accounting')) + for item in self.get("items"): if flt(item.base_net_amount, item.precision("base_net_amount")): if item.is_fixed_asset: @@ -952,7 +958,7 @@ class SalesInvoice(SellingController): income_account = (item.income_account if (not item.enable_deferred_revenue or self.is_return) else item.deferred_revenue_account) - amount, base_amount = self.get_amount_and_base_amount(item) + amount, base_amount = self.get_amount_and_base_amount(item, enable_discount_accounting) account_currency = get_account_currency(income_account) gl_entries.append( @@ -973,18 +979,6 @@ class SalesInvoice(SellingController): erpnext.is_perpetual_inventory_enabled(self.company): gl_entries += super(SalesInvoice, self).get_gl_entries() - def get_amount_and_base_amount(self, item): - amount = item.net_amount - base_amount = item.base_net_amount - - enable_discount_accounting = cint(frappe.db.get_single_value('Accounts Settings', 'enable_discount_accounting')) - - if enable_discount_accounting and self.get('discount_amount') and self.get('additional_discount_account'): - amount = item.amount - base_amount = item.base_amount - - return amount, base_amount - def set_asset_status(self, asset): if self.is_return: asset.set_status() diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index 59879e0df58..3d048c36865 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -808,6 +808,27 @@ class AccountsController(TransactionBase): tax_map[tax.account_head] -= allocated_amount allocated_tax_map[tax.account_head] -= allocated_amount + def get_amount_and_base_amount(self, item, enable_discount_accounting): + amount = item.net_amount + base_amount = item.base_net_amount + + if enable_discount_accounting and self.get('discount_amount') and self.get('additional_discount_account'): + amount = item.amount + base_amount = item.base_amount + + return amount, base_amount + + def get_tax_amounts(self, tax, enable_discount_accounting): + amount = tax.tax_amount_after_discount_amount + base_amount = tax.base_tax_amount_after_discount_amount + + if enable_discount_accounting and self.get('discount_amount') and self.get('additional_discount_account') \ + and self.get('apply_discount_on') == 'Grand Total': + amount = tax.tax_amount + base_amount = tax.base_tax_amount + + return amount, base_amount + def make_discount_gl_entries(self, gl_entries): enable_discount_accounting = cint(frappe.db.get_single_value('Accounts Settings', 'enable_discount_accounting')) From c525b372c6582d09b20b061f8795ee51bf7aed13 Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Wed, 21 Jul 2021 22:28:32 +0530 Subject: [PATCH 58/95] fix: Tests --- .../purchase_invoice/test_purchase_invoice.py | 20 +++++++++---------- .../sales_invoice/test_sales_invoice.py | 9 +++++---- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py index 7c26007b072..9de3012554f 100644 --- a/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py @@ -271,17 +271,16 @@ class TestPurchaseInvoice(unittest.TestCase): additional_discount_account = create_account(account_name="Discount Account", parent_account="Indirect Expenses - _TC", company="_Test Company") - pi = make_purchase_invoice(qty=1, rate=100, do_not_save=1) + pi = make_purchase_invoice(qty=1, rate=100, do_not_save=1, parent_cost_center="Main - _TC") pi.apply_discount_on = "Grand Total" pi.additional_discount_account = additional_discount_account pi.additional_discount_percentage = 20 pi.append("taxes", { - "charge_type": "On Net Total", - "account_head": "CGST - _TC", + "charge_type": "Actual", + "account_head": "_Test Account VAT - _TC", "cost_center": "Main - _TC", - "description": "CGST @ 9.0", - "base_tax_amount": 20, - "base_tax_amount_after_discount_amount": 20 + "description": "Test", + "tax_amount": 20 }) pi.submit() @@ -294,10 +293,10 @@ class TestPurchaseInvoice(unittest.TestCase): # print(gl, "\n") expected_gle = [ - ["CGST - _TC", 20.0, 0.0, nowdate()], + ["_Test Account Cost for Goods Sold - _TC", 100.0, 0.0, nowdate()], + ["_Test Account VAT - _TC", 20.0, 0.0, nowdate()], ["Creditors - _TC", 0.0, 96.0, nowdate()], - ["Discount Account - _TC", 0.0, 24.0, nowdate()], - ["_Test Account Cost for Goods Sold - _TC", 100.0, 0.0, nowdate()] + ["Discount Account - _TC", 0.0, 24.0, nowdate()] ] check_gl_entries(self, pi.name, expected_gle, nowdate()) @@ -1218,6 +1217,7 @@ def check_gl_entries(doc, voucher_no, expected_gle, posting_date): where voucher_type='Purchase Invoice' and voucher_no=%s and posting_date >= %s order by posting_date asc, account asc""", (voucher_no, posting_date), as_dict=1) + print(gl_entries) for i, gle in enumerate(gl_entries): doc.assertEqual(expected_gle[i][0], gle.account) doc.assertEqual(expected_gle[i][1], gle.debit) @@ -1281,7 +1281,7 @@ def make_purchase_invoice(**args): pi.return_against = args.return_against pi.is_subcontracted = args.is_subcontracted or "No" pi.supplier_warehouse = args.supplier_warehouse or "_Test Warehouse 1 - _TC" - pi.cost_center = args.cost_center or "_Test Cost Center - _TC" + pi.cost_center = args.parent_cost_center pi.append("items", { "item_code": args.item or args.item_code or "_Test Item", diff --git a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py index eccc69fdb27..6ee16f8e78a 100644 --- a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py @@ -2045,16 +2045,17 @@ class TestSalesInvoice(unittest.TestCase): si.additional_discount_percentage = 20 si.append("taxes", { "charge_type": "Actual", - "account_head": "CGST - _TC", + "account_head": "_Test Account VAT - _TC", "cost_center": "Main - _TC", - "description": "CGST @ 9.0", + "parent_cost_center": "Main - _TC", + "description": "Test", "rate": 0, "tax_amount": 20 }) si.submit() expected_gle = [ - ["CGST - _TC", 0.0, 20.0, nowdate()], + ["_Test Account VAT - _TC", 0.0, 20.0, nowdate()], ["Debtors - _TC", 96.0, 0.0, nowdate()], ["Discount Account - _TC", 24.0, 0.0, nowdate()], ["Sales - _TC", 0.0, 100.0, nowdate()] @@ -2229,7 +2230,7 @@ def create_sales_invoice(**args): si.currency=args.currency or "INR" si.conversion_rate = args.conversion_rate or 1 si.naming_series = args.naming_series or "T-SINV-" - si.cost_center = args.cost_center or "_Test Cost Center - _TC" + si.cost_center = args.parent_cost_center si.append("items", { "item_code": args.item or args.item_code or "_Test Item", From c677d47a4a62234693d1803355b75608803d7584 Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Thu, 22 Jul 2021 10:43:16 +0530 Subject: [PATCH 59/95] fix: Test Cases --- .../doctype/purchase_invoice/test_purchase_invoice.py | 9 --------- .../accounts/doctype/sales_invoice/test_sales_invoice.py | 3 +-- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py index 9de3012554f..ed5c4af1a93 100644 --- a/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py @@ -284,14 +284,6 @@ class TestPurchaseInvoice(unittest.TestCase): }) pi.submit() - # gle = frappe.get_all( - # "GL Entry", - # fields = ['account', 'debit', 'credit', 'posting_date'], - # filters = {'voucher_no': pi.name} - # ) - # for gl in gle: - # print(gl, "\n") - expected_gle = [ ["_Test Account Cost for Goods Sold - _TC", 100.0, 0.0, nowdate()], ["_Test Account VAT - _TC", 20.0, 0.0, nowdate()], @@ -1217,7 +1209,6 @@ def check_gl_entries(doc, voucher_no, expected_gle, posting_date): where voucher_type='Purchase Invoice' and voucher_no=%s and posting_date >= %s order by posting_date asc, account asc""", (voucher_no, posting_date), as_dict=1) - print(gl_entries) for i, gle in enumerate(gl_entries): doc.assertEqual(expected_gle[i][0], gle.account) doc.assertEqual(expected_gle[i][1], gle.debit) diff --git a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py index 6ee16f8e78a..a55f708ab66 100644 --- a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py @@ -2039,7 +2039,7 @@ class TestSalesInvoice(unittest.TestCase): additional_discount_account = create_account(account_name="Discount Account", parent_account="Indirect Expenses - _TC", company="_Test Company") - si = create_sales_invoice(rate=100, do_not_save=1) + si = create_sales_invoice(rate=100, parent_cost_center='Main - _TC', do_not_save=1) si.apply_discount_on = "Grand Total" si.additional_discount_account = additional_discount_account si.additional_discount_percentage = 20 @@ -2047,7 +2047,6 @@ class TestSalesInvoice(unittest.TestCase): "charge_type": "Actual", "account_head": "_Test Account VAT - _TC", "cost_center": "Main - _TC", - "parent_cost_center": "Main - _TC", "description": "Test", "rate": 0, "tax_amount": 20 From ad7bb316c1dbe630c19d4e0146782e2fca108e6d Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Wed, 28 Jul 2021 11:38:44 +0530 Subject: [PATCH 60/95] fix: GL Entries for discount amount with item qty greater than 1 --- erpnext/controllers/accounts_controller.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index 3d048c36865..8199b1040f0 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -845,6 +845,7 @@ class AccountsController(TransactionBase): for item in self.get("items"): if item.get('discount_amount') and item.get('discount_account'): + discount_amount = item.discount_amount * item.qty if self.doctype == "Purchase Invoice": income_or_expense_account = (item.expense_account if (not item.enable_deferred_expense or self.is_return) @@ -859,8 +860,9 @@ class AccountsController(TransactionBase): self.get_gl_dict({ "account": item.discount_account, "against": supplier_or_customer, - dr_or_cr: flt(item.discount_amount), - dr_or_cr + "_in_account_currency": flt(item.discount_amount), + dr_or_cr: flt(discount_amount, item.precision('discount_amount')), + dr_or_cr + "_in_account_currency": flt(discount_amount * self.get('conversion_rate'), + item.precision('discount_amount')), "cost_center": item.cost_center, "project": item.project }, account_currency, item=item) @@ -871,8 +873,9 @@ class AccountsController(TransactionBase): self.get_gl_dict({ "account": income_or_expense_account, "against": supplier_or_customer, - rev_dr_cr: flt(item.discount_amount), - rev_dr_cr + "_in_account_currency": flt(item.discount_amount), + rev_dr_cr: flt(discount_amount, item.precision('discount_amount')), + rev_dr_cr + "_in_account_currency": flt(discount_amount * self.get('conversion_rate'), + item.precision('discount_amount')), "cost_center": item.cost_center, "project": item.project or self.project }, account_currency, item=item) From 54d1336d113de3962db6e6e55e0fa4225c84d924 Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Mon, 2 Aug 2021 23:15:44 +0530 Subject: [PATCH 61/95] fix: Condition for fetching Payment Terms from Sales/Purchase Orders --- erpnext/controllers/accounts_controller.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index c793c19a92e..5f3d3ce1e63 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -1106,16 +1106,16 @@ class AccountsController(TransactionBase): base_grand_total = flt(grand_total * self.get("conversion_rate"), self.precision("base_grand_total")) if not self.get("payment_schedule"): + if self.doctype in ["Sales Invoice", "Purchase Invoice"] and not self.get("payment_terms_template"): + po_or_so, doctype, fieldname = self.get_order_details() + if self.get("payment_terms_template"): data = get_payment_terms(self.payment_terms_template, posting_date, grand_total, base_grand_total) for item in data: self.append("payment_schedule", item) - elif self.doctype in ["Sales Invoice", "Purchase Invoice"]: - po_or_so, doctype, fieldname = self.get_order_details() - - if self.linked_order_has_payment_terms(po_or_so, fieldname, doctype): - self.fetch_payment_terms_from_order(po_or_so, doctype) + elif self.doctype in ["Sales Invoice", "Purchase Invoice"] and self.linked_order_has_payment_terms(po_or_so, fieldname, doctype): + self.fetch_payment_terms_from_order(po_or_so, doctype) elif self.doctype not in ["Purchase Receipt"]: data = dict(due_date=due_date, invoice_portion=100, payment_amount=grand_total, base_payment_amount=base_grand_total) From 7244afe129b836b54af2a2376694bdbd705ac83a Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Wed, 4 Aug 2021 03:15:13 +0530 Subject: [PATCH 62/95] fix: Rename test to reflect changes in code --- erpnext/buying/doctype/purchase_order/test_purchase_order.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/buying/doctype/purchase_order/test_purchase_order.py b/erpnext/buying/doctype/purchase_order/test_purchase_order.py index 474c9cf3df9..d7db27cb54c 100644 --- a/erpnext/buying/doctype/purchase_order/test_purchase_order.py +++ b/erpnext/buying/doctype/purchase_order/test_purchase_order.py @@ -632,7 +632,7 @@ class TestPurchaseOrder(unittest.TestCase): else: raise Exception - def test_terms_does_not_copy(self): + def test_terms_are_not_copied_if_automatically_fetch_payment_terms_is_unchecked(self): po = create_purchase_order() self.assertTrue(po.get('payment_schedule')) From 1200872c7e83bbe2c518d2642447539837534c69 Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Thu, 5 Aug 2021 00:35:45 +0530 Subject: [PATCH 63/95] fix: Disable automcatically_fetch_payment_terms after running its associated tests --- erpnext/buying/doctype/purchase_order/test_purchase_order.py | 2 ++ erpnext/selling/doctype/sales_order/test_sales_order.py | 2 ++ erpnext/stock/doctype/delivery_note/test_delivery_note.py | 2 ++ erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py | 2 ++ 4 files changed, 8 insertions(+) diff --git a/erpnext/buying/doctype/purchase_order/test_purchase_order.py b/erpnext/buying/doctype/purchase_order/test_purchase_order.py index d7db27cb54c..0db54e42068 100644 --- a/erpnext/buying/doctype/purchase_order/test_purchase_order.py +++ b/erpnext/buying/doctype/purchase_order/test_purchase_order.py @@ -988,6 +988,8 @@ class TestPurchaseOrder(unittest.TestCase): # self.assertEqual(po.payment_terms_template, pi.payment_terms_template) compare_payment_schedules(self, po, pi) + automatically_fetch_payment_terms(enable=0) + def make_pr_against_po(po, received_qty=0): pr = make_purchase_receipt(po) pr.get("items")[0].qty = received_qty or 5 diff --git a/erpnext/selling/doctype/sales_order/test_sales_order.py b/erpnext/selling/doctype/sales_order/test_sales_order.py index f4a089bcef2..5639ee8069e 100644 --- a/erpnext/selling/doctype/sales_order/test_sales_order.py +++ b/erpnext/selling/doctype/sales_order/test_sales_order.py @@ -1248,6 +1248,8 @@ class TestSalesOrder(unittest.TestCase): self.assertEqual(so.payment_terms_template, si.payment_terms_template) compare_payment_schedules(self, so, si) + automatically_fetch_payment_terms(enable=0) + def automatically_fetch_payment_terms(enable=1): accounts_settings = frappe.get_doc("Accounts Settings") accounts_settings.automatically_fetch_payment_terms = enable diff --git a/erpnext/stock/doctype/delivery_note/test_delivery_note.py b/erpnext/stock/doctype/delivery_note/test_delivery_note.py index ca8d8b99d31..756825e826d 100644 --- a/erpnext/stock/doctype/delivery_note/test_delivery_note.py +++ b/erpnext/stock/doctype/delivery_note/test_delivery_note.py @@ -785,6 +785,8 @@ class TestDeliveryNote(unittest.TestCase): self.assertEqual(so.payment_terms_template, si.payment_terms_template) compare_payment_schedules(self, so, si) + automatically_fetch_payment_terms(enable=0) + def create_delivery_note(**args): dn = frappe.new_doc("Delivery Note") args = frappe._dict(args) diff --git a/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py b/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py index ee7fe4c9bd2..0ae7e125e46 100644 --- a/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py +++ b/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py @@ -1107,6 +1107,8 @@ class TestPurchaseReceipt(unittest.TestCase): # self.assertEqual(po.payment_terms_template, pi.payment_terms_template) compare_payment_schedules(self, po, pi) + automatically_fetch_payment_terms(enable=0) + def get_sl_entries(voucher_type, voucher_no): return frappe.db.sql(""" select actual_qty, warehouse, stock_value_difference from `tabStock Ledger Entry` where voucher_type=%s and voucher_no=%s From 55cb82c74d4f536891e862f452971f9269e0af15 Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Thu, 5 Aug 2021 00:52:55 +0530 Subject: [PATCH 64/95] fix: Compare Payment Schedules --- .../doctype/sales_order/test_sales_order.py | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/erpnext/selling/doctype/sales_order/test_sales_order.py b/erpnext/selling/doctype/sales_order/test_sales_order.py index 5639ee8069e..a226da75cd8 100644 --- a/erpnext/selling/doctype/sales_order/test_sales_order.py +++ b/erpnext/selling/doctype/sales_order/test_sales_order.py @@ -5,7 +5,7 @@ import json import unittest import frappe import frappe.permissions -from frappe.utils import flt, add_days, nowdate +from frappe.utils import flt, add_days, nowdate, getdate from frappe.core.doctype.user_permission.test_user_permission import create_user from erpnext.selling.doctype.sales_order.sales_order \ import make_material_request, make_delivery_note, make_sales_invoice, WarehouseRequired @@ -1256,17 +1256,11 @@ def automatically_fetch_payment_terms(enable=1): accounts_settings.save() def compare_payment_schedules(doc, doc1, doc2): - payment_schedule1 = frappe.db.sql("""select payment_term, description, due_date, mode_of_payment, invoice_portion, payment_amount - from `tabPayment Schedule` - where parenttype=%s and parent=%s - order by payment_term asc""", (doc1.doctype, doc1.name), as_dict=1) - - payment_schedule2 = frappe.db.sql("""select payment_term, description, due_date, mode_of_payment, invoice_portion, payment_amount - from `tabPayment Schedule` - where parenttype=%s and parent=%s - order by payment_term asc""", (doc2.doctype, doc2.name), as_dict=1) - - doc.assertEqual(payment_schedule1, payment_schedule2) + for index, schedule in enumerate(doc1.get('payment_schedule')): + doc.assertEqual(schedule.payment_term, doc2.payment_schedule[index].payment_term) + doc.assertEqual(getdate(schedule.due_date), doc2.payment_schedule[index].due_date) + doc.assertEqual(schedule.invoice_portion, doc2.payment_schedule[index].invoice_portion) + doc.assertEqual(schedule.payment_amount, doc2.payment_schedule[index].payment_amount) def make_sales_order(**args): so = frappe.new_doc("Sales Order") From 0588382c38642bf5240deca16ef82dca351608a2 Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Thu, 5 Aug 2021 21:42:09 +0530 Subject: [PATCH 65/95] fix: Stop fetching amount while fetching Payment Terms --- erpnext/controllers/accounts_controller.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index 5f3d3ce1e63..35ebebc84cf 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -1180,10 +1180,7 @@ class AccountsController(TransactionBase): 'due_date': schedule.due_date, 'invoice_portion': schedule.invoice_portion, 'discount_type': schedule.discount_type, - 'discount': schedule.discount, - 'base_payment_amount': schedule.base_payment_amount, - 'payment_amount': schedule.payment_amount, - 'outstanding': schedule.outstanding + 'discount': schedule.discount } self.append("payment_schedule", payment_schedule) From 5b33e75c6564f7afe02a44628b6f44f478af2aac Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Thu, 5 Aug 2021 21:50:09 +0530 Subject: [PATCH 66/95] fix: Fetch discount details from Payment Terms only if Discount Type = Percentage --- erpnext/controllers/accounts_controller.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index 35ebebc84cf..b0e24606c66 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -1179,9 +1179,14 @@ class AccountsController(TransactionBase): 'payment_term': schedule.payment_term, 'due_date': schedule.due_date, 'invoice_portion': schedule.invoice_portion, - 'discount_type': schedule.discount_type, - 'discount': schedule.discount + 'mode_of_payment': schedule.mode_of_payment, + 'description': schedule.description } + + if schedule.discount_type == 'Percentage': + payment_schedule['discount_type'] = schedule.discount_type + payment_schedule['discount'] = schedule.discount + self.append("payment_schedule", payment_schedule) def set_due_date(self): From e247e3a4b282f5dab116276827be60dcc0092b2d Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Thu, 5 Aug 2021 22:04:11 +0530 Subject: [PATCH 67/95] fix: Only fetch default Payment Terms Template if present --- erpnext/accounts/party.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/party.py b/erpnext/accounts/party.py index b97dc401e6a..19a394f7439 100644 --- a/erpnext/accounts/party.py +++ b/erpnext/accounts/party.py @@ -2,6 +2,7 @@ # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals +from re import template import frappe, erpnext from frappe import _, msgprint, scrub @@ -59,7 +60,10 @@ def _get_party_details(party=None, account=None, party_type="Customer", company= billing_address=party_address, shipping_address=shipping_address) if fetch_payment_terms_template: - party_details["payment_terms_template"] = get_payment_terms_template(party.name, party_type, company) + payment_terms_template = get_payment_terms_template(party.name, party_type, company) + + if payment_terms_template: + party_details["payment_terms_template"] = payment_terms_template if not party_details.get("currency"): party_details["currency"] = currency From 072f63b32434672ef97dbd6ba7f2e3b3a3138933 Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Thu, 5 Aug 2021 23:04:58 +0530 Subject: [PATCH 68/95] Revert "fix: Only fetch default Payment Terms Template if present" This reverts commit fb80ca9e06ae57dbb61e1a3907b2cfc19b1fd925. --- erpnext/accounts/party.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/erpnext/accounts/party.py b/erpnext/accounts/party.py index 19a394f7439..b97dc401e6a 100644 --- a/erpnext/accounts/party.py +++ b/erpnext/accounts/party.py @@ -2,7 +2,6 @@ # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals -from re import template import frappe, erpnext from frappe import _, msgprint, scrub @@ -60,10 +59,7 @@ def _get_party_details(party=None, account=None, party_type="Customer", company= billing_address=party_address, shipping_address=shipping_address) if fetch_payment_terms_template: - payment_terms_template = get_payment_terms_template(party.name, party_type, company) - - if payment_terms_template: - party_details["payment_terms_template"] = payment_terms_template + party_details["payment_terms_template"] = get_payment_terms_template(party.name, party_type, company) if not party_details.get("currency"): party_details["currency"] = currency From bcf56e64ba41af8000a2371cb37bff12c3dc702e Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Fri, 6 Aug 2021 23:53:16 +0530 Subject: [PATCH 69/95] fix: Ignore default payment term templates when coping payment terms from orders --- .../purchase_invoice/purchase_invoice.js | 5 +- .../purchase_invoice/purchase_invoice.json | 635 +++++++++++---- .../doctype/sales_invoice/sales_invoice.json | 727 +++++++++++++----- erpnext/accounts/party.py | 4 +- .../doctype/purchase_order/purchase_order.py | 7 +- erpnext/controllers/accounts_controller.py | 31 +- erpnext/controllers/buying_controller.py | 3 +- erpnext/public/js/utils/party.js | 1 + .../purchase_receipt/purchase_receipt.py | 5 +- 9 files changed, 1057 insertions(+), 361 deletions(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js index 87ab31f0d5d..c953d5ce0cf 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js @@ -275,7 +275,7 @@ erpnext.accounts.PurchaseInvoice = class PurchaseInvoice extends erpnext.buying. // Do not update if inter company reference is there as the details will already be updated if(this.frm.updating_party_details || this.frm.doc.inter_company_invoice_reference) return; - + erpnext.utils.get_party_details(this.frm, "erpnext.accounts.party.get_party_details", { posting_date: this.frm.doc.posting_date, @@ -283,7 +283,8 @@ erpnext.accounts.PurchaseInvoice = class PurchaseInvoice extends erpnext.buying. party: this.frm.doc.supplier, party_type: "Supplier", account: this.frm.doc.credit_to, - price_list: this.frm.doc.buying_price_list + price_list: this.frm.doc.buying_price_list, + fetch_payment_terms_template: cint(!this.frm.doc.ignore_default_payment_terms_template) }, function() { me.apply_pricing_rule(); me.frm.doc.apply_tds = me.frm.supplier_tds ? 1 : 0; diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json index 00ef7d5c184..f1bf595a394 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json @@ -131,6 +131,7 @@ "advances", "payment_schedule_section", "payment_terms_template", + "ignore_default_payment_terms_template", "payment_schedule", "terms_section_break", "tc_name", @@ -175,7 +176,9 @@ "hidden": 1, "label": "Title", "no_copy": 1, - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "naming_series", @@ -187,7 +190,9 @@ "options": "ACC-PINV-.YYYY.-\nACC-PINV-RET-.YYYY.-", "print_hide": 1, "reqd": 1, - "set_only_once": 1 + "set_only_once": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "supplier", @@ -199,7 +204,9 @@ "options": "Supplier", "print_hide": 1, "reqd": 1, - "search_index": 1 + "search_index": 1, + "show_days": 1, + "show_seconds": 1 }, { "bold": 1, @@ -211,7 +218,9 @@ "label": "Supplier Name", "oldfieldname": "supplier_name", "oldfieldtype": "Data", - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "fetch_from": "supplier.tax_id", @@ -219,21 +228,27 @@ "fieldtype": "Read Only", "label": "Tax Id", "print_hide": 1, - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "due_date", "fieldtype": "Date", "label": "Due Date", "oldfieldname": "due_date", - "oldfieldtype": "Date" + "oldfieldtype": "Date", + "show_days": 1, + "show_seconds": 1 }, { "default": "0", "fieldname": "is_paid", "fieldtype": "Check", "label": "Is Paid", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "default": "0", @@ -241,19 +256,25 @@ "fieldtype": "Check", "label": "Is Return (Debit Note)", "no_copy": 1, - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "default": "0", "fieldname": "apply_tds", "fieldtype": "Check", "label": "Apply Tax Withholding Amount", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "column_break1", "fieldtype": "Column Break", "oldfieldtype": "Column Break", + "show_days": 1, + "show_seconds": 1, "width": "50%" }, { @@ -263,13 +284,17 @@ "label": "Company", "options": "Company", "print_hide": 1, - "remember_last_selected_value": 1 + "remember_last_selected_value": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "cost_center", "fieldtype": "Link", "label": "Cost Center", - "options": "Cost Center" + "options": "Cost Center", + "show_days": 1, + "show_seconds": 1 }, { "default": "Today", @@ -281,7 +306,9 @@ "oldfieldtype": "Date", "print_hide": 1, "reqd": 1, - "search_index": 1 + "search_index": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "posting_time", @@ -290,6 +317,8 @@ "no_copy": 1, "print_hide": 1, "print_width": "100px", + "show_days": 1, + "show_seconds": 1, "width": "100px" }, { @@ -298,7 +327,9 @@ "fieldname": "set_posting_time", "fieldtype": "Check", "label": "Edit Posting Date and Time", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "amended_from", @@ -310,44 +341,58 @@ "oldfieldtype": "Link", "options": "Purchase Invoice", "print_hide": 1, - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "collapsible": 1, "collapsible_depends_on": "eval:doc.on_hold", "fieldname": "sb_14", "fieldtype": "Section Break", - "label": "Hold Invoice" + "label": "Hold Invoice", + "show_days": 1, + "show_seconds": 1 }, { "default": "0", "fieldname": "on_hold", "fieldtype": "Check", - "label": "Hold Invoice" + "label": "Hold Invoice", + "show_days": 1, + "show_seconds": 1 }, { "depends_on": "eval:doc.on_hold", "description": "Once set, this invoice will be on hold till the set date", "fieldname": "release_date", "fieldtype": "Date", - "label": "Release Date" + "label": "Release Date", + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "cb_17", - "fieldtype": "Column Break" + "fieldtype": "Column Break", + "show_days": 1, + "show_seconds": 1 }, { "depends_on": "eval:doc.on_hold", "fieldname": "hold_comment", "fieldtype": "Small Text", - "label": "Reason For Putting On Hold" + "label": "Reason For Putting On Hold", + "show_days": 1, + "show_seconds": 1 }, { "collapsible": 1, "collapsible_depends_on": "bill_no", "fieldname": "supplier_invoice_details", "fieldtype": "Section Break", - "label": "Supplier Invoice Details" + "label": "Supplier Invoice Details", + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "bill_no", @@ -355,11 +400,15 @@ "label": "Supplier Invoice No", "oldfieldname": "bill_no", "oldfieldtype": "Data", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "column_break_15", - "fieldtype": "Column Break" + "fieldtype": "Column Break", + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "bill_date", @@ -368,13 +417,17 @@ "no_copy": 1, "oldfieldname": "bill_date", "oldfieldtype": "Date", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "depends_on": "return_against", "fieldname": "returns", "fieldtype": "Section Break", - "label": "Returns" + "label": "Returns", + "show_days": 1, + "show_seconds": 1 }, { "depends_on": "return_against", @@ -384,26 +437,34 @@ "no_copy": 1, "options": "Purchase Invoice", "print_hide": 1, - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "collapsible": 1, "fieldname": "section_addresses", "fieldtype": "Section Break", - "label": "Address and Contact" + "label": "Address and Contact", + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "supplier_address", "fieldtype": "Link", "label": "Select Supplier Address", "options": "Address", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "address_display", "fieldtype": "Small Text", "label": "Address", - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "contact_person", @@ -411,51 +472,67 @@ "in_global_search": 1, "label": "Contact Person", "options": "Contact", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "contact_display", "fieldtype": "Small Text", "label": "Contact", - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "contact_mobile", "fieldtype": "Small Text", "label": "Mobile No", - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "contact_email", "fieldtype": "Small Text", "label": "Contact Email", "print_hide": 1, - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "col_break_address", - "fieldtype": "Column Break" + "fieldtype": "Column Break", + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "shipping_address", "fieldtype": "Link", "label": "Select Shipping Address", "options": "Address", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "shipping_address_display", "fieldtype": "Small Text", "label": "Shipping Address", "print_hide": 1, - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "collapsible": 1, "fieldname": "currency_and_price_list", "fieldtype": "Section Break", "label": "Currency and Price List", - "options": "fa fa-tag" + "options": "fa fa-tag", + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "currency", @@ -464,7 +541,9 @@ "oldfieldname": "currency", "oldfieldtype": "Select", "options": "Currency", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "conversion_rate", @@ -473,18 +552,24 @@ "oldfieldname": "conversion_rate", "oldfieldtype": "Currency", "precision": "9", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "column_break2", - "fieldtype": "Column Break" + "fieldtype": "Column Break", + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "buying_price_list", "fieldtype": "Link", "label": "Price List", "options": "Price List", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "price_list_currency", @@ -492,14 +577,18 @@ "label": "Price List Currency", "options": "Currency", "print_hide": 1, - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "plc_conversion_rate", "fieldtype": "Float", "label": "Price List Exchange Rate", "precision": "9", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "default": "0", @@ -508,11 +597,15 @@ "label": "Ignore Pricing Rule", "no_copy": 1, "permlevel": 1, - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "sec_warehouse", - "fieldtype": "Section Break" + "fieldtype": "Section Break", + "show_days": 1, + "show_seconds": 1 }, { "depends_on": "update_stock", @@ -521,7 +614,9 @@ "fieldtype": "Link", "label": "Set Accepted Warehouse", "options": "Warehouse", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "depends_on": "update_stock", @@ -531,11 +626,15 @@ "label": "Rejected Warehouse", "no_copy": 1, "options": "Warehouse", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "col_break_warehouse", - "fieldtype": "Column Break" + "fieldtype": "Column Break", + "show_days": 1, + "show_seconds": 1 }, { "default": "No", @@ -543,25 +642,33 @@ "fieldtype": "Select", "label": "Raw Materials Supplied", "options": "No\nYes", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "items_section", "fieldtype": "Section Break", "oldfieldtype": "Section Break", - "options": "fa fa-shopping-cart" + "options": "fa fa-shopping-cart", + "show_days": 1, + "show_seconds": 1 }, { "default": "0", "fieldname": "update_stock", "fieldtype": "Check", "label": "Update Stock", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "scan_barcode", "fieldtype": "Data", - "label": "Scan Barcode" + "label": "Scan Barcode", + "show_days": 1, + "show_seconds": 1 }, { "allow_bulk_edit": 1, @@ -571,25 +678,33 @@ "oldfieldname": "entries", "oldfieldtype": "Table", "options": "Purchase Invoice Item", - "reqd": 1 + "reqd": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "pricing_rule_details", "fieldtype": "Section Break", - "label": "Pricing Rules" + "label": "Pricing Rules", + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "pricing_rules", "fieldtype": "Table", "label": "Pricing Rule Detail", "options": "Pricing Rule Detail", - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "collapsible_depends_on": "supplied_items", "fieldname": "raw_materials_supplied", "fieldtype": "Section Break", - "label": "Raw Materials Supplied" + "label": "Raw Materials Supplied", + "show_days": 1, + "show_seconds": 1 }, { "depends_on": "update_stock", @@ -597,17 +712,23 @@ "fieldtype": "Table", "label": "Supplied Items", "no_copy": 1, - "options": "Purchase Receipt Item Supplied" + "options": "Purchase Receipt Item Supplied", + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "section_break_26", - "fieldtype": "Section Break" + "fieldtype": "Section Break", + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "total_qty", "fieldtype": "Float", "label": "Total Quantity", - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "base_total", @@ -615,7 +736,9 @@ "label": "Total (Company Currency)", "options": "Company:company:default_currency", "print_hide": 1, - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "base_net_total", @@ -625,18 +748,24 @@ "oldfieldtype": "Currency", "options": "Company:company:default_currency", "print_hide": 1, - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "column_break_28", - "fieldtype": "Column Break" + "fieldtype": "Column Break", + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "total", "fieldtype": "Currency", "label": "Total", "options": "currency", - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "net_total", @@ -646,42 +775,56 @@ "oldfieldtype": "Currency", "options": "currency", "print_hide": 1, - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "total_net_weight", "fieldtype": "Float", "label": "Total Net Weight", "print_hide": 1, - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "taxes_section", "fieldtype": "Section Break", "oldfieldtype": "Section Break", - "options": "fa fa-money" + "options": "fa fa-money", + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "tax_category", "fieldtype": "Link", "label": "Tax Category", "options": "Tax Category", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "column_break_49", - "fieldtype": "Column Break" + "fieldtype": "Column Break", + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "shipping_rule", "fieldtype": "Link", "label": "Shipping Rule", "options": "Shipping Rule", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "section_break_51", - "fieldtype": "Section Break" + "fieldtype": "Section Break", + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "taxes_and_charges", @@ -690,7 +833,9 @@ "oldfieldname": "purchase_other_charges", "oldfieldtype": "Link", "options": "Purchase Taxes and Charges Template", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "taxes", @@ -698,13 +843,17 @@ "label": "Purchase Taxes and Charges", "oldfieldname": "purchase_tax_details", "oldfieldtype": "Table", - "options": "Purchase Taxes and Charges" + "options": "Purchase Taxes and Charges", + "show_days": 1, + "show_seconds": 1 }, { "collapsible": 1, "fieldname": "sec_tax_breakup", "fieldtype": "Section Break", - "label": "Tax Breakup" + "label": "Tax Breakup", + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "other_charges_calculation", @@ -713,13 +862,17 @@ "no_copy": 1, "oldfieldtype": "HTML", "print_hide": 1, - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "totals", "fieldtype": "Section Break", "oldfieldtype": "Section Break", - "options": "fa fa-money" + "options": "fa fa-money", + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "base_taxes_and_charges_added", @@ -729,7 +882,9 @@ "oldfieldtype": "Currency", "options": "Company:company:default_currency", "print_hide": 1, - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "base_taxes_and_charges_deducted", @@ -739,7 +894,9 @@ "oldfieldtype": "Currency", "options": "Company:company:default_currency", "print_hide": 1, - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "base_total_taxes_and_charges", @@ -749,11 +906,15 @@ "oldfieldtype": "Currency", "options": "Company:company:default_currency", "print_hide": 1, - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "column_break_40", - "fieldtype": "Column Break" + "fieldtype": "Column Break", + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "taxes_and_charges_added", @@ -763,7 +924,9 @@ "oldfieldtype": "Currency", "options": "currency", "print_hide": 1, - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "taxes_and_charges_deducted", @@ -773,7 +936,9 @@ "oldfieldtype": "Currency", "options": "currency", "print_hide": 1, - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "total_taxes_and_charges", @@ -781,14 +946,18 @@ "label": "Total Taxes and Charges", "options": "currency", "print_hide": 1, - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "collapsible": 1, "collapsible_depends_on": "discount_amount", "fieldname": "section_break_44", "fieldtype": "Section Break", - "label": "Additional Discount" + "label": "Additional Discount", + "show_days": 1, + "show_seconds": 1 }, { "default": "Grand Total", @@ -796,7 +965,9 @@ "fieldtype": "Select", "label": "Apply Additional Discount On", "options": "\nGrand Total\nNet Total", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "base_discount_amount", @@ -804,28 +975,38 @@ "label": "Additional Discount Amount (Company Currency)", "options": "Company:company:default_currency", "print_hide": 1, - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "column_break_46", - "fieldtype": "Column Break" + "fieldtype": "Column Break", + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "additional_discount_percentage", "fieldtype": "Float", "label": "Additional Discount Percentage", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "discount_amount", "fieldtype": "Currency", "label": "Additional Discount Amount", "options": "currency", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "section_break_49", - "fieldtype": "Section Break" + "fieldtype": "Section Break", + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "base_grand_total", @@ -835,7 +1016,9 @@ "oldfieldtype": "Currency", "options": "Company:company:default_currency", "print_hide": 1, - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "depends_on": "eval:!doc.disable_rounded_total", @@ -845,7 +1028,9 @@ "no_copy": 1, "options": "Company:company:default_currency", "print_hide": 1, - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "depends_on": "eval:!doc.disable_rounded_total", @@ -855,7 +1040,9 @@ "no_copy": 1, "options": "Company:company:default_currency", "print_hide": 1, - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "base_in_words", @@ -865,13 +1052,17 @@ "oldfieldname": "in_words", "oldfieldtype": "Data", "print_hide": 1, - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "column_break8", "fieldtype": "Column Break", "oldfieldtype": "Column Break", "print_hide": 1, + "show_days": 1, + "show_seconds": 1, "width": "50%" }, { @@ -882,7 +1073,9 @@ "oldfieldname": "grand_total_import", "oldfieldtype": "Currency", "options": "currency", - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "depends_on": "eval:!doc.disable_rounded_total", @@ -892,7 +1085,9 @@ "no_copy": 1, "options": "currency", "print_hide": 1, - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "depends_on": "eval:!doc.disable_rounded_total", @@ -902,7 +1097,9 @@ "no_copy": 1, "options": "currency", "print_hide": 1, - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "in_words", @@ -912,7 +1109,9 @@ "oldfieldname": "in_words_import", "oldfieldtype": "Data", "print_hide": 1, - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "total_advance", @@ -923,7 +1122,9 @@ "oldfieldtype": "Currency", "options": "party_account_currency", "print_hide": 1, - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "outstanding_amount", @@ -934,14 +1135,18 @@ "oldfieldtype": "Currency", "options": "party_account_currency", "print_hide": 1, - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "default": "0", "depends_on": "grand_total", "fieldname": "disable_rounded_total", "fieldtype": "Check", - "label": "Disable Rounded Total" + "label": "Disable Rounded Total", + "show_days": 1, + "show_seconds": 1 }, { "collapsible": 1, @@ -949,20 +1154,26 @@ "depends_on": "eval:doc.is_paid===1||(doc.advances && doc.advances.length>0)", "fieldname": "payments_section", "fieldtype": "Section Break", - "label": "Payments" + "label": "Payments", + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "mode_of_payment", "fieldtype": "Link", "label": "Mode of Payment", "options": "Mode of Payment", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "cash_bank_account", "fieldtype": "Link", "label": "Cash/Bank Account", - "options": "Account" + "options": "Account", + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "clearance_date", @@ -970,11 +1181,15 @@ "label": "Clearance Date", "no_copy": 1, "print_hide": 1, - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "col_br_payments", - "fieldtype": "Column Break" + "fieldtype": "Column Break", + "show_days": 1, + "show_seconds": 1 }, { "depends_on": "is_paid", @@ -983,7 +1198,9 @@ "label": "Paid Amount", "no_copy": 1, "options": "currency", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "base_paid_amount", @@ -992,7 +1209,9 @@ "no_copy": 1, "options": "Company:company:default_currency", "print_hide": 1, - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "collapsible": 1, @@ -1000,7 +1219,9 @@ "depends_on": "grand_total", "fieldname": "write_off", "fieldtype": "Section Break", - "label": "Write Off" + "label": "Write Off", + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "write_off_amount", @@ -1008,7 +1229,9 @@ "label": "Write Off Amount", "no_copy": 1, "options": "currency", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "base_write_off_amount", @@ -1017,11 +1240,15 @@ "no_copy": 1, "options": "Company:company:default_currency", "print_hide": 1, - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "column_break_61", - "fieldtype": "Column Break" + "fieldtype": "Column Break", + "show_days": 1, + "show_seconds": 1 }, { "depends_on": "eval:flt(doc.write_off_amount)!=0", @@ -1029,7 +1256,9 @@ "fieldtype": "Link", "label": "Write Off Account", "options": "Account", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "depends_on": "eval:flt(doc.write_off_amount)!=0", @@ -1037,7 +1266,9 @@ "fieldtype": "Link", "label": "Write Off Cost Center", "options": "Cost Center", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "collapsible": 1, @@ -1047,13 +1278,17 @@ "label": "Advance Payments", "oldfieldtype": "Section Break", "options": "fa fa-money", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "default": "0", "fieldname": "allocate_advances_automatically", "fieldtype": "Check", - "label": "Set Advances and Allocate (FIFO)" + "label": "Set Advances and Allocate (FIFO)", + "show_days": 1, + "show_seconds": 1 }, { "depends_on": "eval:!doc.allocate_advances_automatically", @@ -1061,7 +1296,9 @@ "fieldtype": "Button", "label": "Get Advances Paid", "oldfieldtype": "Button", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "advances", @@ -1071,20 +1308,26 @@ "oldfieldname": "advance_allocation_details", "oldfieldtype": "Table", "options": "Purchase Invoice Advance", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "collapsible": 1, "collapsible_depends_on": "eval:(!doc.is_return)", "fieldname": "payment_schedule_section", "fieldtype": "Section Break", - "label": "Payment Terms" + "label": "Payment Terms", + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "payment_terms_template", "fieldtype": "Link", "label": "Payment Terms Template", - "options": "Payment Terms Template" + "options": "Payment Terms Template", + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "payment_schedule", @@ -1092,7 +1335,9 @@ "label": "Payment Schedule", "no_copy": 1, "options": "Payment Schedule", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "collapsible": 1, @@ -1100,25 +1345,33 @@ "fieldname": "terms_section_break", "fieldtype": "Section Break", "label": "Terms and Conditions", - "options": "fa fa-legal" + "options": "fa fa-legal", + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "tc_name", "fieldtype": "Link", "label": "Terms", "options": "Terms and Conditions", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "terms", "fieldtype": "Text Editor", - "label": "Terms and Conditions1" + "label": "Terms and Conditions1", + "show_days": 1, + "show_seconds": 1 }, { "collapsible": 1, "fieldname": "printing_settings", "fieldtype": "Section Break", - "label": "Printing Settings" + "label": "Printing Settings", + "show_days": 1, + "show_seconds": 1 }, { "allow_on_submit": 1, @@ -1126,7 +1379,9 @@ "fieldtype": "Link", "label": "Letter Head", "options": "Letter Head", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "allow_on_submit": 1, @@ -1134,11 +1389,15 @@ "fieldname": "group_same_items", "fieldtype": "Check", "label": "Group same items", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "column_break_112", - "fieldtype": "Column Break" + "fieldtype": "Column Break", + "show_days": 1, + "show_seconds": 1 }, { "allow_on_submit": 1, @@ -1150,14 +1409,18 @@ "oldfieldtype": "Link", "options": "Print Heading", "print_hide": 1, - "report_hide": 1 + "report_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "language", "fieldtype": "Data", "label": "Print Language", "print_hide": 1, - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "collapsible": 1, @@ -1166,7 +1429,9 @@ "label": "More Information", "oldfieldtype": "Section Break", "options": "fa fa-file-text", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "credit_to", @@ -1177,7 +1442,9 @@ "options": "Account", "print_hide": 1, "reqd": 1, - "search_index": 1 + "search_index": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "party_account_currency", @@ -1187,7 +1454,9 @@ "no_copy": 1, "options": "Currency", "print_hide": 1, - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "default": "No", @@ -1197,7 +1466,9 @@ "oldfieldname": "is_opening", "oldfieldtype": "Select", "options": "No\nYes", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "against_expense_account", @@ -1207,11 +1478,15 @@ "no_copy": 1, "oldfieldname": "against_expense_account", "oldfieldtype": "Small Text", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "column_break_63", - "fieldtype": "Column Break" + "fieldtype": "Column Break", + "show_days": 1, + "show_seconds": 1 }, { "default": "Draft", @@ -1220,7 +1495,9 @@ "in_standard_filter": 1, "label": "Status", "options": "\nDraft\nReturn\nDebit Note Issued\nSubmitted\nPaid\nUnpaid\nOverdue\nCancelled\nInternal Transfer", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "inter_company_invoice_reference", @@ -1229,7 +1506,9 @@ "no_copy": 1, "options": "Sales Invoice", "print_hide": 1, - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "remarks", @@ -1238,14 +1517,18 @@ "no_copy": 1, "oldfieldname": "remarks", "oldfieldtype": "Text", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "collapsible": 1, "fieldname": "subscription_section", "fieldtype": "Section Break", "label": "Subscription Section", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "allow_on_submit": 1, @@ -1254,7 +1537,9 @@ "fieldtype": "Date", "label": "From Date", "no_copy": 1, - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "allow_on_submit": 1, @@ -1263,11 +1548,15 @@ "fieldtype": "Date", "label": "To Date", "no_copy": 1, - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "column_break_114", - "fieldtype": "Column Break" + "fieldtype": "Column Break", + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "auto_repeat", @@ -1276,24 +1565,32 @@ "no_copy": 1, "options": "Auto Repeat", "print_hide": 1, - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "allow_on_submit": 1, "depends_on": "eval: doc.auto_repeat", "fieldname": "update_auto_repeat_reference", "fieldtype": "Button", - "label": "Update Auto Repeat Reference" + "label": "Update Auto Repeat Reference", + "show_days": 1, + "show_seconds": 1 }, { "collapsible": 1, "fieldname": "accounting_dimensions_section", "fieldtype": "Section Break", - "label": "Accounting Dimensions " + "label": "Accounting Dimensions ", + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "dimension_col_break", - "fieldtype": "Column Break" + "fieldtype": "Column Break", + "show_days": 1, + "show_seconds": 1 }, { "default": "0", @@ -1301,7 +1598,9 @@ "fieldname": "is_internal_supplier", "fieldtype": "Check", "label": "Is Internal Supplier", - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "tax_withholding_category", @@ -1309,25 +1608,33 @@ "hidden": 1, "label": "Tax Withholding Category", "options": "Tax Withholding Category", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "billing_address", "fieldtype": "Link", "label": "Select Billing Address", - "options": "Address" + "options": "Address", + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "billing_address_display", "fieldtype": "Small Text", "label": "Billing Address", - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "project", "fieldtype": "Link", "label": "Project", - "options": "Project" + "options": "Project", + "show_days": 1, + "show_seconds": 1 }, { "depends_on": "eval:doc.is_internal_supplier", @@ -1335,7 +1642,9 @@ "fieldname": "unrealized_profit_loss_account", "fieldtype": "Link", "label": "Unrealized Profit / Loss Account", - "options": "Account" + "options": "Account", + "show_days": 1, + "show_seconds": 1 }, { "depends_on": "eval:doc.is_internal_supplier", @@ -1344,7 +1653,9 @@ "fieldname": "represents_company", "fieldtype": "Link", "label": "Represents Company", - "options": "Company" + "options": "Company", + "show_days": 1, + "show_seconds": 1 }, { "depends_on": "eval:doc.update_stock && doc.is_internal_supplier", @@ -1356,6 +1667,8 @@ "options": "Warehouse", "print_hide": 1, "print_width": "50px", + "show_days": 1, + "show_seconds": 1, "width": "50px" }, { @@ -1367,6 +1680,8 @@ "options": "Warehouse", "print_hide": 1, "print_width": "50px", + "show_days": 1, + "show_seconds": 1, "width": "50px" }, { @@ -1376,14 +1691,26 @@ "label": "Per Received", "no_copy": 1, "print_hide": 1, - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 + }, + { + "default": "0", + "fieldname": "ignore_default_payment_terms_template", + "fieldtype": "Check", + "hidden": 1, + "label": "Ignore Default Payment Terms Template", + "read_only": 1, + "show_days": 1, + "show_seconds": 1 } ], "icon": "fa fa-file-text", "idx": 204, "is_submittable": 1, "links": [], - "modified": "2021-06-15 18:20:56.806195", + "modified": "2021-08-07 17:53:14.351439", "modified_by": "Administrator", "module": "Accounts", "name": "Purchase Invoice", diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.json b/erpnext/accounts/doctype/sales_invoice/sales_invoice.json index 0a9a105b7ca..f5ed87d02a7 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.json +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.json @@ -127,6 +127,7 @@ "get_advances", "advances", "payment_schedule_section", + "ignore_default_payment_terms_template", "payment_terms_template", "payment_schedule", "payments_section", @@ -197,7 +198,9 @@ "fieldtype": "Section Break", "hide_days": 1, "hide_seconds": 1, - "options": "fa fa-user" + "options": "fa fa-user", + "show_days": 1, + "show_seconds": 1 }, { "allow_on_submit": 1, @@ -209,7 +212,9 @@ "hide_seconds": 1, "label": "Title", "no_copy": 1, - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "bold": 1, @@ -224,7 +229,9 @@ "options": "ACC-SINV-.YYYY.-\nACC-SINV-RET-.YYYY.-", "print_hide": 1, "reqd": 1, - "set_only_once": 1 + "set_only_once": 1, + "show_days": 1, + "show_seconds": 1 }, { "bold": 1, @@ -238,7 +245,9 @@ "oldfieldtype": "Link", "options": "Customer", "print_hide": 1, - "search_index": 1 + "search_index": 1, + "show_days": 1, + "show_seconds": 1 }, { "bold": 1, @@ -252,7 +261,9 @@ "label": "Customer Name", "oldfieldname": "customer_name", "oldfieldtype": "Data", - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "tax_id", @@ -261,7 +272,9 @@ "hide_seconds": 1, "label": "Tax Id", "print_hide": 1, - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "project", @@ -273,7 +286,9 @@ "oldfieldname": "project_name", "oldfieldtype": "Link", "options": "Project", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "default": "0", @@ -284,7 +299,9 @@ "label": "Include Payment (POS)", "oldfieldname": "is_pos", "oldfieldtype": "Check", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "depends_on": "is_pos", @@ -294,7 +311,9 @@ "hide_seconds": 1, "label": "POS Profile", "options": "POS Profile", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "default": "0", @@ -304,14 +323,18 @@ "hide_seconds": 1, "label": "Is Return (Credit Note)", "no_copy": 1, - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "column_break1", "fieldtype": "Column Break", "hide_days": 1, "hide_seconds": 1, - "oldfieldtype": "Column Break" + "oldfieldtype": "Column Break", + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "company", @@ -325,7 +348,9 @@ "options": "Company", "print_hide": 1, "remember_last_selected_value": 1, - "reqd": 1 + "reqd": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "cost_center", @@ -333,7 +358,9 @@ "hide_days": 1, "hide_seconds": 1, "label": "Cost Center", - "options": "Cost Center" + "options": "Cost Center", + "show_days": 1, + "show_seconds": 1 }, { "bold": 1, @@ -347,7 +374,9 @@ "oldfieldname": "posting_date", "oldfieldtype": "Date", "reqd": 1, - "search_index": 1 + "search_index": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "posting_time", @@ -358,7 +387,9 @@ "no_copy": 1, "oldfieldname": "posting_time", "oldfieldtype": "Time", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "default": "0", @@ -368,7 +399,9 @@ "hide_days": 1, "hide_seconds": 1, "label": "Edit Posting Date and Time", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "due_date", @@ -378,7 +411,9 @@ "label": "Payment Due Date", "no_copy": 1, "oldfieldname": "due_date", - "oldfieldtype": "Date" + "oldfieldtype": "Date", + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "amended_from", @@ -392,7 +427,9 @@ "oldfieldtype": "Link", "options": "Sales Invoice", "print_hide": 1, - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "depends_on": "eval:doc.return_against || doc.is_debit_note", @@ -405,7 +442,9 @@ "options": "Sales Invoice", "print_hide": 1, "read_only_depends_on": "eval:doc.is_return", - "search_index": 1 + "search_index": 1, + "show_days": 1, + "show_seconds": 1 }, { "default": "0", @@ -414,7 +453,9 @@ "fieldtype": "Check", "hide_days": 1, "hide_seconds": 1, - "label": "Update Billed Amount in Sales Order" + "label": "Update Billed Amount in Sales Order", + "show_days": 1, + "show_seconds": 1 }, { "collapsible": 1, @@ -423,7 +464,9 @@ "fieldtype": "Section Break", "hide_days": 1, "hide_seconds": 1, - "label": "Customer PO Details" + "label": "Customer PO Details", + "show_days": 1, + "show_seconds": 1 }, { "allow_on_submit": 1, @@ -433,13 +476,17 @@ "hide_seconds": 1, "label": "Customer's Purchase Order", "no_copy": 1, - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "column_break_23", "fieldtype": "Column Break", "hide_days": 1, - "hide_seconds": 1 + "hide_seconds": 1, + "show_days": 1, + "show_seconds": 1 }, { "allow_on_submit": 1, @@ -447,7 +494,9 @@ "fieldtype": "Date", "hide_days": 1, "hide_seconds": 1, - "label": "Customer's Purchase Order Date" + "label": "Customer's Purchase Order Date", + "show_days": 1, + "show_seconds": 1 }, { "collapsible": 1, @@ -455,7 +504,9 @@ "fieldtype": "Section Break", "hide_days": 1, "hide_seconds": 1, - "label": "Address and Contact" + "label": "Address and Contact", + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "customer_address", @@ -464,7 +515,9 @@ "hide_seconds": 1, "label": "Customer Address", "options": "Address", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "address_display", @@ -472,7 +525,9 @@ "hide_days": 1, "hide_seconds": 1, "label": "Address", - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "contact_person", @@ -482,7 +537,9 @@ "in_global_search": 1, "label": "Contact Person", "options": "Contact", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "contact_display", @@ -490,7 +547,9 @@ "hide_days": 1, "hide_seconds": 1, "label": "Contact", - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "contact_mobile", @@ -499,7 +558,9 @@ "hide_days": 1, "hide_seconds": 1, "label": "Mobile No", - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "contact_email", @@ -510,7 +571,9 @@ "label": "Contact Email", "options": "Email", "print_hide": 1, - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "territory", @@ -519,13 +582,17 @@ "hide_seconds": 1, "label": "Territory", "options": "Territory", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "col_break4", "fieldtype": "Column Break", "hide_days": 1, - "hide_seconds": 1 + "hide_seconds": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "shipping_address_name", @@ -534,7 +601,9 @@ "hide_seconds": 1, "label": "Shipping Address Name", "options": "Address", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "shipping_address", @@ -543,7 +612,9 @@ "hide_seconds": 1, "label": "Shipping Address", "print_hide": 1, - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "company_address", @@ -552,7 +623,9 @@ "hide_seconds": 1, "label": "Company Address Name", "options": "Address", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "company_address_display", @@ -562,7 +635,9 @@ "hide_seconds": 1, "label": "Company Address", "print_hide": 1, - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "collapsible": 1, @@ -571,7 +646,9 @@ "fieldtype": "Section Break", "hide_days": 1, "hide_seconds": 1, - "label": "Currency and Price List" + "label": "Currency and Price List", + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "currency", @@ -583,7 +660,9 @@ "oldfieldtype": "Select", "options": "Currency", "print_hide": 1, - "reqd": 1 + "reqd": 1, + "show_days": 1, + "show_seconds": 1 }, { "description": "Rate at which Customer Currency is converted to customer's base currency", @@ -596,13 +675,17 @@ "oldfieldtype": "Currency", "precision": "9", "print_hide": 1, - "reqd": 1 + "reqd": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "column_break2", "fieldtype": "Column Break", "hide_days": 1, "hide_seconds": 1, + "show_days": 1, + "show_seconds": 1, "width": "50%" }, { @@ -615,7 +698,9 @@ "oldfieldtype": "Select", "options": "Price List", "print_hide": 1, - "reqd": 1 + "reqd": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "price_list_currency", @@ -626,7 +711,9 @@ "options": "Currency", "print_hide": 1, "read_only": 1, - "reqd": 1 + "reqd": 1, + "show_days": 1, + "show_seconds": 1 }, { "description": "Rate at which Price list currency is converted to customer's base currency", @@ -637,7 +724,9 @@ "label": "Price List Exchange Rate", "precision": "9", "print_hide": 1, - "reqd": 1 + "reqd": 1, + "show_days": 1, + "show_seconds": 1 }, { "default": "0", @@ -648,14 +737,18 @@ "label": "Ignore Pricing Rule", "no_copy": 1, "permlevel": 1, - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "sec_warehouse", "fieldtype": "Section Break", "hide_days": 1, "hide_seconds": 1, - "label": "Warehouse" + "label": "Warehouse", + "show_days": 1, + "show_seconds": 1 }, { "depends_on": "update_stock", @@ -665,7 +758,9 @@ "hide_seconds": 1, "label": "Source Warehouse", "options": "Warehouse", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "items_section", @@ -674,7 +769,9 @@ "hide_seconds": 1, "label": "Items", "oldfieldtype": "Section Break", - "options": "fa fa-shopping-cart" + "options": "fa fa-shopping-cart", + "show_days": 1, + "show_seconds": 1 }, { "default": "0", @@ -685,14 +782,18 @@ "label": "Update Stock", "oldfieldname": "update_stock", "oldfieldtype": "Check", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "scan_barcode", "fieldtype": "Data", "hide_days": 1, "hide_seconds": 1, - "label": "Scan Barcode" + "label": "Scan Barcode", + "show_days": 1, + "show_seconds": 1 }, { "allow_bulk_edit": 1, @@ -704,14 +805,18 @@ "oldfieldname": "entries", "oldfieldtype": "Table", "options": "Sales Invoice Item", - "reqd": 1 + "reqd": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "pricing_rule_details", "fieldtype": "Section Break", "hide_days": 1, "hide_seconds": 1, - "label": "Pricing Rules" + "label": "Pricing Rules", + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "pricing_rules", @@ -720,7 +825,9 @@ "hide_seconds": 1, "label": "Pricing Rule Detail", "options": "Pricing Rule Detail", - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "packing_list", @@ -729,7 +836,9 @@ "hide_seconds": 1, "label": "Packing List", "options": "fa fa-suitcase", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "packed_items", @@ -738,7 +847,9 @@ "hide_seconds": 1, "label": "Packed Items", "options": "Packed Item", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "product_bundle_help", @@ -746,7 +857,9 @@ "hide_days": 1, "hide_seconds": 1, "label": "Product Bundle Help", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "collapsible": 1, @@ -756,7 +869,9 @@ "fieldtype": "Section Break", "hide_days": 1, "hide_seconds": 1, - "label": "Time Sheet List" + "label": "Time Sheet List", + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "timesheets", @@ -765,7 +880,9 @@ "hide_seconds": 1, "label": "Time Sheets", "options": "Sales Invoice Timesheet", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "default": "0", @@ -776,13 +893,17 @@ "label": "Total Billing Amount", "options": "currency", "print_hide": 1, - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "section_break_30", "fieldtype": "Section Break", "hide_days": 1, - "hide_seconds": 1 + "hide_seconds": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "total_qty", @@ -790,7 +911,9 @@ "hide_days": 1, "hide_seconds": 1, "label": "Total Quantity", - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "base_total", @@ -800,7 +923,9 @@ "label": "Total (Company Currency)", "options": "Company:company:default_currency", "print_hide": 1, - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "base_net_total", @@ -813,13 +938,17 @@ "options": "Company:company:default_currency", "print_hide": 1, "read_only": 1, - "reqd": 1 + "reqd": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "column_break_32", "fieldtype": "Column Break", "hide_days": 1, - "hide_seconds": 1 + "hide_seconds": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "total", @@ -828,7 +957,9 @@ "hide_seconds": 1, "label": "Total", "options": "currency", - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "net_total", @@ -838,7 +969,9 @@ "label": "Net Total", "options": "currency", "print_hide": 1, - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "total_net_weight", @@ -847,7 +980,9 @@ "hide_seconds": 1, "label": "Total Net Weight", "print_hide": 1, - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "taxes_section", @@ -855,7 +990,9 @@ "hide_days": 1, "hide_seconds": 1, "oldfieldtype": "Section Break", - "options": "fa fa-money" + "options": "fa fa-money", + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "taxes_and_charges", @@ -866,13 +1003,17 @@ "oldfieldname": "charge", "oldfieldtype": "Link", "options": "Sales Taxes and Charges Template", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "column_break_38", "fieldtype": "Column Break", "hide_days": 1, - "hide_seconds": 1 + "hide_seconds": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "shipping_rule", @@ -882,7 +1023,9 @@ "label": "Shipping Rule", "oldfieldtype": "Button", "options": "Shipping Rule", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "tax_category", @@ -891,13 +1034,17 @@ "hide_seconds": 1, "label": "Tax Category", "options": "Tax Category", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "section_break_40", "fieldtype": "Section Break", "hide_days": 1, - "hide_seconds": 1 + "hide_seconds": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "taxes", @@ -907,7 +1054,9 @@ "label": "Sales Taxes and Charges", "oldfieldname": "other_charges", "oldfieldtype": "Table", - "options": "Sales Taxes and Charges" + "options": "Sales Taxes and Charges", + "show_days": 1, + "show_seconds": 1 }, { "collapsible": 1, @@ -915,7 +1064,9 @@ "fieldtype": "Section Break", "hide_days": 1, "hide_seconds": 1, - "label": "Tax Breakup" + "label": "Tax Breakup", + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "other_charges_calculation", @@ -926,13 +1077,17 @@ "no_copy": 1, "oldfieldtype": "HTML", "print_hide": 1, - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "section_break_43", "fieldtype": "Section Break", "hide_days": 1, - "hide_seconds": 1 + "hide_seconds": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "base_total_taxes_and_charges", @@ -944,13 +1099,17 @@ "oldfieldtype": "Currency", "options": "Company:company:default_currency", "print_hide": 1, - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "column_break_47", "fieldtype": "Column Break", "hide_days": 1, - "hide_seconds": 1 + "hide_seconds": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "total_taxes_and_charges", @@ -960,7 +1119,9 @@ "label": "Total Taxes and Charges", "options": "currency", "print_hide": 1, - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "collapsible": 1, @@ -968,7 +1129,9 @@ "fieldtype": "Section Break", "hide_days": 1, "hide_seconds": 1, - "label": "Loyalty Points Redemption" + "label": "Loyalty Points Redemption", + "show_days": 1, + "show_seconds": 1 }, { "depends_on": "redeem_loyalty_points", @@ -978,7 +1141,9 @@ "hide_seconds": 1, "label": "Loyalty Points", "no_copy": 1, - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "depends_on": "redeem_loyalty_points", @@ -990,7 +1155,9 @@ "no_copy": 1, "options": "Company:company:default_currency", "print_hide": 1, - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "default": "0", @@ -1000,13 +1167,17 @@ "hide_seconds": 1, "label": "Redeem Loyalty Points", "no_copy": 1, - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "column_break_77", "fieldtype": "Column Break", "hide_days": 1, - "hide_seconds": 1 + "hide_seconds": 1, + "show_days": 1, + "show_seconds": 1 }, { "fetch_from": "customer.loyalty_program", @@ -1018,7 +1189,9 @@ "no_copy": 1, "options": "Loyalty Program", "print_hide": 1, - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "depends_on": "redeem_loyalty_points", @@ -1028,7 +1201,9 @@ "hide_seconds": 1, "label": "Redemption Account", "no_copy": 1, - "options": "Account" + "options": "Account", + "show_days": 1, + "show_seconds": 1 }, { "depends_on": "redeem_loyalty_points", @@ -1038,7 +1213,9 @@ "hide_seconds": 1, "label": "Redemption Cost Center", "no_copy": 1, - "options": "Cost Center" + "options": "Cost Center", + "show_days": 1, + "show_seconds": 1 }, { "collapsible": 1, @@ -1047,7 +1224,9 @@ "fieldtype": "Section Break", "hide_days": 1, "hide_seconds": 1, - "label": "Additional Discount" + "label": "Additional Discount", + "show_days": 1, + "show_seconds": 1 }, { "default": "Grand Total", @@ -1057,7 +1236,9 @@ "hide_seconds": 1, "label": "Apply Additional Discount On", "options": "\nGrand Total\nNet Total", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "base_discount_amount", @@ -1067,13 +1248,17 @@ "label": "Additional Discount Amount (Company Currency)", "options": "Company:company:default_currency", "print_hide": 1, - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "column_break_51", "fieldtype": "Column Break", "hide_days": 1, - "hide_seconds": 1 + "hide_seconds": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "additional_discount_percentage", @@ -1081,7 +1266,9 @@ "hide_days": 1, "hide_seconds": 1, "label": "Additional Discount Percentage", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "discount_amount", @@ -1090,7 +1277,9 @@ "hide_seconds": 1, "label": "Additional Discount Amount", "options": "currency", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "totals", @@ -1099,7 +1288,9 @@ "hide_seconds": 1, "oldfieldtype": "Section Break", "options": "fa fa-money", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "base_grand_total", @@ -1112,7 +1303,9 @@ "options": "Company:company:default_currency", "print_hide": 1, "read_only": 1, - "reqd": 1 + "reqd": 1, + "show_days": 1, + "show_seconds": 1 }, { "depends_on": "eval:!doc.disable_rounded_total", @@ -1124,7 +1317,9 @@ "no_copy": 1, "options": "Company:company:default_currency", "print_hide": 1, - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "depends_on": "eval:!doc.disable_rounded_total", @@ -1137,7 +1332,9 @@ "oldfieldtype": "Currency", "options": "Company:company:default_currency", "print_hide": 1, - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "description": "In Words will be visible once you save the Sales Invoice.", @@ -1150,7 +1347,9 @@ "oldfieldname": "in_words", "oldfieldtype": "Data", "print_hide": 1, - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "column_break5", @@ -1159,6 +1358,8 @@ "hide_seconds": 1, "oldfieldtype": "Column Break", "print_hide": 1, + "show_days": 1, + "show_seconds": 1, "width": "50%" }, { @@ -1173,7 +1374,9 @@ "oldfieldtype": "Currency", "options": "currency", "read_only": 1, - "reqd": 1 + "reqd": 1, + "show_days": 1, + "show_seconds": 1 }, { "depends_on": "eval:!doc.disable_rounded_total", @@ -1185,7 +1388,9 @@ "no_copy": 1, "options": "currency", "print_hide": 1, - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "bold": 1, @@ -1198,7 +1403,9 @@ "oldfieldname": "rounded_total_export", "oldfieldtype": "Currency", "options": "currency", - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "in_words", @@ -1210,7 +1417,9 @@ "oldfieldname": "in_words_export", "oldfieldtype": "Data", "print_hide": 1, - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "total_advance", @@ -1222,7 +1431,9 @@ "oldfieldtype": "Currency", "options": "party_account_currency", "print_hide": 1, - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "outstanding_amount", @@ -1235,7 +1446,9 @@ "oldfieldtype": "Currency", "options": "party_account_currency", "print_hide": 1, - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "collapsible": 1, @@ -1247,7 +1460,9 @@ "label": "Advance Payments", "oldfieldtype": "Section Break", "options": "fa fa-money", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "default": "0", @@ -1255,7 +1470,9 @@ "fieldtype": "Check", "hide_days": 1, "hide_seconds": 1, - "label": "Allocate Advances Automatically (FIFO)" + "label": "Allocate Advances Automatically (FIFO)", + "show_days": 1, + "show_seconds": 1 }, { "depends_on": "eval:!doc.allocate_advances_automatically", @@ -1264,7 +1481,9 @@ "hide_days": 1, "hide_seconds": 1, "label": "Get Advances Received", - "options": "set_advances" + "options": "set_advances", + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "advances", @@ -1275,7 +1494,9 @@ "oldfieldname": "advance_adjustment_details", "oldfieldtype": "Table", "options": "Sales Invoice Advance", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "collapsible": 1, @@ -1284,7 +1505,9 @@ "fieldtype": "Section Break", "hide_days": 1, "hide_seconds": 1, - "label": "Payment Terms" + "label": "Payment Terms", + "show_days": 1, + "show_seconds": 1 }, { "depends_on": "eval:(!doc.is_pos && !doc.is_return)", @@ -1295,7 +1518,9 @@ "label": "Payment Terms Template", "no_copy": 1, "options": "Payment Terms Template", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "depends_on": "eval:(!doc.is_pos && !doc.is_return)", @@ -1306,7 +1531,9 @@ "label": "Payment Schedule", "no_copy": 1, "options": "Payment Schedule", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "depends_on": "eval:doc.is_pos===1||(doc.advances && doc.advances.length>0)", @@ -1315,7 +1542,9 @@ "hide_days": 1, "hide_seconds": 1, "label": "Payments", - "options": "fa fa-money" + "options": "fa fa-money", + "show_days": 1, + "show_seconds": 1 }, { "depends_on": "is_pos", @@ -1328,7 +1557,9 @@ "oldfieldname": "cash_bank_account", "oldfieldtype": "Link", "options": "Account", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "depends_on": "eval:doc.is_pos===1", @@ -1338,13 +1569,17 @@ "hide_seconds": 1, "label": "Sales Invoice Payment", "options": "Sales Invoice Payment", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "section_break_84", "fieldtype": "Section Break", "hide_days": 1, - "hide_seconds": 1 + "hide_seconds": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "base_paid_amount", @@ -1355,13 +1590,17 @@ "no_copy": 1, "options": "Company:company:default_currency", "print_hide": 1, - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "column_break_86", "fieldtype": "Column Break", "hide_days": 1, - "hide_seconds": 1 + "hide_seconds": 1, + "show_days": 1, + "show_seconds": 1 }, { "depends_on": "eval: doc.is_pos || doc.redeem_loyalty_points", @@ -1375,13 +1614,17 @@ "oldfieldtype": "Currency", "options": "currency", "print_hide": 1, - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "section_break_88", "fieldtype": "Section Break", "hide_days": 1, - "hide_seconds": 1 + "hide_seconds": 1, + "show_days": 1, + "show_seconds": 1 }, { "depends_on": "is_pos", @@ -1393,13 +1636,17 @@ "no_copy": 1, "options": "Company:company:default_currency", "print_hide": 1, - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "column_break_90", "fieldtype": "Column Break", "hide_days": 1, - "hide_seconds": 1 + "hide_seconds": 1, + "show_days": 1, + "show_seconds": 1 }, { "depends_on": "is_pos", @@ -1410,7 +1657,9 @@ "label": "Change Amount", "no_copy": 1, "options": "currency", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "depends_on": "is_pos", @@ -1420,7 +1669,9 @@ "hide_seconds": 1, "label": "Account for Change Amount", "options": "Account", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "collapsible": 1, @@ -1431,6 +1682,8 @@ "hide_days": 1, "hide_seconds": 1, "label": "Write Off", + "show_days": 1, + "show_seconds": 1, "width": "50%" }, { @@ -1441,7 +1694,9 @@ "label": "Write Off Amount", "no_copy": 1, "options": "currency", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "base_write_off_amount", @@ -1452,7 +1707,9 @@ "no_copy": 1, "options": "Company:company:default_currency", "print_hide": 1, - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "default": "0", @@ -1462,13 +1719,17 @@ "hide_days": 1, "hide_seconds": 1, "label": "Write Off Outstanding Amount", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "column_break_74", "fieldtype": "Column Break", "hide_days": 1, - "hide_seconds": 1 + "hide_seconds": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "write_off_account", @@ -1477,7 +1738,9 @@ "hide_seconds": 1, "label": "Write Off Account", "options": "Account", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "write_off_cost_center", @@ -1486,7 +1749,9 @@ "hide_seconds": 1, "label": "Write Off Cost Center", "options": "Cost Center", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "collapsible": 1, @@ -1496,7 +1761,9 @@ "hide_days": 1, "hide_seconds": 1, "label": "Terms and Conditions", - "oldfieldtype": "Section Break" + "oldfieldtype": "Section Break", + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "tc_name", @@ -1507,7 +1774,9 @@ "oldfieldname": "tc_name", "oldfieldtype": "Link", "options": "Terms and Conditions", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "terms", @@ -1516,7 +1785,9 @@ "hide_seconds": 1, "label": "Terms and Conditions Details", "oldfieldname": "terms", - "oldfieldtype": "Text Editor" + "oldfieldtype": "Text Editor", + "show_days": 1, + "show_seconds": 1 }, { "collapsible": 1, @@ -1524,7 +1795,9 @@ "fieldtype": "Section Break", "hide_days": 1, "hide_seconds": 1, - "label": "Printing Settings" + "label": "Printing Settings", + "show_days": 1, + "show_seconds": 1 }, { "allow_on_submit": 1, @@ -1536,7 +1809,9 @@ "oldfieldname": "letter_head", "oldfieldtype": "Select", "options": "Letter Head", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "allow_on_submit": 1, @@ -1546,7 +1821,9 @@ "hide_days": 1, "hide_seconds": 1, "label": "Group same items", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "language", @@ -1555,13 +1832,17 @@ "hide_seconds": 1, "label": "Print Language", "print_hide": 1, - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "column_break_84", "fieldtype": "Column Break", "hide_days": 1, - "hide_seconds": 1 + "hide_seconds": 1, + "show_days": 1, + "show_seconds": 1 }, { "allow_on_submit": 1, @@ -1575,7 +1856,9 @@ "oldfieldtype": "Link", "options": "Print Heading", "print_hide": 1, - "report_hide": 1 + "report_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "collapsible": 1, @@ -1584,7 +1867,9 @@ "fieldtype": "Section Break", "hide_days": 1, "hide_seconds": 1, - "label": "More Information" + "label": "More Information", + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "inter_company_invoice_reference", @@ -1593,7 +1878,9 @@ "hide_seconds": 1, "label": "Inter Company Invoice Reference", "options": "Purchase Invoice", - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "customer_group", @@ -1603,7 +1890,9 @@ "hide_seconds": 1, "label": "Customer Group", "options": "Customer Group", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "campaign", @@ -1614,7 +1903,9 @@ "oldfieldname": "campaign", "oldfieldtype": "Link", "options": "Campaign", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "default": "0", @@ -1624,13 +1915,17 @@ "hide_seconds": 1, "label": "Is Discounted", "no_copy": 1, - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "col_break23", "fieldtype": "Column Break", "hide_days": 1, "hide_seconds": 1, + "show_days": 1, + "show_seconds": 1, "width": "50%" }, { @@ -1644,7 +1939,9 @@ "no_copy": 1, "options": "\nDraft\nReturn\nCredit Note Issued\nSubmitted\nPaid\nUnpaid\nUnpaid and Discounted\nOverdue and Discounted\nOverdue\nCancelled\nInternal Transfer", "print_hide": 1, - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "source", @@ -1655,7 +1952,9 @@ "oldfieldname": "source", "oldfieldtype": "Select", "options": "Lead Source", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "collapsible": 1, @@ -1666,7 +1965,9 @@ "label": "Accounting Details", "oldfieldtype": "Section Break", "options": "fa fa-file-text", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "debit_to", @@ -1679,7 +1980,9 @@ "options": "Account", "print_hide": 1, "reqd": 1, - "search_index": 1 + "search_index": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "party_account_currency", @@ -1691,7 +1994,9 @@ "no_copy": 1, "options": "Currency", "print_hide": 1, - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "default": "No", @@ -1703,7 +2008,9 @@ "oldfieldname": "is_opening", "oldfieldtype": "Select", "options": "No\nYes", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "c_form_applicable", @@ -1713,7 +2020,9 @@ "label": "C-Form Applicable", "no_copy": 1, "options": "No\nYes", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "c_form_no", @@ -1724,7 +2033,9 @@ "no_copy": 1, "options": "C-Form", "print_hide": 1, - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "column_break8", @@ -1732,7 +2043,9 @@ "hide_days": 1, "hide_seconds": 1, "oldfieldtype": "Column Break", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "remarks", @@ -1743,7 +2056,9 @@ "no_copy": 1, "oldfieldname": "remarks", "oldfieldtype": "Text", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "collapsible": 1, @@ -1755,7 +2070,9 @@ "label": "Commission", "oldfieldtype": "Section Break", "options": "fa fa-group", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "sales_partner", @@ -1766,7 +2083,9 @@ "oldfieldname": "sales_partner", "oldfieldtype": "Link", "options": "Sales Partner", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "column_break10", @@ -1775,6 +2094,8 @@ "hide_seconds": 1, "oldfieldtype": "Column Break", "print_hide": 1, + "show_days": 1, + "show_seconds": 1, "width": "50%" }, { @@ -1785,7 +2106,9 @@ "label": "Commission Rate (%)", "oldfieldname": "commission_rate", "oldfieldtype": "Currency", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "total_commission", @@ -1796,7 +2119,9 @@ "oldfieldname": "total_commission", "oldfieldtype": "Currency", "options": "Company:company:default_currency", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "collapsible": 1, @@ -1806,7 +2131,9 @@ "hide_days": 1, "hide_seconds": 1, "label": "Sales Team", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "allow_on_submit": 1, @@ -1818,7 +2145,9 @@ "oldfieldname": "sales_team", "oldfieldtype": "Table", "options": "Sales Team", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "collapsible": 1, @@ -1826,7 +2155,9 @@ "fieldtype": "Section Break", "hide_days": 1, "hide_seconds": 1, - "label": "Subscription Section" + "label": "Subscription Section", + "show_days": 1, + "show_seconds": 1 }, { "allow_on_submit": 1, @@ -1836,7 +2167,9 @@ "hide_seconds": 1, "label": "From Date", "no_copy": 1, - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "allow_on_submit": 1, @@ -1846,13 +2179,17 @@ "hide_seconds": 1, "label": "To Date", "no_copy": 1, - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "column_break_140", "fieldtype": "Column Break", "hide_days": 1, - "hide_seconds": 1 + "hide_seconds": 1, + "show_days": 1, + "show_seconds": 1 }, { "allow_on_submit": 1, @@ -1864,7 +2201,9 @@ "no_copy": 1, "options": "Auto Repeat", "print_hide": 1, - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "allow_on_submit": 1, @@ -1873,7 +2212,9 @@ "fieldtype": "Button", "hide_days": 1, "hide_seconds": 1, - "label": "Update Auto Repeat Reference" + "label": "Update Auto Repeat Reference", + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "against_income_account", @@ -1886,7 +2227,9 @@ "oldfieldname": "against_income_account", "oldfieldtype": "Small Text", "print_hide": 1, - "report_hide": 1 + "report_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "collapsible": 1, @@ -1894,13 +2237,17 @@ "fieldtype": "Section Break", "hide_days": 1, "hide_seconds": 1, - "label": "Accounting Dimensions" + "label": "Accounting Dimensions", + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "dimension_col_break", "fieldtype": "Column Break", "hide_days": 1, - "hide_seconds": 1 + "hide_seconds": 1, + "show_days": 1, + "show_seconds": 1 }, { "default": "0", @@ -1908,7 +2255,9 @@ "fieldname": "is_consolidated", "fieldtype": "Check", "label": "Is Consolidated", - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "default": "0", @@ -1918,14 +2267,18 @@ "hide_days": 1, "hide_seconds": 1, "label": "Is Internal Customer", - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "fetch_from": "company.tax_id", "fieldname": "company_tax_id", "fieldtype": "Data", "label": "Company Tax ID", - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "depends_on": "eval:doc.is_internal_customer", @@ -1933,7 +2286,9 @@ "fieldname": "unrealized_profit_loss_account", "fieldtype": "Link", "label": "Unrealized Profit / Loss Account", - "options": "Account" + "options": "Account", + "show_days": 1, + "show_seconds": 1 }, { "depends_on": "eval:doc.is_internal_customer", @@ -1943,24 +2298,32 @@ "fieldtype": "Link", "label": "Represents Company", "options": "Company", - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "column_break_55", - "fieldtype": "Column Break" + "fieldtype": "Column Break", + "show_days": 1, + "show_seconds": 1 }, { "depends_on": "eval: doc.is_internal_customer && doc.update_stock", "fieldname": "set_target_warehouse", "fieldtype": "Link", "label": "Set Target Warehouse", - "options": "Warehouse" + "options": "Warehouse", + "show_days": 1, + "show_seconds": 1 }, { "default": "0", "fieldname": "is_debit_note", "fieldtype": "Check", - "label": "Is Debit Note" + "label": "Is Debit Note", + "show_days": 1, + "show_seconds": 1 }, { "default": "0", @@ -1983,6 +2346,16 @@ "fieldtype": "Small Text", "label": "Dispatch Address", "read_only": 1 + }, + { + "default": "0", + "fieldname": "ignore_default_payment_terms_template", + "fieldtype": "Check", + "hidden": 1, + "label": "Ignore Default Payment Terms Template", + "read_only": 1, + "show_days": 1, + "show_seconds": 1 } ], "icon": "fa fa-file-text", @@ -1995,7 +2368,7 @@ "link_fieldname": "consolidated_invoice" } ], - "modified": "2021-07-08 14:03:55.502522", + "modified": "2021-08-06 23:02:20.445127", "modified_by": "Administrator", "module": "Accounts", "name": "Sales Invoice", diff --git a/erpnext/accounts/party.py b/erpnext/accounts/party.py index b97dc401e6a..329f9a97b86 100644 --- a/erpnext/accounts/party.py +++ b/erpnext/accounts/party.py @@ -8,7 +8,7 @@ from frappe import _, msgprint, scrub from frappe.core.doctype.user_permission.user_permission import get_permitted_documents from frappe.model.utils import get_fetch_values from frappe.utils import (add_days, getdate, formatdate, date_diff, - add_years, get_timestamp, nowdate, flt, cstr, add_months, get_last_day) + add_years, get_timestamp, nowdate, flt, cstr, add_months, get_last_day, cint) from frappe.contacts.doctype.address.address import (get_address_display, get_default_address, get_company_address) from frappe.contacts.doctype.contact.contact import get_contact_details @@ -58,7 +58,7 @@ def _get_party_details(party=None, account=None, party_type="Customer", company= customer_group=party_details.customer_group, supplier_group=party_details.supplier_group, tax_category=party_details.tax_category, billing_address=party_address, shipping_address=shipping_address) - if fetch_payment_terms_template: + if cint(fetch_payment_terms_template): party_details["payment_terms_template"] = get_payment_terms_template(party.name, party_type, company) if not party_details.get("currency"): diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.py b/erpnext/buying/doctype/purchase_order/purchase_order.py index f68d81909a3..94684bff1cd 100644 --- a/erpnext/buying/doctype/purchase_order/purchase_order.py +++ b/erpnext/buying/doctype/purchase_order/purchase_order.py @@ -447,10 +447,11 @@ def get_mapped_purchase_invoice(source_name, target_doc=None, ignore_permissions target.flags.ignore_permissions = ignore_permissions set_missing_values(source, target) #Get the advance paid Journal Entries in Purchase Invoice Advance - if target.get("allocate_advances_automatically"): target.set_advances() + target.set_payment_schedule() + def update_item(obj, target, source_parent): target.amount = flt(obj.amount) - flt(obj.billed_amt) target.base_amount = target.amount * flt(source_parent.conversion_rate) @@ -492,10 +493,6 @@ def get_mapped_purchase_invoice(source_name, target_doc=None, ignore_permissions doc = get_mapped_doc("Purchase Order", source_name, fields, target_doc, postprocess, ignore_permissions=ignore_permissions) - automatically_fetch_payment_terms = cint(frappe.db.get_single_value('Accounts Settings', 'automatically_fetch_payment_terms')) - if automatically_fetch_payment_terms: - doc.set_payment_schedule() - return doc @frappe.whitelist() diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index b0e24606c66..ae76dea384b 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -1096,6 +1096,8 @@ class AccountsController(TransactionBase): if self.doctype in ("Sales Invoice", "Purchase Invoice"): base_grand_total = base_grand_total - flt(self.base_write_off_amount) grand_total = grand_total - flt(self.write_off_amount) + po_or_so, doctype, fieldname = self.get_order_details() + automatically_fetch_payment_terms = cint(frappe.db.get_single_value('Accounts Settings', 'automatically_fetch_payment_terms')) if self.get("total_advance"): if party_account_currency == self.company_currency: @@ -1106,28 +1108,25 @@ class AccountsController(TransactionBase): base_grand_total = flt(grand_total * self.get("conversion_rate"), self.precision("base_grand_total")) if not self.get("payment_schedule"): - if self.doctype in ["Sales Invoice", "Purchase Invoice"] and not self.get("payment_terms_template"): - po_or_so, doctype, fieldname = self.get_order_details() - - if self.get("payment_terms_template"): + if self.doctype in ["Sales Invoice", "Purchase Invoice"] and self.linked_order_has_payment_terms(po_or_so, fieldname, doctype): + self.fetch_payment_terms_from_order(po_or_so, doctype) + if self.get('payment_terms_template'): + self.ignore_default_payment_terms_template = 1 + elif self.get("payment_terms_template"): data = get_payment_terms(self.payment_terms_template, posting_date, grand_total, base_grand_total) for item in data: self.append("payment_schedule", item) - - elif self.doctype in ["Sales Invoice", "Purchase Invoice"] and self.linked_order_has_payment_terms(po_or_so, fieldname, doctype): - self.fetch_payment_terms_from_order(po_or_so, doctype) - elif self.doctype not in ["Purchase Receipt"]: data = dict(due_date=due_date, invoice_portion=100, payment_amount=grand_total, base_payment_amount=base_grand_total) self.append("payment_schedule", data) - else: - for d in self.get("payment_schedule"): - if d.invoice_portion: - d.payment_amount = flt(grand_total * flt(d.invoice_portion / 100), d.precision('payment_amount')) - d.base_payment_amount = flt(base_grand_total * flt(d.invoice_portion / 100), d.precision('base_payment_amount')) - d.outstanding = d.payment_amount - elif not d.invoice_portion: - d.base_payment_amount = flt(base_grand_total * self.get("conversion_rate"), d.precision('base_payment_amount')) + + for d in self.get("payment_schedule"): + if d.invoice_portion: + d.payment_amount = flt(grand_total * flt(d.invoice_portion / 100), d.precision('payment_amount')) + d.base_payment_amount = flt(base_grand_total * flt(d.invoice_portion / 100), d.precision('base_payment_amount')) + d.outstanding = d.payment_amount + elif not d.invoice_portion: + d.base_payment_amount = flt(base_grand_total * self.get("conversion_rate"), d.precision('base_payment_amount')) def get_order_details(self): diff --git a/erpnext/controllers/buying_controller.py b/erpnext/controllers/buying_controller.py index 6a550e0e975..974ade35849 100644 --- a/erpnext/controllers/buying_controller.py +++ b/erpnext/controllers/buying_controller.py @@ -72,7 +72,8 @@ class BuyingController(StockController, Subcontracting): # set contact and address details for supplier, if they are not mentioned if getattr(self, "supplier", None): self.update_if_missing(get_party_details(self.supplier, party_type="Supplier", ignore_permissions=self.flags.ignore_permissions, - doctype=self.doctype, company=self.company, party_address=self.supplier_address, shipping_address=self.get('shipping_address'))) + doctype=self.doctype, company=self.company, party_address=self.supplier_address, shipping_address=self.get('shipping_address'), + fetch_payment_terms_template= not self.get('ignore_default_payment_terms_template'))) self.set_missing_item_details(for_validate) diff --git a/erpnext/public/js/utils/party.js b/erpnext/public/js/utils/party.js index a79eadc7619..54df0d63cba 100644 --- a/erpnext/public/js/utils/party.js +++ b/erpnext/public/js/utils/party.js @@ -76,6 +76,7 @@ erpnext.utils.get_party_details = function(frm, method, args, callback) { if (args) { args.posting_date = frm.doc.posting_date || frm.doc.transaction_date; + args.fetch_payment_terms_template = cint(!frm.doc.ignore_default_payment_terms_template) } } if (!args || !args.party) return; diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py index 6b8a410f58e..21a6e16a450 100644 --- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py +++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py @@ -619,6 +619,7 @@ def make_purchase_invoice(source_name, target_doc=None): doc.run_method("onload") doc.run_method("set_missing_values") doc.run_method("calculate_taxes_and_totals") + doc.set_payment_schedule() def update_item(source_doc, target_doc, source_parent): target_doc.qty, returned_qty = get_pending_qty(source_doc) @@ -675,10 +676,6 @@ def make_purchase_invoice(source_name, target_doc=None): } }, target_doc, set_missing_values) - automatically_fetch_payment_terms = cint(frappe.db.get_single_value('Accounts Settings', 'automatically_fetch_payment_terms')) - if automatically_fetch_payment_terms: - doc.set_payment_schedule() - return doclist def get_invoiced_qty_map(purchase_receipt): From 802c6b37385546f666a03874cc0d420a6f4142d8 Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Sat, 7 Aug 2021 17:39:40 +0530 Subject: [PATCH 70/95] test: Improve test case for not coping payment terms --- .../buying/doctype/purchase_order/purchase_order.py | 1 + .../doctype/purchase_order/test_purchase_order.py | 12 ++++++++---- erpnext/selling/doctype/sales_order/sales_order.py | 1 + 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.py b/erpnext/buying/doctype/purchase_order/purchase_order.py index 94684bff1cd..a0b1e073cc6 100644 --- a/erpnext/buying/doctype/purchase_order/purchase_order.py +++ b/erpnext/buying/doctype/purchase_order/purchase_order.py @@ -471,6 +471,7 @@ def get_mapped_purchase_invoice(source_name, target_doc=None, ignore_permissions "party_account_currency": "party_account_currency", "supplier_warehouse":"supplier_warehouse" }, + "field_no_map" : ["payment_terms_template"], "validation": { "docstatus": ["=", 1], } diff --git a/erpnext/buying/doctype/purchase_order/test_purchase_order.py b/erpnext/buying/doctype/purchase_order/test_purchase_order.py index 0db54e42068..d06f9d20274 100644 --- a/erpnext/buying/doctype/purchase_order/test_purchase_order.py +++ b/erpnext/buying/doctype/purchase_order/test_purchase_order.py @@ -633,13 +633,17 @@ class TestPurchaseOrder(unittest.TestCase): raise Exception def test_terms_are_not_copied_if_automatically_fetch_payment_terms_is_unchecked(self): - po = create_purchase_order() - - self.assertTrue(po.get('payment_schedule')) + po = create_purchase_order(do_not_save=1) + po.payment_terms_template = '_Test Payment Term Template' + po.save() + po.submit() + company = frappe.get_doc('Company', '_Test Company', 'payment_terms', '_Test Payment Term Template 1') pi = make_pi_from_po(po.name) + pi.save() - self.assertFalse(pi.get('payment_schedule')) + self.assertEqual(pi.get('payment_terms_template'), '_Test Payment Term Template 1') + frappe.db.set_value('Company', '_Test Company', 'payment_terms', '') def test_terms_copied(self): po = create_purchase_order(do_not_save=1) diff --git a/erpnext/selling/doctype/sales_order/sales_order.py b/erpnext/selling/doctype/sales_order/sales_order.py index 2b9d516e217..bba54018aef 100755 --- a/erpnext/selling/doctype/sales_order/sales_order.py +++ b/erpnext/selling/doctype/sales_order/sales_order.py @@ -670,6 +670,7 @@ def make_sales_invoice(source_name, target_doc=None, ignore_permissions=False): "party_account_currency": "party_account_currency", "payment_terms_template": "payment_terms_template" }, + "field_no_map": ["payment_terms_template"], "validation": { "docstatus": ["=", 1] } From 8b9c04aae8eb89af21f5f7680966c092271d58b9 Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Sun, 8 Aug 2021 19:17:38 +0530 Subject: [PATCH 71/95] test: Fix test cases for payment terms fetch --- .../buying/doctype/purchase_order/test_purchase_order.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/erpnext/buying/doctype/purchase_order/test_purchase_order.py b/erpnext/buying/doctype/purchase_order/test_purchase_order.py index d06f9d20274..d668c76b6b9 100644 --- a/erpnext/buying/doctype/purchase_order/test_purchase_order.py +++ b/erpnext/buying/doctype/purchase_order/test_purchase_order.py @@ -484,6 +484,9 @@ class TestPurchaseOrder(unittest.TestCase): def test_make_purchase_invoice_with_terms(self): + from erpnext.selling.doctype.sales_order.test_sales_order import automatically_fetch_payment_terms, compare_payment_schedules + + automatically_fetch_payment_terms() po = create_purchase_order(do_not_save=True) self.assertRaises(frappe.ValidationError, make_pi_from_po, po.name) @@ -509,6 +512,7 @@ class TestPurchaseOrder(unittest.TestCase): self.assertEqual(getdate(pi.payment_schedule[0].due_date), getdate(po.transaction_date)) self.assertEqual(pi.payment_schedule[1].payment_amount, 2500.0) self.assertEqual(getdate(pi.payment_schedule[1].due_date), add_days(getdate(po.transaction_date), 30)) + automatically_fetch_payment_terms(enable=0) def test_subcontracting(self): po = create_purchase_order(item_code="_Test FG Item", is_subcontracted="Yes") @@ -638,7 +642,7 @@ class TestPurchaseOrder(unittest.TestCase): po.save() po.submit() - company = frappe.get_doc('Company', '_Test Company', 'payment_terms', '_Test Payment Term Template 1') + frappe.db.set_value('Company', '_Test Company', 'payment_terms', '_Test Payment Term Template 1') pi = make_pi_from_po(po.name) pi.save() @@ -992,7 +996,7 @@ class TestPurchaseOrder(unittest.TestCase): # self.assertEqual(po.payment_terms_template, pi.payment_terms_template) compare_payment_schedules(self, po, pi) - automatically_fetch_payment_terms(enable=0) + automatically_fetch_payment_terms(enable=0) def make_pr_against_po(po, received_qty=0): pr = make_purchase_receipt(po) From cb539b7a6a30fe48eb523c3288b889f6805903bc Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Thu, 5 Aug 2021 22:38:00 +0530 Subject: [PATCH 72/95] fix: Add discount account handling in Purchase Invoice --- .../purchase_invoice/purchase_invoice.py | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py index 53ad849b1e1..76ef23e8781 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py @@ -520,6 +520,8 @@ class PurchaseInvoice(BuyingController): and flt(d.base_tax_amount_after_discount_amount)] exchange_rate_map, net_rate_map = get_purchase_document_details(self) + + enable_discount_accounting = cint(frappe.db.get_single_value('Accounts Settings', 'enable_discount_accounting')) for item in self.get("items"): if flt(item.base_net_amount): @@ -611,11 +613,7 @@ class PurchaseInvoice(BuyingController): if (not item.enable_deferred_expense or self.is_return) else item.deferred_expense_account) if not item.is_fixed_asset: - if frappe.db.get_single_value('Accounts Settings', 'enable_discount_accounting'): - amount = flt(item.base_amount, item.precision("base_amount")) - else: - amount = flt(item.base_net_amount, item.precision("base_net_amount")) - + dummy, amount = self.get_amount_and_base_amount(item, enable_discount_accounting) else: amount = flt(item.base_net_amount + item.item_tax_amount, item.precision("base_net_amount")) @@ -857,8 +855,11 @@ class PurchaseInvoice(BuyingController): def make_tax_gl_entries(self, gl_entries): # tax table gl entries valuation_tax = {} + enable_discount_accounting = cint(frappe.db.get_single_value('Accounts Settings', 'enable_discount_accounting')) + for tax in self.get("taxes"): - if tax.category in ("Total", "Valuation and Total") and flt(tax.base_tax_amount_after_discount_amount): + amount, base_amount = self.get_tax_amounts(tax, enable_discount_accounting) + if tax.category in ("Total", "Valuation and Total") and flt(base_amount): account_currency = get_account_currency(tax.account_head) dr_or_cr = "debit" if tax.add_deduct_tax == "Add" else "credit" @@ -867,21 +868,21 @@ class PurchaseInvoice(BuyingController): self.get_gl_dict({ "account": tax.account_head, "against": self.supplier, - dr_or_cr: tax.base_tax_amount_after_discount_amount, - dr_or_cr + "_in_account_currency": tax.base_tax_amount_after_discount_amount \ + dr_or_cr: base_amount, + dr_or_cr + "_in_account_currency": base_amount \ if account_currency==self.company_currency \ - else tax.tax_amount_after_discount_amount, + else amount, "cost_center": tax.cost_center }, account_currency, item=tax) ) # accumulate valuation tax - if self.is_opening == "No" and tax.category in ("Valuation", "Valuation and Total") and flt(tax.base_tax_amount_after_discount_amount) \ + if self.is_opening == "No" and tax.category in ("Valuation", "Valuation and Total") and flt(base_amount) \ and not self.is_internal_transfer(): if self.auto_accounting_for_stock and not tax.cost_center: frappe.throw(_("Cost Center is required in row {0} in Taxes table for type {1}").format(tax.idx, _(tax.category))) valuation_tax.setdefault(tax.name, 0) valuation_tax[tax.name] += \ - (tax.add_deduct_tax == "Add" and 1 or -1) * flt(tax.base_tax_amount_after_discount_amount) + (tax.add_deduct_tax == "Add" and 1 or -1) * flt(base_amount) if self.is_opening == "No" and self.negative_expense_to_be_booked and valuation_tax: # credit valuation tax amount in "Expenses Included In Valuation" From 75a832715c09b5e9da28aedee23a4b15b3f483da Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Thu, 5 Aug 2021 22:38:24 +0530 Subject: [PATCH 73/95] test: Update test cases for discount accounting --- .../purchase_invoice/test_purchase_invoice.py | 27 ++++++++++--------- .../sales_invoice/test_sales_invoice.py | 24 +++++++++-------- 2 files changed, 28 insertions(+), 23 deletions(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py index ed5c4af1a93..c211e50548a 100644 --- a/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py @@ -256,39 +256,41 @@ class TestPurchaseInvoice(unittest.TestCase): discount_account = create_account(account_name="Discount Account", parent_account="Indirect Expenses - _TC", company="_Test Company") - pi = make_purchase_invoice(discount_account=discount_account, discount_amount=100) + pi = make_purchase_invoice(discount_account=discount_account, rate=45) expected_gle = [ - ["_Test Account Cost for Goods Sold - _TC", 350.0, 0.0, nowdate()], - ["Creditors - _TC", 0.0, 250.0, nowdate()], - ["Discount Account - _TC", 0.0, 100.0, nowdate()] + ["_Test Account Cost for Goods Sold - _TC", 250.0, 0.0, nowdate()], + ["Creditors - _TC", 0.0, 225.0, nowdate()], + ["Discount Account - _TC", 0.0, 25.0, nowdate()] ] check_gl_entries(self, pi.name, expected_gle, nowdate()) + enable_discount_accounting(enable=0) def test_additional_discount_for_purchase_invoice_with_discount_accounting_enabled(self): enable_discount_accounting() additional_discount_account = create_account(account_name="Discount Account", parent_account="Indirect Expenses - _TC", company="_Test Company") - pi = make_purchase_invoice(qty=1, rate=100, do_not_save=1, parent_cost_center="Main - _TC") + pi = make_purchase_invoice(do_not_save=1, parent_cost_center="Main - _TC") pi.apply_discount_on = "Grand Total" pi.additional_discount_account = additional_discount_account - pi.additional_discount_percentage = 20 + pi.additional_discount_percentage = 10 + pi.disable_rounded_total = 1 pi.append("taxes", { - "charge_type": "Actual", + "charge_type": "On Net Total", "account_head": "_Test Account VAT - _TC", "cost_center": "Main - _TC", "description": "Test", - "tax_amount": 20 + "rate": 10 }) pi.submit() expected_gle = [ - ["_Test Account Cost for Goods Sold - _TC", 100.0, 0.0, nowdate()], - ["_Test Account VAT - _TC", 20.0, 0.0, nowdate()], - ["Creditors - _TC", 0.0, 96.0, nowdate()], - ["Discount Account - _TC", 0.0, 24.0, nowdate()] + ["_Test Account Cost for Goods Sold - _TC", 250.0, 0.0, nowdate()], + ["_Test Account VAT - _TC", 25.0, 0.0, nowdate()], + ["Creditors - _TC", 0.0, 247.5, nowdate()], + ["Discount Account - _TC", 0.0, 27.5, nowdate()] ] check_gl_entries(self, pi.name, expected_gle, nowdate()) @@ -1281,6 +1283,7 @@ def make_purchase_invoice(**args): "received_qty": args.received_qty or 0, "rejected_qty": args.rejected_qty or 0, "rate": args.rate or 50, + "price_list_rate": args.price_list_rate or 50, "expense_account": args.expense_account or '_Test Account Cost for Goods Sold - _TC', "discount_account": args.discount_account or None, "discount_amount": args.discount_amount or 0, diff --git a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py index a55f708ab66..bde11d2566b 100644 --- a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py @@ -2022,15 +2022,16 @@ class TestSalesInvoice(unittest.TestCase): discount_account = create_account(account_name="Discount Account", parent_account="Indirect Expenses - _TC", company="_Test Company") - si = create_sales_invoice(discount_account=discount_account, discount_amount=100) + si = create_sales_invoice(discount_account=discount_account, discount_percentage=10, rate=90) expected_gle = [ - ["Debtors - _TC", 100.0, 0.0, nowdate()], - ["Discount Account - _TC", 100.0, 0.0, nowdate()], - ["Sales - _TC", 0.0, 200.0, nowdate()] + ["Debtors - _TC", 90.0, 0.0, nowdate()], + ["Discount Account - _TC", 10.0, 0.0, nowdate()], + ["Sales - _TC", 0.0, 100.0, nowdate()] ] check_gl_entries(self, si.name, expected_gle, add_days(nowdate(), -1)) + enable_discount_accounting(enable=0) def test_additional_discount_for_sales_invoice_with_discount_accounting_enabled(self): from erpnext.accounts.doctype.purchase_invoice.test_purchase_invoice import enable_discount_accounting @@ -2039,28 +2040,28 @@ class TestSalesInvoice(unittest.TestCase): additional_discount_account = create_account(account_name="Discount Account", parent_account="Indirect Expenses - _TC", company="_Test Company") - si = create_sales_invoice(rate=100, parent_cost_center='Main - _TC', do_not_save=1) + si = create_sales_invoice(parent_cost_center='Main - _TC', do_not_save=1) si.apply_discount_on = "Grand Total" si.additional_discount_account = additional_discount_account si.additional_discount_percentage = 20 si.append("taxes", { - "charge_type": "Actual", + "charge_type": "On Net Total", "account_head": "_Test Account VAT - _TC", "cost_center": "Main - _TC", "description": "Test", - "rate": 0, - "tax_amount": 20 + "rate": 10 }) si.submit() expected_gle = [ - ["_Test Account VAT - _TC", 0.0, 20.0, nowdate()], - ["Debtors - _TC", 96.0, 0.0, nowdate()], - ["Discount Account - _TC", 24.0, 0.0, nowdate()], + ["_Test Account VAT - _TC", 0.0, 10.0, nowdate()], + ["Debtors - _TC", 88, 0.0, nowdate()], + ["Discount Account - _TC", 22.0, 0.0, nowdate()], ["Sales - _TC", 0.0, 100.0, nowdate()] ] check_gl_entries(self, si.name, expected_gle, add_days(nowdate(), -1)) + enable_discount_accounting(enable=0) def get_sales_invoice_for_e_invoice(): si = make_sales_invoice_for_ewaybill() @@ -2241,6 +2242,7 @@ def create_sales_invoice(**args): "uom": args.uom or "Nos", "stock_uom": args.uom or "Nos", "rate": args.rate if args.get("rate") is not None else 100, + "price_list_rate": args.price_list_rate if args.get("price_list_rate") is not None else 100, "income_account": args.income_account or "Sales - _TC", "expense_account": args.expense_account or "Cost of Goods Sold - _TC", "discount_account": args.discount_account or None, From 55d8aaf0b66f8cf3178a28c65455aabf186ab96b Mon Sep 17 00:00:00 2001 From: marination Date: Tue, 27 Jul 2021 16:53:55 +0530 Subject: [PATCH 74/95] fix: Stock Analytics Report must consider warehouse during calculation --- .../report/stock_analytics/stock_analytics.py | 44 +++++++++++++++---- 1 file changed, 36 insertions(+), 8 deletions(-) diff --git a/erpnext/stock/report/stock_analytics/stock_analytics.py b/erpnext/stock/report/stock_analytics/stock_analytics.py index 0cc8ca48aac..d44685060c7 100644 --- a/erpnext/stock/report/stock_analytics/stock_analytics.py +++ b/erpnext/stock/report/stock_analytics/stock_analytics.py @@ -114,14 +114,41 @@ def get_period(posting_date, filters): def get_periodic_data(entry, filters): + """Structured as: + Item 1 + - Balance (updated and carried forward): + - Warehouse A : bal_qty/value + - Warehouse B : bal_qty/value + - Jun 2021 (sum of warehouse quantities used in report) + - Warehouse A : bal_qty/value + - Warehouse B : bal_qty/value + - Jul 2021 (sum of warehouse quantities used in report) + - Warehouse A : bal_qty/value + - Warehouse B : bal_qty/value + Item 2 + - Balance (updated and carried forward): + - Warehouse A : bal_qty/value + - Warehouse B : bal_qty/value + - Jun 2021 (sum of warehouse quantities used in report) + - Warehouse A : bal_qty/value + - Warehouse B : bal_qty/value + - Jul 2021 (sum of warehouse quantities used in report) + - Warehouse A : bal_qty/value + - Warehouse B : bal_qty/value + """ periodic_data = {} for d in entry: period = get_period(d.posting_date, filters) bal_qty = 0 + # if period against item does not exist yet, instantiate it + # insert existing balance dict against period, and add/subtract to it + if periodic_data.get(d.item_code) and not periodic_data.get(d.item_code).get(period): + periodic_data[d.item_code][period] = periodic_data[d.item_code]['balance'] + if d.voucher_type == "Stock Reconciliation": - if periodic_data.get(d.item_code): - bal_qty = periodic_data[d.item_code]["balance"] + if periodic_data.get(d.item_code) and periodic_data.get(d.item_code).get('balance').get(d.warehouse): + bal_qty = periodic_data[d.item_code]['balance'][d.warehouse] qty_diff = d.qty_after_transaction - bal_qty else: @@ -132,12 +159,12 @@ def get_periodic_data(entry, filters): else: value = d.stock_value_difference - periodic_data.setdefault(d.item_code, {}).setdefault(period, 0.0) - periodic_data.setdefault(d.item_code, {}).setdefault("balance", 0.0) - - periodic_data[d.item_code]["balance"] += value - periodic_data[d.item_code][period] = periodic_data[d.item_code]["balance"] + # period-warehouse wise balance + periodic_data.setdefault(d.item_code, {}).setdefault('balance', {}).setdefault(d.warehouse, 0.0) + periodic_data.setdefault(d.item_code, {}).setdefault(period, {}).setdefault(d.warehouse, 0.0) + periodic_data[d.item_code]['balance'][d.warehouse] += value + periodic_data[d.item_code][period][d.warehouse] = periodic_data[d.item_code]['balance'][d.warehouse] return periodic_data @@ -160,7 +187,8 @@ def get_data(filters): total = 0 for dummy, end_date in ranges: period = get_period(end_date, filters) - amount = flt(periodic_data.get(item_data.name, {}).get(period)) + period_data = periodic_data.get(item_data.name, {}).get(period) + amount = sum(period_data.values()) if period_data else 0 row[scrub(period)] = amount total += amount row["total"] = total From eb2050b40731131a3c578c50edc74f193a7ebf3b Mon Sep 17 00:00:00 2001 From: marination Date: Tue, 10 Aug 2021 20:37:09 +0530 Subject: [PATCH 75/95] fix: Brand filter in Stock Analytics --- erpnext/stock/report/stock_balance/stock_balance.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/erpnext/stock/report/stock_balance/stock_balance.py b/erpnext/stock/report/stock_balance/stock_balance.py index 9e56ad41306..fc3d719a780 100644 --- a/erpnext/stock/report/stock_balance/stock_balance.py +++ b/erpnext/stock/report/stock_balance/stock_balance.py @@ -235,12 +235,15 @@ def filter_items_with_no_transactions(iwb_map, float_precision): return iwb_map def get_items(filters): + "Get items based on item code, item group or brand." conditions = [] if filters.get("item_code"): conditions.append("item.name=%(item_code)s") else: if filters.get("item_group"): conditions.append(get_item_group_condition(filters.get("item_group"))) + if filters.get("brand"): # used in stock analytics report + conditions.append("item.brand=%(brand)s") items = [] if conditions: From b614834efedbef572e0567828f0d9d82e81331ee Mon Sep 17 00:00:00 2001 From: Afshan <33727827+AfshanKhan@users.noreply.github.com> Date: Tue, 10 Aug 2021 21:33:58 +0530 Subject: [PATCH 76/95] fix: unseting of payment if no pos profile found (#26884) --- erpnext/controllers/taxes_and_totals.py | 6 +----- erpnext/public/js/controllers/taxes_and_totals.js | 2 -- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/erpnext/controllers/taxes_and_totals.py b/erpnext/controllers/taxes_and_totals.py index 099c7d43463..05edb2530c2 100644 --- a/erpnext/controllers/taxes_and_totals.py +++ b/erpnext/controllers/taxes_and_totals.py @@ -679,17 +679,13 @@ class calculate_taxes_and_totals(object): default_mode_of_payment = frappe.db.get_value('POS Payment Method', {'parent': self.doc.pos_profile, 'default': 1}, ['mode_of_payment'], as_dict=1) - self.doc.payments = [] - if default_mode_of_payment: + self.doc.payments = [] self.doc.append('payments', { 'mode_of_payment': default_mode_of_payment.mode_of_payment, 'amount': total_amount_to_pay, 'default': 1 }) - else: - self.doc.is_pos = 0 - self.doc.pos_profile = '' self.calculate_paid_amount() diff --git a/erpnext/public/js/controllers/taxes_and_totals.js b/erpnext/public/js/controllers/taxes_and_totals.js index a495a9b0c11..84697e0f008 100644 --- a/erpnext/public/js/controllers/taxes_and_totals.js +++ b/erpnext/public/js/controllers/taxes_and_totals.js @@ -751,8 +751,6 @@ erpnext.taxes_and_totals = class TaxesAndTotals extends erpnext.payments { this.frm.doc.payments.find(pay => { if (pay.default) { pay.amount = total_amount_to_pay; - } else { - pay.amount = 0.0 } }); this.frm.refresh_fields(); From bff3b0962a903dddf13f80eb1e8b8dc028c35559 Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Sat, 7 Aug 2021 00:12:57 +0530 Subject: [PATCH 77/95] fix: Override template only if setting is enabled --- erpnext/controllers/accounts_controller.py | 3 ++- erpnext/public/js/utils/party.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index bc22ff7495c..e10a9e7bfdd 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -1108,7 +1108,8 @@ class AccountsController(TransactionBase): base_grand_total = flt(grand_total * self.get("conversion_rate"), self.precision("base_grand_total")) if not self.get("payment_schedule"): - if self.doctype in ["Sales Invoice", "Purchase Invoice"] and self.linked_order_has_payment_terms(po_or_so, fieldname, doctype): + if self.doctype in ["Sales Invoice", "Purchase Invoice"] and automatically_fetch_payment_terms \ + and self.linked_order_has_payment_terms(po_or_so, fieldname, doctype): self.fetch_payment_terms_from_order(po_or_so, doctype) if self.get('payment_terms_template'): self.ignore_default_payment_terms_template = 1 diff --git a/erpnext/public/js/utils/party.js b/erpnext/public/js/utils/party.js index 54df0d63cba..4d432e3d5cc 100644 --- a/erpnext/public/js/utils/party.js +++ b/erpnext/public/js/utils/party.js @@ -76,7 +76,7 @@ erpnext.utils.get_party_details = function(frm, method, args, callback) { if (args) { args.posting_date = frm.doc.posting_date || frm.doc.transaction_date; - args.fetch_payment_terms_template = cint(!frm.doc.ignore_default_payment_terms_template) + args.fetch_payment_terms_template = cint(!frm.doc.ignore_default_payment_terms_template); } } if (!args || !args.party) return; From 9152715f9049585e8d59967dd5c4fef15f04428c Mon Sep 17 00:00:00 2001 From: Ankush Date: Wed, 11 Aug 2021 11:17:50 +0530 Subject: [PATCH 78/95] perf: various minor perf fixes for ledger postings (#26775) * perf: only validate if voucher is journal entry * perf: optimize merge GLE - Order fields such that comparison will fail faster - Break out of loops if not matched * perf: don't try to match SLE if count mismatch * refactor: simplify initialize_previous_data * perf: use cache for fetching valuation_method These are set only once fields * refactor: simplify get_future_stock_vouchers * refactor: simplify get_voucherwise_gl_entries * perf: fetch only required fields for GL comparison `select *` fetches all fields, output of this function is only used for comparing. * perf: reorder conditions in PL cost center check * perf: reduce query while validating new gle * perf: use cache for validating warehouse props These properties don't change often, no need to query everytime. * perf: use cached stock settings to validate SLE * docs: update misleading docstring Co-authored-by: Marica --- erpnext/accounts/doctype/gl_entry/gl_entry.py | 22 ++++++----- erpnext/accounts/general_ledger.py | 25 ++++++++----- erpnext/accounts/utils.py | 37 +++++++++++++------ .../stock_ledger_entry/stock_ledger_entry.py | 4 +- erpnext/stock/stock_ledger.py | 12 +++--- erpnext/stock/utils.py | 8 ++-- 6 files changed, 65 insertions(+), 43 deletions(-) diff --git a/erpnext/accounts/doctype/gl_entry/gl_entry.py b/erpnext/accounts/doctype/gl_entry/gl_entry.py index 11465b711e3..0844995f296 100644 --- a/erpnext/accounts/doctype/gl_entry/gl_entry.py +++ b/erpnext/accounts/doctype/gl_entry/gl_entry.py @@ -58,8 +58,8 @@ class GLEntry(Document): if not self.get(k): frappe.throw(_("{0} is required").format(_(self.meta.get_label(k)))) - account_type = frappe.get_cached_value("Account", self.account, "account_type") if not (self.party_type and self.party): + account_type = frappe.get_cached_value("Account", self.account, "account_type") if account_type == "Receivable": frappe.throw(_("{0} {1}: Customer is required against Receivable account {2}") .format(self.voucher_type, self.voucher_no, self.account)) @@ -73,15 +73,19 @@ class GLEntry(Document): .format(self.voucher_type, self.voucher_no, self.account)) def pl_must_have_cost_center(self): - if frappe.get_cached_value("Account", self.account, "report_type") == "Profit and Loss": - if not self.cost_center and self.voucher_type != 'Period Closing Voucher': - msg = _("{0} {1}: Cost Center is required for 'Profit and Loss' account {2}.").format( - self.voucher_type, self.voucher_no, self.account) - msg += " " - msg += _("Please set the cost center field in {0} or setup a default Cost Center for the Company.").format( - self.voucher_type) + """Validate that profit and loss type account GL entries have a cost center.""" - frappe.throw(msg, title=_("Missing Cost Center")) + if self.cost_center or self.voucher_type == 'Period Closing Voucher': + return + + if frappe.get_cached_value("Account", self.account, "report_type") == "Profit and Loss": + msg = _("{0} {1}: Cost Center is required for 'Profit and Loss' account {2}.").format( + self.voucher_type, self.voucher_no, self.account) + msg += " " + msg += _("Please set the cost center field in {0} or setup a default Cost Center for the Company.").format( + self.voucher_type) + + frappe.throw(msg, title=_("Missing Cost Center")) def validate_dimensions_for_pl_and_bs(self): account_type = frappe.db.get_value("Account", self.account, "report_type") diff --git a/erpnext/accounts/general_ledger.py b/erpnext/accounts/general_ledger.py index 25d2cf10bd4..4c7c567b42a 100644 --- a/erpnext/accounts/general_ledger.py +++ b/erpnext/accounts/general_ledger.py @@ -100,8 +100,8 @@ def merge_similar_entries(gl_map, precision=None): return merged_gl_map def check_if_in_list(gle, gl_map, dimensions=None): - account_head_fieldnames = ['party_type', 'party', 'against_voucher', 'against_voucher_type', - 'cost_center', 'project', 'voucher_detail_no'] + account_head_fieldnames = ['voucher_detail_no', 'party', 'against_voucher', + 'cost_center', 'against_voucher_type', 'party_type', 'project'] if dimensions: account_head_fieldnames = account_head_fieldnames + dimensions @@ -110,10 +110,12 @@ def check_if_in_list(gle, gl_map, dimensions=None): same_head = True if e.account != gle.account: same_head = False + continue for fieldname in account_head_fieldnames: if cstr(e.get(fieldname)) != cstr(gle.get(fieldname)): same_head = False + break if same_head: return e @@ -143,16 +145,19 @@ def make_entry(args, adv_adj, update_outstanding, from_repost=False): validate_expense_against_budget(args) def validate_cwip_accounts(gl_map): - cwip_enabled = any(cint(ac.enable_cwip_accounting) for ac in frappe.db.get_all("Asset Category","enable_cwip_accounting")) + """Validate that CWIP account are not used in Journal Entry""" + if gl_map and gl_map[0].voucher_type != "Journal Entry": + return - if cwip_enabled and gl_map[0].voucher_type == "Journal Entry": - cwip_accounts = [d[0] for d in frappe.db.sql("""select name from tabAccount - where account_type = 'Capital Work in Progress' and is_group=0""")] + cwip_enabled = any(cint(ac.enable_cwip_accounting) for ac in frappe.db.get_all("Asset Category", "enable_cwip_accounting")) + if cwip_enabled: + cwip_accounts = [d[0] for d in frappe.db.sql("""select name from tabAccount + where account_type = 'Capital Work in Progress' and is_group=0""")] - for entry in gl_map: - if entry.account in cwip_accounts: - frappe.throw( - _("Account: {0} is capital Work in progress and can not be updated by Journal Entry").format(entry.account)) + for entry in gl_map: + if entry.account in cwip_accounts: + frappe.throw( + _("Account: {0} is capital Work in progress and can not be updated by Journal Entry").format(entry.account)) def round_off_debit_credit(gl_map): precision = get_field_precision(frappe.get_meta("GL Entry").get_field("debit"), diff --git a/erpnext/accounts/utils.py b/erpnext/accounts/utils.py index 9272bc4fcee..5b58e874fed 100644 --- a/erpnext/accounts/utils.py +++ b/erpnext/accounts/utils.py @@ -920,7 +920,6 @@ def repost_gle_for_stock_vouchers(stock_vouchers, posting_date, company=None, wa _delete_gl_entries(voucher_type, voucher_no) def get_future_stock_vouchers(posting_date, posting_time, for_warehouses=None, for_items=None, company=None): - future_stock_vouchers = [] values = [] condition = "" @@ -936,30 +935,46 @@ def get_future_stock_vouchers(posting_date, posting_time, for_warehouses=None, f condition += " and company = %s" values.append(company) - for d in frappe.db.sql("""select distinct sle.voucher_type, sle.voucher_no + future_stock_vouchers = frappe.db.sql("""select distinct sle.voucher_type, sle.voucher_no from `tabStock Ledger Entry` sle where timestamp(sle.posting_date, sle.posting_time) >= timestamp(%s, %s) and is_cancelled = 0 {condition} order by timestamp(sle.posting_date, sle.posting_time) asc, creation asc for update""".format(condition=condition), - tuple([posting_date, posting_time] + values), as_dict=True): - future_stock_vouchers.append([d.voucher_type, d.voucher_no]) + tuple([posting_date, posting_time] + values), as_dict=True) - return future_stock_vouchers + return [(d.voucher_type, d.voucher_no) for d in future_stock_vouchers] def get_voucherwise_gl_entries(future_stock_vouchers, posting_date): + """ Get voucherwise list of GL entries. + + Only fetches GLE fields required for comparing with new GLE. + Check compare_existing_and_expected_gle function below. + """ gl_entries = {} - if future_stock_vouchers: - for d in frappe.db.sql("""select * from `tabGL Entry` - where posting_date >= %s and voucher_no in (%s)""" % - ('%s', ', '.join(['%s']*len(future_stock_vouchers))), - tuple([posting_date] + [d[1] for d in future_stock_vouchers]), as_dict=1): - gl_entries.setdefault((d.voucher_type, d.voucher_no), []).append(d) + if not future_stock_vouchers: + return gl_entries + + voucher_nos = [d[1] for d in future_stock_vouchers] + + gles = frappe.db.sql(""" + select name, account, credit, debit, cost_center, project + from `tabGL Entry` + where + posting_date >= %s and voucher_no in (%s)""" % + ('%s', ', '.join(['%s'] * len(voucher_nos))), + tuple([posting_date] + voucher_nos), as_dict=1) + + for d in gles: + gl_entries.setdefault((d.voucher_type, d.voucher_no), []).append(d) return gl_entries def compare_existing_and_expected_gle(existing_gle, expected_gle, precision): + if len(existing_gle) != len(expected_gle): + return False + matched = True for entry in expected_gle: account_existed = False diff --git a/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py b/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py index b4f458388b3..be1f00e37fa 100644 --- a/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py +++ b/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py @@ -55,8 +55,8 @@ class StockLedgerEntry(Document): "sum(actual_qty)") or 0 frappe.db.set_value("Batch", self.batch_no, "batch_qty", batch_qty) - #check for item quantity available in stock def actual_amt_check(self): + """Validate that qty at warehouse for selected batch is >=0""" if self.batch_no and not self.get("allow_negative_stock"): batch_bal_after_transaction = flt(frappe.db.sql("""select sum(actual_qty) from `tabStock Ledger Entry` @@ -107,7 +107,7 @@ class StockLedgerEntry(Document): self.stock_uom = item_det.stock_uom def check_stock_frozen_date(self): - stock_settings = frappe.get_doc('Stock Settings', 'Stock Settings') + stock_settings = frappe.get_cached_doc('Stock Settings') if stock_settings.stock_frozen_upto: if (getdate(self.posting_date) <= getdate(stock_settings.stock_frozen_upto) diff --git a/erpnext/stock/stock_ledger.py b/erpnext/stock/stock_ledger.py index f990ce06be5..eddd048c74e 100644 --- a/erpnext/stock/stock_ledger.py +++ b/erpnext/stock/stock_ledger.py @@ -279,15 +279,13 @@ class update_entries_after(object): } """ - self.data.setdefault(args.warehouse, frappe._dict()) - warehouse_dict = self.data[args.warehouse] previous_sle = get_previous_sle_of_current_voucher(args) - warehouse_dict.previous_sle = previous_sle - for key in ("qty_after_transaction", "valuation_rate", "stock_value"): - setattr(warehouse_dict, key, flt(previous_sle.get(key))) - - warehouse_dict.update({ + self.data[args.warehouse] = frappe._dict({ + "previous_sle": previous_sle, + "qty_after_transaction": flt(previous_sle.qty_after_transaction), + "valuation_rate": flt(previous_sle.valuation_rate), + "stock_value": flt(previous_sle.stock_value), "prev_stock_value": previous_sle.stock_value or 0.0, "stock_queue": json.loads(previous_sle.stock_queue or "[]"), "stock_value_difference": 0.0 diff --git a/erpnext/stock/utils.py b/erpnext/stock/utils.py index b57b2aa6b8f..9f6d0a8addd 100644 --- a/erpnext/stock/utils.py +++ b/erpnext/stock/utils.py @@ -224,7 +224,7 @@ def get_avg_purchase_rate(serial_nos): def get_valuation_method(item_code): """get valuation method from item or default""" - val_method = frappe.db.get_value('Item', item_code, 'valuation_method') + val_method = frappe.db.get_value('Item', item_code, 'valuation_method', cache=True) if not val_method: val_method = frappe.db.get_value("Stock Settings", None, "valuation_method") or "FIFO" return val_method @@ -275,17 +275,17 @@ def get_valid_serial_nos(sr_nos, qty=0, item_code=''): return valid_serial_nos def validate_warehouse_company(warehouse, company): - warehouse_company = frappe.db.get_value("Warehouse", warehouse, "company") + warehouse_company = frappe.db.get_value("Warehouse", warehouse, "company", cache=True) if warehouse_company and warehouse_company != company: frappe.throw(_("Warehouse {0} does not belong to company {1}").format(warehouse, company), InvalidWarehouseCompany) def is_group_warehouse(warehouse): - if frappe.db.get_value("Warehouse", warehouse, "is_group"): + if frappe.db.get_value("Warehouse", warehouse, "is_group", cache=True): frappe.throw(_("Group node warehouse is not allowed to select for transactions")) def validate_disabled_warehouse(warehouse): - if frappe.db.get_value("Warehouse", warehouse, "disabled"): + if frappe.db.get_value("Warehouse", warehouse, "disabled", cache=True): frappe.throw(_("Disabled Warehouse {0} cannot be used for this transaction.").format(get_link_to_form('Warehouse', warehouse))) def update_included_uom_in_report(columns, result, include_uom, conversion_factors): From e5b02216933a71c06457920e5f3a58a06ffa5bbc Mon Sep 17 00:00:00 2001 From: marination Date: Wed, 11 Aug 2021 13:02:49 +0530 Subject: [PATCH 79/95] test: fix attendance request tests - Use `frappe.db.get_value` instead of `get_doc` for asserting values - Get values after cancellation as reloading attendance doc breaks due to stale doc (primary key changed after cancel of attendance request) - rollback everything on tearDown --- .../test_attendance_request.py | 68 ++++++++++++++----- 1 file changed, 52 insertions(+), 16 deletions(-) diff --git a/erpnext/hr/doctype/attendance_request/test_attendance_request.py b/erpnext/hr/doctype/attendance_request/test_attendance_request.py index 3c42bd9fc35..0898476edf4 100644 --- a/erpnext/hr/doctype/attendance_request/test_attendance_request.py +++ b/erpnext/hr/doctype/attendance_request/test_attendance_request.py @@ -15,6 +15,9 @@ class TestAttendanceRequest(unittest.TestCase): for doctype in ["Attendance Request", "Attendance"]: frappe.db.sql("delete from `tab{doctype}`".format(doctype=doctype)) + def tearDown(self): + frappe.db.rollback() + def test_on_duty_attendance_request(self): today = nowdate() employee = get_employee() @@ -26,15 +29,33 @@ class TestAttendanceRequest(unittest.TestCase): attendance_request.company = "_Test Company" attendance_request.insert() attendance_request.submit() - attendance = frappe.get_doc('Attendance', { - 'employee': employee.name, - 'attendance_date': date(date.today().year, 1, 1), - 'docstatus': 1 - }) - self.assertEqual(attendance.status, 'Present') + + attendance = frappe.db.get_value( + "Attendance", + filters={ + "attendance_request": attendance_request.name, + "attendance_date": date(date.today().year, 1, 1) + }, + fieldname=["status", "docstatus"], + as_dict=True + ) + self.assertEqual(attendance.status, "Present") + self.assertEqual(attendance.docstatus, 1) + + # cancelling attendance request cancels linked attendances attendance_request.cancel() - attendance.reload() - self.assertEqual(attendance.docstatus, 2) + + # cancellation alters docname + # fetch attendance value again to avoid stale docname + attendance_docstatus = frappe.db.get_value( + "Attendance", + filters={ + "attendance_request": attendance_request.name, + "attendance_date": date(date.today().year, 1, 1) + }, + fieldname="docstatus" + ) + self.assertEqual(attendance_docstatus, 2) def test_work_from_home_attendance_request(self): today = nowdate() @@ -47,15 +68,30 @@ class TestAttendanceRequest(unittest.TestCase): attendance_request.company = "_Test Company" attendance_request.insert() attendance_request.submit() - attendance = frappe.get_doc('Attendance', { - 'employee': employee.name, - 'attendance_date': date(date.today().year, 1, 1), - 'docstatus': 1 - }) - self.assertEqual(attendance.status, 'Work From Home') + + attendance_status = frappe.db.get_value( + "Attendance", + filters={ + "attendance_request": attendance_request.name, + "attendance_date": date(date.today().year, 1, 1) + }, + fieldname="status" + ) + self.assertEqual(attendance_status, 'Work From Home') + attendance_request.cancel() - attendance.reload() - self.assertEqual(attendance.docstatus, 2) + + # cancellation alters docname + # fetch attendance value again to avoid stale docname + attendance_docstatus = frappe.db.get_value( + "Attendance", + filters={ + "attendance_request": attendance_request.name, + "attendance_date": date(date.today().year, 1, 1) + }, + fieldname="docstatus" + ) + self.assertEqual(attendance_docstatus, 2) def get_employee(): return frappe.get_doc("Employee", "_T-Employee-00001") From bca30d6101f539b4f68c536e83a82c1cd29b1bb7 Mon Sep 17 00:00:00 2001 From: marination Date: Wed, 11 Aug 2021 13:29:44 +0530 Subject: [PATCH 80/95] test: fix Shift Request test - Use `get_value` instead of `get_doc` - Remove unnecessary loop, only one shift assignment is made against a shift request - Get value after cancel again. Get doc is not reliable since primary key changed after cancel --- .../test_attendance_request.py | 2 ++ .../shift_request/test_shift_request.py | 33 ++++++++++++------- 2 files changed, 24 insertions(+), 11 deletions(-) diff --git a/erpnext/hr/doctype/attendance_request/test_attendance_request.py b/erpnext/hr/doctype/attendance_request/test_attendance_request.py index 0898476edf4..9e668aa72fb 100644 --- a/erpnext/hr/doctype/attendance_request/test_attendance_request.py +++ b/erpnext/hr/doctype/attendance_request/test_attendance_request.py @@ -19,6 +19,7 @@ class TestAttendanceRequest(unittest.TestCase): frappe.db.rollback() def test_on_duty_attendance_request(self): + "Test creation/updation of Attendace from Attendance Request, on duty." today = nowdate() employee = get_employee() attendance_request = frappe.new_doc("Attendance Request") @@ -58,6 +59,7 @@ class TestAttendanceRequest(unittest.TestCase): self.assertEqual(attendance_docstatus, 2) def test_work_from_home_attendance_request(self): + "Test creation/updation of Attendace from Attendance Request, work from home." today = nowdate() employee = get_employee() attendance_request = frappe.new_doc("Attendance Request") diff --git a/erpnext/hr/doctype/shift_request/test_shift_request.py b/erpnext/hr/doctype/shift_request/test_shift_request.py index 9c0d8e31985..3525540cdfd 100644 --- a/erpnext/hr/doctype/shift_request/test_shift_request.py +++ b/erpnext/hr/doctype/shift_request/test_shift_request.py @@ -15,24 +15,35 @@ class TestShiftRequest(unittest.TestCase): for doctype in ["Shift Request", "Shift Assignment"]: frappe.db.sql("delete from `tab{doctype}`".format(doctype=doctype)) + def tearDown(self): + frappe.db.rollback() + def test_make_shift_request(self): + "Test creation/updation of Shift Assignment from Shift Request." department = frappe.get_value("Employee", "_T-Employee-00001", 'department') set_shift_approver(department) approver = frappe.db.sql("""select approver from `tabDepartment Approver` where parent= %s and parentfield = 'shift_request_approver'""", (department))[0][0] shift_request = make_shift_request(approver) - shift_assignments = frappe.db.sql(''' - SELECT shift_request, employee - FROM `tabShift Assignment` - WHERE shift_request = '{0}' - '''.format(shift_request.name), as_dict=1) - for d in shift_assignments: - employee = d.get('employee') - self.assertEqual(shift_request.employee, employee) - shift_request.cancel() - shift_assignment_doc = frappe.get_doc("Shift Assignment", {"shift_request": d.get('shift_request')}) - self.assertEqual(shift_assignment_doc.docstatus, 2) + # Only one shift assignment is created against a shift request + shift_assignment = frappe.db.get_value( + "Shift Assignment", + filters={"shift_request": shift_request.name}, + fieldname=["employee", "docstatus"], + as_dict=True + ) + self.assertEqual(shift_request.employee, shift_assignment.employee) + self.assertEqual(shift_assignment.docstatus, 1) + + shift_request.cancel() + + shift_assignment_docstatus = frappe.db.get_value( + "Shift Assignment", + filters={"shift_request": shift_request.name}, + fieldname="docstatus" + ) + self.assertEqual(shift_assignment_docstatus, 2) def test_shift_request_approver_perms(self): employee = frappe.get_doc("Employee", "_T-Employee-00001") From 8f1a3aef2e3f14e179f4ac91718e9f376b34198c Mon Sep 17 00:00:00 2001 From: marination Date: Wed, 11 Aug 2021 15:17:06 +0530 Subject: [PATCH 81/95] test: fix POS Closing Entry Test - Separated into two tests, one checks if SI cancelling is blocked, the other checks PCE cancel impact - This is done because after cancel via assertRaises, damage done by cancel still exists or is partially comitted - Dont use this partially cancelled doc for any assertions further, end test at exception assertion - Use `get_value` to check SI docstatus, as its primary key changes after cancel --- .../test_pos_closing_entry.py | 43 +++++++++++++++++-- 1 file changed, 39 insertions(+), 4 deletions(-) diff --git a/erpnext/accounts/doctype/pos_closing_entry/test_pos_closing_entry.py b/erpnext/accounts/doctype/pos_closing_entry/test_pos_closing_entry.py index b596c0cf25a..0265f43476f 100644 --- a/erpnext/accounts/doctype/pos_closing_entry/test_pos_closing_entry.py +++ b/erpnext/accounts/doctype/pos_closing_entry/test_pos_closing_entry.py @@ -19,6 +19,7 @@ class TestPOSClosingEntry(unittest.TestCase): def tearDown(self): frappe.set_user("Administrator") frappe.db.sql("delete from `tabPOS Profile`") + frappe.db.rollback() def test_pos_closing_entry(self): test_user, pos_profile = init_user_and_profile() @@ -50,7 +51,8 @@ class TestPOSClosingEntry(unittest.TestCase): self.assertEqual(pcv_doc.total_quantity, 2) self.assertEqual(pcv_doc.net_total, 6700) - def test_cancelling_of_pos_closing_entry(self): + def test_cancelling_of_consolidated_sales_invoice(self): + "Check if cancelling consolidated Sales Invoice with submitted POS Closing Entry is blocked." test_user, pos_profile = init_user_and_profile() opening_entry = create_opening_entry(pos_profile, test_user.name) @@ -83,13 +85,46 @@ class TestPOSClosingEntry(unittest.TestCase): si_doc = frappe.get_doc("Sales Invoice", pos_inv1.consolidated_invoice) self.assertRaises(frappe.ValidationError, si_doc.cancel) + def test_cancelling_of_pos_closing_entry(self): + "Check impact of cancelling POS Closing Entry." + test_user, pos_profile = init_user_and_profile() + opening_entry = create_opening_entry(pos_profile, test_user.name) + + pos_inv1 = create_pos_invoice(rate=3500, do_not_submit=1) + pos_inv1.append('payments', { + 'mode_of_payment': 'Cash', 'account': 'Cash - _TC', 'amount': 3500 + }) + pos_inv1.submit() + + pos_inv2 = create_pos_invoice(rate=3200, do_not_submit=1) + pos_inv2.append('payments', { + 'mode_of_payment': 'Cash', 'account': 'Cash - _TC', 'amount': 3200 + }) + pos_inv2.submit() + + pcv_doc = make_closing_entry_from_opening(opening_entry) + payment = pcv_doc.payment_reconciliation[0] + + for d in pcv_doc.payment_reconciliation: + if d.mode_of_payment == 'Cash': + d.closing_amount = 6700 + + pcv_doc.submit() + + pos_inv1.load_from_db() + si_name = pos_inv1.consolidated_invoice + pcv_doc.load_from_db() pcv_doc.cancel() - si_doc.load_from_db() pos_inv1.load_from_db() - self.assertEqual(si_doc.docstatus, 2) - self.assertEqual(pos_inv1.status, 'Paid') + # After POS Closing Entry cancel, SI doc gets cancelled, unlinked and renamed + # There's no reference doc to fetch SI with new cancelled name + # which is why we are hardcoding suffix + si_docstatus = frappe.db.get_value("Sales Invoice", si_name+"-CANC-0", "docstatus") + self.assertEqual(si_docstatus, 2) + self.assertEqual(pos_inv1.status, 'Paid') + self.assertIsNone(pos_inv1.consolidated_invoice) def init_user_and_profile(**args): user = 'test@example.com' From 867939fcae12c689c145c0d8610a469508f1b900 Mon Sep 17 00:00:00 2001 From: marination Date: Wed, 11 Aug 2021 16:40:07 +0530 Subject: [PATCH 82/95] test: fixed asset movement tests - set cwip account in company to avoid value missing - removed unused statement - removed trailing spaces --- .../test_pos_closing_entry.py | 1 - .../asset_movement/test_asset_movement.py | 19 ++++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/erpnext/accounts/doctype/pos_closing_entry/test_pos_closing_entry.py b/erpnext/accounts/doctype/pos_closing_entry/test_pos_closing_entry.py index 0265f43476f..c585f310b16 100644 --- a/erpnext/accounts/doctype/pos_closing_entry/test_pos_closing_entry.py +++ b/erpnext/accounts/doctype/pos_closing_entry/test_pos_closing_entry.py @@ -103,7 +103,6 @@ class TestPOSClosingEntry(unittest.TestCase): pos_inv2.submit() pcv_doc = make_closing_entry_from_opening(opening_entry) - payment = pcv_doc.payment_reconciliation[0] for d in pcv_doc.payment_reconciliation: if d.mode_of_payment == 'Cash': diff --git a/erpnext/assets/doctype/asset_movement/test_asset_movement.py b/erpnext/assets/doctype/asset_movement/test_asset_movement.py index cddee5fa0f1..985bca9d0de 100644 --- a/erpnext/assets/doctype/asset_movement/test_asset_movement.py +++ b/erpnext/assets/doctype/asset_movement/test_asset_movement.py @@ -15,6 +15,7 @@ from erpnext.stock.doctype.purchase_receipt.test_purchase_receipt import make_pu class TestAssetMovement(unittest.TestCase): def setUp(self): + frappe.db.set_value("Company", "_Test Company", "capital_work_in_progress_account", "CWIP Account - _TC") create_asset_data() make_location() @@ -45,12 +46,12 @@ class TestAssetMovement(unittest.TestCase): 'location_name': 'Test Location 2' }).insert() - movement1 = create_asset_movement(purpose = 'Transfer', company = asset.company, + movement1 = create_asset_movement(purpose = 'Transfer', company = asset.company, assets = [{ 'asset': asset.name , 'source_location': 'Test Location', 'target_location': 'Test Location 2'}], reference_doctype = 'Purchase Receipt', reference_name = pr.name) self.assertEqual(frappe.db.get_value("Asset", asset.name, "location"), "Test Location 2") - movement2 = create_asset_movement(purpose = 'Transfer', company = asset.company, + movement2 = create_asset_movement(purpose = 'Transfer', company = asset.company, assets = [{ 'asset': asset.name , 'source_location': 'Test Location 2', 'target_location': 'Test Location'}], reference_doctype = 'Purchase Receipt', reference_name = pr.name) self.assertEqual(frappe.db.get_value("Asset", asset.name, "location"), "Test Location") @@ -59,18 +60,18 @@ class TestAssetMovement(unittest.TestCase): self.assertEqual(frappe.db.get_value("Asset", asset.name, "location"), "Test Location") employee = make_employee("testassetmovemp@example.com", company="_Test Company") - movement3 = create_asset_movement(purpose = 'Issue', company = asset.company, + movement3 = create_asset_movement(purpose = 'Issue', company = asset.company, assets = [{ 'asset': asset.name , 'source_location': 'Test Location', 'to_employee': employee}], reference_doctype = 'Purchase Receipt', reference_name = pr.name) - + # after issuing asset should belong to an employee not at a location self.assertEqual(frappe.db.get_value("Asset", asset.name, "location"), None) self.assertEqual(frappe.db.get_value("Asset", asset.name, "custodian"), employee) - + def test_last_movement_cancellation(self): pr = make_purchase_receipt(item_code="Macbook Pro", qty=1, rate=100000.0, location="Test Location") - + asset_name = frappe.db.get_value("Asset", {"purchase_receipt": pr.name}, 'name') asset = frappe.get_doc('Asset', asset_name) asset.calculate_depreciation = 1 @@ -85,17 +86,17 @@ class TestAssetMovement(unittest.TestCase): }) if asset.docstatus == 0: asset.submit() - + if not frappe.db.exists("Location", "Test Location 2"): frappe.get_doc({ 'doctype': 'Location', 'location_name': 'Test Location 2' }).insert() - + movement = frappe.get_doc({'doctype': 'Asset Movement', 'reference_name': pr.name }) self.assertRaises(frappe.ValidationError, movement.cancel) - movement1 = create_asset_movement(purpose = 'Transfer', company = asset.company, + movement1 = create_asset_movement(purpose = 'Transfer', company = asset.company, assets = [{ 'asset': asset.name , 'source_location': 'Test Location', 'target_location': 'Test Location 2'}], reference_doctype = 'Purchase Receipt', reference_name = pr.name) self.assertEqual(frappe.db.get_value("Asset", asset.name, "location"), "Test Location 2") From 455d300fca044643eb37a78568e123a62a94ef38 Mon Sep 17 00:00:00 2001 From: marination Date: Wed, 11 Aug 2021 17:00:46 +0530 Subject: [PATCH 83/95] Revert "test: fix POS Closing Entry Test" This reverts commit 8f1a3aef2e3f14e179f4ac91718e9f376b34198c. --- .../test_pos_closing_entry.py | 42 ++----------------- .../asset_movement/test_asset_movement.py | 4 +- 2 files changed, 6 insertions(+), 40 deletions(-) diff --git a/erpnext/accounts/doctype/pos_closing_entry/test_pos_closing_entry.py b/erpnext/accounts/doctype/pos_closing_entry/test_pos_closing_entry.py index c585f310b16..b596c0cf25a 100644 --- a/erpnext/accounts/doctype/pos_closing_entry/test_pos_closing_entry.py +++ b/erpnext/accounts/doctype/pos_closing_entry/test_pos_closing_entry.py @@ -19,7 +19,6 @@ class TestPOSClosingEntry(unittest.TestCase): def tearDown(self): frappe.set_user("Administrator") frappe.db.sql("delete from `tabPOS Profile`") - frappe.db.rollback() def test_pos_closing_entry(self): test_user, pos_profile = init_user_and_profile() @@ -51,8 +50,7 @@ class TestPOSClosingEntry(unittest.TestCase): self.assertEqual(pcv_doc.total_quantity, 2) self.assertEqual(pcv_doc.net_total, 6700) - def test_cancelling_of_consolidated_sales_invoice(self): - "Check if cancelling consolidated Sales Invoice with submitted POS Closing Entry is blocked." + def test_cancelling_of_pos_closing_entry(self): test_user, pos_profile = init_user_and_profile() opening_entry = create_opening_entry(pos_profile, test_user.name) @@ -85,45 +83,13 @@ class TestPOSClosingEntry(unittest.TestCase): si_doc = frappe.get_doc("Sales Invoice", pos_inv1.consolidated_invoice) self.assertRaises(frappe.ValidationError, si_doc.cancel) - def test_cancelling_of_pos_closing_entry(self): - "Check impact of cancelling POS Closing Entry." - test_user, pos_profile = init_user_and_profile() - opening_entry = create_opening_entry(pos_profile, test_user.name) - - pos_inv1 = create_pos_invoice(rate=3500, do_not_submit=1) - pos_inv1.append('payments', { - 'mode_of_payment': 'Cash', 'account': 'Cash - _TC', 'amount': 3500 - }) - pos_inv1.submit() - - pos_inv2 = create_pos_invoice(rate=3200, do_not_submit=1) - pos_inv2.append('payments', { - 'mode_of_payment': 'Cash', 'account': 'Cash - _TC', 'amount': 3200 - }) - pos_inv2.submit() - - pcv_doc = make_closing_entry_from_opening(opening_entry) - - for d in pcv_doc.payment_reconciliation: - if d.mode_of_payment == 'Cash': - d.closing_amount = 6700 - - pcv_doc.submit() - - pos_inv1.load_from_db() - si_name = pos_inv1.consolidated_invoice - pcv_doc.load_from_db() pcv_doc.cancel() + si_doc.load_from_db() pos_inv1.load_from_db() - - # After POS Closing Entry cancel, SI doc gets cancelled, unlinked and renamed - # There's no reference doc to fetch SI with new cancelled name - # which is why we are hardcoding suffix - si_docstatus = frappe.db.get_value("Sales Invoice", si_name+"-CANC-0", "docstatus") - self.assertEqual(si_docstatus, 2) + self.assertEqual(si_doc.docstatus, 2) self.assertEqual(pos_inv1.status, 'Paid') - self.assertIsNone(pos_inv1.consolidated_invoice) + def init_user_and_profile(**args): user = 'test@example.com' diff --git a/erpnext/assets/doctype/asset_movement/test_asset_movement.py b/erpnext/assets/doctype/asset_movement/test_asset_movement.py index 985bca9d0de..2b2d2b44004 100644 --- a/erpnext/assets/doctype/asset_movement/test_asset_movement.py +++ b/erpnext/assets/doctype/asset_movement/test_asset_movement.py @@ -51,7 +51,7 @@ class TestAssetMovement(unittest.TestCase): reference_doctype = 'Purchase Receipt', reference_name = pr.name) self.assertEqual(frappe.db.get_value("Asset", asset.name, "location"), "Test Location 2") - movement2 = create_asset_movement(purpose = 'Transfer', company = asset.company, + create_asset_movement(purpose = 'Transfer', company = asset.company, assets = [{ 'asset': asset.name , 'source_location': 'Test Location 2', 'target_location': 'Test Location'}], reference_doctype = 'Purchase Receipt', reference_name = pr.name) self.assertEqual(frappe.db.get_value("Asset", asset.name, "location"), "Test Location") @@ -60,7 +60,7 @@ class TestAssetMovement(unittest.TestCase): self.assertEqual(frappe.db.get_value("Asset", asset.name, "location"), "Test Location") employee = make_employee("testassetmovemp@example.com", company="_Test Company") - movement3 = create_asset_movement(purpose = 'Issue', company = asset.company, + create_asset_movement(purpose = 'Issue', company = asset.company, assets = [{ 'asset': asset.name , 'source_location': 'Test Location', 'to_employee': employee}], reference_doctype = 'Purchase Receipt', reference_name = pr.name) From 54c31ed33c6112cb9040470dc40cbb78c489d418 Mon Sep 17 00:00:00 2001 From: Ganga Manoj Date: Thu, 12 Aug 2021 13:42:56 +0530 Subject: [PATCH 84/95] feat: depreciate asset after sale (#26543) --- .../doctype/sales_invoice/sales_invoice.py | 106 +++++++++++++++--- .../sales_invoice/test_sales_invoice.py | 25 +++++ erpnext/assets/doctype/asset/asset.py | 44 ++++++-- 3 files changed, 155 insertions(+), 20 deletions(-) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index cecc1a18df4..51548e9a5bd 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -4,7 +4,7 @@ from __future__ import unicode_literals import frappe, erpnext import frappe.defaults -from frappe.utils import cint, flt, getdate, add_days, cstr, nowdate, get_link_to_form, formatdate +from frappe.utils import cint, flt, getdate, add_days, add_months, cstr, nowdate, get_link_to_form, formatdate from frappe import _, msgprint, throw from erpnext.accounts.party import get_party_account, get_due_date, get_party_details from frappe.model.mapper import get_mapped_doc @@ -13,7 +13,7 @@ from erpnext.accounts.utils import get_account_currency from erpnext.stock.doctype.delivery_note.delivery_note import update_billed_amount_based_on_so from erpnext.projects.doctype.timesheet.timesheet import get_projectwise_timesheet_data from erpnext.assets.doctype.asset.depreciation \ - import get_disposal_account_and_cost_center, get_gl_entries_on_asset_disposal, get_gl_entries_on_asset_regain + import get_disposal_account_and_cost_center, get_gl_entries_on_asset_disposal, get_gl_entries_on_asset_regain, post_depreciation_entries from erpnext.stock.doctype.batch.batch import set_batch_nos from erpnext.stock.doctype.serial_no.serial_no import get_serial_nos, get_delivery_note_serial_no from erpnext.setup.doctype.company.company import update_company_current_month_sales @@ -920,27 +920,24 @@ class SalesInvoice(SellingController): for item in self.get("items"): if flt(item.base_net_amount, item.precision("base_net_amount")): if item.is_fixed_asset: - if item.get('asset'): - asset = frappe.get_doc("Asset", item.asset) - else: - frappe.throw(_( - "Row #{0}: You must select an Asset for Item {1}.").format(item.idx, item.item_name), - title=_("Missing Asset") - ) - if (len(asset.finance_books) > 1 and not item.finance_book - and asset.finance_books[0].finance_book): - frappe.throw(_("Select finance book for the item {0} at row {1}") - .format(item.item_code, item.idx)) + asset = self.get_asset(item) if self.is_return: fixed_asset_gl_entries = get_gl_entries_on_asset_regain(asset, item.base_net_amount, item.finance_book) asset.db_set("disposal_date", None) + + if asset.calculate_depreciation: + self.reset_depreciation_schedule(asset) + else: fixed_asset_gl_entries = get_gl_entries_on_asset_disposal(asset, item.base_net_amount, item.finance_book) asset.db_set("disposal_date", self.posting_date) + if asset.calculate_depreciation: + self.depreciate_asset(asset) + for gle in fixed_asset_gl_entries: gle["against"] = self.customer gl_entries.append(self.get_gl_dict(gle, item=item)) @@ -972,6 +969,89 @@ class SalesInvoice(SellingController): erpnext.is_perpetual_inventory_enabled(self.company): gl_entries += super(SalesInvoice, self).get_gl_entries() + def get_asset(self, item): + if item.get('asset'): + asset = frappe.get_doc("Asset", item.asset) + else: + frappe.throw(_( + "Row #{0}: You must select an Asset for Item {1}.").format(item.idx, item.item_name), + title=_("Missing Asset") + ) + + self.check_finance_books(item, asset) + return asset + + def check_finance_books(self, item, asset): + if (len(asset.finance_books) > 1 and not item.finance_book + and asset.finance_books[0].finance_book): + frappe.throw(_("Select finance book for the item {0} at row {1}") + .format(item.item_code, item.idx)) + + def depreciate_asset(self, asset): + asset.flags.ignore_validate_update_after_submit = True + asset.prepare_depreciation_data(self.posting_date) + asset.save() + + post_depreciation_entries(self.posting_date) + + def reset_depreciation_schedule(self, asset): + asset.flags.ignore_validate_update_after_submit = True + + # recreate original depreciation schedule of the asset + asset.prepare_depreciation_data() + + self.modify_depreciation_schedule_for_asset_repairs(asset) + asset.save() + + self.delete_depreciation_entry_made_after_sale(asset) + + def modify_depreciation_schedule_for_asset_repairs(self, asset): + asset_repairs = frappe.get_all( + 'Asset Repair', + filters = {'asset': asset.name}, + fields = ['name', 'increase_in_asset_life'] + ) + + for repair in asset_repairs: + if repair.increase_in_asset_life: + asset_repair = frappe.get_doc('Asset Repair', repair.name) + asset_repair.modify_depreciation_schedule() + asset.prepare_depreciation_data() + + def delete_depreciation_entry_made_after_sale(self, asset): + from erpnext.accounts.doctype.journal_entry.journal_entry import make_reverse_journal_entry + + posting_date_of_original_invoice = self.get_posting_date_of_sales_invoice() + + row = -1 + finance_book = asset.get('schedules')[0].get('finance_book') + for schedule in asset.get('schedules'): + if schedule.finance_book != finance_book: + row = 0 + finance_book = schedule.finance_book + else: + row += 1 + + if schedule.schedule_date == posting_date_of_original_invoice: + if not self.sale_was_made_on_original_schedule_date(asset, schedule, row, posting_date_of_original_invoice): + reverse_journal_entry = make_reverse_journal_entry(schedule.journal_entry) + reverse_journal_entry.posting_date = nowdate() + reverse_journal_entry.submit() + + def get_posting_date_of_sales_invoice(self): + return frappe.db.get_value('Sales Invoice', self.return_against, 'posting_date') + + # if the invoice had been posted on the date the depreciation was initially supposed to happen, the depreciation shouldn't be undone + def sale_was_made_on_original_schedule_date(self, asset, schedule, row, posting_date_of_original_invoice): + for finance_book in asset.get('finance_books'): + if schedule.finance_book == finance_book.finance_book: + orginal_schedule_date = add_months(finance_book.depreciation_start_date, + row * cint(finance_book.frequency_of_depreciation)) + + if orginal_schedule_date == posting_date_of_original_invoice: + return True + return False + def set_asset_status(self, asset): if self.is_return: asset.set_status() diff --git a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py index be20b18bead..f98275bcc1e 100644 --- a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py @@ -12,6 +12,7 @@ from erpnext.accounts.doctype.purchase_invoice.test_purchase_invoice import unli from erpnext.accounts.doctype.purchase_invoice.purchase_invoice import WarehouseMissingError from erpnext.accounts.doctype.pos_profile.test_pos_profile import make_pos_profile from erpnext.assets.doctype.asset.test_asset import create_asset, create_asset_data +from erpnext.assets.doctype.asset.depreciation import post_depreciation_entries from erpnext.exceptions import InvalidAccountCurrency, InvalidCurrency from erpnext.stock.doctype.serial_no.serial_no import SerialNoWarehouseError from frappe.model.naming import make_autoname @@ -2101,6 +2102,30 @@ class TestSalesInvoice(unittest.TestCase): sales_invoice.save() self.assertEqual(sales_invoice.items[0].item_tax_template, "_Test Account Excise Duty @ 10 - _TC") + def test_asset_depreciation_on_sale(self): + """ + Tests if an Asset set to depreciate yearly on June 30, that gets sold on Sept 30, creates an additional depreciation entry on Sept 30. + """ + + create_asset_data() + asset = create_asset(item_code="Macbook Pro", calculate_depreciation=1, submit=1) + post_depreciation_entries(getdate("2021-09-30")) + + create_sales_invoice(item_code="Macbook Pro", asset=asset.name, qty=1, rate=90000, posting_date=getdate("2021-09-30")) + asset.load_from_db() + + expected_values = [ + ["2020-06-30", 1311.48, 1311.48], + ["2021-06-30", 20000.0, 21311.48], + ["2021-09-30", 3966.76, 25278.24] + ] + + for i, schedule in enumerate(asset.schedules): + self.assertEqual(getdate(expected_values[i][0]), schedule.schedule_date) + self.assertEqual(expected_values[i][1], schedule.depreciation_amount) + self.assertEqual(expected_values[i][2], schedule.accumulated_depreciation_amount) + self.assertTrue(schedule.journal_entry) + def get_sales_invoice_for_e_invoice(): si = make_sales_invoice_for_ewaybill() si.naming_series = 'INV-2020-.#####' diff --git a/erpnext/assets/doctype/asset/asset.py b/erpnext/assets/doctype/asset/asset.py index 66f0bdcd588..b7ca6933315 100644 --- a/erpnext/assets/doctype/asset/asset.py +++ b/erpnext/assets/doctype/asset/asset.py @@ -56,12 +56,12 @@ class Asset(AccountsController): if self.is_existing_asset and self.purchase_invoice: frappe.throw(_("Purchase Invoice cannot be made against an existing asset {0}").format(self.name)) - def prepare_depreciation_data(self): + def prepare_depreciation_data(self, date_of_sale=None): if self.calculate_depreciation: self.value_after_depreciation = 0 self.set_depreciation_rate() - self.make_depreciation_schedule() - self.set_accumulated_depreciation() + self.make_depreciation_schedule(date_of_sale) + self.set_accumulated_depreciation(date_of_sale) else: self.finance_books = [] self.value_after_depreciation = (flt(self.gross_purchase_amount) - @@ -167,7 +167,7 @@ class Asset(AccountsController): d.rate_of_depreciation = flt(self.get_depreciation_rate(d, on_validate=True), d.precision("rate_of_depreciation")) - def make_depreciation_schedule(self): + def make_depreciation_schedule(self, date_of_sale): if 'Manual' not in [d.depreciation_method for d in self.finance_books] and not self.schedules: self.schedules = [] @@ -212,6 +212,21 @@ class Asset(AccountsController): # so monthly schedule date is calculated by removing 11 months from it monthly_schedule_date = add_months(schedule_date, - d.frequency_of_depreciation + 1) + # if asset is being sold + if date_of_sale: + from_date = self.get_from_date(d.finance_book) + depreciation_amount, days, months = self.get_pro_rata_amt(d, depreciation_amount, + from_date, date_of_sale) + + self.append("schedules", { + "schedule_date": date_of_sale, + "depreciation_amount": depreciation_amount, + "depreciation_method": d.depreciation_method, + "finance_book": d.finance_book, + "finance_book_id": d.idx + }) + break + # For first row if has_pro_rata and n==0: depreciation_amount, days, months = self.get_pro_rata_amt(d, depreciation_amount, @@ -303,6 +318,21 @@ class Asset(AccountsController): break return start + def get_from_date(self, finance_book): + if not self.get('schedules'): + return self.available_for_use_date + + if len(self.finance_books) == 1: + return self.schedules[-1].schedule_date + + from_date = "" + for schedule in self.get('schedules'): + if schedule.finance_book == finance_book: + from_date = schedule.schedule_date + + if from_date: + return from_date + return self.available_for_use_date # if it returns True, depreciation_amount will not be equal for the first and last rows def check_is_pro_rata(self, row): @@ -357,7 +387,7 @@ class Asset(AccountsController): frappe.throw(_("Depreciation Row {0}: Next Depreciation Date cannot be before Available-for-use Date") .format(row.idx)) - def set_accumulated_depreciation(self, ignore_booked_entry = False): + def set_accumulated_depreciation(self, date_of_sale=None, ignore_booked_entry = False): straight_line_idx = [d.idx for d in self.get("schedules") if d.depreciation_method == 'Straight Line'] finance_books = [] @@ -365,7 +395,7 @@ class Asset(AccountsController): if ignore_booked_entry and d.journal_entry: continue - if d.finance_book_id not in finance_books: + if int(d.finance_book_id) not in finance_books: accumulated_depreciation = flt(self.opening_accumulated_depreciation) value_after_depreciation = flt(self.get_value_after_depreciation(d.finance_book_id)) finance_books.append(int(d.finance_book_id)) @@ -374,7 +404,7 @@ class Asset(AccountsController): value_after_depreciation -= flt(depreciation_amount) # for the last row, if depreciation method = Straight Line - if straight_line_idx and i == max(straight_line_idx) - 1: + if straight_line_idx and i == max(straight_line_idx) - 1 and not date_of_sale: book = self.get('finance_books')[cint(d.finance_book_id) - 1] depreciation_amount += flt(value_after_depreciation - flt(book.expected_value_after_useful_life), d.precision("depreciation_amount")) From 88f13fef81b668547a9c66a68bb2fa9aea6973b2 Mon Sep 17 00:00:00 2001 From: Saqib Date: Thu, 12 Aug 2021 16:26:51 +0530 Subject: [PATCH 85/95] fix: ZeroDivisionError on creating e-invoice for credit note (#26915) --- erpnext/regional/india/e_invoice/utils.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/erpnext/regional/india/e_invoice/utils.py b/erpnext/regional/india/e_invoice/utils.py index 4276946ebb3..fa7e88d3a15 100644 --- a/erpnext/regional/india/e_invoice/utils.py +++ b/erpnext/regional/india/e_invoice/utils.py @@ -190,8 +190,10 @@ def get_item_list(invoice): item.description = sanitize_for_json(d.item_name) item.qty = abs(item.qty) - - item.unit_rate = abs(item.taxable_value / item.qty) + if flt(item.qty) != 0.0: + item.unit_rate = abs(item.taxable_value / item.qty) + else: + item.unit_rate = abs(item.taxable_value) item.gross_amount = abs(item.taxable_value) item.taxable_value = abs(item.taxable_value) item.discount_amount = 0 From b8658d003f0364bb195d641d3024859471e09334 Mon Sep 17 00:00:00 2001 From: Noah Jacob Date: Thu, 12 Aug 2021 20:03:28 +0530 Subject: [PATCH 86/95] fix: from_warehouse getting set to None (#26920) --- erpnext/stock/doctype/stock_entry/stock_entry.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.py b/erpnext/stock/doctype/stock_entry/stock_entry.py index 82933199d55..7b31d2fdf2d 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.py +++ b/erpnext/stock/doctype/stock_entry/stock_entry.py @@ -1185,7 +1185,7 @@ class StockEntry(StockController): wo = frappe.get_doc("Work Order", self.work_order) wo_items = frappe.get_all('Work Order Item', filters={'parent': self.work_order}, - fields=["item_code", "required_qty", "consumed_qty", "transferred_qty"] + fields=["item_code", "source_warehouse", "required_qty", "consumed_qty", "transferred_qty"] ) work_order_qty = wo.material_transferred_for_manufacturing or wo.qty @@ -1205,7 +1205,7 @@ class StockEntry(StockController): if qty > 0: self.add_to_stock_entry_detail({ item.item_code: { - "from_warehouse": wo.wip_warehouse, + "from_warehouse": wo.wip_warehouse or item.source_warehouse, "to_warehouse": "", "qty": qty, "item_name": item.item_name, @@ -1857,4 +1857,4 @@ def get_supplied_items(purchase_order): supplied_item.total_supplied_qty = flt(supplied_item.supplied_qty) - flt(supplied_item.returned_qty) - return supplied_item_details \ No newline at end of file + return supplied_item_details From 1de4c01942e32eff83bce98805a803ea3c26f721 Mon Sep 17 00:00:00 2001 From: Afshan <33727827+AfshanKhan@users.noreply.github.com> Date: Thu, 12 Aug 2021 23:06:34 +0530 Subject: [PATCH 87/95] fix: Deferred Revenue Section should be collapsible only if its not enabled (#26928) --- .../doctype/purchase_invoice_item/purchase_invoice_item.json | 3 ++- .../doctype/sales_invoice_item/sales_invoice_item.json | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) 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 b39022dd758..528c9319032 100644 --- a/erpnext/accounts/doctype/purchase_invoice_item/purchase_invoice_item.json +++ b/erpnext/accounts/doctype/purchase_invoice_item/purchase_invoice_item.json @@ -501,6 +501,7 @@ }, { "collapsible": 1, + "collapsible_depends_on": "enable_deferred_expense", "fieldname": "deferred_expense_section", "fieldtype": "Section Break", "label": "Deferred Expense" @@ -854,7 +855,7 @@ "idx": 1, "istable": 1, "links": [], - "modified": "2021-06-16 19:43:51.099386", + "modified": "2021-08-12 20:14:45.506639", "modified_by": "Administrator", "module": "Accounts", "name": "Purchase Invoice Item", 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 6690bdafc34..dad29c0956e 100644 --- a/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.json +++ b/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.json @@ -473,6 +473,7 @@ }, { "collapsible": 1, + "collapsible_depends_on": "enable_deferred_revenue", "fieldname": "deferred_revenue", "fieldtype": "Section Break", "label": "Deferred Revenue" @@ -825,7 +826,7 @@ "idx": 1, "istable": 1, "links": [], - "modified": "2021-06-21 23:03:11.599901", + "modified": "2021-08-12 20:15:42.668399", "modified_by": "Administrator", "module": "Accounts", "name": "Sales Invoice Item", From 587d2db6a9048c61414e00ab9d048be7efaa9db2 Mon Sep 17 00:00:00 2001 From: Afshan <33727827+AfshanKhan@users.noreply.github.com> Date: Fri, 13 Aug 2021 10:59:06 +0530 Subject: [PATCH 88/95] fix: show proper currency symbol in taxes and charges table (#26827) Co-authored-by: Saqib Co-authored-by: Deepesh Garg <42651287+deepeshgarg007@users.noreply.github.com> --- .../purchase_taxes_and_charges.json | 20 +++++++++---------- .../sales_taxes_and_charges.json | 20 +++++++++---------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/erpnext/accounts/doctype/purchase_taxes_and_charges/purchase_taxes_and_charges.json b/erpnext/accounts/doctype/purchase_taxes_and_charges/purchase_taxes_and_charges.json index 1fa68e0a8a8..d86abade924 100644 --- a/erpnext/accounts/doctype/purchase_taxes_and_charges/purchase_taxes_and_charges.json +++ b/erpnext/accounts/doctype/purchase_taxes_and_charges/purchase_taxes_and_charges.json @@ -22,7 +22,7 @@ "cost_center", "dimension_col_break", "section_break_9", - "currency", + "account_currency", "tax_amount", "tax_amount_after_discount_amount", "total", @@ -208,14 +208,6 @@ "fieldname": "dimension_col_break", "fieldtype": "Column Break" }, - { - "fetch_from": "account_head.account_currency", - "fieldname": "currency", - "fieldtype": "Link", - "label": "Account Currency", - "options": "Currency", - "read_only": 1 - }, { "default": "0", "depends_on": "eval:['Purchase Taxes and Charges Template', 'Payment Entry'].includes(parent.doctype)", @@ -223,12 +215,20 @@ "fieldname": "included_in_paid_amount", "fieldtype": "Check", "label": "Considered In Paid Amount" + }, + { + "fetch_from": "account_head.account_currency", + "fieldname": "account_currency", + "fieldtype": "Link", + "label": "Account Currency", + "options": "Currency", + "read_only": 1 } ], "idx": 1, "istable": 1, "links": [], - "modified": "2021-06-14 01:43:50.750455", + "modified": "2021-08-05 20:04:36.618240", "modified_by": "Administrator", "module": "Accounts", "name": "Purchase Taxes and Charges", diff --git a/erpnext/accounts/doctype/sales_taxes_and_charges/sales_taxes_and_charges.json b/erpnext/accounts/doctype/sales_taxes_and_charges/sales_taxes_and_charges.json index cfdb167bbca..3a871bfcede 100644 --- a/erpnext/accounts/doctype/sales_taxes_and_charges/sales_taxes_and_charges.json +++ b/erpnext/accounts/doctype/sales_taxes_and_charges/sales_taxes_and_charges.json @@ -19,7 +19,7 @@ "section_break_8", "rate", "section_break_9", - "currency", + "account_currency", "tax_amount", "total", "tax_amount_after_discount_amount", @@ -186,14 +186,6 @@ "fieldname": "dimension_col_break", "fieldtype": "Column Break" }, - { - "fetch_from": "account_head.account_currency", - "fieldname": "currency", - "fieldtype": "Link", - "label": "Account Currency", - "options": "Currency", - "read_only": 1 - }, { "default": "0", "depends_on": "eval:['Sales Taxes and Charges Template', 'Payment Entry'].includes(parent.doctype)", @@ -210,13 +202,21 @@ "label": "Dont Recompute tax", "print_hide": 1, "read_only": 1 + }, + { + "fetch_from": "account_head.account_currency", + "fieldname": "account_currency", + "fieldtype": "Link", + "label": "Account Currency", + "options": "Currency", + "read_only": 1 } ], "idx": 1, "index_web_pages_for_search": 1, "istable": 1, "links": [], - "modified": "2021-07-27 12:40:59.051803", + "modified": "2021-08-05 20:04:01.726867", "modified_by": "Administrator", "module": "Accounts", "name": "Sales Taxes and Charges", From b32c2fa56190b9d745ac9e967e0927bf675bce5f Mon Sep 17 00:00:00 2001 From: Shariq Ansari <30859809+shariquerik@users.noreply.github.com> Date: Fri, 13 Aug 2021 12:19:16 +0530 Subject: [PATCH 89/95] fix: updated erpnext wspace json files (#26380) * fix: updated erpnext wspace json files * fix: updated wspace json files * fix: updated wspace json files * fix: removed padding code from wspace json files * fix: Updated restrict_to_domain in wspace json Co-authored-by: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com> --- .../workspace/accounting/accounting.json | 126 +++++++++++++++++- .../workspace/agriculture/agriculture.json | 32 ++++- erpnext/assets/workspace/assets/assets.json | 33 ++++- erpnext/buying/workspace/buying/buying.json | 65 ++++++++- erpnext/crm/workspace/crm/crm.json | 54 +++++++- .../workspace/education/education.json | 82 +++++++++++- .../erpnext_integrations.json | 45 ++++++- .../erpnext_integrations_settings.json | 39 +++++- .../workspace/healthcare/healthcare.json | 66 ++++++++- erpnext/hr/workspace/hr/hr.json | 104 ++++++++++++++- .../loan_management/loan_management.json | 40 +++++- .../manufacturing/manufacturing.json | 44 +++++- .../workspace/non_profit/non_profit.json | 39 +++++- .../payroll/workspace/payroll/payroll.json | 46 ++++++- .../projects/workspace/projects/projects.json | 35 ++++- .../workspace/quality/quality.json | 32 ++++- erpnext/selling/workspace/retail/retail.json | 27 +++- .../selling/workspace/selling/selling.json | 71 +++++++++- .../erpnext_settings/erpnext_settings.json | 25 ++-- erpnext/setup/workspace/home/home.json | 45 ++++++- erpnext/stock/workspace/stock/stock.json | 87 +++++++++++- .../support/workspace/support/support.json | 35 ++++- .../workspace/utilities/utilities.json | 24 +++- 23 files changed, 1092 insertions(+), 104 deletions(-) diff --git a/erpnext/accounts/workspace/accounting/accounting.json b/erpnext/accounts/workspace/accounting/accounting.json index 821fa4d2af4..b5bd14d1370 100644 --- a/erpnext/accounts/workspace/accounting/accounting.json +++ b/erpnext/accounts/workspace/accounting/accounting.json @@ -1,28 +1,32 @@ { - "category": "Modules", + "category": "", "charts": [ { "chart_name": "Profit and Loss", "label": "Profit and Loss" } ], + "content": "[{\"type\": \"onboarding\", \"data\": {\"onboarding_name\":\"Accounts\", \"col\": 12}}, {\"type\": \"chart\", \"data\": {\"chart_name\": \"Profit and Loss\", \"col\": 12}}, {\"type\": \"spacer\", \"data\": {\"col\": 12}}, {\"type\": \"header\", \"data\": {\"text\": \"Your Shortcuts\", \"level\": 4, \"col\": 12}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Chart of Accounts\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Sales Invoice\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Purchase Invoice\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Journal Entry\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Payment Entry\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Accounts Receivable\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"General Ledger\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Trial Balance\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Dashboard\", \"col\": 4}}, {\"type\": \"spacer\", \"data\": {\"col\": 12}}, {\"type\": \"header\", \"data\": {\"text\": \"Reports & Masters\", \"level\": 4, \"col\": 12}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Accounting Masters\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"General Ledger\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Accounts Receivable\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Accounts Payable\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Reports\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Financial Statements\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Multi Currency\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Settings\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Bank Statement\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Subscription Management\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Goods and Services Tax (GST India)\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Share Management\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Cost Center and Budgeting\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Opening and Closing\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Taxes\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Profitability\", \"col\": 4}}]", "creation": "2020-03-02 15:41:59.515192", "developer_mode_only": 0, "disable_user_customization": 0, "docstatus": 0, "doctype": "Workspace", + "extends": "", "extends_another_page": 0, + "for_user": "", "hide_custom": 0, "icon": "accounting", "idx": 0, "is_default": 0, - "is_standard": 1, + "is_standard": 0, "label": "Accounting", "links": [ { "hidden": 0, "is_query_report": 0, "label": "Accounting Masters", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -31,6 +35,7 @@ "hidden": 0, "is_query_report": 0, "label": "Company", + "link_count": 0, "link_to": "Company", "link_type": "DocType", "onboard": 1, @@ -41,6 +46,7 @@ "hidden": 0, "is_query_report": 0, "label": "Chart of Accounts", + "link_count": 0, "link_to": "Account", "link_type": "DocType", "onboard": 1, @@ -51,6 +57,7 @@ "hidden": 0, "is_query_report": 0, "label": "Accounts Settings", + "link_count": 0, "link_to": "Accounts Settings", "link_type": "DocType", "onboard": 0, @@ -61,6 +68,7 @@ "hidden": 0, "is_query_report": 0, "label": "Fiscal Year", + "link_count": 0, "link_to": "Fiscal Year", "link_type": "DocType", "onboard": 0, @@ -71,6 +79,7 @@ "hidden": 0, "is_query_report": 0, "label": "Accounting Dimension", + "link_count": 0, "link_to": "Accounting Dimension", "link_type": "DocType", "onboard": 0, @@ -81,6 +90,7 @@ "hidden": 0, "is_query_report": 0, "label": "Finance Book", + "link_count": 0, "link_to": "Finance Book", "link_type": "DocType", "onboard": 0, @@ -91,6 +101,7 @@ "hidden": 0, "is_query_report": 0, "label": "Accounting Period", + "link_count": 0, "link_to": "Accounting Period", "link_type": "DocType", "onboard": 0, @@ -101,6 +112,7 @@ "hidden": 0, "is_query_report": 0, "label": "Payment Term", + "link_count": 0, "link_to": "Payment Term", "link_type": "DocType", "onboard": 0, @@ -110,6 +122,7 @@ "hidden": 0, "is_query_report": 0, "label": "General Ledger", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -118,6 +131,7 @@ "hidden": 0, "is_query_report": 0, "label": "Journal Entry", + "link_count": 0, "link_to": "Journal Entry", "link_type": "DocType", "onboard": 0, @@ -128,6 +142,7 @@ "hidden": 0, "is_query_report": 0, "label": "Journal Entry Template", + "link_count": 0, "link_to": "Journal Entry Template", "link_type": "DocType", "onboard": 0, @@ -138,6 +153,7 @@ "hidden": 0, "is_query_report": 1, "label": "General Ledger", + "link_count": 0, "link_to": "General Ledger", "link_type": "Report", "onboard": 0, @@ -148,6 +164,7 @@ "hidden": 0, "is_query_report": 1, "label": "Customer Ledger Summary", + "link_count": 0, "link_to": "Customer Ledger Summary", "link_type": "Report", "onboard": 0, @@ -158,6 +175,7 @@ "hidden": 0, "is_query_report": 1, "label": "Supplier Ledger Summary", + "link_count": 0, "link_to": "Supplier Ledger Summary", "link_type": "Report", "onboard": 0, @@ -167,6 +185,7 @@ "hidden": 0, "is_query_report": 0, "label": "Accounts Receivable", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -175,6 +194,7 @@ "hidden": 0, "is_query_report": 0, "label": "Sales Invoice", + "link_count": 0, "link_to": "Sales Invoice", "link_type": "DocType", "onboard": 1, @@ -185,6 +205,7 @@ "hidden": 0, "is_query_report": 0, "label": "Customer", + "link_count": 0, "link_to": "Customer", "link_type": "DocType", "onboard": 1, @@ -195,6 +216,7 @@ "hidden": 0, "is_query_report": 0, "label": "Payment Entry", + "link_count": 0, "link_to": "Payment Entry", "link_type": "DocType", "onboard": 0, @@ -205,6 +227,7 @@ "hidden": 0, "is_query_report": 0, "label": "Payment Request", + "link_count": 0, "link_to": "Payment Request", "link_type": "DocType", "onboard": 0, @@ -215,6 +238,7 @@ "hidden": 0, "is_query_report": 1, "label": "Accounts Receivable", + "link_count": 0, "link_to": "Accounts Receivable", "link_type": "Report", "onboard": 0, @@ -225,6 +249,7 @@ "hidden": 0, "is_query_report": 1, "label": "Accounts Receivable Summary", + "link_count": 0, "link_to": "Accounts Receivable Summary", "link_type": "Report", "onboard": 0, @@ -235,6 +260,7 @@ "hidden": 0, "is_query_report": 1, "label": "Sales Register", + "link_count": 0, "link_to": "Sales Register", "link_type": "Report", "onboard": 0, @@ -245,6 +271,7 @@ "hidden": 0, "is_query_report": 1, "label": "Item-wise Sales Register", + "link_count": 0, "link_to": "Item-wise Sales Register", "link_type": "Report", "onboard": 0, @@ -255,6 +282,7 @@ "hidden": 0, "is_query_report": 1, "label": "Sales Order Analysis", + "link_count": 0, "link_to": "Sales Order Analysis", "link_type": "Report", "onboard": 0, @@ -265,6 +293,7 @@ "hidden": 0, "is_query_report": 1, "label": "Delivered Items To Be Billed", + "link_count": 0, "link_to": "Delivered Items To Be Billed", "link_type": "Report", "onboard": 0, @@ -274,6 +303,7 @@ "hidden": 0, "is_query_report": 0, "label": "Accounts Payable", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -282,6 +312,7 @@ "hidden": 0, "is_query_report": 0, "label": "Purchase Invoice", + "link_count": 0, "link_to": "Purchase Invoice", "link_type": "DocType", "onboard": 1, @@ -292,6 +323,7 @@ "hidden": 0, "is_query_report": 0, "label": "Supplier", + "link_count": 0, "link_to": "Supplier", "link_type": "DocType", "onboard": 1, @@ -302,6 +334,7 @@ "hidden": 0, "is_query_report": 0, "label": "Payment Entry", + "link_count": 0, "link_to": "Payment Entry", "link_type": "DocType", "onboard": 0, @@ -312,6 +345,7 @@ "hidden": 0, "is_query_report": 1, "label": "Accounts Payable", + "link_count": 0, "link_to": "Accounts Payable", "link_type": "Report", "onboard": 0, @@ -322,6 +356,7 @@ "hidden": 0, "is_query_report": 1, "label": "Accounts Payable Summary", + "link_count": 0, "link_to": "Accounts Payable Summary", "link_type": "Report", "onboard": 0, @@ -332,6 +367,7 @@ "hidden": 0, "is_query_report": 1, "label": "Purchase Register", + "link_count": 0, "link_to": "Purchase Register", "link_type": "Report", "onboard": 0, @@ -342,6 +378,7 @@ "hidden": 0, "is_query_report": 1, "label": "Item-wise Purchase Register", + "link_count": 0, "link_to": "Item-wise Purchase Register", "link_type": "Report", "onboard": 0, @@ -352,6 +389,7 @@ "hidden": 0, "is_query_report": 1, "label": "Purchase Order Analysis", + "link_count": 0, "link_to": "Purchase Order Analysis", "link_type": "Report", "onboard": 0, @@ -362,6 +400,7 @@ "hidden": 0, "is_query_report": 1, "label": "Received Items To Be Billed", + "link_count": 0, "link_to": "Received Items To Be Billed", "link_type": "Report", "onboard": 0, @@ -371,6 +410,7 @@ "hidden": 0, "is_query_report": 0, "label": "Reports", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -379,6 +419,7 @@ "hidden": 0, "is_query_report": 1, "label": "Trial Balance for Party", + "link_count": 0, "link_to": "Trial Balance for Party", "link_type": "Report", "onboard": 0, @@ -389,6 +430,7 @@ "hidden": 0, "is_query_report": 1, "label": "Payment Period Based On Invoice Date", + "link_count": 0, "link_to": "Payment Period Based On Invoice Date", "link_type": "Report", "onboard": 0, @@ -399,6 +441,7 @@ "hidden": 0, "is_query_report": 1, "label": "Sales Partners Commission", + "link_count": 0, "link_to": "Sales Partners Commission", "link_type": "Report", "onboard": 0, @@ -409,6 +452,7 @@ "hidden": 0, "is_query_report": 1, "label": "Customer Credit Balance", + "link_count": 0, "link_to": "Customer Credit Balance", "link_type": "Report", "onboard": 0, @@ -419,6 +463,7 @@ "hidden": 0, "is_query_report": 1, "label": "Sales Payment Summary", + "link_count": 0, "link_to": "Sales Payment Summary", "link_type": "Report", "onboard": 0, @@ -429,6 +474,7 @@ "hidden": 0, "is_query_report": 1, "label": "Address And Contacts", + "link_count": 0, "link_to": "Address And Contacts", "link_type": "Report", "onboard": 0, @@ -439,6 +485,7 @@ "hidden": 0, "is_query_report": 1, "label": "Tax Detail", + "link_count": 0, "link_to": "Tax Detail", "link_type": "Report", "onboard": 0, @@ -449,6 +496,7 @@ "hidden": 0, "is_query_report": 1, "label": "DATEV Export", + "link_count": 0, "link_to": "DATEV", "link_type": "Report", "onboard": 0, @@ -460,6 +508,7 @@ "hidden": 0, "is_query_report": 1, "label": "UAE VAT 201", + "link_count": 0, "link_to": "UAE VAT 201", "link_type": "Report", "onboard": 0, @@ -470,6 +519,7 @@ "hidden": 0, "is_query_report": 0, "label": "Financial Statements", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -478,6 +528,7 @@ "hidden": 0, "is_query_report": 1, "label": "Trial Balance", + "link_count": 0, "link_to": "Trial Balance", "link_type": "Report", "onboard": 0, @@ -488,6 +539,7 @@ "hidden": 0, "is_query_report": 1, "label": "Profit and Loss Statement", + "link_count": 0, "link_to": "Profit and Loss Statement", "link_type": "Report", "onboard": 0, @@ -498,6 +550,7 @@ "hidden": 0, "is_query_report": 1, "label": "Balance Sheet", + "link_count": 0, "link_to": "Balance Sheet", "link_type": "Report", "onboard": 0, @@ -508,6 +561,7 @@ "hidden": 0, "is_query_report": 1, "label": "Cash Flow", + "link_count": 0, "link_to": "Cash Flow", "link_type": "Report", "onboard": 0, @@ -518,6 +572,7 @@ "hidden": 0, "is_query_report": 1, "label": "Consolidated Financial Statement", + "link_count": 0, "link_to": "Consolidated Financial Statement", "link_type": "Report", "onboard": 0, @@ -527,6 +582,7 @@ "hidden": 0, "is_query_report": 0, "label": "Multi Currency", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -535,6 +591,7 @@ "hidden": 0, "is_query_report": 0, "label": "Currency", + "link_count": 0, "link_to": "Currency", "link_type": "DocType", "onboard": 0, @@ -545,6 +602,7 @@ "hidden": 0, "is_query_report": 0, "label": "Currency Exchange", + "link_count": 0, "link_to": "Currency Exchange", "link_type": "DocType", "onboard": 0, @@ -555,6 +613,7 @@ "hidden": 0, "is_query_report": 0, "label": "Exchange Rate Revaluation", + "link_count": 0, "link_to": "Exchange Rate Revaluation", "link_type": "DocType", "onboard": 0, @@ -564,6 +623,7 @@ "hidden": 0, "is_query_report": 0, "label": "Settings", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -572,6 +632,7 @@ "hidden": 0, "is_query_report": 0, "label": "Payment Gateway Account", + "link_count": 0, "link_to": "Payment Gateway Account", "link_type": "DocType", "onboard": 0, @@ -582,6 +643,7 @@ "hidden": 0, "is_query_report": 0, "label": "Terms and Conditions Template", + "link_count": 0, "link_to": "Terms and Conditions", "link_type": "DocType", "onboard": 0, @@ -592,6 +654,7 @@ "hidden": 0, "is_query_report": 0, "label": "Mode of Payment", + "link_count": 0, "link_to": "Mode of Payment", "link_type": "DocType", "onboard": 0, @@ -601,6 +664,7 @@ "hidden": 0, "is_query_report": 0, "label": "Bank Statement", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -609,6 +673,7 @@ "hidden": 0, "is_query_report": 0, "label": "Bank", + "link_count": 0, "link_to": "Bank", "link_type": "DocType", "onboard": 0, @@ -619,6 +684,7 @@ "hidden": 0, "is_query_report": 0, "label": "Bank Account", + "link_count": 0, "link_to": "Bank Account", "link_type": "DocType", "onboard": 0, @@ -629,6 +695,7 @@ "hidden": 0, "is_query_report": 0, "label": "Bank Clearance", + "link_count": 0, "link_to": "Bank Clearance", "link_type": "DocType", "onboard": 0, @@ -639,6 +706,7 @@ "hidden": 0, "is_query_report": 0, "label": "Bank Reconciliation Tool", + "link_count": 0, "link_to": "Bank Reconciliation Tool", "link_type": "DocType", "onboard": 0, @@ -649,6 +717,7 @@ "hidden": 0, "is_query_report": 1, "label": "Bank Reconciliation Statement", + "link_count": 0, "link_to": "Bank Reconciliation Statement", "link_type": "Report", "onboard": 0, @@ -658,6 +727,7 @@ "hidden": 0, "is_query_report": 0, "label": "Subscription Management", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -666,6 +736,7 @@ "hidden": 0, "is_query_report": 0, "label": "Subscription Plan", + "link_count": 0, "link_to": "Subscription Plan", "link_type": "DocType", "onboard": 0, @@ -676,6 +747,7 @@ "hidden": 0, "is_query_report": 0, "label": "Subscription", + "link_count": 0, "link_to": "Subscription", "link_type": "DocType", "onboard": 0, @@ -686,6 +758,7 @@ "hidden": 0, "is_query_report": 0, "label": "Subscription Settings", + "link_count": 0, "link_to": "Subscription Settings", "link_type": "DocType", "onboard": 0, @@ -695,6 +768,7 @@ "hidden": 0, "is_query_report": 0, "label": "Goods and Services Tax (GST India)", + "link_count": 0, "onboard": 0, "only_for": "India", "type": "Card Break" @@ -704,6 +778,7 @@ "hidden": 0, "is_query_report": 0, "label": "GST Settings", + "link_count": 0, "link_to": "GST Settings", "link_type": "DocType", "onboard": 0, @@ -715,6 +790,7 @@ "hidden": 0, "is_query_report": 0, "label": "GST HSN Code", + "link_count": 0, "link_to": "GST HSN Code", "link_type": "DocType", "onboard": 0, @@ -726,6 +802,7 @@ "hidden": 0, "is_query_report": 1, "label": "GSTR-1", + "link_count": 0, "link_to": "GSTR-1", "link_type": "Report", "onboard": 0, @@ -737,6 +814,7 @@ "hidden": 0, "is_query_report": 1, "label": "GSTR-2", + "link_count": 0, "link_to": "GSTR-2", "link_type": "Report", "onboard": 0, @@ -748,6 +826,7 @@ "hidden": 0, "is_query_report": 0, "label": "GSTR 3B Report", + "link_count": 0, "link_to": "GSTR 3B Report", "link_type": "DocType", "onboard": 0, @@ -759,6 +838,7 @@ "hidden": 0, "is_query_report": 1, "label": "GST Sales Register", + "link_count": 0, "link_to": "GST Sales Register", "link_type": "Report", "onboard": 0, @@ -770,6 +850,7 @@ "hidden": 0, "is_query_report": 1, "label": "GST Purchase Register", + "link_count": 0, "link_to": "GST Purchase Register", "link_type": "Report", "onboard": 0, @@ -781,6 +862,7 @@ "hidden": 0, "is_query_report": 1, "label": "GST Itemised Sales Register", + "link_count": 0, "link_to": "GST Itemised Sales Register", "link_type": "Report", "onboard": 0, @@ -792,6 +874,7 @@ "hidden": 0, "is_query_report": 1, "label": "GST Itemised Purchase Register", + "link_count": 0, "link_to": "GST Itemised Purchase Register", "link_type": "Report", "onboard": 0, @@ -803,6 +886,7 @@ "hidden": 0, "is_query_report": 0, "label": "C-Form", + "link_count": 0, "link_to": "C-Form", "link_type": "DocType", "onboard": 0, @@ -814,6 +898,7 @@ "hidden": 0, "is_query_report": 0, "label": "Lower Deduction Certificate", + "link_count": 0, "link_to": "Lower Deduction Certificate", "link_type": "DocType", "onboard": 0, @@ -824,6 +909,7 @@ "hidden": 0, "is_query_report": 0, "label": "Share Management", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -832,6 +918,7 @@ "hidden": 0, "is_query_report": 0, "label": "Shareholder", + "link_count": 0, "link_to": "Shareholder", "link_type": "DocType", "onboard": 0, @@ -842,6 +929,7 @@ "hidden": 0, "is_query_report": 0, "label": "Share Transfer", + "link_count": 0, "link_to": "Share Transfer", "link_type": "DocType", "onboard": 0, @@ -852,6 +940,7 @@ "hidden": 0, "is_query_report": 1, "label": "Share Ledger", + "link_count": 0, "link_to": "Share Ledger", "link_type": "Report", "onboard": 0, @@ -862,6 +951,7 @@ "hidden": 0, "is_query_report": 1, "label": "Share Balance", + "link_count": 0, "link_to": "Share Balance", "link_type": "Report", "onboard": 0, @@ -871,6 +961,7 @@ "hidden": 0, "is_query_report": 0, "label": "Cost Center and Budgeting", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -879,6 +970,7 @@ "hidden": 0, "is_query_report": 0, "label": "Chart of Cost Centers", + "link_count": 0, "link_to": "Cost Center", "link_type": "DocType", "onboard": 0, @@ -889,6 +981,7 @@ "hidden": 0, "is_query_report": 0, "label": "Budget", + "link_count": 0, "link_to": "Budget", "link_type": "DocType", "onboard": 0, @@ -899,6 +992,7 @@ "hidden": 0, "is_query_report": 0, "label": "Accounting Dimension", + "link_count": 0, "link_to": "Accounting Dimension", "link_type": "DocType", "onboard": 0, @@ -909,6 +1003,7 @@ "hidden": 0, "is_query_report": 1, "label": "Budget Variance Report", + "link_count": 0, "link_to": "Budget Variance Report", "link_type": "Report", "onboard": 0, @@ -919,6 +1014,7 @@ "hidden": 0, "is_query_report": 0, "label": "Monthly Distribution", + "link_count": 0, "link_to": "Monthly Distribution", "link_type": "DocType", "onboard": 0, @@ -928,6 +1024,7 @@ "hidden": 0, "is_query_report": 0, "label": "Opening and Closing", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -936,6 +1033,7 @@ "hidden": 0, "is_query_report": 0, "label": "Opening Invoice Creation Tool", + "link_count": 0, "link_to": "Opening Invoice Creation Tool", "link_type": "DocType", "onboard": 0, @@ -946,6 +1044,7 @@ "hidden": 0, "is_query_report": 0, "label": "Chart of Accounts Importer", + "link_count": 0, "link_to": "Chart of Accounts Importer", "link_type": "DocType", "onboard": 0, @@ -956,6 +1055,7 @@ "hidden": 0, "is_query_report": 0, "label": "Period Closing Voucher", + "link_count": 0, "link_to": "Period Closing Voucher", "link_type": "DocType", "onboard": 0, @@ -965,6 +1065,7 @@ "hidden": 0, "is_query_report": 0, "label": "Taxes", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -973,6 +1074,7 @@ "hidden": 0, "is_query_report": 0, "label": "Sales Taxes and Charges Template", + "link_count": 0, "link_to": "Sales Taxes and Charges Template", "link_type": "DocType", "onboard": 0, @@ -983,6 +1085,7 @@ "hidden": 0, "is_query_report": 0, "label": "Purchase Taxes and Charges Template", + "link_count": 0, "link_to": "Purchase Taxes and Charges Template", "link_type": "DocType", "onboard": 0, @@ -993,6 +1096,7 @@ "hidden": 0, "is_query_report": 0, "label": "Item Tax Template", + "link_count": 0, "link_to": "Item Tax Template", "link_type": "DocType", "onboard": 0, @@ -1003,6 +1107,7 @@ "hidden": 0, "is_query_report": 0, "label": "Tax Category", + "link_count": 0, "link_to": "Tax Category", "link_type": "DocType", "onboard": 0, @@ -1013,6 +1118,7 @@ "hidden": 0, "is_query_report": 0, "label": "Tax Rule", + "link_count": 0, "link_to": "Tax Rule", "link_type": "DocType", "onboard": 0, @@ -1023,6 +1129,7 @@ "hidden": 0, "is_query_report": 0, "label": "Tax Withholding Category", + "link_count": 0, "link_to": "Tax Withholding Category", "link_type": "DocType", "onboard": 0, @@ -1032,6 +1139,7 @@ "hidden": 0, "is_query_report": 0, "label": "Profitability", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -1040,6 +1148,7 @@ "hidden": 0, "is_query_report": 1, "label": "Gross Profit", + "link_count": 0, "link_to": "Gross Profit", "link_type": "Report", "onboard": 0, @@ -1050,6 +1159,7 @@ "hidden": 0, "is_query_report": 1, "label": "Profitability Analysis", + "link_count": 0, "link_to": "Profitability Analysis", "link_type": "Report", "onboard": 0, @@ -1060,6 +1170,7 @@ "hidden": 0, "is_query_report": 1, "label": "Sales Invoice Trends", + "link_count": 0, "link_to": "Sales Invoice Trends", "link_type": "Report", "onboard": 0, @@ -1070,20 +1181,26 @@ "hidden": 0, "is_query_report": 1, "label": "Purchase Invoice Trends", + "link_count": 0, "link_to": "Purchase Invoice Trends", "link_type": "Report", "onboard": 0, "type": "Link" } ], - "modified": "2021-06-10 03:17:31.427945", + "modified": "2021-08-05 12:15:52.872470", "modified_by": "Administrator", "module": "Accounts", "name": "Accounting", "onboarding": "Accounts", "owner": "Administrator", + "parent_page": "", "pin_to_bottom": 0, "pin_to_top": 0, + "public": 1, + "restrict_to_domain": "", + "roles": [], + "sequence_id": 2, "shortcuts": [ { "label": "Chart of Accounts", @@ -1130,5 +1247,6 @@ "link_to": "Accounts", "type": "Dashboard" } - ] + ], + "title": "Accounting" } \ No newline at end of file diff --git a/erpnext/agriculture/workspace/agriculture/agriculture.json b/erpnext/agriculture/workspace/agriculture/agriculture.json index 2cc252491d3..633777eeb70 100644 --- a/erpnext/agriculture/workspace/agriculture/agriculture.json +++ b/erpnext/agriculture/workspace/agriculture/agriculture.json @@ -1,22 +1,27 @@ { - "category": "Domains", + "category": "", "charts": [], + "content": "[{\"type\": \"header\", \"data\": {\"text\": \"Reports & Masters\", \"level\": 4, \"col\": 12}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Crops & Lands\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Analytics\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Diseases & Fertilizers\", \"col\": 4}}]", "creation": "2020-03-02 17:23:34.339274", "developer_mode_only": 0, "disable_user_customization": 0, "docstatus": 0, "doctype": "Workspace", + "extends": "", "extends_another_page": 0, + "for_user": "", "hide_custom": 0, "icon": "agriculture", "idx": 0, - "is_standard": 1, + "is_default": 0, + "is_standard": 0, "label": "Agriculture", "links": [ { "hidden": 0, "is_query_report": 0, "label": "Crops & Lands", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -25,6 +30,7 @@ "hidden": 0, "is_query_report": 0, "label": "Crop", + "link_count": 0, "link_to": "Crop", "link_type": "DocType", "onboard": 1, @@ -35,6 +41,7 @@ "hidden": 0, "is_query_report": 0, "label": "Crop Cycle", + "link_count": 0, "link_to": "Crop Cycle", "link_type": "DocType", "onboard": 1, @@ -45,6 +52,7 @@ "hidden": 0, "is_query_report": 0, "label": "Location", + "link_count": 0, "link_to": "Location", "link_type": "DocType", "onboard": 1, @@ -54,6 +62,7 @@ "hidden": 0, "is_query_report": 0, "label": "Analytics", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -62,6 +71,7 @@ "hidden": 0, "is_query_report": 0, "label": "Plant Analysis", + "link_count": 0, "link_to": "Plant Analysis", "link_type": "DocType", "onboard": 0, @@ -72,6 +82,7 @@ "hidden": 0, "is_query_report": 0, "label": "Soil Analysis", + "link_count": 0, "link_to": "Soil Analysis", "link_type": "DocType", "onboard": 0, @@ -82,6 +93,7 @@ "hidden": 0, "is_query_report": 0, "label": "Water Analysis", + "link_count": 0, "link_to": "Water Analysis", "link_type": "DocType", "onboard": 0, @@ -92,6 +104,7 @@ "hidden": 0, "is_query_report": 0, "label": "Soil Texture", + "link_count": 0, "link_to": "Soil Texture", "link_type": "DocType", "onboard": 0, @@ -102,6 +115,7 @@ "hidden": 0, "is_query_report": 0, "label": "Weather", + "link_count": 0, "link_to": "Weather", "link_type": "DocType", "onboard": 0, @@ -112,6 +126,7 @@ "hidden": 0, "is_query_report": 0, "label": "Agriculture Analysis Criteria", + "link_count": 0, "link_to": "Agriculture Analysis Criteria", "link_type": "DocType", "onboard": 0, @@ -121,6 +136,7 @@ "hidden": 0, "is_query_report": 0, "label": "Diseases & Fertilizers", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -129,6 +145,7 @@ "hidden": 0, "is_query_report": 0, "label": "Disease", + "link_count": 0, "link_to": "Disease", "link_type": "DocType", "onboard": 1, @@ -139,19 +156,26 @@ "hidden": 0, "is_query_report": 0, "label": "Fertilizer", + "link_count": 0, "link_to": "Fertilizer", "link_type": "DocType", "onboard": 1, "type": "Link" } ], - "modified": "2020-12-01 13:38:38.477493", + "modified": "2021-08-05 12:15:54.595197", "modified_by": "Administrator", "module": "Agriculture", "name": "Agriculture", + "onboarding": "", "owner": "Administrator", + "parent_page": "", "pin_to_bottom": 0, "pin_to_top": 0, + "public": 1, "restrict_to_domain": "Agriculture", - "shortcuts": [] + "roles": [], + "sequence_id": 3, + "shortcuts": [], + "title": "Agriculture" } \ No newline at end of file diff --git a/erpnext/assets/workspace/assets/assets.json b/erpnext/assets/workspace/assets/assets.json index c4015817583..dfbf1a378e5 100644 --- a/erpnext/assets/workspace/assets/assets.json +++ b/erpnext/assets/workspace/assets/assets.json @@ -1,27 +1,32 @@ { - "category": "Modules", + "category": "", "charts": [ { "chart_name": "Asset Value Analytics", "label": "Asset Value Analytics" } ], + "content": "[{\"type\": \"onboarding\", \"data\": {\"onboarding_name\":\"Assets\", \"col\": 12}}, {\"type\": \"chart\", \"data\": {\"chart_name\": \"Asset Value Analytics\", \"col\": 12}}, {\"type\": \"spacer\", \"data\": {\"col\": 12}}, {\"type\": \"header\", \"data\": {\"text\": \"Your Shortcuts\", \"level\": 4, \"col\": 12}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Asset\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Asset Category\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Fixed Asset Register\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Dashboard\", \"col\": 4}}, {\"type\": \"spacer\", \"data\": {\"col\": 12}}, {\"type\": \"header\", \"data\": {\"text\": \"Reports & Masters\", \"level\": 4, \"col\": 12}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Assets\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Maintenance\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Reports\", \"col\": 4}}]", "creation": "2020-03-02 15:43:27.634865", "developer_mode_only": 0, "disable_user_customization": 0, "docstatus": 0, "doctype": "Workspace", + "extends": "", "extends_another_page": 0, + "for_user": "", "hide_custom": 0, "icon": "assets", "idx": 0, - "is_standard": 1, + "is_default": 0, + "is_standard": 0, "label": "Assets", "links": [ { "hidden": 0, "is_query_report": 0, "label": "Assets", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -30,6 +35,7 @@ "hidden": 0, "is_query_report": 0, "label": "Asset", + "link_count": 0, "link_to": "Asset", "link_type": "DocType", "onboard": 1, @@ -40,6 +46,7 @@ "hidden": 0, "is_query_report": 0, "label": "Location", + "link_count": 0, "link_to": "Location", "link_type": "DocType", "onboard": 1, @@ -50,6 +57,7 @@ "hidden": 0, "is_query_report": 0, "label": "Asset Category", + "link_count": 0, "link_to": "Asset Category", "link_type": "DocType", "onboard": 1, @@ -60,6 +68,7 @@ "hidden": 0, "is_query_report": 0, "label": "Asset Movement", + "link_count": 0, "link_to": "Asset Movement", "link_type": "DocType", "onboard": 0, @@ -69,6 +78,7 @@ "hidden": 0, "is_query_report": 0, "label": "Maintenance", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -77,6 +87,7 @@ "hidden": 0, "is_query_report": 0, "label": "Asset Maintenance Team", + "link_count": 0, "link_to": "Asset Maintenance Team", "link_type": "DocType", "onboard": 1, @@ -87,6 +98,7 @@ "hidden": 0, "is_query_report": 0, "label": "Asset Maintenance", + "link_count": 0, "link_to": "Asset Maintenance", "link_type": "DocType", "onboard": 1, @@ -97,6 +109,7 @@ "hidden": 0, "is_query_report": 0, "label": "Asset Maintenance Log", + "link_count": 0, "link_to": "Asset Maintenance Log", "link_type": "DocType", "onboard": 0, @@ -107,6 +120,7 @@ "hidden": 0, "is_query_report": 0, "label": "Asset Value Adjustment", + "link_count": 0, "link_to": "Asset Value Adjustment", "link_type": "DocType", "onboard": 0, @@ -117,6 +131,7 @@ "hidden": 0, "is_query_report": 0, "label": "Asset Repair", + "link_count": 0, "link_to": "Asset Repair", "link_type": "DocType", "onboard": 0, @@ -126,6 +141,7 @@ "hidden": 0, "is_query_report": 0, "label": "Reports", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -134,6 +150,7 @@ "hidden": 0, "is_query_report": 1, "label": "Asset Depreciation Ledger", + "link_count": 0, "link_to": "Asset Depreciation Ledger", "link_type": "Report", "onboard": 0, @@ -144,6 +161,7 @@ "hidden": 0, "is_query_report": 1, "label": "Asset Depreciations and Balances", + "link_count": 0, "link_to": "Asset Depreciations and Balances", "link_type": "Report", "onboard": 0, @@ -154,20 +172,26 @@ "hidden": 0, "is_query_report": 0, "label": "Asset Maintenance", + "link_count": 0, "link_to": "Asset Maintenance", "link_type": "Report", "onboard": 0, "type": "Link" } ], - "modified": "2020-12-01 13:38:37.977119", + "modified": "2021-08-05 12:15:54.839452", "modified_by": "Administrator", "module": "Assets", "name": "Assets", "onboarding": "Assets", "owner": "Administrator", + "parent_page": "", "pin_to_bottom": 0, "pin_to_top": 0, + "public": 1, + "restrict_to_domain": "", + "roles": [], + "sequence_id": 4, "shortcuts": [ { "label": "Asset", @@ -189,5 +213,6 @@ "link_to": "Asset", "type": "Dashboard" } - ] + ], + "title": "Assets" } \ No newline at end of file diff --git a/erpnext/buying/workspace/buying/buying.json b/erpnext/buying/workspace/buying/buying.json index 6c9c0f3011b..6c91e816954 100644 --- a/erpnext/buying/workspace/buying/buying.json +++ b/erpnext/buying/workspace/buying/buying.json @@ -1,6 +1,6 @@ { "cards_label": "", - "category": "Modules", + "category": "", "charts": [ { "chart_name": "Purchase Order Trends", @@ -8,22 +8,27 @@ } ], "charts_label": "", + "content": "[{\"type\": \"onboarding\", \"data\": {\"onboarding_name\":\"Buying\", \"col\": 12}}, {\"type\": \"chart\", \"data\": {\"chart_name\": \"Purchase Order Trends\", \"col\": 12}}, {\"type\": \"spacer\", \"data\": {\"col\": 12}}, {\"type\": \"header\", \"data\": {\"text\": \"Your Shortcuts\", \"level\": 4, \"col\": 12}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Item\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Material Request\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Purchase Order\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Purchase Analytics\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Purchase Order Analysis\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Dashboard\", \"col\": 4}}, {\"type\": \"spacer\", \"data\": {\"col\": 12}}, {\"type\": \"header\", \"data\": {\"text\": \"Reports & Masters\", \"level\": 4, \"col\": 12}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Buying\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Items & Pricing\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Settings\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Supplier\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Supplier Scorecard\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Key Reports\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Other Reports\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Regional\", \"col\": 4}}]", "creation": "2020-01-28 11:50:26.195467", "developer_mode_only": 0, "disable_user_customization": 0, "docstatus": 0, "doctype": "Workspace", + "extends": "", "extends_another_page": 0, + "for_user": "", "hide_custom": 0, "icon": "buying", "idx": 0, - "is_standard": 1, + "is_default": 0, + "is_standard": 0, "label": "Buying", "links": [ { "hidden": 0, "is_query_report": 0, "label": "Buying", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -32,6 +37,7 @@ "hidden": 0, "is_query_report": 0, "label": "Material Request", + "link_count": 0, "link_to": "Material Request", "link_type": "DocType", "onboard": 1, @@ -42,6 +48,7 @@ "hidden": 0, "is_query_report": 0, "label": "Purchase Order", + "link_count": 0, "link_to": "Purchase Order", "link_type": "DocType", "onboard": 1, @@ -52,6 +59,7 @@ "hidden": 0, "is_query_report": 0, "label": "Purchase Invoice", + "link_count": 0, "link_to": "Purchase Invoice", "link_type": "DocType", "onboard": 1, @@ -62,6 +70,7 @@ "hidden": 0, "is_query_report": 0, "label": "Request for Quotation", + "link_count": 0, "link_to": "Request for Quotation", "link_type": "DocType", "onboard": 1, @@ -72,6 +81,7 @@ "hidden": 0, "is_query_report": 0, "label": "Supplier Quotation", + "link_count": 0, "link_to": "Supplier Quotation", "link_type": "DocType", "onboard": 0, @@ -81,6 +91,7 @@ "hidden": 0, "is_query_report": 0, "label": "Items & Pricing", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -89,6 +100,7 @@ "hidden": 0, "is_query_report": 0, "label": "Item", + "link_count": 0, "link_to": "Item", "link_type": "DocType", "onboard": 1, @@ -99,6 +111,7 @@ "hidden": 0, "is_query_report": 0, "label": "Item Price", + "link_count": 0, "link_to": "Item Price", "link_type": "DocType", "onboard": 1, @@ -109,6 +122,7 @@ "hidden": 0, "is_query_report": 0, "label": "Price List", + "link_count": 0, "link_to": "Price List", "link_type": "DocType", "onboard": 1, @@ -119,6 +133,7 @@ "hidden": 0, "is_query_report": 0, "label": "Product Bundle", + "link_count": 0, "link_to": "Product Bundle", "link_type": "DocType", "onboard": 0, @@ -129,6 +144,7 @@ "hidden": 0, "is_query_report": 0, "label": "Item Group", + "link_count": 0, "link_to": "Item Group", "link_type": "DocType", "onboard": 0, @@ -139,6 +155,7 @@ "hidden": 0, "is_query_report": 0, "label": "Promotional Scheme", + "link_count": 0, "link_to": "Promotional Scheme", "link_type": "DocType", "onboard": 0, @@ -149,6 +166,7 @@ "hidden": 0, "is_query_report": 0, "label": "Pricing Rule", + "link_count": 0, "link_to": "Pricing Rule", "link_type": "DocType", "onboard": 0, @@ -158,6 +176,7 @@ "hidden": 0, "is_query_report": 0, "label": "Settings", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -166,6 +185,7 @@ "hidden": 0, "is_query_report": 0, "label": "Buying Settings", + "link_count": 0, "link_to": "Buying Settings", "link_type": "DocType", "onboard": 0, @@ -176,6 +196,7 @@ "hidden": 0, "is_query_report": 0, "label": "Purchase Taxes and Charges Template", + "link_count": 0, "link_to": "Purchase Taxes and Charges Template", "link_type": "DocType", "onboard": 0, @@ -186,6 +207,7 @@ "hidden": 0, "is_query_report": 0, "label": "Terms and Conditions Template", + "link_count": 0, "link_to": "Terms and Conditions", "link_type": "DocType", "onboard": 0, @@ -195,6 +217,7 @@ "hidden": 0, "is_query_report": 0, "label": "Supplier", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -203,6 +226,7 @@ "hidden": 0, "is_query_report": 0, "label": "Supplier", + "link_count": 0, "link_to": "Supplier", "link_type": "DocType", "onboard": 1, @@ -213,6 +237,7 @@ "hidden": 0, "is_query_report": 0, "label": "Supplier Group", + "link_count": 0, "link_to": "Supplier Group", "link_type": "DocType", "onboard": 0, @@ -223,6 +248,7 @@ "hidden": 0, "is_query_report": 0, "label": "Contact", + "link_count": 0, "link_to": "Contact", "link_type": "DocType", "onboard": 0, @@ -233,6 +259,7 @@ "hidden": 0, "is_query_report": 0, "label": "Address", + "link_count": 0, "link_to": "Address", "link_type": "DocType", "onboard": 0, @@ -242,6 +269,7 @@ "hidden": 0, "is_query_report": 0, "label": "Supplier Scorecard", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -250,6 +278,7 @@ "hidden": 0, "is_query_report": 0, "label": "Supplier Scorecard", + "link_count": 0, "link_to": "Supplier Scorecard", "link_type": "DocType", "onboard": 0, @@ -260,6 +289,7 @@ "hidden": 0, "is_query_report": 0, "label": "Supplier Scorecard Variable", + "link_count": 0, "link_to": "Supplier Scorecard Variable", "link_type": "DocType", "onboard": 0, @@ -270,6 +300,7 @@ "hidden": 0, "is_query_report": 0, "label": "Supplier Scorecard Criteria", + "link_count": 0, "link_to": "Supplier Scorecard Criteria", "link_type": "DocType", "onboard": 0, @@ -280,6 +311,7 @@ "hidden": 0, "is_query_report": 0, "label": "Supplier Scorecard Standing", + "link_count": 0, "link_to": "Supplier Scorecard Standing", "link_type": "DocType", "onboard": 0, @@ -289,6 +321,7 @@ "hidden": 0, "is_query_report": 0, "label": "Key Reports", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -297,6 +330,7 @@ "hidden": 0, "is_query_report": 1, "label": "Purchase Analytics", + "link_count": 0, "link_to": "Purchase Analytics", "link_type": "Report", "onboard": 1, @@ -307,6 +341,7 @@ "hidden": 0, "is_query_report": 1, "label": "Purchase Order Analysis", + "link_count": 0, "link_to": "Purchase Order Analysis", "link_type": "Report", "onboard": 1, @@ -317,6 +352,7 @@ "hidden": 0, "is_query_report": 1, "label": "Supplier-Wise Sales Analytics", + "link_count": 0, "link_to": "Supplier-Wise Sales Analytics", "link_type": "Report", "onboard": 1, @@ -327,6 +363,7 @@ "hidden": 0, "is_query_report": 1, "label": "Items to Order and Receive", + "link_count": 0, "link_to": "Requested Items to Order and Receive", "link_type": "Report", "onboard": 1, @@ -337,6 +374,7 @@ "hidden": 0, "is_query_report": 1, "label": "Purchase Order Trends", + "link_count": 0, "link_to": "Purchase Order Trends", "link_type": "Report", "onboard": 1, @@ -347,6 +385,7 @@ "hidden": 0, "is_query_report": 1, "label": "Procurement Tracker", + "link_count": 0, "link_to": "Procurement Tracker", "link_type": "Report", "onboard": 1, @@ -356,6 +395,7 @@ "hidden": 0, "is_query_report": 0, "label": "Other Reports", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -364,6 +404,7 @@ "hidden": 0, "is_query_report": 1, "label": "Items To Be Requested", + "link_count": 0, "link_to": "Items To Be Requested", "link_type": "Report", "onboard": 1, @@ -374,6 +415,7 @@ "hidden": 0, "is_query_report": 1, "label": "Item-wise Purchase History", + "link_count": 0, "link_to": "Item-wise Purchase History", "link_type": "Report", "onboard": 1, @@ -384,6 +426,7 @@ "hidden": 0, "is_query_report": 1, "label": "Purchase Receipt Trends", + "link_count": 0, "link_to": "Purchase Receipt Trends", "link_type": "Report", "onboard": 0, @@ -394,6 +437,7 @@ "hidden": 0, "is_query_report": 1, "label": "Purchase Invoice Trends", + "link_count": 0, "link_to": "Purchase Invoice Trends", "link_type": "Report", "onboard": 0, @@ -404,6 +448,7 @@ "hidden": 0, "is_query_report": 1, "label": "Subcontracted Raw Materials To Be Transferred", + "link_count": 0, "link_to": "Subcontracted Raw Materials To Be Transferred", "link_type": "Report", "onboard": 0, @@ -414,6 +459,7 @@ "hidden": 0, "is_query_report": 1, "label": "Subcontracted Item To Be Received", + "link_count": 0, "link_to": "Subcontracted Item To Be Received", "link_type": "Report", "onboard": 0, @@ -424,6 +470,7 @@ "hidden": 0, "is_query_report": 1, "label": "Supplier Quotation Comparison", + "link_count": 0, "link_to": "Supplier Quotation Comparison", "link_type": "Report", "onboard": 1, @@ -434,6 +481,7 @@ "hidden": 0, "is_query_report": 1, "label": "Material Requests for which Supplier Quotations are not created", + "link_count": 0, "link_to": "Material Requests for which Supplier Quotations are not created", "link_type": "Report", "onboard": 0, @@ -444,6 +492,7 @@ "hidden": 0, "is_query_report": 1, "label": "Supplier Addresses And Contacts", + "link_count": 0, "link_to": "Address And Contacts", "link_type": "Report", "onboard": 0, @@ -453,6 +502,7 @@ "hidden": 0, "is_query_report": 0, "label": "Regional", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -461,20 +511,26 @@ "hidden": 0, "is_query_report": 0, "label": "Import Supplier Invoice", + "link_count": 0, "link_to": "Import Supplier Invoice", "link_type": "DocType", "onboard": 0, "type": "Link" } ], - "modified": "2020-12-01 13:38:38.615167", + "modified": "2021-08-05 12:15:56.218427", "modified_by": "Administrator", "module": "Buying", "name": "Buying", "onboarding": "Buying", "owner": "Administrator", + "parent_page": "", "pin_to_bottom": 0, "pin_to_top": 0, + "public": 1, + "restrict_to_domain": "", + "roles": [], + "sequence_id": 6, "shortcuts": [ { "color": "Green", @@ -516,5 +572,6 @@ "type": "Dashboard" } ], - "shortcuts_label": "" + "shortcuts_label": "", + "title": "Buying" } \ No newline at end of file diff --git a/erpnext/crm/workspace/crm/crm.json b/erpnext/crm/workspace/crm/crm.json index b4fb7d8abe9..c363395452b 100644 --- a/erpnext/crm/workspace/crm/crm.json +++ b/erpnext/crm/workspace/crm/crm.json @@ -1,26 +1,31 @@ { - "category": "Modules", + "category": "", "charts": [ { "chart_name": "Territory Wise Sales" } ], + "content": "[{\"type\": \"onboarding\", \"data\": {\"onboarding_name\":\"CRM\", \"col\": 12}}, {\"type\": \"chart\", \"data\": {\"chart_name\": null, \"col\": 12}}, {\"type\": \"spacer\", \"data\": {\"col\": 12}}, {\"type\": \"header\", \"data\": {\"text\": \"Your Shortcuts\", \"level\": 4, \"col\": 12}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Lead\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Opportunity\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Customer\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Sales Analytics\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Dashboard\", \"col\": 4}}, {\"type\": \"spacer\", \"data\": {\"col\": 12}}, {\"type\": \"header\", \"data\": {\"text\": \"Reports & Masters\", \"level\": 4, \"col\": 12}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Sales Pipeline\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Reports\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Maintenance\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Campaign\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Settings\", \"col\": 4}}]", "creation": "2020-01-23 14:48:30.183272", "developer_mode_only": 0, "disable_user_customization": 0, "docstatus": 0, "doctype": "Workspace", + "extends": "", "extends_another_page": 0, + "for_user": "", "hide_custom": 0, "icon": "crm", "idx": 0, - "is_standard": 1, + "is_default": 0, + "is_standard": 0, "label": "CRM", "links": [ { "hidden": 0, "is_query_report": 0, "label": "Sales Pipeline", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -29,6 +34,7 @@ "hidden": 0, "is_query_report": 0, "label": "Lead", + "link_count": 0, "link_to": "Lead", "link_type": "DocType", "onboard": 1, @@ -39,6 +45,7 @@ "hidden": 0, "is_query_report": 0, "label": "Opportunity", + "link_count": 0, "link_to": "Opportunity", "link_type": "DocType", "onboard": 1, @@ -49,6 +56,7 @@ "hidden": 0, "is_query_report": 0, "label": "Customer", + "link_count": 0, "link_to": "Customer", "link_type": "DocType", "onboard": 1, @@ -59,6 +67,7 @@ "hidden": 0, "is_query_report": 0, "label": "Contact", + "link_count": 0, "link_to": "Contact", "link_type": "DocType", "onboard": 1, @@ -69,6 +78,7 @@ "hidden": 0, "is_query_report": 0, "label": "Communication", + "link_count": 0, "link_to": "Communication", "link_type": "DocType", "onboard": 0, @@ -79,6 +89,7 @@ "hidden": 0, "is_query_report": 0, "label": "Lead Source", + "link_count": 0, "link_to": "Lead Source", "link_type": "DocType", "onboard": 0, @@ -89,6 +100,7 @@ "hidden": 0, "is_query_report": 0, "label": "Contract", + "link_count": 0, "link_to": "Contract", "link_type": "DocType", "onboard": 0, @@ -99,6 +111,7 @@ "hidden": 0, "is_query_report": 0, "label": "Appointment", + "link_count": 0, "link_to": "Appointment", "link_type": "DocType", "onboard": 0, @@ -109,6 +122,7 @@ "hidden": 0, "is_query_report": 0, "label": "Newsletter", + "link_count": 0, "link_to": "Newsletter", "link_type": "DocType", "onboard": 0, @@ -118,6 +132,7 @@ "hidden": 0, "is_query_report": 0, "label": "Reports", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -126,6 +141,7 @@ "hidden": 0, "is_query_report": 1, "label": "Lead Details", + "link_count": 0, "link_to": "Lead Details", "link_type": "Report", "onboard": 1, @@ -136,6 +152,7 @@ "hidden": 0, "is_query_report": 0, "label": "Sales Funnel", + "link_count": 0, "link_to": "sales-funnel", "link_type": "Page", "onboard": 1, @@ -146,6 +163,7 @@ "hidden": 0, "is_query_report": 1, "label": "Prospects Engaged But Not Converted", + "link_count": 0, "link_to": "Prospects Engaged But Not Converted", "link_type": "Report", "onboard": 1, @@ -156,6 +174,7 @@ "hidden": 0, "is_query_report": 1, "label": "First Response Time for Opportunity", + "link_count": 0, "link_to": "First Response Time for Opportunity", "link_type": "Report", "onboard": 0, @@ -166,6 +185,7 @@ "hidden": 0, "is_query_report": 1, "label": "Inactive Customers", + "link_count": 0, "link_to": "Inactive Customers", "link_type": "Report", "onboard": 0, @@ -176,6 +196,7 @@ "hidden": 0, "is_query_report": 1, "label": "Campaign Efficiency", + "link_count": 0, "link_to": "Campaign Efficiency", "link_type": "Report", "onboard": 0, @@ -186,6 +207,7 @@ "hidden": 0, "is_query_report": 1, "label": "Lead Owner Efficiency", + "link_count": 0, "link_to": "Lead Owner Efficiency", "link_type": "Report", "onboard": 0, @@ -195,6 +217,7 @@ "hidden": 0, "is_query_report": 0, "label": "Maintenance", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -203,6 +226,7 @@ "hidden": 0, "is_query_report": 0, "label": "Maintenance Schedule", + "link_count": 0, "link_to": "Maintenance Schedule", "link_type": "DocType", "onboard": 1, @@ -213,6 +237,7 @@ "hidden": 0, "is_query_report": 0, "label": "Maintenance Visit", + "link_count": 0, "link_to": "Maintenance Visit", "link_type": "DocType", "onboard": 0, @@ -223,6 +248,7 @@ "hidden": 0, "is_query_report": 0, "label": "Warranty Claim", + "link_count": 0, "link_to": "Warranty Claim", "link_type": "DocType", "onboard": 0, @@ -232,6 +258,7 @@ "hidden": 0, "is_query_report": 0, "label": "Campaign", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -240,6 +267,7 @@ "hidden": 0, "is_query_report": 0, "label": "Campaign", + "link_count": 0, "link_to": "Campaign", "link_type": "DocType", "onboard": 0, @@ -250,6 +278,7 @@ "hidden": 0, "is_query_report": 0, "label": "Email Campaign", + "link_count": 0, "link_to": "Email Campaign", "link_type": "DocType", "onboard": 0, @@ -260,6 +289,7 @@ "hidden": 0, "is_query_report": 0, "label": "Social Media Post", + "link_count": 0, "link_to": "Social Media Post", "link_type": "DocType", "onboard": 0, @@ -269,6 +299,7 @@ "hidden": 0, "is_query_report": 0, "label": "Settings", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -277,6 +308,7 @@ "hidden": 0, "is_query_report": 0, "label": "Customer Group", + "link_count": 0, "link_to": "Customer Group", "link_type": "DocType", "onboard": 1, @@ -287,6 +319,7 @@ "hidden": 0, "is_query_report": 0, "label": "Territory", + "link_count": 0, "link_to": "Territory", "link_type": "DocType", "onboard": 1, @@ -297,6 +330,7 @@ "hidden": 0, "is_query_report": 0, "label": "Sales Person", + "link_count": 0, "link_to": "Sales Person", "link_type": "DocType", "onboard": 1, @@ -307,6 +341,7 @@ "hidden": 0, "is_query_report": 0, "label": "SMS Center", + "link_count": 0, "link_to": "SMS Center", "link_type": "DocType", "onboard": 0, @@ -317,6 +352,7 @@ "hidden": 0, "is_query_report": 0, "label": "SMS Log", + "link_count": 0, "link_to": "SMS Log", "link_type": "DocType", "onboard": 0, @@ -327,6 +363,7 @@ "hidden": 0, "is_query_report": 0, "label": "SMS Settings", + "link_count": 0, "link_to": "SMS Settings", "link_type": "DocType", "onboard": 0, @@ -337,6 +374,7 @@ "hidden": 0, "is_query_report": 0, "label": "Email Group", + "link_count": 0, "link_to": "Email Group", "link_type": "DocType", "onboard": 0, @@ -347,6 +385,7 @@ "hidden": 0, "is_query_report": 0, "label": "Twitter Settings", + "link_count": 0, "link_to": "Twitter Settings", "link_type": "DocType", "onboard": 0, @@ -357,20 +396,26 @@ "hidden": 0, "is_query_report": 0, "label": "LinkedIn Settings", + "link_count": 0, "link_to": "LinkedIn Settings", "link_type": "DocType", "onboard": 0, "type": "Link" } ], - "modified": "2020-12-01 13:38:36.871352", + "modified": "2021-08-05 12:15:56.913091", "modified_by": "Administrator", "module": "CRM", "name": "CRM", "onboarding": "CRM", "owner": "Administrator", + "parent_page": "", "pin_to_bottom": 0, "pin_to_top": 0, + "public": 1, + "restrict_to_domain": "", + "roles": [], + "sequence_id": 7, "shortcuts": [ { "color": "Blue", @@ -403,5 +448,6 @@ "link_to": "CRM", "type": "Dashboard" } - ] + ], + "title": "CRM" } \ No newline at end of file diff --git a/erpnext/education/workspace/education/education.json b/erpnext/education/workspace/education/education.json index bf7496146d9..c58ddd63cfe 100644 --- a/erpnext/education/workspace/education/education.json +++ b/erpnext/education/workspace/education/education.json @@ -1,27 +1,32 @@ { - "category": "Domains", + "category": "", "charts": [ { "chart_name": "Program Enrollments", "label": "Program Enrollments" } ], + "content": "[{\"type\": \"onboarding\", \"data\": {\"onboarding_name\":\"Education\", \"col\": 12}}, {\"type\": \"chart\", \"data\": {\"chart_name\": \"Program Enrollments\", \"col\": 12}}, {\"type\": \"spacer\", \"data\": {\"col\": 12}}, {\"type\": \"header\", \"data\": {\"text\": \"Your Shortcuts\", \"level\": 4, \"col\": 12}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Student\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Instructor\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Program\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Course\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Fees\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Student Monthly Attendance Sheet\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Course Scheduling Tool\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Student Attendance Tool\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Dashboard\", \"col\": 4}}, {\"type\": \"spacer\", \"data\": {\"col\": 12}}, {\"type\": \"header\", \"data\": {\"text\": \"Reports & Masters\", \"level\": 4, \"col\": 12}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Student and Instructor\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Masters\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Content Masters\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Settings\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Admission\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Fees\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Schedule\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Attendance\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"LMS Activity\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Assessment\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Assessment Reports\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Tools\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Other Reports\", \"col\": 4}}]", "creation": "2020-03-02 17:22:57.066401", "developer_mode_only": 0, "disable_user_customization": 0, "docstatus": 0, "doctype": "Workspace", + "extends": "", "extends_another_page": 0, + "for_user": "", "hide_custom": 0, "icon": "education", "idx": 0, - "is_standard": 1, + "is_default": 0, + "is_standard": 0, "label": "Education", "links": [ { "hidden": 0, "is_query_report": 0, "label": "Student and Instructor", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -30,6 +35,7 @@ "hidden": 0, "is_query_report": 0, "label": "Student", + "link_count": 0, "link_to": "Student", "link_type": "DocType", "onboard": 1, @@ -40,6 +46,7 @@ "hidden": 0, "is_query_report": 0, "label": "Instructor", + "link_count": 0, "link_to": "Instructor", "link_type": "DocType", "onboard": 1, @@ -50,6 +57,7 @@ "hidden": 0, "is_query_report": 0, "label": "Guardian", + "link_count": 0, "link_to": "Guardian", "link_type": "DocType", "onboard": 0, @@ -60,6 +68,7 @@ "hidden": 0, "is_query_report": 0, "label": "Student Group", + "link_count": 0, "link_to": "Student Group", "link_type": "DocType", "onboard": 0, @@ -70,6 +79,7 @@ "hidden": 0, "is_query_report": 0, "label": "Student Log", + "link_count": 0, "link_to": "Student Log", "link_type": "DocType", "onboard": 0, @@ -79,6 +89,7 @@ "hidden": 0, "is_query_report": 0, "label": "Masters", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -87,6 +98,7 @@ "hidden": 0, "is_query_report": 0, "label": "Program", + "link_count": 0, "link_to": "Program", "link_type": "DocType", "onboard": 0, @@ -97,6 +109,7 @@ "hidden": 0, "is_query_report": 0, "label": "Course", + "link_count": 0, "link_to": "Course", "link_type": "DocType", "onboard": 1, @@ -107,6 +120,7 @@ "hidden": 0, "is_query_report": 0, "label": "Topic", + "link_count": 0, "link_to": "Topic", "link_type": "DocType", "onboard": 0, @@ -117,6 +131,7 @@ "hidden": 0, "is_query_report": 0, "label": "Room", + "link_count": 0, "link_to": "Room", "link_type": "DocType", "onboard": 1, @@ -126,6 +141,7 @@ "hidden": 0, "is_query_report": 0, "label": "Content Masters", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -134,6 +150,7 @@ "hidden": 0, "is_query_report": 0, "label": "Article", + "link_count": 0, "link_to": "Article", "link_type": "DocType", "onboard": 0, @@ -144,6 +161,7 @@ "hidden": 0, "is_query_report": 0, "label": "Video", + "link_count": 0, "link_to": "Video", "link_type": "DocType", "onboard": 0, @@ -154,6 +172,7 @@ "hidden": 0, "is_query_report": 0, "label": "Quiz", + "link_count": 0, "link_to": "Quiz", "link_type": "DocType", "onboard": 0, @@ -163,6 +182,7 @@ "hidden": 0, "is_query_report": 0, "label": "Settings", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -171,6 +191,7 @@ "hidden": 0, "is_query_report": 0, "label": "Education Settings", + "link_count": 0, "link_to": "Education Settings", "link_type": "DocType", "onboard": 0, @@ -181,6 +202,7 @@ "hidden": 0, "is_query_report": 0, "label": "Student Category", + "link_count": 0, "link_to": "Student Category", "link_type": "DocType", "onboard": 0, @@ -191,6 +213,7 @@ "hidden": 0, "is_query_report": 0, "label": "Student Batch Name", + "link_count": 0, "link_to": "Student Batch Name", "link_type": "DocType", "onboard": 0, @@ -201,6 +224,7 @@ "hidden": 0, "is_query_report": 0, "label": "Grading Scale", + "link_count": 0, "link_to": "Grading Scale", "link_type": "DocType", "onboard": 1, @@ -211,6 +235,7 @@ "hidden": 0, "is_query_report": 0, "label": "Academic Term", + "link_count": 0, "link_to": "Academic Term", "link_type": "DocType", "onboard": 0, @@ -221,6 +246,7 @@ "hidden": 0, "is_query_report": 0, "label": "Academic Year", + "link_count": 0, "link_to": "Academic Year", "link_type": "DocType", "onboard": 0, @@ -230,6 +256,7 @@ "hidden": 0, "is_query_report": 0, "label": "Admission", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -238,6 +265,7 @@ "hidden": 0, "is_query_report": 0, "label": "Student Applicant", + "link_count": 0, "link_to": "Student Applicant", "link_type": "DocType", "onboard": 0, @@ -248,6 +276,7 @@ "hidden": 0, "is_query_report": 0, "label": "Student Admission", + "link_count": 0, "link_to": "Student Admission", "link_type": "DocType", "onboard": 0, @@ -258,6 +287,7 @@ "hidden": 0, "is_query_report": 0, "label": "Program Enrollment", + "link_count": 0, "link_to": "Program Enrollment", "link_type": "DocType", "onboard": 0, @@ -268,6 +298,7 @@ "hidden": 0, "is_query_report": 0, "label": "Course Enrollment", + "link_count": 0, "link_to": "Course Enrollment", "link_type": "DocType", "onboard": 0, @@ -277,6 +308,7 @@ "hidden": 0, "is_query_report": 0, "label": "Fees", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -285,6 +317,7 @@ "hidden": 0, "is_query_report": 0, "label": "Fee Structure", + "link_count": 0, "link_to": "Fee Structure", "link_type": "DocType", "onboard": 0, @@ -295,6 +328,7 @@ "hidden": 0, "is_query_report": 0, "label": "Fee Category", + "link_count": 0, "link_to": "Fee Category", "link_type": "DocType", "onboard": 0, @@ -305,6 +339,7 @@ "hidden": 0, "is_query_report": 0, "label": "Fee Schedule", + "link_count": 0, "link_to": "Fee Schedule", "link_type": "DocType", "onboard": 0, @@ -315,6 +350,7 @@ "hidden": 0, "is_query_report": 0, "label": "Fees", + "link_count": 0, "link_to": "Fees", "link_type": "DocType", "onboard": 0, @@ -325,6 +361,7 @@ "hidden": 0, "is_query_report": 1, "label": "Student Fee Collection Report", + "link_count": 0, "link_to": "Student Fee Collection", "link_type": "Report", "onboard": 0, @@ -335,6 +372,7 @@ "hidden": 0, "is_query_report": 1, "label": "Program wise Fee Collection Report", + "link_count": 0, "link_to": "Program wise Fee Collection", "link_type": "Report", "onboard": 0, @@ -344,6 +382,7 @@ "hidden": 0, "is_query_report": 0, "label": "Schedule", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -352,6 +391,7 @@ "hidden": 0, "is_query_report": 0, "label": "Course Schedule", + "link_count": 0, "link_to": "Course Schedule", "link_type": "DocType", "onboard": 0, @@ -362,6 +402,7 @@ "hidden": 0, "is_query_report": 0, "label": "Course Scheduling Tool", + "link_count": 0, "link_to": "Course Scheduling Tool", "link_type": "DocType", "onboard": 0, @@ -371,6 +412,7 @@ "hidden": 0, "is_query_report": 0, "label": "Attendance", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -379,6 +421,7 @@ "hidden": 0, "is_query_report": 0, "label": "Student Attendance", + "link_count": 0, "link_to": "Student Attendance", "link_type": "DocType", "onboard": 0, @@ -389,6 +432,7 @@ "hidden": 0, "is_query_report": 0, "label": "Student Leave Application", + "link_count": 0, "link_to": "Student Leave Application", "link_type": "DocType", "onboard": 0, @@ -399,6 +443,7 @@ "hidden": 0, "is_query_report": 1, "label": "Student Monthly Attendance Sheet", + "link_count": 0, "link_to": "Student Monthly Attendance Sheet", "link_type": "Report", "onboard": 0, @@ -409,6 +454,7 @@ "hidden": 0, "is_query_report": 1, "label": "Absent Student Report", + "link_count": 0, "link_to": "Absent Student Report", "link_type": "Report", "onboard": 0, @@ -419,6 +465,7 @@ "hidden": 0, "is_query_report": 1, "label": "Student Batch-Wise Attendance", + "link_count": 0, "link_to": "Student Batch-Wise Attendance", "link_type": "Report", "onboard": 0, @@ -428,6 +475,7 @@ "hidden": 0, "is_query_report": 0, "label": "LMS Activity", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -436,6 +484,7 @@ "hidden": 0, "is_query_report": 0, "label": "Course Enrollment", + "link_count": 0, "link_to": "Course Enrollment", "link_type": "DocType", "onboard": 0, @@ -446,6 +495,7 @@ "hidden": 0, "is_query_report": 0, "label": "Course Activity", + "link_count": 0, "link_to": "Course Activity", "link_type": "DocType", "onboard": 0, @@ -456,6 +506,7 @@ "hidden": 0, "is_query_report": 0, "label": "Quiz Activity", + "link_count": 0, "link_to": "Quiz Activity", "link_type": "DocType", "onboard": 0, @@ -465,6 +516,7 @@ "hidden": 0, "is_query_report": 0, "label": "Assessment", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -473,6 +525,7 @@ "hidden": 0, "is_query_report": 0, "label": "Assessment Plan", + "link_count": 0, "link_to": "Assessment Plan", "link_type": "DocType", "onboard": 0, @@ -483,6 +536,7 @@ "hidden": 0, "is_query_report": 0, "label": "Assessment Group", + "link_count": 0, "link_to": "Assessment Group", "link_type": "DocType", "onboard": 0, @@ -493,6 +547,7 @@ "hidden": 0, "is_query_report": 0, "label": "Assessment Result", + "link_count": 0, "link_to": "Assessment Result", "link_type": "DocType", "onboard": 0, @@ -503,6 +558,7 @@ "hidden": 0, "is_query_report": 0, "label": "Assessment Criteria", + "link_count": 0, "link_to": "Assessment Criteria", "link_type": "DocType", "onboard": 0, @@ -512,6 +568,7 @@ "hidden": 0, "is_query_report": 0, "label": "Assessment Reports", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -520,6 +577,7 @@ "hidden": 0, "is_query_report": 1, "label": "Course wise Assessment Report", + "link_count": 0, "link_to": "Course wise Assessment Report", "link_type": "Report", "onboard": 0, @@ -530,6 +588,7 @@ "hidden": 0, "is_query_report": 1, "label": "Final Assessment Grades", + "link_count": 0, "link_to": "Final Assessment Grades", "link_type": "Report", "onboard": 0, @@ -540,6 +599,7 @@ "hidden": 0, "is_query_report": 1, "label": "Assessment Plan Status", + "link_count": 0, "link_to": "Assessment Plan Status", "link_type": "Report", "onboard": 0, @@ -550,6 +610,7 @@ "hidden": 0, "is_query_report": 0, "label": "Student Report Generation Tool", + "link_count": 0, "link_to": "Student Report Generation Tool", "link_type": "DocType", "onboard": 0, @@ -559,6 +620,7 @@ "hidden": 0, "is_query_report": 0, "label": "Tools", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -567,6 +629,7 @@ "hidden": 0, "is_query_report": 0, "label": "Student Attendance Tool", + "link_count": 0, "link_to": "Student Attendance Tool", "link_type": "DocType", "onboard": 0, @@ -577,6 +640,7 @@ "hidden": 0, "is_query_report": 0, "label": "Assessment Result Tool", + "link_count": 0, "link_to": "Assessment Result Tool", "link_type": "DocType", "onboard": 0, @@ -587,6 +651,7 @@ "hidden": 0, "is_query_report": 0, "label": "Student Group Creation Tool", + "link_count": 0, "link_to": "Student Group Creation Tool", "link_type": "DocType", "onboard": 0, @@ -597,6 +662,7 @@ "hidden": 0, "is_query_report": 0, "label": "Program Enrollment Tool", + "link_count": 0, "link_to": "Program Enrollment Tool", "link_type": "DocType", "onboard": 0, @@ -607,6 +673,7 @@ "hidden": 0, "is_query_report": 0, "label": "Course Scheduling Tool", + "link_count": 0, "link_to": "Course Scheduling Tool", "link_type": "DocType", "onboard": 0, @@ -616,6 +683,7 @@ "hidden": 0, "is_query_report": 0, "label": "Other Reports", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -624,21 +692,26 @@ "hidden": 0, "is_query_report": 1, "label": "Student and Guardian Contact Details", + "link_count": 0, "link_to": "Student and Guardian Contact Details", "link_type": "Report", "onboard": 0, "type": "Link" } ], - "modified": "2020-12-01 13:38:37.448989", + "modified": "2021-08-05 12:15:57.929275", "modified_by": "Administrator", "module": "Education", "name": "Education", "onboarding": "Education", "owner": "Administrator", + "parent_page": "", "pin_to_bottom": 0, "pin_to_top": 0, + "public": 1, "restrict_to_domain": "Education", + "roles": [], + "sequence_id": 9, "shortcuts": [ { "color": "Grey", @@ -697,5 +770,6 @@ "link_to": "Education", "type": "Dashboard" } - ] + ], + "title": "Education" } \ No newline at end of file diff --git a/erpnext/erpnext_integrations/workspace/erpnext_integrations/erpnext_integrations.json b/erpnext/erpnext_integrations/workspace/erpnext_integrations/erpnext_integrations.json index 24b8e48ed6f..9f9204a78d8 100644 --- a/erpnext/erpnext_integrations/workspace/erpnext_integrations/erpnext_integrations.json +++ b/erpnext/erpnext_integrations/workspace/erpnext_integrations/erpnext_integrations.json @@ -1,22 +1,27 @@ { - "category": "Modules", + "category": "", "charts": [], + "content": "[{\"type\": \"header\", \"data\": {\"text\": \"Reports & Masters\", \"level\": 4, \"col\": 12}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Marketplace\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Payments\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Settings\", \"col\": 4}}]", "creation": "2020-08-20 19:30:48.138801", "developer_mode_only": 0, "disable_user_customization": 0, "docstatus": 0, "doctype": "Workspace", - "extends": "Integrations", - "extends_another_page": 1, - "hide_custom": 1, + "extends": "", + "extends_another_page": 0, + "for_user": "", + "hide_custom": 0, + "icon": "integration", "idx": 0, - "is_standard": 1, + "is_default": 0, + "is_standard": 0, "label": "ERPNext Integrations", "links": [ { "hidden": 0, "is_query_report": 0, "label": "Marketplace", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -25,6 +30,7 @@ "hidden": 0, "is_query_report": 0, "label": "Woocommerce Settings", + "link_count": 0, "link_to": "Woocommerce Settings", "link_type": "DocType", "onboard": 0, @@ -35,15 +41,28 @@ "hidden": 0, "is_query_report": 0, "label": "Amazon MWS Settings", + "link_count": 0, "link_to": "Amazon MWS Settings", "link_type": "DocType", "onboard": 0, "type": "Link" }, + { + "dependencies": "", + "hidden": 0, + "is_query_report": 0, + "label": "Shopify Settings", + "link_count": 0, + "link_to": "Shopify Settings", + "link_type": "DocType", + "onboard": 0, + "type": "Link" + }, { "hidden": 0, "is_query_report": 0, "label": "Payments", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -52,6 +71,7 @@ "hidden": 0, "is_query_report": 0, "label": "GoCardless Settings", + "link_count": 0, "link_to": "GoCardless Settings", "link_type": "DocType", "onboard": 0, @@ -62,6 +82,7 @@ "hidden": 0, "is_query_report": 0, "label": "M-Pesa Settings", + "link_count": 0, "link_to": "Mpesa Settings", "link_type": "DocType", "onboard": 0, @@ -71,6 +92,7 @@ "hidden": 0, "is_query_report": 0, "label": "Settings", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -79,6 +101,7 @@ "hidden": 0, "is_query_report": 0, "label": "Plaid Settings", + "link_count": 0, "link_to": "Plaid Settings", "link_type": "DocType", "onboard": 0, @@ -89,18 +112,26 @@ "hidden": 0, "is_query_report": 0, "label": "Exotel Settings", + "link_count": 0, "link_to": "Exotel Settings", "link_type": "DocType", "onboard": 0, "type": "Link" } ], - "modified": "2020-12-01 13:38:35.846528", + "modified": "2021-08-05 12:15:58.740246", "modified_by": "Administrator", "module": "ERPNext Integrations", "name": "ERPNext Integrations", + "onboarding": "", "owner": "Administrator", + "parent_page": "", "pin_to_bottom": 0, "pin_to_top": 0, - "shortcuts": [] + "public": 1, + "restrict_to_domain": "", + "roles": [], + "sequence_id": 10, + "shortcuts": [], + "title": "ERPNext Integrations" } diff --git a/erpnext/erpnext_integrations/workspace/erpnext_integrations_settings/erpnext_integrations_settings.json b/erpnext/erpnext_integrations/workspace/erpnext_integrations_settings/erpnext_integrations_settings.json index d656b3c4fee..fd4afb85fdd 100644 --- a/erpnext/erpnext_integrations/workspace/erpnext_integrations_settings/erpnext_integrations_settings.json +++ b/erpnext/erpnext_integrations/workspace/erpnext_integrations_settings/erpnext_integrations_settings.json @@ -1,22 +1,27 @@ { - "category": "Modules", + "category": "", "charts": [], + "content": "[{\"type\": \"header\", \"data\": {\"text\": \"Reports & Masters\", \"level\": 4, \"col\": 12}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Integrations Settings\", \"col\": 4}}]", "creation": "2020-07-31 10:38:54.021237", "developer_mode_only": 0, "disable_user_customization": 0, "docstatus": 0, "doctype": "Workspace", - "extends": "Settings", - "extends_another_page": 1, + "extends": "", + "extends_another_page": 0, + "for_user": "", "hide_custom": 0, + "icon": "setting", "idx": 0, - "is_standard": 1, + "is_default": 0, + "is_standard": 0, "label": "ERPNext Integrations Settings", "links": [ { "hidden": 0, "is_query_report": 0, "label": "Integrations Settings", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -25,16 +30,29 @@ "hidden": 0, "is_query_report": 0, "label": "Woocommerce Settings", + "link_count": 0, "link_to": "Woocommerce Settings", "link_type": "DocType", "onboard": 0, "type": "Link" }, + { + "dependencies": "", + "hidden": 0, + "is_query_report": 0, + "label": "Shopify Settings", + "link_count": 0, + "link_to": "Shopify Settings", + "link_type": "DocType", + "onboard": 0, + "type": "Link" + }, { "dependencies": "", "hidden": 0, "is_query_report": 0, "label": "Amazon MWS Settings", + "link_count": 0, "link_to": "Amazon MWS Settings", "link_type": "DocType", "onboard": 0, @@ -45,6 +63,7 @@ "hidden": 0, "is_query_report": 0, "label": "Plaid Settings", + "link_count": 0, "link_to": "Plaid Settings", "link_type": "DocType", "onboard": 0, @@ -55,18 +74,26 @@ "hidden": 0, "is_query_report": 0, "label": "Exotel Settings", + "link_count": 0, "link_to": "Exotel Settings", "link_type": "DocType", "onboard": 0, "type": "Link" } ], - "modified": "2020-12-01 13:38:34.732552", + "modified": "2021-08-05 12:15:58.951704", "modified_by": "Administrator", "module": "ERPNext Integrations", "name": "ERPNext Integrations Settings", + "onboarding": "", "owner": "Administrator", + "parent_page": "", "pin_to_bottom": 0, "pin_to_top": 0, - "shortcuts": [] + "public": 1, + "restrict_to_domain": "", + "roles": [], + "sequence_id": 11, + "shortcuts": [], + "title": "ERPNext Integrations Settings" } diff --git a/erpnext/healthcare/workspace/healthcare/healthcare.json b/erpnext/healthcare/workspace/healthcare/healthcare.json index b93dda2e879..55132f3695e 100644 --- a/erpnext/healthcare/workspace/healthcare/healthcare.json +++ b/erpnext/healthcare/workspace/healthcare/healthcare.json @@ -1,5 +1,5 @@ { - "category": "Domains", + "category": "", "charts": [ { "chart_name": "Patient Appointments", @@ -7,22 +7,27 @@ } ], "charts_label": "", + "content": "[{\"type\": \"onboarding\", \"data\": {\"onboarding_name\":\"Healthcare\", \"col\": 12}}, {\"type\": \"chart\", \"data\": {\"chart_name\": \"Patient Appointments\", \"col\": 12}}, {\"type\": \"spacer\", \"data\": {\"col\": 12}}, {\"type\": \"header\", \"data\": {\"text\": \"Your Shortcuts\", \"level\": 4, \"col\": 12}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Patient Appointment\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Patient\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Healthcare Service Unit\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Healthcare Practitioner\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Patient History\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Dashboard\", \"col\": 4}}, {\"type\": \"spacer\", \"data\": {\"col\": 12}}, {\"type\": \"header\", \"data\": {\"text\": \"Reports & Masters\", \"level\": 4, \"col\": 12}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Masters\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Consultation Setup\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Consultation\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Settings\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Laboratory Setup\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Laboratory\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Rehabilitation and Physiotherapy\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Records and History\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Reports\", \"col\": 4}}]", "creation": "2020-03-02 17:23:17.919682", "developer_mode_only": 0, "disable_user_customization": 0, "docstatus": 0, "doctype": "Workspace", + "extends": "", "extends_another_page": 0, + "for_user": "", "hide_custom": 0, "icon": "healthcare", "idx": 0, - "is_standard": 1, + "is_default": 0, + "is_standard": 0, "label": "Healthcare", "links": [ { "hidden": 0, "is_query_report": 0, "label": "Masters", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -31,6 +36,7 @@ "hidden": 0, "is_query_report": 0, "label": "Patient", + "link_count": 0, "link_to": "Patient", "link_type": "DocType", "onboard": 1, @@ -41,6 +47,7 @@ "hidden": 0, "is_query_report": 0, "label": "Healthcare Practitioner", + "link_count": 0, "link_to": "Healthcare Practitioner", "link_type": "DocType", "onboard": 1, @@ -51,6 +58,7 @@ "hidden": 0, "is_query_report": 0, "label": "Practitioner Schedule", + "link_count": 0, "link_to": "Practitioner Schedule", "link_type": "DocType", "onboard": 1, @@ -61,6 +69,7 @@ "hidden": 0, "is_query_report": 0, "label": "Medical Department", + "link_count": 0, "link_to": "Medical Department", "link_type": "DocType", "onboard": 0, @@ -71,6 +80,7 @@ "hidden": 0, "is_query_report": 0, "label": "Healthcare Service Unit Type", + "link_count": 0, "link_to": "Healthcare Service Unit Type", "link_type": "DocType", "onboard": 0, @@ -81,6 +91,7 @@ "hidden": 0, "is_query_report": 0, "label": "Healthcare Service Unit", + "link_count": 0, "link_to": "Healthcare Service Unit", "link_type": "DocType", "onboard": 0, @@ -91,6 +102,7 @@ "hidden": 0, "is_query_report": 0, "label": "Medical Code Standard", + "link_count": 0, "link_to": "Medical Code Standard", "link_type": "DocType", "onboard": 0, @@ -101,6 +113,7 @@ "hidden": 0, "is_query_report": 0, "label": "Medical Code", + "link_count": 0, "link_to": "Medical Code", "link_type": "DocType", "onboard": 0, @@ -110,6 +123,7 @@ "hidden": 0, "is_query_report": 0, "label": "Consultation Setup", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -118,6 +132,7 @@ "hidden": 0, "is_query_report": 0, "label": "Appointment Type", + "link_count": 0, "link_to": "Appointment Type", "link_type": "DocType", "onboard": 0, @@ -128,6 +143,7 @@ "hidden": 0, "is_query_report": 0, "label": "Clinical Procedure Template", + "link_count": 0, "link_to": "Clinical Procedure Template", "link_type": "DocType", "onboard": 0, @@ -138,6 +154,7 @@ "hidden": 0, "is_query_report": 0, "label": "Prescription Dosage", + "link_count": 0, "link_to": "Prescription Dosage", "link_type": "DocType", "onboard": 0, @@ -148,6 +165,7 @@ "hidden": 0, "is_query_report": 0, "label": "Prescription Duration", + "link_count": 0, "link_to": "Prescription Duration", "link_type": "DocType", "onboard": 0, @@ -158,6 +176,7 @@ "hidden": 0, "is_query_report": 0, "label": "Antibiotic", + "link_count": 0, "link_to": "Antibiotic", "link_type": "DocType", "onboard": 0, @@ -167,6 +186,7 @@ "hidden": 0, "is_query_report": 0, "label": "Consultation", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -175,6 +195,7 @@ "hidden": 0, "is_query_report": 0, "label": "Patient Appointment", + "link_count": 0, "link_to": "Patient Appointment", "link_type": "DocType", "onboard": 0, @@ -185,6 +206,7 @@ "hidden": 0, "is_query_report": 0, "label": "Clinical Procedure", + "link_count": 0, "link_to": "Clinical Procedure", "link_type": "DocType", "onboard": 0, @@ -195,6 +217,7 @@ "hidden": 0, "is_query_report": 0, "label": "Patient Encounter", + "link_count": 0, "link_to": "Patient Encounter", "link_type": "DocType", "onboard": 0, @@ -205,6 +228,7 @@ "hidden": 0, "is_query_report": 0, "label": "Vital Signs", + "link_count": 0, "link_to": "Vital Signs", "link_type": "DocType", "onboard": 0, @@ -215,6 +239,7 @@ "hidden": 0, "is_query_report": 0, "label": "Complaint", + "link_count": 0, "link_to": "Complaint", "link_type": "DocType", "onboard": 0, @@ -225,6 +250,7 @@ "hidden": 0, "is_query_report": 0, "label": "Diagnosis", + "link_count": 0, "link_to": "Diagnosis", "link_type": "DocType", "onboard": 0, @@ -235,6 +261,7 @@ "hidden": 0, "is_query_report": 0, "label": "Fee Validity", + "link_count": 0, "link_to": "Fee Validity", "link_type": "DocType", "onboard": 0, @@ -244,6 +271,7 @@ "hidden": 0, "is_query_report": 0, "label": "Settings", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -252,6 +280,7 @@ "hidden": 0, "is_query_report": 0, "label": "Healthcare Settings", + "link_count": 0, "link_to": "Healthcare Settings", "link_type": "DocType", "onboard": 1, @@ -261,6 +290,7 @@ "hidden": 0, "is_query_report": 0, "label": "Laboratory Setup", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -269,6 +299,7 @@ "hidden": 0, "is_query_report": 0, "label": "Lab Test Template", + "link_count": 0, "link_to": "Lab Test Template", "link_type": "DocType", "onboard": 0, @@ -279,6 +310,7 @@ "hidden": 0, "is_query_report": 0, "label": "Lab Test Sample", + "link_count": 0, "link_to": "Lab Test Sample", "link_type": "DocType", "onboard": 0, @@ -289,6 +321,7 @@ "hidden": 0, "is_query_report": 0, "label": "Lab Test UOM", + "link_count": 0, "link_to": "Lab Test UOM", "link_type": "DocType", "onboard": 0, @@ -299,6 +332,7 @@ "hidden": 0, "is_query_report": 0, "label": "Sensitivity", + "link_count": 0, "link_to": "Sensitivity", "link_type": "DocType", "onboard": 0, @@ -308,6 +342,7 @@ "hidden": 0, "is_query_report": 0, "label": "Laboratory", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -316,6 +351,7 @@ "hidden": 0, "is_query_report": 0, "label": "Lab Test", + "link_count": 0, "link_to": "Lab Test", "link_type": "DocType", "onboard": 0, @@ -326,6 +362,7 @@ "hidden": 0, "is_query_report": 0, "label": "Sample Collection", + "link_count": 0, "link_to": "Sample Collection", "link_type": "DocType", "onboard": 0, @@ -336,6 +373,7 @@ "hidden": 0, "is_query_report": 0, "label": "Dosage Form", + "link_count": 0, "link_to": "Dosage Form", "link_type": "DocType", "onboard": 0, @@ -345,6 +383,7 @@ "hidden": 0, "is_query_report": 0, "label": "Rehabilitation and Physiotherapy", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -353,6 +392,7 @@ "hidden": 0, "is_query_report": 0, "label": "Exercise Type", + "link_count": 0, "link_to": "Exercise Type", "link_type": "DocType", "onboard": 1, @@ -363,6 +403,7 @@ "hidden": 0, "is_query_report": 0, "label": "Therapy Type", + "link_count": 0, "link_to": "Therapy Type", "link_type": "DocType", "onboard": 1, @@ -373,6 +414,7 @@ "hidden": 0, "is_query_report": 0, "label": "Therapy Plan", + "link_count": 0, "link_to": "Therapy Plan", "link_type": "DocType", "onboard": 0, @@ -383,6 +425,7 @@ "hidden": 0, "is_query_report": 0, "label": "Therapy Session", + "link_count": 0, "link_to": "Therapy Session", "link_type": "DocType", "onboard": 0, @@ -393,6 +436,7 @@ "hidden": 0, "is_query_report": 0, "label": "Patient Assessment Template", + "link_count": 0, "link_to": "Patient Assessment Template", "link_type": "DocType", "onboard": 0, @@ -403,6 +447,7 @@ "hidden": 0, "is_query_report": 0, "label": "Patient Assessment", + "link_count": 0, "link_to": "Patient Assessment", "link_type": "DocType", "onboard": 0, @@ -412,6 +457,7 @@ "hidden": 0, "is_query_report": 0, "label": "Records and History", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -420,6 +466,7 @@ "hidden": 0, "is_query_report": 0, "label": "Patient History", + "link_count": 0, "link_to": "patient_history", "link_type": "Page", "onboard": 0, @@ -430,6 +477,7 @@ "hidden": 0, "is_query_report": 0, "label": "Patient Progress", + "link_count": 0, "link_to": "patient-progress", "link_type": "Page", "onboard": 0, @@ -440,6 +488,7 @@ "hidden": 0, "is_query_report": 0, "label": "Patient Medical Record", + "link_count": 0, "link_to": "Patient Medical Record", "link_type": "DocType", "onboard": 0, @@ -450,6 +499,7 @@ "hidden": 0, "is_query_report": 0, "label": "Inpatient Record", + "link_count": 0, "link_to": "Inpatient Record", "link_type": "DocType", "onboard": 0, @@ -459,6 +509,7 @@ "hidden": 0, "is_query_report": 0, "label": "Reports", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -467,6 +518,7 @@ "hidden": 0, "is_query_report": 1, "label": "Patient Appointment Analytics", + "link_count": 0, "link_to": "Patient Appointment Analytics", "link_type": "Report", "onboard": 0, @@ -477,21 +529,26 @@ "hidden": 0, "is_query_report": 1, "label": "Lab Test Report", + "link_count": 0, "link_to": "Lab Test Report", "link_type": "Report", "onboard": 0, "type": "Link" } ], - "modified": "2020-12-01 13:38:34.841396", + "modified": "2021-08-05 12:15:59.434612", "modified_by": "Administrator", "module": "Healthcare", "name": "Healthcare", "onboarding": "Healthcare", "owner": "Administrator", + "parent_page": "", "pin_to_bottom": 0, "pin_to_top": 0, + "public": 1, "restrict_to_domain": "Healthcare", + "roles": [], + "sequence_id": 13, "shortcuts": [ { "color": "Orange", @@ -532,5 +589,6 @@ "link_to": "Healthcare", "type": "Dashboard" } - ] + ], + "title": "Healthcare" } \ No newline at end of file diff --git a/erpnext/hr/workspace/hr/hr.json b/erpnext/hr/workspace/hr/hr.json index 4500ba4560c..575fa7be6fa 100644 --- a/erpnext/hr/workspace/hr/hr.json +++ b/erpnext/hr/workspace/hr/hr.json @@ -1,28 +1,32 @@ { - "category": "Modules", + "category": "", "charts": [ { "chart_name": "Outgoing Salary", "label": "Outgoing Salary" } ], + "content": "[{\"type\": \"onboarding\", \"data\": {\"onboarding_name\":\"Human Resource\", \"col\": 12}}, {\"type\": \"chart\", \"data\": {\"chart_name\": \"Outgoing Salary\", \"col\": 12}}, {\"type\": \"spacer\", \"data\": {\"col\": 12}}, {\"type\": \"header\", \"data\": {\"text\": \"Your Shortcuts\", \"level\": 4, \"col\": 12}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Employee\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Leave Application\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Attendance\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Job Applicant\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Monthly Attendance Sheet\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Dashboard\", \"col\": 4}}, {\"type\": \"spacer\", \"data\": {\"col\": 12}}, {\"type\": \"header\", \"data\": {\"text\": \"Reports & Masters\", \"level\": 4, \"col\": 12}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Employee\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Employee Lifecycle\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Shift Management\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Leaves\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Attendance\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Expense Claims\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Settings\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Fleet Management\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Recruitment\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Loans\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Training\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Performance\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Key Reports\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Other Reports\", \"col\": 4}}]", "creation": "2020-03-02 15:48:58.322521", "developer_mode_only": 0, "disable_user_customization": 0, "docstatus": 0, "doctype": "Workspace", + "extends": "", "extends_another_page": 0, + "for_user": "", "hide_custom": 0, "icon": "hr", "idx": 0, "is_default": 0, - "is_standard": 1, + "is_standard": 0, "label": "HR", "links": [ { "hidden": 0, "is_query_report": 0, "label": "Employee", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -31,6 +35,7 @@ "hidden": 0, "is_query_report": 0, "label": "Employee", + "link_count": 0, "link_to": "Employee", "link_type": "DocType", "onboard": 1, @@ -41,6 +46,7 @@ "hidden": 0, "is_query_report": 0, "label": "Employment Type", + "link_count": 0, "link_to": "Employment Type", "link_type": "DocType", "onboard": 0, @@ -51,6 +57,7 @@ "hidden": 0, "is_query_report": 0, "label": "Branch", + "link_count": 0, "link_to": "Branch", "link_type": "DocType", "onboard": 0, @@ -61,6 +68,7 @@ "hidden": 0, "is_query_report": 0, "label": "Department", + "link_count": 0, "link_to": "Department", "link_type": "DocType", "onboard": 0, @@ -71,6 +79,7 @@ "hidden": 0, "is_query_report": 0, "label": "Designation", + "link_count": 0, "link_to": "Designation", "link_type": "DocType", "onboard": 0, @@ -81,6 +90,7 @@ "hidden": 0, "is_query_report": 0, "label": "Employee Grade", + "link_count": 0, "link_to": "Employee Grade", "link_type": "DocType", "onboard": 0, @@ -91,6 +101,7 @@ "hidden": 0, "is_query_report": 0, "label": "Employee Group", + "link_count": 0, "link_to": "Employee Group", "link_type": "DocType", "onboard": 0, @@ -101,6 +112,7 @@ "hidden": 0, "is_query_report": 0, "label": "Employee Health Insurance", + "link_count": 0, "link_to": "Employee Health Insurance", "link_type": "DocType", "onboard": 0, @@ -110,6 +122,7 @@ "hidden": 0, "is_query_report": 0, "label": "Employee Lifecycle", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -118,6 +131,7 @@ "hidden": 0, "is_query_report": 0, "label": "Employee Onboarding", + "link_count": 0, "link_to": "Employee Onboarding", "link_type": "DocType", "onboard": 0, @@ -128,6 +142,7 @@ "hidden": 0, "is_query_report": 0, "label": "Employee Skill Map", + "link_count": 0, "link_to": "Employee Skill Map", "link_type": "DocType", "onboard": 0, @@ -138,6 +153,7 @@ "hidden": 0, "is_query_report": 0, "label": "Employee Promotion", + "link_count": 0, "link_to": "Employee Promotion", "link_type": "DocType", "onboard": 0, @@ -148,6 +164,7 @@ "hidden": 0, "is_query_report": 0, "label": "Employee Transfer", + "link_count": 0, "link_to": "Employee Transfer", "link_type": "DocType", "onboard": 0, @@ -157,6 +174,7 @@ "hidden": 0, "is_query_report": 0, "label": "Grievance Type", + "link_count": 0, "link_to": "Grievance Type", "link_type": "DocType", "onboard": 0, @@ -166,6 +184,7 @@ "hidden": 0, "is_query_report": 0, "label": "Employee Grievance", + "link_count": 0, "link_to": "Employee Grievance", "link_type": "DocType", "onboard": 0, @@ -176,6 +195,7 @@ "hidden": 0, "is_query_report": 0, "label": "Employee Separation", + "link_count": 0, "link_to": "Employee Separation", "link_type": "DocType", "onboard": 0, @@ -186,6 +206,7 @@ "hidden": 0, "is_query_report": 0, "label": "Employee Onboarding Template", + "link_count": 0, "link_to": "Employee Onboarding Template", "link_type": "DocType", "onboard": 0, @@ -196,6 +217,7 @@ "hidden": 0, "is_query_report": 0, "label": "Employee Separation Template", + "link_count": 0, "link_to": "Employee Separation Template", "link_type": "DocType", "onboard": 0, @@ -205,6 +227,7 @@ "hidden": 0, "is_query_report": 0, "label": "Shift Management", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -213,6 +236,7 @@ "hidden": 0, "is_query_report": 0, "label": "Shift Type", + "link_count": 0, "link_to": "Shift Type", "link_type": "DocType", "onboard": 0, @@ -223,6 +247,7 @@ "hidden": 0, "is_query_report": 0, "label": "Shift Request", + "link_count": 0, "link_to": "Shift Request", "link_type": "DocType", "onboard": 0, @@ -233,6 +258,7 @@ "hidden": 0, "is_query_report": 0, "label": "Shift Assignment", + "link_count": 0, "link_to": "Shift Assignment", "link_type": "DocType", "onboard": 0, @@ -242,6 +268,7 @@ "hidden": 0, "is_query_report": 0, "label": "Leaves", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -250,6 +277,7 @@ "hidden": 0, "is_query_report": 0, "label": "Holiday List", + "link_count": 0, "link_to": "Holiday List", "link_type": "DocType", "onboard": 0, @@ -260,6 +288,7 @@ "hidden": 0, "is_query_report": 0, "label": "Leave Type", + "link_count": 0, "link_to": "Leave Type", "link_type": "DocType", "onboard": 0, @@ -270,6 +299,7 @@ "hidden": 0, "is_query_report": 0, "label": "Leave Period", + "link_count": 0, "link_to": "Leave Period", "link_type": "DocType", "onboard": 0, @@ -280,6 +310,7 @@ "hidden": 0, "is_query_report": 0, "label": "Leave Policy", + "link_count": 0, "link_to": "Leave Policy", "link_type": "DocType", "onboard": 0, @@ -290,6 +321,7 @@ "hidden": 0, "is_query_report": 0, "label": "Leave Policy Assignment", + "link_count": 0, "link_to": "Leave Policy Assignment", "link_type": "DocType", "onboard": 0, @@ -300,6 +332,7 @@ "hidden": 0, "is_query_report": 0, "label": "Leave Application", + "link_count": 0, "link_to": "Leave Application", "link_type": "DocType", "onboard": 0, @@ -310,6 +343,7 @@ "hidden": 0, "is_query_report": 0, "label": "Leave Allocation", + "link_count": 0, "link_to": "Leave Allocation", "link_type": "DocType", "onboard": 0, @@ -320,6 +354,7 @@ "hidden": 0, "is_query_report": 0, "label": "Leave Encashment", + "link_count": 0, "link_to": "Leave Encashment", "link_type": "DocType", "onboard": 0, @@ -330,6 +365,7 @@ "hidden": 0, "is_query_report": 0, "label": "Leave Block List", + "link_count": 0, "link_to": "Leave Block List", "link_type": "DocType", "onboard": 0, @@ -340,6 +376,7 @@ "hidden": 0, "is_query_report": 0, "label": "Compensatory Leave Request", + "link_count": 0, "link_to": "Compensatory Leave Request", "link_type": "DocType", "onboard": 0, @@ -349,6 +386,7 @@ "hidden": 0, "is_query_report": 0, "label": "Attendance", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -357,6 +395,7 @@ "hidden": 0, "is_query_report": 0, "label": "Employee Attendance Tool", + "link_count": 0, "link_to": "Employee Attendance Tool", "link_type": "DocType", "onboard": 1, @@ -367,6 +406,7 @@ "hidden": 0, "is_query_report": 0, "label": "Attendance", + "link_count": 0, "link_to": "Attendance", "link_type": "DocType", "onboard": 1, @@ -377,6 +417,7 @@ "hidden": 0, "is_query_report": 0, "label": "Attendance Request", + "link_count": 0, "link_to": "Attendance Request", "link_type": "DocType", "onboard": 0, @@ -387,6 +428,7 @@ "hidden": 0, "is_query_report": 0, "label": "Upload Attendance", + "link_count": 0, "link_to": "Upload Attendance", "link_type": "DocType", "onboard": 0, @@ -397,6 +439,7 @@ "hidden": 0, "is_query_report": 0, "label": "Employee Checkin", + "link_count": 0, "link_to": "Employee Checkin", "link_type": "DocType", "onboard": 0, @@ -406,6 +449,7 @@ "hidden": 0, "is_query_report": 0, "label": "Expense Claims", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -414,6 +458,7 @@ "hidden": 0, "is_query_report": 0, "label": "Expense Claim", + "link_count": 0, "link_to": "Expense Claim", "link_type": "DocType", "onboard": 0, @@ -424,6 +469,7 @@ "hidden": 0, "is_query_report": 0, "label": "Employee Advance", + "link_count": 0, "link_to": "Employee Advance", "link_type": "DocType", "onboard": 0, @@ -433,6 +479,7 @@ "hidden": 0, "is_query_report": 0, "label": "Travel Request", + "link_count": 0, "link_to": "Travel Request", "link_type": "DocType", "onboard": 0, @@ -442,6 +489,7 @@ "hidden": 0, "is_query_report": 0, "label": "Settings", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -450,6 +498,7 @@ "hidden": 0, "is_query_report": 0, "label": "HR Settings", + "link_count": 0, "link_to": "HR Settings", "link_type": "DocType", "onboard": 0, @@ -460,6 +509,7 @@ "hidden": 0, "is_query_report": 0, "label": "Daily Work Summary Group", + "link_count": 0, "link_to": "Daily Work Summary Group", "link_type": "DocType", "onboard": 0, @@ -470,6 +520,7 @@ "hidden": 0, "is_query_report": 0, "label": "Team Updates", + "link_count": 0, "link_to": "team-updates", "link_type": "Page", "onboard": 0, @@ -479,6 +530,7 @@ "hidden": 0, "is_query_report": 0, "label": "Fleet Management", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -486,6 +538,7 @@ "hidden": 0, "is_query_report": 0, "label": "Driver", + "link_count": 0, "link_to": "Driver", "link_type": "DocType", "onboard": 0, @@ -496,6 +549,7 @@ "hidden": 0, "is_query_report": 0, "label": "Vehicle", + "link_count": 0, "link_to": "Vehicle", "link_type": "DocType", "onboard": 0, @@ -506,6 +560,7 @@ "hidden": 0, "is_query_report": 0, "label": "Vehicle Log", + "link_count": 0, "link_to": "Vehicle Log", "link_type": "DocType", "onboard": 0, @@ -516,6 +571,7 @@ "hidden": 0, "is_query_report": 1, "label": "Vehicle Expenses", + "link_count": 0, "link_to": "Vehicle Expenses", "link_type": "Report", "onboard": 0, @@ -525,6 +581,7 @@ "hidden": 0, "is_query_report": 0, "label": "Recruitment", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -533,6 +590,7 @@ "hidden": 0, "is_query_report": 0, "label": "Job Opening", + "link_count": 0, "link_to": "Job Opening", "link_type": "DocType", "onboard": 1, @@ -542,6 +600,7 @@ "hidden": 0, "is_query_report": 0, "label": "Employee Referral", + "link_count": 0, "link_to": "Employee Referral", "link_type": "DocType", "onboard": 0, @@ -552,6 +611,7 @@ "hidden": 0, "is_query_report": 0, "label": "Job Applicant", + "link_count": 0, "link_to": "Job Applicant", "link_type": "DocType", "onboard": 1, @@ -562,6 +622,7 @@ "hidden": 0, "is_query_report": 0, "label": "Job Offer", + "link_count": 0, "link_to": "Job Offer", "link_type": "DocType", "onboard": 1, @@ -572,6 +633,7 @@ "hidden": 0, "is_query_report": 0, "label": "Staffing Plan", + "link_count": 0, "link_to": "Staffing Plan", "link_type": "DocType", "onboard": 0, @@ -581,6 +643,7 @@ "hidden": 0, "is_query_report": 0, "label": "Appointment Letter", + "link_count": 0, "link_to": "Appointment Letter", "link_type": "DocType", "onboard": 0, @@ -590,6 +653,7 @@ "hidden": 0, "is_query_report": 0, "label": "Appointment Letter Template", + "link_count": 0, "link_to": "Appointment Letter Template", "link_type": "DocType", "onboard": 0, @@ -599,6 +663,7 @@ "hidden": 0, "is_query_report": 0, "label": "Loans", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -607,6 +672,7 @@ "hidden": 0, "is_query_report": 0, "label": "Loan Application", + "link_count": 0, "link_to": "Loan Application", "link_type": "DocType", "onboard": 0, @@ -617,6 +683,7 @@ "hidden": 0, "is_query_report": 0, "label": "Loan", + "link_count": 0, "link_to": "Loan", "link_type": "DocType", "onboard": 0, @@ -627,6 +694,7 @@ "hidden": 0, "is_query_report": 0, "label": "Loan Type", + "link_count": 0, "link_to": "Loan Type", "link_type": "DocType", "onboard": 0, @@ -636,6 +704,7 @@ "hidden": 0, "is_query_report": 0, "label": "Training", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -644,6 +713,7 @@ "hidden": 0, "is_query_report": 0, "label": "Training Program", + "link_count": 0, "link_to": "Training Program", "link_type": "DocType", "onboard": 0, @@ -654,6 +724,7 @@ "hidden": 0, "is_query_report": 0, "label": "Training Event", + "link_count": 0, "link_to": "Training Event", "link_type": "DocType", "onboard": 0, @@ -664,6 +735,7 @@ "hidden": 0, "is_query_report": 0, "label": "Training Result", + "link_count": 0, "link_to": "Training Result", "link_type": "DocType", "onboard": 0, @@ -674,6 +746,7 @@ "hidden": 0, "is_query_report": 0, "label": "Training Feedback", + "link_count": 0, "link_to": "Training Feedback", "link_type": "DocType", "onboard": 0, @@ -683,6 +756,7 @@ "hidden": 0, "is_query_report": 0, "label": "Performance", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -691,6 +765,7 @@ "hidden": 0, "is_query_report": 0, "label": "Appraisal", + "link_count": 0, "link_to": "Appraisal", "link_type": "DocType", "onboard": 0, @@ -701,6 +776,7 @@ "hidden": 0, "is_query_report": 0, "label": "Appraisal Template", + "link_count": 0, "link_to": "Appraisal Template", "link_type": "DocType", "onboard": 0, @@ -711,6 +787,7 @@ "hidden": 0, "is_query_report": 0, "label": "Energy Point Rule", + "link_count": 0, "link_to": "Energy Point Rule", "link_type": "DocType", "onboard": 0, @@ -721,6 +798,7 @@ "hidden": 0, "is_query_report": 0, "label": "Energy Point Log", + "link_count": 0, "link_to": "Energy Point Log", "link_type": "DocType", "onboard": 0, @@ -730,6 +808,7 @@ "hidden": 0, "is_query_report": 0, "label": "Key Reports", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -738,6 +817,7 @@ "hidden": 0, "is_query_report": 1, "label": "Monthly Attendance Sheet", + "link_count": 0, "link_to": "Monthly Attendance Sheet", "link_type": "Report", "onboard": 0, @@ -748,6 +828,7 @@ "hidden": 0, "is_query_report": 1, "label": "Recruitment Analytics", + "link_count": 0, "link_to": "Recruitment Analytics", "link_type": "Report", "onboard": 0, @@ -758,6 +839,7 @@ "hidden": 0, "is_query_report": 1, "label": "Employee Analytics", + "link_count": 0, "link_to": "Employee Analytics", "link_type": "Report", "onboard": 0, @@ -768,6 +850,7 @@ "hidden": 0, "is_query_report": 1, "label": "Employee Leave Balance", + "link_count": 0, "link_to": "Employee Leave Balance", "link_type": "Report", "onboard": 0, @@ -778,6 +861,7 @@ "hidden": 0, "is_query_report": 1, "label": "Employee Leave Balance Summary", + "link_count": 0, "link_to": "Employee Leave Balance Summary", "link_type": "Report", "onboard": 0, @@ -788,6 +872,7 @@ "hidden": 0, "is_query_report": 1, "label": "Employee Advance Summary", + "link_count": 0, "link_to": "Employee Advance Summary", "link_type": "Report", "onboard": 0, @@ -797,6 +882,7 @@ "hidden": 0, "is_query_report": 0, "label": "Other Reports", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -805,6 +891,7 @@ "hidden": 0, "is_query_report": 0, "label": "Employee Information", + "link_count": 0, "link_to": "Employee Information", "link_type": "Report", "onboard": 0, @@ -815,6 +902,7 @@ "hidden": 0, "is_query_report": 1, "label": "Employee Birthday", + "link_count": 0, "link_to": "Employee Birthday", "link_type": "Report", "onboard": 0, @@ -825,6 +913,7 @@ "hidden": 0, "is_query_report": 1, "label": "Employees Working on a Holiday", + "link_count": 0, "link_to": "Employees working on a holiday", "link_type": "Report", "onboard": 0, @@ -835,20 +924,26 @@ "hidden": 0, "is_query_report": 1, "label": "Daily Work Summary Replies", + "link_count": 0, "link_to": "Daily Work Summary Replies", "link_type": "Report", "onboard": 0, "type": "Link" } ], - "modified": "2021-05-13 17:19:40.524444", + "modified": "2021-08-05 12:15:59.842918", "modified_by": "Administrator", "module": "HR", "name": "HR", "onboarding": "Human Resource", "owner": "Administrator", + "parent_page": "", "pin_to_bottom": 0, "pin_to_top": 0, + "public": 1, + "restrict_to_domain": "", + "roles": [], + "sequence_id": 14, "shortcuts": [ { "color": "Green", @@ -889,5 +984,6 @@ "stats_filter": "{\n \"status\": \"Open\"\n}", "type": "Dashboard" } - ] + ], + "title": "HR" } \ No newline at end of file diff --git a/erpnext/loan_management/workspace/loan_management/loan_management.json b/erpnext/loan_management/workspace/loan_management/loan_management.json index d0b67f7c64a..ca528ec6bd9 100644 --- a/erpnext/loan_management/workspace/loan_management/loan_management.json +++ b/erpnext/loan_management/workspace/loan_management/loan_management.json @@ -1,23 +1,27 @@ { - "category": "Modules", + "category": "", "charts": [], + "content": "[{\"type\": \"header\", \"data\": {\"text\": \"Your Shortcuts\", \"level\": 4, \"col\": 12}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Loan Application\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Loan\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Dashboard\", \"col\": 4}}, {\"type\": \"spacer\", \"data\": {\"col\": 12}}, {\"type\": \"header\", \"data\": {\"text\": \"Reports & Masters\", \"level\": 4, \"col\": 12}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Loan\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Loan Processes\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Disbursement and Repayment\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Loan Security\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Reports\", \"col\": 4}}]", "creation": "2020-03-12 16:35:55.299820", "developer_mode_only": 0, "disable_user_customization": 0, "docstatus": 0, "doctype": "Workspace", + "extends": "", "extends_another_page": 0, + "for_user": "", "hide_custom": 0, "icon": "loan", "idx": 0, "is_default": 0, - "is_standard": 1, + "is_standard": 0, "label": "Loans", "links": [ { "hidden": 0, "is_query_report": 0, "label": "Loan", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -26,6 +30,7 @@ "hidden": 0, "is_query_report": 0, "label": "Loan Type", + "link_count": 0, "link_to": "Loan Type", "link_type": "DocType", "onboard": 0, @@ -36,6 +41,7 @@ "hidden": 0, "is_query_report": 0, "label": "Loan Application", + "link_count": 0, "link_to": "Loan Application", "link_type": "DocType", "onboard": 0, @@ -46,6 +52,7 @@ "hidden": 0, "is_query_report": 0, "label": "Loan", + "link_count": 0, "link_to": "Loan", "link_type": "DocType", "onboard": 0, @@ -55,6 +62,7 @@ "hidden": 0, "is_query_report": 0, "label": "Loan Processes", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -63,6 +71,7 @@ "hidden": 0, "is_query_report": 0, "label": "Process Loan Security Shortfall", + "link_count": 0, "link_to": "Process Loan Security Shortfall", "link_type": "DocType", "onboard": 0, @@ -73,6 +82,7 @@ "hidden": 0, "is_query_report": 0, "label": "Process Loan Interest Accrual", + "link_count": 0, "link_to": "Process Loan Interest Accrual", "link_type": "DocType", "onboard": 0, @@ -82,6 +92,7 @@ "hidden": 0, "is_query_report": 0, "label": "Disbursement and Repayment", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -90,6 +101,7 @@ "hidden": 0, "is_query_report": 0, "label": "Loan Disbursement", + "link_count": 0, "link_to": "Loan Disbursement", "link_type": "DocType", "onboard": 0, @@ -100,6 +112,7 @@ "hidden": 0, "is_query_report": 0, "label": "Loan Repayment", + "link_count": 0, "link_to": "Loan Repayment", "link_type": "DocType", "onboard": 0, @@ -110,6 +123,7 @@ "hidden": 0, "is_query_report": 0, "label": "Loan Write Off", + "link_count": 0, "link_to": "Loan Write Off", "link_type": "DocType", "onboard": 0, @@ -120,6 +134,7 @@ "hidden": 0, "is_query_report": 0, "label": "Loan Interest Accrual", + "link_count": 0, "link_to": "Loan Interest Accrual", "link_type": "DocType", "onboard": 0, @@ -129,6 +144,7 @@ "hidden": 0, "is_query_report": 0, "label": "Loan Security", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -137,6 +153,7 @@ "hidden": 0, "is_query_report": 0, "label": "Loan Security Type", + "link_count": 0, "link_to": "Loan Security Type", "link_type": "DocType", "onboard": 0, @@ -147,6 +164,7 @@ "hidden": 0, "is_query_report": 0, "label": "Loan Security Price", + "link_count": 0, "link_to": "Loan Security Price", "link_type": "DocType", "onboard": 0, @@ -157,6 +175,7 @@ "hidden": 0, "is_query_report": 0, "label": "Loan Security", + "link_count": 0, "link_to": "Loan Security", "link_type": "DocType", "onboard": 0, @@ -167,6 +186,7 @@ "hidden": 0, "is_query_report": 0, "label": "Loan Security Pledge", + "link_count": 0, "link_to": "Loan Security Pledge", "link_type": "DocType", "onboard": 0, @@ -177,6 +197,7 @@ "hidden": 0, "is_query_report": 0, "label": "Loan Security Unpledge", + "link_count": 0, "link_to": "Loan Security Unpledge", "link_type": "DocType", "onboard": 0, @@ -187,6 +208,7 @@ "hidden": 0, "is_query_report": 0, "label": "Loan Security Shortfall", + "link_count": 0, "link_to": "Loan Security Shortfall", "link_type": "DocType", "onboard": 0, @@ -196,6 +218,7 @@ "hidden": 0, "is_query_report": 0, "label": "Reports", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -204,6 +227,7 @@ "hidden": 0, "is_query_report": 1, "label": "Loan Repayment and Closure", + "link_count": 0, "link_to": "Loan Repayment and Closure", "link_type": "Report", "onboard": 0, @@ -214,19 +238,26 @@ "hidden": 0, "is_query_report": 1, "label": "Loan Security Status", + "link_count": 0, "link_to": "Loan Security Status", "link_type": "Report", "onboard": 0, "type": "Link" } ], - "modified": "2021-05-25 17:31:53.586508", + "modified": "2021-08-05 12:18:13.350904", "modified_by": "Administrator", "module": "Loan Management", "name": "Loans", + "onboarding": "", "owner": "Administrator", + "parent_page": "", "pin_to_bottom": 0, "pin_to_top": 0, + "public": 1, + "restrict_to_domain": "", + "roles": [], + "sequence_id": 16, "shortcuts": [ { "color": "Green", @@ -247,5 +278,6 @@ "link_to": "Loan Dashboard", "type": "Dashboard" } - ] + ], + "title": "Loans" } \ No newline at end of file diff --git a/erpnext/manufacturing/workspace/manufacturing/manufacturing.json b/erpnext/manufacturing/workspace/manufacturing/manufacturing.json index a355203e4d7..84eabcd2bdb 100644 --- a/erpnext/manufacturing/workspace/manufacturing/manufacturing.json +++ b/erpnext/manufacturing/workspace/manufacturing/manufacturing.json @@ -1,26 +1,31 @@ { - "category": "Domains", + "category": "", "charts": [ { "chart_name": "Produced Quantity" } ], + "content": "[{\"type\": \"onboarding\", \"data\": {\"onboarding_name\":\"Manufacturing\", \"col\": 12}}, {\"type\": \"chart\", \"data\": {\"chart_name\": null, \"col\": 12}}, {\"type\": \"spacer\", \"data\": {\"col\": 12}}, {\"type\": \"header\", \"data\": {\"text\": \"Your Shortcuts\", \"level\": 4, \"col\": 12}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Item\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"BOM\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Work Order\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Production Plan\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Forecasting\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Work Order Summary\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"BOM Stock Report\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Production Planning Report\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Dashboard\", \"col\": 4}}, {\"type\": \"spacer\", \"data\": {\"col\": 12}}, {\"type\": \"header\", \"data\": {\"text\": \"Reports & Masters\", \"level\": 4, \"col\": 12}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Production\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Bill of Materials\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Reports\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Tools\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Settings\", \"col\": 4}}]", "creation": "2020-03-02 17:11:37.032604", "developer_mode_only": 0, "disable_user_customization": 0, "docstatus": 0, "doctype": "Workspace", + "extends": "", "extends_another_page": 0, + "for_user": "", "hide_custom": 0, "icon": "organization", "idx": 0, - "is_standard": 1, + "is_default": 0, + "is_standard": 0, "label": "Manufacturing", "links": [ { "hidden": 0, "is_query_report": 0, "label": "Production", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -29,6 +34,7 @@ "hidden": 0, "is_query_report": 0, "label": "Work Order", + "link_count": 0, "link_to": "Work Order", "link_type": "DocType", "onboard": 1, @@ -39,6 +45,7 @@ "hidden": 0, "is_query_report": 0, "label": "Production Plan", + "link_count": 0, "link_to": "Production Plan", "link_type": "DocType", "onboard": 1, @@ -49,6 +56,7 @@ "hidden": 0, "is_query_report": 0, "label": "Stock Entry", + "link_count": 0, "link_to": "Stock Entry", "link_type": "DocType", "onboard": 1, @@ -59,6 +67,7 @@ "hidden": 0, "is_query_report": 0, "label": "Job Card", + "link_count": 0, "link_to": "Job Card", "link_type": "DocType", "onboard": 0, @@ -69,6 +78,7 @@ "hidden": 0, "is_query_report": 0, "label": "Downtime Entry", + "link_count": 0, "link_to": "Downtime Entry", "link_type": "DocType", "onboard": 0, @@ -78,6 +88,7 @@ "hidden": 0, "is_query_report": 0, "label": "Bill of Materials", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -86,6 +97,7 @@ "hidden": 0, "is_query_report": 0, "label": "Item", + "link_count": 0, "link_to": "Item", "link_type": "DocType", "onboard": 1, @@ -96,6 +108,7 @@ "hidden": 0, "is_query_report": 0, "label": "Bill of Materials", + "link_count": 0, "link_to": "BOM", "link_type": "DocType", "onboard": 1, @@ -106,6 +119,7 @@ "hidden": 0, "is_query_report": 0, "label": "Workstation", + "link_count": 0, "link_to": "Workstation", "link_type": "DocType", "onboard": 0, @@ -116,6 +130,7 @@ "hidden": 0, "is_query_report": 0, "label": "Operation", + "link_count": 0, "link_to": "Operation", "link_type": "DocType", "onboard": 0, @@ -126,6 +141,7 @@ "hidden": 0, "is_query_report": 0, "label": "Routing", + "link_count": 0, "link_to": "Routing", "link_type": "DocType", "onboard": 0, @@ -135,6 +151,7 @@ "hidden": 0, "is_query_report": 0, "label": "Reports", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -143,6 +160,7 @@ "hidden": 0, "is_query_report": 1, "label": "Production Planning Report", + "link_count": 0, "link_to": "Production Planning Report", "link_type": "Report", "onboard": 0, @@ -153,6 +171,7 @@ "hidden": 0, "is_query_report": 1, "label": "Work Order Summary", + "link_count": 0, "link_to": "Work Order Summary", "link_type": "Report", "onboard": 0, @@ -163,6 +182,7 @@ "hidden": 0, "is_query_report": 1, "label": "Quality Inspection Summary", + "link_count": 0, "link_to": "Quality Inspection Summary", "link_type": "Report", "onboard": 0, @@ -173,6 +193,7 @@ "hidden": 0, "is_query_report": 1, "label": "Downtime Analysis", + "link_count": 0, "link_to": "Downtime Analysis", "link_type": "Report", "onboard": 0, @@ -183,6 +204,7 @@ "hidden": 0, "is_query_report": 1, "label": "Job Card Summary", + "link_count": 0, "link_to": "Job Card Summary", "link_type": "Report", "onboard": 0, @@ -193,6 +215,7 @@ "hidden": 0, "is_query_report": 1, "label": "BOM Search", + "link_count": 0, "link_to": "BOM Search", "link_type": "Report", "onboard": 0, @@ -203,6 +226,7 @@ "hidden": 0, "is_query_report": 1, "label": "BOM Stock Report", + "link_count": 0, "link_to": "BOM Stock Report", "link_type": "Report", "onboard": 0, @@ -213,6 +237,7 @@ "hidden": 0, "is_query_report": 1, "label": "Production Analytics", + "link_count": 0, "link_to": "Production Analytics", "link_type": "Report", "onboard": 0, @@ -223,6 +248,7 @@ "hidden": 0, "is_query_report": 1, "label": "BOM Operations Time", + "link_count": 0, "link_to": "BOM Operations Time", "link_type": "Report", "onboard": 0, @@ -232,6 +258,7 @@ "hidden": 0, "is_query_report": 0, "label": "Tools", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -240,6 +267,7 @@ "hidden": 0, "is_query_report": 0, "label": "BOM Update Tool", + "link_count": 0, "link_to": "BOM Update Tool", "link_type": "DocType", "onboard": 0, @@ -250,6 +278,7 @@ "hidden": 0, "is_query_report": 0, "label": "BOM Comparison Tool", + "link_count": 0, "link_to": "bom-comparison-tool", "link_type": "Page", "onboard": 0, @@ -259,6 +288,7 @@ "hidden": 0, "is_query_report": 0, "label": "Settings", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -267,21 +297,26 @@ "hidden": 0, "is_query_report": 0, "label": "Manufacturing Settings", + "link_count": 0, "link_to": "Manufacturing Settings", "link_type": "DocType", "onboard": 0, "type": "Link" } ], - "modified": "2020-12-01 13:38:39.365928", + "modified": "2021-08-05 12:16:00.825741", "modified_by": "Administrator", "module": "Manufacturing", "name": "Manufacturing", "onboarding": "Manufacturing", "owner": "Administrator", + "parent_page": "", "pin_to_bottom": 0, "pin_to_top": 0, + "public": 1, "restrict_to_domain": "Manufacturing", + "roles": [], + "sequence_id": 17, "shortcuts": [ { "color": "Green", @@ -346,5 +381,6 @@ "restrict_to_domain": "Manufacturing", "type": "Dashboard" } - ] + ], + "title": "Manufacturing" } \ No newline at end of file diff --git a/erpnext/non_profit/workspace/non_profit/non_profit.json b/erpnext/non_profit/workspace/non_profit/non_profit.json index 2557d77d881..e6d4445945e 100644 --- a/erpnext/non_profit/workspace/non_profit/non_profit.json +++ b/erpnext/non_profit/workspace/non_profit/non_profit.json @@ -1,23 +1,27 @@ { - "category": "Domains", + "category": "", "charts": [], + "content": "[{\"type\": \"header\", \"data\": {\"text\": \"Your Shortcuts\", \"level\": 4, \"col\": 12}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Member\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Non Profit Settings\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Membership\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Chapter\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Chapter Member\", \"col\": 4}}, {\"type\": \"spacer\", \"data\": {\"col\": 12}}, {\"type\": \"header\", \"data\": {\"text\": \"Reports & Masters\", \"level\": 4, \"col\": 12}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Loan Management\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Grant Application\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Membership\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Volunteer\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Chapter\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Donation\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Tax Exemption Certification (India)\", \"col\": 4}}]", "creation": "2020-03-02 17:23:47.811421", "developer_mode_only": 0, "disable_user_customization": 0, "docstatus": 0, "doctype": "Workspace", + "extends": "", "extends_another_page": 0, + "for_user": "", "hide_custom": 0, "icon": "non-profit", "idx": 0, "is_default": 0, - "is_standard": 1, + "is_standard": 0, "label": "Non Profit", "links": [ { "hidden": 0, "is_query_report": 0, "label": "Loan Management", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -26,6 +30,7 @@ "hidden": 0, "is_query_report": 0, "label": "Loan Type", + "link_count": 0, "link_to": "Loan Type", "link_type": "DocType", "onboard": 0, @@ -36,6 +41,7 @@ "hidden": 0, "is_query_report": 0, "label": "Loan Application", + "link_count": 0, "link_to": "Loan Application", "link_type": "DocType", "onboard": 0, @@ -46,6 +52,7 @@ "hidden": 0, "is_query_report": 0, "label": "Loan", + "link_count": 0, "link_to": "Loan", "link_type": "DocType", "onboard": 0, @@ -55,6 +62,7 @@ "hidden": 0, "is_query_report": 0, "label": "Grant Application", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -63,6 +71,7 @@ "hidden": 0, "is_query_report": 0, "label": "Grant Application", + "link_count": 0, "link_to": "Grant Application", "link_type": "DocType", "onboard": 0, @@ -72,6 +81,7 @@ "hidden": 0, "is_query_report": 0, "label": "Membership", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -80,6 +90,7 @@ "hidden": 0, "is_query_report": 0, "label": "Member", + "link_count": 0, "link_to": "Member", "link_type": "DocType", "onboard": 1, @@ -90,6 +101,7 @@ "hidden": 0, "is_query_report": 0, "label": "Membership", + "link_count": 0, "link_to": "Membership", "link_type": "DocType", "onboard": 1, @@ -100,6 +112,7 @@ "hidden": 0, "is_query_report": 0, "label": "Membership Type", + "link_count": 0, "link_to": "Membership Type", "link_type": "DocType", "onboard": 0, @@ -110,6 +123,7 @@ "hidden": 0, "is_query_report": 0, "label": "Membership Settings", + "link_count": 0, "link_to": "Non Profit Settings", "link_type": "DocType", "onboard": 0, @@ -119,6 +133,7 @@ "hidden": 0, "is_query_report": 0, "label": "Volunteer", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -127,6 +142,7 @@ "hidden": 0, "is_query_report": 0, "label": "Volunteer", + "link_count": 0, "link_to": "Volunteer", "link_type": "DocType", "onboard": 1, @@ -137,6 +153,7 @@ "hidden": 0, "is_query_report": 0, "label": "Volunteer Type", + "link_count": 0, "link_to": "Volunteer Type", "link_type": "DocType", "onboard": 0, @@ -146,6 +163,7 @@ "hidden": 0, "is_query_report": 0, "label": "Chapter", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -154,6 +172,7 @@ "hidden": 0, "is_query_report": 0, "label": "Chapter", + "link_count": 0, "link_to": "Chapter", "link_type": "DocType", "onboard": 1, @@ -163,6 +182,7 @@ "hidden": 0, "is_query_report": 0, "label": "Donation", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -171,6 +191,7 @@ "hidden": 0, "is_query_report": 0, "label": "Donor", + "link_count": 0, "link_to": "Donor", "link_type": "DocType", "onboard": 0, @@ -181,6 +202,7 @@ "hidden": 0, "is_query_report": 0, "label": "Donor Type", + "link_count": 0, "link_to": "Donor Type", "link_type": "DocType", "onboard": 0, @@ -190,6 +212,7 @@ "hidden": 0, "is_query_report": 0, "label": "Donation", + "link_count": 0, "link_to": "Donation", "link_type": "DocType", "onboard": 0, @@ -199,6 +222,7 @@ "hidden": 0, "is_query_report": 0, "label": "Tax Exemption Certification (India)", + "link_count": 0, "link_type": "DocType", "onboard": 0, "type": "Card Break" @@ -207,20 +231,26 @@ "hidden": 0, "is_query_report": 0, "label": "Tax Exemption 80G Certificate", + "link_count": 0, "link_to": "Tax Exemption 80G Certificate", "link_type": "DocType", "onboard": 0, "type": "Link" } ], - "modified": "2021-03-11 11:38:09.140655", + "modified": "2021-08-05 12:16:01.146206", "modified_by": "Administrator", "module": "Non Profit", "name": "Non Profit", + "onboarding": "", "owner": "Administrator", + "parent_page": "", "pin_to_bottom": 0, "pin_to_top": 0, + "public": 1, "restrict_to_domain": "Non Profit", + "roles": [], + "sequence_id": 18, "shortcuts": [ { "label": "Member", @@ -247,5 +277,6 @@ "link_to": "Chapter Member", "type": "DocType" } - ] + ], + "title": "Non Profit" } \ No newline at end of file diff --git a/erpnext/payroll/workspace/payroll/payroll.json b/erpnext/payroll/workspace/payroll/payroll.json index 814973063da..b55bdc77112 100644 --- a/erpnext/payroll/workspace/payroll/payroll.json +++ b/erpnext/payroll/workspace/payroll/payroll.json @@ -1,27 +1,32 @@ { - "category": "Modules", + "category": "", "charts": [ { "chart_name": "Outgoing Salary", "label": "Outgoing Salary" } ], + "content": "[{\"type\": \"onboarding\", \"data\": {\"onboarding_name\":\"Payroll\", \"col\": 12}}, {\"type\": \"chart\", \"data\": {\"chart_name\": \"Outgoing Salary\", \"col\": 12}}, {\"type\": \"spacer\", \"data\": {\"col\": 12}}, {\"type\": \"header\", \"data\": {\"text\": \"Your Shortcuts\", \"level\": 4, \"col\": 12}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Salary Structure\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Payroll Entry\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Salary Slip\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Income Tax Slab\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Salary Register\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Dashboard\", \"col\": 4}}, {\"type\": \"spacer\", \"data\": {\"col\": 12}}, {\"type\": \"header\", \"data\": {\"text\": \"Reports & Masters\", \"level\": 4, \"col\": 12}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Payroll\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Taxation\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Compensations\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Reports\", \"col\": 4}}]", "creation": "2020-05-27 19:54:23.405607", "developer_mode_only": 0, "disable_user_customization": 0, "docstatus": 0, "doctype": "Workspace", + "extends": "", "extends_another_page": 0, + "for_user": "", "hide_custom": 0, "icon": "money-coins-1", "idx": 0, - "is_standard": 1, + "is_default": 0, + "is_standard": 0, "label": "Payroll", "links": [ { "hidden": 0, "is_query_report": 0, "label": "Payroll", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -30,6 +35,7 @@ "hidden": 0, "is_query_report": 0, "label": "Salary Component", + "link_count": 0, "link_to": "Salary Component", "link_type": "DocType", "onboard": 1, @@ -40,6 +46,7 @@ "hidden": 0, "is_query_report": 0, "label": "Salary Structure", + "link_count": 0, "link_to": "Salary Structure", "link_type": "DocType", "onboard": 1, @@ -50,6 +57,7 @@ "hidden": 0, "is_query_report": 0, "label": "Salary Structure Assignment", + "link_count": 0, "link_to": "Salary Structure Assignment", "link_type": "DocType", "onboard": 1, @@ -60,6 +68,7 @@ "hidden": 0, "is_query_report": 0, "label": "Payroll Entry", + "link_count": 0, "link_to": "Payroll Entry", "link_type": "DocType", "onboard": 1, @@ -70,6 +79,7 @@ "hidden": 0, "is_query_report": 0, "label": "Salary Slip", + "link_count": 0, "link_to": "Salary Slip", "link_type": "DocType", "onboard": 1, @@ -79,6 +89,7 @@ "hidden": 0, "is_query_report": 0, "label": "Taxation", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -87,6 +98,7 @@ "hidden": 0, "is_query_report": 0, "label": "Payroll Period", + "link_count": 0, "link_to": "Payroll Period", "link_type": "DocType", "onboard": 1, @@ -97,6 +109,7 @@ "hidden": 0, "is_query_report": 0, "label": "Income Tax Slab", + "link_count": 0, "link_to": "Income Tax Slab", "link_type": "DocType", "onboard": 1, @@ -107,6 +120,7 @@ "hidden": 0, "is_query_report": 0, "label": "Employee Other Income", + "link_count": 0, "link_to": "Employee Other Income", "link_type": "DocType", "onboard": 1, @@ -117,6 +131,7 @@ "hidden": 0, "is_query_report": 0, "label": "Employee Tax Exemption Declaration", + "link_count": 0, "link_to": "Employee Tax Exemption Declaration", "link_type": "DocType", "onboard": 1, @@ -127,6 +142,7 @@ "hidden": 0, "is_query_report": 0, "label": "Employee Tax Exemption Proof Submission", + "link_count": 0, "link_to": "Employee Tax Exemption Proof Submission", "link_type": "DocType", "onboard": 1, @@ -137,6 +153,7 @@ "hidden": 0, "is_query_report": 0, "label": "Employee Tax Exemption Category", + "link_count": 0, "link_to": "Employee Tax Exemption Category", "link_type": "DocType", "onboard": 0, @@ -147,6 +164,7 @@ "hidden": 0, "is_query_report": 0, "label": "Employee Tax Exemption Sub Category", + "link_count": 0, "link_to": "Employee Tax Exemption Sub Category", "link_type": "DocType", "onboard": 0, @@ -156,6 +174,7 @@ "hidden": 0, "is_query_report": 0, "label": "Compensations", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -164,6 +183,7 @@ "hidden": 0, "is_query_report": 0, "label": "Additional Salary", + "link_count": 0, "link_to": "Additional Salary", "link_type": "DocType", "onboard": 1, @@ -174,6 +194,7 @@ "hidden": 0, "is_query_report": 0, "label": "Retention Bonus", + "link_count": 0, "link_to": "Retention Bonus", "link_type": "DocType", "onboard": 1, @@ -184,6 +205,7 @@ "hidden": 0, "is_query_report": 0, "label": "Employee Incentive", + "link_count": 0, "link_to": "Employee Incentive", "link_type": "DocType", "onboard": 1, @@ -194,6 +216,7 @@ "hidden": 0, "is_query_report": 0, "label": "Employee Benefit Application", + "link_count": 0, "link_to": "Employee Benefit Application", "link_type": "DocType", "onboard": 0, @@ -204,6 +227,7 @@ "hidden": 0, "is_query_report": 0, "label": "Employee Benefit Claim", + "link_count": 0, "link_to": "Employee Benefit Claim", "link_type": "DocType", "onboard": 0, @@ -213,6 +237,7 @@ "hidden": 0, "is_query_report": 0, "label": "Reports", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -221,6 +246,7 @@ "hidden": 0, "is_query_report": 1, "label": "Salary Register", + "link_count": 0, "link_to": "Salary Register", "link_type": "Report", "onboard": 0, @@ -231,6 +257,7 @@ "hidden": 0, "is_query_report": 1, "label": "Salary Payments Based On Payment Mode", + "link_count": 0, "link_to": "Salary Payments Based On Payment Mode", "link_type": "Report", "onboard": 0, @@ -241,6 +268,7 @@ "hidden": 0, "is_query_report": 1, "label": "Salary Payments via ECS", + "link_count": 0, "link_to": "Salary Payments via ECS", "link_type": "Report", "onboard": 0, @@ -251,6 +279,7 @@ "hidden": 0, "is_query_report": 1, "label": "Income Tax Deductions", + "link_count": 0, "link_to": "Income Tax Deductions", "link_type": "Report", "onboard": 0, @@ -261,6 +290,7 @@ "hidden": 0, "is_query_report": 1, "label": "Professional Tax Deductions", + "link_count": 0, "link_to": "Professional Tax Deductions", "link_type": "Report", "onboard": 0, @@ -271,6 +301,7 @@ "hidden": 0, "is_query_report": 1, "label": "Provident Fund Deductions", + "link_count": 0, "link_to": "Provident Fund Deductions", "link_type": "Report", "onboard": 0, @@ -281,20 +312,26 @@ "hidden": 0, "is_query_report": 1, "label": "Bank Remittance", + "link_count": 0, "link_to": "Bank Remittance", "link_type": "Report", "onboard": 0, "type": "Link" } ], - "modified": "2020-12-01 13:38:37.205628", + "modified": "2021-08-05 12:16:01.335324", "modified_by": "Administrator", "module": "Payroll", "name": "Payroll", "onboarding": "Payroll", "owner": "Administrator", + "parent_page": "", "pin_to_bottom": 0, "pin_to_top": 0, + "public": 1, + "restrict_to_domain": "", + "roles": [], + "sequence_id": 19, "shortcuts": [ { "label": "Salary Structure", @@ -329,5 +366,6 @@ "link_to": "Payroll", "type": "Dashboard" } - ] + ], + "title": "Payroll" } \ No newline at end of file diff --git a/erpnext/projects/workspace/projects/projects.json b/erpnext/projects/workspace/projects/projects.json index c023a73ff4e..065f1eda1f3 100644 --- a/erpnext/projects/workspace/projects/projects.json +++ b/erpnext/projects/workspace/projects/projects.json @@ -1,28 +1,32 @@ { - "category": "Modules", + "category": "", "charts": [ { "chart_name": "Project Summary", "label": "Open Projects" } ], + "content": "[{\"type\": \"chart\", \"data\": {\"chart_name\": \"Open Projects\", \"col\": 12}}, {\"type\": \"spacer\", \"data\": {\"col\": 12}}, {\"type\": \"header\", \"data\": {\"text\": \"Your Shortcuts\", \"level\": 4, \"col\": 12}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Task\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Project\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Timesheet\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Project Billing Summary\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Dashboard\", \"col\": 4}}, {\"type\": \"spacer\", \"data\": {\"col\": 12}}, {\"type\": \"header\", \"data\": {\"text\": \"Reports & Masters\", \"level\": 4, \"col\": 12}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Projects\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Time Tracking\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Reports\", \"col\": 4}}]", "creation": "2020-03-02 15:46:04.874669", "developer_mode_only": 0, "disable_user_customization": 0, "docstatus": 0, "doctype": "Workspace", + "extends": "", "extends_another_page": 0, + "for_user": "", "hide_custom": 0, "icon": "project", "idx": 0, "is_default": 0, - "is_standard": 1, + "is_standard": 0, "label": "Projects", "links": [ { "hidden": 0, "is_query_report": 0, "label": "Projects", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -31,6 +35,7 @@ "hidden": 0, "is_query_report": 0, "label": "Project", + "link_count": 0, "link_to": "Project", "link_type": "DocType", "onboard": 1, @@ -41,6 +46,7 @@ "hidden": 0, "is_query_report": 0, "label": "Task", + "link_count": 0, "link_to": "Task", "link_type": "DocType", "onboard": 1, @@ -51,6 +57,7 @@ "hidden": 0, "is_query_report": 0, "label": "Project Template", + "link_count": 0, "link_to": "Project Template", "link_type": "DocType", "onboard": 0, @@ -61,6 +68,7 @@ "hidden": 0, "is_query_report": 0, "label": "Project Type", + "link_count": 0, "link_to": "Project Type", "link_type": "DocType", "onboard": 0, @@ -71,6 +79,7 @@ "hidden": 0, "is_query_report": 0, "label": "Project Update", + "link_count": 0, "link_to": "Project Update", "link_type": "DocType", "onboard": 0, @@ -80,6 +89,7 @@ "hidden": 0, "is_query_report": 0, "label": "Time Tracking", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -88,6 +98,7 @@ "hidden": 0, "is_query_report": 0, "label": "Timesheet", + "link_count": 0, "link_to": "Timesheet", "link_type": "DocType", "onboard": 1, @@ -98,6 +109,7 @@ "hidden": 0, "is_query_report": 0, "label": "Activity Type", + "link_count": 0, "link_to": "Activity Type", "link_type": "DocType", "onboard": 1, @@ -108,6 +120,7 @@ "hidden": 0, "is_query_report": 0, "label": "Activity Cost", + "link_count": 0, "link_to": "Activity Cost", "link_type": "DocType", "onboard": 0, @@ -117,6 +130,7 @@ "hidden": 0, "is_query_report": 0, "label": "Reports", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -125,6 +139,7 @@ "hidden": 0, "is_query_report": 1, "label": "Daily Timesheet Summary", + "link_count": 0, "link_to": "Daily Timesheet Summary", "link_type": "Report", "onboard": 1, @@ -135,6 +150,7 @@ "hidden": 0, "is_query_report": 1, "label": "Employee Hours Utilization", + "link_count": 0, "link_to": "Employee Hours Utilization Based On Timesheet", "link_type": "Report", "onboard": 0, @@ -145,6 +161,7 @@ "hidden": 0, "is_query_report": 1, "label": "Project Profitability", + "link_count": 0, "link_to": "Project Profitability", "link_type": "Report", "onboard": 0, @@ -155,6 +172,7 @@ "hidden": 0, "is_query_report": 1, "label": "Project wise Stock Tracking", + "link_count": 0, "link_to": "Project wise Stock Tracking", "link_type": "Report", "onboard": 0, @@ -165,6 +183,7 @@ "hidden": 0, "is_query_report": 1, "label": "Project Billing Summary", + "link_count": 0, "link_to": "Project Billing Summary", "link_type": "Report", "onboard": 0, @@ -175,19 +194,26 @@ "hidden": 0, "is_query_report": 1, "label": "Delayed Tasks Summary", + "link_count": 0, "link_to": "Delayed Tasks Summary", "link_type": "Report", "onboard": 0, "type": "Link" } ], - "modified": "2021-04-25 16:27:16.548780", + "modified": "2021-08-05 12:16:01.540145", "modified_by": "Administrator", "module": "Projects", "name": "Projects", + "onboarding": "", "owner": "Administrator", + "parent_page": "", "pin_to_bottom": 0, "pin_to_top": 0, + "public": 1, + "restrict_to_domain": "", + "roles": [], + "sequence_id": 20, "shortcuts": [ { "color": "Blue", @@ -220,5 +246,6 @@ "link_to": "Project", "type": "Dashboard" } - ] + ], + "title": "Projects" } \ No newline at end of file diff --git a/erpnext/quality_management/workspace/quality/quality.json b/erpnext/quality_management/workspace/quality/quality.json index e5fef435505..4dc8129d890 100644 --- a/erpnext/quality_management/workspace/quality/quality.json +++ b/erpnext/quality_management/workspace/quality/quality.json @@ -1,22 +1,27 @@ { - "category": "Modules", + "category": "", "charts": [], + "content": "[{\"type\": \"header\", \"data\": {\"text\": \"Your Shortcuts\", \"level\": 4, \"col\": 12}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Quality Goal\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Quality Procedure\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Quality Inspection\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Quality Review\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Quality Action\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Non Conformance\", \"col\": 4}}, {\"type\": \"spacer\", \"data\": {\"col\": 12}}, {\"type\": \"header\", \"data\": {\"text\": \"Reports & Masters\", \"level\": 4, \"col\": 12}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Goal and Procedure\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Feedback\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Meeting\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Review and Action\", \"col\": 4}}]", "creation": "2020-03-02 15:49:28.632014", "developer_mode_only": 0, "disable_user_customization": 0, "docstatus": 0, "doctype": "Workspace", + "extends": "", "extends_another_page": 0, + "for_user": "", "hide_custom": 0, "icon": "quality", "idx": 0, - "is_standard": 1, + "is_default": 0, + "is_standard": 0, "label": "Quality", "links": [ { "hidden": 0, "is_query_report": 0, "label": "Goal and Procedure", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -25,6 +30,7 @@ "hidden": 0, "is_query_report": 0, "label": "Quality Goal", + "link_count": 0, "link_to": "Quality Goal", "link_type": "DocType", "onboard": 1, @@ -35,6 +41,7 @@ "hidden": 0, "is_query_report": 0, "label": "Quality Procedure", + "link_count": 0, "link_to": "Quality Procedure", "link_type": "DocType", "onboard": 1, @@ -45,6 +52,7 @@ "hidden": 0, "is_query_report": 0, "label": "Tree of Procedures", + "link_count": 0, "link_to": "Quality Procedure", "link_type": "DocType", "onboard": 0, @@ -54,6 +62,7 @@ "hidden": 0, "is_query_report": 0, "label": "Feedback", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -62,6 +71,7 @@ "hidden": 0, "is_query_report": 0, "label": "Quality Feedback", + "link_count": 0, "link_to": "Quality Feedback", "link_type": "DocType", "onboard": 1, @@ -72,6 +82,7 @@ "hidden": 0, "is_query_report": 0, "label": "Quality Feedback Template", + "link_count": 0, "link_to": "Quality Feedback Template", "link_type": "DocType", "onboard": 0, @@ -81,6 +92,7 @@ "hidden": 0, "is_query_report": 0, "label": "Meeting", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -89,6 +101,7 @@ "hidden": 0, "is_query_report": 0, "label": "Quality Meeting", + "link_count": 0, "link_to": "Quality Meeting", "link_type": "DocType", "onboard": 0, @@ -98,6 +111,7 @@ "hidden": 0, "is_query_report": 0, "label": "Review and Action", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -106,6 +120,7 @@ "hidden": 0, "is_query_report": 0, "label": "Non Conformance", + "link_count": 0, "link_to": "Non Conformance", "link_type": "DocType", "onboard": 0, @@ -116,6 +131,7 @@ "hidden": 0, "is_query_report": 0, "label": "Quality Review", + "link_count": 0, "link_to": "Quality Review", "link_type": "DocType", "onboard": 0, @@ -126,19 +142,26 @@ "hidden": 0, "is_query_report": 0, "label": "Quality Action", + "link_count": 0, "link_to": "Quality Action", "link_type": "DocType", "onboard": 0, "type": "Link" } ], - "modified": "2020-12-01 13:38:35.120213", + "modified": "2021-08-05 12:16:01.699912", "modified_by": "Administrator", "module": "Quality Management", "name": "Quality", + "onboarding": "", "owner": "Administrator", + "parent_page": "", "pin_to_bottom": 0, "pin_to_top": 0, + "public": 1, + "restrict_to_domain": "", + "roles": [], + "sequence_id": 21, "shortcuts": [ { "color": "Grey", @@ -186,5 +209,6 @@ "stats_filter": "{\"status\": \"Open\"}", "type": "DocType" } - ] + ], + "title": "Quality" } \ No newline at end of file diff --git a/erpnext/selling/workspace/retail/retail.json b/erpnext/selling/workspace/retail/retail.json index e20f8347c25..9d2e6cabbc3 100644 --- a/erpnext/selling/workspace/retail/retail.json +++ b/erpnext/selling/workspace/retail/retail.json @@ -1,22 +1,27 @@ { - "category": "Domains", + "category": "", "charts": [], + "content": "[{\"type\": \"header\", \"data\": {\"text\": \"Your Shortcuts\", \"level\": 4, \"col\": 12}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Point Of Sale\", \"col\": 4}}, {\"type\": \"spacer\", \"data\": {\"col\": 12}}, {\"type\": \"header\", \"data\": {\"text\": \"Reports & Masters\", \"level\": 4, \"col\": 12}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Settings & Configurations\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Loyalty Program\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Opening & Closing\", \"col\": 4}}]", "creation": "2020-03-02 17:18:32.505616", "developer_mode_only": 0, "disable_user_customization": 0, "docstatus": 0, "doctype": "Workspace", + "extends": "", "extends_another_page": 0, + "for_user": "", "hide_custom": 0, "icon": "retail", "idx": 0, - "is_standard": 1, + "is_default": 0, + "is_standard": 0, "label": "Retail", "links": [ { "hidden": 0, "is_query_report": 0, "label": "Settings & Configurations", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -25,6 +30,7 @@ "hidden": 0, "is_query_report": 0, "label": "Point-of-Sale Profile", + "link_count": 0, "link_to": "POS Profile", "link_type": "DocType", "onboard": 1, @@ -35,6 +41,7 @@ "hidden": 0, "is_query_report": 0, "label": "POS Settings", + "link_count": 0, "link_to": "POS Settings", "link_type": "DocType", "onboard": 0, @@ -44,6 +51,7 @@ "hidden": 0, "is_query_report": 0, "label": "Loyalty Program", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -52,6 +60,7 @@ "hidden": 0, "is_query_report": 0, "label": "Loyalty Program", + "link_count": 0, "link_to": "Loyalty Program", "link_type": "DocType", "onboard": 0, @@ -62,6 +71,7 @@ "hidden": 0, "is_query_report": 0, "label": "Loyalty Point Entry", + "link_count": 0, "link_to": "Loyalty Point Entry", "link_type": "DocType", "onboard": 0, @@ -71,6 +81,7 @@ "hidden": 0, "is_query_report": 0, "label": "Opening & Closing", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -79,6 +90,7 @@ "hidden": 0, "is_query_report": 0, "label": "POS Opening Entry", + "link_count": 0, "link_to": "POS Opening Entry", "link_type": "DocType", "onboard": 0, @@ -89,20 +101,26 @@ "hidden": 0, "is_query_report": 0, "label": "POS Closing Entry", + "link_count": 0, "link_to": "POS Closing Entry", "link_type": "DocType", "onboard": 0, "type": "Link" } ], - "modified": "2020-12-01 13:38:36.758038", + "modified": "2021-08-05 12:16:01.840988", "modified_by": "Administrator", "module": "Selling", "name": "Retail", + "onboarding": "", "owner": "Administrator", + "parent_page": "", "pin_to_bottom": 0, "pin_to_top": 0, + "public": 1, "restrict_to_domain": "Retail", + "roles": [], + "sequence_id": 22, "shortcuts": [ { "doc_view": "", @@ -110,5 +128,6 @@ "link_to": "point-of-sale", "type": "Page" } - ] + ], + "title": "Retail" } \ No newline at end of file diff --git a/erpnext/selling/workspace/selling/selling.json b/erpnext/selling/workspace/selling/selling.json index 879034a0dfc..345187f93c4 100644 --- a/erpnext/selling/workspace/selling/selling.json +++ b/erpnext/selling/workspace/selling/selling.json @@ -1,5 +1,5 @@ { - "category": "Modules", + "category": "", "charts": [ { "chart_name": "Sales Order Trends", @@ -7,22 +7,27 @@ } ], "charts_label": "Selling ", + "content": "[{\"type\": \"onboarding\", \"data\": {\"onboarding_name\":\"Selling\", \"col\": 12}}, {\"type\": \"chart\", \"data\": {\"chart_name\": \"Sales Order Trends\", \"col\": 12}}, {\"type\": \"spacer\", \"data\": {\"col\": 12}}, {\"type\": \"header\", \"data\": {\"text\": \"Quick Access\", \"level\": 4, \"col\": 12}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Item\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Sales Order\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Sales Analytics\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Sales Order Analysis\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Dashboard\", \"col\": 4}}, {\"type\": \"spacer\", \"data\": {\"col\": 12}}, {\"type\": \"header\", \"data\": {\"text\": \"Reports & Masters\", \"level\": 4, \"col\": 12}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Selling\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Items and Pricing\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Settings\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Key Reports\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Other Reports\", \"col\": 4}}]", "creation": "2020-01-28 11:49:12.092882", "developer_mode_only": 0, "disable_user_customization": 0, "docstatus": 0, "doctype": "Workspace", + "extends": "", "extends_another_page": 0, - "hide_custom": 1, + "for_user": "", + "hide_custom": 0, "icon": "sell", "idx": 0, - "is_standard": 1, + "is_default": 0, + "is_standard": 0, "label": "Selling", "links": [ { "hidden": 0, "is_query_report": 0, "label": "Selling", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -31,6 +36,7 @@ "hidden": 0, "is_query_report": 0, "label": "Customer", + "link_count": 0, "link_to": "Customer", "link_type": "DocType", "onboard": 1, @@ -41,6 +47,7 @@ "hidden": 0, "is_query_report": 0, "label": "Quotation", + "link_count": 0, "link_to": "Quotation", "link_type": "DocType", "onboard": 1, @@ -51,6 +58,7 @@ "hidden": 0, "is_query_report": 0, "label": "Sales Order", + "link_count": 0, "link_to": "Sales Order", "link_type": "DocType", "onboard": 1, @@ -61,6 +69,7 @@ "hidden": 0, "is_query_report": 0, "label": "Sales Invoice", + "link_count": 0, "link_to": "Sales Invoice", "link_type": "DocType", "onboard": 1, @@ -71,6 +80,7 @@ "hidden": 0, "is_query_report": 0, "label": "Blanket Order", + "link_count": 0, "link_to": "Blanket Order", "link_type": "DocType", "onboard": 1, @@ -81,6 +91,7 @@ "hidden": 0, "is_query_report": 0, "label": "Sales Partner", + "link_count": 0, "link_to": "Sales Partner", "link_type": "DocType", "onboard": 0, @@ -91,6 +102,7 @@ "hidden": 0, "is_query_report": 0, "label": "Sales Person", + "link_count": 0, "link_to": "Sales Person", "link_type": "DocType", "onboard": 0, @@ -100,6 +112,7 @@ "hidden": 0, "is_query_report": 0, "label": "Items and Pricing", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -108,6 +121,7 @@ "hidden": 0, "is_query_report": 0, "label": "Item", + "link_count": 0, "link_to": "Item", "link_type": "DocType", "onboard": 1, @@ -118,6 +132,7 @@ "hidden": 0, "is_query_report": 0, "label": "Item Price", + "link_count": 0, "link_to": "Item Price", "link_type": "DocType", "onboard": 1, @@ -128,6 +143,7 @@ "hidden": 0, "is_query_report": 0, "label": "Price List", + "link_count": 0, "link_to": "Price List", "link_type": "DocType", "onboard": 1, @@ -138,6 +154,7 @@ "hidden": 0, "is_query_report": 0, "label": "Item Group", + "link_count": 0, "link_to": "Item Group", "link_type": "DocType", "onboard": 1, @@ -148,6 +165,7 @@ "hidden": 0, "is_query_report": 0, "label": "Product Bundle", + "link_count": 0, "link_to": "Product Bundle", "link_type": "DocType", "onboard": 0, @@ -158,6 +176,7 @@ "hidden": 0, "is_query_report": 0, "label": "Promotional Scheme", + "link_count": 0, "link_to": "Promotional Scheme", "link_type": "DocType", "onboard": 0, @@ -168,6 +187,7 @@ "hidden": 0, "is_query_report": 0, "label": "Pricing Rule", + "link_count": 0, "link_to": "Pricing Rule", "link_type": "DocType", "onboard": 0, @@ -178,6 +198,7 @@ "hidden": 0, "is_query_report": 0, "label": "Shipping Rule", + "link_count": 0, "link_to": "Shipping Rule", "link_type": "DocType", "onboard": 0, @@ -188,6 +209,7 @@ "hidden": 0, "is_query_report": 0, "label": "Coupon Code", + "link_count": 0, "link_to": "Coupon Code", "link_type": "DocType", "onboard": 0, @@ -197,6 +219,7 @@ "hidden": 0, "is_query_report": 0, "label": "Settings", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -205,6 +228,7 @@ "hidden": 0, "is_query_report": 0, "label": "Selling Settings", + "link_count": 0, "link_to": "Selling Settings", "link_type": "DocType", "onboard": 0, @@ -215,6 +239,7 @@ "hidden": 0, "is_query_report": 0, "label": "Terms and Conditions Template", + "link_count": 0, "link_to": "Terms and Conditions", "link_type": "DocType", "onboard": 1, @@ -225,6 +250,7 @@ "hidden": 0, "is_query_report": 0, "label": "Sales Taxes and Charges Template", + "link_count": 0, "link_to": "Sales Taxes and Charges Template", "link_type": "DocType", "onboard": 1, @@ -235,6 +261,7 @@ "hidden": 0, "is_query_report": 0, "label": "Lead Source", + "link_count": 0, "link_to": "Lead Source", "link_type": "DocType", "onboard": 0, @@ -245,6 +272,7 @@ "hidden": 0, "is_query_report": 0, "label": "Customer Group", + "link_count": 0, "link_to": "Customer Group", "link_type": "DocType", "onboard": 0, @@ -255,6 +283,7 @@ "hidden": 0, "is_query_report": 0, "label": "Contact", + "link_count": 0, "link_to": "Contact", "link_type": "DocType", "onboard": 0, @@ -265,6 +294,7 @@ "hidden": 0, "is_query_report": 0, "label": "Address", + "link_count": 0, "link_to": "Address", "link_type": "DocType", "onboard": 0, @@ -275,6 +305,7 @@ "hidden": 0, "is_query_report": 0, "label": "Territory", + "link_count": 0, "link_to": "Territory", "link_type": "DocType", "onboard": 0, @@ -285,6 +316,7 @@ "hidden": 0, "is_query_report": 0, "label": "Campaign", + "link_count": 0, "link_to": "Campaign", "link_type": "DocType", "onboard": 0, @@ -294,6 +326,7 @@ "hidden": 0, "is_query_report": 0, "label": "Key Reports", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -302,6 +335,7 @@ "hidden": 0, "is_query_report": 1, "label": "Sales Analytics", + "link_count": 0, "link_to": "Sales Analytics", "link_type": "Report", "onboard": 1, @@ -312,6 +346,7 @@ "hidden": 0, "is_query_report": 1, "label": "Sales Order Analysis", + "link_count": 0, "link_to": "Sales Order Analysis", "link_type": "Report", "onboard": 1, @@ -322,6 +357,7 @@ "hidden": 0, "is_query_report": 0, "label": "Sales Funnel", + "link_count": 0, "link_to": "sales-funnel", "link_type": "Page", "onboard": 1, @@ -332,6 +368,7 @@ "hidden": 0, "is_query_report": 1, "label": "Sales Order Trends", + "link_count": 0, "link_to": "Sales Order Trends", "link_type": "Report", "onboard": 0, @@ -342,6 +379,7 @@ "hidden": 0, "is_query_report": 1, "label": "Quotation Trends", + "link_count": 0, "link_to": "Quotation Trends", "link_type": "Report", "onboard": 0, @@ -352,6 +390,7 @@ "hidden": 0, "is_query_report": 1, "label": "Customer Acquisition and Loyalty", + "link_count": 0, "link_to": "Customer Acquisition and Loyalty", "link_type": "Report", "onboard": 0, @@ -362,6 +401,7 @@ "hidden": 0, "is_query_report": 1, "label": "Inactive Customers", + "link_count": 0, "link_to": "Inactive Customers", "link_type": "Report", "onboard": 0, @@ -372,6 +412,7 @@ "hidden": 0, "is_query_report": 1, "label": "Sales Person-wise Transaction Summary", + "link_count": 0, "link_to": "Sales Person-wise Transaction Summary", "link_type": "Report", "onboard": 0, @@ -382,6 +423,7 @@ "hidden": 0, "is_query_report": 1, "label": "Item-wise Sales History", + "link_count": 0, "link_to": "Item-wise Sales History", "link_type": "Report", "onboard": 0, @@ -391,6 +433,7 @@ "hidden": 0, "is_query_report": 0, "label": "Other Reports", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -399,6 +442,7 @@ "hidden": 0, "is_query_report": 1, "label": "Lead Details", + "link_count": 0, "link_to": "Lead Details", "link_type": "Report", "onboard": 0, @@ -409,6 +453,7 @@ "hidden": 0, "is_query_report": 1, "label": "Customer Addresses And Contacts", + "link_count": 0, "link_to": "Address And Contacts", "link_type": "Report", "onboard": 0, @@ -419,6 +464,7 @@ "hidden": 0, "is_query_report": 1, "label": "Available Stock for Packing Items", + "link_count": 0, "link_to": "Available Stock for Packing Items", "link_type": "Report", "onboard": 0, @@ -429,6 +475,7 @@ "hidden": 0, "is_query_report": 1, "label": "Pending SO Items For Purchase Request", + "link_count": 0, "link_to": "Pending SO Items For Purchase Request", "link_type": "Report", "onboard": 0, @@ -439,6 +486,7 @@ "hidden": 0, "is_query_report": 1, "label": "Delivery Note Trends", + "link_count": 0, "link_to": "Delivery Note Trends", "link_type": "Report", "onboard": 0, @@ -449,6 +497,7 @@ "hidden": 0, "is_query_report": 1, "label": "Sales Invoice Trends", + "link_count": 0, "link_to": "Sales Invoice Trends", "link_type": "Report", "onboard": 0, @@ -459,6 +508,7 @@ "hidden": 0, "is_query_report": 1, "label": "Customer Credit Balance", + "link_count": 0, "link_to": "Customer Credit Balance", "link_type": "Report", "onboard": 0, @@ -469,6 +519,7 @@ "hidden": 0, "is_query_report": 1, "label": "Customers Without Any Sales Transactions", + "link_count": 0, "link_to": "Customers Without Any Sales Transactions", "link_type": "Report", "onboard": 0, @@ -479,6 +530,7 @@ "hidden": 0, "is_query_report": 1, "label": "Sales Partners Commission", + "link_count": 0, "link_to": "Sales Partners Commission", "link_type": "Report", "onboard": 0, @@ -489,6 +541,7 @@ "hidden": 0, "is_query_report": 1, "label": "Territory Target Variance Based On Item Group", + "link_count": 0, "link_to": "Territory Target Variance Based On Item Group", "link_type": "Report", "onboard": 0, @@ -499,6 +552,7 @@ "hidden": 0, "is_query_report": 1, "label": "Sales Person Target Variance Based On Item Group", + "link_count": 0, "link_to": "Sales Person Target Variance Based On Item Group", "link_type": "Report", "onboard": 0, @@ -509,20 +563,26 @@ "hidden": 0, "is_query_report": 1, "label": "Sales Partner Target Variance Based On Item Group", + "link_count": 0, "link_to": "Sales Partner Target Variance based on Item Group", "link_type": "Report", "onboard": 0, "type": "Link" } ], - "modified": "2020-12-01 13:38:35.971277", + "modified": "2021-08-05 12:16:01.990702", "modified_by": "Administrator", "module": "Selling", "name": "Selling", "onboarding": "Selling", "owner": "Administrator", + "parent_page": "", "pin_to_bottom": 0, "pin_to_top": 0, + "public": 1, + "restrict_to_domain": "", + "roles": [], + "sequence_id": 23, "shortcuts": [ { "color": "Grey", @@ -559,5 +619,6 @@ "type": "Dashboard" } ], - "shortcuts_label": "Quick Access" + "shortcuts_label": "Quick Access", + "title": "Selling" } \ No newline at end of file diff --git a/erpnext/setup/workspace/erpnext_settings/erpnext_settings.json b/erpnext/setup/workspace/erpnext_settings/erpnext_settings.json index 6ca3d637da4..ef4b050ceb2 100644 --- a/erpnext/setup/workspace/erpnext_settings/erpnext_settings.json +++ b/erpnext/setup/workspace/erpnext_settings/erpnext_settings.json @@ -1,27 +1,35 @@ { - "category": "Modules", + "category": "", "charts": [], + "content": "[{\"type\": \"header\", \"data\": {\"text\": \"Your Shortcuts\", \"level\": 4, \"col\": 12}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Projects Settings\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Accounts Settings\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Stock Settings\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"HR Settings\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Selling Settings\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Buying Settings\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Support Settings\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Shopping Cart Settings\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Portal Settings\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Manufacturing Settings\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Education Settings\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Hotel Settings\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Healthcare Settings\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Domain Settings\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Products Settings\", \"col\": 4}}]", "creation": "2020-03-12 14:47:51.166455", "developer_mode_only": 0, "disable_user_customization": 0, "docstatus": 0, "doctype": "Workspace", - "extends": "Settings", - "extends_another_page": 1, + "extends": "", + "extends_another_page": 0, + "for_user": "", "hide_custom": 0, - "icon": "settings", + "icon": "setting", "idx": 0, "is_default": 0, - "is_standard": 1, + "is_standard": 0, "label": "ERPNext Settings", "links": [], - "modified": "2021-06-12 01:58:11.399566", + "modified": "2021-08-05 12:15:59.052327", "modified_by": "Administrator", "module": "Setup", "name": "ERPNext Settings", + "onboarding": "", "owner": "Administrator", + "parent_page": "", "pin_to_bottom": 0, "pin_to_top": 0, + "public": 1, + "restrict_to_domain": "", + "roles": [], + "sequence_id": 12, "shortcuts": [ { "icon": "project", @@ -118,5 +126,6 @@ "link_to": "Products Settings", "type": "DocType" } - ] -} + ], + "title": "ERPNext Settings" +} \ No newline at end of file diff --git a/erpnext/setup/workspace/home/home.json b/erpnext/setup/workspace/home/home.json index 1576d5a3993..cc9569f6421 100644 --- a/erpnext/setup/workspace/home/home.json +++ b/erpnext/setup/workspace/home/home.json @@ -1,23 +1,27 @@ { - "category": "Modules", + "category": "", "charts": [], + "content": "[{\"type\":\"spacer\",\"data\":{\"col\":12}},{\"type\":\"header\",\"data\":{\"text\":\"Your Shortcuts\",\"level\":4,\"col\":12}},{\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Item\",\"col\":4}},{\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Customer\",\"col\":4}},{\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Supplier\",\"col\":4}},{\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Sales Invoice\",\"col\":4}},{\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Leaderboard\",\"col\":4}},{\"type\":\"spacer\",\"data\":{\"col\":12}},{\"type\":\"header\",\"data\":{\"text\":\"Reports & Masters\",\"level\":4,\"col\":12}},{\"type\":\"card\",\"data\":{\"card_name\":\"Accounting\",\"col\":4}},{\"type\":\"card\",\"data\":{\"card_name\":\"Stock\",\"col\":4}},{\"type\":\"card\",\"data\":{\"card_name\":\"Human Resources\",\"col\":4}},{\"type\":\"card\",\"data\":{\"card_name\":\"CRM\",\"col\":4}},{\"type\":\"card\",\"data\":{\"card_name\":\"Data Import and Settings\",\"col\":4}}]", "creation": "2020-01-23 13:46:38.833076", "developer_mode_only": 0, "disable_user_customization": 0, "docstatus": 0, "doctype": "Workspace", + "extends": "", "extends_another_page": 0, + "for_user": "", "hide_custom": 0, "icon": "getting-started", "idx": 0, "is_default": 0, - "is_standard": 1, + "is_standard": 0, "label": "Home", "links": [ { "hidden": 0, "is_query_report": 0, "label": "Accounting", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -26,6 +30,7 @@ "hidden": 0, "is_query_report": 0, "label": "Chart of Accounts", + "link_count": 0, "link_to": "Account", "link_type": "DocType", "onboard": 1, @@ -36,6 +41,7 @@ "hidden": 0, "is_query_report": 0, "label": "Company", + "link_count": 0, "link_to": "Company", "link_type": "DocType", "onboard": 1, @@ -46,6 +52,7 @@ "hidden": 0, "is_query_report": 0, "label": "Customer", + "link_count": 0, "link_to": "Customer", "link_type": "DocType", "onboard": 1, @@ -56,6 +63,7 @@ "hidden": 0, "is_query_report": 0, "label": "Supplier", + "link_count": 0, "link_to": "Supplier", "link_type": "DocType", "onboard": 1, @@ -65,6 +73,7 @@ "hidden": 0, "is_query_report": 0, "label": "Stock", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -73,6 +82,7 @@ "hidden": 0, "is_query_report": 0, "label": "Item", + "link_count": 0, "link_to": "Item", "link_type": "DocType", "onboard": 1, @@ -83,6 +93,7 @@ "hidden": 0, "is_query_report": 0, "label": "Warehouse", + "link_count": 0, "link_to": "Warehouse", "link_type": "DocType", "onboard": 1, @@ -93,6 +104,7 @@ "hidden": 0, "is_query_report": 0, "label": "Brand", + "link_count": 0, "link_to": "Brand", "link_type": "DocType", "onboard": 1, @@ -103,6 +115,7 @@ "hidden": 0, "is_query_report": 0, "label": "Unit of Measure (UOM)", + "link_count": 0, "link_to": "UOM", "link_type": "DocType", "onboard": 1, @@ -113,6 +126,7 @@ "hidden": 0, "is_query_report": 0, "label": "Stock Reconciliation", + "link_count": 0, "link_to": "Stock Reconciliation", "link_type": "DocType", "onboard": 1, @@ -122,6 +136,7 @@ "hidden": 0, "is_query_report": 0, "label": "Human Resources", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -130,6 +145,7 @@ "hidden": 0, "is_query_report": 0, "label": "Employee", + "link_count": 0, "link_to": "Employee", "link_type": "DocType", "onboard": 1, @@ -140,6 +156,7 @@ "hidden": 0, "is_query_report": 0, "label": "Employee Attendance Tool", + "link_count": 0, "link_to": "Employee Attendance Tool", "link_type": "DocType", "onboard": 1, @@ -150,6 +167,7 @@ "hidden": 0, "is_query_report": 0, "label": "Salary Structure", + "link_count": 0, "link_to": "Salary Structure", "link_type": "DocType", "onboard": 1, @@ -159,6 +177,7 @@ "hidden": 0, "is_query_report": 0, "label": "CRM", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -167,6 +186,7 @@ "hidden": 0, "is_query_report": 0, "label": "Lead", + "link_count": 0, "link_to": "Lead", "link_type": "DocType", "onboard": 1, @@ -177,6 +197,7 @@ "hidden": 0, "is_query_report": 0, "label": "Customer Group", + "link_count": 0, "link_to": "Customer Group", "link_type": "DocType", "onboard": 1, @@ -187,6 +208,7 @@ "hidden": 0, "is_query_report": 0, "label": "Territory", + "link_count": 0, "link_to": "Territory", "link_type": "DocType", "onboard": 1, @@ -196,6 +218,7 @@ "hidden": 0, "is_query_report": 0, "label": "Data Import and Settings", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -204,6 +227,7 @@ "hidden": 0, "is_query_report": 0, "label": "Import Data", + "link_count": 0, "link_to": "Data Import", "link_type": "DocType", "onboard": 1, @@ -214,6 +238,7 @@ "hidden": 0, "is_query_report": 0, "label": "Opening Invoice Creation Tool", + "link_count": 0, "link_to": "Opening Invoice Creation Tool", "link_type": "DocType", "onboard": 1, @@ -224,6 +249,7 @@ "hidden": 0, "is_query_report": 0, "label": "Chart of Accounts Importer", + "link_count": 0, "link_to": "Chart of Accounts Importer", "link_type": "DocType", "onboard": 1, @@ -234,6 +260,7 @@ "hidden": 0, "is_query_report": 0, "label": "Letter Head", + "link_count": 0, "link_to": "Letter Head", "link_type": "DocType", "onboard": 1, @@ -244,19 +271,26 @@ "hidden": 0, "is_query_report": 0, "label": "Email Account", + "link_count": 0, "link_to": "Email Account", "link_type": "DocType", "onboard": 1, "type": "Link" } ], - "modified": "2021-04-19 15:48:44.089927", + "modified": "2021-08-10 15:33:20.704740", "modified_by": "Administrator", "module": "Setup", "name": "Home", + "onboarding": "", "owner": "Administrator", + "parent_page": "", "pin_to_bottom": 0, - "pin_to_top": 1, + "pin_to_top": 0, + "public": 1, + "restrict_to_domain": "", + "roles": [], + "sequence_id": 1, "shortcuts": [ { "label": "Item", @@ -283,5 +317,6 @@ "link_to": "leaderboard", "type": "Page" } - ] + ], + "title": "Home" } \ No newline at end of file diff --git a/erpnext/stock/workspace/stock/stock.json b/erpnext/stock/workspace/stock/stock.json index 529ce8eb61e..26d10ce7038 100644 --- a/erpnext/stock/workspace/stock/stock.json +++ b/erpnext/stock/workspace/stock/stock.json @@ -1,28 +1,32 @@ { "cards_label": "Masters & Reports", - "category": "Modules", + "category": "", "charts": [ { "chart_name": "Warehouse wise Stock Value" } ], + "content": "[{\"type\": \"onboarding\", \"data\": {\"onboarding_name\":\"Stock\", \"col\": 12}}, {\"type\": \"chart\", \"data\": {\"chart_name\": null, \"col\": 12}}, {\"type\": \"spacer\", \"data\": {\"col\": 12}}, {\"type\": \"header\", \"data\": {\"text\": \"Quick Access\", \"level\": 4, \"col\": 12}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Item\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Material Request\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Stock Entry\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Purchase Receipt\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Delivery Note\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Stock Ledger\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Stock Balance\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Dashboard\", \"col\": 4}}, {\"type\": \"spacer\", \"data\": {\"col\": 12}}, {\"type\": \"header\", \"data\": {\"text\": \"Masters & Reports\", \"level\": 4, \"col\": 12}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Items and Pricing\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Stock Transactions\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Stock Reports\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Settings\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Serial No and Batch\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Tools\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Key Reports\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Other Reports\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Incorrect Data Report\", \"col\": 4}}]", "creation": "2020-03-02 15:43:10.096528", "developer_mode_only": 0, "disable_user_customization": 0, "docstatus": 0, "doctype": "Workspace", + "extends": "", "extends_another_page": 0, + "for_user": "", "hide_custom": 0, "icon": "stock", "idx": 0, "is_default": 0, - "is_standard": 1, + "is_standard": 0, "label": "Stock", "links": [ { "hidden": 0, "is_query_report": 0, "label": "Items and Pricing", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -31,6 +35,7 @@ "hidden": 0, "is_query_report": 0, "label": "Item", + "link_count": 0, "link_to": "Item", "link_type": "DocType", "onboard": 1, @@ -41,6 +46,7 @@ "hidden": 0, "is_query_report": 0, "label": "Item Group", + "link_count": 0, "link_to": "Item Group", "link_type": "DocType", "onboard": 1, @@ -51,6 +57,7 @@ "hidden": 0, "is_query_report": 0, "label": "Product Bundle", + "link_count": 0, "link_to": "Product Bundle", "link_type": "DocType", "onboard": 1, @@ -61,6 +68,7 @@ "hidden": 0, "is_query_report": 0, "label": "Price List", + "link_count": 0, "link_to": "Price List", "link_type": "DocType", "onboard": 0, @@ -71,6 +79,7 @@ "hidden": 0, "is_query_report": 0, "label": "Item Price", + "link_count": 0, "link_to": "Item Price", "link_type": "DocType", "onboard": 0, @@ -81,6 +90,7 @@ "hidden": 0, "is_query_report": 0, "label": "Shipping Rule", + "link_count": 0, "link_to": "Shipping Rule", "link_type": "DocType", "onboard": 0, @@ -91,6 +101,7 @@ "hidden": 0, "is_query_report": 0, "label": "Pricing Rule", + "link_count": 0, "link_to": "Pricing Rule", "link_type": "DocType", "onboard": 0, @@ -101,6 +112,7 @@ "hidden": 0, "is_query_report": 0, "label": "Item Alternative", + "link_count": 0, "link_to": "Item Alternative", "link_type": "DocType", "onboard": 0, @@ -111,6 +123,7 @@ "hidden": 0, "is_query_report": 0, "label": "Item Manufacturer", + "link_count": 0, "link_to": "Item Manufacturer", "link_type": "DocType", "onboard": 0, @@ -121,6 +134,7 @@ "hidden": 0, "is_query_report": 0, "label": "Customs Tariff Number", + "link_count": 0, "link_to": "Customs Tariff Number", "link_type": "DocType", "onboard": 0, @@ -130,6 +144,7 @@ "hidden": 0, "is_query_report": 0, "label": "Stock Transactions", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -138,6 +153,7 @@ "hidden": 0, "is_query_report": 0, "label": "Material Request", + "link_count": 0, "link_to": "Material Request", "link_type": "DocType", "onboard": 1, @@ -148,6 +164,7 @@ "hidden": 0, "is_query_report": 0, "label": "Stock Entry", + "link_count": 0, "link_to": "Stock Entry", "link_type": "DocType", "onboard": 1, @@ -158,6 +175,7 @@ "hidden": 0, "is_query_report": 0, "label": "Delivery Note", + "link_count": 0, "link_to": "Delivery Note", "link_type": "DocType", "onboard": 1, @@ -168,6 +186,7 @@ "hidden": 0, "is_query_report": 0, "label": "Purchase Receipt", + "link_count": 0, "link_to": "Purchase Receipt", "link_type": "DocType", "onboard": 1, @@ -178,6 +197,7 @@ "hidden": 0, "is_query_report": 0, "label": "Pick List", + "link_count": 0, "link_to": "Pick List", "link_type": "DocType", "onboard": 1, @@ -188,6 +208,7 @@ "hidden": 0, "is_query_report": 0, "label": "Delivery Trip", + "link_count": 0, "link_to": "Delivery Trip", "link_type": "DocType", "onboard": 0, @@ -197,6 +218,7 @@ "hidden": 0, "is_query_report": 0, "label": "Stock Reports", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -205,6 +227,7 @@ "hidden": 0, "is_query_report": 1, "label": "Stock Ledger", + "link_count": 0, "link_to": "Stock Ledger", "link_type": "Report", "onboard": 1, @@ -215,6 +238,7 @@ "hidden": 0, "is_query_report": 1, "label": "Stock Balance", + "link_count": 0, "link_to": "Stock Balance", "link_type": "Report", "onboard": 1, @@ -225,6 +249,7 @@ "hidden": 0, "is_query_report": 1, "label": "Stock Projected Qty", + "link_count": 0, "link_to": "Stock Projected Qty", "link_type": "Report", "onboard": 1, @@ -235,6 +260,7 @@ "hidden": 0, "is_query_report": 0, "label": "Stock Summary", + "link_count": 0, "link_to": "stock-balance", "link_type": "Page", "onboard": 0, @@ -245,6 +271,7 @@ "hidden": 0, "is_query_report": 1, "label": "Stock Ageing", + "link_count": 0, "link_to": "Stock Ageing", "link_type": "Report", "onboard": 0, @@ -255,6 +282,7 @@ "hidden": 0, "is_query_report": 1, "label": "Item Price Stock", + "link_count": 0, "link_to": "Item Price Stock", "link_type": "Report", "onboard": 0, @@ -264,6 +292,7 @@ "hidden": 0, "is_query_report": 0, "label": "Settings", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -272,6 +301,7 @@ "hidden": 0, "is_query_report": 0, "label": "Stock Settings", + "link_count": 0, "link_to": "Stock Settings", "link_type": "DocType", "onboard": 1, @@ -282,6 +312,7 @@ "hidden": 0, "is_query_report": 0, "label": "Warehouse", + "link_count": 0, "link_to": "Warehouse", "link_type": "DocType", "onboard": 1, @@ -292,6 +323,7 @@ "hidden": 0, "is_query_report": 0, "label": "Unit of Measure (UOM)", + "link_count": 0, "link_to": "UOM", "link_type": "DocType", "onboard": 1, @@ -302,6 +334,7 @@ "hidden": 0, "is_query_report": 0, "label": "Item Variant Settings", + "link_count": 0, "link_to": "Item Variant Settings", "link_type": "DocType", "onboard": 1, @@ -312,6 +345,7 @@ "hidden": 0, "is_query_report": 0, "label": "Brand", + "link_count": 0, "link_to": "Brand", "link_type": "DocType", "onboard": 1, @@ -322,6 +356,7 @@ "hidden": 0, "is_query_report": 0, "label": "Item Attribute", + "link_count": 0, "link_to": "Item Attribute", "link_type": "DocType", "onboard": 0, @@ -332,6 +367,7 @@ "hidden": 0, "is_query_report": 0, "label": "UOM Conversion Factor", + "link_count": 0, "link_to": "UOM Conversion Factor", "link_type": "DocType", "onboard": 0, @@ -341,6 +377,7 @@ "hidden": 0, "is_query_report": 0, "label": "Serial No and Batch", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -349,6 +386,7 @@ "hidden": 0, "is_query_report": 0, "label": "Serial No", + "link_count": 0, "link_to": "Serial No", "link_type": "DocType", "onboard": 1, @@ -359,6 +397,7 @@ "hidden": 0, "is_query_report": 0, "label": "Batch", + "link_count": 0, "link_to": "Batch", "link_type": "DocType", "onboard": 1, @@ -369,6 +408,7 @@ "hidden": 0, "is_query_report": 0, "label": "Installation Note", + "link_count": 0, "link_to": "Installation Note", "link_type": "DocType", "onboard": 0, @@ -379,6 +419,7 @@ "hidden": 0, "is_query_report": 0, "label": "Serial No Service Contract Expiry", + "link_count": 0, "link_to": "Serial No Service Contract Expiry", "link_type": "Report", "onboard": 0, @@ -389,6 +430,7 @@ "hidden": 0, "is_query_report": 0, "label": "Serial No Status", + "link_count": 0, "link_to": "Serial No Status", "link_type": "Report", "onboard": 0, @@ -399,6 +441,7 @@ "hidden": 0, "is_query_report": 0, "label": "Serial No Warranty Expiry", + "link_count": 0, "link_to": "Serial No Warranty Expiry", "link_type": "Report", "onboard": 0, @@ -408,6 +451,7 @@ "hidden": 0, "is_query_report": 0, "label": "Tools", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -416,6 +460,7 @@ "hidden": 0, "is_query_report": 0, "label": "Stock Reconciliation", + "link_count": 0, "link_to": "Stock Reconciliation", "link_type": "DocType", "onboard": 1, @@ -426,6 +471,7 @@ "hidden": 0, "is_query_report": 0, "label": "Landed Cost Voucher", + "link_count": 0, "link_to": "Landed Cost Voucher", "link_type": "DocType", "onboard": 1, @@ -436,6 +482,7 @@ "hidden": 0, "is_query_report": 0, "label": "Packing Slip", + "link_count": 0, "link_to": "Packing Slip", "link_type": "DocType", "onboard": 1, @@ -446,6 +493,7 @@ "hidden": 0, "is_query_report": 0, "label": "Quality Inspection", + "link_count": 0, "link_to": "Quality Inspection", "link_type": "DocType", "onboard": 0, @@ -456,6 +504,7 @@ "hidden": 0, "is_query_report": 0, "label": "Quality Inspection Template", + "link_count": 0, "link_to": "Quality Inspection Template", "link_type": "DocType", "onboard": 0, @@ -466,6 +515,7 @@ "hidden": 0, "is_query_report": 0, "label": "Quick Stock Balance", + "link_count": 0, "link_to": "Quick Stock Balance", "link_type": "DocType", "onboard": 0, @@ -475,6 +525,7 @@ "hidden": 0, "is_query_report": 0, "label": "Key Reports", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -483,6 +534,7 @@ "hidden": 0, "is_query_report": 0, "label": "Item-wise Price List Rate", + "link_count": 0, "link_to": "Item-wise Price List Rate", "link_type": "Report", "onboard": 1, @@ -493,6 +545,7 @@ "hidden": 0, "is_query_report": 1, "label": "Stock Analytics", + "link_count": 0, "link_to": "Stock Analytics", "link_type": "Report", "onboard": 1, @@ -503,6 +556,7 @@ "hidden": 0, "is_query_report": 1, "label": "Stock Qty vs Serial No Count", + "link_count": 0, "link_to": "Stock Qty vs Serial No Count", "link_type": "Report", "onboard": 1, @@ -513,6 +567,7 @@ "hidden": 0, "is_query_report": 1, "label": "Delivery Note Trends", + "link_count": 0, "link_to": "Delivery Note Trends", "link_type": "Report", "onboard": 0, @@ -523,6 +578,7 @@ "hidden": 0, "is_query_report": 1, "label": "Purchase Receipt Trends", + "link_count": 0, "link_to": "Purchase Receipt Trends", "link_type": "Report", "onboard": 0, @@ -533,6 +589,7 @@ "hidden": 0, "is_query_report": 1, "label": "Sales Order Analysis", + "link_count": 0, "link_to": "Sales Order Analysis", "link_type": "Report", "onboard": 0, @@ -543,6 +600,7 @@ "hidden": 0, "is_query_report": 1, "label": "Purchase Order Analysis", + "link_count": 0, "link_to": "Purchase Order Analysis", "link_type": "Report", "onboard": 0, @@ -553,6 +611,7 @@ "hidden": 0, "is_query_report": 1, "label": "Item Shortage Report", + "link_count": 0, "link_to": "Item Shortage Report", "link_type": "Report", "onboard": 0, @@ -563,6 +622,7 @@ "hidden": 0, "is_query_report": 1, "label": "Batch-Wise Balance History", + "link_count": 0, "link_to": "Batch-Wise Balance History", "link_type": "Report", "onboard": 0, @@ -572,6 +632,7 @@ "hidden": 0, "is_query_report": 0, "label": "Other Reports", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -580,6 +641,7 @@ "hidden": 0, "is_query_report": 1, "label": "Requested Items To Be Transferred", + "link_count": 0, "link_to": "Requested Items To Be Transferred", "link_type": "Report", "onboard": 0, @@ -590,6 +652,7 @@ "hidden": 0, "is_query_report": 1, "label": "Batch Item Expiry Status", + "link_count": 0, "link_to": "Batch Item Expiry Status", "link_type": "Report", "onboard": 0, @@ -600,6 +663,7 @@ "hidden": 0, "is_query_report": 1, "label": "Item Prices", + "link_count": 0, "link_to": "Item Prices", "link_type": "Report", "onboard": 0, @@ -610,6 +674,7 @@ "hidden": 0, "is_query_report": 1, "label": "Itemwise Recommended Reorder Level", + "link_count": 0, "link_to": "Itemwise Recommended Reorder Level", "link_type": "Report", "onboard": 0, @@ -620,6 +685,7 @@ "hidden": 0, "is_query_report": 1, "label": "Item Variant Details", + "link_count": 0, "link_to": "Item Variant Details", "link_type": "Report", "onboard": 0, @@ -630,6 +696,7 @@ "hidden": 0, "is_query_report": 1, "label": "Subcontracted Raw Materials To Be Transferred", + "link_count": 0, "link_to": "Subcontracted Raw Materials To Be Transferred", "link_type": "Report", "onboard": 0, @@ -640,6 +707,7 @@ "hidden": 0, "is_query_report": 1, "label": "Subcontracted Item To Be Received", + "link_count": 0, "link_to": "Subcontracted Item To Be Received", "link_type": "Report", "onboard": 0, @@ -650,6 +718,7 @@ "hidden": 0, "is_query_report": 1, "label": "Stock and Account Value Comparison", + "link_count": 0, "link_to": "Stock and Account Value Comparison", "link_type": "Report", "onboard": 0, @@ -659,6 +728,7 @@ "hidden": 0, "is_query_report": 0, "label": "Incorrect Data Report", + "link_count": 0, "link_type": "DocType", "onboard": 0, "type": "Card Break" @@ -667,6 +737,7 @@ "hidden": 0, "is_query_report": 0, "label": "Incorrect Serial No Qty and Valuation", + "link_count": 0, "link_to": "Incorrect Serial No Valuation", "link_type": "Report", "onboard": 0, @@ -676,6 +747,7 @@ "hidden": 0, "is_query_report": 0, "label": "Incorrect Balance Qty After Transaction", + "link_count": 0, "link_to": "Incorrect Balance Qty After Transaction", "link_type": "Report", "onboard": 0, @@ -685,20 +757,26 @@ "hidden": 0, "is_query_report": 0, "label": "Stock and Account Value Comparison", + "link_count": 0, "link_to": "Stock and Account Value Comparison", "link_type": "Report", "onboard": 0, "type": "Link" } ], - "modified": "2021-05-13 13:10:24.914983", + "modified": "2021-08-05 12:16:02.361509", "modified_by": "Administrator", "module": "Stock", "name": "Stock", "onboarding": "Stock", "owner": "Administrator", + "parent_page": "", "pin_to_bottom": 0, "pin_to_top": 0, + "public": 1, + "restrict_to_domain": "", + "roles": [], + "sequence_id": 24, "shortcuts": [ { "color": "Green", @@ -753,5 +831,6 @@ "type": "Dashboard" } ], - "shortcuts_label": "Quick Access" + "shortcuts_label": "Quick Access", + "title": "Stock" } \ No newline at end of file diff --git a/erpnext/support/workspace/support/support.json b/erpnext/support/workspace/support/support.json index 01a8676f05d..4c5829d7a03 100644 --- a/erpnext/support/workspace/support/support.json +++ b/erpnext/support/workspace/support/support.json @@ -1,22 +1,27 @@ { - "category": "Modules", + "category": "", "charts": [], + "content": "[{\"type\": \"header\", \"data\": {\"text\": \"Your Shortcuts\", \"level\": 4, \"col\": 12}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Issue\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Maintenance Visit\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Service Level Agreement\", \"col\": 4}}, {\"type\": \"spacer\", \"data\": {\"col\": 12}}, {\"type\": \"header\", \"data\": {\"text\": \"Reports & Masters\", \"level\": 4, \"col\": 12}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Issues\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Maintenance\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Service Level Agreement\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Warranty\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Settings\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Reports\", \"col\": 4}}]", "creation": "2020-03-02 15:48:23.224699", "developer_mode_only": 0, "disable_user_customization": 0, "docstatus": 0, "doctype": "Workspace", + "extends": "", "extends_another_page": 0, + "for_user": "", "hide_custom": 0, "icon": "support", "idx": 0, - "is_standard": 1, + "is_default": 0, + "is_standard": 0, "label": "Support", "links": [ { "hidden": 0, "is_query_report": 0, "label": "Issues", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -25,6 +30,7 @@ "hidden": 0, "is_query_report": 0, "label": "Issue", + "link_count": 0, "link_to": "Issue", "link_type": "DocType", "onboard": 1, @@ -35,6 +41,7 @@ "hidden": 0, "is_query_report": 0, "label": "Issue Type", + "link_count": 0, "link_to": "Issue Type", "link_type": "DocType", "onboard": 0, @@ -45,6 +52,7 @@ "hidden": 0, "is_query_report": 0, "label": "Issue Priority", + "link_count": 0, "link_to": "Issue Priority", "link_type": "DocType", "onboard": 0, @@ -54,6 +62,7 @@ "hidden": 0, "is_query_report": 0, "label": "Maintenance", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -62,6 +71,7 @@ "hidden": 0, "is_query_report": 0, "label": "Maintenance Schedule", + "link_count": 0, "link_to": "Maintenance Schedule", "link_type": "DocType", "onboard": 0, @@ -72,6 +82,7 @@ "hidden": 0, "is_query_report": 0, "label": "Maintenance Visit", + "link_count": 0, "link_to": "Maintenance Visit", "link_type": "DocType", "onboard": 0, @@ -81,6 +92,7 @@ "hidden": 0, "is_query_report": 0, "label": "Service Level Agreement", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -89,6 +101,7 @@ "hidden": 0, "is_query_report": 0, "label": "Service Level Agreement", + "link_count": 0, "link_to": "Service Level Agreement", "link_type": "DocType", "onboard": 0, @@ -98,6 +111,7 @@ "hidden": 0, "is_query_report": 0, "label": "Warranty", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -106,6 +120,7 @@ "hidden": 0, "is_query_report": 0, "label": "Warranty Claim", + "link_count": 0, "link_to": "Warranty Claim", "link_type": "DocType", "onboard": 0, @@ -116,6 +131,7 @@ "hidden": 0, "is_query_report": 0, "label": "Serial No", + "link_count": 0, "link_to": "Serial No", "link_type": "DocType", "onboard": 0, @@ -125,6 +141,7 @@ "hidden": 0, "is_query_report": 0, "label": "Settings", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -133,6 +150,7 @@ "hidden": 0, "is_query_report": 0, "label": "Support Settings", + "link_count": 0, "link_to": "Support Settings", "link_type": "DocType", "onboard": 0, @@ -142,6 +160,7 @@ "hidden": 0, "is_query_report": 0, "label": "Reports", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -150,19 +169,26 @@ "hidden": 0, "is_query_report": 1, "label": "First Response Time for Issues", + "link_count": 0, "link_to": "First Response Time for Issues", "link_type": "Report", "onboard": 0, "type": "Link" } ], - "modified": "2020-12-01 13:38:37.073482", + "modified": "2021-08-05 12:16:02.699923", "modified_by": "Administrator", "module": "Support", "name": "Support", + "onboarding": "", "owner": "Administrator", + "parent_page": "", "pin_to_bottom": 0, "pin_to_top": 0, + "public": 1, + "restrict_to_domain": "", + "roles": [], + "sequence_id": 25, "shortcuts": [ { "color": "Yellow", @@ -182,5 +208,6 @@ "link_to": "Service Level Agreement", "type": "DocType" } - ] + ], + "title": "Support" } \ No newline at end of file diff --git a/erpnext/utilities/workspace/utilities/utilities.json b/erpnext/utilities/workspace/utilities/utilities.json index 2f9250ee45c..4ad4afb8f41 100644 --- a/erpnext/utilities/workspace/utilities/utilities.json +++ b/erpnext/utilities/workspace/utilities/utilities.json @@ -1,21 +1,26 @@ { - "category": "Modules", + "category": "", "charts": [], + "content": "[{\"type\": \"header\", \"data\": {\"text\": \"Reports & Masters\", \"level\": 4, \"col\": 12}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Video\", \"col\": 4}}]", "creation": "2020-09-10 12:21:22.335307", "developer_mode_only": 0, "disable_user_customization": 0, "docstatus": 0, "doctype": "Workspace", + "extends": "", "extends_another_page": 0, + "for_user": "", "hide_custom": 0, "idx": 0, - "is_standard": 1, + "is_default": 0, + "is_standard": 0, "label": "Utilities", "links": [ { "hidden": 0, "is_query_report": 0, "label": "Video", + "link_count": 0, "onboard": 0, "type": "Card Break" }, @@ -24,6 +29,7 @@ "hidden": 0, "is_query_report": 0, "label": "Video", + "link_count": 0, "link_to": "Video", "link_type": "DocType", "onboard": 0, @@ -34,18 +40,26 @@ "hidden": 0, "is_query_report": 0, "label": "Video Settings", + "link_count": 0, "link_to": "Video Settings", "link_type": "DocType", "onboard": 0, "type": "Link" } ], - "modified": "2020-12-01 13:38:36.711884", + "modified": "2021-08-05 12:16:03.350804", "modified_by": "Administrator", "module": "Utilities", "name": "Utilities", + "onboarding": "", "owner": "user@erpnext.com", - "pin_to_bottom": 1, + "parent_page": "", + "pin_to_bottom": 0, "pin_to_top": 0, - "shortcuts": [] + "public": 1, + "restrict_to_domain": "", + "roles": [], + "sequence_id": 30, + "shortcuts": [], + "title": "Utilities" } \ No newline at end of file From 8a6b82b19629aa0d3d6df767cef8b548623bc520 Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Fri, 13 Aug 2021 12:59:27 +0530 Subject: [PATCH 90/95] ci: ignore js files in unittests (#26934) * ci: ignore js files in unittests - Avoid running python unittests on PRs that ONLY change JS files. * ci: ignore md files in test workflows --- .github/workflows/patch.yml | 8 +++++++- .github/workflows/server-tests.yml | 6 ++++++ .github/workflows/ui-tests.yml | 2 ++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/patch.yml b/.github/workflows/patch.yml index dc72987a41a..72d4028ce6e 100644 --- a/.github/workflows/patch.yml +++ b/.github/workflows/patch.yml @@ -1,6 +1,12 @@ name: Patch -on: [pull_request, workflow_dispatch] +on: + pull_request: + paths-ignore: + - '**.js' + - '**.md' + workflow_dispatch: + jobs: test: diff --git a/.github/workflows/server-tests.yml b/.github/workflows/server-tests.yml index 606002e3cdf..3a1ecd399c5 100644 --- a/.github/workflows/server-tests.yml +++ b/.github/workflows/server-tests.yml @@ -2,9 +2,15 @@ name: Server on: pull_request: + paths-ignore: + - '**.js' + - '**.md' workflow_dispatch: push: branches: [ develop ] + paths-ignore: + - '**.js' + - '**.md' jobs: test: diff --git a/.github/workflows/ui-tests.yml b/.github/workflows/ui-tests.yml index 9e29b6f1d2a..3959268c767 100644 --- a/.github/workflows/ui-tests.yml +++ b/.github/workflows/ui-tests.yml @@ -2,6 +2,8 @@ name: UI on: pull_request: + paths-ignore: + - '**.md' workflow_dispatch: jobs: From fe2a34f17197a2877356bcdf5d0bb6c46312ed33 Mon Sep 17 00:00:00 2001 From: Marica Date: Fri, 13 Aug 2021 15:37:45 +0530 Subject: [PATCH 91/95] fix: Copy previous balance dict object instead of assigning (#26942) - Due to plain assignment, dict mutation gave wrong monthly values --- erpnext/stock/report/stock_analytics/stock_analytics.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/stock/report/stock_analytics/stock_analytics.py b/erpnext/stock/report/stock_analytics/stock_analytics.py index d44685060c7..fde934b1339 100644 --- a/erpnext/stock/report/stock_analytics/stock_analytics.py +++ b/erpnext/stock/report/stock_analytics/stock_analytics.py @@ -144,7 +144,8 @@ def get_periodic_data(entry, filters): # if period against item does not exist yet, instantiate it # insert existing balance dict against period, and add/subtract to it if periodic_data.get(d.item_code) and not periodic_data.get(d.item_code).get(period): - periodic_data[d.item_code][period] = periodic_data[d.item_code]['balance'] + previous_balance = periodic_data[d.item_code]['balance'].copy() + periodic_data[d.item_code][period] = previous_balance if d.voucher_type == "Stock Reconciliation": if periodic_data.get(d.item_code) and periodic_data.get(d.item_code).get('balance').get(d.warehouse): From 5999760a65db9b8d376126e4bf70feff07bc8b01 Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Fri, 13 Aug 2021 17:11:53 +0530 Subject: [PATCH 92/95] fix: Syntax error --- erpnext/accounts/doctype/sales_invoice/sales_invoice.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js index dbc42de583e..2751b5509cc 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js @@ -348,7 +348,7 @@ erpnext.accounts.SalesInvoiceController = class SalesInvoiceController extends e items_add(doc, cdt, cdn) { var row = frappe.get_doc(cdt, cdn); this.frm.script_manager.copy_from_first_row("items", row, ["income_account", "discount_account", "cost_center"]); - }, + } set_dynamic_labels() { super.set_dynamic_labels(); From f977c65e804054a7bbd8b6b3670859821ccd9d1d Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Fri, 13 Aug 2021 17:12:45 +0530 Subject: [PATCH 93/95] fix: Make enable_discount_accounting a class property --- .../doctype/purchase_invoice/purchase_invoice.py | 14 +++++++++----- .../doctype/sales_invoice/sales_invoice.py | 13 ++++++++----- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py index a95f971e00a..574a353cdf2 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py @@ -523,8 +523,6 @@ class PurchaseInvoice(BuyingController): exchange_rate_map, net_rate_map = get_purchase_document_details(self) - enable_discount_accounting = cint(frappe.db.get_single_value('Accounts Settings', 'enable_discount_accounting')) - for item in self.get("items"): if flt(item.base_net_amount): account_currency = get_account_currency(item.expense_account) @@ -615,7 +613,7 @@ class PurchaseInvoice(BuyingController): if (not item.enable_deferred_expense or self.is_return) else item.deferred_expense_account) if not item.is_fixed_asset: - dummy, amount = self.get_amount_and_base_amount(item, enable_discount_accounting) + dummy, amount = self.get_amount_and_base_amount(item, self.enable_discount_accounting) else: amount = flt(item.base_net_amount + item.item_tax_amount, item.precision("base_net_amount")) @@ -857,10 +855,9 @@ class PurchaseInvoice(BuyingController): def make_tax_gl_entries(self, gl_entries): # tax table gl entries valuation_tax = {} - enable_discount_accounting = cint(frappe.db.get_single_value('Accounts Settings', 'enable_discount_accounting')) for tax in self.get("taxes"): - amount, base_amount = self.get_tax_amounts(tax, enable_discount_accounting) + amount, base_amount = self.get_tax_amounts(tax, self.enable_discount_accounting) if tax.category in ("Total", "Valuation and Total") and flt(base_amount): account_currency = get_account_currency(tax.account_head) @@ -925,6 +922,13 @@ class PurchaseInvoice(BuyingController): "remarks": self.remarks or "Accounting Entry for Stock" }, item=tax)) + @property + def enable_discount_accounting(self): + if not hasattr(self, "_enable_discount_accounting"): + self._enable_discount_accounting = cint(frappe.db.get_single_value('Accounts Settings', 'enable_discount_accounting')) + + return self._enable_discount_accounting + def make_internal_transfer_gl_entries(self, gl_entries): if self.is_internal_transfer() and flt(self.base_total_taxes_and_charges): account_currency = get_account_currency(self.unrealized_profit_loss_account) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index 1e1fe9001a0..0db426ad5ec 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -888,10 +888,8 @@ class SalesInvoice(SellingController): ) def make_tax_gl_entries(self, gl_entries): - enable_discount_accounting = cint(frappe.db.get_single_value('Accounts Settings', 'enable_discount_accounting')) - for tax in self.get("taxes"): - amount, base_amount = self.get_tax_amounts(tax, enable_discount_accounting) + amount, base_amount = self.get_tax_amounts(tax, self.enable_discount_accounting) if flt(tax.base_tax_amount_after_discount_amount): account_currency = get_account_currency(tax.account_head) @@ -922,7 +920,6 @@ class SalesInvoice(SellingController): def make_item_gl_entries(self, gl_entries): # income account gl entries - enable_discount_accounting = cint(frappe.db.get_single_value('Accounts Settings', 'enable_discount_accounting')) for item in self.get("items"): if flt(item.base_net_amount, item.precision("base_net_amount")): @@ -957,7 +954,7 @@ class SalesInvoice(SellingController): income_account = (item.income_account if (not item.enable_deferred_revenue or self.is_return) else item.deferred_revenue_account) - amount, base_amount = self.get_amount_and_base_amount(item, enable_discount_accounting) + amount, base_amount = self.get_amount_and_base_amount(item, self.enable_discount_accounting) account_currency = get_account_currency(income_account) gl_entries.append( @@ -1060,6 +1057,12 @@ class SalesInvoice(SellingController): if orginal_schedule_date == posting_date_of_original_invoice: return True return False + @property + def enable_discount_accounting(self): + if not hasattr(self, "_enable_discount_accounting"): + self._enable_discount_accounting = cint(frappe.db.get_single_value('Accounts Settings', 'enable_discount_accounting')) + + return self._enable_discount_accounting def set_asset_status(self, asset): if self.is_return: From f9356ee64211e61bcb66af98b86b57e52240b085 Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Fri, 13 Aug 2021 17:40:51 +0530 Subject: [PATCH 94/95] fix: Sider issues --- erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py | 4 ++-- erpnext/accounts/doctype/sales_invoice/sales_invoice.py | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py index 574a353cdf2..c3cb159038b 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py @@ -868,8 +868,8 @@ class PurchaseInvoice(BuyingController): "account": tax.account_head, "against": self.supplier, dr_or_cr: base_amount, - dr_or_cr + "_in_account_currency": base_amount \ - if account_currency==self.company_currency \ + dr_or_cr + "_in_account_currency": base_amount + if account_currency==self.company_currency else amount, "cost_center": tax.cost_center }, account_currency, item=tax) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index 0db426ad5ec..3b8cba2a1e8 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -1057,6 +1057,7 @@ class SalesInvoice(SellingController): if orginal_schedule_date == posting_date_of_original_invoice: return True return False + @property def enable_discount_accounting(self): if not hasattr(self, "_enable_discount_accounting"): From b5926a33b35878d0ee110ce32d5dd3cd4a737700 Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Sat, 14 Aug 2021 10:48:33 +0530 Subject: [PATCH 95/95] fix: unknown attribute "string_type" (#26947) (#26950) (cherry picked from commit 6aed9e26acaf266f7260adab16656d554c6bb022) Co-authored-by: Ankush Menat --- erpnext/hr/doctype/attendance/attendance.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/hr/doctype/attendance/attendance.py b/erpnext/hr/doctype/attendance/attendance.py index f79f0fe4180..c1a7c8f88a5 100644 --- a/erpnext/hr/doctype/attendance/attendance.py +++ b/erpnext/hr/doctype/attendance/attendance.py @@ -135,7 +135,7 @@ def mark_attendance(employee, attendance_date, status, shift=None, leave_type=No def mark_bulk_attendance(data): import json from pprint import pprint - if isinstance(data, frappe.string_types): + if isinstance(data, str): data = json.loads(data) data = frappe._dict(data) company = frappe.get_value('Employee', data.employee, 'company')