-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore:client script and fixtures hooks
- Loading branch information
1 parent
b5d5c37
commit 68d20e3
Showing
3 changed files
with
89 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
[ | ||
{ | ||
"docstatus": 0, | ||
"doctype": "Client Script", | ||
"dt": "Item Price", | ||
"enabled": 1, | ||
"modified": "2024-10-03 10:36:00.652247", | ||
"module": "Utility Billing", | ||
"name": "Item Price Tariff", | ||
"script": "frappe.ui.form.on('Item Price', {\n refresh: function(frm) {\n check_and_set_rate_zero(frm);\n },\n\n custom_item_price_tariffs: function(frm) {\n check_and_set_rate_zero(frm);\n }\n});\n\n// Helper function to check tariff table and set rate to zero\nfunction check_and_set_rate_zero(frm) {\n if (frm.doc.custom_item_price_tariffs && frm.doc.custom_item_price_tariffs.length > 0) {\n frm.set_value('price_list_rate', 0);\n }\n}\n", | ||
"view": "Form" | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
[ | ||
{ | ||
"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": "custom_item_price_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": "Item Price Tariffs", | ||
"length": 0, | ||
"link_filters": null, | ||
"mandatory_depends_on": null, | ||
"modified": "2024-10-03 10:24:15.852773", | ||
"module": "Stock", | ||
"name": "Item Price-custom_item_price_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 | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,24 @@ | |
app_email = "[email protected]" | ||
app_license = "agpl-3.0" | ||
|
||
fixtures = [ | ||
{"dt": "Client Script", "filters": [["module", "=", "Utility Billing"]]}, | ||
{ | ||
"doctype": "Custom Field", | ||
"filters": [ | ||
[ | ||
"dt", | ||
"in", | ||
( | ||
"Item Price" | ||
), | ||
], | ||
["is_system_generated", "=", 0], | ||
], | ||
}, | ||
] | ||
|
||
|
||
# Apps | ||
# ------------------ | ||
|
||
|