Skip to content

Commit

Permalink
Merge pull request #13 from navariltd/staging
Browse files Browse the repository at this point in the history
Staging
  • Loading branch information
muruthigitau authored Oct 17, 2024
2 parents 244790d + 608ef58 commit 64dad1c
Show file tree
Hide file tree
Showing 12 changed files with 745 additions and 570 deletions.
1,178 changes: 617 additions & 561 deletions utility_billing/fixtures/custom_field.json

Large diffs are not rendered by default.

34 changes: 34 additions & 0 deletions utility_billing/fixtures/doctype_link.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,21 @@
{
"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
},
{
"fieldname": "rate",
"fieldtype": "Currency",
"in_filter": 1,
"in_list_view": 1,
"in_preview": 1,
"in_standard_filter": 1,
"label": "Rate",
"reqd": 1
},
Expand All @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"territory",
"section_break_4qzn",
"items",
"reading_rates",
"rates",
"amended_from",
"more_info_tab",
"sales_order"
Expand Down Expand Up @@ -121,7 +121,7 @@
"label": "More Info"
},
{
"fieldname": "reading_rates",
"fieldname": "rates",
"fieldtype": "Table",
"label": "Rates",
"options": "Meter Reading Tariff Rate",
Expand All @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
},
{
Expand Down Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,13 +273,15 @@
"fieldtype": "Column Break"
},
{
"allow_on_submit": 1,
"fieldname": "customer",
"fieldtype": "Link",
"label": "Customer",
"options": "Customer",
"read_only": 1
},
{
"allow_on_submit": 1,
"fieldname": "sales_order",
"fieldtype": "Link",
"label": "Sales Order",
Expand Down Expand Up @@ -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,
Expand All @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Empty file.
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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) {

// },
// });
Original file line number Diff line number Diff line change
@@ -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": []
}
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 64dad1c

Please sign in to comment.