diff --git a/vhrs/custom.py b/vhrs/custom.py index 4678b35..3e38167 100644 --- a/vhrs/custom.py +++ b/vhrs/custom.py @@ -8,7 +8,8 @@ from frappe.model.document import Document from frappe.model.naming import make_autoname from frappe.utils.data import today -from frappe.utils import cint, fmt_money +from datetime import date +from frappe.utils import cint, fmt_money, formatdate, getdate, add_months, date_diff, add_days, flt, cstr import requests @@ -39,7 +40,7 @@ def mark_absent(): @frappe.whitelist() def mark_territory(): - projects = frappe.db.sql(""" + projects = frappe.db.sql(""" select name,customer from tabProject where territory is null """, as_dict=1) for project in projects: @@ -476,3 +477,19 @@ def update_status(doc, method): else: frappe.db.set_value( "Customer", customer.name, "status", "Active") + + +@frappe.whitelist() +def send_daily_report(): + custom_filter = {'date': today(), "status": ("order_by" "Late")} + report = frappe.get_doc('Report', "Employee Day Attendance") + columns, data = report.get_data( + limit=500 or 500, filters=custom_filter, as_dict=True) + html = frappe.render_template( + 'frappe/templates/includes/print_table.html', {'columns': columns, 'data': data}) + frappe.sendmail( + recipients=['prabavathi.d@voltechgroup.com'], + subject='Employee Attendance Report - ' + + formatdate(add_days(today(), -1)), + message=html + ) diff --git a/vhrs/hooks.py b/vhrs/hooks.py index b655942..9032738 100644 --- a/vhrs/hooks.py +++ b/vhrs/hooks.py @@ -98,10 +98,11 @@ # ], "daily": [ "vhrs.utils.update_status" + + ], + "hourly": [ + "vhrs.custom.send_daily_report" ], - # "hourly": [ - # "vhrs.tasks.hourly" - # ], # "weekly": [ # "vhrs.tasks.weekly" # ] diff --git a/vhrs/vhrs_custom/custom/customer.json b/vhrs/vhrs_custom/custom/customer.json deleted file mode 100644 index 04cbaf4..0000000 --- a/vhrs/vhrs_custom/custom/customer.json +++ /dev/null @@ -1,1984 +0,0 @@ -{ - "custom_fields": [ - { - "_assign": null, - "_comments": null, - "_liked_by": null, - "_user_tags": null, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "creation": "2018-01-17 14:45:14.213628", - "default": null, - "depends_on": null, - "description": null, - "docstatus": 0, - "dt": "Customer", - "fieldname": "attach_agreement", - "fieldtype": "Attach", - "hidden": 0, - "idx": 28, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_filter_dash": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "insert_after": "agreement_validity", - "label": "Attach Agreement", - "modified": "2018-01-17 14:45:14.213628", - "modified_by": "prabavathi.d@voltechgroup.com", - "name": "Customer-attach_agreement", - "no_copy": 0, - "options": null, - "owner": "prabavathi.d@voltechgroup.com", - "parent": null, - "parentfield": null, - "parenttype": null, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "unique": 0, - "width": null - }, - { - "_assign": null, - "_comments": null, - "_liked_by": null, - "_user_tags": null, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "creation": "2018-01-17 14:22:26.829705", - "default": null, - "depends_on": null, - "description": null, - "docstatus": 0, - "dt": "Customer", - "fieldname": "agreement_validity", - "fieldtype": "Date", - "hidden": 0, - "idx": 28, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_filter_dash": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "insert_after": "expected_value", - "label": "Agreement Validity", - "modified": "2018-01-17 14:22:26.829705", - "modified_by": "prabavathi.d@voltechgroup.com", - "name": "Customer-agreement_validity", - "no_copy": 0, - "options": null, - "owner": "prabavathi.d@voltechgroup.com", - "parent": null, - "parentfield": null, - "parenttype": null, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "unique": 0, - "width": null - }, - { - "_assign": null, - "_comments": null, - "_liked_by": null, - "_user_tags": null, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "creation": "2017-08-08 17:08:56.088270", - "default": null, - "depends_on": null, - "description": null, - "docstatus": 0, - "dt": "Customer", - "fieldname": "remark", - "fieldtype": "Small Text", - "hidden": 0, - "idx": 57, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_filter_dash": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "insert_after": "remarks", - "label": "Remark", - "modified": "2017-08-08 17:08:56.088270", - "modified_by": "Administrator", - "name": "Customer-remark", - "no_copy": 0, - "options": null, - "owner": "Administrator", - "parent": null, - "parentfield": null, - "parenttype": null, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "unique": 0, - "width": "362" - }, - { - "_assign": null, - "_comments": null, - "_liked_by": null, - "_user_tags": null, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "creation": "2017-08-08 17:08:55.720202", - "default": null, - "depends_on": null, - "description": null, - "docstatus": 0, - "dt": "Customer", - "fieldname": "remarks", - "fieldtype": "Section Break", - "hidden": 0, - "idx": 56, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_filter_dash": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "insert_after": "sales_team", - "label": "Remarks", - "modified": "2017-08-08 17:08:55.720202", - "modified_by": "Administrator", - "name": "Customer-remarks", - "no_copy": 0, - "options": null, - "owner": "Administrator", - "parent": null, - "parentfield": null, - "parenttype": null, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "unique": 0, - "width": null - }, - { - "_assign": null, - "_comments": null, - "_liked_by": null, - "_user_tags": null, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "creation": "2017-08-07 17:29:59.364485", - "default": null, - "depends_on": null, - "description": null, - "docstatus": 0, - "dt": "Customer", - "fieldname": "payment_terms", - "fieldtype": "Small Text", - "hidden": 0, - "idx": 31, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_filter_dash": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "insert_after": "column_break_21", - "label": "Payment Terms", - "modified": "2017-08-07 17:29:59.364485", - "modified_by": "Administrator", - "name": "Customer-payment_terms", - "no_copy": 0, - "options": null, - "owner": "Administrator", - "parent": null, - "parentfield": null, - "parenttype": null, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "unique": 0, - "width": null - }, - { - "_assign": null, - "_comments": null, - "_liked_by": null, - "_user_tags": null, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "creation": "2017-08-07 17:29:45.006041", - "default": null, - "depends_on": null, - "description": null, - "docstatus": 0, - "dt": "Customer", - "fieldname": "column_break_21", - "fieldtype": "Column Break", - "hidden": 0, - "idx": 29, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_filter_dash": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "insert_after": "attach_agreement", - "label": "", - "modified": "2017-08-07 17:29:45.006041", - "modified_by": "Administrator", - "name": "Customer-column_break_21", - "no_copy": 0, - "options": null, - "owner": "Administrator", - "parent": null, - "parentfield": null, - "parenttype": null, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "unique": 0, - "width": null - }, - { - "_assign": null, - "_comments": null, - "_liked_by": null, - "_user_tags": null, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "creation": "2017-08-07 17:29:44.726699", - "default": null, - "depends_on": null, - "description": null, - "docstatus": 0, - "dt": "Customer", - "fieldname": "expected_value", - "fieldtype": "Currency", - "hidden": 0, - "idx": 27, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_filter_dash": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "insert_after": "section_break_19", - "label": "Expected Value", - "modified": "2017-08-07 17:29:44.726699", - "modified_by": "Administrator", - "name": "Customer-expected_value", - "no_copy": 0, - "options": null, - "owner": "Administrator", - "parent": null, - "parentfield": null, - "parenttype": null, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "unique": 0, - "width": null - }, - { - "_assign": null, - "_comments": null, - "_liked_by": null, - "_user_tags": null, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "creation": "2017-08-07 17:29:44.328097", - "default": null, - "depends_on": null, - "description": null, - "docstatus": 0, - "dt": "Customer", - "fieldname": "section_break_19", - "fieldtype": "Section Break", - "hidden": 0, - "idx": 26, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_filter_dash": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "insert_after": "customer_next_contact_on", - "label": "", - "modified": "2017-08-07 17:29:44.328097", - "modified_by": "Administrator", - "name": "Customer-section_break_19", - "no_copy": 0, - "options": null, - "owner": "Administrator", - "parent": null, - "parentfield": null, - "parenttype": null, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "unique": 0, - "width": null - }, - { - "_assign": null, - "_comments": null, - "_liked_by": null, - "_user_tags": null, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "creation": "2017-08-02 12:57:58.792818", - "default": null, - "depends_on": null, - "description": null, - "docstatus": 0, - "dt": "Customer", - "fieldname": "customer_owner__cpc", - "fieldtype": "Link", - "hidden": 0, - "idx": 15, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_filter_dash": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "insert_after": "disabled", - "label": "Customer Owner", - "modified": "2017-08-02 12:57:58.792818", - "modified_by": "Administrator", - "name": "Customer-customer_owner__cpc", - "no_copy": 0, - "options": "User", - "owner": "Administrator", - "parent": null, - "parentfield": null, - "parenttype": null, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "unique": 0, - "width": "160" - }, - { - "_assign": null, - "_comments": null, - "_liked_by": null, - "_user_tags": null, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "creation": "2017-08-02 12:53:05.749989", - "default": null, - "depends_on": null, - "description": null, - "docstatus": 0, - "dt": "Customer", - "fieldname": "customer_next_contact_on", - "fieldtype": "Date", - "hidden": 0, - "idx": 25, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_filter_dash": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "insert_after": "contact_date", - "label": "Next Contact Date", - "modified": "2017-08-02 12:53:05.749989", - "modified_by": "Administrator", - "name": "Customer-customer_next_contact_on", - "no_copy": 0, - "options": null, - "owner": "Administrator", - "parent": null, - "parentfield": null, - "parenttype": null, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "unique": 0, - "width": "137" - }, - { - "_assign": null, - "_comments": null, - "_liked_by": null, - "_user_tags": null, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "creation": "2017-08-02 12:53:05.510984", - "default": null, - "depends_on": null, - "description": null, - "docstatus": 0, - "dt": "Customer", - "fieldname": "contact_date", - "fieldtype": "Date", - "hidden": 0, - "idx": 24, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_filter_dash": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "insert_after": "column_break_22", - "label": "Last Contacted Date", - "modified": "2017-08-02 12:53:05.510984", - "modified_by": "Administrator", - "name": "Customer-contact_date", - "no_copy": 0, - "options": null, - "owner": "Administrator", - "parent": null, - "parentfield": null, - "parenttype": null, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "unique": 0, - "width": "150" - }, - { - "_assign": null, - "_comments": null, - "_liked_by": null, - "_user_tags": null, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "creation": "2017-08-02 12:52:05.761519", - "default": null, - "depends_on": null, - "description": null, - "docstatus": 0, - "dt": "Customer", - "fieldname": "column_break_22", - "fieldtype": "Column Break", - "hidden": 0, - "idx": 23, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_filter_dash": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "insert_after": "customer_next_contact_by", - "label": "", - "modified": "2017-08-02 12:52:05.761519", - "modified_by": "Administrator", - "name": "Customer-column_break_22", - "no_copy": 0, - "options": null, - "owner": "Administrator", - "parent": null, - "parentfield": null, - "parenttype": null, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "unique": 0, - "width": null - }, - { - "_assign": null, - "_comments": null, - "_liked_by": null, - "_user_tags": null, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "creation": "2017-08-02 12:48:36.389960", - "default": null, - "depends_on": null, - "description": null, - "docstatus": 0, - "dt": "Customer", - "fieldname": "customer_next_contact_by", - "fieldtype": "Link", - "hidden": 0, - "idx": 22, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_filter_dash": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "insert_after": "contact_by", - "label": "Next Contact by", - "modified": "2017-08-02 12:48:36.389960", - "modified_by": "Administrator", - "name": "Customer-customer_next_contact_by", - "no_copy": 0, - "options": "User", - "owner": "Administrator", - "parent": null, - "parentfield": null, - "parenttype": null, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "unique": 0, - "width": "196" - }, - { - "_assign": null, - "_comments": null, - "_liked_by": null, - "_user_tags": null, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "creation": "2017-08-02 12:48:36.146909", - "default": null, - "depends_on": null, - "description": null, - "docstatus": 0, - "dt": "Customer", - "fieldname": "contact_by", - "fieldtype": "Link", - "hidden": 0, - "idx": 21, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_filter_dash": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "insert_after": "section_break_12", - "label": "Last Contacted By", - "modified": "2017-08-02 12:48:36.146909", - "modified_by": "Administrator", - "name": "Customer-contact_by", - "no_copy": 0, - "options": "User", - "owner": "Administrator", - "parent": null, - "parentfield": null, - "parenttype": null, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "unique": 0, - "width": null - }, - { - "_assign": null, - "_comments": null, - "_liked_by": null, - "_user_tags": null, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "creation": "2017-08-02 12:48:35.904470", - "default": null, - "depends_on": null, - "description": null, - "docstatus": 0, - "dt": "Customer", - "fieldname": "section_break_12", - "fieldtype": "Section Break", - "hidden": 0, - "idx": 20, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_filter_dash": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "insert_after": "appointment_on", - "label": "", - "modified": "2017-08-02 12:48:35.904470", - "modified_by": "Administrator", - "name": "Customer-section_break_12", - "no_copy": 0, - "options": null, - "owner": "Administrator", - "parent": null, - "parentfield": null, - "parenttype": null, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "unique": 0, - "width": null - }, - { - "_assign": null, - "_comments": null, - "_liked_by": null, - "_user_tags": null, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "creation": "2017-08-02 12:48:35.661984", - "default": null, - "depends_on": null, - "description": null, - "docstatus": 0, - "dt": "Customer", - "fieldname": "appointment_on", - "fieldtype": "Date", - "hidden": 0, - "idx": 19, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_filter_dash": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "insert_after": "column_break_15", - "label": "Appointment On", - "modified": "2017-08-02 12:48:35.661984", - "modified_by": "Administrator", - "name": "Customer-appointment_on", - "no_copy": 0, - "options": null, - "owner": "Administrator", - "parent": null, - "parentfield": null, - "parenttype": null, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "unique": 0, - "width": null - }, - { - "_assign": null, - "_comments": null, - "_liked_by": null, - "_user_tags": null, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "creation": "2017-08-02 12:48:35.444010", - "default": null, - "depends_on": null, - "description": null, - "docstatus": 0, - "dt": "Customer", - "fieldname": "column_break_15", - "fieldtype": "Column Break", - "hidden": 0, - "idx": 18, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_filter_dash": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "insert_after": "appointment_to_be_taken_by", - "label": "", - "modified": "2017-08-02 12:48:35.444010", - "modified_by": "Administrator", - "name": "Customer-column_break_15", - "no_copy": 0, - "options": null, - "owner": "Administrator", - "parent": null, - "parentfield": null, - "parenttype": null, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "unique": 0, - "width": null - }, - { - "_assign": null, - "_comments": null, - "_liked_by": null, - "_user_tags": null, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "creation": "2017-08-02 12:48:35.210910", - "default": null, - "depends_on": null, - "description": null, - "docstatus": 0, - "dt": "Customer", - "fieldname": "appointment_to_be_taken_by", - "fieldtype": "Link", - "hidden": 0, - "idx": 17, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_filter_dash": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "insert_after": "appointment_details", - "label": "Appointment to be taken by", - "modified": "2017-08-02 12:48:35.210910", - "modified_by": "Administrator", - "name": "Customer-appointment_to_be_taken_by", - "no_copy": 0, - "options": "User", - "owner": "Administrator", - "parent": null, - "parentfield": null, - "parenttype": null, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "unique": 0, - "width": null - }, - { - "_assign": null, - "_comments": null, - "_liked_by": null, - "_user_tags": null, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "creation": "2017-08-02 12:48:34.731568", - "default": null, - "depends_on": null, - "description": null, - "docstatus": 0, - "dt": "Customer", - "fieldname": "appointment_details", - "fieldtype": "Section Break", - "hidden": 0, - "idx": 16, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_filter_dash": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "insert_after": "customer_owner__cpc", - "label": "appointment details", - "modified": "2017-08-02 12:48:34.731568", - "modified_by": "Administrator", - "name": "Customer-appointment_details", - "no_copy": 0, - "options": null, - "owner": "Administrator", - "parent": null, - "parentfield": null, - "parenttype": null, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "unique": 0, - "width": null - }, - { - "_assign": null, - "_comments": null, - "_liked_by": null, - "_user_tags": null, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "creation": "2017-09-20 12:25:10.140062", - "default": null, - "depends_on": null, - "description": null, - "docstatus": 0, - "dt": "Customer", - "fieldname": "status", - "fieldtype": "Select", - "hidden": 0, - "idx": 11, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_filter_dash": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 1, - "insert_after": "column_break0", - "label": "Status", - "modified": "2017-04-10 16:22:41.474241", - "modified_by": "Administrator", - "name": "Customer-status", - "no_copy": 0, - "options": "Active\nOpen\nDormant", - "owner": "Administrator", - "parent": null, - "parentfield": null, - "parenttype": null, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "unique": 0, - "width": "89" - } - ], - "custom_perms": [ - { - "_assign": null, - "_comments": null, - "_liked_by": null, - "_user_tags": null, - "amend": 0, - "apply_user_permissions": 0, - "cancel": 0, - "create": 1, - "creation": "2013-06-11 14:26:44", - "delete": 1, - "docstatus": 0, - "email": 1, - "export": 0, - "idx": 4, - "if_owner": 0, - "import": 0, - "modified": "2017-04-09 21:08:06.460456", - "modified_by": "Administrator", - "name": "9f39541ebf", - "owner": "Administrator", - "parent": "Customer", - "parentfield": "permissions", - "parenttype": "DocType", - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "Sales Master Manager", - "set_user_permissions": 1, - "share": 1, - "submit": 0, - "user_permission_doctypes": null, - "write": 1 - }, - { - "_assign": null, - "_comments": null, - "_liked_by": null, - "_user_tags": null, - "amend": 0, - "apply_user_permissions": 0, - "cancel": 0, - "create": 0, - "creation": "2013-06-11 14:26:44", - "delete": 0, - "docstatus": 0, - "email": 1, - "export": 0, - "idx": 7, - "if_owner": 0, - "import": 0, - "modified": "2017-04-09 21:08:06.464704", - "modified_by": "Administrator", - "name": "3feca60729", - "owner": "Administrator", - "parent": "Customer", - "parentfield": "permissions", - "parenttype": "DocType", - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "Stock Manager", - "set_user_permissions": 0, - "share": 0, - "submit": 0, - "user_permission_doctypes": null, - "write": 0 - }, - { - "_assign": null, - "_comments": null, - "_liked_by": null, - "_user_tags": null, - "amend": 0, - "apply_user_permissions": 1, - "cancel": 0, - "create": 1, - "creation": "2013-06-11 14:26:44", - "delete": 1, - "docstatus": 0, - "email": 1, - "export": 1, - "idx": 1, - "if_owner": 0, - "import": 1, - "modified": "2017-04-09 21:08:06.468882", - "modified_by": "Administrator", - "name": "7e02e64175", - "owner": "Administrator", - "parent": "Customer", - "parentfield": "permissions", - "parenttype": "DocType", - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "Sales User", - "set_user_permissions": 0, - "share": 1, - "submit": 0, - "user_permission_doctypes": "[\"Territory\"]", - "write": 1 - }, - { - "_assign": null, - "_comments": null, - "_liked_by": null, - "_user_tags": null, - "amend": 0, - "apply_user_permissions": 0, - "cancel": 0, - "create": 0, - "creation": "2016-07-13 10:42:33.603159", - "delete": 1, - "docstatus": 0, - "email": 1, - "export": 1, - "idx": 1, - "if_owner": 0, - "import": 0, - "modified": "2017-04-09 21:08:06.472911", - "modified_by": "Administrator", - "name": "0b1b22b901", - "owner": "Administrator", - "parent": "Customer", - "parentfield": "permissions", - "parenttype": "DocType", - "permlevel": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "Projects User", - "set_user_permissions": 0, - "share": 1, - "submit": 0, - "user_permission_doctypes": null, - "write": 1 - }, - { - "_assign": null, - "_comments": null, - "_liked_by": null, - "_user_tags": null, - "amend": 0, - "apply_user_permissions": 0, - "cancel": 0, - "create": 0, - "creation": "2013-06-11 14:26:44", - "delete": 0, - "docstatus": 0, - "email": 0, - "export": 0, - "idx": 5, - "if_owner": 0, - "import": 0, - "modified": "2017-04-09 21:08:06.476999", - "modified_by": "Administrator", - "name": "46aebcc6a5", - "owner": "Administrator", - "parent": "Customer", - "parentfield": "permissions", - "parenttype": "DocType", - "permlevel": 1, - "print": 0, - "read": 1, - "report": 0, - "role": "Sales Master Manager", - "set_user_permissions": 0, - "share": 0, - "submit": 0, - "user_permission_doctypes": null, - "write": 1 - }, - { - "_assign": null, - "_comments": null, - "_liked_by": null, - "_user_tags": null, - "amend": 0, - "apply_user_permissions": 0, - "cancel": 0, - "create": 0, - "creation": "2013-06-11 14:26:44", - "delete": 0, - "docstatus": 0, - "email": 1, - "export": 0, - "idx": 6, - "if_owner": 0, - "import": 0, - "modified": "2017-04-09 21:08:06.484759", - "modified_by": "Administrator", - "name": "3c59eae021", - "owner": "Administrator", - "parent": "Customer", - "parentfield": "permissions", - "parenttype": "DocType", - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "Stock User", - "set_user_permissions": 0, - "share": 0, - "submit": 0, - "user_permission_doctypes": null, - "write": 0 - }, - { - "_assign": null, - "_comments": null, - "_liked_by": null, - "_user_tags": null, - "amend": 0, - "apply_user_permissions": 0, - "cancel": 0, - "create": 0, - "creation": "2016-07-11 10:44:32.181042", - "delete": 1, - "docstatus": 0, - "email": 1, - "export": 1, - "idx": 1, - "if_owner": 0, - "import": 0, - "modified": "2017-04-09 21:08:06.488988", - "modified_by": "Administrator", - "name": "da1af34378", - "owner": "Administrator", - "parent": "Customer", - "parentfield": "permissions", - "parenttype": "DocType", - "permlevel": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "Projects Manager", - "set_user_permissions": 0, - "share": 1, - "submit": 0, - "user_permission_doctypes": null, - "write": 1 - }, - { - "_assign": null, - "_comments": null, - "_liked_by": null, - "_user_tags": null, - "amend": 0, - "apply_user_permissions": 0, - "cancel": 0, - "create": 0, - "creation": "2013-06-11 14:26:44", - "delete": 0, - "docstatus": 0, - "email": 0, - "export": 0, - "idx": 2, - "if_owner": 0, - "import": 0, - "modified": "2017-04-09 21:08:06.492839", - "modified_by": "Administrator", - "name": "d7a46415b9", - "owner": "Administrator", - "parent": "Customer", - "parentfield": "permissions", - "parenttype": "DocType", - "permlevel": 1, - "print": 0, - "read": 1, - "report": 0, - "role": "Sales User", - "set_user_permissions": 0, - "share": 0, - "submit": 0, - "user_permission_doctypes": null, - "write": 0 - }, - { - "_assign": null, - "_comments": null, - "_liked_by": null, - "_user_tags": null, - "amend": 0, - "apply_user_permissions": 0, - "cancel": 0, - "create": 1, - "creation": "2016-12-20 14:36:03.763319", - "delete": 1, - "docstatus": 0, - "email": 1, - "export": 1, - "idx": 1, - "if_owner": 0, - "import": 0, - "modified": "2017-04-09 21:08:06.496749", - "modified_by": "Administrator", - "name": "8efe27a2fb", - "owner": "Administrator", - "parent": "Customer", - "parentfield": "permissions", - "parenttype": "DocType", - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "Project Leader", - "set_user_permissions": 0, - "share": 1, - "submit": 0, - "user_permission_doctypes": null, - "write": 1 - }, - { - "_assign": null, - "_comments": null, - "_liked_by": null, - "_user_tags": null, - "amend": 0, - "apply_user_permissions": 0, - "cancel": 0, - "create": 0, - "creation": "2016-06-15 12:07:07.120562", - "delete": 0, - "docstatus": 0, - "email": 1, - "export": 1, - "idx": 1, - "if_owner": 0, - "import": 0, - "modified": "2017-04-09 21:08:06.500690", - "modified_by": "Administrator", - "name": "cb4286a200", - "owner": "Administrator", - "parent": "Customer", - "parentfield": "permissions", - "parenttype": "DocType", - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "Projects Master Manager", - "set_user_permissions": 0, - "share": 1, - "submit": 0, - "user_permission_doctypes": null, - "write": 1 - }, - { - "_assign": null, - "_comments": null, - "_liked_by": null, - "_user_tags": null, - "amend": 0, - "apply_user_permissions": 0, - "cancel": 0, - "create": 0, - "creation": "2016-06-15 14:52:34.197820", - "delete": 0, - "docstatus": 0, - "email": 1, - "export": 1, - "idx": 1, - "if_owner": 0, - "import": 0, - "modified": "2017-04-09 21:08:06.504577", - "modified_by": "Administrator", - "name": "c08ed65ff6", - "owner": "Administrator", - "parent": "Customer", - "parentfield": "permissions", - "parenttype": "DocType", - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "Projects Manager", - "set_user_permissions": 0, - "share": 1, - "submit": 0, - "user_permission_doctypes": null, - "write": 1 - }, - { - "_assign": null, - "_comments": null, - "_liked_by": null, - "_user_tags": null, - "amend": 0, - "apply_user_permissions": 0, - "cancel": 0, - "create": 1, - "creation": "2013-06-11 14:26:44", - "delete": 0, - "docstatus": 0, - "email": 1, - "export": 0, - "idx": 9, - "if_owner": 0, - "import": 0, - "modified": "2017-04-09 21:08:06.508469", - "modified_by": "Administrator", - "name": "5724a6e4d1", - "owner": "Administrator", - "parent": "Customer", - "parentfield": "permissions", - "parenttype": "DocType", - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "Accounts Manager", - "set_user_permissions": 0, - "share": 0, - "submit": 0, - "user_permission_doctypes": null, - "write": 1 - }, - { - "_assign": null, - "_comments": null, - "_liked_by": null, - "_user_tags": null, - "amend": 0, - "apply_user_permissions": 0, - "cancel": 0, - "create": 0, - "creation": "2013-06-11 14:26:44", - "delete": 0, - "docstatus": 0, - "email": 1, - "export": 0, - "idx": 8, - "if_owner": 0, - "import": 0, - "modified": "2017-04-09 21:08:06.512552", - "modified_by": "Administrator", - "name": "190025c7fe", - "owner": "Administrator", - "parent": "Customer", - "parentfield": "permissions", - "parenttype": "DocType", - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "Accounts User", - "set_user_permissions": 0, - "share": 0, - "submit": 0, - "user_permission_doctypes": null, - "write": 0 - }, - { - "_assign": null, - "_comments": null, - "_liked_by": null, - "_user_tags": null, - "amend": 0, - "apply_user_permissions": 1, - "cancel": 0, - "create": 1, - "creation": "2013-06-11 14:26:44", - "delete": 1, - "docstatus": 0, - "email": 1, - "export": 1, - "idx": 3, - "if_owner": 0, - "import": 0, - "modified": "2017-04-09 21:08:06.516617", - "modified_by": "Administrator", - "name": "b7b127a29a", - "owner": "Administrator", - "parent": "Customer", - "parentfield": "permissions", - "parenttype": "DocType", - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "Sales Manager", - "set_user_permissions": 0, - "share": 0, - "submit": 0, - "user_permission_doctypes": "[\"Territory\"]", - "write": 1 - }, - { - "_assign": null, - "_comments": null, - "_liked_by": null, - "_user_tags": null, - "amend": 0, - "apply_user_permissions": 0, - "cancel": 0, - "create": 0, - "creation": "2017-08-16 12:27:45.304334", - "delete": 0, - "docstatus": 0, - "email": 1, - "export": 1, - "idx": 0, - "if_owner": 0, - "import": 0, - "modified": "2017-08-16 12:27:45.304334", - "modified_by": "Administrator", - "name": "1cc570fcac", - "owner": "Administrator", - "parent": "Customer", - "parentfield": "permissions", - "parenttype": "DocType", - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "Employee", - "set_user_permissions": 0, - "share": 1, - "submit": 0, - "user_permission_doctypes": "[\"Territory\"]", - "write": 0 - }, - { - "_assign": null, - "_comments": null, - "_liked_by": null, - "_user_tags": null, - "amend": 0, - "apply_user_permissions": 1, - "cancel": 0, - "create": 0, - "creation": "2017-11-11 15:32:09.303190", - "delete": 0, - "docstatus": 0, - "email": 1, - "export": 1, - "idx": 0, - "if_owner": 0, - "import": 0, - "modified": "2017-11-11 15:32:09.303190", - "modified_by": "Administrator", - "name": "97714342b4", - "owner": "Administrator", - "parent": "Customer", - "parentfield": "permissions", - "parenttype": "DocType", - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "Closure User", - "set_user_permissions": 0, - "share": 1, - "submit": 0, - "user_permission_doctypes": "[\"Customer\"]", - "write": 0 - } - ], - "doctype": "Customer", - "property_setters": [ - { - "_assign": null, - "_comments": null, - "_liked_by": null, - "_user_tags": null, - "creation": "2018-01-17 14:45:14.142872", - "default_value": null, - "doc_type": "Customer", - "docstatus": 0, - "doctype_or_field": "DocType", - "field_name": null, - "idx": 0, - "modified": "2018-01-17 14:45:14.142872", - "modified_by": "prabavathi.d@voltechgroup.com", - "name": "Customer-read_only_onload", - "owner": "prabavathi.d@voltechgroup.com", - "parent": null, - "parentfield": null, - "parenttype": null, - "property": "read_only_onload", - "property_type": "Check", - "value": null - }, - { - "_assign": null, - "_comments": null, - "_liked_by": null, - "_user_tags": null, - "creation": "2018-01-06 17:52:48.145240", - "default_value": null, - "doc_type": "Customer", - "docstatus": 0, - "doctype_or_field": "DocField", - "field_name": "contact_date", - "idx": 0, - "modified": "2018-01-06 17:52:48.145240", - "modified_by": "Administrator", - "name": "Customer-contact_date-width", - "owner": "Administrator", - "parent": null, - "parentfield": null, - "parenttype": null, - "property": "width", - "property_type": null, - "value": "150" - }, - { - "_assign": null, - "_comments": null, - "_liked_by": null, - "_user_tags": null, - "creation": "2017-12-13 11:10:06.357667", - "default_value": null, - "doc_type": "Customer", - "docstatus": 0, - "doctype_or_field": "DocField", - "field_name": "customer_name", - "idx": 0, - "modified": "2017-12-13 11:10:06.357667", - "modified_by": "dhavachelvan.d@voltechgroup.com", - "name": "Customer-customer_name-width", - "owner": "dhavachelvan.d@voltechgroup.com", - "parent": null, - "parentfield": null, - "parenttype": null, - "property": "width", - "property_type": null, - "value": "250" - }, - { - "_assign": null, - "_comments": null, - "_liked_by": null, - "_user_tags": null, - "creation": "2017-12-13 10:33:11.058699", - "default_value": null, - "doc_type": "Customer", - "docstatus": 0, - "doctype_or_field": "DocField", - "field_name": "status", - "idx": 0, - "modified": "2017-12-13 10:33:11.058699", - "modified_by": "dhavachelvan.d@voltechgroup.com", - "name": "Customer-status-width", - "owner": "dhavachelvan.d@voltechgroup.com", - "parent": null, - "parentfield": null, - "parenttype": null, - "property": "width", - "property_type": null, - "value": "89" - }, - { - "_assign": null, - "_comments": null, - "_liked_by": null, - "_user_tags": null, - "creation": "2017-12-13 10:31:38.051185", - "default_value": null, - "doc_type": "Customer", - "docstatus": 0, - "doctype_or_field": "DocField", - "field_name": "customer_next_contact_by", - "idx": 0, - "modified": "2017-12-13 10:31:38.051185", - "modified_by": "dhavachelvan.d@voltechgroup.com", - "name": "Customer-customer_next_contact_by-width", - "owner": "dhavachelvan.d@voltechgroup.com", - "parent": null, - "parentfield": null, - "parenttype": null, - "property": "width", - "property_type": null, - "value": "196" - }, - { - "_assign": null, - "_comments": null, - "_liked_by": null, - "_user_tags": null, - "creation": "2017-10-05 16:47:01.749594", - "default_value": null, - "doc_type": "Customer", - "docstatus": 0, - "doctype_or_field": "DocField", - "field_name": "customer_owner__cpc", - "idx": 0, - "modified": "2017-10-05 16:47:01.749594", - "modified_by": "vinoth.r@voltechgroup.com", - "name": "Customer-customer_owner__cpc-width", - "owner": "vinoth.r@voltechgroup.com", - "parent": null, - "parentfield": null, - "parenttype": null, - "property": "width", - "property_type": null, - "value": "160" - }, - { - "_assign": null, - "_comments": null, - "_liked_by": null, - "_user_tags": null, - "creation": "2017-08-08 17:09:35.514526", - "default_value": null, - "doc_type": "Customer", - "docstatus": 0, - "doctype_or_field": "DocField", - "field_name": "customer_pos_id", - "idx": 0, - "modified": "2017-08-08 17:09:35.514526", - "modified_by": "Administrator", - "name": "Customer-customer_pos_id-hidden", - "owner": "Administrator", - "parent": null, - "parentfield": null, - "parenttype": null, - "property": "hidden", - "property_type": "Check", - "value": "1" - }, - { - "_assign": null, - "_comments": null, - "_liked_by": null, - "_user_tags": null, - "creation": "2017-06-12 19:07:18.549742", - "default_value": null, - "doc_type": "Customer", - "docstatus": 0, - "doctype_or_field": "DocField", - "field_name": "remark", - "idx": 0, - "modified": "2017-06-12 19:07:18.549742", - "modified_by": "yugapradhan.s@voltechgroup.com", - "name": "Customer-remark-width", - "owner": "yugapradhan.s@voltechgroup.com", - "parent": null, - "parentfield": null, - "parenttype": null, - "property": "width", - "property_type": null, - "value": "362" - }, - { - "_assign": null, - "_comments": null, - "_liked_by": null, - "_user_tags": null, - "creation": "2017-04-09 17:48:57.807216", - "default_value": null, - "doc_type": "Customer", - "docstatus": 0, - "doctype_or_field": "DocType", - "field_name": null, - "idx": 0, - "modified": "2017-04-09 17:48:57.807216", - "modified_by": "Administrator", - "name": "Customer-sort_field", - "owner": "Administrator", - "parent": null, - "parentfield": null, - "parenttype": null, - "property": "sort_field", - "property_type": "Data", - "value": "modified" - }, - { - "_assign": null, - "_comments": null, - "_liked_by": null, - "_user_tags": null, - "creation": "2016-10-17 14:21:44.903082", - "default_value": null, - "doc_type": "Customer", - "docstatus": 0, - "doctype_or_field": "DocField", - "field_name": "customer_details", - "idx": 0, - "modified": "2016-10-17 14:21:44.903082", - "modified_by": "rakesh.ps@voltechgroup.com", - "name": "Customer-customer_details-width", - "owner": "rakesh.ps@voltechgroup.com", - "parent": null, - "parentfield": null, - "parenttype": null, - "property": "width", - "property_type": null, - "value": "163" - }, - { - "_assign": null, - "_comments": null, - "_liked_by": null, - "_user_tags": null, - "creation": "2016-09-26 18:00:40.279433", - "default_value": null, - "doc_type": "Customer", - "docstatus": 0, - "doctype_or_field": "DocField", - "field_name": "lead_name", - "idx": 0, - "modified": "2016-09-26 18:00:40.279433", - "modified_by": "rakesh.ps@voltechgroup.com", - "name": "Customer-lead_name-width", - "owner": "rakesh.ps@voltechgroup.com", - "parent": null, - "parentfield": null, - "parenttype": null, - "property": "width", - "property_type": null, - "value": "102" - }, - { - "_assign": null, - "_comments": null, - "_liked_by": null, - "_user_tags": null, - "creation": "2016-09-26 18:00:36.369058", - "default_value": null, - "doc_type": "Customer", - "docstatus": 0, - "doctype_or_field": "DocField", - "field_name": "customer_next_contact_on", - "idx": 0, - "modified": "2016-09-26 18:00:36.369058", - "modified_by": "rakesh.ps@voltechgroup.com", - "name": "Customer-customer_next_contact_on-width", - "owner": "rakesh.ps@voltechgroup.com", - "parent": null, - "parentfield": null, - "parenttype": null, - "property": "width", - "property_type": null, - "value": "137" - }, - { - "_assign": null, - "_comments": null, - "_liked_by": null, - "_user_tags": null, - "creation": "2016-09-22 16:52:33.173912", - "default_value": null, - "doc_type": "Customer", - "docstatus": 0, - "doctype_or_field": "DocField", - "field_name": "territory", - "idx": 0, - "modified": "2016-09-22 16:52:33.173912", - "modified_by": "anitha.t@voltechgroup.com", - "name": "Customer-territory-width", - "owner": "anitha.t@voltechgroup.com", - "parent": null, - "parentfield": null, - "parenttype": null, - "property": "width", - "property_type": null, - "value": "76" - }, - { - "_assign": null, - "_comments": null, - "_liked_by": null, - "_user_tags": null, - "creation": "2016-08-20 09:50:17.578515", - "default_value": null, - "doc_type": "Customer", - "docstatus": 0, - "doctype_or_field": "DocField", - "field_name": "customer_group", - "idx": 0, - "modified": "2016-08-20 09:50:17.578515", - "modified_by": "rakesh.ps@voltechgroup.com", - "name": "Customer-customer_group-width", - "owner": "rakesh.ps@voltechgroup.com", - "parent": null, - "parentfield": null, - "parenttype": null, - "property": "width", - "property_type": null, - "value": "112" - }, - { - "_assign": null, - "_comments": null, - "_liked_by": null, - "_user_tags": null, - "creation": "2016-06-11 18:18:39.278656", - "default_value": null, - "doc_type": "Customer", - "docstatus": 0, - "doctype_or_field": "DocField", - "field_name": "naming_series", - "idx": 0, - "modified": "2016-06-11 18:18:39.278656", - "modified_by": "Administrator", - "name": "Customer-naming_series-options", - "owner": "Administrator", - "parent": null, - "parentfield": null, - "parenttype": null, - "property": "options", - "property_type": "Text", - "value": "CUST-" - }, - { - "_assign": null, - "_comments": null, - "_liked_by": null, - "_user_tags": null, - "creation": "2016-05-23 11:42:48.812395", - "default_value": null, - "doc_type": "Customer", - "docstatus": 0, - "doctype_or_field": "DocField", - "field_name": "naming_series", - "idx": 0, - "modified": "2016-05-23 11:42:48.812395", - "modified_by": "Administrator", - "name": "Customer-naming_series-hidden", - "owner": "Administrator", - "parent": null, - "parentfield": null, - "parenttype": null, - "property": "hidden", - "property_type": "Check", - "value": "1" - }, - { - "_assign": null, - "_comments": null, - "_liked_by": null, - "_user_tags": null, - "creation": "2016-05-23 11:42:48.788854", - "default_value": null, - "doc_type": "Customer", - "docstatus": 0, - "doctype_or_field": "DocField", - "field_name": "naming_series", - "idx": 0, - "modified": "2016-05-23 11:42:48.788854", - "modified_by": "Administrator", - "name": "Customer-naming_series-reqd", - "owner": "Administrator", - "parent": null, - "parentfield": null, - "parenttype": null, - "property": "reqd", - "property_type": "Check", - "value": "0" - }, - { - "_assign": null, - "_comments": null, - "_liked_by": null, - "_user_tags": null, - "creation": "2017-06-13 17:59:07.793119", - "default_value": null, - "doc_type": "Sales Team", - "docstatus": 0, - "doctype_or_field": "DocField", - "field_name": "contact_no", - "idx": 0, - "modified": "2017-06-13 17:59:07.793119", - "modified_by": "yugapradhan.s@voltechgroup.com", - "name": "Sales Team-contact_no-width", - "owner": "yugapradhan.s@voltechgroup.com", - "parent": null, - "parentfield": null, - "parenttype": null, - "property": "width", - "property_type": null, - "value": "153" - } - ], - "sync_on_migrate": 1 -} \ No newline at end of file diff --git a/vhrs/vhrs_custom/custom/erpnext_modifications.json b/vhrs/vhrs_custom/custom/erpnext_modifications.json deleted file mode 100644 index 0479a8b..0000000 --- a/vhrs/vhrs_custom/custom/erpnext_modifications.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "custom_fields": [], - "custom_perms": [], - "doctype": "ERPNext Modifications", - "property_setters": [ - { - "_assign": null, - "_comments": null, - "_liked_by": null, - "_user_tags": null, - "creation": "2017-04-09 17:50:04.261674", - "default_value": null, - "doc_type": "ERPNext Modifications", - "docstatus": 0, - "doctype_or_field": "DocType", - "field_name": null, - "idx": 0, - "modified": "2017-04-09 17:50:04.261674", - "modified_by": "Administrator", - "name": "ERPNext Modifications-read_only_onload", - "owner": "Administrator", - "parent": null, - "parentfield": null, - "parenttype": null, - "property": "read_only_onload", - "property_type": "Check", - "value": null - }, - { - "_assign": null, - "_comments": null, - "_liked_by": null, - "_user_tags": null, - "creation": "2016-06-22 16:56:27.637584", - "default_value": null, - "doc_type": "ERPNext Modifications", - "docstatus": 0, - "doctype_or_field": "DocField", - "field_name": "description", - "idx": 0, - "modified": "2016-06-22 16:56:27.637584", - "modified_by": "dineshbabu.k@voltechgroup.com", - "name": "ERPNext Modifications-description-width", - "owner": "dineshbabu.k@voltechgroup.com", - "parent": null, - "parentfield": null, - "parenttype": null, - "property": "width", - "property_type": null, - "value": "438" - }, - { - "_assign": null, - "_comments": null, - "_liked_by": null, - "_user_tags": null, - "creation": "2016-05-26 18:39:28.918852", - "default_value": null, - "doc_type": "ERPNext Modifications", - "docstatus": 0, - "doctype_or_field": "DocField", - "field_name": "naming_series", - "idx": 0, - "modified": "2016-05-26 18:39:28.918852", - "modified_by": "Administrator", - "name": "ERPNext Modifications-naming_series-options", - "owner": "Administrator", - "parent": null, - "parentfield": null, - "parenttype": null, - "property": "options", - "property_type": "Text", - "value": "ERPC" - }, - { - "_assign": null, - "_comments": null, - "_liked_by": null, - "_user_tags": null, - "creation": "2016-05-26 18:39:28.902668", - "default_value": null, - "doc_type": "ERPNext Modifications", - "docstatus": 0, - "doctype_or_field": "DocField", - "field_name": "naming_series", - "idx": 0, - "modified": "2016-05-26 18:39:28.902668", - "modified_by": "Administrator", - "name": "ERPNext Modifications-naming_series-default", - "owner": "Administrator", - "parent": null, - "parentfield": null, - "parenttype": null, - "property": "default", - "property_type": "Text", - "value": "ERPC" - } - ], - "sync_on_migrate": 1 -} \ No newline at end of file diff --git a/vhrs/vhrs_custom/doctype/visiting_card_form/visiting_card_form.json b/vhrs/vhrs_custom/doctype/visiting_card_form/visiting_card_form.json index a5112dd..1ef02e2 100644 --- a/vhrs/vhrs_custom/doctype/visiting_card_form/visiting_card_form.json +++ b/vhrs/vhrs_custom/doctype/visiting_card_form/visiting_card_form.json @@ -262,7 +262,7 @@ "collapsible": 0, "columns": 0, "fieldname": "photo", - "fieldtype": "Attach Image", + "fieldtype": "Attach", "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, @@ -284,6 +284,36 @@ "search_index": 0, "set_only_once": 0, "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "amended_from", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Amended From", + "length": 0, + "no_copy": 1, + "options": "Visiting Card Form", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 } ], "has_web_view": 0, @@ -292,11 +322,11 @@ "idx": 0, "image_view": 0, "in_create": 0, - "is_submittable": 0, + "is_submittable": 1, "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2018-01-08 18:08:43.611185", + "modified": "2018-03-30 15:29:40.626107", "modified_by": "Administrator", "module": "VHRS Custom", "name": "Visiting Card Form", @@ -320,7 +350,7 @@ "role": "System Manager", "set_user_permissions": 0, "share": 1, - "submit": 0, + "submit": 1, "write": 1 } ], diff --git a/vhrs/vhrs_custom/report/employee_day_attendance/employee_day_attendance.js b/vhrs/vhrs_custom/report/employee_day_attendance/employee_day_attendance.js index d4cdee1..93e4de2 100644 --- a/vhrs/vhrs_custom/report/employee_day_attendance/employee_day_attendance.js +++ b/vhrs/vhrs_custom/report/employee_day_attendance/employee_day_attendance.js @@ -10,9 +10,21 @@ frappe.query_reports["Employee Day Attendance"] = { "fieldtype": "Date", "default": frappe.datetime.get_today(), "reqd": 1 - } - - ], + }, + { + "fieldname": "employee", + "label": __("Employee"), + "fieldtype": "Link", + "options": "Employee" + }, + { + "fieldname": "hrsic", + "label": __("HRSIC"), + "fieldtype": "Link", + "options": "HRSIC" + }, + +], "formatter": function (row, cell, value, columnDef, dataContext, default_formatter) { value = default_formatter(row, cell, value, columnDef, dataContext); if (dataContext["Remarks"] === "Late") { diff --git a/vhrs/vhrs_custom/report/employee_day_attendance/employee_day_attendance.py b/vhrs/vhrs_custom/report/employee_day_attendance/employee_day_attendance.py index 98841f9..0bb6b0d 100644 --- a/vhrs/vhrs_custom/report/employee_day_attendance/employee_day_attendance.py +++ b/vhrs/vhrs_custom/report/employee_day_attendance/employee_day_attendance.py @@ -9,7 +9,6 @@ from datetime import datetime - def execute(filters=None): if not filters: filters = {} @@ -20,24 +19,24 @@ def execute(filters=None): columns = get_columns(filters) date = filters.get("date") if date and getdate(date) > getdate(nowdate()): - frappe.throw(_("Date cannot be in the Future")) + frappe.throw(_("Date cannot be in the Future")) data = [] row = [] for emp in get_employees(): row = [emp.name, emp.employee_name, emp.hrsic] att_details = frappe.db.get_value("Attendance", {'attendance_date': date, 'employee': emp.name}, [ - 'name', 'attendance_date','status', 'in_time', 'out_time'], as_dict=True) - + 'name', 'attendance_date', 'status', 'in_time', 'out_time'], as_dict=True) + holiday = frappe.get_list("Holiday List", filters={ 'holiday_date': date}) - - is_leave = check_leave_record(emp.name,date) - + + is_leave = check_leave_record(emp.name, date) + if holiday: - row += ["", "", "", "Holiday", ""] + row += ["", "", "Holiday", ""] elif is_leave: - row += [att_details.attendance_date, "", "", "On Leave", ""] - else: + row += [att_details.attendance_date, "", "On Leave", ""] + else: if att_details: if att_details.attendance_date: row += [att_details.attendance_date] @@ -45,29 +44,27 @@ def execute(filters=None): row += ["Attendance Date"] if att_details.in_time: - row += [att_details.in_time] - else: row += ["00:00:00"] - if att_details.status: + if att_details.status: row += [att_details.status] else: row += [""] if att_details.in_time: in_time = time.strptime(att_details.in_time, '%H:%M:%S') - max_time = time.strptime('09:15:00', '%H:%M:%S') + max_time = time.strptime('09:15:00', '%H:%M:%S') if in_time >= max_time: row += ["Late"] else: - row += [""] + row += [""] else: - row += ["Failed to Punch"] + row += ["Failed to Punch"] else: - row +=["","","","Absent",""] + row += ["", "", "Absent", ""] data.append(row) return columns, data @@ -85,8 +82,10 @@ def get_columns(filters): ] return columns + def get_employees(): - employees = frappe.db.sql("""select name,employee_name,hrsic from tabEmployee where status = 'Active'""",as_dict=1) + employees = frappe.db.sql( + """select name,employee_name,hrsic from tabEmployee where status = 'Active'""", as_dict=1) return employees @@ -100,6 +99,5 @@ def check_leave_record(employee, date): else: status = 'On Leave' leave_type = leave_record[0].leave_type - - return status,leave_type \ No newline at end of file + return status, leave_type