Skip to content

Commit

Permalink
Merge pull request #8 from navariltd/staging
Browse files Browse the repository at this point in the history
fix: meter reading tariffs and price list loading
  • Loading branch information
muruthigitau authored Oct 17, 2024
2 parents bc3b45b + 4bf26b1 commit b8f0c88
Show file tree
Hide file tree
Showing 9 changed files with 201 additions and 19 deletions.
56 changes: 56 additions & 0 deletions utility_billing/fixtures/custom_field.json
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,62 @@
"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,
Expand Down
34 changes: 34 additions & 0 deletions utility_billing/fixtures/doctype_link.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,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-16 15:05:45.346765",
"name": "qhct5747de",
"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-16 15:05:45.346765",
"name": "qhct5cue67",
"parent": "Sales Order",
"parent_doctype": null,
"parentfield": "links",
"parenttype": "DocType",
"table_fieldname": "sales_order"
}
]
54 changes: 54 additions & 0 deletions utility_billing/fixtures/workspace.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,58 @@
[
{
"app": null,
"charts": [],
"content": "[{\"id\":\"fqWR1Nv2hU\",\"type\":\"header\",\"data\":{\"text\":\"Utility Billing Shortcuts<br>\",\"col\":12}},{\"id\":\"_3e05httN7\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Meter Reading\",\"col\":3}},{\"id\":\"1acTaFDYDY\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Utility Service Request\",\"col\":4}}]",
"custom_blocks": [],
"docstatus": 0,
"doctype": "Workspace",
"for_user": "",
"hide_custom": 0,
"icon": "milestone",
"indicator_color": "green",
"is_hidden": 0,
"label": "Utility Billing",
"links": [],
"modified": "2024-10-17 06:39:06.370295",
"module": "Utility Billing",
"name": "Utility Billing",
"number_cards": [],
"parent_page": "Selling",
"public": 1,
"quick_lists": [],
"restrict_to_domain": null,
"roles": [],
"sequence_id": 48.0,
"shortcuts": [
{
"color": "Grey",
"doc_view": "List",
"format": null,
"icon": null,
"kanban_board": null,
"label": "Meter Reading",
"link_to": "Meter Reading",
"restrict_to_domain": null,
"stats_filter": "[]",
"type": "DocType",
"url": null
},
{
"color": "Grey",
"doc_view": "List",
"format": null,
"icon": null,
"kanban_board": null,
"label": "Utility Service Request",
"link_to": "Utility Service Request",
"restrict_to_domain": null,
"stats_filter": "[]",
"type": "DocType",
"url": null
}
],
"title": "Utility Billing"
},
{
"app": null,
"charts": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,18 @@
{
"fieldname": "block",
"fieldtype": "Data",
"in_filter": 1,
"in_list_view": 1,
"in_preview": 1,
"in_standard_filter": 1,
"label": "Block",
"reqd": 1
}
],
"index_web_pages_for_search": 1,
"istable": 1,
"links": [],
"modified": "2024-10-16 14:44:47.681695",
"modified": "2024-10-17 06:20:57.592318",
"modified_by": "Administrator",
"module": "Utility Billing",
"name": "Item Price Tariff",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@
"default": "MR-.YYYY.MM.-",
"fieldname": "naming_series",
"fieldtype": "Select",
"hidden": 1,
"in_list_view": 1,
"label": "Series",
"options": "MR-.YYYY.MM.-",
Expand Down Expand Up @@ -132,7 +131,7 @@
"index_web_pages_for_search": 1,
"is_submittable": 1,
"links": [],
"modified": "2024-10-15 13:20:50.730593",
"modified": "2024-10-17 06:30:56.344965",
"modified_by": "Administrator",
"module": "Utility Billing",
"name": "Meter Reading",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ def create_sales_order(meter_reading):
"qty": round(rate.qty),
"rate": rate.rate,
"amount": rate.amount,
"block": rate.block,
"delivery_date": nowdate(),
},
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
"fieldname": "meter_reading_item",
"fieldtype": "Link",
"in_filter": 1,
"in_list_view": 1,
"in_preview": 1,
"in_standard_filter": 1,
"label": "Meter Reading Item",
Expand Down Expand Up @@ -85,26 +84,14 @@
}
],
"index_web_pages_for_search": 1,
"istable": 1,
"links": [],
"modified": "2024-10-17 05:34:18.084480",
"modified": "2024-10-17 06:25:22.454232",
"modified_by": "Administrator",
"module": "Utility Billing",
"name": "Meter Reading Rate",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"share": 1,
"write": 1
}
],
"permissions": [],
"sort_field": "creation",
"sort_order": "DESC",
"states": []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ def create_meter_reading_rates(meter_reading, price_list, reading_date):
{
"meter_reading_item": item.name,
"item_code": item.item_code,
"block": tariff.block,
"qty": slab_quantity,
"amount": amount,
"rate": rate,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"charts": [],
"content": "[{\"id\":\"fqWR1Nv2hU\",\"type\":\"header\",\"data\":{\"text\":\"Utility Billing Shortcuts<br>\",\"col\":12}},{\"id\":\"_3e05httN7\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Meter Reading\",\"col\":3}},{\"id\":\"1acTaFDYDY\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Utility Service Request\",\"col\":4}}]",
"creation": "2024-10-15 09:19:30.540834",
"custom_blocks": [],
"docstatus": 0,
"doctype": "Workspace",
"for_user": "",
"hide_custom": 0,
"icon": "milestone",
"idx": 0,
"indicator_color": "green",
"is_hidden": 0,
"label": "Utility Billing",
"links": [],
"modified": "2024-10-17 06:39:06.370295",
"modified_by": "Administrator",
"module": "Utility Billing",
"name": "Utility Billing",
"number_cards": [],
"owner": "Administrator",
"parent_page": "Selling",
"public": 1,
"quick_lists": [],
"roles": [],
"sequence_id": 48.0,
"shortcuts": [
{
"color": "Grey",
"doc_view": "List",
"label": "Meter Reading",
"link_to": "Meter Reading",
"stats_filter": "[]",
"type": "DocType"
},
{
"color": "Grey",
"doc_view": "List",
"label": "Utility Service Request",
"link_to": "Utility Service Request",
"stats_filter": "[]",
"type": "DocType"
}
],
"title": "Utility Billing"
}

0 comments on commit b8f0c88

Please sign in to comment.