From ed26eea82e33bb522f588e7fc5aeb8c3eecbf165 Mon Sep 17 00:00:00 2001 From: muruthigitau Date: Thu, 17 Oct 2024 11:11:36 +0300 Subject: [PATCH 1/5] feat: utility tarrif block doctype --- .../item_price_tariff/item_price_tariff.json | 14 +++++- .../meter_reading_tariff_rate.json | 6 +-- .../doctype/utility_tariff_block/__init__.py | 0 .../test_utility_tariff_block.py | 9 ++++ .../utility_tariff_block.js | 8 ++++ .../utility_tariff_block.json | 44 +++++++++++++++++++ .../utility_tariff_block.py | 9 ++++ 7 files changed, 85 insertions(+), 5 deletions(-) create mode 100644 utility_billing/utility_billing/doctype/utility_tariff_block/__init__.py create mode 100644 utility_billing/utility_billing/doctype/utility_tariff_block/test_utility_tariff_block.py create mode 100644 utility_billing/utility_billing/doctype/utility_tariff_block/utility_tariff_block.js create mode 100644 utility_billing/utility_billing/doctype/utility_tariff_block/utility_tariff_block.json create mode 100644 utility_billing/utility_billing/doctype/utility_tariff_block/utility_tariff_block.py diff --git a/utility_billing/utility_billing/doctype/item_price_tariff/item_price_tariff.json b/utility_billing/utility_billing/doctype/item_price_tariff/item_price_tariff.json index a600833..57facbd 100644 --- a/utility_billing/utility_billing/doctype/item_price_tariff/item_price_tariff.json +++ b/utility_billing/utility_billing/doctype/item_price_tariff/item_price_tariff.json @@ -16,7 +16,10 @@ { "fieldname": "lower_limit", "fieldtype": "Float", + "in_filter": 1, "in_list_view": 1, + "in_preview": 1, + "in_standard_filter": 1, "label": "Lower Limit", "precision": "3", "reqd": 1 @@ -24,7 +27,10 @@ { "fieldname": "rate", "fieldtype": "Currency", + "in_filter": 1, "in_list_view": 1, + "in_preview": 1, + "in_standard_filter": 1, "label": "Rate", "reqd": 1 }, @@ -35,25 +41,29 @@ { "fieldname": "upper_limit", "fieldtype": "Float", + "in_filter": 1, "in_list_view": 1, + "in_preview": 1, + "in_standard_filter": 1, "label": "Upper Limit", "reqd": 1 }, { "fieldname": "block", - "fieldtype": "Data", + "fieldtype": "Link", "in_filter": 1, "in_list_view": 1, "in_preview": 1, "in_standard_filter": 1, "label": "Block", + "options": "Utility Tariff Block", "reqd": 1 } ], "index_web_pages_for_search": 1, "istable": 1, "links": [], - "modified": "2024-10-17 06:20:57.592318", + "modified": "2024-10-17 09:53:37.335477", "modified_by": "Administrator", "module": "Utility Billing", "name": "Item Price Tariff", diff --git a/utility_billing/utility_billing/doctype/meter_reading_tariff_rate/meter_reading_tariff_rate.json b/utility_billing/utility_billing/doctype/meter_reading_tariff_rate/meter_reading_tariff_rate.json index 060ab19..e63c4fd 100644 --- a/utility_billing/utility_billing/doctype/meter_reading_tariff_rate/meter_reading_tariff_rate.json +++ b/utility_billing/utility_billing/doctype/meter_reading_tariff_rate/meter_reading_tariff_rate.json @@ -37,13 +37,13 @@ }, { "fieldname": "block", - "fieldtype": "Data", + "fieldtype": "Link", "in_filter": 1, "in_list_view": 1, "in_preview": 1, "in_standard_filter": 1, "label": "Block", - "options": "Item", + "options": "Utility Tariff Block", "reqd": 1 }, { @@ -86,7 +86,7 @@ "index_web_pages_for_search": 1, "istable": 1, "links": [], - "modified": "2024-10-17 09:36:01.507712", + "modified": "2024-10-17 09:48:19.756664", "modified_by": "Administrator", "module": "Utility Billing", "name": "Meter Reading Tariff Rate", diff --git a/utility_billing/utility_billing/doctype/utility_tariff_block/__init__.py b/utility_billing/utility_billing/doctype/utility_tariff_block/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/utility_billing/utility_billing/doctype/utility_tariff_block/test_utility_tariff_block.py b/utility_billing/utility_billing/doctype/utility_tariff_block/test_utility_tariff_block.py new file mode 100644 index 0000000..831e2e4 --- /dev/null +++ b/utility_billing/utility_billing/doctype/utility_tariff_block/test_utility_tariff_block.py @@ -0,0 +1,9 @@ +# Copyright (c) 2024, Navari and Contributors +# See license.txt + +# import frappe +from frappe.tests.utils import FrappeTestCase + + +class TestUtilityTariffBlock(FrappeTestCase): + pass diff --git a/utility_billing/utility_billing/doctype/utility_tariff_block/utility_tariff_block.js b/utility_billing/utility_billing/doctype/utility_tariff_block/utility_tariff_block.js new file mode 100644 index 0000000..ec34633 --- /dev/null +++ b/utility_billing/utility_billing/doctype/utility_tariff_block/utility_tariff_block.js @@ -0,0 +1,8 @@ +// Copyright (c) 2024, Navari and contributors +// For license information, please see license.txt + +// frappe.ui.form.on("Utility Tariff Block", { +// refresh(frm) { + +// }, +// }); diff --git a/utility_billing/utility_billing/doctype/utility_tariff_block/utility_tariff_block.json b/utility_billing/utility_billing/doctype/utility_tariff_block/utility_tariff_block.json new file mode 100644 index 0000000..8971038 --- /dev/null +++ b/utility_billing/utility_billing/doctype/utility_tariff_block/utility_tariff_block.json @@ -0,0 +1,44 @@ +{ + "actions": [], + "allow_rename": 1, + "autoname": "field:title", + "creation": "2024-10-17 09:46:28.977269", + "doctype": "DocType", + "engine": "InnoDB", + "field_order": [ + "title" + ], + "fields": [ + { + "fieldname": "title", + "fieldtype": "Data", + "label": "Title", + "unique": 1 + } + ], + "index_web_pages_for_search": 1, + "links": [], + "modified": "2024-10-17 09:47:11.978412", + "modified_by": "Administrator", + "module": "Utility Billing", + "name": "Utility Tariff Block", + "naming_rule": "By fieldname", + "owner": "Administrator", + "permissions": [ + { + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "System Manager", + "share": 1, + "write": 1 + } + ], + "sort_field": "creation", + "sort_order": "DESC", + "states": [] +} \ No newline at end of file diff --git a/utility_billing/utility_billing/doctype/utility_tariff_block/utility_tariff_block.py b/utility_billing/utility_billing/doctype/utility_tariff_block/utility_tariff_block.py new file mode 100644 index 0000000..b0779a3 --- /dev/null +++ b/utility_billing/utility_billing/doctype/utility_tariff_block/utility_tariff_block.py @@ -0,0 +1,9 @@ +# Copyright (c) 2024, Navari and contributors +# For license information, please see license.txt + +# import frappe +from frappe.model.document import Document + + +class UtilityTariffBlock(Document): + pass From e1b55c37bca1574d105b9ef7ea41df3efd4ceb2a Mon Sep 17 00:00:00 2001 From: muruthigitau Date: Thu, 17 Oct 2024 11:22:29 +0300 Subject: [PATCH 2/5] fix: allow_on_submit more info fields request doc --- .../utility_service_request/utility_service_request.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/utility_billing/utility_billing/doctype/utility_service_request/utility_service_request.json b/utility_billing/utility_billing/doctype/utility_service_request/utility_service_request.json index 77235a9..f2cb9b0 100644 --- a/utility_billing/utility_billing/doctype/utility_service_request/utility_service_request.json +++ b/utility_billing/utility_billing/doctype/utility_service_request/utility_service_request.json @@ -273,6 +273,7 @@ "fieldtype": "Column Break" }, { + "allow_on_submit": 1, "fieldname": "customer", "fieldtype": "Link", "label": "Customer", @@ -280,6 +281,7 @@ "read_only": 1 }, { + "allow_on_submit": 1, "fieldname": "sales_order", "fieldtype": "Link", "label": "Sales Order", @@ -325,8 +327,10 @@ "label": "Coordinates" }, { + "allow_on_submit": 1, "fieldname": "request_status", "fieldtype": "Select", + "ignore_user_permissions": 1, "in_filter": 1, "in_list_view": 1, "in_standard_filter": 1, @@ -347,7 +351,7 @@ "link_fieldname": "utility_service_request" } ], - "modified": "2024-10-17 07:25:21.020260", + "modified": "2024-10-17 10:14:10.432620", "modified_by": "Administrator", "module": "Utility Billing", "name": "Utility Service Request", From d923e4294b859f881aaac05c0a11e19d77034638 Mon Sep 17 00:00:00 2001 From: muruthigitau Date: Thu, 17 Oct 2024 11:41:32 +0300 Subject: [PATCH 3/5] fix: sales order delivery date in autocreate --- .../doctype/utility_service_request/utility_service_request.py | 1 + 1 file changed, 1 insertion(+) diff --git a/utility_billing/utility_billing/doctype/utility_service_request/utility_service_request.py b/utility_billing/utility_billing/doctype/utility_service_request/utility_service_request.py index 9a9c0b0..643f5ba 100644 --- a/utility_billing/utility_billing/doctype/utility_service_request/utility_service_request.py +++ b/utility_billing/utility_billing/doctype/utility_service_request/utility_service_request.py @@ -64,6 +64,7 @@ def create_sales_order(doc, customer_doc): sales_order_doc = frappe.new_doc("Sales Order") sales_order_doc.customer = customer_doc.name sales_order_doc.transaction_date = frappe.utils.nowdate() + sales_order_doc.delivery_date = frappe.utils.nowdate() for item in doc.items: sales_order_doc.append( From 8436e4d0c349019ad91afacff41b7b2e3eccb4d8 Mon Sep 17 00:00:00 2001 From: muruthigitau Date: Thu, 17 Oct 2024 11:45:05 +0300 Subject: [PATCH 4/5] chore: fixtures export ie block custom fields --- utility_billing/fixtures/custom_field.json | 1178 ++++++++++---------- utility_billing/fixtures/doctype_link.json | 34 + 2 files changed, 651 insertions(+), 561 deletions(-) diff --git a/utility_billing/fixtures/custom_field.json b/utility_billing/fixtures/custom_field.json index 23b0d75..ca66657 100644 --- a/utility_billing/fixtures/custom_field.json +++ b/utility_billing/fixtures/custom_field.json @@ -1,562 +1,618 @@ [ - { - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "default": null, - "depends_on": null, - "description": null, - "docstatus": 0, - "doctype": "Custom Field", - "dt": "Sales Invoice Item", - "fetch_from": null, - "fetch_if_empty": 0, - "fieldname": "previous_reading", - "fieldtype": "Data", - "hidden": 0, - "hide_border": 0, - "hide_days": 0, - "hide_seconds": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_preview": 0, - "in_standard_filter": 0, - "insert_after": "meter_number", - "is_system_generated": 0, - "is_virtual": 0, - "label": "Previous Reading", - "length": 0, - "link_filters": null, - "mandatory_depends_on": null, - "modified": "2024-10-04 11:28:42.347074", - "module": "Utility Billing", - "name": "Sales Invoice Item-custom_previous_reading", - "no_copy": 0, - "non_negative": 0, - "options": null, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "read_only_depends_on": null, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "show_dashboard": 0, - "sort_options": 0, - "translatable": 0, - "unique": 0, - "width": null - }, - { - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "default": null, - "depends_on": null, - "description": null, - "docstatus": 0, - "doctype": "Custom Field", - "dt": "BOM", - "fetch_from": null, - "fetch_if_empty": 0, - "fieldname": "utility_service_request", - "fieldtype": "Link", - "hidden": 0, - "hide_border": 0, - "hide_days": 0, - "hide_seconds": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_preview": 0, - "in_standard_filter": 0, - "insert_after": "quantity", - "is_system_generated": 0, - "is_virtual": 0, - "label": "Utility Service Request", - "length": 0, - "link_filters": null, - "mandatory_depends_on": null, - "modified": "2024-10-14 05:49:24.195096", - "module": "Utility Billing", - "name": "BOM-custom_utility_request", - "no_copy": 0, - "non_negative": 0, - "options": "Utility Service Request", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "read_only_depends_on": null, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "show_dashboard": 0, - "sort_options": 0, - "translatable": 0, - "unique": 0, - "width": null - }, - { - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "default": null, - "depends_on": null, - "description": null, - "docstatus": 0, - "doctype": "Custom Field", - "dt": "Sales Order Item", - "fetch_from": null, - "fetch_if_empty": 0, - "fieldname": "meter_number", - "fieldtype": "Data", - "hidden": 0, - "hide_border": 0, - "hide_days": 0, - "hide_seconds": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_preview": 0, - "in_standard_filter": 0, - "insert_after": "reserve_stock", - "is_system_generated": 0, - "is_virtual": 0, - "label": "Meter Number", - "length": 0, - "link_filters": null, - "mandatory_depends_on": null, - "modified": "2024-10-04 11:18:34.707441", - "module": "Utility Billing", - "name": "Sales Order Item-custom_meter_number", - "no_copy": 0, - "non_negative": 0, - "options": null, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "read_only_depends_on": null, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "show_dashboard": 0, - "sort_options": 0, - "translatable": 0, - "unique": 0, - "width": null - }, - { - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "default": null, - "depends_on": null, - "description": null, - "docstatus": 0, - "doctype": "Custom Field", - "dt": "Sales Order Item", - "fetch_from": null, - "fetch_if_empty": 0, - "fieldname": "current_reading", - "fieldtype": "Data", - "hidden": 0, - "hide_border": 0, - "hide_days": 0, - "hide_seconds": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_preview": 0, - "in_standard_filter": 0, - "insert_after": "meter_number", - "is_system_generated": 0, - "is_virtual": 0, - "label": "Current Reading", - "length": 0, - "link_filters": null, - "mandatory_depends_on": null, - "modified": "2024-10-04 11:18:34.914857", - "module": "Utility Billing", - "name": "Sales Order Item-custom_current_reading", - "no_copy": 0, - "non_negative": 0, - "options": null, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "read_only_depends_on": null, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "show_dashboard": 0, - "sort_options": 0, - "translatable": 0, - "unique": 0, - "width": null - }, - { - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "default": null, - "depends_on": null, - "description": null, - "docstatus": 0, - "doctype": "Custom Field", - "dt": "Customer", - "fetch_from": null, - "fetch_if_empty": 0, - "fieldname": "nrc_or_passport_no", - "fieldtype": "Data", - "hidden": 0, - "hide_border": 0, - "hide_days": 0, - "hide_seconds": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_preview": 0, - "in_standard_filter": 0, - "insert_after": "customer_group", - "is_system_generated": 0, - "is_virtual": 0, - "label": "NRC or Passport No", - "length": 0, - "link_filters": null, - "mandatory_depends_on": null, - "modified": "2024-10-14 05:53:37.647063", - "module": "Utility Billing", - "name": "Customer-custom_nrc_or_passport_no", - "no_copy": 0, - "non_negative": 0, - "options": null, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "read_only_depends_on": null, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "show_dashboard": 0, - "sort_options": 0, - "translatable": 0, - "unique": 0, - "width": null - }, - { - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "default": null, - "depends_on": null, - "description": null, - "docstatus": 0, - "doctype": "Custom Field", - "dt": "Sales Order Item", - "fetch_from": null, - "fetch_if_empty": 0, - "fieldname": "block", - "fieldtype": "Data", - "hidden": 0, - "hide_border": 0, - "hide_days": 0, - "hide_seconds": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_preview": 0, - "in_standard_filter": 0, - "insert_after": "meter_number", - "is_system_generated": 0, - "is_virtual": 0, - "label": "Block", - "length": 0, - "link_filters": null, - "mandatory_depends_on": null, - "modified": "2024-10-17 06:28:22.017747", - "module": "Utility Billing", - "name": "Sales Order Item-custom_block", - "no_copy": 0, - "non_negative": 0, - "options": null, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "read_only_depends_on": null, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "show_dashboard": 0, - "sort_options": 0, - "translatable": 0, - "unique": 0, - "width": null - }, - { - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "default": null, - "depends_on": null, - "description": null, - "docstatus": 0, - "doctype": "Custom Field", - "dt": "Sales Order Item", - "fetch_from": null, - "fetch_if_empty": 0, - "fieldname": "previous_reading", - "fieldtype": "Data", - "hidden": 0, - "hide_border": 0, - "hide_days": 0, - "hide_seconds": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_preview": 0, - "in_standard_filter": 0, - "insert_after": "current_reading", - "is_system_generated": 0, - "is_virtual": 0, - "label": "Previous Reading", - "length": 0, - "link_filters": null, - "mandatory_depends_on": null, - "modified": "2024-10-04 11:18:22.791094", - "module": "Utility Billing", - "name": "Sales Order Item-custom_previous_reading", - "no_copy": 0, - "non_negative": 0, - "options": null, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "read_only_depends_on": null, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "show_dashboard": 0, - "sort_options": 0, - "translatable": 0, - "unique": 0, - "width": null - }, - { - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "default": null, - "depends_on": null, - "description": null, - "docstatus": 0, - "doctype": "Custom Field", - "dt": "Item Price", - "fetch_from": null, - "fetch_if_empty": 0, - "fieldname": "tariffs", - "fieldtype": "Table", - "hidden": 0, - "hide_border": 0, - "hide_days": 0, - "hide_seconds": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_preview": 0, - "in_standard_filter": 0, - "insert_after": "section_break_24", - "is_system_generated": 0, - "is_virtual": 0, - "label": "Tariffs", - "length": 0, - "link_filters": null, - "mandatory_depends_on": null, - "modified": "2024-10-14 02:10:02.044248", - "module": "Utility Billing", - "name": "Item Price-custom_tariffs", - "no_copy": 0, - "non_negative": 0, - "options": "Item Price Tariff", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "read_only_depends_on": null, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "show_dashboard": 0, - "sort_options": 0, - "translatable": 0, - "unique": 0, - "width": null - }, - { - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "default": null, - "depends_on": null, - "description": null, - "docstatus": 0, - "doctype": "Custom Field", - "dt": "Issue", - "fetch_from": null, - "fetch_if_empty": 0, - "fieldname": "utility_service_request", - "fieldtype": "Link", - "hidden": 0, - "hide_border": 0, - "hide_days": 0, - "hide_seconds": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_preview": 0, - "in_standard_filter": 0, - "insert_after": "email_account", - "is_system_generated": 0, - "is_virtual": 0, - "label": "Utility Service Request", - "length": 0, - "link_filters": null, - "mandatory_depends_on": null, - "modified": "2024-10-14 05:31:21.910805", - "module": "Utility Billing", - "name": "Issue-custom_request_for_utility_service", - "no_copy": 0, - "non_negative": 0, - "options": "Utility Service Request", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "read_only_depends_on": null, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "show_dashboard": 0, - "sort_options": 0, - "translatable": 0, - "unique": 0, - "width": null - }, - { - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "default": null, - "depends_on": null, - "description": null, - "docstatus": 0, - "doctype": "Custom Field", - "dt": "Sales Invoice Item", - "fetch_from": null, - "fetch_if_empty": 0, - "fieldname": "current_reading", - "fieldtype": "Data", - "hidden": 0, - "hide_border": 0, - "hide_days": 0, - "hide_seconds": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_preview": 0, - "in_standard_filter": 0, - "insert_after": "previous_reading", - "is_system_generated": 0, - "is_virtual": 0, - "label": "Current Reading", - "length": 0, - "link_filters": null, - "mandatory_depends_on": null, - "modified": "2024-10-04 11:28:56.369843", - "module": "Utility Billing", - "name": "Sales Invoice Item-custom_current_reading", - "no_copy": 0, - "non_negative": 0, - "options": null, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "read_only_depends_on": null, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "show_dashboard": 0, - "sort_options": 0, - "translatable": 0, - "unique": 0, - "width": null - } -] \ No newline at end of file + { + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "default": null, + "depends_on": null, + "description": null, + "docstatus": 0, + "doctype": "Custom Field", + "dt": "Sales Invoice Item", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "previous_reading", + "fieldtype": "Data", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_preview": 0, + "in_standard_filter": 0, + "insert_after": "meter_number", + "is_system_generated": 0, + "is_virtual": 0, + "label": "Previous Reading", + "length": 0, + "link_filters": null, + "mandatory_depends_on": null, + "modified": "2024-10-04 11:28:42.347074", + "module": "Utility Billing", + "name": "Sales Invoice Item-custom_previous_reading", + "no_copy": 0, + "non_negative": 0, + "options": null, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "print_width": null, + "read_only": 0, + "read_only_depends_on": null, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "show_dashboard": 0, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "default": null, + "depends_on": null, + "description": null, + "docstatus": 0, + "doctype": "Custom Field", + "dt": "Sales Invoice Item", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "block", + "fieldtype": "Link", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_preview": 0, + "in_standard_filter": 0, + "insert_after": "item_name", + "is_system_generated": 0, + "is_virtual": 0, + "label": "Block", + "length": 0, + "link_filters": null, + "mandatory_depends_on": null, + "modified": "2024-10-17 09:59:42.538337", + "module": "Utility Billing", + "name": "Sales Invoice Item-custom_block", + "no_copy": 0, + "non_negative": 0, + "options": "Utility Tariff Block", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "print_width": null, + "read_only": 0, + "read_only_depends_on": null, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "show_dashboard": 0, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "default": null, + "depends_on": null, + "description": null, + "docstatus": 0, + "doctype": "Custom Field", + "dt": "BOM", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "utility_service_request", + "fieldtype": "Link", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_preview": 0, + "in_standard_filter": 0, + "insert_after": "quantity", + "is_system_generated": 0, + "is_virtual": 0, + "label": "Utility Service Request", + "length": 0, + "link_filters": null, + "mandatory_depends_on": null, + "modified": "2024-10-14 05:49:24.195096", + "module": "Utility Billing", + "name": "BOM-custom_utility_request", + "no_copy": 0, + "non_negative": 0, + "options": "Utility Service Request", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "print_width": null, + "read_only": 0, + "read_only_depends_on": null, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "show_dashboard": 0, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "default": null, + "depends_on": null, + "description": null, + "docstatus": 0, + "doctype": "Custom Field", + "dt": "Sales Order Item", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "meter_number", + "fieldtype": "Data", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_preview": 0, + "in_standard_filter": 0, + "insert_after": "reserve_stock", + "is_system_generated": 0, + "is_virtual": 0, + "label": "Meter Number", + "length": 0, + "link_filters": null, + "mandatory_depends_on": null, + "modified": "2024-10-04 11:18:34.707441", + "module": "Utility Billing", + "name": "Sales Order Item-custom_meter_number", + "no_copy": 0, + "non_negative": 0, + "options": null, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "print_width": null, + "read_only": 0, + "read_only_depends_on": null, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "show_dashboard": 0, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "default": null, + "depends_on": null, + "description": null, + "docstatus": 0, + "doctype": "Custom Field", + "dt": "Sales Order Item", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "current_reading", + "fieldtype": "Data", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_preview": 0, + "in_standard_filter": 0, + "insert_after": "meter_number", + "is_system_generated": 0, + "is_virtual": 0, + "label": "Current Reading", + "length": 0, + "link_filters": null, + "mandatory_depends_on": null, + "modified": "2024-10-04 11:18:34.914857", + "module": "Utility Billing", + "name": "Sales Order Item-custom_current_reading", + "no_copy": 0, + "non_negative": 0, + "options": null, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "print_width": null, + "read_only": 0, + "read_only_depends_on": null, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "show_dashboard": 0, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "default": null, + "depends_on": null, + "description": null, + "docstatus": 0, + "doctype": "Custom Field", + "dt": "Customer", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "nrc_or_passport_no", + "fieldtype": "Data", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_preview": 0, + "in_standard_filter": 0, + "insert_after": "customer_group", + "is_system_generated": 0, + "is_virtual": 0, + "label": "NRC or Passport No", + "length": 0, + "link_filters": null, + "mandatory_depends_on": null, + "modified": "2024-10-14 05:53:37.647063", + "module": "Utility Billing", + "name": "Customer-custom_nrc_or_passport_no", + "no_copy": 0, + "non_negative": 0, + "options": null, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "print_width": null, + "read_only": 0, + "read_only_depends_on": null, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "show_dashboard": 0, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "default": null, + "depends_on": null, + "description": null, + "docstatus": 0, + "doctype": "Custom Field", + "dt": "Sales Order Item", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "previous_reading", + "fieldtype": "Data", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_preview": 0, + "in_standard_filter": 0, + "insert_after": "current_reading", + "is_system_generated": 0, + "is_virtual": 0, + "label": "Previous Reading", + "length": 0, + "link_filters": null, + "mandatory_depends_on": null, + "modified": "2024-10-04 11:18:22.791094", + "module": "Utility Billing", + "name": "Sales Order Item-custom_previous_reading", + "no_copy": 0, + "non_negative": 0, + "options": null, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "print_width": null, + "read_only": 0, + "read_only_depends_on": null, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "show_dashboard": 0, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "default": null, + "depends_on": null, + "description": null, + "docstatus": 0, + "doctype": "Custom Field", + "dt": "Sales Order Item", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "block", + "fieldtype": "Link", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_preview": 0, + "in_standard_filter": 0, + "insert_after": "item_name", + "is_system_generated": 0, + "is_virtual": 0, + "label": "Block", + "length": 0, + "link_filters": null, + "mandatory_depends_on": null, + "modified": "2024-10-17 10:05:07.279667", + "module": "Utility Billing", + "name": "Sales Order Item-custom_block", + "no_copy": 0, + "non_negative": 0, + "options": "Utility Tariff Block", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "print_width": null, + "read_only": 0, + "read_only_depends_on": null, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "show_dashboard": 0, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "default": null, + "depends_on": null, + "description": null, + "docstatus": 0, + "doctype": "Custom Field", + "dt": "Item Price", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "tariffs", + "fieldtype": "Table", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_preview": 0, + "in_standard_filter": 0, + "insert_after": "section_break_24", + "is_system_generated": 0, + "is_virtual": 0, + "label": "Tariffs", + "length": 0, + "link_filters": null, + "mandatory_depends_on": null, + "modified": "2024-10-14 02:10:02.044248", + "module": "Utility Billing", + "name": "Item Price-custom_tariffs", + "no_copy": 0, + "non_negative": 0, + "options": "Item Price Tariff", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "print_width": null, + "read_only": 0, + "read_only_depends_on": null, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "show_dashboard": 0, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "default": null, + "depends_on": null, + "description": null, + "docstatus": 0, + "doctype": "Custom Field", + "dt": "Issue", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "utility_service_request", + "fieldtype": "Link", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_preview": 0, + "in_standard_filter": 0, + "insert_after": "email_account", + "is_system_generated": 0, + "is_virtual": 0, + "label": "Utility Service Request", + "length": 0, + "link_filters": null, + "mandatory_depends_on": null, + "modified": "2024-10-14 05:31:21.910805", + "module": "Utility Billing", + "name": "Issue-custom_request_for_utility_service", + "no_copy": 0, + "non_negative": 0, + "options": "Utility Service Request", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "print_width": null, + "read_only": 0, + "read_only_depends_on": null, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "show_dashboard": 0, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "default": null, + "depends_on": null, + "description": null, + "docstatus": 0, + "doctype": "Custom Field", + "dt": "Sales Invoice Item", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "current_reading", + "fieldtype": "Data", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_preview": 0, + "in_standard_filter": 0, + "insert_after": "previous_reading", + "is_system_generated": 0, + "is_virtual": 0, + "label": "Current Reading", + "length": 0, + "link_filters": null, + "mandatory_depends_on": null, + "modified": "2024-10-04 11:28:56.369843", + "module": "Utility Billing", + "name": "Sales Invoice Item-custom_current_reading", + "no_copy": 0, + "non_negative": 0, + "options": null, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "print_width": null, + "read_only": 0, + "read_only_depends_on": null, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "show_dashboard": 0, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + } +] diff --git a/utility_billing/fixtures/doctype_link.json b/utility_billing/fixtures/doctype_link.json index 3de99b8..d3c8a45 100644 --- a/utility_billing/fixtures/doctype_link.json +++ b/utility_billing/fixtures/doctype_link.json @@ -100,5 +100,39 @@ "parentfield": "links", "parenttype": "DocType", "table_fieldname": "sales_order" + }, + { + "custom": 0, + "docstatus": 0, + "doctype": "DocType Link", + "group": "Utility Billing", + "hidden": 0, + "is_child_table": 0, + "link_doctype": "Utility Service Request", + "link_fieldname": "sales_order", + "modified": "2024-10-17 09:13:15.616636", + "name": "eejk053ape", + "parent": "Sales Order", + "parent_doctype": null, + "parentfield": "links", + "parenttype": "DocType", + "table_fieldname": null + }, + { + "custom": 0, + "docstatus": 0, + "doctype": "DocType Link", + "group": "Utility Billing", + "hidden": 0, + "is_child_table": 0, + "link_doctype": "Meter Reading", + "link_fieldname": "sales_order", + "modified": "2024-10-17 09:13:15.616636", + "name": "eejkpp18u8", + "parent": "Sales Order", + "parent_doctype": null, + "parentfield": "links", + "parenttype": "DocType", + "table_fieldname": "sales_order" } ] \ No newline at end of file From 608ef58fd614219b753e466336182d72aef79f91 Mon Sep 17 00:00:00 2001 From: muruthigitau Date: Thu, 17 Oct 2024 11:52:38 +0300 Subject: [PATCH 5/5] fix: reading_rates rename to rates meter reading --- .../doctype/meter_reading/meter_reading.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/utility_billing/utility_billing/doctype/meter_reading/meter_reading.json b/utility_billing/utility_billing/doctype/meter_reading/meter_reading.json index fa4c3f3..d77aef8 100644 --- a/utility_billing/utility_billing/doctype/meter_reading/meter_reading.json +++ b/utility_billing/utility_billing/doctype/meter_reading/meter_reading.json @@ -18,7 +18,7 @@ "territory", "section_break_4qzn", "items", - "reading_rates", + "rates", "amended_from", "more_info_tab", "sales_order" @@ -121,7 +121,7 @@ "label": "More Info" }, { - "fieldname": "reading_rates", + "fieldname": "rates", "fieldtype": "Table", "label": "Rates", "options": "Meter Reading Tariff Rate", @@ -131,7 +131,7 @@ "index_web_pages_for_search": 1, "is_submittable": 1, "links": [], - "modified": "2024-10-17 09:36:54.588694", + "modified": "2024-10-17 10:50:02.967407", "modified_by": "Administrator", "module": "Utility Billing", "name": "Meter Reading",