diff --git a/aumms/aumms/custom/item.json b/aumms/aumms/custom/item.json index b69a0ee2..3f383239 100644 --- a/aumms/aumms/custom/item.json +++ b/aumms/aumms/custom/item.json @@ -11,40 +11,40 @@ "collapsible": 0, "collapsible_depends_on": null, "columns": 0, - "creation": "2023-01-05 15:09:29.804481", + "creation": "2024-02-15 12:27:24.365547", "default": null, - "depends_on": "eval: doc.making_charge_based_on == 'Percentage' && doc.is_purity_item", + "depends_on": null, "description": null, "docstatus": 0, "dt": "Item", - "fetch_from": "item_group.percentage", - "fetch_if_empty": 1, - "fieldname": "making_charge_percentage", - "fieldtype": "Percent", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "custom_item_qr_code", + "fieldtype": "Image", "hidden": 0, "hide_border": 0, "hide_days": 0, "hide_seconds": 0, - "idx": 9, + "idx": 33, "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": "making_charge_based_on", + "insert_after": "item_qr", "is_system_generated": 0, "is_virtual": 0, - "label": "Making Charge Percentage", + "label": "Item QR Code", "length": 0, - "mandatory_depends_on": "eval: doc.making_charge_based_on == 'Percentage'", - "modified": "2023-01-05 15:09:29.804481", + "mandatory_depends_on": null, + "modified": "2024-02-15 12:27:24.365547", "modified_by": "Administrator", "module": null, - "name": "Item-making_charge_percentage", + "name": "Item-custom_item_qr_code", "no_copy": 0, "non_negative": 0, - "options": null, + "options": "item_qr", "owner": "Administrator", "permlevel": 0, "precision": "", @@ -72,40 +72,162 @@ "collapsible": 0, "collapsible_depends_on": null, "columns": 0, - "creation": "2023-01-05 17:32:05.643181", + "creation": "2024-02-14 17:06:50.781254", "default": null, - "depends_on": "eval:doc.is_purity_item", + "depends_on": null, "description": null, "docstatus": 0, "dt": "Item", - "fetch_from": "item_group.making_charge_based_on", - "fetch_if_empty": 1, - "fieldname": "making_charge_based_on", - "fieldtype": "Select", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "item_qr", + "fieldtype": "Attach Image", "hidden": 0, "hide_border": 0, "hide_days": 0, "hide_seconds": 0, - "idx": 8, + "idx": 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": "stock_uom", - "is_system_generated": 0, + "insert_after": null, + "is_system_generated": 1, "is_virtual": 0, - "label": "Making Charge Based On", + "label": "Item QR", "length": 0, "mandatory_depends_on": null, - "modified": "2023-01-05 17:32:05.643181", + "modified": "2024-02-14 17:06:50.781254", "modified_by": "Administrator", "module": null, - "name": "Item-making_charge_based_on", + "name": "Item-item_qr", + "no_copy": 1, + "non_negative": 0, + "options": null, + "owner": "Administrator", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "print_width": null, + "read_only": 1, + "read_only_depends_on": null, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "creation": "2024-02-03 10:35:57.054693", + "default": null, + "depends_on": null, + "description": null, + "docstatus": 0, + "dt": "Item", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "is_ineligible_for_itc", + "fieldtype": "Check", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "idx": 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_tax_section_break", + "is_system_generated": 1, + "is_virtual": 0, + "label": "Is Ineligible for Input Tax Credit", + "length": 0, + "mandatory_depends_on": null, + "modified": "2024-02-14 12:38:57.353898", + "modified_by": "Administrator", + "module": null, + "name": "Item-is_ineligible_for_itc", "no_copy": 0, "non_negative": 0, - "options": "\nFixed\nPercentage", + "options": null, + "owner": "Administrator", + "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, + "sort_options": 0, + "translatable": 1, + "unique": 0, + "width": null + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "allow_in_quick_entry": 1, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "creation": "2024-02-03 10:35:57.051188", + "default": null, + "depends_on": null, + "description": "You can search code by the description of the category.", + "docstatus": 0, + "dt": "Item", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "gst_hsn_code", + "fieldtype": "Link", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "idx": 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_group", + "is_system_generated": 1, + "is_virtual": 0, + "label": "HSN/SAC", + "length": 0, + "mandatory_depends_on": "eval:gst_settings.validate_hsn_code && doc.is_sales_item", + "modified": "2024-02-14 12:38:57.344227", + "modified_by": "Administrator", + "module": null, + "name": "Item-gst_hsn_code", + "no_copy": 0, + "non_negative": 0, + "options": "GST HSN Code", "owner": "Administrator", "permlevel": 0, "precision": "", @@ -133,37 +255,98 @@ "collapsible": 0, "collapsible_depends_on": null, "columns": 0, - "creation": "2023-01-06 11:28:22.995811", + "creation": "2023-08-10 16:32:46.294462", "default": null, - "depends_on": "eval: doc.making_charge_based_on == 'Fixed' && doc.is_purity_item", + "depends_on": null, "description": null, "docstatus": 0, "dt": "Item", - "fetch_from": "item_group.currency", - "fetch_if_empty": 1, - "fieldname": "making_charge", - "fieldtype": "Currency", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "is_aumms_item", + "fieldtype": "Check", "hidden": 0, "hide_border": 0, "hide_days": 0, "hide_seconds": 0, - "idx": 10, + "idx": 17, "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": "making_charge_percentage", + "insert_after": "disabled", "is_system_generated": 0, "is_virtual": 0, - "label": "Making Charge", + "label": "Is AuMMS Item", "length": 0, - "mandatory_depends_on": "eval: doc.making_charge_based_on == 'Fixed'", - "modified": "2023-01-06 11:28:22.995811", + "mandatory_depends_on": null, + "modified": "2023-08-10 16:32:46.294462", "modified_by": "Administrator", "module": null, - "name": "Item-making_charge", + "name": "Item-is_aumms_item", + "no_copy": 0, + "non_negative": 0, + "options": null, + "owner": "Administrator", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "print_width": null, + "read_only": 1, + "read_only_depends_on": null, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "creation": "2023-08-10 16:25:51.557590", + "default": "0", + "depends_on": "", + "description": null, + "docstatus": 0, + "dt": "Item", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "gold_weight", + "fieldtype": "Float", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "idx": 46, + "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": "warranty_period", + "is_system_generated": 0, + "is_virtual": 0, + "label": "Gold Weight", + "length": 0, + "mandatory_depends_on": "", + "modified": "2023-08-10 16:25:51.557590", + "modified_by": "Administrator", + "module": null, + "name": "Item-gold_weight", "no_copy": 0, "non_negative": 0, "options": null, @@ -188,46 +371,46 @@ "_comments": null, "_liked_by": null, "_user_tags": null, - "allow_in_quick_entry": 1, + "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, "collapsible_depends_on": null, "columns": 0, - "creation": "2023-01-06 14:45:18.269671", - "default": null, - "depends_on": "eval:doc.item_type && doc.is_purity_item", + "creation": "2023-08-10 16:22:43.694341", + "default": "0", + "depends_on": "has_stone", "description": null, "docstatus": 0, "dt": "Item", "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "purity", - "fieldtype": "Link", + "fieldname": "stone_charge", + "fieldtype": "Currency", "hidden": 0, "hide_border": 0, "hide_days": 0, "hide_seconds": 0, - "idx": 12, + "idx": 51, "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": "is_purity_item", + "insert_after": "stone_weight", "is_system_generated": 0, "is_virtual": 0, - "label": "Purity", + "label": "Stone Charge", "length": 0, - "mandatory_depends_on": "eval:doc.is_purity_item", - "modified": "2023-01-06 14:45:18.269671", + "mandatory_depends_on": null, + "modified": "2023-08-10 16:22:43.694341", "modified_by": "Administrator", "module": null, - "name": "Item-purity", + "name": "Item-stone_charge", "no_copy": 0, "non_negative": 0, - "options": "Purity", + "options": null, "owner": "Administrator", "permlevel": 0, "precision": "", @@ -255,37 +438,37 @@ "collapsible": 0, "collapsible_depends_on": null, "columns": 0, - "creation": "2023-01-06 14:48:46.579229", - "default": null, - "depends_on": "eval:doc.is_purity_item", + "creation": "2023-08-10 16:21:58.357665", + "default": "0", + "depends_on": "has_stone", "description": null, "docstatus": 0, "dt": "Item", - "fetch_from": "purity.purity_percentage", + "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "purity_percentage", - "fieldtype": "Percent", + "fieldname": "stone_weight", + "fieldtype": "Float", "hidden": 0, "hide_border": 0, "hide_days": 0, "hide_seconds": 0, - "idx": 13, + "idx": 50, "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": "purity", + "insert_after": "has_stone", "is_system_generated": 0, "is_virtual": 0, - "label": "Purity Percentage", + "label": "Stone Weight", "length": 0, "mandatory_depends_on": null, - "modified": "2023-01-06 14:48:46.579229", + "modified": "2023-08-10 16:21:58.357665", "modified_by": "Administrator", "module": null, - "name": "Item-purity_percentage", + "name": "Item-stone_weight", "no_copy": 0, "non_negative": 0, "options": null, @@ -295,7 +478,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "print_width": null, - "read_only": 1, + "read_only": 0, "read_only_depends_on": null, "report_hide": 0, "reqd": 0, @@ -310,46 +493,46 @@ "_comments": null, "_liked_by": null, "_user_tags": null, - "allow_in_quick_entry": 1, + "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, "collapsible_depends_on": null, "columns": 0, - "creation": "2023-01-06 16:49:20.501863", + "creation": "2023-08-10 16:19:51.484765", "default": null, "depends_on": "", "description": null, "docstatus": 0, "dt": "Item", - "fetch_from": "item_group.item_type", - "fetch_if_empty": 1, - "fieldname": "item_type", - "fieldtype": "Link", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "has_stone", + "fieldtype": "Check", "hidden": 0, "hide_border": 0, "hide_days": 0, "hide_seconds": 0, - "idx": 6, + "idx": 49, "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_group", + "insert_after": "weight_uom", "is_system_generated": 0, "is_virtual": 0, - "label": "Item Type", + "label": "Has Stone", "length": 0, - "mandatory_depends_on": "", - "modified": "2023-01-06 16:49:20.501863", + "mandatory_depends_on": null, + "modified": "2023-08-10 16:19:51.484765", "modified_by": "Administrator", "module": null, - "name": "Item-item_type", + "name": "Item-has_stone", "no_copy": 0, "non_negative": 0, - "options": "Item Type", + "options": null, "owner": "Administrator", "permlevel": 0, "precision": "", @@ -391,7 +574,7 @@ "hide_border": 0, "hide_days": 0, "hide_seconds": 0, - "idx": 11, + "idx": 12, "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_global_search": 0, @@ -432,46 +615,46 @@ "_comments": null, "_liked_by": null, "_user_tags": null, - "allow_in_quick_entry": 0, + "allow_in_quick_entry": 1, "allow_on_submit": 0, "bold": 0, "collapsible": 0, "collapsible_depends_on": null, "columns": 0, - "creation": "2023-08-10 16:19:51.484765", + "creation": "2023-01-06 16:49:20.501863", "default": null, "depends_on": "", "description": null, "docstatus": 0, "dt": "Item", - "fetch_from": null, - "fetch_if_empty": 0, - "fieldname": "has_stone", - "fieldtype": "Check", + "fetch_from": "item_group.item_type", + "fetch_if_empty": 1, + "fieldname": "item_type", + "fieldtype": "Link", "hidden": 0, "hide_border": 0, "hide_days": 0, "hide_seconds": 0, - "idx": 47, + "idx": 6, "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": "weight_uom", + "insert_after": "item_group", "is_system_generated": 0, "is_virtual": 0, - "label": "Has Stone", + "label": "Item Type", "length": 0, - "mandatory_depends_on": null, - "modified": "2023-08-10 16:19:51.484765", + "mandatory_depends_on": "", + "modified": "2023-01-06 16:49:20.501863", "modified_by": "Administrator", "module": null, - "name": "Item-has_stone", + "name": "Item-item_type", "no_copy": 0, "non_negative": 0, - "options": null, + "options": "Item Type", "owner": "Administrator", "permlevel": 0, "precision": "", @@ -499,37 +682,37 @@ "collapsible": 0, "collapsible_depends_on": null, "columns": 0, - "creation": "2023-08-10 16:21:58.357665", - "default": "0", - "depends_on": "has_stone", + "creation": "2023-01-06 14:48:46.579229", + "default": null, + "depends_on": "eval:doc.is_purity_item", "description": null, "docstatus": 0, "dt": "Item", - "fetch_from": null, + "fetch_from": "purity.purity_percentage", "fetch_if_empty": 0, - "fieldname": "stone_weight", - "fieldtype": "Float", + "fieldname": "purity_percentage", + "fieldtype": "Percent", "hidden": 0, "hide_border": 0, "hide_days": 0, "hide_seconds": 0, - "idx": 48, + "idx": 14, "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": "has_stone", + "insert_after": "purity", "is_system_generated": 0, "is_virtual": 0, - "label": "Stone Weight", + "label": "Purity Percentage", "length": 0, "mandatory_depends_on": null, - "modified": "2023-08-10 16:21:58.357665", + "modified": "2023-01-06 14:48:46.579229", "modified_by": "Administrator", "module": null, - "name": "Item-stone_weight", + "name": "Item-purity_percentage", "no_copy": 0, "non_negative": 0, "options": null, @@ -539,7 +722,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "print_width": null, - "read_only": 0, + "read_only": 1, "read_only_depends_on": null, "report_hide": 0, "reqd": 0, @@ -554,46 +737,46 @@ "_comments": null, "_liked_by": null, "_user_tags": null, - "allow_in_quick_entry": 0, + "allow_in_quick_entry": 1, "allow_on_submit": 0, "bold": 0, "collapsible": 0, "collapsible_depends_on": null, "columns": 0, - "creation": "2023-08-10 16:22:43.694341", - "default": "0", - "depends_on": "has_stone", + "creation": "2023-01-06 14:45:18.269671", + "default": null, + "depends_on": "eval:doc.item_type && doc.is_purity_item", "description": null, "docstatus": 0, "dt": "Item", "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "stone_charge", - "fieldtype": "Currency", + "fieldname": "purity", + "fieldtype": "Link", "hidden": 0, "hide_border": 0, "hide_days": 0, "hide_seconds": 0, - "idx": 49, + "idx": 13, "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": "stone_weight", + "insert_after": "is_purity_item", "is_system_generated": 0, "is_virtual": 0, - "label": "Stone Charge", + "label": "Purity", "length": 0, - "mandatory_depends_on": null, - "modified": "2023-08-10 16:22:43.694341", + "mandatory_depends_on": "eval:doc.is_purity_item", + "modified": "2023-01-06 14:45:18.269671", "modified_by": "Administrator", "module": null, - "name": "Item-stone_charge", + "name": "Item-purity", "no_copy": 0, "non_negative": 0, - "options": null, + "options": "Purity", "owner": "Administrator", "permlevel": 0, "precision": "", @@ -621,37 +804,37 @@ "collapsible": 0, "collapsible_depends_on": null, "columns": 0, - "creation": "2023-08-10 16:25:51.557590", - "default": "0", - "depends_on": "", + "creation": "2023-01-06 11:28:22.995811", + "default": null, + "depends_on": "eval: doc.making_charge_based_on == 'Fixed' && doc.is_purity_item", "description": null, "docstatus": 0, "dt": "Item", - "fetch_from": null, - "fetch_if_empty": 0, - "fieldname": "gold_weight", - "fieldtype": "Float", + "fetch_from": "item_group.currency", + "fetch_if_empty": 1, + "fieldname": "making_charge", + "fieldtype": "Currency", "hidden": 0, "hide_border": 0, "hide_days": 0, "hide_seconds": 0, - "idx": 44, + "idx": 11, "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": "warranty_period", + "insert_after": "making_charge_percentage", "is_system_generated": 0, "is_virtual": 0, - "label": "Gold Weight", + "label": "Making Charge", "length": 0, - "mandatory_depends_on": "", - "modified": "2023-08-10 16:25:51.557590", + "mandatory_depends_on": "eval: doc.making_charge_based_on == 'Fixed'", + "modified": "2023-01-06 11:28:22.995811", "modified_by": "Administrator", "module": null, - "name": "Item-gold_weight", + "name": "Item-making_charge", "no_copy": 0, "non_negative": 0, "options": null, @@ -682,37 +865,98 @@ "collapsible": 0, "collapsible_depends_on": null, "columns": 0, - "creation": "2023-08-10 16:32:46.294462", + "creation": "2023-01-05 17:32:05.643181", "default": null, - "depends_on": null, + "depends_on": "eval:doc.is_purity_item", "description": null, "docstatus": 0, "dt": "Item", - "fetch_from": null, - "fetch_if_empty": 0, - "fieldname": "is_aumms_item", - "fieldtype": "Check", + "fetch_from": "item_group.making_charge_based_on", + "fetch_if_empty": 1, + "fieldname": "making_charge_based_on", + "fieldtype": "Select", "hidden": 0, "hide_border": 0, "hide_days": 0, "hide_seconds": 0, - "idx": 16, + "idx": 9, "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": "disabled", + "insert_after": "stock_uom", "is_system_generated": 0, "is_virtual": 0, - "label": "Is AuMMS Item", + "label": "Making Charge Based On", "length": 0, "mandatory_depends_on": null, - "modified": "2023-08-10 16:32:46.294462", + "modified": "2023-01-05 17:32:05.643181", "modified_by": "Administrator", "module": null, - "name": "Item-is_aumms_item", + "name": "Item-making_charge_based_on", + "no_copy": 0, + "non_negative": 0, + "options": "\nFixed\nPercentage", + "owner": "Administrator", + "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, + "sort_options": 0, + "translatable": 1, + "unique": 0, + "width": null + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "creation": "2023-01-05 15:09:29.804481", + "default": null, + "depends_on": "eval: doc.making_charge_based_on == 'Percentage' && doc.is_purity_item", + "description": null, + "docstatus": 0, + "dt": "Item", + "fetch_from": "item_group.percentage", + "fetch_if_empty": 1, + "fieldname": "making_charge_percentage", + "fieldtype": "Percent", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "idx": 10, + "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": "making_charge_based_on", + "is_system_generated": 0, + "is_virtual": 0, + "label": "Making Charge Percentage", + "length": 0, + "mandatory_depends_on": "eval: doc.making_charge_based_on == 'Percentage'", + "modified": "2023-01-05 15:09:29.804481", + "modified_by": "Administrator", + "module": null, + "name": "Item-making_charge_percentage", "no_copy": 0, "non_negative": 0, "options": null, @@ -722,7 +966,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "print_width": null, - "read_only": 1, + "read_only": 0, "read_only_depends_on": null, "report_hide": 0, "reqd": 0, @@ -737,6 +981,29 @@ "doctype": "Item", "links": [], "property_setters": [ + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "creation": "2024-02-15 16:27:25.111292", + "default_value": null, + "doc_type": "Item", + "docstatus": 0, + "doctype_or_field": "DocType", + "field_name": null, + "idx": 0, + "is_system_generated": 0, + "modified": "2024-02-15 16:27:25.111292", + "modified_by": "Administrator", + "module": null, + "name": "Item-main-field_order", + "owner": "Administrator", + "property": "field_order", + "property_type": "Data", + "row_name": null, + "value": "[\"details\", \"naming_series\", \"item_code\", \"item_name\", \"item_group\", \"item_type\", \"gst_hsn_code\", \"stock_uom\", \"making_charge_based_on\", \"making_charge_percentage\", \"making_charge\", \"is_purity_item\", \"purity\", \"purity_percentage\", \"column_break0\", \"disabled\", \"is_aumms_item\", \"allow_alternative_item\", \"is_stock_item\", \"has_variants\", \"opening_stock\", \"valuation_rate\", \"standard_rate\", \"is_fixed_asset\", \"auto_create_assets\", \"is_grouped_asset\", \"asset_category\", \"asset_naming_series\", \"over_delivery_receipt_allowance\", \"over_billing_allowance\", \"image\", \"item_qr\", \"custom_item_qr_code\", \"section_break_11\", \"description\", \"brand\", \"dashboard_tab\", \"inventory_section\", \"inventory_settings_section\", \"shelf_life_in_days\", \"end_of_life\", \"default_material_request_type\", \"valuation_method\", \"column_break1\", \"warranty_period\", \"gold_weight\", \"weight_per_unit\", \"weight_uom\", \"has_stone\", \"stone_weight\", \"stone_charge\", \"allow_negative_stock\", \"sb_barcodes\", \"barcodes\", \"reorder_section\", \"reorder_levels\", \"unit_of_measure_conversion\", \"uoms\", \"serial_nos_and_batches\", \"has_batch_no\", \"create_new_batch\", \"batch_number_series\", \"has_expiry_date\", \"retain_sample\", \"sample_quantity\", \"column_break_37\", \"has_serial_no\", \"serial_no_series\", \"variants_section\", \"variant_of\", \"variant_based_on\", \"attributes\", \"accounting\", \"deferred_accounting_section\", \"enable_deferred_expense\", \"no_of_months_exp\", \"column_break_9s9o\", \"enable_deferred_revenue\", \"no_of_months\", \"section_break_avcp\", \"item_defaults\", \"purchasing_tab\", \"purchase_uom\", \"min_order_qty\", \"safety_stock\", \"is_purchase_item\", \"purchase_details_cb\", \"lead_time_days\", \"last_purchase_rate\", \"is_customer_provided_item\", \"customer\", \"supplier_details\", \"delivered_by_supplier\", \"column_break2\", \"supplier_items\", \"foreign_trade_details\", \"country_of_origin\", \"column_break_59\", \"customs_tariff_number\", \"sales_details\", \"sales_uom\", \"grant_commission\", \"is_sales_item\", \"column_break3\", \"max_discount\", \"customer_details\", \"customer_items\", \"item_tax_section_break\", \"is_ineligible_for_itc\", \"taxes\", \"quality_tab\", \"inspection_required_before_purchase\", \"quality_inspection_template\", \"inspection_required_before_delivery\", \"manufacturing\", \"include_item_in_manufacturing\", \"is_sub_contracted_item\", \"default_bom\", \"column_break_74\", \"customer_code\", \"default_item_manufacturer\", \"default_manufacturer_part_no\", \"total_projected_qty\"]" + }, { "_assign": null, "_comments": null, diff --git a/aumms/aumms/custom/item_barcode.json b/aumms/aumms/custom/item_barcode.json new file mode 100644 index 00000000..c2b9b26a --- /dev/null +++ b/aumms/aumms/custom/item_barcode.json @@ -0,0 +1,32 @@ +{ + "custom_fields": [], + "custom_perms": [], + "doctype": "Item Barcode", + "links": [], + "property_setters": [ + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "creation": "2024-02-03 11:01:51.263147", + "default_value": null, + "doc_type": "Item Barcode", + "docstatus": 0, + "doctype_or_field": "DocField", + "field_name": "barcode", + "idx": 0, + "is_system_generated": 1, + "modified": "2024-02-03 11:01:51.263147", + "modified_by": "Administrator", + "module": null, + "name": "Item Barcode-barcode-hidden", + "owner": "Administrator", + "property": "hidden", + "property_type": "Check", + "row_name": null, + "value": "0" + } + ], + "sync_on_migrate": 1 +} \ No newline at end of file diff --git a/aumms/aumms/doc_events/item.py b/aumms/aumms/doc_events/item.py index fd07c147..c82bcadb 100644 --- a/aumms/aumms/doc_events/item.py +++ b/aumms/aumms/doc_events/item.py @@ -1,6 +1,15 @@ +import os +import io +import json import frappe from frappe import _ +from datetime import date +from pyqrcode import create +from base64 import b64encode +from pyqrcode import create as qr_create +from frappe.utils.data import get_url_to_form from aumms.aumms.utils import get_conversion_factor +from frappe.custom.doctype.custom_field.custom_field import create_custom_fields @frappe.whitelist() def validate_item(doc, method): @@ -128,3 +137,85 @@ def get_existing_uoms(uoms): for uom in uoms: uoms_list.append(uom.uom) return uoms_list + +def create_qr(doc, method=None): + # Creating a fied for QR code if it doesn't exist + if not hasattr(doc, "item_qr"): + create_custom_fields( + { + doc.doctype: [ + dict( + fieldname="item_qr", + label="Item QR", + fieldtype="Attach Image", + read_only=1, + no_copy=1, + # hidden=1, + ) + ] + } + ) + + # Checking if a qr code is already generated + qr_code = doc.get("item_qr") + if qr_code and frappe.db.exists({"doctype": "File", "file_url": qr_code}): + return + + + doc_url = get_si_json(doc) + + # Generating QR image + qr_image = io.BytesIO() + url = create(doc_url, error="L") + url.png(qr_image, scale = 2, quiet_zone=1) + + name = frappe.generate_hash(doc.name, 5) + + # Uploading the QR and attaching it to the document + filename = f"QRCode-{name}.png".replace(os.path.sep, "__") + _file = frappe.get_doc( + { + "doctype": "File", + "file_name": filename, + "is_private": 0, + "content": qr_image.getvalue(), + "attached_to_doctype": doc.get("doctype"), + "attached_to_name": doc.get("name"), + "attached_to_field": "item_qr", + } + ) + + _file.save() + + # assigning to document + doc.db_set("item_qr", _file.file_url) + doc.notify_update() + +def get_si_json(doc): + # Define the list of essential fields + essential_fields = [ + "item_code", + "item_name", + "item_group", + "custom_company", + "custom_item_class", + "custom_parent_item_group", + ] + + # Create a dictionary to store the field values + item_data = {} + + # Extract the field values from the document object + for field in essential_fields: + value = doc.get(field) + + # Convert datetime.date objects to string representation + if isinstance(value, date): + value = value.strftime("%Y-%m-%d") + + item_data[field] = value + + # Convert the dictionary to JSON + json_data = json.dumps(item_data, indent=4) + + return json_data diff --git a/aumms/aumms/doctype/item_category/__init__.py b/aumms/aumms/doctype/item_category/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/aumms/aumms/doctype/item_category/item_category.js b/aumms/aumms/doctype/item_category/item_category.js new file mode 100644 index 00000000..81d195a7 --- /dev/null +++ b/aumms/aumms/doctype/item_category/item_category.js @@ -0,0 +1,8 @@ +// Copyright (c) 2024, efeone and contributors +// For license information, please see license.txt + +// frappe.ui.form.on("Item Category", { +// refresh(frm) { + +// }, +// }); diff --git a/aumms/aumms/doctype/item_category/item_category.json b/aumms/aumms/doctype/item_category/item_category.json new file mode 100644 index 00000000..52fbcd7d --- /dev/null +++ b/aumms/aumms/doctype/item_category/item_category.json @@ -0,0 +1,44 @@ +{ + "actions": [], + "allow_rename": 1, + "autoname": "field:item_category", + "creation": "2024-02-16 11:29:28.576791", + "doctype": "DocType", + "engine": "InnoDB", + "field_order": [ + "item_category" + ], + "fields": [ + { + "fieldname": "item_category", + "fieldtype": "Data", + "label": "Item Category", + "unique": 1 + } + ], + "index_web_pages_for_search": 1, + "links": [], + "modified": "2024-02-16 11:32:26.573014", + "modified_by": "Administrator", + "module": "AuMMS", + "name": "Item Category", + "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": "modified", + "sort_order": "DESC", + "states": [] +} \ No newline at end of file diff --git a/aumms/aumms/doctype/item_category/item_category.py b/aumms/aumms/doctype/item_category/item_category.py new file mode 100644 index 00000000..936097b7 --- /dev/null +++ b/aumms/aumms/doctype/item_category/item_category.py @@ -0,0 +1,9 @@ +# Copyright (c) 2024, efeone and contributors +# For license information, please see license.txt + +# import frappe +from frappe.model.document import Document + + +class ItemCategory(Document): + pass diff --git a/aumms/aumms/doctype/item_category/test_item_category.py b/aumms/aumms/doctype/item_category/test_item_category.py new file mode 100644 index 00000000..74f21ade --- /dev/null +++ b/aumms/aumms/doctype/item_category/test_item_category.py @@ -0,0 +1,9 @@ +# Copyright (c) 2024, efeone and Contributors +# See license.txt + +# import frappe +from frappe.tests.utils import FrappeTestCase + + +class TestItemCategory(FrappeTestCase): + pass diff --git a/aumms/aumms/doctype/purchase_item_details/purchase_item_details.json b/aumms/aumms/doctype/purchase_item_details/purchase_item_details.json index a94be6c8..fa755554 100644 --- a/aumms/aumms/doctype/purchase_item_details/purchase_item_details.json +++ b/aumms/aumms/doctype/purchase_item_details/purchase_item_details.json @@ -37,7 +37,8 @@ "fieldname": "net_weight", "fieldtype": "Float", "in_list_view": 1, - "label": "Net Weight" + "label": "Net Weight", + "read_only": 1 }, { "fieldname": "amount", @@ -62,6 +63,7 @@ "label": "Stone Weight" }, { + "depends_on": "eval:doc.stone", "fieldname": "stone_charge", "fieldtype": "Currency", "in_list_view": 1, @@ -71,7 +73,7 @@ "index_web_pages_for_search": 1, "istable": 1, "links": [], - "modified": "2024-02-14 12:45:03.190279", + "modified": "2024-02-16 12:40:10.378507", "modified_by": "Administrator", "module": "AuMMS", "name": "Purchase Item Details", @@ -80,4 +82,4 @@ "sort_field": "modified", "sort_order": "DESC", "states": [] -} \ No newline at end of file +} diff --git a/aumms/aumms/doctype/purchase_tool/purchase_tool.js b/aumms/aumms/doctype/purchase_tool/purchase_tool.js index 8992ebef..a04b3e3c 100644 --- a/aumms/aumms/doctype/purchase_tool/purchase_tool.js +++ b/aumms/aumms/doctype/purchase_tool/purchase_tool.js @@ -2,25 +2,29 @@ // For license information, please see license.txt frappe.ui.form.on("Purchase Tool", { - refresh : function(frm){ - if(frm.doc.has_stone == 1){ - frm.fields_dict.item_details.grid.update_docfield_property('stone', 'hidden', 1); - frm.fields_dict.item_details.grid.update_docfield_property('stone_weight', 'hidden', 1); - frm.fields_dict.item_details.grid.update_docfield_property('stone_charge', 'hidden', 1); - } - else{ - frm.fields_dict.item_details.grid.update_docfield_property('stone', 'hidden', 0); - frm.fields_dict.item_details.grid.update_docfield_property('stone_weight', 'hidden', 0); - frm.fields_dict.item_details.grid.update_docfield_property('stone_charge', 'hidden', 0); - } - } + + // refresh : function(frm){} + }); -frappe.ui.form.on("Purchase Item Details",{ - item_details_add : function(frm, cdt, cdn){ - let child = locals[cdt][cdn] - if(frm.doc.stone){ +frappe.ui.form.on("Purchase Item Details", { + item_details_add: function(frm, cdt, cdn) { + let child = locals[cdt][cdn]; + if (frm.doc.stone) { frappe.model.set_value(child.doctype, child.name, 'stone', frm.doc.stone); } - } + }, + stone_weight: function(frm, cdt, cdn) { + let d = locals[cdt][cdn]; + if (frm.doc.has_stone) { + let net_weight = d.gold_weight + d.stone_weight; + frappe.model.set_value(cdt, cdn, 'net_weight', net_weight); + } + }, + gold_weight: function(frm, cdt, cdn) { + let d = locals[cdt][cdn]; + if (!frm.doc.has_stone) { + frappe.model.set_value(cdt, cdn, 'net_weight', d.gold_weight); + } + }, }); diff --git a/aumms/aumms/doctype/purchase_tool/purchase_tool.json b/aumms/aumms/doctype/purchase_tool/purchase_tool.json index 73b66fd9..460277ee 100644 --- a/aumms/aumms/doctype/purchase_tool/purchase_tool.json +++ b/aumms/aumms/doctype/purchase_tool/purchase_tool.json @@ -7,15 +7,15 @@ "engine": "InnoDB", "field_order": [ "section_break_urwi", - "supplier", + "item_category", "item_type", "item_group", - "item_set", + "supplier", "column_break_pnvl", "board_rate", "date", - "stone", "has_stone", + "stone", "section_break_vxux", "item_details", "amended_from" @@ -92,23 +92,24 @@ "label": "Date", "reqd": 1 }, - { - "fieldname": "item_set", - "fieldtype": "Data", - "label": "Item Set" - }, { "fieldname": "board_rate", "fieldtype": "Float", "in_list_view": 1, "label": "Board Rate", "reqd": 1 + }, + { + "fieldname": "item_category", + "fieldtype": "Link", + "label": "Item Category", + "options": "Item Category" } ], "index_web_pages_for_search": 1, "is_submittable": 1, "links": [], - "modified": "2024-02-14 12:52:10.709714", + "modified": "2024-02-16 11:39:30.426147", "modified_by": "Administrator", "module": "AuMMS", "name": "Purchase Tool", @@ -132,4 +133,4 @@ "sort_field": "modified", "sort_order": "DESC", "states": [] -} \ No newline at end of file +} diff --git a/aumms/hooks.py b/aumms/hooks.py index 84fd1b79..acc98ce6 100644 --- a/aumms/hooks.py +++ b/aumms/hooks.py @@ -126,7 +126,10 @@ doc_events = { 'Item': { 'validate': 'aumms.aumms.doc_events.item.validate_item', - 'before_save': 'aumms.aumms.doc_events.item.check_conversion_factor_for_uom', + 'before_save': [ + 'aumms.aumms.doc_events.item.check_conversion_factor_for_uom', + 'aumms.aumms.doc_events.item.create_qr' + ], 'on_update': 'aumms.aumms.doc_events.item.update_uoms_table' }, 'Purchase Receipt': {