There was an error while loading. Please reload this page.
2 parents be48cf7 + 5738db9 commit 494616cCopy full SHA for 494616c
1 file changed
ury/ury/doctype/ury_table/ury_table.js
@@ -1,8 +1,32 @@
1
// Copyright (c) 2023, Tridz Technologies Pvt. Ltd. and contributors
2
// For license information, please see license.txt
3
4
+// frappe.ui.form.on('URY Table', {
5
+// // refresh: function(frm) {
6
+
7
+// // }
8
+// });
9
10
frappe.ui.form.on('URY Table', {
- // refresh: function(frm) {
11
+ refresh(frm) {
12
+ frm.set_query('restaurant_room', function () {
13
+ if (!frm.doc.branch) {
14
+ return {
15
+ filters: {
16
+ name: ['=', '']
17
+ }
18
+ };
19
20
21
22
+ branch: frm.doc.branch
23
24
25
+ });
26
+ },
27
- // }
28
+ branch(frm) {
29
+ // Clear room when restaurant changes
30
+ frm.set_value('restaurant_room', null);
31
32
});
0 commit comments