diff --git a/payware/before_uninstall.py b/payware/before_uninstall.py new file mode 100644 index 0000000..8f931f9 --- /dev/null +++ b/payware/before_uninstall.py @@ -0,0 +1,173 @@ +import click +import frappe + + +def before_uninstall(): + delete_custom_fields() + delete_property_setters() + delete_payware_doctype() + delete_payware_print_formats() + delete_payware_reports() + + +def delete_payware_doctype(): + doctypes = frappe.get_all("DocType", filters={"module": "Payware"}) + for doctype in doctypes: + try: + frappe.delete_doc("DocType", doctype.name) + except Exception as e: + click.secho("Error occured when deleting payware doctype", fg="red") + + frappe.clear_cache() + click.secho("Payware doctypes deleted successfully", fg="green") + + +def delete_custom_fields(): + custom_fields = get_custom_fields_to_remove() + for doctype, fields in custom_fields.items(): + try: + frappe.db.delete( + "Custom Field", + filters={"dt": doctype, "fieldname": ["in", fields]}, + ) + except Exception as e: + click.secho("Error occured when deleting Payware custom fields", fg="red") + + frappe.clear_cache(doctype=doctype) + + click.secho("Payware Custom fields deleted successfully", fg="green") + + +def delete_property_setters(): + unique_doctypes = [] + property_setters = get_property_setter_to_delete() + for property_setter in property_setters: + try: + frappe.db.delete( + "Property Setter", + filters=property_setter, + ) + if property_setter.get("doc_type") not in unique_doctypes: + unique_doctypes.append(property_setter.get("doc_type")) + except Exception as e: + click.secho("Error occured when deleting Payware property setter", fg="red") + + for doctype in unique_doctypes: + frappe.clear_cache(doctype=doctype) + + click.secho("Payware Property setters deleted successfully", fg="green") + + +def get_custom_fields_to_remove(): + custom_fields = { + "Employee": [ + "area", + "biometric_code", + "biometric_id", + "enable_biometric", + "column_break_49", + "column_break_50", + "other_allowance", + "worker_subsistence", + "column_break_54", + ], + "Loan": [ + "loan_repayments_not_from_salary", + "not_from_salary_loan_repayments", + "total_nsf_repayments", + ], + "Payroll Entry": [ + "bank_account_for_transfer", + "bank_payment_details", + "cheque_date", + "cheque_number", + "column_break_34", + "section_break_35", + ], + "Salary Component": [ + "sdl_emolument_category", + "column_break_16", + ], + "Repayment Schedule": [ + "change_amount", + "changed_interest_amount", + "changed_principal_amount", + ], + } + return custom_fields + + +def get_property_setter_to_delete(): + property_setters = [ + { + "doc_type": "Additional Salary", + "field_name": "naming_series", + "property": "options", + }, + {"doc_type": "Employee", "field_name": "department", "property": "permlevel"}, + {"doc_type": "Employee", "field_name": "job_profile", "property": "permlevel"}, + { + "doc_type": "Leave Application", + "field_name": "naming_series", + "property": "options", + }, + {"doc_type": "Loan", "field_name": "loan_type", "property": "in_list_view"}, + { + "doc_type": "Loan", + "field_name": "loan_type", + "property": "in_standard_filter", + }, + {"doc_type": "Loan", "field_name": "posting_date", "property": "in_list_view"}, + { + "doc_type": "Loan", + "field_name": "repay_from_salary", + "property": "allow_on_submit", + }, + {"doc_type": "Loan", "field_name": "repayment_method", "property": "options"}, + {"doc_type": "Loan", "field_name": "status", "property": "in_standard_filter"}, + { + "doc_type": "Payroll Entry", + "field_name": "branch", + "property": "in_list_view", + }, + { + "doc_type": "Payroll Entry", + "field_name": "company", + "property": "print_width", + }, + { + "doc_type": "Salary Structure Assignment", + "field_name": "employee", + "property": "in_list_view", + }, + ] + + return property_setters + + +def delete_payware_print_formats(): + print_formats = frappe.get_all( + "Print Format", filters={"module": "Payware", "standard": "Yes"} + ) + for print_format in print_formats: + try: + frappe.delete_doc("Print Format", print_format.name) + except Exception as e: + click.secho("Error occured when deleting Payware print format", fg="red") + + frappe.clear_cache() + click.secho("Payware print formats deleted successfully", fg="green") + + +def delete_payware_reports(): + reports = frappe.get_all( + "Report", filters={"module": "Payware", "is_standard": "Yes"} + ) + for report in reports: + try: + frappe.delete_doc("Report", report.name) + except Exception as e: + click.secho("Error occured when deleting Payware report", fg="red") + + frappe.clear_cache() + click.secho("Payware reports deleted successfully", fg="green") diff --git a/payware/config/payware.py b/payware/config/payware.py index 832d363..01d8522 100644 --- a/payware/config/payware.py +++ b/payware/config/payware.py @@ -4,6 +4,7 @@ def get_data(): + return config = [ { "label": _("Payware Documents"), diff --git a/payware/fixtures/custom_field.json b/payware/fixtures/custom_field.json deleted file mode 100644 index 4e33a9d..0000000 --- a/payware/fixtures/custom_field.json +++ /dev/null @@ -1,2122 +0,0 @@ -[ - { - "allow_in_quick_entry": 0, - "allow_on_submit": 1, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "default": null, - "depends_on": "eval:doc.paid==0", - "description": null, - "docstatus": 0, - "doctype": "Custom Field", - "dt": "Repayment Schedule", - "fetch_from": null, - "fetch_if_empty": 0, - "fieldname": "change_amount", - "fieldtype": "Check", - "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": "paid", - "label": "Change Amount", - "length": 0, - "mandatory_depends_on": null, - "modified": "2019-12-03 16:36:59.411030", - "name": "Repayment Schedule-change_amount", - "no_copy": 0, - "non_negative": 0, - "options": null, - "parent": null, - "parentfield": null, - "parenttype": null, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "read_only_depends_on": null, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "translatable": 0, - "unique": 0, - "width": null - }, - { - "allow_in_quick_entry": 0, - "allow_on_submit": 1, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "default": null, - "depends_on": "eval:doc.change_amount==1", - "description": null, - "docstatus": 0, - "doctype": "Custom Field", - "dt": "Repayment Schedule", - "fetch_from": null, - "fetch_if_empty": 0, - "fieldname": "changed_principal_amount", - "fieldtype": "Currency", - "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": "change_amount", - "label": "Changed Principal Amount", - "length": 0, - "mandatory_depends_on": null, - "modified": "2019-12-03 16:36:53.437116", - "name": "Repayment Schedule-changed_principal_amount", - "no_copy": 0, - "non_negative": 0, - "options": null, - "parent": null, - "parentfield": null, - "parenttype": null, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "read_only_depends_on": null, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "translatable": 0, - "unique": 0, - "width": null - }, - { - "allow_in_quick_entry": 0, - "allow_on_submit": 1, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "default": null, - "depends_on": "eval:doc.change_amount==1", - "description": null, - "docstatus": 0, - "doctype": "Custom Field", - "dt": "Repayment Schedule", - "fetch_from": null, - "fetch_if_empty": 0, - "fieldname": "changed_interest_amount", - "fieldtype": "Currency", - "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": "changed_principal_amount", - "label": "Changed Interest Amount", - "length": 0, - "mandatory_depends_on": null, - "modified": "2019-12-03 16:36:48.588660", - "name": "Repayment Schedule-changed_interest_amount", - "no_copy": 0, - "non_negative": 0, - "options": null, - "parent": null, - "parentfield": null, - "parenttype": null, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "read_only_depends_on": null, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "translatable": 0, - "unique": 0, - "width": null - }, - { - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "default": null, - "depends_on": null, - "description": null, - "docstatus": 0, - "doctype": "Custom Field", - "dt": "Salary Component", - "fetch_from": null, - "fetch_if_empty": 0, - "fieldname": "payware_specifics", - "fieldtype": "Section Break", - "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": "disabled", - "label": "Payware Specifics", - "length": 0, - "mandatory_depends_on": null, - "modified": "2019-12-03 16:37:15.863472", - "name": "Salary Component-payware_specifics", - "no_copy": 0, - "non_negative": 0, - "options": null, - "parent": null, - "parentfield": null, - "parenttype": null, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "read_only_depends_on": null, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "translatable": 0, - "unique": 0, - "width": null - }, - { - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "default": null, - "depends_on": "eval:doc.type==\"Deduction\"", - "description": null, - "docstatus": 0, - "doctype": "Custom Field", - "dt": "Salary Component", - "fetch_from": null, - "fetch_if_empty": 0, - "fieldname": "create_cash_journal", - "fieldtype": "Check", - "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": "payware_specifics", - "label": "Create Cash Journal", - "length": 0, - "mandatory_depends_on": null, - "modified": "2019-12-03 16:39:08.564648", - "name": "Salary Component-create_cash_journal", - "no_copy": 0, - "non_negative": 0, - "options": null, - "parent": null, - "parentfield": null, - "parenttype": null, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "read_only_depends_on": null, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "translatable": 0, - "unique": 0, - "width": null - }, - { - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "default": null, - "depends_on": "eval:(doc.type==\"Earning\" && doc.do_not_include_in_total==0)", - "description": null, - "docstatus": 0, - "doctype": "Custom Field", - "dt": "Salary Component", - "fetch_from": null, - "fetch_if_empty": 0, - "fieldname": "sdl_emolument_category", - "fieldtype": "Select", - "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": "create_cash_journal", - "label": "SDL Emolument Category", - "length": 0, - "mandatory_depends_on": null, - "modified": "2020-02-21 20:56:19.842840", - "name": "Salary Component-sdl_emolument_category", - "no_copy": 0, - "non_negative": 0, - "options": "None\nAny Other Allowances\nBasic pay\nLeave pay\nSick pay\nPayment in Lieu of Leave\nFees\nCommission\nBonus\nGratuity\nSubsistence Allowance\nTraveling Allowance\nEntertainment Allowance\nHousing Allowance", - "parent": null, - "parentfield": null, - "parenttype": null, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "read_only_depends_on": null, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "translatable": 1, - "unique": 0, - "width": null - }, - { - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "default": null, - "depends_on": null, - "description": null, - "docstatus": 0, - "doctype": "Custom Field", - "dt": "Salary Component", - "fetch_from": null, - "fetch_if_empty": 0, - "fieldname": "column_break_16", - "fieldtype": "Column Break", - "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": "sdl_emolument_category", - "label": null, - "length": 0, - "mandatory_depends_on": null, - "modified": "2019-12-03 16:37:04.529362", - "name": "Salary Component-column_break_16", - "no_copy": 0, - "non_negative": 0, - "options": null, - "parent": null, - "parentfield": null, - "parenttype": null, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "read_only_depends_on": null, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "translatable": 0, - "unique": 0, - "width": null - }, - { - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "default": null, - "depends_on": "eval:doc.type==\"Earning\"", - "description": null, - "docstatus": 0, - "doctype": "Custom Field", - "dt": "Salary Component", - "fetch_from": null, - "fetch_if_empty": 0, - "fieldname": "based_on_hourly_rate", - "fieldtype": "Check", - "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": "column_break_16", - "label": "Based on Hourly Rate", - "length": 0, - "mandatory_depends_on": null, - "modified": "2019-12-03 16:39:29.723933", - "name": "Salary Component-based_on_hourly_rate", - "no_copy": 0, - "non_negative": 0, - "options": null, - "parent": null, - "parentfield": null, - "parenttype": null, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "read_only_depends_on": null, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "translatable": 0, - "unique": 0, - "width": null - }, - { - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "default": null, - "depends_on": "based_on_hourly_rate", - "description": "Enter percentage % e.g. for 1.5 times enter 150%", - "docstatus": 0, - "doctype": "Custom Field", - "dt": "Salary Component", - "fetch_from": null, - "fetch_if_empty": 0, - "fieldname": "hourly_rate", - "fieldtype": "Percent", - "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": "based_on_hourly_rate", - "label": "Hourly Rate", - "length": 0, - "mandatory_depends_on": null, - "modified": "2019-12-03 16:39:24.893715", - "name": "Salary Component-hourly_rate", - "no_copy": 0, - "non_negative": 0, - "options": null, - "parent": null, - "parentfield": null, - "parenttype": null, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "read_only_depends_on": null, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "translatable": 0, - "unique": 0, - "width": null - }, - { - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "default": null, - "depends_on": "", - "description": null, - "docstatus": 0, - "doctype": "Custom Field", - "dt": "Loan", - "fetch_from": null, - "fetch_if_empty": 0, - "fieldname": "not_from_salary_loan_repayments", - "fieldtype": "Section Break", - "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": "repayment_schedule", - "label": "Not from Salary Loan Repayments", - "length": 0, - "mandatory_depends_on": null, - "modified": "2020-01-13 00:29:29.512557", - "name": "Loan-not_from_salary_loan_repayments", - "no_copy": 0, - "non_negative": 0, - "options": null, - "parent": null, - "parentfield": null, - "parenttype": null, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "read_only_depends_on": null, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "translatable": 0, - "unique": 0, - "width": null - }, - { - "allow_in_quick_entry": 0, - "allow_on_submit": 1, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "default": null, - "depends_on": null, - "description": null, - "docstatus": 0, - "doctype": "Custom Field", - "dt": "Loan", - "fetch_from": null, - "fetch_if_empty": 0, - "fieldname": "loan_repayments_not_from_salary", - "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": "not_from_salary_loan_repayments", - "label": "Loan Repayments Not From Salary", - "length": 0, - "mandatory_depends_on": null, - "modified": "2019-12-03 16:39:13.673970", - "name": "Loan-loan_repayments_not_from_salary", - "no_copy": 0, - "non_negative": 0, - "options": "Loan NFS Repayments", - "parent": null, - "parentfield": null, - "parenttype": null, - "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, - "translatable": 0, - "unique": 0, - "width": null - }, - { - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "default": null, - "depends_on": null, - "description": null, - "docstatus": 0, - "doctype": "Custom Field", - "dt": "Salary Slip", - "fetch_from": null, - "fetch_if_empty": 0, - "fieldname": "overtime_components", - "fieldtype": "Section Break", - "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": "hour_rate", - "label": "Overtime Components", - "length": 0, - "mandatory_depends_on": null, - "modified": "2019-12-03 16:39:40.030549", - "name": "Salary Slip-overtime_components", - "no_copy": 0, - "non_negative": 0, - "options": null, - "parent": null, - "parentfield": null, - "parenttype": null, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "read_only_depends_on": null, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "translatable": 0, - "unique": 0, - "width": null - }, - { - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "default": null, - "depends_on": null, - "description": null, - "docstatus": 0, - "doctype": "Custom Field", - "dt": "Salary Slip", - "fetch_from": null, - "fetch_if_empty": 0, - "fieldname": "salary_slip_ot_component", - "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": "overtime_components", - "label": "Salary Slip OT Component", - "length": 0, - "mandatory_depends_on": null, - "modified": "2019-12-03 16:39:34.526842", - "name": "Salary Slip-salary_slip_ot_component", - "no_copy": 0, - "non_negative": 0, - "options": "Salary Slip OT Component", - "parent": null, - "parentfield": null, - "parenttype": null, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "read_only_depends_on": null, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "translatable": 0, - "unique": 0, - "width": null - }, - { - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "default": null, - "depends_on": null, - "description": null, - "docstatus": 0, - "doctype": "Custom Field", - "dt": "Payroll Entry", - "fetch_from": null, - "fetch_if_empty": 0, - "fieldname": "bank_payment_details", - "fieldtype": "Section Break", - "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": "payment_account", - "label": "Bank Payment Details", - "length": 0, - "mandatory_depends_on": null, - "modified": "2019-08-01 14:57:29.215552", - "name": "Payroll Entry-bank_payment_details", - "no_copy": 0, - "non_negative": 0, - "options": null, - "parent": null, - "parentfield": null, - "parenttype": null, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "read_only_depends_on": null, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "translatable": 0, - "unique": 0, - "width": null - }, - { - "allow_in_quick_entry": 0, - "allow_on_submit": 1, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "default": null, - "depends_on": null, - "description": null, - "docstatus": 0, - "doctype": "Custom Field", - "dt": "Loan", - "fetch_from": null, - "fetch_if_empty": 0, - "fieldname": "total_nsf_repayments", - "fieldtype": "Currency", - "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": "total_payment", - "label": "Other Repayments", - "length": 0, - "mandatory_depends_on": null, - "modified": "2019-12-03 16:36:43.703791", - "name": "Loan-total_nsf_repayments", - "no_copy": 0, - "non_negative": 0, - "options": "Company:company:default_currency", - "parent": null, - "parentfield": null, - "parenttype": null, - "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, - "translatable": 0, - "unique": 0, - "width": null - }, - { - "allow_in_quick_entry": 0, - "allow_on_submit": 1, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "default": null, - "depends_on": null, - "description": null, - "docstatus": 0, - "doctype": "Custom Field", - "dt": "Payroll Entry", - "fetch_from": null, - "fetch_if_empty": 0, - "fieldname": "bank_account_for_transfer", - "fieldtype": "Link", - "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": "bank_payment_details", - "label": "Bank Account for Transfer", - "length": 0, - "mandatory_depends_on": null, - "modified": "2020-08-29 10:22:31.570122", - "name": "Payroll Entry-bank_account_for_transfer", - "no_copy": 0, - "non_negative": 0, - "options": "Bank Account", - "parent": null, - "parentfield": null, - "parenttype": null, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "read_only_depends_on": null, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "translatable": 0, - "unique": 0, - "width": null - }, - { - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "default": null, - "depends_on": null, - "description": null, - "docstatus": 0, - "doctype": "Custom Field", - "dt": "Payroll Entry", - "fetch_from": null, - "fetch_if_empty": 0, - "fieldname": "column_break_34", - "fieldtype": "Column Break", - "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": "bank_account_for_transfer", - "label": null, - "length": 0, - "mandatory_depends_on": null, - "modified": "2019-08-01 14:58:49.138438", - "name": "Payroll Entry-column_break_34", - "no_copy": 0, - "non_negative": 0, - "options": null, - "parent": null, - "parentfield": null, - "parenttype": null, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "read_only_depends_on": null, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "translatable": 0, - "unique": 0, - "width": null - }, - { - "allow_in_quick_entry": 0, - "allow_on_submit": 1, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "default": null, - "depends_on": null, - "description": null, - "docstatus": 0, - "doctype": "Custom Field", - "dt": "Payroll Entry", - "fetch_from": null, - "fetch_if_empty": 0, - "fieldname": "cheque_number", - "fieldtype": "Data", - "hidden": 0, - "hide_border": 0, - "hide_days": 0, - "hide_seconds": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_preview": 0, - "in_standard_filter": 0, - "insert_after": "column_break_34", - "label": "Cheque Number", - "length": 0, - "mandatory_depends_on": null, - "modified": "2019-08-01 14:58:48.945205", - "name": "Payroll Entry-cheque_number", - "no_copy": 0, - "non_negative": 0, - "options": null, - "parent": null, - "parentfield": null, - "parenttype": null, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "read_only_depends_on": null, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "translatable": 1, - "unique": 0, - "width": null - }, - { - "allow_in_quick_entry": 0, - "allow_on_submit": 1, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "default": null, - "depends_on": null, - "description": null, - "docstatus": 0, - "doctype": "Custom Field", - "dt": "Payroll Entry", - "fetch_from": null, - "fetch_if_empty": 0, - "fieldname": "cheque_date", - "fieldtype": "Date", - "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": "cheque_number", - "label": "Cheque Date", - "length": 0, - "mandatory_depends_on": null, - "modified": "2019-08-01 14:58:49.298214", - "name": "Payroll Entry-cheque_date", - "no_copy": 0, - "non_negative": 0, - "options": null, - "parent": null, - "parentfield": null, - "parenttype": null, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "read_only_depends_on": null, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "translatable": 0, - "unique": 0, - "width": null - }, - { - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "default": null, - "depends_on": null, - "description": null, - "docstatus": 0, - "doctype": "Custom Field", - "dt": "Payroll Entry", - "fetch_from": null, - "fetch_if_empty": 0, - "fieldname": "section_break_35", - "fieldtype": "Section Break", - "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": "cheque_date", - "label": null, - "length": 0, - "mandatory_depends_on": null, - "modified": "2020-08-28 16:07:43.297644", - "name": "Payroll Entry-section_break_35", - "no_copy": 0, - "non_negative": 0, - "options": null, - "parent": null, - "parentfield": null, - "parenttype": null, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "read_only_depends_on": null, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "translatable": 0, - "unique": 0, - "width": null - }, - { - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "default": null, - "depends_on": null, - "description": null, - "docstatus": 0, - "doctype": "Custom Field", - "dt": "Employee", - "fetch_from": null, - "fetch_if_empty": 0, - "fieldname": "statutory_details", - "fieldtype": "Section Break", - "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": "branch", - "label": "Statutory Details", - "length": 0, - "mandatory_depends_on": null, - "modified": "2019-12-02 11:02:43.983151", - "name": "Employee-statutory_details", - "no_copy": 0, - "non_negative": 0, - "options": null, - "parent": null, - "parentfield": null, - "parenttype": null, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "read_only_depends_on": null, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "translatable": 0, - "unique": 0, - "width": null - }, - { - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "default": null, - "depends_on": null, - "description": null, - "docstatus": 0, - "doctype": "Custom Field", - "dt": "Employee", - "fetch_from": null, - "fetch_if_empty": 0, - "fieldname": "pension_fund", - "fieldtype": "Select", - "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": "statutory_details", - "label": "Pension Fund", - "length": 0, - "mandatory_depends_on": null, - "modified": "2019-12-02 11:02:29.445415", - "name": "Employee-pension_fund", - "no_copy": 0, - "non_negative": 0, - "options": "\nNSSF\nPPF", - "parent": null, - "parentfield": null, - "parenttype": null, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "read_only_depends_on": null, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "translatable": 1, - "unique": 0, - "width": null - }, - { - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "default": null, - "depends_on": null, - "description": null, - "docstatus": 0, - "doctype": "Custom Field", - "dt": "Employee", - "fetch_from": null, - "fetch_if_empty": 0, - "fieldname": "pension_fund_number", - "fieldtype": "Data", - "hidden": 0, - "hide_border": 0, - "hide_days": 0, - "hide_seconds": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_preview": 0, - "in_standard_filter": 0, - "insert_after": "pension_fund", - "label": "Pension Fund Number", - "length": 0, - "mandatory_depends_on": null, - "modified": "2019-12-02 11:02:19.556948", - "name": "Employee-pension_fund_number", - "no_copy": 0, - "non_negative": 0, - "options": null, - "parent": null, - "parentfield": null, - "parenttype": null, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "read_only_depends_on": null, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "translatable": 1, - "unique": 0, - "width": null - }, - { - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "default": null, - "depends_on": "", - "description": null, - "docstatus": 0, - "doctype": "Custom Field", - "dt": "Employee", - "fetch_from": null, - "fetch_if_empty": 0, - "fieldname": "wcf_number", - "fieldtype": "Data", - "hidden": 0, - "hide_border": 0, - "hide_days": 0, - "hide_seconds": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_preview": 0, - "in_standard_filter": 0, - "insert_after": "pension_fund_number", - "label": "WCF Number", - "length": 0, - "mandatory_depends_on": null, - "modified": "2019-12-02 11:01:36.094822", - "name": "Employee-wcf_number", - "no_copy": 0, - "non_negative": 0, - "options": null, - "parent": null, - "parentfield": null, - "parenttype": null, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "read_only_depends_on": null, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "translatable": 1, - "unique": 0, - "width": null - }, - { - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "default": null, - "depends_on": null, - "description": null, - "docstatus": 0, - "doctype": "Custom Field", - "dt": "Employee", - "fetch_from": null, - "fetch_if_empty": 0, - "fieldname": "column_break_54", - "fieldtype": "Column Break", - "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": "wcf_number", - "label": null, - "length": 0, - "mandatory_depends_on": null, - "modified": "2020-08-28 11:21:14.375156", - "name": "Employee-column_break_54", - "no_copy": 0, - "non_negative": 0, - "options": null, - "parent": null, - "parentfield": null, - "parenttype": null, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "read_only_depends_on": null, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "translatable": 0, - "unique": 0, - "width": null - }, - { - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "default": "999-999-999", - "depends_on": null, - "description": null, - "docstatus": 0, - "doctype": "Custom Field", - "dt": "Employee", - "fetch_from": null, - "fetch_if_empty": 0, - "fieldname": "tin_number", - "fieldtype": "Data", - "hidden": 0, - "hide_border": 0, - "hide_days": 0, - "hide_seconds": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_preview": 0, - "in_standard_filter": 0, - "insert_after": "column_break_54", - "label": "TIN Number", - "length": 0, - "mandatory_depends_on": null, - "modified": "2020-08-28 11:42:00.423112", - "name": "Employee-tin_number", - "no_copy": 0, - "non_negative": 0, - "options": null, - "parent": null, - "parentfield": null, - "parenttype": null, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "read_only_depends_on": null, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "translatable": 1, - "unique": 0, - "width": null - }, - { - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "default": null, - "depends_on": null, - "description": null, - "docstatus": 0, - "doctype": "Custom Field", - "dt": "Employee", - "fetch_from": null, - "fetch_if_empty": 0, - "fieldname": "national_identity", - "fieldtype": "Data", - "hidden": 0, - "hide_border": 0, - "hide_days": 0, - "hide_seconds": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_preview": 0, - "in_standard_filter": 0, - "insert_after": "tin_number", - "label": "National Identity", - "length": 0, - "mandatory_depends_on": null, - "modified": "2019-12-02 10:57:52.506504", - "name": "Employee-national_identity", - "no_copy": 0, - "non_negative": 0, - "options": null, - "parent": null, - "parentfield": null, - "parenttype": null, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "read_only_depends_on": null, - "report_hide": 0, - "reqd": 1, - "search_index": 0, - "translatable": 1, - "unique": 0, - "width": null - }, - { - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "default": null, - "depends_on": null, - "description": null, - "docstatus": 0, - "doctype": "Custom Field", - "dt": "Employee", - "fetch_from": null, - "fetch_if_empty": 0, - "fieldname": "other_allowance", - "fieldtype": "Currency", - "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": "transport", - "label": "Other Allowance", - "length": 0, - "mandatory_depends_on": null, - "modified": "2020-09-19 11:15:41.355680", - "name": "Employee-other_allowance", - "no_copy": 0, - "non_negative": 0, - "options": null, - "parent": null, - "parentfield": null, - "parenttype": null, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "read_only_depends_on": null, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "translatable": 0, - "unique": 0, - "width": null - }, - { - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "default": null, - "depends_on": null, - "description": null, - "docstatus": 0, - "doctype": "Custom Field", - "dt": "Employee", - "fetch_from": null, - "fetch_if_empty": 0, - "fieldname": "worker_subsistence", - "fieldtype": "Currency", - "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": "credit_society", - "label": "Worker Subsistence", - "length": 0, - "mandatory_depends_on": null, - "modified": "2020-09-25 11:02:07.885126", - "name": "Employee-worker_subsistence", - "no_copy": 0, - "non_negative": 0, - "options": null, - "parent": null, - "parentfield": null, - "parenttype": null, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "read_only_depends_on": null, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "translatable": 0, - "unique": 0, - "width": null - }, - { - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "default": null, - "depends_on": null, - "description": null, - "docstatus": 0, - "doctype": "Custom Field", - "dt": "Employee", - "fetch_from": null, - "fetch_if_empty": 0, - "fieldname": "column_break_49", - "fieldtype": "Column Break", - "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": "worker_subsistence", - "label": null, - "length": 0, - "mandatory_depends_on": null, - "modified": "2020-09-08 09:33:12.893860", - "name": "Employee-column_break_49", - "no_copy": 0, - "non_negative": 0, - "options": null, - "parent": null, - "parentfield": null, - "parenttype": null, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "read_only_depends_on": null, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "translatable": 0, - "unique": 0, - "width": null - }, - { - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "default": null, - "depends_on": null, - "description": null, - "docstatus": 0, - "doctype": "Custom Field", - "dt": "Employee", - "fetch_from": null, - "fetch_if_empty": 0, - "fieldname": "enable_biometric", - "fieldtype": "Check", - "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": "attendance_device_id", - "label": "Enable Biometric Attendance", - "length": 0, - "mandatory_depends_on": null, - "modified": "2020-01-13 22:49:16.070450", - "name": "Employee-enable_biometric", - "no_copy": 0, - "non_negative": 0, - "options": null, - "parent": null, - "parentfield": null, - "parenttype": null, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "read_only_depends_on": null, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "translatable": 0, - "unique": 0, - "width": null - }, - { - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "default": null, - "depends_on": null, - "description": null, - "docstatus": 0, - "doctype": "Custom Field", - "dt": "Employee", - "fetch_from": null, - "fetch_if_empty": 0, - "fieldname": "biometric_id", - "fieldtype": "Data", - "hidden": 0, - "hide_border": 0, - "hide_days": 0, - "hide_seconds": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_preview": 0, - "in_standard_filter": 0, - "insert_after": "enable_biometric", - "label": "Biometric Employee ID", - "length": 0, - "mandatory_depends_on": null, - "modified": "2020-01-12 23:31:12.236589", - "name": "Employee-biometric_id", - "no_copy": 0, - "non_negative": 0, - "options": null, - "parent": null, - "parentfield": null, - "parenttype": null, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "read_only_depends_on": null, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "translatable": 1, - "unique": 1, - "width": null - }, - { - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "default": null, - "depends_on": null, - "description": null, - "docstatus": 0, - "doctype": "Custom Field", - "dt": "Employee", - "fetch_from": null, - "fetch_if_empty": 0, - "fieldname": "biometric_code", - "fieldtype": "Data", - "hidden": 0, - "hide_border": 0, - "hide_days": 0, - "hide_seconds": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_preview": 0, - "in_standard_filter": 0, - "insert_after": "biometric_id", - "label": "Biometric Employee Code", - "length": 0, - "mandatory_depends_on": null, - "modified": "2020-01-12 23:31:32.711236", - "name": "Employee-biometric_code", - "no_copy": 0, - "non_negative": 0, - "options": null, - "parent": null, - "parentfield": null, - "parenttype": null, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "read_only_depends_on": null, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "translatable": 1, - "unique": 1, - "width": null - }, - { - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "default": null, - "depends_on": null, - "description": null, - "docstatus": 0, - "doctype": "Custom Field", - "dt": "Employee", - "fetch_from": null, - "fetch_if_empty": 0, - "fieldname": "area", - "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": "biometric_code", - "label": "Area", - "length": 0, - "mandatory_depends_on": null, - "modified": "2020-01-12 23:33:27.310096", - "name": "Employee-area", - "no_copy": 0, - "non_negative": 0, - "options": "Employee Area", - "parent": null, - "parentfield": null, - "parenttype": null, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "read_only_depends_on": null, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "translatable": 0, - "unique": 0, - "width": null - }, - { - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "default": null, - "depends_on": "", - "description": null, - "docstatus": 0, - "doctype": "Custom Field", - "dt": "Employee", - "fetch_from": null, - "fetch_if_empty": 0, - "fieldname": "column_break_50", - "fieldtype": "Column Break", - "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": "bank_name", - "label": null, - "length": 0, - "mandatory_depends_on": null, - "modified": "2019-12-02 11:01:50.417359", - "name": "Employee-column_break_50", - "no_copy": 0, - "non_negative": 0, - "options": null, - "parent": null, - "parentfield": null, - "parenttype": null, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "read_only_depends_on": null, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "translatable": 0, - "unique": 0, - "width": null - }, - { - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "default": null, - "depends_on": "eval:doc.salary_mode == 'Bank'", - "description": null, - "docstatus": 0, - "doctype": "Custom Field", - "dt": "Employee", - "fetch_from": null, - "fetch_if_empty": 0, - "fieldname": "bank_code", - "fieldtype": "Data", - "hidden": 0, - "hide_border": 0, - "hide_days": 0, - "hide_seconds": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_preview": 0, - "in_standard_filter": 0, - "insert_after": "bank_ac_no", - "label": "Bank Code", - "length": 0, - "mandatory_depends_on": null, - "modified": "2019-12-02 11:01:22.872766", - "name": "Employee-bank_code", - "no_copy": 0, - "non_negative": 0, - "options": null, - "parent": null, - "parentfield": null, - "parenttype": null, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "read_only_depends_on": null, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "translatable": 1, - "unique": 0, - "width": null - }, - { - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "default": null, - "depends_on": null, - "description": null, - "docstatus": 0, - "doctype": "Custom Field", - "dt": "Employee", - "fetch_from": null, - "fetch_if_empty": 0, - "fieldname": "overtime_components", - "fieldtype": "Section Break", - "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": "bank_code", - "label": "Overtime Components", - "length": 0, - "mandatory_depends_on": null, - "modified": "2019-12-02 11:04:49.873588", - "name": "Employee-overtime_components", - "no_copy": 0, - "non_negative": 0, - "options": null, - "parent": null, - "parentfield": null, - "parenttype": null, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "read_only_depends_on": null, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "translatable": 0, - "unique": 0, - "width": null - }, - { - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "default": null, - "depends_on": null, - "description": null, - "docstatus": 0, - "doctype": "Custom Field", - "dt": "Employee", - "fetch_from": null, - "fetch_if_empty": 0, - "fieldname": "employee_ot_component", - "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": "overtime_components", - "label": "Employee OT Component", - "length": 0, - "mandatory_depends_on": null, - "modified": "2019-12-02 11:04:37.206071", - "name": "Employee-employee_ot_component", - "no_copy": 0, - "non_negative": 0, - "options": "Employee OT Component", - "parent": null, - "parentfield": null, - "parenttype": null, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "read_only_depends_on": null, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "translatable": 0, - "unique": 0, - "width": null - }, - { - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "default": null, - "depends_on": null, - "description": null, - "docstatus": 0, - "doctype": "Custom Field", - "dt": "Employee", - "fetch_from": null, - "fetch_if_empty": 0, - "fieldname": "attachments", - "fieldtype": "Section Break", - "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": "health_details", - "label": "Attachments", - "length": 0, - "mandatory_depends_on": null, - "modified": "2020-10-26 15:40:35.333309", - "name": "Employee-attachments", - "no_copy": 0, - "non_negative": 0, - "options": null, - "parent": null, - "parentfield": null, - "parenttype": null, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "read_only_depends_on": null, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "translatable": 0, - "unique": 0, - "width": null - }, - { - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "default": null, - "depends_on": null, - "description": null, - "docstatus": 0, - "doctype": "Custom Field", - "dt": "Employee", - "fetch_from": null, - "fetch_if_empty": 0, - "fieldname": "files", - "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": "attachments", - "label": "", - "length": 0, - "mandatory_depends_on": null, - "modified": "2020-10-26 15:42:04.237924", - "name": "Employee-files", - "no_copy": 0, - "non_negative": 0, - "options": "Document Attachment", - "parent": null, - "parentfield": null, - "parenttype": null, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "read_only_depends_on": null, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "translatable": 0, - "unique": 0, - "width": null - } -] \ No newline at end of file diff --git a/payware/fixtures/property_setter.json b/payware/fixtures/property_setter.json deleted file mode 100644 index e2b359c..0000000 --- a/payware/fixtures/property_setter.json +++ /dev/null @@ -1,546 +0,0 @@ -[ - { - "default_value": null, - "doc_type": "Employee", - "docstatus": 0, - "doctype": "Property Setter", - "doctype_or_field": "DocField", - "field_name": "company", - "modified": "2020-09-26 11:13:17.460034", - "name": "Employee-company-in_list_view", - "parent": null, - "parentfield": null, - "parenttype": null, - "property": "in_list_view", - "property_type": "Check", - "row_name": null, - "value": "1" - }, - { - "default_value": null, - "doc_type": "Leave Application", - "docstatus": 0, - "doctype": "Property Setter", - "doctype_or_field": "DocField", - "field_name": "naming_series", - "modified": "2020-12-25 19:43:54.458401", - "name": "Leave Application-naming_series-options", - "parent": null, - "parentfield": null, - "parenttype": null, - "property": "options", - "property_type": "Text", - "row_name": null, - "value": "HR-LAP-.YYYY.-" - }, - { - "default_value": null, - "doc_type": "Loan", - "docstatus": 0, - "doctype": "Property Setter", - "doctype_or_field": "DocField", - "field_name": "status", - "modified": "2021-01-25 12:16:47.621855", - "name": "Loan-status-in_list_view", - "parent": null, - "parentfield": null, - "parenttype": null, - "property": "in_list_view", - "property_type": "Check", - "row_name": null, - "value": "1" - }, - { - "default_value": null, - "doc_type": "Payroll Entry", - "docstatus": 0, - "doctype": "Property Setter", - "doctype_or_field": "DocField", - "field_name": "branch", - "modified": "2021-01-25 17:32:07.540843", - "name": "Payroll Entry-branch-in_list_view", - "parent": null, - "parentfield": null, - "parenttype": null, - "property": "in_list_view", - "property_type": "Check", - "row_name": null, - "value": "0" - }, - { - "default_value": null, - "doc_type": "Payroll Entry", - "docstatus": 0, - "doctype": "Property Setter", - "doctype_or_field": "DocField", - "field_name": "company", - "modified": "2021-01-25 17:41:52.825218", - "name": "Payroll Entry-company-print_width", - "parent": null, - "parentfield": null, - "parenttype": null, - "property": "print_width", - "property_type": "Data", - "row_name": null, - "value": "4" - }, - { - "default_value": null, - "doc_type": "Additional Salary", - "docstatus": 0, - "doctype": "Property Setter", - "doctype_or_field": "DocField", - "field_name": "naming_series", - "modified": "2021-01-26 21:25:26.857150", - "name": "Additional Salary-naming_series-options", - "parent": null, - "parentfield": null, - "parenttype": null, - "property": "options", - "property_type": "Text", - "row_name": null, - "value": "HR-ADS-.YY.-.MM.-" - }, - { - "default_value": null, - "doc_type": "Payroll Entry", - "docstatus": 0, - "doctype": "Property Setter", - "doctype_or_field": "DocField", - "field_name": "company", - "modified": "2021-01-27 15:17:50.942956", - "name": "Payroll Entry-company-in_standard_filter", - "parent": null, - "parentfield": null, - "parenttype": null, - "property": "in_standard_filter", - "property_type": "Check", - "row_name": null, - "value": "1" - }, - { - "default_value": null, - "doc_type": "Additional Salary", - "docstatus": 0, - "doctype": "Property Setter", - "doctype_or_field": "DocField", - "field_name": "overwrite_salary_structure_amount", - "modified": "2021-02-04 17:43:37.669715", - "name": "Additional Salary-overwrite_salary_structure_amount-default", - "parent": null, - "parentfield": null, - "parenttype": null, - "property": "default", - "property_type": "Text", - "row_name": null, - "value": "0" - }, - { - "default_value": null, - "doc_type": "Salary Structure Assignment", - "docstatus": 0, - "doctype": "Property Setter", - "doctype_or_field": "DocField", - "field_name": "company", - "modified": "2021-02-23 10:03:37.159838", - "name": "Salary Structure Assignment-company-in_standard_filter", - "parent": null, - "parentfield": null, - "parenttype": null, - "property": "in_standard_filter", - "property_type": "Check", - "row_name": null, - "value": "1" - }, - { - "default_value": null, - "doc_type": "Attendance", - "docstatus": 0, - "doctype": "Property Setter", - "doctype_or_field": "DocField", - "field_name": "status", - "modified": "2021-03-15 11:14:59.067804", - "name": "Attendance-status-allow_on_submit", - "parent": null, - "parentfield": null, - "parenttype": null, - "property": "allow_on_submit", - "property_type": "Check", - "row_name": null, - "value": "1" - }, - { - "default_value": null, - "doc_type": "Attendance", - "docstatus": 0, - "doctype": "Property Setter", - "doctype_or_field": "DocType", - "field_name": null, - "modified": "2021-03-15 11:18:32.644354", - "name": "Attendance-main-track_changes", - "parent": null, - "parentfield": null, - "parenttype": null, - "property": "track_changes", - "property_type": "Check", - "row_name": null, - "value": "1" - }, - { - "default_value": null, - "doc_type": "Attendance", - "docstatus": 0, - "doctype": "Property Setter", - "doctype_or_field": "DocField", - "field_name": "leave_type", - "modified": "2021-03-15 11:20:07.393225", - "name": "Attendance-leave_type-allow_on_submit", - "parent": null, - "parentfield": null, - "parenttype": null, - "property": "allow_on_submit", - "property_type": "Check", - "row_name": null, - "value": "1" - }, - { - "default_value": null, - "doc_type": "Employee", - "docstatus": 0, - "doctype": "Property Setter", - "doctype_or_field": "DocField", - "field_name": "image", - "modified": "2021-04-03 10:50:06.210253", - "name": "Employee-image-hidden", - "parent": null, - "parentfield": null, - "parenttype": null, - "property": "hidden", - "property_type": "Check", - "row_name": null, - "value": "0" - }, - { - "default_value": null, - "doc_type": "Salary Structure Assignment", - "docstatus": 0, - "doctype": "Property Setter", - "doctype_or_field": "DocField", - "field_name": "base", - "modified": "2018-12-02 20:39:05.938112", - "name": "Salary Structure Assignment-base-in_list_view", - "parent": null, - "parentfield": null, - "parenttype": null, - "property": "in_list_view", - "property_type": "Check", - "row_name": null, - "value": "1" - }, - { - "default_value": null, - "doc_type": "Salary Structure Assignment", - "docstatus": 0, - "doctype": "Property Setter", - "doctype_or_field": "DocField", - "field_name": "employee", - "modified": "2018-12-02 20:40:50.879610", - "name": "Salary Structure Assignment-employee-in_list_view", - "parent": null, - "parentfield": null, - "parenttype": null, - "property": "in_list_view", - "property_type": "Check", - "row_name": null, - "value": "0" - }, - { - "default_value": null, - "doc_type": "Payroll Entry", - "docstatus": 0, - "doctype": "Property Setter", - "doctype_or_field": "DocField", - "field_name": "end_date", - "modified": "2019-05-25 11:23:38.876258", - "name": "Payroll Entry-end_date-in_list_view", - "parent": null, - "parentfield": null, - "parenttype": null, - "property": "in_list_view", - "property_type": "Check", - "row_name": null, - "value": "1" - }, - { - "default_value": null, - "doc_type": "Loan", - "docstatus": 0, - "doctype": "Property Setter", - "doctype_or_field": "DocField", - "field_name": "repayment_method", - "modified": "2019-06-29 12:24:57.717189", - "name": "Loan-repayment_method-options", - "parent": null, - "parentfield": null, - "parenttype": null, - "property": "options", - "property_type": "Text", - "row_name": null, - "value": "Repay Fixed Amount per Period\nRepay Over Number of Periods" - }, - { - "default_value": null, - "doc_type": "Loan", - "docstatus": 0, - "doctype": "Property Setter", - "doctype_or_field": "DocField", - "field_name": "applicant_name", - "modified": "2019-06-29 18:38:45.429450", - "name": "Loan-applicant_name-in_standard_filter", - "parent": null, - "parentfield": null, - "parenttype": null, - "property": "in_standard_filter", - "property_type": "Check", - "row_name": null, - "value": "1" - }, - { - "default_value": null, - "doc_type": "Loan", - "docstatus": 0, - "doctype": "Property Setter", - "doctype_or_field": "DocField", - "field_name": "applicant_name", - "modified": "2019-06-29 18:38:45.433671", - "name": "Loan-applicant_name-in_list_view", - "parent": null, - "parentfield": null, - "parenttype": null, - "property": "in_list_view", - "property_type": "Check", - "row_name": null, - "value": "1" - }, - { - "default_value": null, - "doc_type": "Loan", - "docstatus": 0, - "doctype": "Property Setter", - "doctype_or_field": "DocField", - "field_name": "loan_type", - "modified": "2019-06-29 18:38:45.437356", - "name": "Loan-loan_type-in_standard_filter", - "parent": null, - "parentfield": null, - "parenttype": null, - "property": "in_standard_filter", - "property_type": "Check", - "row_name": null, - "value": "1" - }, - { - "default_value": null, - "doc_type": "Loan", - "docstatus": 0, - "doctype": "Property Setter", - "doctype_or_field": "DocField", - "field_name": "loan_type", - "modified": "2019-06-29 18:38:45.440766", - "name": "Loan-loan_type-in_list_view", - "parent": null, - "parentfield": null, - "parenttype": null, - "property": "in_list_view", - "property_type": "Check", - "row_name": null, - "value": "0" - }, - { - "default_value": null, - "doc_type": "Payroll Entry", - "docstatus": 0, - "doctype": "Property Setter", - "doctype_or_field": "DocField", - "field_name": "posting_date", - "modified": "2019-07-03 11:53:16.555060", - "name": "Payroll Entry-posting_date-in_list_view", - "parent": null, - "parentfield": null, - "parenttype": null, - "property": "in_list_view", - "property_type": "Check", - "row_name": null, - "value": "1" - }, - { - "default_value": null, - "doc_type": "Loan", - "docstatus": 0, - "doctype": "Property Setter", - "doctype_or_field": "DocField", - "field_name": "loan_amount", - "modified": "2020-01-13 00:18:39.422736", - "name": "Loan-loan_amount-in_list_view", - "parent": null, - "parentfield": null, - "parenttype": null, - "property": "in_list_view", - "property_type": "Check", - "row_name": null, - "value": "1" - }, - { - "default_value": null, - "doc_type": "Loan", - "docstatus": 0, - "doctype": "Property Setter", - "doctype_or_field": "DocType", - "field_name": null, - "modified": "2020-01-13 00:19:47.007987", - "name": "Loan-search_fields", - "parent": null, - "parentfield": null, - "parenttype": null, - "property": "search_fields", - "property_type": "Data", - "row_name": null, - "value": "posting_date, applicant_name" - }, - { - "default_value": null, - "doc_type": "Loan", - "docstatus": 0, - "doctype": "Property Setter", - "doctype_or_field": "DocField", - "field_name": "status", - "modified": "2020-01-13 00:20:22.485670", - "name": "Loan-status-in_standard_filter", - "parent": null, - "parentfield": null, - "parenttype": null, - "property": "in_standard_filter", - "property_type": "Check", - "row_name": null, - "value": "1" - }, - { - "default_value": null, - "doc_type": "Loan", - "docstatus": 0, - "doctype": "Property Setter", - "doctype_or_field": "DocField", - "field_name": "posting_date", - "modified": "2020-01-13 00:20:44.941164", - "name": "Loan-posting_date-in_list_view", - "parent": null, - "parentfield": null, - "parenttype": null, - "property": "in_list_view", - "property_type": "Check", - "row_name": null, - "value": "0" - }, - { - "default_value": null, - "doc_type": "Employee", - "docstatus": 0, - "doctype": "Property Setter", - "doctype_or_field": "DocType", - "field_name": null, - "modified": "2021-05-05 16:09:32.360734", - "name": "Employee-main-track_changes", - "parent": null, - "parentfield": null, - "parenttype": null, - "property": "track_changes", - "property_type": "Check", - "row_name": null, - "value": "1" - }, - { - "default_value": null, - "doc_type": "Employee", - "docstatus": 0, - "doctype": "Property Setter", - "doctype_or_field": "DocField", - "field_name": "department", - "modified": "2021-05-21 15:42:56.321717", - "name": "Employee-department-permlevel", - "parent": null, - "parentfield": null, - "parenttype": null, - "property": "permlevel", - "property_type": "Int", - "row_name": null, - "value": "2" - }, - { - "default_value": null, - "doc_type": "Employee", - "docstatus": 0, - "doctype": "Property Setter", - "doctype_or_field": "DocField", - "field_name": "job_profile", - "modified": "2021-05-22 12:06:00.778373", - "name": "Employee-job_profile-permlevel", - "parent": null, - "parentfield": null, - "parenttype": null, - "property": "permlevel", - "property_type": "Int", - "row_name": null, - "value": "2" - }, - { - "default_value": null, - "doc_type": "Salary Structure", - "docstatus": 0, - "doctype": "Property Setter", - "doctype_or_field": "DocField", - "field_name": "earnings", - "modified": "2021-05-24 15:24:12.413854", - "name": "Salary Structure-earnings-allow_on_submit", - "parent": null, - "parentfield": null, - "parenttype": null, - "property": "allow_on_submit", - "property_type": "Check", - "row_name": null, - "value": "1" - }, - { - "default_value": null, - "doc_type": "Salary Structure", - "docstatus": 0, - "doctype": "Property Setter", - "doctype_or_field": "DocField", - "field_name": "deductions", - "modified": "2021-05-24 15:24:22.727699", - "name": "Salary Structure-deductions-allow_on_submit", - "parent": null, - "parentfield": null, - "parenttype": null, - "property": "allow_on_submit", - "property_type": "Check", - "row_name": null, - "value": "1" - }, - { - "default_value": null, - "doc_type": "Loan", - "docstatus": 0, - "doctype": "Property Setter", - "doctype_or_field": "DocField", - "field_name": "repay_from_salary", - "modified": "2021-05-28 13:54:33.247762", - "name": "Loan-repay_from_salary-allow_on_submit", - "parent": null, - "parentfield": null, - "parenttype": null, - "property": "allow_on_submit", - "property_type": "Check", - "row_name": null, - "value": "1" - } -] \ No newline at end of file diff --git a/payware/hooks.py b/payware/hooks.py index d77b153..a48c4d1 100755 --- a/payware/hooks.py +++ b/payware/hooks.py @@ -26,9 +26,7 @@ # page_js = {"page" : "public/js/file.js"} # include js in doctype views -doctype_js = { - "Loan": "payware/loan.js", -} +# doctype_js = {"doctype" : "public/js/doctype.js"} # doctype_list_js = {"doctype" : "public/js/doctype_list.js"} # doctype_tree_js = {"doctype" : "public/js/doctype_tree.js"} # doctype_calendar_js = {"doctype" : "public/js/doctype_calendar.js"} @@ -77,166 +75,39 @@ # "Event": "frappe.desk.doctype.event.event.has_permission", # } -fixtures = [ - { - "doctype": "Custom Field", - "filters": [ - [ - "name", - "in", - ( - "Additional Salary-auto_created_based_on", - "Additional Salary-auto_repeat_details", - "Additional Salary-auto_repeat_end_date", - "Additional Salary-auto_repeat_frequency", - "Additional Salary-based_on_hourly_rate", - "Additional Salary-column_break_15", - "Additional Salary-column_break_19", - "Additional Salary-hourly_rate", - "Additional Salary-last_transaction_amount", - "Additional Salary-last_transaction_date", - "Additional Salary-last_transaction_details", - "Additional Salary-no_of_hours", - "Additional Salary-section_break_17", - "Employee-area", - "Employee-attachments", - "Employee-bank_code", - "Employee-biometric_code", - "Employee-biometric_id", - "Employee-column_break_49", - "Employee-column_break_50", - "Employee-column_break_54", - "Employee-employee_ot_component", - "Employee-enable_biometric", - "Employee-files", - "Employee-national_identity", - "Employee-other_allowance", - "Employee-overtime_components", - "Employee-pension_fund_number", - "Employee-pension_fund", - "Employee-statutory_details", - "Employee-tin_number", - "Employee-wcf_number", - "Employee-worker_subsistence", - "Loan-loan_repayments_not_from_salary", - "Loan-not_from_salary_loan_repayments", - "Loan-total_nsf_repayments", - "Payroll Entry-bank_account_for_transfer", - "Payroll Entry-bank_payment_details", - "Payroll Entry-cheque_date", - "Payroll Entry-cheque_number", - "Payroll Entry-column_break_34", - "Payroll Entry-section_break_35", - "Repayment Schedule-change_amount", - "Repayment Schedule-changed_interest_amount", - "Repayment Schedule-changed_principal_amount", - "Salary Component-based_on_hourly_rate", - "Salary Component-column_break_16", - "Salary Component-create_cash_journal", - "Salary Component-hourly_rate", - "Salary Component-payware_specifics", - "Salary Component-sdl_emolument_category", - "Salary Slip-overtime_components", - "Salary Slip-salary_slip_ot_component", - ), - ] - ], - }, - { - "doctype": "Property Setter", - "filters": [ - [ - "name", - "in", - ( - "Additional Salary-naming_series-options", - "Additional Salary-overwrite_salary_structure_amount-default", - "Attendance-leave_type-allow_on_submit", - "Attendance-main-track_changes", - "Attendance-status-allow_on_submit", - "Employee-company-in_list_view", - "Employee-department-permlevel", - "Employee-image-hidden", - "Employee-job_profile-permlevel", - "Employee-main-track_changes", - "Leave Application-naming_series-options", - "Loan-applicant_name-in_list_view", - "Loan-applicant_name-in_standard_filter", - "Loan-loan_amount-in_list_view", - "Loan-loan_type-in_list_view", - "Loan-loan_type-in_standard_filter", - "Loan-posting_date-in_list_view", - "Loan-repay_from_salary-allow_on_submit", - "Loan-repayment_method-options", - "Loan-search_fields", - "Loan-status-in_list_view", - "Loan-status-in_standard_filter", - "Payroll Entry-branch-in_list_view", - "Payroll Entry-company-in_standard_filter", - "Payroll Entry-company-print_width", - "Payroll Entry-end_date-in_list_view", - "Payroll Entry-posting_date-in_list_view", - "Salary Structure Assignment-base-in_list_view", - "Salary Structure Assignment-company-in_standard_filter", - "Salary Structure Assignment-employee-in_list_view", - "Salary Structure-deductions-allow_on_submit", - "Salary Structure-earnings-allow_on_submit", - "Repayment Schedule-payment_date-read_only", - ), - ] - ], - }, -] # Document Events # --------------- # Hook on document methods and events -doc_events = { - "Loan": {"validate": "payware.payware.utils.validate_loan"}, - "Salary Slip": { - "on_submit": "payware.payware.utils.set_loan_paid", - "on_cancel": "payware.payware.utils.set_loan_paid", - "before_insert": "payware.payware.salary_slip_hook.generate_component_in_salary_slip_insert", - "before_save": "payware.payware.salary_slip_hook.generate_component_in_salary_slip_update", - }, - "Loan Repayment Not From Salary": { - "on_submit": "payware.payware.utils.create_loan_repayment_jv", - "validate": "payware.payware.utils.validate_loan_repayment_nfs", - "on_cancel": "payware.payware.utils.create_loan_repayment_jv", - }, - "Additional Salary": { - "on_submit": "payware.payware.utils.create_additional_salary_journal", - "on_cancel": "payware.payware.utils.create_additional_salary_journal", - "before_validate": "payware.payware.utils.set_employee_base_salary_in_hours", - }, - "Employee": { - "validate": "payware.payware.doctype.biometric_settings.biometric_settings.check_employee_bio_info" - }, -} +# doc_events = { +# "*": { +# "on_update": "method", +# "on_cancel": "method", +# "on_trash": "method" +# } +# } # Scheduled Tasks # --------------- -scheduler_events = { - # "all": [ - # "payware.tasks.all" - # ], - "daily": [ - "payware.payware.utils.generate_additional_salary_records", - "payware.payware.doctype.biometric_settings.biometric_settings.auto_shift_assignment_for_active_today", - ], - "hourly": [ - "payware.payware.doctype.biometric_settings.biometric_settings.auto_get_transactions", - "payware.payware.doctype.biometric_settings.biometric_settings.auto_make_employee_checkin", - ] - # "weekly": [ - # "payware.tasks.weekly" - # ] - # "monthly": [ - # "payware.tasks.monthly" - # ] -} +# scheduler_events = { +# "all": [ +# "payware.tasks.all" +# ], +# "daily": [ +# "payware.tasks.weekly" +# ], +# "hourly": [ +# "payware.tasks.weekly" +# ] +# "weekly": [ +# "payware.tasks.weekly" +# ] +# "monthly": [ +# "payware.tasks.monthly" +# ] +# } # Testing # ------- @@ -249,3 +120,8 @@ # override_whitelisted_methods = { # "frappe.desk.doctype.event.event.get_events": "payware.event.get_events" # } + +# Uninstallation +# ------------ + +before_uninstall = "payware.before_uninstall.before_uninstall" diff --git a/payware/payroll_entry.py b/payware/payroll_entry.py deleted file mode 100644 index ad4a3cb..0000000 --- a/payware/payroll_entry.py +++ /dev/null @@ -1,564 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors -# For license information, please see license.txt - -from __future__ import unicode_literals -import frappe -from frappe.model.document import Document -from dateutil.relativedelta import relativedelta -from frappe.utils import cint, flt, nowdate, add_days, getdate, fmt_money, add_to_date, DATE_FORMAT, date_diff -from frappe import _ -from erpnext.accounts.utils import get_fiscal_year -from erpnext.hr.doctype.employee.employee import get_holiday_list_for_employee - -class PayrollEntry(Document): - def on_submit(self): - self.create_salary_slips() - - def before_submit(self): - if self.validate_attendance: - if self.validate_employee_attendance(): - frappe.throw(_("Cannot Submit, Employees left to mark attendance")) - - def get_emp_list(self): - """ - Returns list of active employees based on selected criteria - and for which salary structure exists - """ - cond = self.get_filter_condition() - cond += self.get_joining_releiving_condition() - - condition = '' - if self.payroll_frequency: - condition = """and payroll_frequency = '%(payroll_frequency)s'"""% {"payroll_frequency": self.payroll_frequency} - - sal_struct = frappe.db.sql_list(""" - select - name from `tabSalary Structure` - where - docstatus = 1 and - is_active = 'Yes' - and company = %(company)s and - ifnull(salary_slip_based_on_timesheet,0) = %(salary_slip_based_on_timesheet)s - {condition}""".format(condition=condition), - {"company": self.company, "salary_slip_based_on_timesheet":self.salary_slip_based_on_timesheet}) - if sal_struct: - cond += "and t2.salary_structure IN %(sal_struct)s " - cond += "and %(from_date)s >= t2.from_date" - emp_list = frappe.db.sql(""" - select - distinct t1.name as employee, t1.employee_name, t1.department, t1.designation - from - `tabEmployee` t1, `tabSalary Structure Assignment` t2 - where - t1.name = t2.employee - and t2.docstatus = 1 - %s order by t2.from_date desc - """ % cond, {"sal_struct": tuple(sal_struct), "from_date": self.end_date}, as_dict=True) - return emp_list - - def fill_employee_details(self): - self.set('employees', []) - employees = self.get_emp_list() - if not employees: - frappe.throw(_("No employees for the mentioned criteria")) - - for d in employees: - self.append('employees', d) - - self.number_of_employees = len(employees) - if self.validate_attendance: - return self.validate_employee_attendance() - - def get_filter_condition(self): - self.check_mandatory() - - cond = '' - for f in ['company', 'branch', 'department', 'designation']: - if self.get(f): - cond += " and t1." + f + " = '" + self.get(f).replace("'", "\'") + "'" - - return cond - - def get_joining_releiving_condition(self): - cond = """ - and ifnull(t1.date_of_joining, '0000-00-00') <= '%(end_date)s' - and ifnull(t1.relieving_date, '2199-12-31') >= '%(start_date)s' - """ % {"start_date": self.start_date, "end_date": self.end_date} - return cond - - def check_mandatory(self): - for fieldname in ['company', 'start_date', 'end_date']: - if not self.get(fieldname): - frappe.throw(_("Please set {0}").format(self.meta.get_label(fieldname))) - - def create_salary_slips(self): - """ - Creates salary slip for selected employees if already not created - """ - self.check_permission('write') - self.created = 1 - emp_list = [d.employee for d in self.get_emp_list()] - if emp_list: - args = frappe._dict({ - "salary_slip_based_on_timesheet": self.salary_slip_based_on_timesheet, - "payroll_frequency": self.payroll_frequency, - "start_date": self.start_date, - "end_date": self.end_date, - "company": self.company, - "posting_date": self.posting_date, - "deduct_tax_for_unclaimed_employee_benefits": self.deduct_tax_for_unclaimed_employee_benefits, - "deduct_tax_for_unsubmitted_tax_exemption_proof": self.deduct_tax_for_unsubmitted_tax_exemption_proof, - "payroll_entry": self.name - }) - if len(emp_list) > 30: - frappe.enqueue(create_salary_slips_for_employees, timeout=600, employees=emp_list, args=args) - else: - create_salary_slips_for_employees(emp_list, args, publish_progress=False) - - def get_sal_slip_list(self, ss_status, as_dict=False): - """ - Returns list of salary slips based on selected criteria - """ - cond = self.get_filter_condition() - - ss_list = frappe.db.sql(""" - select t1.name, t1.salary_structure from `tabSalary Slip` t1 - where t1.docstatus = %s and t1.start_date >= %s and t1.end_date <= %s - and (t1.journal_entry is null or t1.journal_entry = "") and ifnull(salary_slip_based_on_timesheet,0) = %s %s - """ % ('%s', '%s', '%s','%s', cond), (ss_status, self.start_date, self.end_date, self.salary_slip_based_on_timesheet), as_dict=as_dict) - return ss_list - - def submit_salary_slips(self): - self.check_permission('write') - ss_list = self.get_sal_slip_list(ss_status=0) - if len(ss_list) > 30: - frappe.enqueue(submit_salary_slips_for_employees, timeout=600, payroll_entry=self, salary_slips=ss_list) - else: - submit_salary_slips_for_employees(self, ss_list, publish_progress=False) - - def email_salary_slip(self, submitted_ss): - if frappe.db.get_single_value("HR Settings", "email_salary_slip_to_employee"): - for ss in submitted_ss: - ss.email_salary_slip() - - def get_loan_details(self): - """ - Get loan details from submitted salary slip based on selected criteria - """ - cond = self.get_filter_condition() - return frappe.db.sql(""" select eld.loan_account, eld.loan, - eld.interest_income_account, eld.principal_amount, eld.interest_amount, eld.total_payment - from - `tabSalary Slip` t1, `tabSalary Slip Loan` eld - where - t1.docstatus = 1 and t1.name = eld.parent and start_date >= %s and end_date <= %s %s - """ % ('%s', '%s', cond), (self.start_date, self.end_date), as_dict=True) or [] - - def get_salary_component_account(self, salary_component): - account = frappe.db.get_value("Salary Component Account", - {"parent": salary_component, "company": self.company}, "default_account") - - if not account: - frappe.throw(_("Please set default account in Salary Component {0}") - .format(salary_component)) - - return account - - def get_salary_components(self, component_type): - salary_slips = self.get_sal_slip_list(ss_status = 1, as_dict = True) - if salary_slips: - salary_components = frappe.db.sql("""select salary_component, amount, parentfield - from `tabSalary Detail` where parentfield = '%s' and parent in (%s)""" % - (component_type, ', '.join(['%s']*len(salary_slips))), tuple([d.name for d in salary_slips]), as_dict=True) - return salary_components - - def get_salary_component_total(self, component_type = None): - salary_components = self.get_salary_components(component_type) - if salary_components: - component_dict = {} - for item in salary_components: - add_component_to_accrual_jv_entry = True - if component_type == "earnings": - is_flexible_benefit, only_tax_impact = frappe.db.get_value("Salary Component", item['salary_component'], ['is_flexible_benefit', 'only_tax_impact']) - if is_flexible_benefit == 1 and only_tax_impact ==1: - add_component_to_accrual_jv_entry = False - if add_component_to_accrual_jv_entry: - component_dict[item['salary_component']] = component_dict.get(item['salary_component'], 0) + item['amount'] - account_details = self.get_account(component_dict = component_dict) - return account_details - - def get_account(self, component_dict = None): - account_dict = {} - for s, a in component_dict.items(): - account = self.get_salary_component_account(s) - account_dict[account] = account_dict.get(account, 0) + a - return account_dict - - def get_default_payroll_payable_account(self): - payroll_payable_account = frappe.get_cached_value('Company', - {"company_name": self.company}, "default_payroll_payable_account") - - if not payroll_payable_account: - frappe.throw(_("Please set Default Payroll Payable Account in Company {0}") - .format(self.company)) - - return payroll_payable_account - - def make_accrual_jv_entry(self): - self.check_permission('write') - earnings = self.get_salary_component_total(component_type = "earnings") or {} - deductions = self.get_salary_component_total(component_type = "deductions") or {} - default_payroll_payable_account = self.get_default_payroll_payable_account() - loan_details = self.get_loan_details() - jv_name = "" - precision = frappe.get_precision("Journal Entry Account", "debit_in_account_currency") - - if earnings or deductions: - journal_entry = frappe.new_doc('Journal Entry') - journal_entry.voucher_type = 'Journal Entry' - journal_entry.user_remark = _('Accrual Journal Entry for salaries from {0} to {1}')\ - .format(self.start_date, self.end_date) - journal_entry.company = self.company - journal_entry.posting_date = self.posting_date - - accounts = [] - payable_amount = 0 - - # Earnings - for acc, amount in earnings.items(): - payable_amount += flt(amount, precision) - accounts.append({ - "account": acc, - "debit_in_account_currency": flt(amount, precision), - "cost_center": self.cost_center, - "project": self.project - }) - - # Deductions - for acc, amount in deductions.items(): - payable_amount -= flt(amount, precision) - accounts.append({ - "account": acc, - "credit_in_account_currency": flt(amount, precision), - "cost_center": self.cost_center, - "project": self.project - }) - - # Loan - for data in loan_details: - accounts.append({ - "account": data.loan_account, - "credit_in_account_currency": data.principal_amount, - "reference_type": "Loan", - "reference_name": data.loan - }) - - if data.interest_amount and not data.interest_income_account: - frappe.throw(_("Select interest income account in loan {0}").format(data.loan)) - - if data.interest_income_account and data.interest_amount: - accounts.append({ - "account": data.interest_income_account, - "credit_in_account_currency": data.interest_amount, - "cost_center": self.cost_center, - "project": self.project - }) - payable_amount -= flt(data.total_payment, precision) - - # Payable amount - accounts.append({ - "account": default_payroll_payable_account, - "credit_in_account_currency": flt(payable_amount, precision) - }) - - journal_entry.set("accounts", accounts) - journal_entry.title = default_payroll_payable_account - journal_entry.save() - - try: - journal_entry.submit() - jv_name = journal_entry.name - self.update_salary_slip_status(jv_name = jv_name) - except Exception as e: - frappe.msgprint(e) - - return jv_name - - def make_payment_entry(self): - self.check_permission('write') - - cond = self.get_filter_condition() - salary_slip_name_list = frappe.db.sql(""" select t1.name from `tabSalary Slip` t1 - where t1.docstatus = 1 and start_date >= %s and end_date <= %s %s - """ % ('%s', '%s', cond), (self.start_date, self.end_date), as_list = True) - - if salary_slip_name_list and len(salary_slip_name_list) > 0: - salary_slip_total = 0 - for salary_slip_name in salary_slip_name_list: - salary_slip = frappe.get_doc("Salary Slip", salary_slip_name[0]) - for sal_detail in salary_slip.earnings: - is_flexible_benefit, only_tax_impact, creat_separate_je, statistical_component = frappe.db.get_value("Salary Component", sal_detail.salary_component, - ['is_flexible_benefit', 'only_tax_impact', 'create_separate_payment_entry_against_benefit_claim', 'statistical_component']) - if only_tax_impact != 1 and statistical_component != 1: - if is_flexible_benefit == 1 and creat_separate_je == 1: - self.create_journal_entry(sal_detail.amount, sal_detail.salary_component) - else: - salary_slip_total += sal_detail.amount - for sal_detail in salary_slip.deductions: - statistical_component = frappe.db.get_value("Salary Component", sal_detail.salary_component, 'statistical_component') - if statistical_component != 1: - salary_slip_total -= sal_detail.amount - if salary_slip_total > 0: - self.create_journal_entry(salary_slip_total, "salary") - - def create_journal_entry(self, je_payment_amount, user_remark): - default_payroll_payable_account = self.get_default_payroll_payable_account() - precision = frappe.get_precision("Journal Entry Account", "debit_in_account_currency") - - journal_entry = frappe.new_doc('Journal Entry') - journal_entry.voucher_type = 'Bank Entry' - journal_entry.user_remark = _('Payment of {0} from {1} to {2}')\ - .format(user_remark, self.start_date, self.end_date) - journal_entry.company = self.company - journal_entry.posting_date = self.posting_date - - payment_amount = flt(je_payment_amount, precision) - - journal_entry.set("accounts", [ - { - "account": self.payment_account, - "credit_in_account_currency": payment_amount - }, - { - "account": default_payroll_payable_account, - "debit_in_account_currency": payment_amount, - "reference_type": self.doctype, - "reference_name": self.name - } - ]) - journal_entry.save(ignore_permissions = True) - - def update_salary_slip_status(self, jv_name = None): - ss_list = self.get_sal_slip_list(ss_status=1) - for ss in ss_list: - ss_obj = frappe.get_doc("Salary Slip",ss[0]) - frappe.db.set_value("Salary Slip", ss_obj.name, "journal_entry", jv_name) - - def set_start_end_dates(self): - self.update(get_start_end_dates(self.payroll_frequency, - self.start_date or self.posting_date, self.company)) - - def validate_employee_attendance(self): - employees_to_mark_attendance = [] - days_in_payroll, days_holiday, days_attendance_marked = 0, 0, 0 - for employee_detail in self.employees: - days_holiday = self.get_count_holidays_of_employee(employee_detail.employee) - days_attendance_marked = self.get_count_employee_attendance(employee_detail.employee) - days_in_payroll = date_diff(self.end_date, self.start_date) + 1 - if days_in_payroll > days_holiday + days_attendance_marked: - employees_to_mark_attendance.append({ - "employee": employee_detail.employee, - "employee_name": employee_detail.employee_name - }) - return employees_to_mark_attendance - - def get_count_holidays_of_employee(self, employee): - holiday_list = get_holiday_list_for_employee(employee) - holidays = 0 - if holiday_list: - days = frappe.db.sql("""select count(*) from tabHoliday where - parent=%s and holiday_date between %s and %s""", (holiday_list, - self.start_date, self.end_date)) - if days and days[0][0]: - holidays = days[0][0] - return holidays - - def get_count_employee_attendance(self, employee): - marked_days = 0 - attendances = frappe.db.sql("""select count(*) from tabAttendance where - employee=%s and docstatus=1 and attendance_date between %s and %s""", - (employee, self.start_date, self.end_date)) - if attendances and attendances[0][0]: - marked_days = attendances[0][0] - return marked_days - -@frappe.whitelist() -def get_start_end_dates(payroll_frequency, start_date=None, company=None): - '''Returns dict of start and end dates for given payroll frequency based on start_date''' - - if payroll_frequency == "Monthly" or payroll_frequency == "Bimonthly" or payroll_frequency == "": - fiscal_year = get_fiscal_year(start_date, company=company)[0] - month = "%02d" % getdate(start_date).month - m = get_month_details(fiscal_year, month) - if payroll_frequency == "Bimonthly": - if getdate(start_date).day <= 15: - start_date = m['month_start_date'] - end_date = m['month_mid_end_date'] - else: - start_date = m['month_mid_start_date'] - end_date = m['month_end_date'] - else: - start_date = m['month_start_date'] - end_date = m['month_end_date'] - - if payroll_frequency == "Weekly": - end_date = add_days(start_date, 6) - - if payroll_frequency == "Fortnightly": - end_date = add_days(start_date, 13) - - if payroll_frequency == "Daily": - end_date = start_date - - return frappe._dict({ - 'start_date': start_date, 'end_date': end_date - }) - - -def get_frequency_kwargs(frequency_name): - frequency_dict = { - 'monthly': {'months': 1}, - 'fortnightly': {'days': 14}, - 'weekly': {'days': 7}, - 'daily': {'days': 1} - } - return frequency_dict.get(frequency_name) - - -@frappe.whitelist() -def get_end_date(start_date, frequency): - start_date = getdate(start_date) - frequency = frequency.lower() if frequency else 'monthly' - kwargs = get_frequency_kwargs(frequency) if frequency != 'bimonthly' else get_frequency_kwargs('monthly') - - # weekly, fortnightly and daily intervals have fixed days so no problems - end_date = add_to_date(start_date, **kwargs) - relativedelta(days=1) - if frequency != 'bimonthly': - return dict(end_date=end_date.strftime(DATE_FORMAT)) - - else: - return dict(end_date='') - - -def get_month_details(year, month): - ysd = frappe.db.get_value("Fiscal Year", year, "year_start_date") - if ysd: - import calendar, datetime - diff_mnt = cint(month)-cint(ysd.month) - if diff_mnt<0: - diff_mnt = 12-int(ysd.month)+cint(month) - msd = ysd + relativedelta(months=diff_mnt) # month start date - month_days = cint(calendar.monthrange(cint(msd.year) ,cint(month))[1]) # days in month - mid_start = datetime.date(msd.year, cint(month), 16) # month mid start date - mid_end = datetime.date(msd.year, cint(month), 15) # month mid end date - med = datetime.date(msd.year, cint(month), month_days) # month end date - return frappe._dict({ - 'year': msd.year, - 'month_start_date': msd, - 'month_end_date': med, - 'month_mid_start_date': mid_start, - 'month_mid_end_date': mid_end, - 'month_days': month_days - }) - else: - frappe.throw(_("Fiscal Year {0} not found").format(year)) - -def get_payroll_entry_bank_entries(payroll_entry_name): - journal_entries = frappe.db.sql( - 'select name from `tabJournal Entry Account` ' - 'where reference_type="Payroll Entry" ' - 'and reference_name=%s and docstatus=1', - payroll_entry_name, - as_dict=1 - ) - - return journal_entries - - -@frappe.whitelist() -def payroll_entry_has_bank_entries(name): - response = {} - bank_entries = get_payroll_entry_bank_entries(name) - response['submitted'] = 1 if bank_entries else 0 - - return response - -def create_salary_slips_for_employees(employees, args, publish_progress=True): - salary_slips_exists_for = get_existing_salary_slips(employees, args) - count=0 - for emp in employees: - if emp not in salary_slips_exists_for: - args.update({ - "doctype": "Salary Slip", - "employee": emp - }) - ss = frappe.get_doc(args) - ss.insert() - count+=1 - if publish_progress: - frappe.publish_progress(count*100/len(set(employees) - set(salary_slips_exists_for)), - title = _("Creating Salary Slips...")) - - payroll_entry = frappe.get_doc("Payroll Entry", args.payroll_entry) - payroll_entry.db_set("salary_slips_created", 1) - payroll_entry.notify_update() - -def get_existing_salary_slips(employees, args): - return frappe.db.sql_list(""" - select distinct employee from `tabSalary Slip` - where docstatus!= 2 and company = %s - and start_date >= %s and end_date <= %s - and employee in (%s) - """ % ('%s', '%s', '%s', ', '.join(['%s']*len(employees))), - [args.company, args.start_date, args.end_date] + employees) - -def submit_salary_slips_for_employees(payroll_entry, salary_slips, publish_progress=True): - submitted_ss = [] - not_submitted_ss = [] - frappe.flags.via_payroll_entry = True - - count = 0 - for ss in salary_slips: - ss_obj = frappe.get_doc("Salary Slip",ss[0]) - if ss_obj.net_pay<0: - not_submitted_ss.append(ss[0]) - else: - try: - ss_obj.submit() - submitted_ss.append(ss_obj) - except frappe.ValidationError: - not_submitted_ss.append(ss[0]) - - count += 1 - if publish_progress: - frappe.publish_progress(count*100/len(salary_slips), title = _("Submitting Salary Slips...")) - - if submitted_ss: - payroll_entry.make_accrual_jv_entry() - frappe.msgprint(_("Salary Slip submitted for period from {0} to {1}") - .format(ss_obj.start_date, ss_obj.end_date)) - - payroll_entry.email_salary_slip(submitted_ss) - - payroll_entry.db_set("salary_slips_submitted", 1) - payroll_entry.notify_update() - - if not submitted_ss and not not_submitted_ss: - frappe.msgprint(_("No salary slip found to submit for the above selected criteria OR salary slip already submitted")) - - if not_submitted_ss: - frappe.msgprint(_("Could not submit some Salary Slips")) - -def get_payroll_entries_for_jv(doctype, txt, searchfield, start, page_len, filters): - return frappe.db.sql(""" - select name from `tabPayroll Entry` - where `{key}` LIKE %(txt)s - and name not in - (select reference_name from `tabJournal Entry Account` - where reference_type="Payroll Entry") - order by name limit %(start)s, %(page_len)s""" - .format(key=searchfield), { - 'txt': "%%%s%%" % frappe.db.escape(txt), - 'start': start, 'page_len': page_len - }) diff --git a/payware/payware/doctype/area/area.js b/payware/payware/doctype/area/area.js deleted file mode 100644 index 9409392..0000000 --- a/payware/payware/doctype/area/area.js +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright (c) 2020, Aakvatech and contributors -// For license information, please see license.txt - -frappe.ui.form.on('Area', { - // refresh: function(frm) { - - // } -}); diff --git a/payware/payware/doctype/area/area.json b/payware/payware/doctype/area/area.json deleted file mode 100644 index 6bc6a1f..0000000 --- a/payware/payware/doctype/area/area.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "autoname": "field:area", - "creation": "2020-01-04 06:09:49.480440", - "doctype": "DocType", - "editable_grid": 1, - "engine": "InnoDB", - "field_order": [ - "area", - "area_code" - ], - "fields": [ - { - "fieldname": "area", - "fieldtype": "Data", - "label": "Area", - "unique": 1 - }, - { - "fieldname": "area_code", - "fieldtype": "Data", - "in_list_view": 1, - "label": "Area Code" - } - ], - "modified": "2020-01-05 01:43:19.770675", - "modified_by": "Administrator", - "module": "Payware", - "name": "Area", - "owner": "Administrator", - "permissions": [ - { - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "System Manager", - "share": 1, - "write": 1 - } - ], - "quick_entry": 1, - "sort_field": "modified", - "sort_order": "DESC", - "track_changes": 1 -} \ No newline at end of file diff --git a/payware/payware/doctype/area/area.py b/payware/payware/doctype/area/area.py deleted file mode 100644 index c3390b2..0000000 --- a/payware/payware/doctype/area/area.py +++ /dev/null @@ -1,10 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright (c) 2020, Aakvatech and contributors -# For license information, please see license.txt - -from __future__ import unicode_literals -# import frappe -from frappe.model.document import Document - -class Area(Document): - pass diff --git a/payware/payware/doctype/area/test_area.py b/payware/payware/doctype/area/test_area.py deleted file mode 100644 index 5c5e805..0000000 --- a/payware/payware/doctype/area/test_area.py +++ /dev/null @@ -1,10 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright (c) 2020, Aakvatech and Contributors -# See license.txt -from __future__ import unicode_literals - -# import frappe -import unittest - -class TestArea(unittest.TestCase): - pass diff --git a/payware/payware/doctype/biometric_settings/__init__.py b/payware/payware/doctype/biometric_settings/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/payware/payware/doctype/biometric_settings/biometric_settings.js b/payware/payware/doctype/biometric_settings/biometric_settings.js deleted file mode 100644 index dfeb361..0000000 --- a/payware/payware/doctype/biometric_settings/biometric_settings.js +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) 2020, Aakvatech and contributors -// For license information, please see license.txt - -frappe.ui.form.on('Biometric Settings', { - get_token: function(frm) { - frappe.call({ - method: 'payware.payware.doctype.biometric_settings.biometric_settings.get_new_bio_token', - callback: (r) => { - - cur_frm.set_value("bio_token", r.message); - - } - }); - }, - - get_transactions: function(frm) { - frappe.call({ - method: 'payware.payware.doctype.biometric_settings.biometric_settings.get_transactions', - args:{ - "start_time":frm.doc.start_time, - "end_time":frm.doc.end_time, - }, - callback: (r) => { - if (r.message){ - // console.log(r.message); - frappe.msgprint(r.message); - } - - } - }); - }, - make_employee_checkin: function(frm) { - frappe.call({ - method: 'payware.payware.doctype.biometric_settings.biometric_settings.make_employee_checkin', - - callback: (r) => { - if (r.message){ - // console.log(r.message); - frappe.msgprint(r.message); - } - - } - }); - } - - -}); diff --git a/payware/payware/doctype/biometric_settings/biometric_settings.json b/payware/payware/doctype/biometric_settings/biometric_settings.json deleted file mode 100644 index ab73d00..0000000 --- a/payware/payware/doctype/biometric_settings/biometric_settings.json +++ /dev/null @@ -1,172 +0,0 @@ -{ - "creation": "2020-01-04 03:29:41.477810", - "doctype": "DocType", - "editable_grid": 1, - "engine": "InnoDB", - "field_order": [ - "enable_biometric_master", - "section_break_2", - "server_url", - "user_name", - "password", - "get_token", - "bio_token", - "column_break_6", - "department", - "area_code", - "default_shift_type", - "section_break_10", - "auto_transactions", - "column_break_12", - "auto_checkin", - "column_break_14", - "auto_shift", - "transactions_section", - "start_time", - "end_time", - "get_transactions", - "section_break_13", - "make_employee_checkin" - ], - "fields": [ - { - "fieldname": "server_url", - "fieldtype": "Data", - "label": " Server URL" - }, - { - "fieldname": "user_name", - "fieldtype": "Data", - "label": "User Name" - }, - { - "fieldname": "password", - "fieldtype": "Data", - "label": "Password" - }, - { - "fieldname": "get_token", - "fieldtype": "Button", - "label": "Get Token" - }, - { - "fieldname": "bio_token", - "fieldtype": "Data", - "label": "Bio Token", - "read_only": 1 - }, - { - "fieldname": "column_break_6", - "fieldtype": "Column Break" - }, - { - "default": "1", - "fieldname": "department", - "fieldtype": "Int", - "label": "Default Department Code" - }, - { - "default": "1", - "fieldname": "area_code", - "fieldtype": "Int", - "label": "Default Area Code" - }, - { - "fieldname": "transactions_section", - "fieldtype": "Section Break", - "label": "Transactions" - }, - { - "fieldname": "get_transactions", - "fieldtype": "Button", - "label": "Get Transactions" - }, - { - "fieldname": "start_time", - "fieldtype": "Datetime", - "label": "Start Time" - }, - { - "fieldname": "end_time", - "fieldtype": "Datetime", - "label": "End Time" - }, - { - "fieldname": "section_break_13", - "fieldtype": "Section Break" - }, - { - "fieldname": "make_employee_checkin", - "fieldtype": "Button", - "label": "Make Employee Checkin" - }, - { - "fieldname": "default_shift_type", - "fieldtype": "Link", - "label": "Default Shift Type", - "options": "Shift Type" - }, - { - "fieldname": "section_break_10", - "fieldtype": "Section Break" - }, - { - "default": "0", - "fieldname": "auto_transactions", - "fieldtype": "Check", - "label": "Enable Auto Transactions" - }, - { - "fieldname": "column_break_12", - "fieldtype": "Column Break" - }, - { - "default": "0", - "fieldname": "auto_checkin", - "fieldtype": "Check", - "label": "Enable Auto Employee Checkin" - }, - { - "fieldname": "column_break_14", - "fieldtype": "Column Break" - }, - { - "default": "0", - "fieldname": "auto_shift", - "fieldtype": "Check", - "label": "Enable Auto Shift Assignment" - }, - { - "default": "0", - "fieldname": "enable_biometric_master", - "fieldtype": "Check", - "label": "Enable Biometric Attendance" - }, - { - "fieldname": "section_break_2", - "fieldtype": "Section Break" - } - ], - "issingle": 1, - "modified": "2020-01-13 23:21:09.116759", - "modified_by": "yousef@dsr.com", - "module": "Payware", - "name": "Biometric Settings", - "owner": "Administrator", - "permissions": [ - { - "create": 1, - "delete": 1, - "email": 1, - "print": 1, - "read": 1, - "role": "System Manager", - "share": 1, - "write": 1 - } - ], - "quick_entry": 1, - "sort_field": "modified", - "sort_order": "DESC", - "track_changes": 1 -} \ No newline at end of file diff --git a/payware/payware/doctype/biometric_settings/biometric_settings.py b/payware/payware/doctype/biometric_settings/biometric_settings.py deleted file mode 100644 index 686fcae..0000000 --- a/payware/payware/doctype/biometric_settings/biometric_settings.py +++ /dev/null @@ -1,511 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright (c) 2020, Aakvatech and contributors -# For license information, please see license.txt - -from __future__ import unicode_literals -import frappe -from frappe.model.document import Document -from frappe import _ -import requests -from requests.exceptions import Timeout -import json -from frappe.utils import today, get_datetime, add_to_date, getdate - - -class BiometricSettings(Document): - pass - - -def get_url(): - if frappe.db.get_value("Biometric Settings", None, "server_url"): - url = frappe.db.get_value("Biometric Settings", None, "server_url") - return url - else: - frappe.throw(_("Please set server URL")) - -def get_bio_token(): - if frappe.db.get_value("Biometric Settings", None, "bio_token"): - bio_token = frappe.db.get_value("Biometric Settings", None, "bio_token") - return bio_token - else: - frappe.throw(_("Please make sure you have Bio Token")) - -def get_headers(): - headers = {'Authorization': "Token " + get_bio_token()} - return headers - -def get_user_name(): - if frappe.db.get_value("Biometric Settings", None, "user_name"): - user_name = frappe.db.get_value("Biometric Settings", None, "user_name") - return user_name - else: - frappe.throw(_("Please set User Name")) - -def get_password(): - if frappe.db.get_value("Biometric Settings", None, "password"): - password = frappe.db.get_value("Biometric Settings", None, "password") - return password - else: - frappe.throw(_("Please set Password")) - -def get_default_shift_type(): - if frappe.db.get_value("Biometric Settings", None, "default_shift_type"): - default_shift_type = frappe.db.get_value("Biometric Settings", None, "default_shift_type") - return default_shift_type - else: - frappe.throw(_("Please set the Default Shift Type")) - -def get_employee_default_shift(employee_name= None): - if not employee_name: - return - else: - if frappe.db.get_value("Employee", employee_name, "default_shift"): - default_shift_type = frappe.db.get_value("Employee", employee_name, "default_shift") - return default_shift_type - -def get_shift_type(employee_name=None): - if not employee_name: - get_default_shift_type() - else: - if get_employee_default_shift(employee_name): - return get_employee_default_shift(employee_name) - else: - return get_default_shift_type() - - -def get_department(): - if frappe.db.get_value("Biometric Settings", None, "department"): - department = frappe.db.get_value("Biometric Settings", None, "department") - if department == 0: - frappe.throw(_("Please set Default Department Code Other than 0")) - else: - return department - else: - frappe.throw(_("Please set Default Department Code")) - -def get_area_code(): - if frappe.db.get_value("Biometric Settings", None, "area_code"): - area_code = [frappe.db.get_value("Biometric Settings", None, "area_code")] - if area_code == [0] : - frappe.throw(_("Please set Default Area Code Other than 0")) - else: - return area_code - else: - frappe.throw(_("Please set Default Area Code")) - -def get_employee_name_id(id): - if id : - employee_name_list = frappe.db.sql_list("""select name from `tabEmployee` - where biometric_id=%s """, (id)) - if employee_name_list: - employee_name = employee_name_list[0] - return employee_name - else: - frappe.throw(_("No employee has this identity: ") + str(id)) - - -def check_master_enable(): - enable_biometric_master = frappe.db.get_value("Biometric Settings", None, "enable_biometric_master") or 0 - if int(enable_biometric_master) == 1: - return True - else: - return False - - -def check_employee_enable(emp): - if frappe.db.get_value("Employee", emp, "enable_biometric"): - enable_biometric = frappe.db.get_value("Employee", emp, "enable_biometric") - if int(enable_biometric) == 1: - return True - else: - return False - else: - return False - - -@frappe.whitelist() -def auto_shift_assignment_for_active_today(): - if check_master_enable(): - auto_shift = frappe.db.get_value("Biometric Settings", None, "auto_shift") - if int(auto_shift) == 1: - creat_shift_assignment_for_active_today() - - -@frappe.whitelist() -def auto_make_employee_checkin(): - if check_master_enable(): - auto_checkin = frappe.db.get_value("Biometric Settings", None, "auto_checkin") - if int(auto_checkin) == 1: - make_employee_checkin() - - -@frappe.whitelist() -def auto_get_transactions(): - if check_master_enable(): - auto_transactions = frappe.db.get_value("Biometric Settings", None, "auto_transactions") - if int(auto_transactions) == 1: - get_transactions() - - - -@frappe.whitelist() -def get_new_bio_token(): - url = get_url() + "/api-token-auth/" - data = { - "username": get_user_name(), - "password": get_password() - } - response = requests.post(url = url, data = data) - if response.status_code == 200 : - res = json.loads(response.text) - bio_token = res["token"] - return bio_token - else: - frappe.throw(_("Please double check your username, password and URL")) - - -@frappe.whitelist() -def check_employee_bio_info(doc, method): - if check_master_enable() and check_employee_enable(doc.name): - if doc.company: - abbr = frappe.get_cached_value('Company', doc.company, 'abbr') - if doc.name : - emp_code = abbr + "-" + doc.name - if doc.biometric_id: - biometric_id = doc.biometric_id - url = get_url() + "/personnel/api/employees/" + biometric_id +"/" - try: - response = requests.get(url = url, headers = get_headers(), timeout=5) - except Timeout: - frappe.msgprint(_("Error Please check Biotime server Request timeout")) - else: - if response.status_code == 200 : - res = json.loads(response.text) - emp_id = str(res["id"]) - doc.biometric_id = emp_id - if not doc.biometric_code: - doc.biometric_code = str(res["emp_code"]) - if not doc.area: - for area_item in res["area"]: - area_row = doc.append('area',{}) - area_row.area = area_item['area_name'] - area_row.area_code = area_item['area_code'] - update_employee_bio(doc,emp_id) - else: - add_employee_bio(doc,emp_code) - else: - add_employee_bio(doc,emp_code) - - -def add_employee_bio(doc,emp_code): - if doc.name : - if doc.area: - area = [] - for row in doc.area: - area_row = row.area_code - area.append(area_row) - else: - area = get_area_code() - url = get_url() + "/personnel/api/employees/" - data ={ - "emp_code": emp_code, - "first_name": doc.employee_name, - "area": area, - "department": get_department() - } - try: - response = requests.post(url = url, headers = get_headers(), data = data, timeout = 5) - except Timeout: - frappe.msgprint(_("Error Please check Biotime server Request timeout")) - else: - if response.status_code == 200 or response.status_code == 201 : - res = json.loads(response.text) - first_name = res["first_name"] - emp_id = res["id"] - doc.biometric_id = emp_id - doc.biometric_code = emp_code - frappe.msgprint(_("Creatin Employee biometric ") + str(emp_code)) - return emp_id - else: - frappe.throw(_("Error Creating Employee biometric ")) - - -def update_employee_bio(doc,emp_id): - if doc.name : - if doc.area: - area = [] - for row in doc.area: - area_row = row.area_code - area.append(area_row) - else: - area = get_area_code() - url = get_url() + "/personnel/api/employees/" + emp_id +"/" - data ={ - "first_name": doc.employee_name, - "emp_code": doc.biometric_code, - "area": area, - "department": get_department() - } - try: - response = requests.patch(url = url, headers = get_headers(), data = data, timeout=5) - except Timeout: - frappe.msgprint(_("Error Please check Biotime server Request timeout")) - else: - if response.status_code == 200 : - return emp_id - else: - frappe.throw(_("Error Updating Employee biometric info ") +emp_id) - - - -def check_transactions_id_is_unique(id): - if id : - names = frappe.db.sql_list("""select name from `tabTransactions Log` - where id=%s """, (id)) - if names: - return False - else: - return True - - -def update_default_shift_type_last_sync(name,datetime): - frappe.db.set_value("Shift Type", name, "last_sync_of_checkin", datetime) - - -@frappe.whitelist() -def get_transactions(start_time= None,end_time=None): - if check_master_enable(): - if not start_time: - start_time = today() - if not end_time: - end_time = str(get_datetime()) - if str(get_datetime(start_time)) == end_time: - start_time = add_to_date(start_time,days=-1) - space = "\n" * 2 - tf_log_name = creat_transaction_fetch_log(start_time,end_time) - start = "start_time=" + start_time - end = "end_time=" + end_time - url = get_url() + "/iclock/api/transactions/?" + start + "&" + end - try: - response = requests.get(url = url, headers = get_headers(), timeout=5) - except Timeout: - tf_log_doc = frappe.get_doc("Transaction Fetch Log",tf_log_name) - tf_log_doc.status = "Error" - if not tf_log_doc.log: - tf_log_doc.log = "" - tf_log_doc.log = tf_log_doc.log + space + str("Timeout Eroor") - tf_log_doc.save() - return "Error" - else: - if response.status_code == 200 : - res = json.loads(response.text) - count = res["count"] - get_transaction_pages(count,start_time,end_time,tf_log_name) - tf_log_doc = frappe.get_doc("Transaction Fetch Log",tf_log_name) - tf_log_doc.status = "Success" - tf_log_doc.save() - return "Success" - - else: - tf_log_doc.status = "Error" - res = json.loads(response.text) - if not tf_log_doc.log: - tf_log_doc.log = "" - tf_log_doc.log = tf_log_doc.log + space + str(res) - tf_log_doc.save() - return "Error" - - -def get_transaction_pages(count,start_time,end_time,tf_log_name): - unique_list = [] - repeated_list =[] - space = "\n" * 2 - tf_log_doc = frappe.get_doc("Transaction Fetch Log",tf_log_name) - if count%10 : - times = count//10 + 1 - else: - times = count//10 - n = 1 - tf_log_doc.count = count - tf_log_doc.page = times - tf_log_doc.save() - while n <= times: - start = "start_time=" + start_time - end = "end_time=" + end_time - page ="page=" + str(n) - url = get_url() + "/iclock/api/transactions/?" + start + "&" + end + "&" + page - response = requests.get(url = url, headers = get_headers()) - if response.status_code == 200 : - res = json.loads(response.text) - data = res["data"] - creat_transaction_log(data,tf_log_name,unique_list,repeated_list) - else: - res = json.loads(response.text) - tf_log_doc = frappe.get_doc("Transaction Fetch Log",tf_log_name) - tf_log_doc.status = "Error" - if not tf_log_doc.log: - tf_log_doc.log = "" - tf_log_doc.log = tf_log_doc.log + space + str(res) - tf_log_doc.save() - n += 1 - tf_log_doc = frappe.get_doc("Transaction Fetch Log",tf_log_name) - if not tf_log_doc.log: - tf_log_doc.log = "" - if unique_list: - tf_log_doc.log = tf_log_doc.log + space + " Unique Recorde ID : " + str(unique_list) - if repeated_list: - tf_log_doc.log = tf_log_doc.log + space + " Repeated Recorde ID : " + str(repeated_list) - tf_log_doc.save() - - -def creat_transaction_fetch_log(start_time,end_time,times=None,count=None): - transaction_fetch_log_doc = frappe.get_doc(dict( - doctype = "Transaction Fetch Log", - start_time = start_time, - end_time = end_time, - count = count, - page = times, - )).insert(ignore_permissions = True) - if transaction_fetch_log_doc: - frappe.flags.ignore_account_permission = True - update_default_shift_type_last_sync(get_default_shift_type(),end_time) - return transaction_fetch_log_doc.name - - - -def creat_shift_assignment_for_active_today(): - active_emp_list = frappe.db.sql_list("""select name from `tabEmployee` - where status=%s """, "Active") - if active_emp_list: - for emp in active_emp_list: - if check_employee_enable(emp): - if frappe.db.get_value("Employee", emp, "biometric_id"): - date = today() - shift_type = get_shift_type(emp) - creat_shift_assignment(emp,date,shift_type) - - -def creat_shift_assignment(emp_id,date,shift_type): - name = "New Shift Assignment" - d = frappe.db.sql(""" - select name - from `tabShift Assignment` - where employee = %(employee)s and docstatus < 2 - and date = %(date)s - and name != %(name)s""", { - "employee": emp_id, - "shift_type": shift_type, - "date": date, - "name": name - }, as_dict = 1) - for date_overlap in d: - if date_overlap['name']: - return - - shift_assignment_doc = frappe.get_doc(dict( - doctype = "Shift Assignment", - employee = emp_id, - shift_type = shift_type, - date = date, - )).insert(ignore_permissions = True) - if shift_assignment_doc: - frappe.flags.ignore_account_permission = True - shift_assignment_doc.submit() - return shift_assignment_doc.name - - -def creat_transaction_log(data,tf_log_name,unique_list,repeated_list): - tf_log_doc = frappe.get_doc("Transaction Fetch Log",tf_log_name) - if tf_log_doc.unique: - unique = int(tf_log_doc.unique) - else: - unique = 0 - if tf_log_doc.repeated: - repeated = int(tf_log_doc.repeated) - else: - repeated = 0 - - for transaction_row in data: - if check_transactions_id_is_unique(transaction_row["id"]): - unique += 1 - unique_list.append(transaction_row["id"]) - if not transaction_row["id"] or not transaction_row["punch_time"] or not transaction_row["punch_state"] or not transaction_row["emp"]: - status = "Error" - else: - status = "Waiting" - transaction_log_doc = frappe.get_doc(dict( - - doctype = "Transactions Log", - id = transaction_row["id"], - emp_code = transaction_row["emp_code"], - punch_time = transaction_row["punch_time"], - punch_state = transaction_row["punch_state"], - verify_type = transaction_row["verify_type"], - work_code = transaction_row["work_code"], - terminal_sn = transaction_row["terminal_sn"], - terminal_alias = transaction_row["terminal_alias"], - area_alias = transaction_row["area_alias"], - ilongituded = transaction_row["longitude"], - latitude = transaction_row["latitude"], - gps_location = transaction_row["gps_location"], - mobile = transaction_row["mobile"], - source = transaction_row["source"], - purpose = transaction_row["purpose"], - crc = transaction_row["crc"], - is_attendance = transaction_row["is_attendance"], - reserved = transaction_row["reserved"], - upload_time = transaction_row["upload_time"], - sync_status = transaction_row["sync_status"], - sync_statusid = transaction_row["sync_status"], - sync_time = transaction_row["sync_time"], - emp = transaction_row["emp"], - terminal = transaction_row["terminal"], - transaction_fetch_log = tf_log_name, - status = status, - - )).insert(ignore_permissions = True) - if transaction_log_doc: - frappe.flags.ignore_account_permission = True - - else: - repeated_list.append(transaction_row["id"]) - repeated += 1 - - tf_log_doc.unique = unique - tf_log_doc.repeated = repeated - tf_log_doc.save() - - -@frappe.whitelist() -def make_employee_checkin(): - if check_master_enable(): - transactions_log_list = frappe.db.sql_list("""select name from `tabTransactions Log` - where status=%s """, "Waiting") - for transaction_item in transactions_log_list: - transaction_doc = frappe.get_doc("Transactions Log",transaction_item) - if get_employee_name_id(transaction_doc.emp): - employee_name_id = get_employee_name_id(transaction_doc.emp) - if check_employee_enable(employee_name_id): - shift = get_shift_type(employee_name_id) - punch_date =getdate(transaction_doc.punch_time) - creat_shift_assignment(employee_name_id,punch_date,get_default_shift_type()) - if int(transaction_doc.punch_state) == 0 : - log_type = "IN" - else: - log_type = "OUT" - employee_checkin_doc = frappe.get_doc(dict( - doctype = "Employee Checkin", - employee = employee_name_id, - log_type = log_type, - time = transaction_doc.punch_time, - device_id = transaction_doc.terminal_alias, - shift = shift, - )).insert(ignore_permissions = True) - if employee_checkin_doc: - frappe.flags.ignore_account_permission = True - transaction_doc.employee_checkin = employee_checkin_doc.name - transaction_doc.status = "Linked" - transaction_doc.save() - return "Success" - - diff --git a/payware/payware/doctype/biometric_settings/test_biometric_settings.py b/payware/payware/doctype/biometric_settings/test_biometric_settings.py deleted file mode 100644 index bcb0b82..0000000 --- a/payware/payware/doctype/biometric_settings/test_biometric_settings.py +++ /dev/null @@ -1,10 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright (c) 2020, Aakvatech and Contributors -# See license.txt -from __future__ import unicode_literals - -# import frappe -import unittest - -class TestBiometricSettings(unittest.TestCase): - pass diff --git a/payware/payware/doctype/designation_education/__init__.py b/payware/payware/doctype/designation_education/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/payware/payware/doctype/designation_education/designation_education.js b/payware/payware/doctype/designation_education/designation_education.js deleted file mode 100644 index 47b1151..0000000 --- a/payware/payware/doctype/designation_education/designation_education.js +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright (c) 2020, Aakvatech and contributors -// For license information, please see license.txt - -frappe.ui.form.on('Designation Education', { - // refresh: function(frm) { - - // } -}); diff --git a/payware/payware/doctype/designation_education/designation_education.json b/payware/payware/doctype/designation_education/designation_education.json deleted file mode 100644 index 91d2483..0000000 --- a/payware/payware/doctype/designation_education/designation_education.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "autoname": "field:education", - "creation": "2020-01-10 00:16:43.238357", - "doctype": "DocType", - "editable_grid": 1, - "engine": "InnoDB", - "field_order": [ - "education" - ], - "fields": [ - { - "fieldname": "education", - "fieldtype": "Data", - "in_list_view": 1, - "label": "Education", - "unique": 1 - } - ], - "modified": "2020-01-10 00:22:48.564056", - "modified_by": "Administrator", - "module": "Payware", - "name": "Designation Education", - "owner": "Administrator", - "permissions": [ - { - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "System Manager", - "share": 1, - "write": 1 - } - ], - "quick_entry": 1, - "sort_field": "modified", - "sort_order": "DESC", - "track_changes": 1 -} \ No newline at end of file diff --git a/payware/payware/doctype/designation_education/designation_education.py b/payware/payware/doctype/designation_education/designation_education.py deleted file mode 100644 index 20263b8..0000000 --- a/payware/payware/doctype/designation_education/designation_education.py +++ /dev/null @@ -1,10 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright (c) 2020, Aakvatech and contributors -# For license information, please see license.txt - -from __future__ import unicode_literals -# import frappe -from frappe.model.document import Document - -class DesignationEducation(Document): - pass diff --git a/payware/payware/doctype/designation_education/test_designation_education.py b/payware/payware/doctype/designation_education/test_designation_education.py deleted file mode 100644 index d3a312d..0000000 --- a/payware/payware/doctype/designation_education/test_designation_education.py +++ /dev/null @@ -1,10 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright (c) 2020, Aakvatech and Contributors -# See license.txt -from __future__ import unicode_literals - -# import frappe -import unittest - -class TestDesignationEducation(unittest.TestCase): - pass diff --git a/payware/payware/doctype/designation_kpi_template/__init__.py b/payware/payware/doctype/designation_kpi_template/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/payware/payware/doctype/designation_kpi_template/designation_kpi_template.js b/payware/payware/doctype/designation_kpi_template/designation_kpi_template.js deleted file mode 100644 index 8eb2419..0000000 --- a/payware/payware/doctype/designation_kpi_template/designation_kpi_template.js +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright (c) 2020, Aakvatech and contributors -// For license information, please see license.txt - -frappe.ui.form.on('Designation KPI Template', { - // refresh: function(frm) { - - // } -}); diff --git a/payware/payware/doctype/designation_kpi_template/designation_kpi_template.json b/payware/payware/doctype/designation_kpi_template/designation_kpi_template.json deleted file mode 100644 index d2aabe0..0000000 --- a/payware/payware/doctype/designation_kpi_template/designation_kpi_template.json +++ /dev/null @@ -1,210 +0,0 @@ -{ - "autoname": "format:GS-{designation}", - "creation": "2020-01-10 15:02:04.760695", - "doctype": "DocType", - "editable_grid": 1, - "engine": "InnoDB", - "field_order": [ - "designation", - "section_break_2", - "hr_perspective_1", - "column_break_4", - "perspective_weightage_1", - "section_break_6", - "goal_sheet_details_1", - "section_break_8", - "hr_perspective_2", - "column_break_10", - "perspective_weightage_2", - "section_break_12", - "goal_sheet_details_2", - "section_break_14", - "hr_perspective_3", - "column_break_16", - "perspective_weightage_3", - "section_break_18", - "goal_sheet_details_3", - "section_break_20", - "hr_perspective_4", - "column_break_22", - "perspective_weightage_4", - "section_break_24", - "goal_sheet_details_4" - ], - "fields": [ - { - "fieldname": "designation", - "fieldtype": "Link", - "in_standard_filter": 1, - "label": "Designation", - "options": "Designation", - "reqd": 1 - }, - { - "fieldname": "section_break_2", - "fieldtype": "Section Break" - }, - { - "default": "Financial", - "fieldname": "hr_perspective_1", - "fieldtype": "Link", - "in_list_view": 1, - "label": "HR Perspective 1", - "options": "HR Perspective", - "read_only": 1, - "reqd": 1 - }, - { - "fieldname": "column_break_4", - "fieldtype": "Column Break" - }, - { - "fetch_from": "hr_perspective_1.weightage", - "fieldname": "perspective_weightage_1", - "fieldtype": "Percent", - "in_list_view": 1, - "label": "Perspective Weightage 1", - "read_only": 1, - "reqd": 1 - }, - { - "fieldname": "section_break_6", - "fieldtype": "Section Break" - }, - { - "fieldname": "goal_sheet_details_1", - "fieldtype": "Table", - "label": "Goal Sheet Details 1", - "options": "Goal Sheet Template Detail" - }, - { - "fieldname": "section_break_8", - "fieldtype": "Section Break" - }, - { - "default": "Internal Processes", - "fieldname": "hr_perspective_2", - "fieldtype": "Link", - "in_list_view": 1, - "label": "HR Perspective 2", - "options": "HR Perspective", - "read_only": 1, - "reqd": 1 - }, - { - "fieldname": "column_break_10", - "fieldtype": "Column Break" - }, - { - "fetch_from": "hr_perspective_2.weightage", - "fieldname": "perspective_weightage_2", - "fieldtype": "Percent", - "in_list_view": 1, - "label": "Perspective Weightage 2", - "read_only": 1, - "reqd": 1 - }, - { - "fieldname": "section_break_12", - "fieldtype": "Section Break" - }, - { - "fieldname": "goal_sheet_details_2", - "fieldtype": "Table", - "label": "Goal Sheet Details 2", - "options": "Goal Sheet Template Detail" - }, - { - "fieldname": "section_break_14", - "fieldtype": "Section Break" - }, - { - "default": "Customer Focus", - "fieldname": "hr_perspective_3", - "fieldtype": "Link", - "label": "HR Perspective 3", - "options": "HR Perspective", - "read_only": 1, - "reqd": 1 - }, - { - "fieldname": "column_break_16", - "fieldtype": "Column Break" - }, - { - "fetch_from": "hr_perspective_3.weightage", - "fieldname": "perspective_weightage_3", - "fieldtype": "Percent", - "label": "Perspective Weightage 3", - "read_only": 1, - "reqd": 1 - }, - { - "fieldname": "section_break_18", - "fieldtype": "Section Break" - }, - { - "fieldname": "goal_sheet_details_3", - "fieldtype": "Table", - "label": "Goal Sheet Details 3", - "options": "Goal Sheet Template Detail" - }, - { - "fieldname": "section_break_20", - "fieldtype": "Section Break" - }, - { - "default": "People & Team", - "fieldname": "hr_perspective_4", - "fieldtype": "Link", - "label": "HR Perspective 4", - "options": "HR Perspective", - "read_only": 1, - "reqd": 1 - }, - { - "fieldname": "column_break_22", - "fieldtype": "Column Break" - }, - { - "fetch_from": "hr_perspective_4.weightage", - "fieldname": "perspective_weightage_4", - "fieldtype": "Percent", - "label": "Perspective Weightage 4", - "read_only": 1, - "reqd": 1 - }, - { - "fieldname": "section_break_24", - "fieldtype": "Section Break" - }, - { - "fieldname": "goal_sheet_details_4", - "fieldtype": "Table", - "label": "Goal Sheet Details 4", - "options": "Goal Sheet Template Detail" - } - ], - "modified": "2020-01-10 15:02:04.760695", - "modified_by": "Administrator", - "module": "Payware", - "name": "Designation KPI Template", - "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", - "track_changes": 1 -} \ No newline at end of file diff --git a/payware/payware/doctype/designation_kpi_template/designation_kpi_template.py b/payware/payware/doctype/designation_kpi_template/designation_kpi_template.py deleted file mode 100644 index d0c8a1a..0000000 --- a/payware/payware/doctype/designation_kpi_template/designation_kpi_template.py +++ /dev/null @@ -1,10 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright (c) 2020, Aakvatech and contributors -# For license information, please see license.txt - -from __future__ import unicode_literals -# import frappe -from frappe.model.document import Document - -class DesignationKPITemplate(Document): - pass diff --git a/payware/payware/doctype/designation_kpi_template/test_designation_kpi_template.py b/payware/payware/doctype/designation_kpi_template/test_designation_kpi_template.py deleted file mode 100644 index bc7f3b1..0000000 --- a/payware/payware/doctype/designation_kpi_template/test_designation_kpi_template.py +++ /dev/null @@ -1,10 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright (c) 2020, Aakvatech and Contributors -# See license.txt -from __future__ import unicode_literals - -# import frappe -import unittest - -class TestDesignationKPITemplate(unittest.TestCase): - pass diff --git a/payware/payware/doctype/designation_objective/__init__.py b/payware/payware/doctype/designation_objective/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/payware/payware/doctype/designation_objective/designation_objective.js b/payware/payware/doctype/designation_objective/designation_objective.js deleted file mode 100644 index 41a842b..0000000 --- a/payware/payware/doctype/designation_objective/designation_objective.js +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright (c) 2020, Aakvatech and contributors -// For license information, please see license.txt - -frappe.ui.form.on('Designation Objective', { - // refresh: function(frm) { - - // } -}); diff --git a/payware/payware/doctype/designation_objective/designation_objective.json b/payware/payware/doctype/designation_objective/designation_objective.json deleted file mode 100644 index f6db6d1..0000000 --- a/payware/payware/doctype/designation_objective/designation_objective.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "autoname": "field:objective", - "creation": "2020-01-01 17:22:37.046603", - "doctype": "DocType", - "editable_grid": 1, - "engine": "InnoDB", - "field_order": [ - "objective" - ], - "fields": [ - { - "fieldname": "objective", - "fieldtype": "Data", - "label": "Objective", - "unique": 1 - } - ], - "modified": "2020-01-01 17:25:19.566012", - "modified_by": "Administrator", - "module": "Payware", - "name": "Designation Objective", - "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", - "track_changes": 1 -} \ No newline at end of file diff --git a/payware/payware/doctype/designation_objective/designation_objective.py b/payware/payware/doctype/designation_objective/designation_objective.py deleted file mode 100644 index ee30b69..0000000 --- a/payware/payware/doctype/designation_objective/designation_objective.py +++ /dev/null @@ -1,10 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright (c) 2020, Aakvatech and contributors -# For license information, please see license.txt - -from __future__ import unicode_literals -# import frappe -from frappe.model.document import Document - -class DesignationObjective(Document): - pass diff --git a/payware/payware/doctype/designation_objective/test_designation_objective.py b/payware/payware/doctype/designation_objective/test_designation_objective.py deleted file mode 100644 index b9a3edd..0000000 --- a/payware/payware/doctype/designation_objective/test_designation_objective.py +++ /dev/null @@ -1,10 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright (c) 2020, Aakvatech and Contributors -# See license.txt -from __future__ import unicode_literals - -# import frappe -import unittest - -class TestDesignationObjective(unittest.TestCase): - pass diff --git a/payware/payware/doctype/employee_area/__init__.py b/payware/payware/doctype/employee_area/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/payware/payware/doctype/employee_area/employee_area.json b/payware/payware/doctype/employee_area/employee_area.json deleted file mode 100644 index 1045cdf..0000000 --- a/payware/payware/doctype/employee_area/employee_area.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "creation": "2020-01-04 06:12:47.369772", - "doctype": "DocType", - "editable_grid": 1, - "engine": "InnoDB", - "field_order": [ - "area", - "area_code" - ], - "fields": [ - { - "fieldname": "area", - "fieldtype": "Link", - "in_list_view": 1, - "in_standard_filter": 1, - "label": "Area", - "options": "Area" - }, - { - "fetch_from": "area.area_code", - "fieldname": "area_code", - "fieldtype": "Read Only", - "in_list_view": 1, - "label": "Area Code" - } - ], - "istable": 1, - "modified": "2020-01-04 23:01:15.690102", - "modified_by": "Administrator", - "module": "Payware", - "name": "Employee Area", - "owner": "Administrator", - "permissions": [], - "quick_entry": 1, - "sort_field": "modified", - "sort_order": "DESC", - "track_changes": 1 -} \ No newline at end of file diff --git a/payware/payware/doctype/employee_area/employee_area.py b/payware/payware/doctype/employee_area/employee_area.py deleted file mode 100644 index 9d617a4..0000000 --- a/payware/payware/doctype/employee_area/employee_area.py +++ /dev/null @@ -1,10 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright (c) 2020, Aakvatech and contributors -# For license information, please see license.txt - -from __future__ import unicode_literals -# import frappe -from frappe.model.document import Document - -class EmployeeArea(Document): - pass diff --git a/payware/payware/doctype/employee_kpi/__init__.py b/payware/payware/doctype/employee_kpi/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/payware/payware/doctype/employee_kpi/employee_kpi.js b/payware/payware/doctype/employee_kpi/employee_kpi.js deleted file mode 100644 index 1262fbb..0000000 --- a/payware/payware/doctype/employee_kpi/employee_kpi.js +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright (c) 2020, Aakvatech and contributors -// For license information, please see license.txt - -frappe.ui.form.on('Employee KPI', { - // refresh: function(frm) { - - // } -}); diff --git a/payware/payware/doctype/employee_kpi/employee_kpi.json b/payware/payware/doctype/employee_kpi/employee_kpi.json deleted file mode 100644 index a9c786a..0000000 --- a/payware/payware/doctype/employee_kpi/employee_kpi.json +++ /dev/null @@ -1,264 +0,0 @@ -{ - "creation": "2020-01-12 15:40:12.210088", - "doctype": "DocType", - "editable_grid": 1, - "engine": "InnoDB", - "field_order": [ - "designation_kpi_template", - "employee", - "column_break_2", - "designation", - "employee_full_name", - "section_break_2", - "hr_perspective_1", - "column_break_4", - "perspective_weightage_1", - "section_break_6", - "kpi_details_1", - "section_break_8", - "hr_perspective_2", - "column_break_10", - "perspective_weightage_2", - "section_break_12", - "kpi_details_2", - "section_break_14", - "hr_perspective_3", - "column_break_16", - "perspective_weightage_3", - "section_break_18", - "kpi_details_3", - "section_break_20", - "hr_perspective_4", - "column_break_22", - "perspective_weightage_4", - "section_break_24", - "kpi_details_4", - "section_break_26", - "total_employee_rating", - "column_break_9", - "total_manager_rating" - ], - "fields": [ - { - "fieldname": "designation_kpi_template", - "fieldtype": "Link", - "label": "Designation KPI Template", - "options": "Designation KPI Template", - "reqd": 1 - }, - { - "fieldname": "employee", - "fieldtype": "Link", - "label": "Employee", - "options": "Employee", - "reqd": 1 - }, - { - "fieldname": "column_break_2", - "fieldtype": "Column Break" - }, - { - "fetch_from": "goal_sheet_template.designation", - "fieldname": "designation", - "fieldtype": "Link", - "label": "Designation", - "options": "Designation", - "read_only": 1, - "reqd": 1 - }, - { - "fetch_from": "employee.employee_name", - "fieldname": "employee_full_name", - "fieldtype": "Data", - "label": "Employee Full Name", - "read_only": 1 - }, - { - "fieldname": "section_break_2", - "fieldtype": "Section Break" - }, - { - "fieldname": "hr_perspective_1", - "fieldtype": "Link", - "in_list_view": 1, - "label": "HR Perspective 1", - "options": "HR Perspective", - "read_only": 1, - "reqd": 1 - }, - { - "fieldname": "column_break_4", - "fieldtype": "Column Break" - }, - { - "fetch_from": "hr_perspective_1.weightage", - "fieldname": "perspective_weightage_1", - "fieldtype": "Percent", - "in_list_view": 1, - "label": "Perspective Weightage 1", - "read_only": 1, - "reqd": 1 - }, - { - "fieldname": "section_break_6", - "fieldtype": "Section Break" - }, - { - "fieldname": "kpi_details_1", - "fieldtype": "Table", - "label": "KPI Details 1", - "options": "Goal Sheet Detail" - }, - { - "fieldname": "section_break_8", - "fieldtype": "Section Break" - }, - { - "fieldname": "hr_perspective_2", - "fieldtype": "Link", - "in_list_view": 1, - "label": "HR Perspective 2", - "options": "HR Perspective", - "read_only": 1, - "reqd": 1 - }, - { - "fieldname": "column_break_10", - "fieldtype": "Column Break" - }, - { - "fetch_from": "hr_perspective_2.weightage", - "fieldname": "perspective_weightage_2", - "fieldtype": "Percent", - "in_list_view": 1, - "label": "Perspective Weightage 2", - "read_only": 1, - "reqd": 1 - }, - { - "fieldname": "section_break_12", - "fieldtype": "Section Break" - }, - { - "fieldname": "kpi_details_2", - "fieldtype": "Table", - "label": "KPI Details 2", - "options": "Goal Sheet Detail" - }, - { - "fieldname": "section_break_14", - "fieldtype": "Section Break" - }, - { - "fieldname": "hr_perspective_3", - "fieldtype": "Link", - "label": "HR Perspective 3", - "options": "HR Perspective", - "read_only": 1, - "reqd": 1 - }, - { - "fieldname": "column_break_16", - "fieldtype": "Column Break" - }, - { - "fetch_from": "hr_perspective_3.weightage", - "fieldname": "perspective_weightage_3", - "fieldtype": "Percent", - "label": "Perspective Weightage 3", - "read_only": 1, - "reqd": 1 - }, - { - "fieldname": "section_break_18", - "fieldtype": "Section Break" - }, - { - "fieldname": "kpi_details_3", - "fieldtype": "Table", - "label": "KPI Details 3", - "options": "Goal Sheet Detail" - }, - { - "fieldname": "section_break_20", - "fieldtype": "Section Break" - }, - { - "fieldname": "hr_perspective_4", - "fieldtype": "Link", - "label": "HR Perspective 4", - "options": "HR Perspective", - "read_only": 1, - "reqd": 1 - }, - { - "fieldname": "column_break_22", - "fieldtype": "Column Break" - }, - { - "fetch_from": "hr_perspective_4.weightage", - "fieldname": "perspective_weightage_4", - "fieldtype": "Percent", - "label": "Perspective Weightage 4", - "read_only": 1, - "reqd": 1 - }, - { - "fieldname": "section_break_24", - "fieldtype": "Section Break" - }, - { - "fieldname": "kpi_details_4", - "fieldtype": "Table", - "label": "KPI Details 4", - "options": "Goal Sheet Detail" - }, - { - "fieldname": "section_break_26", - "fieldtype": "Section Break" - }, - { - "default": "0", - "fieldname": "total_employee_rating", - "fieldtype": "Float", - "label": "Total Employee Rating", - "precision": "1", - "read_only": 1 - }, - { - "fieldname": "column_break_9", - "fieldtype": "Column Break" - }, - { - "default": "0", - "fieldname": "total_manager_rating", - "fieldtype": "Float", - "label": "Total Manager Rating", - "permlevel": 1, - "precision": "1", - "read_only": 1 - } - ], - "modified": "2020-01-12 15:40:12.210088", - "modified_by": "Administrator", - "module": "Payware", - "name": "Employee KPI", - "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", - "track_changes": 1 -} \ No newline at end of file diff --git a/payware/payware/doctype/employee_kpi/employee_kpi.py b/payware/payware/doctype/employee_kpi/employee_kpi.py deleted file mode 100644 index 01aa914..0000000 --- a/payware/payware/doctype/employee_kpi/employee_kpi.py +++ /dev/null @@ -1,10 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright (c) 2020, Aakvatech and contributors -# For license information, please see license.txt - -from __future__ import unicode_literals -# import frappe -from frappe.model.document import Document - -class EmployeeKPI(Document): - pass diff --git a/payware/payware/doctype/employee_kpi/test_employee_kpi.py b/payware/payware/doctype/employee_kpi/test_employee_kpi.py deleted file mode 100644 index aff7b2b..0000000 --- a/payware/payware/doctype/employee_kpi/test_employee_kpi.py +++ /dev/null @@ -1,10 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright (c) 2020, Aakvatech and Contributors -# See license.txt -from __future__ import unicode_literals - -# import frappe -import unittest - -class TestEmployeeKPI(unittest.TestCase): - pass diff --git a/payware/payware/doctype/employee_ot_component/__init__.py b/payware/payware/doctype/employee_ot_component/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/payware/payware/doctype/employee_ot_component/employee_ot_component.json b/payware/payware/doctype/employee_ot_component/employee_ot_component.json deleted file mode 100644 index 6a03a24..0000000 --- a/payware/payware/doctype/employee_ot_component/employee_ot_component.json +++ /dev/null @@ -1,109 +0,0 @@ -{ - "allow_copy": 0, - "allow_events_in_timeline": 0, - "allow_guest_to_view": 0, - "allow_import": 0, - "allow_rename": 0, - "autoname": "EOTC.#", - "beta": 0, - "creation": "2019-02-18 09:46:35.383853", - "custom": 0, - "docstatus": 0, - "doctype": "DocType", - "document_type": "", - "editable_grid": 1, - "engine": "InnoDB", - "fields": [ - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "salary_component", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Salary Component", - "length": 0, - "no_copy": 0, - "options": "Salary Component", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "no_of_hours", - "fieldtype": "Float", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "No of Hours", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - } - ], - "has_web_view": 0, - "hide_heading": 0, - "hide_toolbar": 0, - "idx": 0, - "image_view": 0, - "in_create": 0, - "is_submittable": 0, - "issingle": 0, - "istable": 1, - "max_attachments": 0, - "modified": "2019-03-04 00:30:17.859401", - "modified_by": "bhavikpatel7023@gmail.com", - "module": "Payware", - "name": "Employee OT Component", - "name_case": "", - "owner": "Administrator", - "permissions": [], - "quick_entry": 1, - "read_only": 0, - "read_only_onload": 0, - "show_name_in_global_search": 0, - "sort_field": "modified", - "sort_order": "DESC", - "track_changes": 1, - "track_seen": 0, - "track_views": 0 -} \ No newline at end of file diff --git a/payware/payware/doctype/employee_ot_component/employee_ot_component.py b/payware/payware/doctype/employee_ot_component/employee_ot_component.py deleted file mode 100644 index 83b771d..0000000 --- a/payware/payware/doctype/employee_ot_component/employee_ot_component.py +++ /dev/null @@ -1,10 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright (c) 2019, Aakvatech and contributors -# For license information, please see license.txt - -from __future__ import unicode_literals -import frappe -from frappe.model.document import Document - -class EmployeeOTComponent(Document): - pass diff --git a/payware/payware/doctype/employee_ot_components/__init__.py b/payware/payware/doctype/employee_ot_components/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/payware/payware/doctype/employee_ot_components/employee_ot_components.json b/payware/payware/doctype/employee_ot_components/employee_ot_components.json deleted file mode 100644 index 3fb5b84..0000000 --- a/payware/payware/doctype/employee_ot_components/employee_ot_components.json +++ /dev/null @@ -1,108 +0,0 @@ -{ - "allow_copy": 0, - "allow_events_in_timeline": 0, - "allow_guest_to_view": 0, - "allow_import": 0, - "allow_rename": 0, - "beta": 0, - "creation": "2019-02-18 09:43:55.729000", - "custom": 0, - "docstatus": 0, - "doctype": "DocType", - "document_type": "", - "editable_grid": 1, - "engine": "InnoDB", - "fields": [ - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "salary_component", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Salary Component", - "length": 0, - "no_copy": 0, - "options": "Salary Component", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "no_of_hours", - "fieldtype": "Float", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "No of Hours", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - } - ], - "has_web_view": 0, - "hide_heading": 0, - "hide_toolbar": 0, - "idx": 0, - "image_view": 0, - "in_create": 0, - "is_submittable": 0, - "issingle": 0, - "istable": 1, - "max_attachments": 0, - "modified": "2019-02-18 09:44:53.413046", - "modified_by": "Administrator", - "module": "Payware", - "name": "Employee OT Components", - "name_case": "", - "owner": "Administrator", - "permissions": [], - "quick_entry": 1, - "read_only": 0, - "read_only_onload": 0, - "show_name_in_global_search": 0, - "sort_field": "modified", - "sort_order": "DESC", - "track_changes": 1, - "track_seen": 0, - "track_views": 0 -} \ No newline at end of file diff --git a/payware/payware/doctype/employee_ot_components/employee_ot_components.py b/payware/payware/doctype/employee_ot_components/employee_ot_components.py deleted file mode 100644 index fb8b2bf..0000000 --- a/payware/payware/doctype/employee_ot_components/employee_ot_components.py +++ /dev/null @@ -1,10 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright (c) 2019, Aakvatech and contributors -# For license information, please see license.txt - -from __future__ import unicode_literals -import frappe -from frappe.model.document import Document - -class EmployeeOTComponents(Document): - pass diff --git a/payware/payware/doctype/goal_sheet/__init__.py b/payware/payware/doctype/goal_sheet/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/payware/payware/doctype/goal_sheet/goal_sheet.js b/payware/payware/doctype/goal_sheet/goal_sheet.js deleted file mode 100644 index e6b7991..0000000 --- a/payware/payware/doctype/goal_sheet/goal_sheet.js +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright (c) 2020, Aakvatech and contributors -// For license information, please see license.txt - -frappe.ui.form.on('Goal Sheet', { - // refresh: function(frm) { - - // } -}); diff --git a/payware/payware/doctype/goal_sheet/goal_sheet.json b/payware/payware/doctype/goal_sheet/goal_sheet.json deleted file mode 100644 index 5b485d6..0000000 --- a/payware/payware/doctype/goal_sheet/goal_sheet.json +++ /dev/null @@ -1,264 +0,0 @@ -{ - "creation": "2020-01-01 18:00:27.678803", - "doctype": "DocType", - "editable_grid": 1, - "engine": "InnoDB", - "field_order": [ - "goal_sheet_template", - "employee", - "column_break_2", - "designation", - "employee_full_name", - "section_break_2", - "hr_perspective_1", - "column_break_4", - "perspective_weightage_1", - "section_break_6", - "goal_sheet_details_1", - "section_break_8", - "hr_perspective_2", - "column_break_10", - "perspective_weightage_2", - "section_break_12", - "goal_sheet_details_2", - "section_break_14", - "hr_perspective_3", - "column_break_16", - "perspective_weightage_3", - "section_break_18", - "goal_sheet_details_3", - "section_break_20", - "hr_perspective_4", - "column_break_22", - "perspective_weightage_4", - "section_break_24", - "goal_sheet_details_4", - "section_break_26", - "total_employee_rating", - "column_break_9", - "total_manager_rating" - ], - "fields": [ - { - "fetch_from": "goal_sheet_template.designation", - "fieldname": "designation", - "fieldtype": "Link", - "label": "Designation", - "options": "Designation", - "read_only": 1, - "reqd": 1 - }, - { - "fieldname": "section_break_2", - "fieldtype": "Section Break" - }, - { - "fieldname": "hr_perspective_1", - "fieldtype": "Link", - "in_list_view": 1, - "label": "HR Perspective 1", - "options": "HR Perspective", - "read_only": 1, - "reqd": 1 - }, - { - "fieldname": "column_break_4", - "fieldtype": "Column Break" - }, - { - "fetch_from": "hr_perspective_1.weightage", - "fieldname": "perspective_weightage_1", - "fieldtype": "Percent", - "in_list_view": 1, - "label": "Perspective Weightage 1", - "read_only": 1, - "reqd": 1 - }, - { - "fieldname": "section_break_6", - "fieldtype": "Section Break" - }, - { - "default": "0", - "fieldname": "total_employee_rating", - "fieldtype": "Float", - "label": "Total Employee Rating", - "precision": "1", - "read_only": 1 - }, - { - "fieldname": "column_break_9", - "fieldtype": "Column Break" - }, - { - "default": "0", - "fieldname": "total_manager_rating", - "fieldtype": "Float", - "label": "Total Manager Rating", - "permlevel": 1, - "precision": "1", - "read_only": 1 - }, - { - "fieldname": "goal_sheet_details_1", - "fieldtype": "Table", - "label": "Goal Sheet Details 1", - "options": "Goal Sheet Detail" - }, - { - "fieldname": "section_break_8", - "fieldtype": "Section Break" - }, - { - "fieldname": "hr_perspective_2", - "fieldtype": "Link", - "in_list_view": 1, - "label": "HR Perspective 2", - "options": "HR Perspective", - "read_only": 1, - "reqd": 1 - }, - { - "fieldname": "column_break_10", - "fieldtype": "Column Break" - }, - { - "fetch_from": "hr_perspective_2.weightage", - "fieldname": "perspective_weightage_2", - "fieldtype": "Percent", - "in_list_view": 1, - "label": "Perspective Weightage 2", - "read_only": 1, - "reqd": 1 - }, - { - "fieldname": "section_break_12", - "fieldtype": "Section Break" - }, - { - "fieldname": "goal_sheet_details_2", - "fieldtype": "Table", - "label": "Goal Sheet Details 2", - "options": "Goal Sheet Detail" - }, - { - "fieldname": "section_break_14", - "fieldtype": "Section Break" - }, - { - "fieldname": "hr_perspective_3", - "fieldtype": "Link", - "label": "HR Perspective 3", - "options": "HR Perspective", - "read_only": 1, - "reqd": 1 - }, - { - "fieldname": "column_break_16", - "fieldtype": "Column Break" - }, - { - "fetch_from": "hr_perspective_3.weightage", - "fieldname": "perspective_weightage_3", - "fieldtype": "Percent", - "label": "Perspective Weightage 3", - "read_only": 1, - "reqd": 1 - }, - { - "fieldname": "section_break_18", - "fieldtype": "Section Break" - }, - { - "fieldname": "goal_sheet_details_3", - "fieldtype": "Table", - "label": "Goal Sheet Details 3", - "options": "Goal Sheet Detail" - }, - { - "fieldname": "section_break_20", - "fieldtype": "Section Break" - }, - { - "fieldname": "hr_perspective_4", - "fieldtype": "Link", - "label": "HR Perspective 4", - "options": "HR Perspective", - "read_only": 1, - "reqd": 1 - }, - { - "fieldname": "column_break_22", - "fieldtype": "Column Break" - }, - { - "fetch_from": "hr_perspective_4.weightage", - "fieldname": "perspective_weightage_4", - "fieldtype": "Percent", - "label": "Perspective Weightage 4", - "read_only": 1, - "reqd": 1 - }, - { - "fieldname": "section_break_24", - "fieldtype": "Section Break" - }, - { - "fieldname": "goal_sheet_details_4", - "fieldtype": "Table", - "label": "Goal Sheet Details 4", - "options": "Goal Sheet Detail" - }, - { - "fieldname": "section_break_26", - "fieldtype": "Section Break" - }, - { - "fieldname": "goal_sheet_template", - "fieldtype": "Link", - "label": "Goal Sheet Template", - "options": "Goal Sheet Template", - "reqd": 1 - }, - { - "fieldname": "column_break_2", - "fieldtype": "Column Break" - }, - { - "fieldname": "employee", - "fieldtype": "Link", - "label": "Employee", - "options": "Employee", - "reqd": 1 - }, - { - "fetch_from": "employee.employee_name", - "fieldname": "employee_full_name", - "fieldtype": "Data", - "label": "Employee Full Name", - "read_only": 1 - } - ], - "modified": "2020-01-06 17:14:43.918219", - "modified_by": "Administrator", - "module": "Payware", - "name": "Goal Sheet", - "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", - "track_changes": 1 -} \ No newline at end of file diff --git a/payware/payware/doctype/goal_sheet/goal_sheet.py b/payware/payware/doctype/goal_sheet/goal_sheet.py deleted file mode 100644 index b77b4ea..0000000 --- a/payware/payware/doctype/goal_sheet/goal_sheet.py +++ /dev/null @@ -1,10 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright (c) 2020, Aakvatech and contributors -# For license information, please see license.txt - -from __future__ import unicode_literals -# import frappe -from frappe.model.document import Document - -class GoalSheet(Document): - pass diff --git a/payware/payware/doctype/goal_sheet/test_goal_sheet.py b/payware/payware/doctype/goal_sheet/test_goal_sheet.py deleted file mode 100644 index 18b7255..0000000 --- a/payware/payware/doctype/goal_sheet/test_goal_sheet.py +++ /dev/null @@ -1,10 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright (c) 2020, Aakvatech and Contributors -# See license.txt -from __future__ import unicode_literals - -# import frappe -import unittest - -class TestGoalSheet(unittest.TestCase): - pass diff --git a/payware/payware/doctype/goal_sheet_detail/__init__.py b/payware/payware/doctype/goal_sheet_detail/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/payware/payware/doctype/goal_sheet_detail/goal_sheet_detail.json b/payware/payware/doctype/goal_sheet_detail/goal_sheet_detail.json deleted file mode 100644 index 3f45d12..0000000 --- a/payware/payware/doctype/goal_sheet_detail/goal_sheet_detail.json +++ /dev/null @@ -1,96 +0,0 @@ -{ - "creation": "2020-01-01 17:49:56.278695", - "doctype": "DocType", - "editable_grid": 1, - "engine": "InnoDB", - "field_order": [ - "objective", - "measure", - "target", - "acheivement", - "objective_weightage", - "employee_rating", - "manager_rating", - "employee_remarks", - "manager_remarks" - ], - "fields": [ - { - "columns": 2, - "fieldname": "objective", - "fieldtype": "Link", - "in_list_view": 1, - "label": "Objective", - "options": "Designation Objective" - }, - { - "columns": 2, - "fieldname": "measure", - "fieldtype": "Data", - "in_list_view": 1, - "label": "Measure" - }, - { - "columns": 2, - "fieldname": "target", - "fieldtype": "Data", - "in_list_view": 1, - "label": "Target" - }, - { - "columns": 2, - "fieldname": "acheivement", - "fieldtype": "Data", - "label": "Acheivement" - }, - { - "columns": 2, - "fieldname": "objective_weightage", - "fieldtype": "Percent", - "label": "Objective Weightage" - }, - { - "columns": 1, - "fieldname": "employee_rating", - "fieldtype": "Float", - "in_list_view": 1, - "label": "Employee Rating", - "precision": "1" - }, - { - "columns": 1, - "fieldname": "manager_rating", - "fieldtype": "Float", - "in_list_view": 1, - "label": "Manager Rating", - "permlevel": 1, - "precision": "1" - }, - { - "columns": 1, - "fieldname": "employee_remarks", - "fieldtype": "Data", - "in_list_view": 1, - "label": "Employee Remarks" - }, - { - "columns": 1, - "fieldname": "manager_remarks", - "fieldtype": "Data", - "in_list_view": 1, - "label": "Manager Remarks", - "permlevel": 1 - } - ], - "istable": 1, - "modified": "2020-01-06 14:58:54.978291", - "modified_by": "Administrator", - "module": "Payware", - "name": "Goal Sheet Detail", - "owner": "Administrator", - "permissions": [], - "quick_entry": 1, - "sort_field": "modified", - "sort_order": "DESC", - "track_changes": 1 -} \ No newline at end of file diff --git a/payware/payware/doctype/goal_sheet_detail/goal_sheet_detail.py b/payware/payware/doctype/goal_sheet_detail/goal_sheet_detail.py deleted file mode 100644 index ef53185..0000000 --- a/payware/payware/doctype/goal_sheet_detail/goal_sheet_detail.py +++ /dev/null @@ -1,10 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright (c) 2020, Aakvatech and contributors -# For license information, please see license.txt - -from __future__ import unicode_literals -# import frappe -from frappe.model.document import Document - -class GoalSheetDetail(Document): - pass diff --git a/payware/payware/doctype/goal_sheet_template/__init__.py b/payware/payware/doctype/goal_sheet_template/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/payware/payware/doctype/goal_sheet_template/goal_sheet_template.js b/payware/payware/doctype/goal_sheet_template/goal_sheet_template.js deleted file mode 100644 index 96a3a4b..0000000 --- a/payware/payware/doctype/goal_sheet_template/goal_sheet_template.js +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright (c) 2020, Aakvatech and contributors -// For license information, please see license.txt - -frappe.ui.form.on('Goal Sheet Template', { - // refresh: function(frm) { - - // } -}); diff --git a/payware/payware/doctype/goal_sheet_template/goal_sheet_template.json b/payware/payware/doctype/goal_sheet_template/goal_sheet_template.json deleted file mode 100644 index c083c21..0000000 --- a/payware/payware/doctype/goal_sheet_template/goal_sheet_template.json +++ /dev/null @@ -1,210 +0,0 @@ -{ - "autoname": "format:GS-{designation}", - "creation": "2020-01-01 18:14:53.919720", - "doctype": "DocType", - "editable_grid": 1, - "engine": "InnoDB", - "field_order": [ - "designation", - "section_break_2", - "hr_perspective_1", - "column_break_4", - "perspective_weightage_1", - "section_break_6", - "goal_sheet_details_1", - "section_break_8", - "hr_perspective_2", - "column_break_10", - "perspective_weightage_2", - "section_break_12", - "goal_sheet_details_2", - "section_break_14", - "hr_perspective_3", - "column_break_16", - "perspective_weightage_3", - "section_break_18", - "goal_sheet_details_3", - "section_break_20", - "hr_perspective_4", - "column_break_22", - "perspective_weightage_4", - "section_break_24", - "goal_sheet_details_4" - ], - "fields": [ - { - "fieldname": "designation", - "fieldtype": "Link", - "in_standard_filter": 1, - "label": "Designation", - "options": "Designation", - "reqd": 1 - }, - { - "fieldname": "section_break_2", - "fieldtype": "Section Break" - }, - { - "default": "Financial", - "fieldname": "hr_perspective_1", - "fieldtype": "Link", - "in_list_view": 1, - "label": "HR Perspective 1", - "options": "HR Perspective", - "read_only": 1, - "reqd": 1 - }, - { - "fieldname": "column_break_4", - "fieldtype": "Column Break" - }, - { - "fetch_from": "hr_perspective_1.weightage", - "fieldname": "perspective_weightage_1", - "fieldtype": "Percent", - "in_list_view": 1, - "label": "Perspective Weightage 1", - "read_only": 1, - "reqd": 1 - }, - { - "fieldname": "section_break_6", - "fieldtype": "Section Break" - }, - { - "fieldname": "goal_sheet_details_1", - "fieldtype": "Table", - "label": "Goal Sheet Details 1", - "options": "Goal Sheet Template Detail" - }, - { - "fieldname": "section_break_8", - "fieldtype": "Section Break" - }, - { - "default": "Internal Processes", - "fieldname": "hr_perspective_2", - "fieldtype": "Link", - "in_list_view": 1, - "label": "HR Perspective 2", - "options": "HR Perspective", - "read_only": 1, - "reqd": 1 - }, - { - "fieldname": "column_break_10", - "fieldtype": "Column Break" - }, - { - "fetch_from": "hr_perspective_2.weightage", - "fieldname": "perspective_weightage_2", - "fieldtype": "Percent", - "in_list_view": 1, - "label": "Perspective Weightage 2", - "read_only": 1, - "reqd": 1 - }, - { - "fieldname": "section_break_12", - "fieldtype": "Section Break" - }, - { - "fieldname": "goal_sheet_details_2", - "fieldtype": "Table", - "label": "Goal Sheet Details 2", - "options": "Goal Sheet Template Detail" - }, - { - "fieldname": "section_break_14", - "fieldtype": "Section Break" - }, - { - "default": "Customer Focus", - "fieldname": "hr_perspective_3", - "fieldtype": "Link", - "label": "HR Perspective 3", - "options": "HR Perspective", - "read_only": 1, - "reqd": 1 - }, - { - "fieldname": "column_break_16", - "fieldtype": "Column Break" - }, - { - "fetch_from": "hr_perspective_3.weightage", - "fieldname": "perspective_weightage_3", - "fieldtype": "Percent", - "label": "Perspective Weightage 3", - "read_only": 1, - "reqd": 1 - }, - { - "fieldname": "section_break_18", - "fieldtype": "Section Break" - }, - { - "fieldname": "goal_sheet_details_3", - "fieldtype": "Table", - "label": "Goal Sheet Details 3", - "options": "Goal Sheet Template Detail" - }, - { - "fieldname": "section_break_20", - "fieldtype": "Section Break" - }, - { - "default": "People & Team", - "fieldname": "hr_perspective_4", - "fieldtype": "Link", - "label": "HR Perspective 4", - "options": "HR Perspective", - "read_only": 1, - "reqd": 1 - }, - { - "fieldname": "column_break_22", - "fieldtype": "Column Break" - }, - { - "fetch_from": "hr_perspective_4.weightage", - "fieldname": "perspective_weightage_4", - "fieldtype": "Percent", - "label": "Perspective Weightage 4", - "read_only": 1, - "reqd": 1 - }, - { - "fieldname": "section_break_24", - "fieldtype": "Section Break" - }, - { - "fieldname": "goal_sheet_details_4", - "fieldtype": "Table", - "label": "Goal Sheet Details 4", - "options": "Goal Sheet Template Detail" - } - ], - "modified": "2020-01-09 18:01:06.468274", - "modified_by": "Administrator", - "module": "Payware", - "name": "Goal Sheet Template", - "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", - "track_changes": 1 -} \ No newline at end of file diff --git a/payware/payware/doctype/goal_sheet_template/goal_sheet_template.py b/payware/payware/doctype/goal_sheet_template/goal_sheet_template.py deleted file mode 100644 index fcf47e1..0000000 --- a/payware/payware/doctype/goal_sheet_template/goal_sheet_template.py +++ /dev/null @@ -1,10 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright (c) 2020, Aakvatech and contributors -# For license information, please see license.txt - -from __future__ import unicode_literals -# import frappe -from frappe.model.document import Document - -class GoalSheetTemplate(Document): - pass diff --git a/payware/payware/doctype/goal_sheet_template/test_goal_sheet_template.py b/payware/payware/doctype/goal_sheet_template/test_goal_sheet_template.py deleted file mode 100644 index ad4929d..0000000 --- a/payware/payware/doctype/goal_sheet_template/test_goal_sheet_template.py +++ /dev/null @@ -1,10 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright (c) 2020, Aakvatech and Contributors -# See license.txt -from __future__ import unicode_literals - -# import frappe -import unittest - -class TestGoalSheetTemplate(unittest.TestCase): - pass diff --git a/payware/payware/doctype/goal_sheet_template_detail/__init__.py b/payware/payware/doctype/goal_sheet_template_detail/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/payware/payware/doctype/goal_sheet_template_detail/goal_sheet_template_detail.json b/payware/payware/doctype/goal_sheet_template_detail/goal_sheet_template_detail.json deleted file mode 100644 index 77ecba1..0000000 --- a/payware/payware/doctype/goal_sheet_template_detail/goal_sheet_template_detail.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "creation": "2020-01-06 16:02:10.914505", - "doctype": "DocType", - "editable_grid": 1, - "engine": "InnoDB", - "field_order": [ - "objective", - "measure", - "target", - "acheivement", - "objective_weightage" - ], - "fields": [ - { - "columns": 2, - "fieldname": "objective", - "fieldtype": "Link", - "in_list_view": 1, - "label": "Objective", - "options": "Designation Objective" - }, - { - "columns": 2, - "fieldname": "measure", - "fieldtype": "Text", - "in_list_view": 1, - "label": "Measure" - }, - { - "columns": 2, - "fieldname": "target", - "fieldtype": "Text", - "in_list_view": 1, - "label": "Target" - }, - { - "columns": 2, - "fieldname": "acheivement", - "fieldtype": "Data", - "label": "Acheivement" - }, - { - "columns": 2, - "fieldname": "objective_weightage", - "fieldtype": "Percent", - "label": "Objective Weightage" - } - ], - "istable": 1, - "modified": "2020-01-06 16:20:13.944672", - "modified_by": "Administrator", - "module": "Payware", - "name": "Goal Sheet Template Detail", - "owner": "Administrator", - "permissions": [], - "quick_entry": 1, - "sort_field": "modified", - "sort_order": "DESC", - "track_changes": 1 -} \ No newline at end of file diff --git a/payware/payware/doctype/goal_sheet_template_detail/goal_sheet_template_detail.py b/payware/payware/doctype/goal_sheet_template_detail/goal_sheet_template_detail.py deleted file mode 100644 index 60bf4e5..0000000 --- a/payware/payware/doctype/goal_sheet_template_detail/goal_sheet_template_detail.py +++ /dev/null @@ -1,10 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright (c) 2020, Aakvatech and contributors -# For license information, please see license.txt - -from __future__ import unicode_literals -# import frappe -from frappe.model.document import Document - -class GoalSheetTemplateDetail(Document): - pass diff --git a/payware/payware/doctype/hr_perspective/__init__.py b/payware/payware/doctype/hr_perspective/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/payware/payware/doctype/hr_perspective/hr_perspective.js b/payware/payware/doctype/hr_perspective/hr_perspective.js deleted file mode 100644 index b74cb56..0000000 --- a/payware/payware/doctype/hr_perspective/hr_perspective.js +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright (c) 2020, Aakvatech and contributors -// For license information, please see license.txt - -frappe.ui.form.on('HR Perspective', { - // refresh: function(frm) { - - // } -}); diff --git a/payware/payware/doctype/hr_perspective/hr_perspective.json b/payware/payware/doctype/hr_perspective/hr_perspective.json deleted file mode 100644 index 8422ab2..0000000 --- a/payware/payware/doctype/hr_perspective/hr_perspective.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "autoname": "field:perspective", - "creation": "2020-01-01 17:36:35.381070", - "doctype": "DocType", - "editable_grid": 1, - "engine": "InnoDB", - "field_order": [ - "perspective", - "weightage", - "description" - ], - "fields": [ - { - "fieldname": "perspective", - "fieldtype": "Data", - "in_list_view": 1, - "label": "Perspective", - "reqd": 1, - "unique": 1 - }, - { - "fieldname": "weightage", - "fieldtype": "Percent", - "in_list_view": 1, - "label": "Weightage", - "reqd": 1 - }, - { - "fieldname": "description", - "fieldtype": "Data", - "label": "Description" - } - ], - "modified": "2020-01-01 17:36:49.407826", - "modified_by": "Administrator", - "module": "Payware", - "name": "HR Perspective", - "owner": "Administrator", - "permissions": [ - { - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "System Manager", - "share": 1, - "write": 1 - } - ], - "quick_entry": 1, - "sort_field": "modified", - "sort_order": "DESC", - "track_changes": 1 -} \ No newline at end of file diff --git a/payware/payware/doctype/hr_perspective/hr_perspective.py b/payware/payware/doctype/hr_perspective/hr_perspective.py deleted file mode 100644 index 674c83a..0000000 --- a/payware/payware/doctype/hr_perspective/hr_perspective.py +++ /dev/null @@ -1,10 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright (c) 2020, Aakvatech and contributors -# For license information, please see license.txt - -from __future__ import unicode_literals -# import frappe -from frappe.model.document import Document - -class HRPerspective(Document): - pass diff --git a/payware/payware/doctype/hr_perspective/test_hr_perspective.py b/payware/payware/doctype/hr_perspective/test_hr_perspective.py deleted file mode 100644 index 73af15b..0000000 --- a/payware/payware/doctype/hr_perspective/test_hr_perspective.py +++ /dev/null @@ -1,10 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright (c) 2020, Aakvatech and Contributors -# See license.txt -from __future__ import unicode_literals - -# import frappe -import unittest - -class TestHRPerspective(unittest.TestCase): - pass diff --git a/payware/payware/doctype/loan_nfs_repayments/__init__.py b/payware/payware/doctype/loan_nfs_repayments/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/payware/payware/doctype/loan_nfs_repayments/loan_nfs_repayments.json b/payware/payware/doctype/loan_nfs_repayments/loan_nfs_repayments.json deleted file mode 100644 index cccf045..0000000 --- a/payware/payware/doctype/loan_nfs_repayments/loan_nfs_repayments.json +++ /dev/null @@ -1,178 +0,0 @@ -{ - "allow_copy": 0, - "allow_events_in_timeline": 0, - "allow_guest_to_view": 0, - "allow_import": 0, - "allow_rename": 0, - "beta": 0, - "creation": "2019-05-04 01:11:33.294704", - "custom": 0, - "docstatus": 0, - "doctype": "DocType", - "document_type": "", - "editable_grid": 0, - "engine": "InnoDB", - "fields": [ - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "company", - "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": "Company", - "length": 0, - "no_copy": 0, - "options": "Company", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "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, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "nfs_loan_repayment", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "NFS Loan Repayment", - "length": 0, - "no_copy": 0, - "options": "Loan Repayment Not From Salary", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "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, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "payment_date", - "fieldtype": "Date", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Payment Date", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "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, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "payment_amount", - "fieldtype": "Currency", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Payment Amount", - "length": 0, - "no_copy": 0, - "options": "Company:company:default_currency", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "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, - "translatable": 0, - "unique": 0 - } - ], - "has_web_view": 0, - "hide_heading": 0, - "hide_toolbar": 0, - "idx": 0, - "image_view": 0, - "in_create": 0, - "is_submittable": 0, - "issingle": 0, - "istable": 1, - "max_attachments": 0, - "modified": "2019-05-04 14:47:20.887262", - "modified_by": "Administrator", - "module": "Payware", - "name": "Loan NFS Repayments", - "name_case": "", - "owner": "Administrator", - "permissions": [], - "quick_entry": 1, - "read_only": 0, - "read_only_onload": 0, - "show_name_in_global_search": 0, - "sort_field": "modified", - "sort_order": "ASC", - "track_changes": 1, - "track_seen": 0, - "track_views": 0 -} \ No newline at end of file diff --git a/payware/payware/doctype/loan_nfs_repayments/loan_nfs_repayments.py b/payware/payware/doctype/loan_nfs_repayments/loan_nfs_repayments.py deleted file mode 100644 index d36c6ec..0000000 --- a/payware/payware/doctype/loan_nfs_repayments/loan_nfs_repayments.py +++ /dev/null @@ -1,10 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright (c) 2019, Aakvatech and contributors -# For license information, please see license.txt - -from __future__ import unicode_literals -import frappe -from frappe.model.document import Document - -class LoanNFSRepayments(Document): - pass diff --git a/payware/payware/doctype/loan_repayment_not_from_salary/__init__.py b/payware/payware/doctype/loan_repayment_not_from_salary/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/payware/payware/doctype/loan_repayment_not_from_salary/loan_repayment_not_from_salary.js b/payware/payware/doctype/loan_repayment_not_from_salary/loan_repayment_not_from_salary.js deleted file mode 100644 index d62e659..0000000 --- a/payware/payware/doctype/loan_repayment_not_from_salary/loan_repayment_not_from_salary.js +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2019, Aakvatech and contributors -// For license information, please see license.txt - -frappe.ui.form.on('Loan Repayment Not From Salary', { - onload: function(frm) { - frm.set_query("loan", function() { - return { - filters: { - status: "Disbursed", - docstatus: 1 - } - } - }) - } -}); diff --git a/payware/payware/doctype/loan_repayment_not_from_salary/loan_repayment_not_from_salary.json b/payware/payware/doctype/loan_repayment_not_from_salary/loan_repayment_not_from_salary.json deleted file mode 100644 index d2964d1..0000000 --- a/payware/payware/doctype/loan_repayment_not_from_salary/loan_repayment_not_from_salary.json +++ /dev/null @@ -1,140 +0,0 @@ -{ - "autoname": "naming_series:", - "creation": "2019-05-03 16:26:15.593606", - "doctype": "DocType", - "document_type": "Document", - "engine": "InnoDB", - "field_order": [ - "naming_series", - "loan", - "column_break_3", - "employee_name", - "employee", - "section_break_4", - "payment_date", - "payment_amount", - "column_break_4", - "company", - "description", - "section_break_7", - "journal_name", - "amended_from" - ], - "fields": [ - { - "default": "LNFS-.#######", - "fieldname": "naming_series", - "fieldtype": "Data", - "hidden": 1, - "label": "Naming Series", - "options": "LNFS-.#######", - "print_hide": 1 - }, - { - "fieldname": "loan", - "fieldtype": "Link", - "label": "Loan", - "options": "Loan" - }, - { - "fieldname": "column_break_3", - "fieldtype": "Column Break" - }, - { - "fetch_from": "loan.applicant_name", - "fieldname": "employee_name", - "fieldtype": "Data", - "in_list_view": 1, - "label": "Employee name", - "read_only": 1 - }, - { - "fieldname": "section_break_4", - "fieldtype": "Section Break" - }, - { - "default": "Today", - "fieldname": "payment_date", - "fieldtype": "Date", - "label": "Payment Date" - }, - { - "fieldname": "payment_amount", - "fieldtype": "Currency", - "label": "Payment Amount", - "options": "Company:company:default_currency" - }, - { - "fieldname": "column_break_4", - "fieldtype": "Column Break" - }, - { - "fieldname": "company", - "fieldtype": "Link", - "label": "Company", - "options": "Company" - }, - { - "fieldname": "description", - "fieldtype": "Data", - "label": "Description" - }, - { - "fieldname": "section_break_7", - "fieldtype": "Section Break", - "label": "Journal Details" - }, - { - "allow_on_submit": 1, - "fieldname": "journal_name", - "fieldtype": "Link", - "label": "Journal Name", - "options": "Journal Entry", - "read_only": 1 - }, - { - "fieldname": "amended_from", - "fieldtype": "Link", - "hidden": 1, - "label": "Amended From", - "no_copy": 1, - "options": "Loan Repayment Not From Salary", - "print_hide": 1, - "read_only": 1 - }, - { - "fetch_from": "loan.applicant", - "fieldname": "employee", - "fieldtype": "Link", - "hidden": 1, - "label": "Employee", - "options": "Employee" - } - ], - "is_submittable": 1, - "modified": "2020-05-06 21:48:58.196410", - "modified_by": "Administrator", - "module": "Payware", - "name": "Loan Repayment Not From Salary", - "owner": "Administrator", - "permissions": [ - { - "cancel": 1, - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "System Manager", - "share": 1, - "submit": 1, - "write": 1 - } - ], - "quick_entry": 1, - "sort_field": "modified", - "sort_order": "ASC", - "track_changes": 1 -} \ No newline at end of file diff --git a/payware/payware/doctype/loan_repayment_not_from_salary/loan_repayment_not_from_salary.py b/payware/payware/doctype/loan_repayment_not_from_salary/loan_repayment_not_from_salary.py deleted file mode 100644 index 758b398..0000000 --- a/payware/payware/doctype/loan_repayment_not_from_salary/loan_repayment_not_from_salary.py +++ /dev/null @@ -1,10 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright (c) 2019, Aakvatech and contributors -# For license information, please see license.txt - -from __future__ import unicode_literals -import frappe -from frappe.model.document import Document - -class LoanRepaymentNotFromSalary(Document): - pass diff --git a/payware/payware/doctype/loan_repayment_not_from_salary/test_loan_repayment_not_from_salary.js b/payware/payware/doctype/loan_repayment_not_from_salary/test_loan_repayment_not_from_salary.js deleted file mode 100644 index 521c076..0000000 --- a/payware/payware/doctype/loan_repayment_not_from_salary/test_loan_repayment_not_from_salary.js +++ /dev/null @@ -1,23 +0,0 @@ -/* eslint-disable */ -// rename this file from _test_[name] to test_[name] to activate -// and remove above this line - -QUnit.test("test: Loan Repayment Not From Salary", function (assert) { - let done = assert.async(); - - // number of asserts - assert.expect(1); - - frappe.run_serially([ - // insert a new Loan Repayment Not From Salary - () => frappe.tests.make('Loan Repayment Not From Salary', [ - // values to be set - {key: 'value'} - ]), - () => { - assert.equal(cur_frm.doc.key, 'value'); - }, - () => done() - ]); - -}); diff --git a/payware/payware/doctype/loan_repayment_not_from_salary/test_loan_repayment_not_from_salary.py b/payware/payware/doctype/loan_repayment_not_from_salary/test_loan_repayment_not_from_salary.py deleted file mode 100644 index 557cbf2..0000000 --- a/payware/payware/doctype/loan_repayment_not_from_salary/test_loan_repayment_not_from_salary.py +++ /dev/null @@ -1,10 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright (c) 2019, Aakvatech and Contributors -# See license.txt -from __future__ import unicode_literals - -import frappe -import unittest - -class TestLoanRepaymentNotFromSalary(unittest.TestCase): - pass diff --git a/payware/payware/doctype/nssf_payments/__init__.py b/payware/payware/doctype/nssf_payments/__init__.py deleted file mode 100755 index e69de29..0000000 diff --git a/payware/payware/doctype/nssf_payments/nssf_payments.js b/payware/payware/doctype/nssf_payments/nssf_payments.js deleted file mode 100755 index 5ea9006..0000000 --- a/payware/payware/doctype/nssf_payments/nssf_payments.js +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright (c) 2018, Aakvatech and contributors -// For license information, please see license.txt - -frappe.ui.form.on('NSSF Payments', { - refresh: function(frm) { - - } -}); diff --git a/payware/payware/doctype/nssf_payments/nssf_payments.json b/payware/payware/doctype/nssf_payments/nssf_payments.json deleted file mode 100755 index 3511396..0000000 --- a/payware/payware/doctype/nssf_payments/nssf_payments.json +++ /dev/null @@ -1,265 +0,0 @@ -{ - "allow_copy": 0, - "allow_events_in_timeline": 1, - "allow_guest_to_view": 0, - "allow_import": 0, - "allow_rename": 0, - "autoname": "format:NSSFPYT-{#####}", - "beta": 0, - "creation": "2018-11-13 00:44:06.237342", - "custom": 0, - "description": "NSSF Payments made", - "docstatus": 0, - "doctype": "DocType", - "document_type": "Document", - "editable_grid": 1, - "engine": "InnoDB", - "fields": [ - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "payroll_month", - "fieldtype": "Date", - "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": "Payroll Month", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "description": "This amount should be total amount of NSSF paid for all employees", - "fetch_if_empty": 0, - "fieldname": "amount", - "fieldtype": "Currency", - "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": "Amount", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "payment_method", - "fieldtype": "Select", - "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": "Payment Method", - "length": 0, - "no_copy": 0, - "options": "TISS\nCheque\nDeposit", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "payment_reference_number", - "fieldtype": "Data", - "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": "Payment Reference Number", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "payment_date", - "fieldtype": "Date", - "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": "Payment Date", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "receipt_number", - "fieldtype": "Data", - "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": "Receipt number", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - } - ], - "has_web_view": 0, - "hide_heading": 0, - "hide_toolbar": 0, - "idx": 0, - "image_view": 0, - "in_create": 0, - "is_submittable": 0, - "issingle": 0, - "istable": 0, - "max_attachments": 0, - "modified": "2019-06-13 13:11:11.809132", - "modified_by": "Administrator", - "module": "Payware", - "name": "NSSF Payments", - "name_case": "", - "owner": "Administrator", - "permissions": [ - { - "amend": 0, - "cancel": 0, - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "if_owner": 0, - "import": 0, - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "System Manager", - "set_user_permissions": 0, - "share": 1, - "submit": 0, - "write": 1 - } - ], - "quick_entry": 1, - "read_only": 0, - "read_only_onload": 0, - "show_name_in_global_search": 0, - "sort_field": "modified", - "sort_order": "DESC", - "track_changes": 1, - "track_seen": 0, - "track_views": 0 -} \ No newline at end of file diff --git a/payware/payware/doctype/nssf_payments/nssf_payments.py b/payware/payware/doctype/nssf_payments/nssf_payments.py deleted file mode 100755 index 14dd7c5..0000000 --- a/payware/payware/doctype/nssf_payments/nssf_payments.py +++ /dev/null @@ -1,10 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright (c) 2018, Aakvatech and contributors -# For license information, please see license.txt - -from __future__ import unicode_literals -import frappe -from frappe.model.document import Document - -class NSSFPayments(Document): - pass diff --git a/payware/payware/doctype/nssf_payments/test_nssf_payments.js b/payware/payware/doctype/nssf_payments/test_nssf_payments.js deleted file mode 100755 index 664e5be..0000000 --- a/payware/payware/doctype/nssf_payments/test_nssf_payments.js +++ /dev/null @@ -1,23 +0,0 @@ -/* eslint-disable */ -// rename this file from _test_[name] to test_[name] to activate -// and remove above this line - -QUnit.test("test: NSSF Payments", function (assert) { - let done = assert.async(); - - // number of asserts - assert.expect(1); - - frappe.run_serially([ - // insert a new NSSF Payments - () => frappe.tests.make('NSSF Payments', [ - // values to be set - {key: 'value'} - ]), - () => { - assert.equal(cur_frm.doc.key, 'value'); - }, - () => done() - ]); - -}); diff --git a/payware/payware/doctype/nssf_payments/test_nssf_payments.py b/payware/payware/doctype/nssf_payments/test_nssf_payments.py deleted file mode 100755 index e56a45d..0000000 --- a/payware/payware/doctype/nssf_payments/test_nssf_payments.py +++ /dev/null @@ -1,10 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright (c) 2018, Aakvatech and Contributors -# See license.txt -from __future__ import unicode_literals - -import frappe -import unittest - -class TestNSSFPayments(unittest.TestCase): - pass diff --git a/payware/payware/doctype/payroll_payment/__init__.py b/payware/payware/doctype/payroll_payment/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/payware/payware/doctype/payroll_payment/payroll_payment.js b/payware/payware/doctype/payroll_payment/payroll_payment.js deleted file mode 100644 index 9f7aa03..0000000 --- a/payware/payware/doctype/payroll_payment/payroll_payment.js +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright (c) 2019, Aakvatech and contributors -// For license information, please see license.txt - -frappe.ui.form.on('Payroll Payment', { - refresh: function(frm) { - - } -}); diff --git a/payware/payware/doctype/payroll_payment/payroll_payment.json b/payware/payware/doctype/payroll_payment/payroll_payment.json deleted file mode 100644 index d1ef5a2..0000000 --- a/payware/payware/doctype/payroll_payment/payroll_payment.json +++ /dev/null @@ -1,104 +0,0 @@ -{ - "autoname": "{PW}-{payroll_entry}-{payment_type}-", - "creation": "2019-08-01 17:07:45.527511", - "doctype": "DocType", - "editable_grid": 1, - "engine": "InnoDB", - "field_order": [ - "payroll_entry", - "start_date", - "end_date", - "payment_mode", - "column_break_7", - "payment_date", - "payment_type", - "payment_reference_number", - "receipt_number", - "amended_from" - ], - "fields": [ - { - "fieldname": "payroll_entry", - "fieldtype": "Link", - "label": "Payroll Entry", - "options": "Payroll Entry" - }, - { - "fieldname": "payment_type", - "fieldtype": "Select", - "label": "Payment Type", - "options": "\nNSSF\nSDL\nWCF" - }, - { - "fieldname": "payment_mode", - "fieldtype": "Select", - "label": "Payment Mode", - "options": "\nCash\nBank\nTISS" - }, - { - "fieldname": "payment_date", - "fieldtype": "Date", - "label": "Payment Date" - }, - { - "description": "(Cheque Number, Control Number, Swift Ref. Number)", - "fieldname": "payment_reference_number", - "fieldtype": "Data", - "label": "Payment Reference Number" - }, - { - "fieldname": "receipt_number", - "fieldtype": "Data", - "label": "Receipt Number" - }, - { - "fieldname": "column_break_7", - "fieldtype": "Column Break" - }, - { - "fieldname": "start_date", - "fieldtype": "Date", - "label": "Start Date", - "read_only": 1 - }, - { - "fieldname": "end_date", - "fieldtype": "Data", - "label": "End Date", - "read_only": 1 - }, - { - "fieldname": "amended_from", - "fieldtype": "Link", - "label": "Amended From", - "no_copy": 1, - "options": "Payroll Payment", - "print_hide": 1, - "read_only": 1 - } - ], - "is_submittable": 1, - "modified": "2020-06-10 21:08:15.242420", - "modified_by": "Administrator", - "module": "Payware", - "name": "Payroll Payment", - "owner": "Administrator", - "permissions": [ - { - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "System Manager", - "share": 1, - "write": 1 - } - ], - "quick_entry": 1, - "sort_field": "modified", - "sort_order": "DESC", - "track_changes": 1 -} \ No newline at end of file diff --git a/payware/payware/doctype/payroll_payment/payroll_payment.py b/payware/payware/doctype/payroll_payment/payroll_payment.py deleted file mode 100644 index 5bc5ad3..0000000 --- a/payware/payware/doctype/payroll_payment/payroll_payment.py +++ /dev/null @@ -1,10 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright (c) 2019, Aakvatech and contributors -# For license information, please see license.txt - -from __future__ import unicode_literals -import frappe -from frappe.model.document import Document - -class PayrollPayment(Document): - pass diff --git a/payware/payware/doctype/payroll_payment/test_payroll_payment.js b/payware/payware/doctype/payroll_payment/test_payroll_payment.js deleted file mode 100644 index 290d484..0000000 --- a/payware/payware/doctype/payroll_payment/test_payroll_payment.js +++ /dev/null @@ -1,23 +0,0 @@ -/* eslint-disable */ -// rename this file from _test_[name] to test_[name] to activate -// and remove above this line - -QUnit.test("test: Payroll Payment", function (assert) { - let done = assert.async(); - - // number of asserts - assert.expect(1); - - frappe.run_serially([ - // insert a new Payroll Payment - () => frappe.tests.make('Payroll Payment', [ - // values to be set - {key: 'value'} - ]), - () => { - assert.equal(cur_frm.doc.key, 'value'); - }, - () => done() - ]); - -}); diff --git a/payware/payware/doctype/payroll_payment/test_payroll_payment.py b/payware/payware/doctype/payroll_payment/test_payroll_payment.py deleted file mode 100644 index 3e388e2..0000000 --- a/payware/payware/doctype/payroll_payment/test_payroll_payment.py +++ /dev/null @@ -1,10 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright (c) 2019, Aakvatech and Contributors -# See license.txt -from __future__ import unicode_literals - -import frappe -import unittest - -class TestPayrollPayment(unittest.TestCase): - pass diff --git a/payware/payware/doctype/payroll_payments/__init__.py b/payware/payware/doctype/payroll_payments/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/payware/payware/doctype/payroll_payments/payroll_payments.js b/payware/payware/doctype/payroll_payments/payroll_payments.js deleted file mode 100644 index 376426e..0000000 --- a/payware/payware/doctype/payroll_payments/payroll_payments.js +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright (c) 2019, Aakvatech and contributors -// For license information, please see license.txt - -frappe.ui.form.on('Payroll Payments', { - refresh: function(frm) { - - } -}); diff --git a/payware/payware/doctype/payroll_payments/payroll_payments.json b/payware/payware/doctype/payroll_payments/payroll_payments.json deleted file mode 100644 index 04cb693..0000000 --- a/payware/payware/doctype/payroll_payments/payroll_payments.json +++ /dev/null @@ -1,364 +0,0 @@ -{ - "allow_copy": 0, - "allow_events_in_timeline": 0, - "allow_guest_to_view": 0, - "allow_import": 0, - "allow_rename": 0, - "autoname": "{PW}-{payroll_entry}-{payment_type}-", - "beta": 0, - "creation": "2019-08-01 17:07:45.527511", - "custom": 0, - "docstatus": 0, - "doctype": "DocType", - "document_type": "", - "editable_grid": 1, - "engine": "InnoDB", - "fields": [ - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "payroll_entry", - "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": "Payroll Entry", - "length": 0, - "no_copy": 0, - "options": "Payroll Entry", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "payment_type", - "fieldtype": "Select", - "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": "Payment Type", - "length": 0, - "no_copy": 0, - "options": "\nNSSF\nSDL\nWCF", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "payment_mode", - "fieldtype": "Select", - "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": "Payment Mode", - "length": 0, - "no_copy": 0, - "options": "\nCash\nBank\nTISS", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "payment_date", - "fieldtype": "Date", - "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": "Payment Date", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "description": "(Cheque Number, Control Number, Swift Ref. Number)", - "fetch_if_empty": 0, - "fieldname": "payment_reference_number", - "fieldtype": "Data", - "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": "Payment Reference Number", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "receipt_number", - "fieldtype": "Data", - "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": "Receipt Number", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "column_break_7", - "fieldtype": "Column Break", - "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, - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "start_date", - "fieldtype": "Date", - "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": "Start Date", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "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, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "end_date", - "fieldtype": "Data", - "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": "End Date", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "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, - "translatable": 0, - "unique": 0 - } - ], - "has_web_view": 0, - "hide_heading": 0, - "hide_toolbar": 0, - "idx": 0, - "image_view": 0, - "in_create": 0, - "is_submittable": 0, - "issingle": 0, - "istable": 0, - "max_attachments": 0, - "modified": "2019-08-01 17:11:02.273165", - "modified_by": "Administrator", - "module": "Payware", - "name": "Payroll Payments", - "name_case": "", - "owner": "Administrator", - "permissions": [ - { - "amend": 0, - "cancel": 0, - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "if_owner": 0, - "import": 0, - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "System Manager", - "set_user_permissions": 0, - "share": 1, - "submit": 0, - "write": 1 - } - ], - "quick_entry": 1, - "read_only": 0, - "read_only_onload": 0, - "show_name_in_global_search": 0, - "sort_field": "modified", - "sort_order": "DESC", - "track_changes": 1, - "track_seen": 0, - "track_views": 0 -} \ No newline at end of file diff --git a/payware/payware/doctype/payroll_payments/payroll_payments.py b/payware/payware/doctype/payroll_payments/payroll_payments.py deleted file mode 100644 index 5be621e..0000000 --- a/payware/payware/doctype/payroll_payments/payroll_payments.py +++ /dev/null @@ -1,10 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright (c) 2019, Aakvatech and contributors -# For license information, please see license.txt - -from __future__ import unicode_literals -import frappe -from frappe.model.document import Document - -class PayrollPayments(Document): - pass diff --git a/payware/payware/doctype/payroll_payments/test_payroll_payments.js b/payware/payware/doctype/payroll_payments/test_payroll_payments.js deleted file mode 100644 index cd3d4b1..0000000 --- a/payware/payware/doctype/payroll_payments/test_payroll_payments.js +++ /dev/null @@ -1,23 +0,0 @@ -/* eslint-disable */ -// rename this file from _test_[name] to test_[name] to activate -// and remove above this line - -QUnit.test("test: Payroll Payments", function (assert) { - let done = assert.async(); - - // number of asserts - assert.expect(1); - - frappe.run_serially([ - // insert a new Payroll Payments - () => frappe.tests.make('Payroll Payments', [ - // values to be set - {key: 'value'} - ]), - () => { - assert.equal(cur_frm.doc.key, 'value'); - }, - () => done() - ]); - -}); diff --git a/payware/payware/doctype/payroll_payments/test_payroll_payments.py b/payware/payware/doctype/payroll_payments/test_payroll_payments.py deleted file mode 100644 index a5c1037..0000000 --- a/payware/payware/doctype/payroll_payments/test_payroll_payments.py +++ /dev/null @@ -1,10 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright (c) 2019, Aakvatech and Contributors -# See license.txt -from __future__ import unicode_literals - -import frappe -import unittest - -class TestPayrollPayments(unittest.TestCase): - pass diff --git a/payware/payware/doctype/payware_settings/__init__.py b/payware/payware/doctype/payware_settings/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/payware/payware/doctype/payware_settings/payware_settings.js b/payware/payware/doctype/payware_settings/payware_settings.js deleted file mode 100644 index 00b4cda..0000000 --- a/payware/payware/doctype/payware_settings/payware_settings.js +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) 2019, Aakvatech and contributors -// For license information, please see license.txt - -frappe.ui.form.on('Payware Settings', { - setup: function(frm) { - frm.set_query('bank_account_for_tra', function() { - return { - filters: { - - } - } - }); - } -}) \ No newline at end of file diff --git a/payware/payware/doctype/payware_settings/payware_settings.json b/payware/payware/doctype/payware_settings/payware_settings.json deleted file mode 100644 index 9ea0229..0000000 --- a/payware/payware/doctype/payware_settings/payware_settings.json +++ /dev/null @@ -1,181 +0,0 @@ -{ - "actions": [], - "creation": "2018-12-30 13:21:50.169110", - "doctype": "DocType", - "document_type": "Setup", - "editable_grid": 1, - "engine": "InnoDB", - "field_order": [ - "overtime_section", - "working_hours_per_month", - "column_break_4", - "ot_module", - "account_settings_section", - "default_account_for_additional_component_cash_journal", - "biometric_attendace_section", - "enable_biometric_attendance", - "section_break_6", - "p_o_box", - "city", - "street", - "bank_account_for_tra", - "column_break_11", - "plot_number", - "block_number", - "skills_development_levy", - "employer_registration_numbers_section", - "social_security_fund_registration_number", - "social_security_control_number", - "column_break_12", - "social_security_fund_registration_district", - "wcf_workmen_compensation_fund_section", - "wcf_registration_number" - ], - "fields": [ - { - "fieldname": "overtime_section", - "fieldtype": "Section Break", - "label": "Overtime" - }, - { - "fieldname": "working_hours_per_month", - "fieldtype": "Float", - "label": "Working Hours per Month" - }, - { - "fieldname": "column_break_4", - "fieldtype": "Column Break" - }, - { - "default": "0", - "fieldname": "ot_module", - "fieldtype": "Check", - "label": "OT Module" - }, - { - "fieldname": "account_settings_section", - "fieldtype": "Section Break", - "label": "Account Settings" - }, - { - "fieldname": "default_account_for_additional_component_cash_journal", - "fieldtype": "Link", - "label": "Default Account for additional component cash journal", - "options": "Account" - }, - { - "fieldname": "section_break_6", - "fieldtype": "Section Break", - "label": "Statutory Reports Information" - }, - { - "fieldname": "p_o_box", - "fieldtype": "Data", - "label": "P O Box" - }, - { - "fieldname": "city", - "fieldtype": "Data", - "label": "City" - }, - { - "fieldname": "street", - "fieldtype": "Data", - "label": "Street" - }, - { - "fieldname": "column_break_11", - "fieldtype": "Column Break" - }, - { - "fieldname": "plot_number", - "fieldtype": "Data", - "label": "Plot Number" - }, - { - "fieldname": "block_number", - "fieldtype": "Data", - "label": "Block Number" - }, - { - "fieldname": "skills_development_levy", - "fieldtype": "Percent", - "label": "Skills Development Levy" - }, - { - "fieldname": "employer_registration_numbers_section", - "fieldtype": "Section Break", - "label": "Social Security Details" - }, - { - "fieldname": "social_security_fund_registration_number", - "fieldtype": "Data", - "label": "Social Security Employer Number" - }, - { - "fieldname": "column_break_12", - "fieldtype": "Column Break" - }, - { - "fieldname": "social_security_fund_registration_district", - "fieldtype": "Data", - "label": "Social Security Registration District" - }, - { - "fieldname": "wcf_workmen_compensation_fund_section", - "fieldtype": "Section Break", - "label": "WCF - Workmen Compensation Fund" - }, - { - "fieldname": "wcf_registration_number", - "fieldtype": "Data", - "label": "WCF Registration Number" - }, - { - "fieldname": "biometric_attendace_section", - "fieldtype": "Section Break", - "label": "Biometric Attendace" - }, - { - "default": "0", - "fieldname": "enable_biometric_attendance", - "fieldtype": "Check", - "label": "Enable Biometric Attendance" - }, - { - "fieldname": "bank_account_for_tra", - "fieldtype": "Link", - "label": "Bank Account for TRA", - "options": "Bank Account" - }, - { - "fieldname": "social_security_control_number", - "fieldtype": "Data", - "label": "Social Security Control Number" - } - ], - "index_web_pages_for_search": 1, - "issingle": 1, - "links": [], - "modified": "2021-07-09 16:58:05.578372", - "modified_by": "Administrator", - "module": "Payware", - "name": "Payware Settings", - "owner": "Administrator", - "permissions": [ - { - "create": 1, - "delete": 1, - "email": 1, - "print": 1, - "read": 1, - "role": "System Manager", - "share": 1, - "write": 1 - } - ], - "quick_entry": 1, - "sort_field": "modified", - "sort_order": "DESC", - "track_changes": 1 -} \ No newline at end of file diff --git a/payware/payware/doctype/payware_settings/payware_settings.py b/payware/payware/doctype/payware_settings/payware_settings.py deleted file mode 100644 index 712665a..0000000 --- a/payware/payware/doctype/payware_settings/payware_settings.py +++ /dev/null @@ -1,10 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright (c) 2019, Aakvatech and contributors -# For license information, please see license.txt - -from __future__ import unicode_literals -import frappe -from frappe.model.document import Document - -class PaywareSettings(Document): - pass diff --git a/payware/payware/doctype/payware_settings/test_payware_settings.js b/payware/payware/doctype/payware_settings/test_payware_settings.js deleted file mode 100644 index 2c88add..0000000 --- a/payware/payware/doctype/payware_settings/test_payware_settings.js +++ /dev/null @@ -1,23 +0,0 @@ -/* eslint-disable */ -// rename this file from _test_[name] to test_[name] to activate -// and remove above this line - -QUnit.test("test: Payware Settings", function (assert) { - let done = assert.async(); - - // number of asserts - assert.expect(1); - - frappe.run_serially([ - // insert a new Payware Settings - () => frappe.tests.make('Payware Settings', [ - // values to be set - {key: 'value'} - ]), - () => { - assert.equal(cur_frm.doc.key, 'value'); - }, - () => done() - ]); - -}); diff --git a/payware/payware/doctype/payware_settings/test_payware_settings.py b/payware/payware/doctype/payware_settings/test_payware_settings.py deleted file mode 100644 index e559809..0000000 --- a/payware/payware/doctype/payware_settings/test_payware_settings.py +++ /dev/null @@ -1,10 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright (c) 2019, Aakvatech and Contributors -# See license.txt -from __future__ import unicode_literals - -import frappe -import unittest - -class TestPaywareSettings(unittest.TestCase): - pass diff --git a/payware/payware/doctype/roles_and_responsibilities/__init__.py b/payware/payware/doctype/roles_and_responsibilities/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/payware/payware/doctype/roles_and_responsibilities/roles_and_responsibilities.js b/payware/payware/doctype/roles_and_responsibilities/roles_and_responsibilities.js deleted file mode 100644 index e9a7b11..0000000 --- a/payware/payware/doctype/roles_and_responsibilities/roles_and_responsibilities.js +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright (c) 2020, Aakvatech and contributors -// For license information, please see license.txt - -frappe.ui.form.on('Roles and Responsibilities', { - // refresh: function(frm) { - - // } -}); diff --git a/payware/payware/doctype/roles_and_responsibilities/roles_and_responsibilities.json b/payware/payware/doctype/roles_and_responsibilities/roles_and_responsibilities.json deleted file mode 100644 index 72a4a9a..0000000 --- a/payware/payware/doctype/roles_and_responsibilities/roles_and_responsibilities.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "autoname": "field:roles_and_resp", - "creation": "2020-01-09 23:50:06.274155", - "doctype": "DocType", - "editable_grid": 1, - "engine": "InnoDB", - "field_order": [ - "roles_and_resp" - ], - "fields": [ - { - "fieldname": "roles_and_resp", - "fieldtype": "Data", - "in_list_view": 1, - "label": "Roles and Responsibilities", - "unique": 1 - } - ], - "modified": "2020-01-10 00:23:00.438478", - "modified_by": "Administrator", - "module": "Payware", - "name": "Roles and Responsibilities", - "owner": "Administrator", - "permissions": [ - { - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "System Manager", - "share": 1, - "write": 1 - } - ], - "quick_entry": 1, - "sort_field": "modified", - "sort_order": "DESC", - "track_changes": 1 -} \ No newline at end of file diff --git a/payware/payware/doctype/roles_and_responsibilities/roles_and_responsibilities.py b/payware/payware/doctype/roles_and_responsibilities/roles_and_responsibilities.py deleted file mode 100644 index 06f7606..0000000 --- a/payware/payware/doctype/roles_and_responsibilities/roles_and_responsibilities.py +++ /dev/null @@ -1,10 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright (c) 2020, Aakvatech and contributors -# For license information, please see license.txt - -from __future__ import unicode_literals -# import frappe -from frappe.model.document import Document - -class RolesandResponsibilities(Document): - pass diff --git a/payware/payware/doctype/roles_and_responsibilities/test_roles_and_responsibilities.py b/payware/payware/doctype/roles_and_responsibilities/test_roles_and_responsibilities.py deleted file mode 100644 index 1827378..0000000 --- a/payware/payware/doctype/roles_and_responsibilities/test_roles_and_responsibilities.py +++ /dev/null @@ -1,10 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright (c) 2020, Aakvatech and Contributors -# See license.txt -from __future__ import unicode_literals - -# import frappe -import unittest - -class TestRolesandResponsibilities(unittest.TestCase): - pass diff --git a/payware/payware/doctype/salary_slip_ot_component/__init__.py b/payware/payware/doctype/salary_slip_ot_component/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/payware/payware/doctype/salary_slip_ot_component/salary_slip_ot_component.json b/payware/payware/doctype/salary_slip_ot_component/salary_slip_ot_component.json deleted file mode 100644 index 36cae98..0000000 --- a/payware/payware/doctype/salary_slip_ot_component/salary_slip_ot_component.json +++ /dev/null @@ -1,109 +0,0 @@ -{ - "allow_copy": 0, - "allow_events_in_timeline": 0, - "allow_guest_to_view": 0, - "allow_import": 0, - "allow_rename": 0, - "autoname": "SSOTC.#####", - "beta": 0, - "creation": "2019-02-18 09:46:16.715714", - "custom": 0, - "docstatus": 0, - "doctype": "DocType", - "document_type": "", - "editable_grid": 1, - "engine": "InnoDB", - "fields": [ - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "salary_component", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Salary Component", - "length": 0, - "no_copy": 0, - "options": "Salary Component", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "no_of_hours", - "fieldtype": "Float", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "No of Hours", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - } - ], - "has_web_view": 0, - "hide_heading": 0, - "hide_toolbar": 0, - "idx": 0, - "image_view": 0, - "in_create": 0, - "is_submittable": 0, - "issingle": 0, - "istable": 1, - "max_attachments": 0, - "modified": "2019-03-04 00:30:36.998133", - "modified_by": "bhavikpatel7023@gmail.com", - "module": "Payware", - "name": "Salary Slip OT Component", - "name_case": "", - "owner": "Administrator", - "permissions": [], - "quick_entry": 1, - "read_only": 0, - "read_only_onload": 0, - "show_name_in_global_search": 0, - "sort_field": "modified", - "sort_order": "DESC", - "track_changes": 1, - "track_seen": 0, - "track_views": 0 -} \ No newline at end of file diff --git a/payware/payware/doctype/salary_slip_ot_component/salary_slip_ot_component.py b/payware/payware/doctype/salary_slip_ot_component/salary_slip_ot_component.py deleted file mode 100644 index e3bed91..0000000 --- a/payware/payware/doctype/salary_slip_ot_component/salary_slip_ot_component.py +++ /dev/null @@ -1,10 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright (c) 2019, Aakvatech and contributors -# For license information, please see license.txt - -from __future__ import unicode_literals -import frappe -from frappe.model.document import Document - -class SalarySlipOTComponent(Document): - pass diff --git a/payware/payware/doctype/salary_slip_ot_components/__init__.py b/payware/payware/doctype/salary_slip_ot_components/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/payware/payware/doctype/salary_slip_ot_components/salary_slip_ot_components.json b/payware/payware/doctype/salary_slip_ot_components/salary_slip_ot_components.json deleted file mode 100644 index 7dca43a..0000000 --- a/payware/payware/doctype/salary_slip_ot_components/salary_slip_ot_components.json +++ /dev/null @@ -1,108 +0,0 @@ -{ - "allow_copy": 0, - "allow_events_in_timeline": 0, - "allow_guest_to_view": 0, - "allow_import": 0, - "allow_rename": 0, - "beta": 0, - "creation": "2019-02-18 09:45:40.253610", - "custom": 0, - "docstatus": 0, - "doctype": "DocType", - "document_type": "", - "editable_grid": 1, - "engine": "InnoDB", - "fields": [ - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "salary_component", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Salary Component", - "length": 0, - "no_copy": 0, - "options": "Salary Component", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "no_of_hours", - "fieldtype": "Float", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "No of Hours", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - } - ], - "has_web_view": 0, - "hide_heading": 0, - "hide_toolbar": 0, - "idx": 0, - "image_view": 0, - "in_create": 0, - "is_submittable": 0, - "issingle": 0, - "istable": 1, - "max_attachments": 0, - "modified": "2019-02-18 09:45:40.253610", - "modified_by": "Administrator", - "module": "Payware", - "name": "Salary Slip OT Components", - "name_case": "", - "owner": "Administrator", - "permissions": [], - "quick_entry": 1, - "read_only": 0, - "read_only_onload": 0, - "show_name_in_global_search": 0, - "sort_field": "modified", - "sort_order": "DESC", - "track_changes": 1, - "track_seen": 0, - "track_views": 0 -} \ No newline at end of file diff --git a/payware/payware/doctype/salary_slip_ot_components/salary_slip_ot_components.py b/payware/payware/doctype/salary_slip_ot_components/salary_slip_ot_components.py deleted file mode 100644 index 5063907..0000000 --- a/payware/payware/doctype/salary_slip_ot_components/salary_slip_ot_components.py +++ /dev/null @@ -1,10 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright (c) 2019, Aakvatech and contributors -# For license information, please see license.txt - -from __future__ import unicode_literals -import frappe -from frappe.model.document import Document - -class SalarySlipOTComponents(Document): - pass diff --git a/payware/payware/doctype/salary_slip_overtime/__init__.py b/payware/payware/doctype/salary_slip_overtime/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/payware/payware/doctype/salary_slip_overtime/salary_slip_overtime.json b/payware/payware/doctype/salary_slip_overtime/salary_slip_overtime.json deleted file mode 100644 index 698681b..0000000 --- a/payware/payware/doctype/salary_slip_overtime/salary_slip_overtime.json +++ /dev/null @@ -1,108 +0,0 @@ -{ - "allow_copy": 0, - "allow_events_in_timeline": 0, - "allow_guest_to_view": 0, - "allow_import": 0, - "allow_rename": 0, - "beta": 0, - "creation": "2019-02-18 09:45:19.472774", - "custom": 0, - "docstatus": 0, - "doctype": "DocType", - "document_type": "", - "editable_grid": 1, - "engine": "InnoDB", - "fields": [ - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "salary_component", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Salary Component", - "length": 0, - "no_copy": 0, - "options": "Salary Component", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "no_of_hours", - "fieldtype": "Float", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "No of Hours", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - } - ], - "has_web_view": 0, - "hide_heading": 0, - "hide_toolbar": 0, - "idx": 0, - "image_view": 0, - "in_create": 0, - "is_submittable": 0, - "issingle": 0, - "istable": 1, - "max_attachments": 0, - "modified": "2019-02-18 09:45:19.472774", - "modified_by": "Administrator", - "module": "Payware", - "name": "Salary Slip Overtime", - "name_case": "", - "owner": "Administrator", - "permissions": [], - "quick_entry": 1, - "read_only": 0, - "read_only_onload": 0, - "show_name_in_global_search": 0, - "sort_field": "modified", - "sort_order": "DESC", - "track_changes": 1, - "track_seen": 0, - "track_views": 0 -} \ No newline at end of file diff --git a/payware/payware/doctype/salary_slip_overtime/salary_slip_overtime.py b/payware/payware/doctype/salary_slip_overtime/salary_slip_overtime.py deleted file mode 100644 index 4335323..0000000 --- a/payware/payware/doctype/salary_slip_overtime/salary_slip_overtime.py +++ /dev/null @@ -1,10 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright (c) 2019, Aakvatech and contributors -# For license information, please see license.txt - -from __future__ import unicode_literals -import frappe -from frappe.model.document import Document - -class SalarySlipOvertime(Document): - pass diff --git a/payware/payware/doctype/transaction_fetch_log/__init__.py b/payware/payware/doctype/transaction_fetch_log/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/payware/payware/doctype/transaction_fetch_log/test_transaction_fetch_log.py b/payware/payware/doctype/transaction_fetch_log/test_transaction_fetch_log.py deleted file mode 100644 index cd86c7e..0000000 --- a/payware/payware/doctype/transaction_fetch_log/test_transaction_fetch_log.py +++ /dev/null @@ -1,10 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright (c) 2020, Aakvatech and Contributors -# See license.txt -from __future__ import unicode_literals - -# import frappe -import unittest - -class TestTransactionFetchLog(unittest.TestCase): - pass diff --git a/payware/payware/doctype/transaction_fetch_log/transaction_fetch_log.js b/payware/payware/doctype/transaction_fetch_log/transaction_fetch_log.js deleted file mode 100644 index c49bad8..0000000 --- a/payware/payware/doctype/transaction_fetch_log/transaction_fetch_log.js +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright (c) 2020, Aakvatech and contributors -// For license information, please see license.txt - -frappe.ui.form.on('Transaction Fetch Log', { - // refresh: function(frm) { - - // } -}); diff --git a/payware/payware/doctype/transaction_fetch_log/transaction_fetch_log.json b/payware/payware/doctype/transaction_fetch_log/transaction_fetch_log.json deleted file mode 100644 index b8cda60..0000000 --- a/payware/payware/doctype/transaction_fetch_log/transaction_fetch_log.json +++ /dev/null @@ -1,105 +0,0 @@ -{ - "creation": "2020-01-07 03:30:41.924895", - "doctype": "DocType", - "editable_grid": 1, - "engine": "InnoDB", - "field_order": [ - "status", - "start_time", - "end_time", - "column_break_4", - "count", - "page", - "unique", - "repeated", - "log_section", - "log" - ], - "fields": [ - { - "fieldname": "status", - "fieldtype": "Select", - "in_list_view": 1, - "label": "Status", - "options": "\nSuccess\nError", - "read_only": 1 - }, - { - "fieldname": "start_time", - "fieldtype": "Datetime", - "in_list_view": 1, - "label": "Start Time", - "read_only": 1 - }, - { - "fieldname": "end_time", - "fieldtype": "Datetime", - "in_list_view": 1, - "label": "End Time", - "read_only": 1 - }, - { - "fieldname": "count", - "fieldtype": "Data", - "in_list_view": 1, - "label": "Count", - "read_only": 1 - }, - { - "fieldname": "log", - "fieldtype": "Long Text", - "label": "Log", - "read_only": 1 - }, - { - "fieldname": "page", - "fieldtype": "Data", - "in_list_view": 1, - "label": "Page", - "read_only": 1 - }, - { - "fieldname": "unique", - "fieldtype": "Data", - "label": "Unique Record", - "read_only": 1 - }, - { - "fieldname": "repeated", - "fieldtype": "Data", - "label": "Repeated Record", - "read_only": 1 - }, - { - "fieldname": "log_section", - "fieldtype": "Section Break", - "label": "Log" - }, - { - "fieldname": "column_break_4", - "fieldtype": "Column Break" - } - ], - "modified": "2020-01-07 23:07:46.449740", - "modified_by": "yousef@dsr.com", - "module": "Payware", - "name": "Transaction Fetch Log", - "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", - "track_changes": 1 -} \ No newline at end of file diff --git a/payware/payware/doctype/transaction_fetch_log/transaction_fetch_log.py b/payware/payware/doctype/transaction_fetch_log/transaction_fetch_log.py deleted file mode 100644 index 0c62a77..0000000 --- a/payware/payware/doctype/transaction_fetch_log/transaction_fetch_log.py +++ /dev/null @@ -1,10 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright (c) 2020, Aakvatech and contributors -# For license information, please see license.txt - -from __future__ import unicode_literals -# import frappe -from frappe.model.document import Document - -class TransactionFetchLog(Document): - pass diff --git a/payware/payware/doctype/transactions_log/__init__.py b/payware/payware/doctype/transactions_log/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/payware/payware/doctype/transactions_log/test_transactions_log.py b/payware/payware/doctype/transactions_log/test_transactions_log.py deleted file mode 100644 index 49b172a..0000000 --- a/payware/payware/doctype/transactions_log/test_transactions_log.py +++ /dev/null @@ -1,10 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright (c) 2020, Aakvatech and Contributors -# See license.txt -from __future__ import unicode_literals - -# import frappe -import unittest - -class TestTransactionsLog(unittest.TestCase): - pass diff --git a/payware/payware/doctype/transactions_log/transactions_log.js b/payware/payware/doctype/transactions_log/transactions_log.js deleted file mode 100644 index 17807c5..0000000 --- a/payware/payware/doctype/transactions_log/transactions_log.js +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright (c) 2020, Aakvatech and contributors -// For license information, please see license.txt - -frappe.ui.form.on('Transactions Log', { - // refresh: function(frm) { - - // } -}); diff --git a/payware/payware/doctype/transactions_log/transactions_log.json b/payware/payware/doctype/transactions_log/transactions_log.json deleted file mode 100644 index 50735fb..0000000 --- a/payware/payware/doctype/transactions_log/transactions_log.json +++ /dev/null @@ -1,230 +0,0 @@ -{ - "creation": "2020-01-07 00:13:59.393543", - "doctype": "DocType", - "editable_grid": 1, - "engine": "InnoDB", - "field_order": [ - "status", - "id", - "emp_code", - "punch_time", - "punch_state", - "verify_type", - "work_code", - "terminal_sn", - "terminal_alias", - "area_alias", - "longitude", - "latitude", - "gps_location", - "mobile", - "column_break_14", - "source", - "purpose", - "crc", - "is_attendance", - "reserved", - "upload_time", - "sync_status", - "sync_time", - "emp", - "terminal", - "transaction_fetch_log", - "employee_checkin" - ], - "fields": [ - { - "fieldname": "id", - "fieldtype": "Data", - "in_list_view": 1, - "label": "ID", - "read_only": 1 - }, - { - "fieldname": "emp_code", - "fieldtype": "Data", - "in_list_view": 1, - "label": "Emp Code", - "read_only": 1 - }, - { - "fieldname": "punch_time", - "fieldtype": "Data", - "in_list_view": 1, - "label": "Punch Time", - "read_only": 1 - }, - { - "fieldname": "punch_state", - "fieldtype": "Data", - "in_list_view": 1, - "label": "Punch State", - "read_only": 1 - }, - { - "fieldname": "verify_type", - "fieldtype": "Data", - "label": "Verify Type", - "read_only": 1 - }, - { - "fieldname": "work_code", - "fieldtype": "Data", - "label": "Work Code", - "read_only": 1 - }, - { - "fieldname": "terminal_sn", - "fieldtype": "Data", - "label": "Terminal SN", - "read_only": 1 - }, - { - "fieldname": "terminal_alias", - "fieldtype": "Data", - "label": "Terminal Alias", - "read_only": 1 - }, - { - "fieldname": "area_alias", - "fieldtype": "Data", - "label": "Area Alias", - "read_only": 1 - }, - { - "fieldname": "longitude", - "fieldtype": "Data", - "label": "Longitude", - "read_only": 1 - }, - { - "fieldname": "latitude", - "fieldtype": "Data", - "label": "Latitude", - "read_only": 1 - }, - { - "fieldname": "gps_location", - "fieldtype": "Data", - "label": "GPS Location", - "read_only": 1 - }, - { - "fieldname": "mobile", - "fieldtype": "Data", - "label": "Mobile", - "read_only": 1 - }, - { - "fieldname": "source", - "fieldtype": "Data", - "label": "Source", - "read_only": 1 - }, - { - "fieldname": "purpose", - "fieldtype": "Data", - "label": "Purpose", - "read_only": 1 - }, - { - "fieldname": "crc", - "fieldtype": "Data", - "label": "CRC", - "read_only": 1 - }, - { - "fieldname": "is_attendance", - "fieldtype": "Data", - "label": "Is Attendance", - "read_only": 1 - }, - { - "fieldname": "reserved", - "fieldtype": "Data", - "label": "Reserved", - "read_only": 1 - }, - { - "fieldname": "upload_time", - "fieldtype": "Data", - "label": "Upload Time", - "read_only": 1 - }, - { - "fieldname": "sync_status", - "fieldtype": "Data", - "label": "Sync Status", - "read_only": 1 - }, - { - "fieldname": "sync_time", - "fieldtype": "Data", - "label": "Sync Time", - "read_only": 1 - }, - { - "fieldname": "emp", - "fieldtype": "Data", - "in_list_view": 1, - "label": "Emp", - "read_only": 1 - }, - { - "fieldname": "terminal", - "fieldtype": "Data", - "label": "Terminal", - "read_only": 1 - }, - { - "fieldname": "transaction_fetch_log", - "fieldtype": "Link", - "label": "Transaction Fetch Log", - "options": "Transaction Fetch Log", - "read_only": 1 - }, - { - "fieldname": "employee_checkin", - "fieldtype": "Link", - "label": "Employee Checkin", - "options": "Employee Checkin", - "read_only": 1 - }, - { - "fieldname": "column_break_14", - "fieldtype": "Column Break" - }, - { - "fieldname": "status", - "fieldtype": "Select", - "in_list_view": 1, - "in_standard_filter": 1, - "label": "Status", - "options": "\nLinked\nWaiting\nError", - "read_only": 1 - } - ], - "modified": "2020-01-09 13:48:29.455490", - "modified_by": "yousef@dsr.com", - "module": "Payware", - "name": "Transactions Log", - "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", - "title_field": "emp_code", - "track_changes": 1 -} \ No newline at end of file diff --git a/payware/payware/doctype/transactions_log/transactions_log.py b/payware/payware/doctype/transactions_log/transactions_log.py deleted file mode 100644 index bfebee6..0000000 --- a/payware/payware/doctype/transactions_log/transactions_log.py +++ /dev/null @@ -1,10 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright (c) 2020, Aakvatech and contributors -# For license information, please see license.txt - -from __future__ import unicode_literals -# import frappe -from frappe.model.document import Document - -class TransactionsLog(Document): - pass diff --git a/payware/payware/loan.js b/payware/payware/loan.js deleted file mode 100644 index 82f6f85..0000000 --- a/payware/payware/loan.js +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2018, Aakvatech Limited and contributors -// For license information, please see license.txt - -frappe.ui.form.on('Loan', { - refresh: function(frm) { - if(!frm.doc.__islocal) { - frm.add_custom_button(__('Redo Repayment Schedule'), function() { - redo_repayment_schedule(cur_frm); - }); - } - } -}); - -var redo_repayment_schedule = function(frm){ - var doc = frm.doc; - frappe.call({ - method: "payware.payware.utils.redo_repayment_schedule", - args: { - loan_name: doc.name - }, - callback: function(){ - cur_frm.reload_doc(); - } - }); -}; \ No newline at end of file diff --git a/payware/payware/print_format/payware_loan_agreement/__init__.py b/payware/payware/print_format/payware_loan_agreement/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/payware/payware/print_format/payware_loan_agreement/payware_loan_agreement.json b/payware/payware/print_format/payware_loan_agreement/payware_loan_agreement.json deleted file mode 100644 index 5b58b6a..0000000 --- a/payware/payware/print_format/payware_loan_agreement/payware_loan_agreement.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "align_labels_right": 0, - "creation": "2020-04-03 10:19:26.959893", - "css": ".print-format {\r\n margin-left: -0mm !important;\r\n margin-right: -0mm !important;\r\n margin-top: 0mm !important;\r\n margin-bottom: 0mm !important;\r\n padding-top: 5mm !important;\r\n}\r\n\r\nbody {\r\n margin: 0 !important;\r\n border: 0 !important;\r\n padding: 0mm 0mm 0mm !important;\r\n }\r\n\r\n.print-format td, .print-format th {\r\n vertical-align: top !important;\r\n padding: 1px !important;\r\n}\r\n\r\nh1, .h1, h2, .h2, h3, .h3 {\r\n margin-top: 0px;\r\n margin-bottom: 0px;\r\n}\r\n\r\nhr {\r\n margin-top: 3px;\r\n margin-bottom: 3px;\r\n border: 0;\r\n border-top: 2px solid #d1d8dd;\r\n}", - "custom_format": 0, - "disabled": 0, - "doc_type": "Loan", - "docstatus": 0, - "doctype": "Print Format", - "font": "Default", - "format_data": "[{\"fieldname\": \"print_heading_template\", \"fieldtype\": \"Custom HTML\", \"options\": \"
\\r\\n\\r\\n\\r\\n\\r\\n\\r\\n\\r\\n\\r\\n\\r\\n
\\r\\n

LOAN AGREEMENT

\\r\\n
\\r\\n {{ doc.name }}\\r\\n
\\r\\n
\"}, {\"label\": \"\", \"fieldtype\": \"Section Break\"}, {\"fieldtype\": \"Column Break\"}, {\"fieldname\": \"applicant_name\", \"label\": \"Applicant Name\", \"print_hide\": 0}, {\"fieldtype\": \"Column Break\"}, {\"fieldname\": \"posting_date\", \"label\": \"Posting Date\", \"print_hide\": 0}, {\"label\": \"Loan Details\", \"fieldtype\": \"Section Break\"}, {\"fieldtype\": \"Column Break\"}, {\"align\": \"left\", \"fieldname\": \"loan_amount\", \"label\": \"Loan Amount\", \"print_hide\": 0}, {\"fieldname\": \"disbursement_date\", \"label\": \"Disbursement Date\", \"print_hide\": 0}, {\"align\": \"left\", \"fieldname\": \"repayment_start_date\", \"label\": \"Repayment Date\", \"print_hide\": 0}, {\"fieldtype\": \"Column Break\"}, {\"fieldname\": \"repayment_method\", \"label\": \"Repayment Method\", \"print_hide\": 0}, {\"align\": \"left\", \"fieldname\": \"repayment_periods\", \"label\": \"Repayment Months\", \"print_hide\": 0}, {\"align\": \"left\", \"fieldname\": \"monthly_repayment_amount\", \"label\": \"Monthly Amount\", \"print_hide\": 0}, {\"label\": \"Account Info\", \"fieldtype\": \"Section Break\"}, {\"fieldtype\": \"Column Break\"}, {\"fieldname\": \"mode_of_payment\", \"label\": \"Mode of Payment\", \"print_hide\": 0}, {\"fieldtype\": \"Column Break\"}, {\"label\": \"Repayment Schedule\", \"fieldtype\": \"Section Break\"}, {\"fieldtype\": \"Column Break\"}, {\"fieldname\": \"repayment_schedule\", \"label\": \"Repayment Schedule\", \"visible_columns\": [{\"print_width\": \"\", \"fieldname\": \"payment_date\", \"print_hide\": 0}, {\"print_width\": \"\", \"fieldname\": \"total_payment\", \"print_hide\": 0}, {\"print_width\": \"\", \"fieldname\": \"balance_loan_amount\", \"print_hide\": 0}], \"print_hide\": 0}, {\"label\": \"\", \"fieldtype\": \"Section Break\"}, {\"fieldtype\": \"Column Break\"}, {\"fieldtype\": \"HTML\", \"fieldname\": \"_custom_html\", \"label\": \"Custom HTML\", \"options\": \"\\r\\n\\r\\n\\r\\n\\r\\n\\r\\n\\r\\n\\r\\n\\r\\n\\r\\n\\r\\n\\r\\n\\r\\n\\r\\n\\r\\n\\r\\n\\r\\n\\r\\n\\r\\n\\r\\n\\r\\n\\r\\n\\r\\n\\r\\n\\r\\n
\\r\\n

I _________________________________________________ verify that the above loan and deduction details are correct. I authorise my Employer to deduct the loan amount in installments as mentioned above from my monthly pay. In the event I resign or my contract is terminated I authorise my Employer to deduct the full amount due from my termination pay or salary

\\r\\n
\\r\\n

 

\\r\\n

_____________________________

\\r\\n
\\r\\n

 

\\r\\n

_____________________________

\\r\\n
SignatureDate
\\r\\n
\\r\\n We, the undersigned Gurantors agree to pay the balance loan as per the above schedule from our salaries should the employee fail to pay his loan
\\r\\n

 

\\r\\n

_____________________________

\\r\\n
\\r\\n

 

\\r\\n

_____________________________

\\r\\n
First Gurantrotor Namesm, Signature and DateSecond Gurantrotor Namesm, Signature and Date
\", \"print_hide\": 0}]", - "idx": 0, - "line_breaks": 0, - "modified": "2020-04-06 10:20:30.550369", - "modified_by": "Administrator", - "module": "Payware", - "name": "Payware Loan Agreement", - "owner": "Administrator", - "print_format_builder": 1, - "print_format_type": "Jinja", - "raw_printing": 0, - "show_section_headings": 0, - "standard": "Yes" -} \ No newline at end of file diff --git a/payware/payware/print_format/payware_loan_form/__init__.py b/payware/payware/print_format/payware_loan_form/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/payware/payware/print_format/payware_loan_form/payware_loan_form.json b/payware/payware/print_format/payware_loan_form/payware_loan_form.json deleted file mode 100644 index 227d3de..0000000 --- a/payware/payware/print_format/payware_loan_form/payware_loan_form.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "align_labels_right": 0, - "creation": "2019-05-02 15:29:39.530020", - "custom_format": 0, - "disabled": 0, - "doc_type": "Loan", - "docstatus": 0, - "doctype": "Print Format", - "font": "Default", - "idx": 0, - "line_breaks": 0, - "modified": "2019-05-02 16:14:53.718749", - "modified_by": "Administrator", - "module": "Payware", - "name": "Payware Loan Form", - "owner": "Administrator", - "print_format_builder": 1, - "show_section_headings": 0, - "standard": "Yes" -} \ No newline at end of file diff --git a/payware/payware/print_format/payware_payslip/__init__.py b/payware/payware/print_format/payware_payslip/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/payware/payware/print_format/payware_payslip/payware_payslip.json b/payware/payware/print_format/payware_payslip/payware_payslip.json deleted file mode 100644 index 1fdc1a3..0000000 --- a/payware/payware/print_format/payware_payslip/payware_payslip.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "align_labels_right": 0, - "creation": "2020-03-04 10:07:03.411539", - "css": ".print-format {\n margin-left: -0mm !important;\n margin-right: -0mm !important;\n margin-top: 0mm !important;\n margin-bottom: 0mm !important;\n padding-top: 5mm !important;\n}\n\nbody {\n margin: 0 !important;\n border: 0 !important;\n padding: 0mm 0mm 0mm !important;\n }\n \n.data-field {\n margin-top: 0px !important;\n margin-bottom: 0px !important;\n}\n.print-format th {\n vertical-align: top !important;\n padding: 2px !important;\n}\n\n.print-format td {\n vertical-align: top !important;\n padding: 2px !important;\n}\n\n.print-heading {\n display: none;\n}\n\n", - "custom_format": 0, - "disabled": 0, - "doc_type": "Salary Slip", - "docstatus": 0, - "doctype": "Print Format", - "font": "Arial", - "format_data": "[{\"options\": \"
\\n

Salary Slip
{{ doc.name }}

\\n
\", \"fieldname\": \"print_heading_template\", \"fieldtype\": \"Custom HTML\"}, {\"label\": \"\", \"fieldtype\": \"Section Break\"}, {\"fieldtype\": \"Column Break\"}, {\"options\": \"

{{ doc.company }}

\\n

Payslip

\", \"fieldname\": \"_custom_html\", \"print_hide\": 0, \"fieldtype\": \"HTML\", \"label\": \"Custom HTML\"}, {\"fieldtype\": \"Column Break\"}, {\"options\": \"

{{ doc.company }}

\\n

Payslip

\", \"fieldname\": \"_custom_html\", \"print_hide\": 0, \"fieldtype\": \"HTML\", \"label\": \"Custom HTML\"}, {\"label\": \"\", \"fieldtype\": \"Section Break\"}, {\"fieldtype\": \"Column Break\"}, {\"fieldname\": \"employee\", \"print_hide\": 0, \"align\": \"left\", \"label\": \"Employee ID\"}, {\"fieldname\": \"employee_name\", \"print_hide\": 0, \"label\": \"Employee Name\"}, {\"fieldname\": \"department\", \"print_hide\": 0, \"label\": \"Department\"}, {\"fieldname\": \"designation\", \"print_hide\": 0, \"label\": \"Designation\"}, {\"fieldname\": \"total_working_days\", \"print_hide\": 0, \"label\": \"Working Days\"}, {\"fieldname\": \"leave_without_pay\", \"print_hide\": 0, \"label\": \"Leave Without Pay\"}, {\"fieldname\": \"payment_days\", \"print_hide\": 0, \"label\": \"Payment Days\"}, {\"fieldname\": \"start_date\", \"print_hide\": 0, \"label\": \"Start Date\"}, {\"fieldname\": \"end_date\", \"print_hide\": 0, \"label\": \"End Date\"}, {\"fieldtype\": \"Column Break\"}, {\"fieldname\": \"employee\", \"print_hide\": 0, \"align\": \"left\", \"label\": \"Employee ID\"}, {\"fieldname\": \"employee_name\", \"print_hide\": 0, \"label\": \"Employee Name\"}, {\"fieldname\": \"department\", \"print_hide\": 0, \"label\": \"Department\"}, {\"fieldname\": \"designation\", \"print_hide\": 0, \"label\": \"Designation\"}, {\"fieldname\": \"total_working_days\", \"print_hide\": 0, \"label\": \"Working Days\"}, {\"fieldname\": \"leave_without_pay\", \"print_hide\": 0, \"label\": \"Leave Without Pay\"}, {\"fieldname\": \"payment_days\", \"print_hide\": 0, \"label\": \"Payment Days\"}, {\"fieldname\": \"start_date\", \"print_hide\": 0, \"label\": \"Start Date\"}, {\"fieldname\": \"end_date\", \"print_hide\": 0, \"label\": \"End Date\"}, {\"label\": \"Earnings\", \"fieldtype\": \"Section Break\"}, {\"fieldtype\": \"Column Break\"}, {\"options\": \"Earnings\\n\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n {% for item in doc.earnings %}\\n {% if item.do_not_include_in_total == 0 %}\\n \\n \\n \\n \\n \\n {% endif %}\\n {% endfor %}\\n \\n \\n \\n \\n \\n \\n \\n \\n
SrComponentAmount
{{ loop.index }}{{ item.salary_component }}{{ item.get_formatted(\\\"amount\\\", doc) }}\\n
Total Earnings{{ doc.get_formatted(\\\"gross_pay\\\", doc) }}
\\n\\nDeductions\\n\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n {% for item in doc.deductions %}\\n {% if item.do_not_include_in_total == 0 %}\\n \\n \\n \\n \\n \\n {% endif %}\\n {% endfor %}\\n \\n \\n \\n \\n \\n \\n \\n \\n
SrComponentAmount
{{ loop.index }}{{ item.salary_component }}{{ item.get_formatted(\\\"amount\\\", doc) }}\\n
Total Deductions{{ doc.get_formatted(\\\"total_deduction\\\", doc) }}
\", \"fieldname\": \"_custom_html\", \"print_hide\": 0, \"fieldtype\": \"HTML\", \"label\": \"Custom HTML\"}, {\"fieldname\": \"total_loan_repayment\", \"print_hide\": 0, \"label\": \"Total Loan Repayment\"}, {\"fieldname\": \"net_pay\", \"print_hide\": 0, \"label\": \"Net Pay\"}, {\"fieldname\": \"total_in_words\", \"print_hide\": 0, \"label\": \"Total in words\"}, {\"fieldtype\": \"Column Break\"}, {\"options\": \"Earnings\\n\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n {% for item in doc.earnings %}\\n {% if item.do_not_include_in_total == 0 %}\\n \\n \\n \\n \\n \\n {% endif %}\\n {% endfor %}\\n \\n \\n \\n \\n \\n \\n \\n \\n
SrComponentAmount
{{ loop.index }}{{ item.salary_component }}{{ item.get_formatted(\\\"amount\\\", doc) }}\\n
Total Earnings{{ doc.get_formatted(\\\"gross_pay\\\", doc) }}
\\n\\nDeductions\\n\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n {% for item in doc.deductions %}\\n {% if item.do_not_include_in_total == 0 %}\\n \\n \\n \\n \\n \\n {% endif %}\\n {% endfor %}\\n \\n \\n \\n \\n \\n \\n \\n \\n
SrComponentAmount
{{ loop.index }}{{ item.salary_component }}{{ item.get_formatted(\\\"amount\\\", doc) }}\\n
Total Deductions{{ doc.get_formatted(\\\"total_deduction\\\", doc) }}
\", \"fieldname\": \"_custom_html\", \"print_hide\": 0, \"fieldtype\": \"HTML\", \"label\": \"Custom HTML\"}, {\"fieldname\": \"total_loan_repayment\", \"print_hide\": 0, \"label\": \"Total Loan Repayment\"}, {\"fieldname\": \"net_pay\", \"print_hide\": 0, \"label\": \"Net Pay\"}, {\"fieldname\": \"total_in_words\", \"print_hide\": 0, \"label\": \"Total in words\"}, {\"label\": \"\", \"fieldtype\": \"Section Break\"}, {\"fieldtype\": \"Column Break\"}, {\"options\": \"
\\n
\\n


\\n
\\n
\\n


_______________________\\n
\\n
\", \"fieldname\": \"_custom_html\", \"print_hide\": 0, \"fieldtype\": \"HTML\", \"label\": \"Custom HTML\"}, {\"fieldtype\": \"Column Break\"}]", - "idx": 0, - "line_breaks": 0, - "modified": "2020-03-30 18:26:40.126207", - "modified_by": "Administrator", - "module": "Payware", - "name": "Payware Payslip", - "owner": "Administrator", - "parent": "Salary Slip", - "print_format_builder": 1, - "print_format_type": "Jinja", - "raw_printing": 0, - "show_section_headings": 0, - "standard": "Yes" -} \ No newline at end of file diff --git a/payware/payware/print_format/wcf_3_v2/__init__.py b/payware/payware/print_format/wcf_3_v2/__init__.py deleted file mode 100755 index e69de29..0000000 diff --git a/payware/payware/print_format/wcf_3_v2/wcf_3_v2.json b/payware/payware/print_format/wcf_3_v2/wcf_3_v2.json deleted file mode 100755 index 2479895..0000000 --- a/payware/payware/print_format/wcf_3_v2/wcf_3_v2.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "align_labels_right": 0, - "creation": "2018-05-22 21:46:35.287125", - "custom_format": 1, - "disabled": 0, - "doc_type": "PaywareList", - "docstatus": 0, - "doctype": "Print Format", - "font": "Default", - "idx": 0, - "line_breaks": 0, - "modified": "2018-05-22 21:46:53.714145", - "modified_by": "Administrator", - "module": "Payware", - "name": "WCF-3 v2", - "owner": "Administrator", - "print_format_builder": 1, - "print_format_type": "Server", - "show_section_headings": 0, - "standard": "Yes" -} \ No newline at end of file diff --git a/payware/payware/report/__init__.py b/payware/payware/report/__init__.py deleted file mode 100755 index e69de29..0000000 diff --git a/payware/payware/report/bank_report/__init__.py b/payware/payware/report/bank_report/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/payware/payware/report/bank_report/bank_report.html b/payware/payware/report/bank_report/bank_report.html deleted file mode 100755 index b27495a..0000000 --- a/payware/payware/report/bank_report/bank_report.html +++ /dev/null @@ -1,108 +0,0 @@ - - -{% - var from_date = filters.from_date; - var to_date = filters.to_date; - var total_rows = data.length - 1; - var total_net_pay = data[total_rows][ __("Net Pay")]; - - var net_pay_in_words = ""; - - frappe.call({ - method: "payware.payware.utils.money_in_words", - args: { - number: total_net_pay - }, - async:false, - callback: function(r){ - if (r.message){ - net_pay_in_words = r.message; - } - } - }); -%} - -

Ref. No. {%= data[0][ __("Payroll Entry")] %}

-

Date: {%= frappe.datetime.global_date_format(data[0][ __("Cheque Date")]) %}

-

-To,
-Branch Manager,
-{%= data[0][ __("Bank Name")] %},
-{%= data[0][ __("Branch")] %} Branch,
-{%= data[0][ __("Address1")] %},
-{%= data[0][ __("City")] %}, {%= data[0][ __("Country")] %}.
-
-Dear Sir,

- -Sub: Credit of Salaries of Employees to their respective Saving Accounts for the month of {%= data[0][ __("Month")] %}

- -Kindly refer to the subject matter. For the same kindly find attached the following statement showing the amount to be credited to the employees account maintained with you. We are enclosing Cheque Number  {%= data[0][ __("Cheque No.")] %}  dated  {%= frappe.datetime.global_date_format(data[0][ __("Cheque Date")]) %}  drawn favoring yourself for the {%= format_currency(total_net_pay) %} [{%= net_pay_in_words %}].

- - - - - - - - - - - - - - - - - - - - {% for(var i=0, l=data.length; i - - - - - - - {% } %} - - - - - - -
{%= __("SR No.") %}{%= __("Employee ID") %}{%= __("Employee Name") %}{%= __("Account No.") %}{%= __("Net Pay") %}
{%= i+1 %}{%= data[i][ __("Employee ID")] %}{%= data[i][ __("Employee Name")] %}{%= data[i][ __("Account No.")] %}{%= data[i][ __("Net Pay")].toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2}) %}
TOTAL - {%= total_net_pay.toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2}) %}
-

-Kindly affect the transfers today only.

-For and on behalf of
-{%= data[0][ __("Company")] %}



-________________________________
-Authorised Signatory
\ No newline at end of file diff --git a/payware/payware/report/bank_report/bank_report.js b/payware/payware/report/bank_report/bank_report.js deleted file mode 100755 index 9d2911b..0000000 --- a/payware/payware/report/bank_report/bank_report.js +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2016, Aakvatech and contributors -// For license information, please see license.txt -/* eslint-disable */ - -frappe.query_reports["Bank Report"] = { - "filters": [ - { - "fieldname":"from_date", - "label": __("From Date"), - "fieldtype": "Date", - "default": frappe.datetime.add_months(frappe.datetime.get_today(), -1), - "reqd": 1, - "width": "60px" - }, - { - "fieldname":"to_date", - "label": __("To Date"), - "fieldtype": "Date", - "default": frappe.datetime.get_today(), - "reqd": 1, - "width": "60px" - }, - ] -} diff --git a/payware/payware/report/bank_report/bank_report.json b/payware/payware/report/bank_report/bank_report.json deleted file mode 100644 index a851239..0000000 --- a/payware/payware/report/bank_report/bank_report.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "add_total_row": 1, - "creation": "2020-03-04 10:07:04.122150", - "disable_prepared_report": 0, - "disabled": 0, - "docstatus": 0, - "doctype": "Report", - "idx": 0, - "is_standard": "Yes", - "modified": "2020-08-31 15:10:21.649682", - "modified_by": "Administrator", - "module": "Payware", - "name": "Bank Report", - "owner": "Administrator", - "prepared_report": 0, - "query": "SELECT\tdate_format(ss.start_date, '%%M %%Y') AS \"Month::140\",\n\t\tss.employee\t\tAS \"Employee ID::120\", \n\t\tss.employee_name\tAS \"Employee Name::200\", \n\t\tss.bank_account_no\tAS \"Account No.::120\", \n\t\temp.bank_code\t\tAS \"Bank Code.::120\", \n\t\tss.net_pay\t\tAS \"Net Pay:Currency:120\",\n\t\tconcat(cmp.abbr, '/', date_format(ss.start_date, '%%M %%Y/%%d')) AS \"Payroll Entry::140\",\n\t\tpe.cheque_number\tAS \"Cheque No.::120\", \n\t\tpe.cheque_date\t\tAS \"Cheque Date::120\", \n\t\tss.company\t\tAS \"Company::120\",\n\t\tb.bank AS \"Bank Name::120\",\n\t\tb.branch_code AS \"Branch::120\",\n\t\tadr.address_line1 AS \"Address1::120\",\n\t\tadr.city AS \"City::120\",\n\t\tadr.country AS \"Country::120\"\nFROM \t`tabSalary Slip` ss\n\tLEFT JOIN `tabEmployee` emp ON ss.employee = emp.name\n\tLEFT JOIN `tabPayroll Entry` pe ON ss.payroll_entry = pe.name\n\tLEFT OUTER JOIN `tabCompany` cmp ON ss.company = cmp.name \n\tLEFT JOIN `tabBank Account` b ON pe.bank_account_for_transfer = b.name\n\tLEFT JOIN `tabAddress` adr ON pe.bank_account_for_transfer = adr.address_title\nWHERE\temp.salary_mode = 'Bank'\nAND \tss.start_date >= %(from_date)s\nAND \tss.end_date <= %(to_date)s", - "ref_doctype": "Salary Slip", - "report_name": "Bank Report", - "report_type": "Query Report", - "roles": [ - { - "role": "System Manager" - }, - { - "role": "Accounts Manager" - }, - { - "role": "HR Manager" - } - ] -} \ No newline at end of file diff --git a/payware/payware/report/hold_payment/__init__.py b/payware/payware/report/hold_payment/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/payware/payware/report/hold_payment/hold_payment.html b/payware/payware/report/hold_payment/hold_payment.html deleted file mode 100644 index cacd5bf..0000000 --- a/payware/payware/report/hold_payment/hold_payment.html +++ /dev/null @@ -1,10 +0,0 @@ -

- Testing -

-{% - comp_domain = frappe.db.get_value("Company", "R and K Trucking", "domain"); - console.log(comp_domain); - mydata = frappe.db.get_value("Company", "R and K Trucking", "domain") -%} - -{{ mydata.json() }} diff --git a/payware/payware/report/hold_payment/hold_payment.json b/payware/payware/report/hold_payment/hold_payment.json deleted file mode 100644 index e6ebd20..0000000 --- a/payware/payware/report/hold_payment/hold_payment.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "add_total_row": 1, - "creation": "2019-08-01 12:30:28.719491", - "disable_prepared_report": 0, - "disabled": 0, - "docstatus": 0, - "doctype": "Report", - "idx": 0, - "is_standard": "Yes", - "json": "{\"order_by\": \"`tabSalary Slip`.`modified` desc\", \"add_total_row\": 1, \"fields\": [[\"posting_date\", \"Salary Slip\"], [\"employee\", \"Salary Slip\"], [\"employee_name\", \"Salary Slip\"], [\"docstatus\", \"Salary Slip\"], [\"net_pay\", \"Salary Slip\"]], \"column_widths\": {\"employee\": 208, \"posting_date\": 91, \"employee_name\": 110, \"name\": 197, \"net_pay\": 200}, \"add_totals_row\": 0, \"filters\": [], \"page_length\": 20}", - "modified": "2019-08-01 12:34:24.198978", - "modified_by": "Administrator", - "module": "Payware", - "name": "Hold Payment", - "owner": "Administrator", - "prepared_report": 0, - "ref_doctype": "Salary Slip", - "report_name": "Hold Payment", - "report_type": "Report Builder", - "roles": [ - { - "role": "HR Manager" - }, - { - "role": "HR User" - }, - { - "role": "Employee" - }, - { - "role": "System Manager" - } - ] -} \ No newline at end of file diff --git a/payware/payware/report/itx219.01.e___sdl_monthly_return/__init__.py b/payware/payware/report/itx219.01.e___sdl_monthly_return/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/payware/payware/report/itx219.01.e___sdl_monthly_return/itx219.01.e___sdl_monthly_return.json b/payware/payware/report/itx219.01.e___sdl_monthly_return/itx219.01.e___sdl_monthly_return.json deleted file mode 100644 index 16c99f3..0000000 --- a/payware/payware/report/itx219.01.e___sdl_monthly_return/itx219.01.e___sdl_monthly_return.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "add_total_row": 0, - "creation": "2019-06-21 15:32:51.712217", - "disable_prepared_report": 0, - "disabled": 0, - "docstatus": 0, - "doctype": "Report", - "idx": 0, - "is_standard": "Yes", - "modified": "2019-06-21 15:45:17.198809", - "modified_by": "Administrator", - "module": "Payware", - "name": "ITX219.01.E - SDL Monthly Return", - "owner": "Administrator", - "prepared_report": 0, - "query": "SELECT\tsum(gross_pay) as \"Gross Pay:Currency:\",\n\tsum(sd.amount) as \"SDL:Currency:\",\n\tss.company as \"Company:Data:0\",\n\tcmp.tax_id as \"TIN:Data:0\",\n\tcmp.email as \"Email:Data:0\",\n\tcmp.phone_no as \"Phone:Data:0\",\n\tcmp.fax as \"Fax Number:Data:0\",\n\tcmp.p_o_box as \"P O Box:Data:0\",\n\tcmp.street as \"Street:Data:0\",\n\tcmp.plot_number as \"Plot Number:Data:0\",\n\tcmp.block_number as \"Block Number:Data:0\",\n\tcmp.city as \"City:Data:0\"\nFROM `tabSalary Slip` ss LEFT OUTER JOIN `tabSalary Detail` sd\tON sd.parent = ss.name \n\t\t\t LEFT OUTER JOIN `tabCompany` cmp \tON ss.company = cmp.name \nWHERE\tss.start_date >= %(from_date)s\nAND\tss.end_date <= %(to_date)s\nORDER BY ss.start_date\n", - "ref_doctype": "Salary Slip", - "report_name": "ITX219.01.E - SDL Monthly Return", - "report_type": "Query Report", - "roles": [ - { - "role": "HR Manager" - }, - { - "role": "HR User" - }, - { - "role": "Employee" - }, - { - "role": "System Manager" - } - ] -} \ No newline at end of file diff --git a/payware/payware/report/itx_215.01.e___paye_withheld_part_1/__init__.py b/payware/payware/report/itx_215.01.e___paye_withheld_part_1/__init__.py deleted file mode 100755 index e69de29..0000000 diff --git a/payware/payware/report/itx_215.01.e___paye_withheld_part_1/itx_215.01.e___paye_withheld_part_1.html b/payware/payware/report/itx_215.01.e___paye_withheld_part_1/itx_215.01.e___paye_withheld_part_1.html deleted file mode 100755 index f1a0ec4..0000000 --- a/payware/payware/report/itx_215.01.e___paye_withheld_part_1/itx_215.01.e___paye_withheld_part_1.html +++ /dev/null @@ -1,279 +0,0 @@ - - -{% var start_date = filters.from_date %} -{% var end_date = filters.to_date %} -{% var tin = data[0][ __("tax_id")] %} - -{% if ( end_date[5]+ end_date[6] == "06") { %} -{% var tick1 = "X" %} -{% } %} - -{% if ( end_date[5]+ end_date[6] == "12") { %} -{% var tick2 = "X" %} -{% } %} - -

- -

- -

-
P.A.Y.E.
- STATEMENT AND PAYMENT OF TAX WITHHELD -

-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - -
YEAR{%= start_date[0] %}{%= start_date[1] %}{%= start_date[2] %}{%= start_date[3] %}
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
TIN{%= tin[0] %}{%= tin[1] %}{%= tin[2] %}{%= tin[4] %}{%= tin[5] %}{%= tin[6] %}{%= tin[8] %}{%= tin[9] %}{%= tin[10] %}
-
- Period (Please tick appropriate)
- - - - - - - - - - - -
{%= tick1 %}From 1 January to 30 June
- - - - - - - - - - - -
{%= tick2 %}From 1 June to 31 December
-
- Name of Employer -
- {%= data[0][ __("company")] %} -
-
- Postal Address
-
-
-
P. O. Box
-
-
-
{%= data[0][ __("pobox")] %}
-
-
-
-  
-
-
-
Postal City
-
-
-
{%= data[0][ __("city")] %}
-
-
-
- Contact Number
-
-
-
Phone number
-
-
-
{%= data[0][ __("phone_no")] %}
-
-
-
-  
-
-
-
Second Phone
-
-
-
 
-
-
-
-
-
-
Third number
-
-
-
 
-
-
-
-
-
-
Fax number
-
-
-
 
-
-
-
-
-
-
email address
-
-
-
{%= data[0][ __("email")] %}
-
-
-
- Physica Address
-
-
-
Plot Number
-
-
-
{%= data[0][ __("plot_no")] %}
-
-
-
-  
-
-
-
Block Number
-
-
-
{%= data[0][ __("block_no")] %}
-
-
-
-
-
-
Street/Location
-
-
-
{%= data[0][ __("street")] %}
-
-
-
-
-
-
Name of Branch
-
-
-
 
-
-
-
-

\ No newline at end of file diff --git a/payware/payware/report/itx_215.01.e___paye_withheld_part_1/itx_215.01.e___paye_withheld_part_1.js b/payware/payware/report/itx_215.01.e___paye_withheld_part_1/itx_215.01.e___paye_withheld_part_1.js deleted file mode 100755 index 2cd65e2..0000000 --- a/payware/payware/report/itx_215.01.e___paye_withheld_part_1/itx_215.01.e___paye_withheld_part_1.js +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2016, Aakvatech and contributors -// For license information, please see license.txt -/* eslint-disable */ - -frappe.query_reports["ITX 215.01.E - PAYE Withheld Part 1"] = { - "filters": [ - { - "fieldname":"from_date", - "label": __("From Date"), - "fieldtype": "Date", - "default": frappe.datetime.add_months(frappe.datetime.get_today(), -1), - "reqd": 1, - "width": "60px" - }, - { - "fieldname":"to_date", - "label": __("To Date"), - "fieldtype": "Date", - "default": frappe.datetime.get_today(), - "reqd": 1, - "width": "60px" - } - ] -} diff --git a/payware/payware/report/itx_215.01.e___paye_withheld_part_1/itx_215.01.e___paye_withheld_part_1.json b/payware/payware/report/itx_215.01.e___paye_withheld_part_1/itx_215.01.e___paye_withheld_part_1.json deleted file mode 100755 index 777d1a3..0000000 --- a/payware/payware/report/itx_215.01.e___paye_withheld_part_1/itx_215.01.e___paye_withheld_part_1.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "add_total_row": 0, - "columns": [], - "creation": "2020-03-04 10:07:03.918859", - "disable_prepared_report": 0, - "disabled": 0, - "docstatus": 0, - "doctype": "Report", - "filters": [], - "idx": 0, - "is_standard": "Yes", - "modified": "2021-07-27 09:44:53.200829", - "modified_by": "Administrator", - "module": "Payware", - "name": "ITX 215.01.E - PAYE Withheld Part 1", - "owner": "Administrator", - "prepared_report": 0, - "query": "SELECT MIN(ss.start_date) AS \"Start Date::100\", \n MAX(ss.end_date) AS \"End Date::100\", \n ss.employee_name AS \"Employee Name:Data:0\",\n SUM(IF (sd.salary_component = 'Basic', sd.amount, 0)) AS basic,\n SUM(IF (sd.salary_component = 'Housing Allowance', sd.amount, 0)) AS housing,\n SUM(IF (sd.salary_component = 'Basic', ss.gross_pay, 0)) - (SUM(IF (sd.salary_component = 'Basic', sd.amount, 0)) + SUM(IF (sd.salary_component = 'Housing Allowance', sd.amount, 0))) AS other,\n SUM(IF (sd.salary_component = 'Basic', ss.gross_pay, 0)) AS gross,\n SUM(IF (sd.salary_component = 'NSSF', sd.amount, 0)) AS nssf,\n SUM(IF (sd.salary_component = 'PAYE', sd.amount, 0)) AS paye,\n ss.company AS \"Company:Data:0\", \n cmp.tax_id, \n cmp.email AS \"Email:Data:0\", \n cmp.phone_no AS phone_no,\n cmp.fax AS \"Fax Number:Data:0\", \n pwspob.value as pobox,\n pwsst.value as street,\n pwspn.value AS plot_no,\n pwsbn.value AS block_no,\n pwscty.value AS city\nFROM `tabSalary Slip` ss LEFT OUTER JOIN `tabSalary Detail` sd ON ss.name = sd.parent\n LEFT OUTER JOIN `tabCompany` cmp ON ss.company = cmp.name \n JOIN `tabSingles` pwspob ON pwspob.doctype = \"Payware Settings\" AND pwspob.field = \"p_o_box\" \n JOIN `tabSingles` pwsst ON pwsst.doctype = \"Payware Settings\" AND pwsst.field = \"street\" \n JOIN `tabSingles` pwspn ON pwspn.doctype = \"Payware Settings\" AND pwspn.field = \"plot_number\" \n JOIN `tabSingles` pwsbn ON pwsbn.doctype = \"Payware Settings\" AND pwsbn.field = \"block_number\" \n JOIN `tabSingles` pwscty ON pwscty.doctype = \"Payware Settings\" AND pwscty.field = \"city\" \nWHERE ss.start_date >= %(from_date)s \nAND ss.end_date <= %(to_date)s \nAND ss.docstatus = 1 \nGROUP BY ss.employee_name ", - "ref_doctype": "Salary Slip", - "report_name": "ITX 215.01.E - PAYE Withheld Part 1", - "report_type": "Query Report", - "roles": [ - { - "role": "HR User" - }, - { - "role": "HR User" - }, - { - "role": "HR Manager" - }, - { - "role": "HR Manager" - } - ] -} \ No newline at end of file diff --git a/payware/payware/report/itx_215.01.e___paye_withheld_part_2/__init__.py b/payware/payware/report/itx_215.01.e___paye_withheld_part_2/__init__.py deleted file mode 100755 index e69de29..0000000 diff --git a/payware/payware/report/itx_215.01.e___paye_withheld_part_2/itx_215.01.e___paye_withheld_part_2.html b/payware/payware/report/itx_215.01.e___paye_withheld_part_2/itx_215.01.e___paye_withheld_part_2.html deleted file mode 100755 index bad0ed0..0000000 --- a/payware/payware/report/itx_215.01.e___paye_withheld_part_2/itx_215.01.e___paye_withheld_part_2.html +++ /dev/null @@ -1,240 +0,0 @@ - - -{% var start_date = filters.from_date %} -{% var end_date = filters.to_date %} -{% var tin = data[0][ __("tax_id")] %} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {% - var basic_total=0; - var housing_total=0; - var other_total=0; - var gross_total=0; - var nssf_total=0; - var tax_amount_total=0; - var paye_total=0; - %} - {% for(var i=0, l=data.length; i<=l-2; i++) { %} - {% - var taxable_amount = data[i][ __("gross")] - data[i][ __("nssf")]; - var basic = data[i][ __("basic")]|| 0; - var housing = data[i][ __("housing")]|| 0; - var other = data[i][ __("other")]|| 0; - var gross = data[i][ __("gross")]|| 0; - var paye = data[i][ __("paye")]|| 0; - var nssf = data[i][ __("nssf")]|| 0; - - var basic_total = basic_total + basic; - var housing_total= housing_total + housing; - var other_total = other_total + other; - var gross_total = gross_total + gross; - var nssf_total = nssf_total + nssf; - var tax_amount_total = tax_amount_total + taxable_amount; - var paye_total = paye_total + paye; - %} - - - - - - - - - - - - - - {% } %} - - - - - - - - - - - - - - -
- - P.A.Y.E. - DETAILS OF PAYMENT OF TAX WITHHELD

-
- - - - - - - - - - - -
- Name of Employer: - - {%= data[0][ __("company")] %} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
TIN{%= tin[0] %}{%= tin[1] %}{%= tin[2] %} - {%= tin[4] %}{%= tin[5] %}{%= tin[6] %} - {%= tin[8] %}{%= tin[9] %}{%= tin[10] %}
-
-
-
SINAME OF EMPLOYEEPAYROLL
NUMBER
POSTAL ADDRESSPOSTAL CITYBASIC PAYHOUSINGALLOWANCES AND BENEFITGROSS PAYDEDUCTION (NSSF)TAXABLE AMOUNTTAX DUE
{%= i+1 %}{%= data[i][ __("employee_name")] %}{%= data[i][ __("employee")] %}   - {%= basic.toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2}) %} - - {%= housing.toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2}) %} - - {%= other.toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2}) %} - - {%= gross.toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2}) %} - - {%= nssf.toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2}) %} - - {%= taxable_amount.toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2}) %} - - {%= paye.toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2}) %} -
 TOTAL - {%= basic_total.toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2}) %} - - {%= housing_total.toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2}) %} - - {%= other_total.toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2}) %} - - {%= gross_total.toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2}) %} - - {%= nssf_total.toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2}) %} - - {%= tax_amount_total.toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2}) %} - - {%= paye_total.toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2}) %} -
diff --git a/payware/payware/report/itx_215.01.e___paye_withheld_part_2/itx_215.01.e___paye_withheld_part_2.js b/payware/payware/report/itx_215.01.e___paye_withheld_part_2/itx_215.01.e___paye_withheld_part_2.js deleted file mode 100755 index 1080fee..0000000 --- a/payware/payware/report/itx_215.01.e___paye_withheld_part_2/itx_215.01.e___paye_withheld_part_2.js +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2016, Aakvatech and contributors -// For license information, please see license.txt -/* eslint-disable */ - -frappe.query_reports["ITX 215.01.E - PAYE Withheld Part 2"] = { - "filters": [ - { - "fieldname":"from_date", - "label": __("From Date"), - "fieldtype": "Date", - "default": frappe.datetime.add_months(frappe.datetime.get_today(), -1), - "reqd": 1, - "width": "60px" - }, - { - "fieldname":"to_date", - "label": __("To Date"), - "fieldtype": "Date", - "default": frappe.datetime.get_today(), - "reqd": 1, - "width": "60px" - } - ] -} diff --git a/payware/payware/report/itx_215.01.e___paye_withheld_part_2/itx_215.01.e___paye_withheld_part_2.json b/payware/payware/report/itx_215.01.e___paye_withheld_part_2/itx_215.01.e___paye_withheld_part_2.json deleted file mode 100755 index 9997d22..0000000 --- a/payware/payware/report/itx_215.01.e___paye_withheld_part_2/itx_215.01.e___paye_withheld_part_2.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "add_total_row": 0, - "columns": [], - "creation": "2020-01-14 06:37:53.756184", - "disable_prepared_report": 0, - "disabled": 0, - "docstatus": 0, - "doctype": "Report", - "filters": [], - "idx": 0, - "is_standard": "Yes", - "modified": "2021-07-27 11:41:21.067110", - "modified_by": "Administrator", - "module": "Payware", - "name": "ITX 215.01.E - PAYE Withheld Part 2", - "owner": "Administrator", - "prepared_report": 0, - "query": "SELECT MIN(ss.start_date) AS \"Start Date::100\", \n MAX(ss.end_date) AS \"End Date::100\",\n ss.employee,\n ss.employee_name AS \"Employee Name:Data:0\",\n SUM(IF (sd.salary_component = 'Basic', sd.amount, 0)) AS basic,\n SUM(IF (sd.salary_component = 'Housing Allowance', sd.amount, 0)) AS housing,\n SUM(IF (sd.salary_component = 'Basic', ss.gross_pay, 0)) - (SUM(IF (sd.salary_component = 'Basic', sd.amount, 0)) + SUM(IF (sd.salary_component = 'Housing Allowance', sd.amount, 0))) AS other,\n SUM(IF (sd.salary_component = 'Basic', ss.gross_pay, 0)) AS gross,\n SUM(IF (sd.salary_component = 'NSSF', sd.amount, 0)) AS nssf,\n SUM(IF (sd.salary_component = 'PAYE', sd.amount, 0)) AS paye,\n ss.company AS \"Company:Data:0\", \n cmp.tax_id, \n cmp.email AS \"Email:Data:0\", \n cmp.phone_no AS phone_no,\n cmp.fax AS \"Fax Number:Data:0\", \n pwspob.value as pobox,\n pwsst.value as street,\n pwspn.value AS plot_no,\n pwsbn.value AS block_no,\n pwscty.value AS city\nFROM `tabSalary Slip` ss LEFT OUTER JOIN `tabSalary Detail` sd ON ss.name = sd.parent\n LEFT OUTER JOIN `tabCompany` cmp ON ss.company = cmp.name \n JOIN `tabSingles` pwspob ON pwspob.doctype = \"Payware Settings\" AND pwspob.field = \"p_o_box\" \n JOIN `tabSingles` pwsst ON pwsst.doctype = \"Payware Settings\" AND pwsst.field = \"street\" \n JOIN `tabSingles` pwspn ON pwspn.doctype = \"Payware Settings\" AND pwspn.field = \"plot_number\" \n JOIN `tabSingles` pwsbn ON pwsbn.doctype = \"Payware Settings\" AND pwsbn.field = \"block_number\" \n JOIN `tabSingles` pwscty ON pwscty.doctype = \"Payware Settings\" AND pwscty.field = \"city\" \nWHERE ss.start_date >= %(from_date)s \nAND ss.end_date <= %(to_date)s \nAND ss.docstatus = 1 \nGROUP BY ss.employee_name \nORDER by ss.employee", - "ref_doctype": "Salary Slip", - "report_name": "ITX 215.01.E - PAYE Withheld Part 2", - "report_type": "Query Report", - "roles": [ - { - "role": "HR User" - }, - { - "role": "HR User" - }, - { - "role": "HR Manager" - }, - { - "role": "HR Manager" - } - ] -} \ No newline at end of file diff --git a/payware/payware/report/itx_219.01.e___sdl___monthly_return/__init__.py b/payware/payware/report/itx_219.01.e___sdl___monthly_return/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/payware/payware/report/itx_219.01.e___sdl___monthly_return/itx_219.01.e___sdl___monthly_return.html b/payware/payware/report/itx_219.01.e___sdl___monthly_return/itx_219.01.e___sdl___monthly_return.html deleted file mode 100644 index bee673b..0000000 --- a/payware/payware/report/itx_219.01.e___sdl___monthly_return/itx_219.01.e___sdl___monthly_return.html +++ /dev/null @@ -1,341 +0,0 @@ - - -{% var start_date = filters.from_date %} -{% var end_date = filters.to_date %} -{% var tin = data[0][ __("TIN")] %} -{% var sdl_rate = data[0][ __("SDL Rate")] %} - - - -{% - - var subtotalA = data[0][ __("Basic pay")] + data[0][ __("Leave pay")] + data[0][ __("Sick pay")] + - data[0][ __("Payment in Lieu of Leave")] + data[0][ __("Fees")] + - data[0][ __("Commission")] + data[0][ __("Bonus")]; - - var subtotalB = data[0][ __("Gratuity")] + data[0][ __("Subsistence Allowance")] + data[0][ __("Traveling Allowance")] + - data[0][ __("Entertainment Allowance")] + data[0][ __("Housing Allowance")] + - data[0][ __("Any Other Allowances")]; - - var grand_total = subtotalA + subtotalB; - -%} -

- -

-

- SKILLS AND DEVELOPMENT LEVY
- MONTHLY RETURN - -

- - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - -
YEAR{%= start_date[0] %}{%= start_date[1] %}{%= start_date[2] %}{%= start_date[3] %}
-
 
-
TO:
-
COMMISIONER FOR DOMESTIC REVENUE
-
 
- EMPLOYER’S INFORMATION - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
TIN{%= tin[0] %}{%= tin[1] %}{%= tin[2] %}{%= tin[4] %}{%= tin[5] %}{%= tin[6] %}{%= tin[8] %}{%= tin[9] %}{%= tin[10] %}
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Name of Employer:
- - - - - - - - - -
- {%= data[0][ __("Company")] %} -
-
 
Postal Address:
P. O. Box{%= data[0][ __("P O Box")] %}Postal City{%= data[0][ __("City")] %}
 
Physical Adddress:
Plot Number{%= data[0][ __("Plot Number")] %}Block Number {%= data[0][ __("Block Number")] %}
 
Street/Location{%= data[0][ __("Street")] %}
-
-
- I forward herewith SDL Return for the month of    {%= data[0][ __("Month")] %}    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
EMOLUMENTSAMOUNT / TZSEMOLUMENTSAMOUNT / TZS
Basic pay{%= data[0][ __("Basic pay")].toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2}) %}Gratuity{%= data[0][ __("Gratuity")].toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2}) %}
Leave pay{%= data[0][ __("Leave pay")].toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2}) %}Subsistence Allowance *){%= data[0][ __("Subsistence Allowance")].toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2}) %}
Sick pay{%= data[0][ __("Sick pay")].toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2}) %}Traveling Allowance *){%= data[0][ __("Traveling Allowance")].toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2}) %}
Payment in Lieu of leave{%= data[0][ __("Gratuity")].toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2}) %}Entertainment Allowance *){%= data[0][ __("Gratuity")].toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2}) %}
Fees{%= data[0][ __("Fees")].toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2}) %}Any other Allowance *){%= data[0][ __("Any Other Allowances")].toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2}) %}
Commission{%= data[0][ __("Gratuity")].toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2}) %}Housing Allowance{%= data[0][ __("Housing Allowance")].toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2}) %}
Bonus{%= data[0][ __("Bonus")].toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2}) %}Subtotal B{%= subtotalB.toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2}) %}
Subtotal A{%= subtotalA.toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2}) %}Grand Total (A+B){%= grand_total.toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2}) %}
Whereof SDL at {%= sdl_rate %}%
amounts to
{%= data[0][ __("SDL")].toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2}) %}
- Payment made at the Bank Branch …………………………………………………………………….. -

- Through Payment Slip/Deposit Slip …………………… dated………………………………………... -

- Signature: ………………………………………………….. Date: ……………………………………… -
- Rubber Stamp: - -
diff --git a/payware/payware/report/itx_219.01.e___sdl___monthly_return/itx_219.01.e___sdl___monthly_return.js b/payware/payware/report/itx_219.01.e___sdl___monthly_return/itx_219.01.e___sdl___monthly_return.js deleted file mode 100755 index c5d6f5c..0000000 --- a/payware/payware/report/itx_219.01.e___sdl___monthly_return/itx_219.01.e___sdl___monthly_return.js +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2016, Aakvatech and contributors -// For license information, please see license.txt -/* eslint-disable */ - -frappe.query_reports["ITX 219.01.E - SDL - Monthly Return"] = { - "filters": [ - { - "fieldname":"from_date", - "label": __("From Date"), - "fieldtype": "Date", - "default": frappe.datetime.month_start(), - "reqd": 1, - "width": "60px" - }, - { - "fieldname":"to_date", - "label": __("To Date"), - "fieldtype": "Date", - "default": frappe.datetime.month_end(), - "reqd": 1, - "width": "60px" - } - ] -} diff --git a/payware/payware/report/itx_219.01.e___sdl___monthly_return/itx_219.01.e___sdl___monthly_return.json b/payware/payware/report/itx_219.01.e___sdl___monthly_return/itx_219.01.e___sdl___monthly_return.json deleted file mode 100644 index a16235b..0000000 --- a/payware/payware/report/itx_219.01.e___sdl___monthly_return/itx_219.01.e___sdl___monthly_return.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "add_total_row": 0, - "creation": "2020-02-17 17:35:48.916111", - "disable_prepared_report": 0, - "disabled": 0, - "docstatus": 0, - "doctype": "Report", - "idx": 0, - "is_standard": "Yes", - "modified": "2020-02-22 09:28:22.326557", - "modified_by": "Administrator", - "module": "Payware", - "name": "ITX 219.01.E - SDL - Monthly Return", - "owner": "Administrator", - "prepared_report": 0, - "query": "SELECT sum(if(sd.parentfield = 'earnings' and sd.do_not_include_in_total = 0 and sc.sdl_emolument_category = 'Basic pay', sd.amount, 0)) as \"Basic pay:Currency:\",\r\n sum(if(sd.parentfield = 'earnings' and sd.do_not_include_in_total = 0 and sc.sdl_emolument_category = 'Leave pay', sd.amount, 0)) as \"Leave pay:Currency:\",\r\n sum(if(sd.parentfield = 'earnings' and sd.do_not_include_in_total = 0 and sc.sdl_emolument_category = 'Sick pay', sd.amount, 0)) as \"Sick pay:Currency:\",\r\n sum(if(sd.parentfield = 'earnings' and sd.do_not_include_in_total = 0 and sc.sdl_emolument_category = 'Payment in Lieu of Leave', sd.amount, 0)) as \"Payment in Lieu of Leave:Currency:\",\r\n sum(if(sd.parentfield = 'earnings' and sd.do_not_include_in_total = 0 and sc.sdl_emolument_category = 'Fees', sd.amount, 0)) as \"Fees:Currency:\",\r\n sum(if(sd.parentfield = 'earnings' and sd.do_not_include_in_total = 0 and sc.sdl_emolument_category = 'Commission', sd.amount, 0)) as \"Commission:Currency:\",\r\n sum(if(sd.parentfield = 'earnings' and sd.do_not_include_in_total = 0 and sc.sdl_emolument_category = 'Bonus', sd.amount, 0)) as \"Bonus:Currency:\",\r\n sum(if(sd.parentfield = 'earnings' and sd.do_not_include_in_total = 0 and sc.sdl_emolument_category = 'Gratuity', sd.amount, 0)) as \"Gratuity:Currency:\",\r\n sum(if(sd.parentfield = 'earnings' and sd.do_not_include_in_total = 0 and sc.sdl_emolument_category = 'Subsistence Allowance', sd.amount, 0)) as \"Subsistence Allowance:Currency:\",\r\n sum(if(sd.parentfield = 'earnings' and sd.do_not_include_in_total = 0 and sc.sdl_emolument_category = 'Traveling Allowance', sd.amount, 0)) as \"Traveling Allowance:Currency:\",\r\n sum(if(sd.parentfield = 'earnings' and sd.do_not_include_in_total = 0 and sc.sdl_emolument_category = 'Entertainment Allowance', sd.amount, 0)) as \"Entertainment Allowance:Currency:\",\r\n sum(if(sd.parentfield = 'earnings' and sd.do_not_include_in_total = 0 and sc.sdl_emolument_category = 'Housing Allowance', sd.amount, 0)) as \"Housing Allowance:Currency:\",\r\n sum(if(sd.parentfield = 'earnings' and sd.do_not_include_in_total = 0 and sc.sdl_emolument_category = 'Any Other Allowances', sd.amount, 0)) as \"Any Other Allowances:Currency:\",\r\n sum(if(sd.salary_component = 'SDL', sd.amount, 0)) as \"SDL:Currency:\",\r\n ss.company as \"Company:Data:0\",\r\n cmp.tax_id as \"TIN:Data:0\",\r\n cmp.email as \"Email:Data:0\",\r\n cmp.phone_no as \"Phone:Data:0\",\r\n cmp.fax as \"Fax Number:Data:0\",\r\n pwspob.value as \"P O Box:Data:0\",\r\n pwsst.value as \"Street:Data:0\",\r\n pwspn.value as \"Plot Number:Data:0\",\r\n pwsbn.value as \"Block Number:Data:0\",\r\n pwscty.value as \"City:Data:0\",\r\n pwssdl.value as \"SDL Rate:Data:0\",\r\n DATE_FORMAT(ss.start_date, '%%M %%Y') as \"Month:Data:0\"\r\nFROM `tabSalary Slip` ss LEFT OUTER JOIN `tabSalary Detail` sd ON sd.parent = ss.name\r\n LEFT OUTER JOIN `tabCompany` cmp ON ss.company = cmp.name \r\n LEFT OUTER JOIN `tabSalary Component` sc ON sd.salary_component = sc.name and sc.type = 'Earning'\r\n JOIN `tabSingles` pwspob ON pwspob.doctype = \"Payware Settings\" and pwspob.field = \"p_o_box\"\r\n JOIN `tabSingles` pwsst ON pwsst.doctype = \"Payware Settings\" and pwsst.field = \"street\"\r\n JOIN `tabSingles` pwspn ON pwspn.doctype = \"Payware Settings\" and pwspn.field = \"plot_number\"\r\n JOIN `tabSingles` pwsbn ON pwsbn.doctype = \"Payware Settings\" and pwsbn.field = \"block_number\"\r\n JOIN `tabSingles` pwscty ON pwscty.doctype = \"Payware Settings\" and pwscty.field = \"city\"\r\n JOIN `tabSingles` pwssdl ON pwssdl.doctype = \"Payware Settings\" and pwssdl.field = \"skills_development_levy\"\r\nWHERE ss.start_date = %(from_date)s\r\nAND ss.end_date = %(to_date)s\r\nAND ss.docstatus = 1", - "ref_doctype": "Salary Slip", - "report_name": "ITX 219.01.E - SDL - Monthly Return", - "report_type": "Query Report", - "roles": [ - { - "role": "HR Manager" - }, - { - "role": "HR User" - }, - { - "role": "Employee" - }, - { - "role": "System Manager" - }, - { - "role": "Accounts User" - }, - { - "role": "Accounts Manager" - } - ] -} \ No newline at end of file diff --git "a/payware/payware/report/itx_220.01.e___employer\342\200\231s_half_year_certificate/__init__.py" "b/payware/payware/report/itx_220.01.e___employer\342\200\231s_half_year_certificate/__init__.py" deleted file mode 100644 index e69de29..0000000 diff --git "a/payware/payware/report/itx_220.01.e___employer\342\200\231s_half_year_certificate/itx_220.01.e___employer\342\200\231s_half_year_certificate.html" "b/payware/payware/report/itx_220.01.e___employer\342\200\231s_half_year_certificate/itx_220.01.e___employer\342\200\231s_half_year_certificate.html" deleted file mode 100755 index 77bcab2..0000000 --- "a/payware/payware/report/itx_220.01.e___employer\342\200\231s_half_year_certificate/itx_220.01.e___employer\342\200\231s_half_year_certificate.html" +++ /dev/null @@ -1,492 +0,0 @@ - - -{% -var start_date = filters.from_date; -var end_date = filters.to_date; -var tin = data[0][ __("tin")]; -%} - -{% -if ( end_date[5]+ end_date[6] == "06") { -var tick1 = "X"; -} - -if ( end_date[5]+ end_date[6] == "12") { -var tick2 = "X"; -} -var sdl_rate = data[0][ __("sdl_rate")] -%} - - -

- -

-

- SKILLS AND DEVELOPMENT LEVY
- EMPLOYER’S HALF YEAR CERTIFICATE -

-
- - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - -
YEAR{%= start_date[0] %}{%= start_date[1] %}{%= start_date[2] %}{%= start_date[3] %}
-
-
-

- (To be submitted to the TRA office within 30 days after the end of each six-month calendar - period) -

-
-
EMPLOYER’S INFORMATION
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
TIN{%= tin[0] %}{%= tin[1] %}{%= tin[2] %}{%= tin[4] %}{%= tin[5] %}{%= tin[6] %}{%= tin[8] %}{%= tin[9] %}{%= tin[10] %}
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 
- Name of Employer: -
- - - - - - - - - -
- {%= data[0][ __("company")] %} -
-
 
- Postal Address: -
- P. O. Box - {%= data[0][ __("pobox")] %} - Postal City - {%= data[0][ __("city")] %}
 
- Physical Adddress: -
- Plot Number - - {%= data[0][ __("plot_no")] %} - - Block Number - - {%= data[0][ __("block_no")] %} -
 
- Street/Location - {%= data[0][ __("street")] - %}
 
- Nature of business -
 
- State whether an Entity or Individual: -
-
- -
SUMMARY OF GROSS EMOLUMENTS AND TAX PAID DURING THE YEAR -
- - - - - - - - - - - - - - - - - {% for(var i=0, l=data.length; i - - - - - - - {% - } - else { - var tgp = data[i][ __("gross")].toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2}); - var tsdl = data[i][ __("sdl")].toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2}); - %} - - - - - - - - {% - } - } - %} - -
MonthPayment to
permanent
employees/TZS
Payment to
casual
employees/TZS
Total gross
emoluments
TZS
Amount of
SDL paid
TZS
{%= data[i][ __("month")] %} - {%= data[i][ __("gross")].toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2}) %} - - {%= data[i][ __("gross")].toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2}) %} - - {%= data[i][ __("sdl")].toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2}) %} -
TOTAL - {%= data[i][ __("gross")].toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2}) %} - - {%= data[i][ __("gross")].toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2}) %} - - {%= data[i][ __("sdl")].toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2}) %} -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 
- The amount of gross emoluments paid during the period from (please tick the appropriate box) -
- - - - - - - - - - - - - - - - - - - -
{%= tick1 %} - From 1 January to 30 June -
  
{%= tick2 %} - From 1 January to 31 December -
-
 
- added up to TZS -
- {%= tgp %} -
- and {%= sdl_rate %}% thereof is -
- {%= tsdl %} -
-
 
- DECLARATION -

- I certify that the particulars entered on the form SDL already submitted monthly for the period - indicated above are correct. -

- Name of the Employer/Paying Officer -
- Title: Mr.
 
Mrs
 
Ms
  -
- - - - - - - - - - - - - - - - - - - - - - -
     
First Name Middle Name SurName
-
- Signature and rubber stamp of the Employer/Paying Officer -


- .......................................................................... -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 Day Month Year
Date          
-
- diff --git "a/payware/payware/report/itx_220.01.e___employer\342\200\231s_half_year_certificate/itx_220.01.e___employer\342\200\231s_half_year_certificate.js" "b/payware/payware/report/itx_220.01.e___employer\342\200\231s_half_year_certificate/itx_220.01.e___employer\342\200\231s_half_year_certificate.js" deleted file mode 100755 index 864a5cb..0000000 --- "a/payware/payware/report/itx_220.01.e___employer\342\200\231s_half_year_certificate/itx_220.01.e___employer\342\200\231s_half_year_certificate.js" +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2016, Aakvatech and contributors -// For license information, please see license.txt -/* eslint-disable */ - -frappe.query_reports["ITX 220.01.E - Employer’s Half Year Certificate"] = { - "filters": [ - { - "fieldname":"from_date", - "label": __("From Date"), - "fieldtype": "Date", - "default": frappe.datetime.add_months(frappe.datetime.get_today(), -1), - "reqd": 1, - "width": "60px" - }, - { - "fieldname":"to_date", - "label": __("To Date"), - "fieldtype": "Date", - "default": frappe.datetime.get_today(), - "reqd": 1, - "width": "60px" - } - ] -} diff --git "a/payware/payware/report/itx_220.01.e___employer\342\200\231s_half_year_certificate/itx_220.01.e___employer\342\200\231s_half_year_certificate.json" "b/payware/payware/report/itx_220.01.e___employer\342\200\231s_half_year_certificate/itx_220.01.e___employer\342\200\231s_half_year_certificate.json" deleted file mode 100644 index 5a76b5d..0000000 --- "a/payware/payware/report/itx_220.01.e___employer\342\200\231s_half_year_certificate/itx_220.01.e___employer\342\200\231s_half_year_certificate.json" +++ /dev/null @@ -1,36 +0,0 @@ -{ - "add_total_row": 1, - "columns": [], - "creation": "2020-03-04 10:07:03.999150", - "disable_prepared_report": 0, - "disabled": 0, - "docstatus": 0, - "doctype": "Report", - "filters": [], - "idx": 0, - "is_standard": "Yes", - "modified": "2021-07-27 18:14:15.898658", - "modified_by": "Administrator", - "module": "Payware", - "name": "ITX 220.01.E - Employer\u2019s Half Year Certificate", - "owner": "Administrator", - "prepared_report": 0, - "query": "SELECT\tdate_format(ss.start_date, \"%%M\") as month,\n\tSUM(IF (sd.salary_component = 'Basic', ss.gross_pay, 0)) AS gross,\n\tSUM(IF (sd.salary_component = 'SDL', sd.amount, 0)) AS sdl,\n\tss.company AS company,\n\tcmp.tax_id AS tin,\n\tpwssdl.value AS sdl_rate,\n pwspob.value as pobox,\n pwsst.value as street,\n pwspn.value AS plot_no,\n pwsbn.value AS block_no,\n pwscty.value AS city\nFROM `tabSalary Slip` ss \n LEFT OUTER JOIN `tabSalary Detail` sd ON ss.name = sd.parent\n LEFT OUTER JOIN `tabCompany` cmp ON ss.company = cmp.name \n\t\t JOIN `tabSingles` pwssdl ON pwssdl.doctype = \"Payware Settings\" AND pwssdl.field = 'skills_development_levy'\n JOIN `tabSingles` pwspob ON pwspob.doctype = \"Payware Settings\" AND pwspob.field = \"p_o_box\" \n JOIN `tabSingles` pwsst ON pwsst.doctype = \"Payware Settings\" AND pwsst.field = \"street\" \n JOIN `tabSingles` pwspn ON pwspn.doctype = \"Payware Settings\" AND pwspn.field = \"plot_number\" \n JOIN `tabSingles` pwsbn ON pwsbn.doctype = \"Payware Settings\" AND pwsbn.field = \"block_number\" \n JOIN `tabSingles` pwscty ON pwscty.doctype = \"Payware Settings\" AND pwscty.field = \"city\" \nWHERE\tss.start_date >= %(from_date)s\nAND\tss.end_date <= %(to_date)s\nAND ss.docstatus = 1\nGROUP BY date_format(ss.start_date, \"%%M\")\nORDER BY ss.start_date\n", - "ref_doctype": "Salary Slip", - "report_name": "ITX 220.01.E - Employer\u2019s Half Year Certificate", - "report_type": "Query Report", - "roles": [ - { - "role": "HR Manager" - }, - { - "role": "HR User" - }, - { - "role": "Employee" - }, - { - "role": "System Manager" - } - ] -} \ No newline at end of file diff --git a/payware/payware/report/itx_300.01.e___employment_taxes_payment_credit_slip/__init__.py b/payware/payware/report/itx_300.01.e___employment_taxes_payment_credit_slip/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/payware/payware/report/itx_300.01.e___employment_taxes_payment_credit_slip/itx_300.01.e___employment_taxes_payment_credit_slip.html b/payware/payware/report/itx_300.01.e___employment_taxes_payment_credit_slip/itx_300.01.e___employment_taxes_payment_credit_slip.html deleted file mode 100644 index 504035a..0000000 --- a/payware/payware/report/itx_300.01.e___employment_taxes_payment_credit_slip/itx_300.01.e___employment_taxes_payment_credit_slip.html +++ /dev/null @@ -1,406 +0,0 @@ -{% - - var th = ['','THOUSAND', 'MILLION', ' BILLION', 'TRILLION', 'QUADRILLION', 'QUINTILLION', 'SEXTILLION']; - var dg = ['ZERO','ONE','TWO','THREE','FOUR', 'FIVE','SIX','SEVEN','EIGHT','NINE']; - var tn = ['TEN','ELEVEN','TWELVE','THIRTEEN', 'FOURTEEN','FIFTEEN','SIXTEEN', 'SEVENTEEN','EIGHTEEN','NINETEEN']; - var tw = ['TWENTY','THIRTY','FORTY','FIFTY', 'SIXTY','SEVENTY','EIGHTY','NINETY']; - -function toWords(s){ - s = s.toString(); s = s.replace(/[\, ]/g,''); - if (s != parseFloat(s)) - return 'not a number'; - var x = s.indexOf('.'); - if (x == -1) x = s.length; - if (x > 15) return 'too big'; - var n = s.split(''); - var str = ''; - var sk = 0; - for (var i=0; i < x; i++) { - if ((x-i)%3==2) { - if (n[i] == '1') { - str += tn[Number(n[i+1])] + ' '; i++; sk=1; - }else if (n[i]!=0) { - str += tw[n[i]-2] + ' ';sk=1;} - } - else if (n[i]!=0) {str += dg[n[i]] +' '; - if ((x-i)%3==0) str += 'HUNDRED ';sk=1;} - if ((x-i)%3==1) {if (sk) str += th[(x-i-1)/3] + ' ';sk=0;} - } - str += ''; - if (x != s.length) { - var y = s.length; - var centStr = 'and '; - var hasNonZero = false; - for (var i=x+1; i 3 ? j % 3 : 0; - return s + (j ? i.substr(0, j) + t : "") + i.substr(j).replace(/(\d{3})(?=\d)/g, "$1" + t) + (c ? d + Math.abs(n - i).toFixed(c).slice(2) : ""); - } - -%} - - - -{% var start_date = filters.from_date %} -{% var end_date = filters.to_date %} -{% var tin = data[0][ __("TIN")] %} -{% - var total = data[0][ __("SDL")] + data[0][ __("PAYE")]; - var total_floor = Math.floor(total); - var total_cents = Math.floor((total - total_floor) * 100); - var total_floor_words = toWords(total_floor); - if (total_cents > 0) { - var cent_word = ' AND CENTS ' + toWords(total_cents); - } else { - var cent_word = ''; - } - var total_words = total_floor_words + cent_word + ' ONLY'; -%} - -

- -

- -

- DEPARTMENT………………………………

- EMPLOYMENT TAXES PAYMENT CREDIT SLIP -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- Employer's Name - - {%= data[0][ __("Company")] %} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
TIN{%= tin[0] %}{%= tin[1] %}{%= tin[2] %}{%= tin[4] %}{%= tin[5] %}{%= tin[6] %}{%= tin[8] %}{%= tin[9] %}{%= tin[10] %}
-
- Division/Branch - - P. O. Box {%= data[0][ __("P O Box")] %}, {%= data[0][ __("City")] %} - -   -
- Name of Bank - -   - - Branch - -   - - Taxpayer’s Bank A/c No. - -   -
- Employment Taxes Bank Account No: - -   - -   -
-
Bank Stamp and Teller’s Signature
-
-
-
Tax Debit Number(s)
(*)
-
- - - - - - - - - - - - - - - - - - - - - - - - - - -
         
 
         
-
-
- -
-     Regular (monthly) payment (tick if yes) (*) -
-     Other payments (tick if yes) (*) -
-     Nil-Statement PAYE (tick if yes) (*) -
-     NIL-Statement SDL (tick if yes (*) -
-   - - PAYE, amount TZS - -     {%= data[0][ __("PAYE")].toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2}) %} -
-   - - SDL, amount TZS - -     {%= data[0][ __("SDL")].toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2}) %} -
- Please accept for the credit of the Commissioner the sum of TZS - -     {%= total.toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2}) %} -
- In words (sum): - - TANZANIAN SHILLINGS {%= total_words %} -
-   -
- Payroll Month(s) for {%= data[0][ __("Month")] %} -
- If submitting cheques - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Cheque NoName of Bank / BranchAmount
   
   
   
   
TOTAL  
-
- - Declaration:
- I/We certify that the particulars entered on this form are correct.
- Name ______________________________________________ Stamp (if any):

- - Signature__________________________________

- Date: _________________ / _______________ / 20_________________

- Distribution by accepting bank:
- Original: for Taxpayer
- Duplicate: passed with bank statement to TRA
- Triplicate: for Bank

- - If a Nil –Statement is submitted (no payment is made),
- Submit this form on or before the due date directly to the appropriate Tax Office and not through the bank.
- In case of any difficulty in filling this form contact the Tax Office.
- (*) Do not mix up regular payments (monthly with debit payments (other payments) in one form
- -
-
- - For official use only - -
-
- - ITX300.01.E Employment Taxes Payment Credit Slip - -
diff --git a/payware/payware/report/itx_300.01.e___employment_taxes_payment_credit_slip/itx_300.01.e___employment_taxes_payment_credit_slip.js b/payware/payware/report/itx_300.01.e___employment_taxes_payment_credit_slip/itx_300.01.e___employment_taxes_payment_credit_slip.js deleted file mode 100755 index 6e0d53e..0000000 --- a/payware/payware/report/itx_300.01.e___employment_taxes_payment_credit_slip/itx_300.01.e___employment_taxes_payment_credit_slip.js +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2016, Aakvatech and contributors -// For license information, please see license.txt -/* eslint-disable */ - -frappe.query_reports["ITX 300.01.E - Employment Taxes Payment Credit Slip"] = { - "filters": [ - { - "fieldname":"from_date", - "label": __("From Date"), - "fieldtype": "Date", - "default": frappe.datetime.month_start(), - "reqd": 1, - "width": "60px" - }, - { - "fieldname":"to_date", - "label": __("To Date"), - "fieldtype": "Date", - "default": frappe.datetime.month_end(), - "reqd": 1, - "width": "60px" - } - ] -} diff --git a/payware/payware/report/itx_300.01.e___employment_taxes_payment_credit_slip/itx_300.01.e___employment_taxes_payment_credit_slip.json b/payware/payware/report/itx_300.01.e___employment_taxes_payment_credit_slip/itx_300.01.e___employment_taxes_payment_credit_slip.json deleted file mode 100644 index 9ce9d63..0000000 --- a/payware/payware/report/itx_300.01.e___employment_taxes_payment_credit_slip/itx_300.01.e___employment_taxes_payment_credit_slip.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "add_total_row": 0, - "creation": "2020-01-14 06:37:53.848184", - "disable_prepared_report": 0, - "disabled": 0, - "docstatus": 0, - "doctype": "Report", - "idx": 0, - "is_standard": "Yes", - "modified": "2020-01-24 18:32:53.691529", - "modified_by": "Administrator", - "module": "Payware", - "name": "ITX 300.01.E - Employment Taxes Payment Credit Slip", - "owner": "Administrator", - "prepared_report": 0, - "query": "SELECT sum(if(sd.salary_component = 'SDL', sd.amount, 0)) as \"SDL:Currency:\",\r\n\t\tsum(if(sd.salary_component = 'PAYE', sd.amount, 0)) as \"PAYE:Currency:\",\r\n\t\tss.company as \"Company:Data:0\",\r\n\t\tcmp.tax_id as \"TIN:Data:0\",\r\n\t\tcmp.email as \"Email:Data:0\",\r\n\t\tcmp.phone_no as \"Phone:Data:0\",\r\n\t\tcmp.fax as \"Fax Number:Data:0\",\r\n\t\tpwspob.value as \"P O Box:Data:0\",\r\n\t\tpwsst.value as \"Street:Data:0\",\r\n\t\tpwspn.value as \"Plot Number:Data:0\",\r\n\t\tpwsbn.value as \"Block Number:Data:0\",\r\n\t\tpwscty.value as \"City:Data:0\",\r\n\t\tpwssdl.value as \"SDL Rate:Data:0\",\r\n\t\tDATE_FORMAT(ss.start_date, '%%M %%Y') as \"Month:Data:0\"\r\nFROM `tabSalary Slip` ss LEFT OUTER JOIN `tabSalary Detail` sd ON sd.parent = ss.name \r\n\t\t\t\t\t\t\tLEFT OUTER JOIN `tabCompany` cmp ON ss.company = cmp.name \r\n\t\t\t\t\t\t\tLEFT OUTER JOIN `tabSalary Component` sc ON sd.salary_component = sc.name\r\n\t\t\t\t\t\t\tJOIN `tabSingles` pwspob ON pwspob.doctype = \"Payware Settings\" and pwspob.field = \"p_o_box\"\r\n\t\t\t\t\t\t\tJOIN `tabSingles` pwsst ON pwsst.doctype = \"Payware Settings\" and pwsst.field = \"street\"\r\n\t\t\t\t\t\t\tJOIN `tabSingles` pwspn ON pwspn.doctype = \"Payware Settings\" and pwspn.field = \"plot_number\"\r\n\t\t\t\t\t\t\tJOIN `tabSingles` pwsbn ON pwsbn.doctype = \"Payware Settings\" and pwsbn.field = \"block_number\"\r\n\t\t\t\t\t\t\tJOIN `tabSingles` pwscty ON pwscty.doctype = \"Payware Settings\" and pwscty.field = \"city\"\r\n\t\t\t\t\t\t\tJOIN `tabSingles` pwssdl ON pwssdl.doctype = \"Payware Settings\" and pwssdl.field = \"skills_development_levy\"\r\nWHERE ss.start_date = %(from_date)s\r\nAND ss.end_date = %(to_date)s\r\nAND ss.docstatus = 1", - "ref_doctype": "Salary Slip", - "report_name": "ITX 300.01.E - Employment Taxes Payment Credit Slip", - "report_type": "Query Report", - "roles": [ - { - "role": "HR Manager" - }, - { - "role": "HR User" - }, - { - "role": "Employee" - }, - { - "role": "System Manager" - } - ] -} \ No newline at end of file diff --git a/payware/payware/report/nssf_con.05/__init__.py b/payware/payware/report/nssf_con.05/__init__.py deleted file mode 100755 index e69de29..0000000 diff --git a/payware/payware/report/nssf_con.05/nssf_con.05.1 b/payware/payware/report/nssf_con.05/nssf_con.05.1 deleted file mode 100755 index c0ca618..0000000 --- a/payware/payware/report/nssf_con.05/nssf_con.05.1 +++ /dev/null @@ -1,184 +0,0 @@ - - - - -{%= data[0][__("Company")] %} - - \ No newline at end of file diff --git a/payware/payware/report/nssf_con.05/nssf_con.05.html b/payware/payware/report/nssf_con.05/nssf_con.05.html deleted file mode 100644 index 95665fe..0000000 --- a/payware/payware/report/nssf_con.05/nssf_con.05.html +++ /dev/null @@ -1,418 +0,0 @@ - - -{% var from_date = filters.from_date %} -{% var year = from_date[0] + from_date[1] + from_date[2] + from_date[3] %} -{% var pmethod = data[0][ __("Payment Method")] + " (" + data[0][ __("Ref No.")] + ")" %} -{% var page_no = 1 %} - -{% var total_nssf = 0 %} -{% var page_total = 0 %} -{% for(var i=0, l=data.length; i<=l-1; i++) { %} {% var total_nssf=total_nssf + data[i][("contribution")] %} {% } %} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {% for(var i=0, l=data.length; i<=l-1; i++) { %} - - - - - - - - - - {% var page_total = page_total + data[i][("contribution")] %} - {% if ((i+1)%20 == 0) { %} - - - - - - - - - - - -
-
-
- -
-
- -
-
- THE UNITED REPUBLIC OF TANZANIA
- NATIONAL SOCIAL SECURITY
- EMPLOYER CONTRIBUTION FORM -
-
-


-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- EMPLOYER DETAILS - - CONTRIBUTION DETAILS -
- Employer NSSF Reg. No - -
-  {%= data[0][("employer_number")] %} -
-
- Contribution Month - -
-  {%= data[0][("contribution_month")] %} -
-
- Employer Name - -
-  {%= data[0][("company")] %} -
-
- Amount - -
-  {%= total_nssf.toLocaleString(undefined, {minimumFractionDigits: 2, - maximumFractionDigits: 2}) %} -
-
- Postal Address - -
-  P. O. Box {%= data[0][("pobox")] %}, {%= data[0][("city")] %} -
-
- Control Number - -
-  {%= data[0][("control_no")] %} -
-
- Physical Address - -
-  {%= data[0][("address")] %} -
-
- Telephone/Mobile Number - -
-   -
-
-
S/NoMEMBERSHIP NONATIONAL ID NUMBERINSURED PERSON NAMEWAGES (GROSS SALARY)TOTAL CONTRIBUTION
FIRSTMIDDLESURNAME
{%= i+1 %}{%= data[i][("membership_no")] %}{%= data[i][("national_id")] %}{%= data[i][("first_name")] %}{%= data[i][("middle_name")] %}{%= data[i][("last_name")] %} - {%= data[i][("gross_pay")].toLocaleString(undefined, {minimumFractionDigits: 2, - maximumFractionDigits:2}) %} - - {%= data[i][("contribution")].toLocaleString(undefined, {minimumFractionDigits: 2, - maximumFractionDigits: 2}) %} -
- PAGE TOTAL - - - {%= page_total.toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2}) %} - -
- EMPLOYER OFFICE STAMP - - NSSF OFFICE STAMP -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {% } %} - {% } %} - - - - - - - - - - - - - - - -
-
-
- -
-
- -
-
- THE UNITED REPUBLIC OF TANZANIA
- NATIONAL SOCIAL SECURITY
- EMPLOYER CONTRIBUTION FORM -
-
-


-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- EMPLOYER DETAILS - - CONTRIBUTION DETAILS -
- Employer NSSF Reg. No - -
-  {%= data[0][("employer_number")] %} -
-
- Contribution Month - -
-  {%= data[0][("contribution_month")] %} -
-
- Employer Name - -
-  {%= data[0][("company")] %} -
-
- Amount - -
-  {%= total_nssf.toLocaleString(undefined, {minimumFractionDigits: 2, - maximumFractionDigits: 2}) %} -
-
- Postal Address - -
-  P. O. Box {%= data[0][("pobox")] %}, {%= data[0][("city")] %} -
-
- Control Number - -
-  {%= data[0][("control_no")] %} -
-
- Physical Address - -
-  {%= data[0][("address")] %} -
-
- Telephone/Mobile Number - -
-   -
-
-
S/NoMEMBERSHIP NONATIONAL ID NUMBER - INSURED PERSON NAME - WAGES (GROSS SALARY) - TOTAL CONTRIBUTION -
FIRSTMIDDLESURNAME
- PAGE TOTAL - - - {%= page_total.toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2}) - %} - -
- GRAND TOTAL - - - {%= total_nssf.toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2}) - %} - -
- EMPLOYER OFFICE STAMP - - NSSF OFFICE STAMP -
\ No newline at end of file diff --git a/payware/payware/report/nssf_con.05/nssf_con.05.js b/payware/payware/report/nssf_con.05/nssf_con.05.js deleted file mode 100755 index a783a50..0000000 --- a/payware/payware/report/nssf_con.05/nssf_con.05.js +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2016, Aakvatech and contributors -// For license information, please see license.txt -/* eslint-disable */ - -frappe.query_reports["NSSF-CON.05"] = { - "filters": [ - { - "fieldname":"from_date", - "label": __("From Date"), - "fieldtype": "Date", - "default": frappe.datetime.add_months(frappe.datetime.get_today(), -1), - "reqd": 1, - "width": "60px" - }, - { - "fieldname":"to_date", - "label": __("To Date"), - "fieldtype": "Date", - "default": frappe.datetime.get_today(), - "reqd": 1, - "width": "60px" - } - ] -} diff --git a/payware/payware/report/nssf_con.05/nssf_con.05.json b/payware/payware/report/nssf_con.05/nssf_con.05.json deleted file mode 100755 index c2aee5c..0000000 --- a/payware/payware/report/nssf_con.05/nssf_con.05.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "add_total_row": 0, - "columns": [], - "creation": "2020-02-17 17:35:48.735318", - "disable_prepared_report": 0, - "disabled": 0, - "docstatus": 0, - "doctype": "Report", - "filters": [], - "idx": 0, - "is_standard": "Yes", - "modified": "2021-07-09 17:07:47.693777", - "modified_by": "Administrator", - "module": "Payware", - "name": "NSSF-CON.05", - "owner": "Administrator", - "prepared_report": 0, - "query": "SELECT ss.employee AS emp_id, \r\n emp.pension_fund_number AS membership_no, \r\n emp.national_identity AS national_id, \r\n substring_index(ss.employee_name,\" \",1) AS first_name, \r\n substring_index(substring_index(ss.employee_name,\" \",2),\" \",-1) AS middle_name, \r\n substring_index(ss.employee_name,\" \",-1) AS last_name, \r\n SUM(ss.gross_pay) AS gross_pay, \r\n SUM(sd.amount * 2) AS contribution, \r\n ss.company AS \"Company::\", \r\n if(cp.p_o_box != '', cp.p_o_box, pobox.value) as \"pobox\", \r\n if(cp.city != '', cp.city, city.value) as \"city\", \r\n CONCAT(plot.value, '/', block.value, ' ', street.value) as address,\r\n social.value as employer_number,\r\n control_no.value as control_no,\r\n date_format(ss.start_date, '%%M %%Y') AS contribution_month\r\nFROM `tabSalary Slip` ss LEFT OUTER JOIN `tabSalary Detail` sd ON sd.parent = ss.name \r\n LEFT OUTER JOIN `tabEmployee` emp ON ss.employee = emp.name AND emp.pension_fund = 'NSSF' \r\n\t\t\t\t INNER JOIN `tabCompany` cp ON ss.company = cp.company_name \r\n LEFT OUTER JOIN `tabNSSF Payments` np ON np.payroll_month BETWEEN %(from_date)s AND %(to_date)s \r\n JOIN `tabSingles` social ON social.doctype = \"Payware Settings\" AND social.field = \"social_security_fund_registration_number\"\r\n JOIN `tabSingles` pobox ON pobox.doctype = \"Payware Settings\" AND pobox.field = \"p_o_box\"\r\n JOIN `tabSingles` city ON city.doctype = \"Payware Settings\" AND city.field = \"city\"\r\n JOIN `tabSingles` control_no ON control_no.doctype = \"Payware Settings\" AND control_no.field = \"social_security_control_number\"\r\n JOIN `tabSingles` plot ON plot.doctype = \"Payware Settings\" AND plot.field = \"plot_number\"\r\n JOIN `tabSingles` block ON block.doctype = \"Payware Settings\" AND block.field = \"block_number\"\r\n JOIN `tabSingles` street ON street.doctype = \"Payware Settings\" AND street.field = \"street\"\r\nWHERE sd.salary_component = 'NSSF' \r\nAND ss.docstatus = 1 \r\nAND ss.start_date >= %(from_date)s\r\nAND ss.end_date <= %(to_date)s\r\nGROUP BY ss.employee_name, ss.designation, emp.gender, emp.date_of_birth \r\nHAVING SUM(ss.gross_pay) > 0", - "ref_doctype": "Salary Slip", - "report_name": "NSSF-CON.05", - "report_type": "Query Report", - "roles": [ - { - "role": "System Manager" - }, - { - "role": "Accounts Manager" - }, - { - "role": "Accounts User" - }, - { - "role": "HR User" - }, - { - "role": "HR Manager" - } - ] -} \ No newline at end of file diff --git a/payware/payware/report/nssf_con.05/nssf_con.05.old b/payware/payware/report/nssf_con.05/nssf_con.05.old deleted file mode 100755 index 1f59005..0000000 --- a/payware/payware/report/nssf_con.05/nssf_con.05.old +++ /dev/null @@ -1,589 +0,0 @@ - - -{% var from_date = filters.from_date %} -{% var year = from_date[0] + from_date[1] + from_date[2] + from_date[3] %} -{% var pmethod = data[0][ __("Payment Method")] + " (" + data[0][ __("Ref No.")] + ")" %} -{% var page_no = 1 %} - -{% var total_nssf = 0 %} -{% var page_total = 0 %} -{% for(var i=0, l=data.length; i<=l-1; i++) { %} - {% var total_nssf = total_nssf + data[i][ __("Contribution")] %} -{% } %} - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

- -

- -
SR #MEMBER'S NAMENATIONAL ID NO. WAGESMEMBERSHIP NO.AMOUNT
TZS
REMARKS
- \ No newline at end of file diff --git a/payware/payware/report/payee_withheld_detail/__init__.py b/payware/payware/report/payee_withheld_detail/__init__.py deleted file mode 100755 index e69de29..0000000 diff --git a/payware/payware/report/payee_withheld_detail/payee_withheld_detail.json b/payware/payware/report/payee_withheld_detail/payee_withheld_detail.json deleted file mode 100755 index 15b9063..0000000 --- a/payware/payware/report/payee_withheld_detail/payee_withheld_detail.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "add_total_row": 0, - "creation": "2019-04-10 11:12:57.549381", - "disable_prepared_report": 0, - "disabled": 0, - "docstatus": 0, - "doctype": "Report", - "idx": 0, - "is_standard": "Yes", - "modified": "2019-04-15 23:10:36.718193", - "modified_by": "Administrator", - "module": "Payware", - "name": "Payee Withheld Detail", - "owner": "Administrator", - "prepared_report": 0, - "query": "select \n ss.start_date as \"Start Date::100\",\n ss.employee_name as \"Employee Name::180\",\n ss.designation as \"Job Title::140\",\n sum(sdbasic.amount) as \"Basic Salary:Currency:120\",\n sum(sdhousing.amount) as \"Housing Allowance:Currency:120\",\n sum(sdti.amount - sdbasic.amount - sdhousing.amount) as \"Other Allw and Benefits:Currency:120\",\n sum(ss.gross_pay) as \"Gross Pay:Currency:120\",\n sum(sdnssf.amount) as \"NSSF:Currency:120\",\n sum(sdpaye.amount) as \"PAYE:Currency:120\"\nfrom `tabSalary Slip` ss \nleft outer join `tabSalary Detail` sdbasic on sdbasic.parent = ss.name and sdbasic.salary_component = 'Basic'\nleft outer join `tabSalary Detail` sdhousing on sdhousing.parent = ss.name and sdhousing.salary_component = 'Housing'\nleft outer join `tabSalary Detail` sdti on sdti.parent = ss.name and sdti.salary_component = 'TI'\nleft outer join `tabSalary Detail` sdnssf on sdnssf.parent = ss.name and sdnssf.salary_component = 'NSSF'\nleft outer join `tabSalary Detail` sdpaye on sdpaye.parent = ss.name and sdpaye.salary_component = 'PAYE'\nleft join `tabEmployee` emp on ss.employee = emp.name\ngroup by ss.start_date, ss.employee_name, ss.designation, emp.gender, emp.date_of_birth\nhaving sum(ss.gross_pay) > 0", - "ref_doctype": "Salary Slip", - "report_name": "Payee Withheld Detail", - "report_type": "Query Report", - "roles": [ - { - "role": "System Manager" - } - ] -} \ No newline at end of file diff --git a/payware/payware/report/payroll_accounting/__init__.py b/payware/payware/report/payroll_accounting/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/payware/payware/report/payroll_accounting/payroll_accounting.json b/payware/payware/report/payroll_accounting/payroll_accounting.json deleted file mode 100644 index ef17e90..0000000 --- a/payware/payware/report/payroll_accounting/payroll_accounting.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "add_total_row": 0, - "creation": "2020-07-30 15:30:10.509504", - "disable_prepared_report": 0, - "disabled": 0, - "docstatus": 0, - "doctype": "Report", - "idx": 0, - "is_standard": "Yes", - "letter_head": "Payware Letterhead", - "modified": "2020-07-31 08:51:55.864795", - "modified_by": "Administrator", - "module": "Payware", - "name": "Payroll Accounting", - "owner": "Administrator", - "prepared_report": 0, - "query": "SELECT ss.name as \"Salary Structure\",\n sc.name as \"Salary Component\",\n sc.type as \"Salary Component Type\",\n ac.company as \"Company\",\n ac.name as \"Account\",\n ac.parent_account as \"Parent Account\",\n ac.root_type as \"Root Type\",\n ac.account_type as \"Account Type\"\nFROM `tabSalary Structure` ss\nINNER JOIN `tabSalary Detail` sd ON sd.parent = ss.name\nINNER JOIN `tabSalary Component` sc ON sc.name = sd.salary_component\nINNER JOIN `tabSalary Component Account` sca ON sca.parent = sc.name\nINNER JOIN `tabAccount` ac ON ac.name = sca.default_account AND ac.company = sca.company", - "ref_doctype": "Salary Structure", - "report_name": "Payroll Accounting", - "report_type": "Query Report", - "roles": [ - { - "role": "HR User" - }, - { - "role": "HR Manager" - } - ] -} \ No newline at end of file diff --git a/payware/payware/report/sdl_219_trial/__init__.py b/payware/payware/report/sdl_219_trial/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/payware/payware/report/sdl_219_trial/sdl_219_trial.js b/payware/payware/report/sdl_219_trial/sdl_219_trial.js deleted file mode 100644 index 87d260d..0000000 --- a/payware/payware/report/sdl_219_trial/sdl_219_trial.js +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) 2016, Aakvatech and contributors -// For license information, please see license.txt -/* eslint-disable */ - -frappe.query_reports["SDL 219 Trial"] = { - "filters": [ - - ] -}; diff --git a/payware/payware/report/sdl_219_trial/sdl_219_trial.json b/payware/payware/report/sdl_219_trial/sdl_219_trial.json deleted file mode 100644 index a428919..0000000 --- a/payware/payware/report/sdl_219_trial/sdl_219_trial.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "add_total_row": 1, - "creation": "2020-02-21 16:33:01.492148", - "disable_prepared_report": 0, - "disabled": 0, - "docstatus": 0, - "doctype": "Report", - "idx": 0, - "is_standard": "Yes", - "modified": "2020-02-21 16:33:01.492148", - "modified_by": "Administrator", - "module": "Payware", - "name": "SDL 219 Trial", - "owner": "Administrator", - "prepared_report": 0, - "ref_doctype": "Salary Slip", - "report_name": "SDL 219 Trial", - "report_type": "Script Report", - "roles": [ - { - "role": "HR Manager" - }, - { - "role": "HR User" - }, - { - "role": "Employee" - }, - { - "role": "System Manager" - } - ] -} \ No newline at end of file diff --git a/payware/payware/report/sdl_219_trial/sdl_219_trial.py b/payware/payware/report/sdl_219_trial/sdl_219_trial.py deleted file mode 100644 index 4b612d9..0000000 --- a/payware/payware/report/sdl_219_trial/sdl_219_trial.py +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) 2013, Aakvatech and contributors -# For license information, please see license.txt - -from __future__ import unicode_literals -# import frappe - -def execute(filters=None): - columns, data = [], [] - return columns, data diff --git a/payware/payware/report/sdl_report/__init__.py b/payware/payware/report/sdl_report/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/payware/payware/report/sdl_report/sdl_report.json b/payware/payware/report/sdl_report/sdl_report.json deleted file mode 100644 index c9e08bd..0000000 --- a/payware/payware/report/sdl_report/sdl_report.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "add_total_row": 1, - "creation": "2019-03-15 11:14:37.548813", - "disable_prepared_report": 0, - "disabled": 0, - "docstatus": 0, - "doctype": "Report", - "idx": 0, - "is_standard": "Yes", - "modified": "2019-03-15 11:40:06.786464", - "modified_by": "Administrator", - "module": "Payware", - "name": "SDL Report", - "owner": "Administrator", - "prepared_report": 0, - "query": "SELECT ss.start_date as \"Salary Period Start\", \n ss.end_date as \"Salary Period End\", \n e.employee_name as \"Employee Name\", \n ss.gross_pay as \"Employee Gross Pay\", \n sd.amount as \"PAYE contribution\", \n ss.gross_pay * ps.value / 100 as \"SDL contribution\"\nFROM `tabSalary Slip` ss \n INNER JOIN `tabSalary Detail` sd \n ON ss.name = sd.parent \n AND sd.salary_component = \"PAYE\" \n INNER JOIN `tabEmployee` e \n ON ss.employee = e.name \n AND (e.relieving_date >= ss.start_date OR e.relieving_date is null)\n INNER JOIN `tabSingles` ps \n ON ps.doctype = \"Payware Settings\" \n AND ps.field = \"skills_development_levy\" \nWHERE ss.docstatus = 1 \nGROUP BY ss.start_date, \n ss.end_date, \n e.employee_name ", - "ref_doctype": "Salary Slip", - "report_name": "SDL Report", - "report_type": "Query Report", - "roles": [ - { - "role": "HR Manager" - }, - { - "role": "HR User" - }, - { - "role": "Employee" - }, - { - "role": "System Manager" - } - ] -} \ No newline at end of file diff --git a/payware/payware/report/wcf_3/__init__.py b/payware/payware/report/wcf_3/__init__.py deleted file mode 100755 index e69de29..0000000 diff --git a/payware/payware/report/wcf_3/wcf_3.js b/payware/payware/report/wcf_3/wcf_3.js deleted file mode 100755 index 60bc926..0000000 --- a/payware/payware/report/wcf_3/wcf_3.js +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2016, Aakvatech and contributors -// For license information, please see license.txt -/* eslint-disable */ - -frappe.query_reports["WCF-3"] = { - "filters": [ - { - "fieldname":"from_date", - "label": __("From Date"), - "fieldtype": "Date", - "default": frappe.datetime.add_months(frappe.datetime.get_today(), -1), - "reqd": 1, - "width": "60px" - }, - { - "fieldname":"to_date", - "label": __("To Date"), - "fieldtype": "Date", - "default": frappe.datetime.get_today(), - "reqd": 1, - "width": "60px" - } - ] -} diff --git a/payware/payware/report/wcf_3/wcf_3.json b/payware/payware/report/wcf_3/wcf_3.json deleted file mode 100755 index facdfc1..0000000 --- a/payware/payware/report/wcf_3/wcf_3.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "add_total_row": 0, - "creation": "2020-02-17 17:35:48.703452", - "disable_prepared_report": 0, - "disabled": 0, - "docstatus": 0, - "doctype": "Report", - "idx": 0, - "is_standard": "Yes", - "modified": "2020-02-19 19:09:05.259302", - "modified_by": "Administrator", - "module": "Payware", - "name": "WCF-3", - "owner": "Administrator", - "prepared_report": 0, - "query": "select emp.wcf_number as \"wcf_number::120\", \n emp.first_name as \"firstname::120\", \n emp.middle_name as \"middlename::120\", \n emp.last_name as \"lastname::120\", \n emp.gender as \"gender::75\", \n emp.date_of_birth as \"dob::70\", \n sum(sd.amount) as \"basicpay::100\",\n sum(ss.gross_pay) as \"grosspay::100\",\n ss.designation as \"job_title::200\",\n 'PERMANENT' as \"employement_category::150\",\n emp.national_identity as \"national_id::200\"\nfrom `tabSalary Slip` ss left join `tabSalary Detail` sd on sd.parent = ss.name \n left join `tabEmployee` emp on ss.employee = emp.name\nwhere sd.salary_component = 'Basic'\n and ss.start_date >= %(from_date)s\n and ss.end_date <= %(to_date)s\ngroup by ss.employee_name, ss.designation, emp.gender, emp.date_of_birth\nhaving sum(ss.gross_pay) > 0", - "ref_doctype": "Salary Slip", - "report_name": "WCF-3", - "report_type": "Query Report", - "roles": [ - { - "role": "System Manager" - } - ] -} \ No newline at end of file diff --git a/payware/payware/salary_slip_hook.py b/payware/payware/salary_slip_hook.py deleted file mode 100644 index c3ba1c4..0000000 --- a/payware/payware/salary_slip_hook.py +++ /dev/null @@ -1,75 +0,0 @@ -from __future__ import unicode_literals -import frappe -from frappe import msgprint,throw, _ -import json - -@frappe.whitelist() -def generate_component_in_salary_slip_update(doc, method): - if not doc.name.upper().startswith("NEW") and frappe.db.get_single_value('Payware Settings', 'ot_module'): - base = None - list = [] - - for component in doc.earnings: - if str(component.salary_component).upper() == "BASIC": - base = component.amount / doc.payment_days * doc.total_working_days - list.append(component) - if base == None: - frappe.msgprint("Basic Component not Found for " + str(doc.name)) - - for component in doc.salary_slip_ot_component: - earning_dict = frappe.new_doc("Salary Detail") - earning_dict.parent = doc.name - earning_dict.parenttype = doc.doctype - earning_dict.parentfield = "earnings" - earning_dict.salary_component = component.salary_component - earning_dict.amount = calculate_amount(base,component.no_of_hours,component.salary_component) - list.append(earning_dict) - - doc.earnings = [] - doc.earnings.extend(list) - doc.calculate_net_pay() - -@frappe.whitelist() -def generate_component_in_salary_slip_insert(doc, method): - if frappe.db.get_single_value('Payware Settings', 'ot_module'): - doc.salary_slip_ot_component = [] - employee = frappe.get_doc("Employee",doc.employee) - doc.run_method("get_emp_and_leave_details") - base = None - list = [] - for component in doc.earnings: - if str(component.salary_component).upper() == "BASIC": - base = component.amount / doc.payment_days * doc.total_working_days - list.append(component) - if base == None: - frappe.throw("Basic Component not Found") - for component in employee.employee_ot_component: - component.doctype = "Salary Slip OT Component" - component.parentfield = "salary_slip_ot_component" - doc.salary_slip_ot_component.append(component) - - earning_dict = frappe.new_doc("Salary Detail") - earning_dict.parent = doc.name - earning_dict.parenttype = doc.doctype - earning_dict.parentfield = "earnings" - earning_dict.salary_component = component.salary_component - earning_dict.amount = calculate_amount(base,component.no_of_hours,component.salary_component) - list.append(earning_dict) - - doc.earnings = [] - doc.earnings.extend(list) - doc.calculate_net_pay() - -@frappe.whitelist() -def calculate_amount(base,no_of_hours,salary_component): - working_hours_per_month = frappe.db.get_single_value('Payware Settings', 'working_hours_per_month') - component = frappe.get_doc("Salary Component",salary_component) - if component and component.based_on_hourly_rate: - calc = (float(base)/ float(working_hours_per_month)) * float(no_of_hours) * (float(component.hourly_rate) / 100) - return calc - else: - frappe.msgprint("Hourly Rate not Found") - -@frappe.whitelist() -def test(): - return "hello" diff --git a/payware/payware/utils.py b/payware/payware/utils.py deleted file mode 100644 index 6c844c0..0000000 --- a/payware/payware/utils.py +++ /dev/null @@ -1,573 +0,0 @@ -from __future__ import unicode_literals -import json -import frappe -from frappe.model.document import Document -from dateutil.relativedelta import relativedelta -from frappe.utils import cint, format_datetime,get_datetime_str,now_datetime,add_days,today,formatdate,date_diff,getdate,add_months,flt, nowdate, fmt_money, add_to_date, DATE_FORMAT, rounded -from frappe import _ -from erpnext.accounts.utils import get_fiscal_year -from erpnext.setup.doctype.employee.employee import get_holiday_list_for_employee -from num2words import num2words -from calendar import monthrange -from datetime import datetime -from dateutil.parser import parse - -@frappe.whitelist() -def update_hourly_rate_additional_salary(doc, method): - # frm.set_value("amount", frm.doc.hourly_rate / 100 * frm.doc.no_of_hours * r.message.base_salary_in_hours) - # get_employee_base_salary_in_hours(employee,payroll_date): - pass - -def create_disbursement_journal_entry(doc, method): - ''' - This function is to be used to create disbursement journal. Primarily developed for creating disbursement journal for Loan - ''' - #frappe.msgprint("Method fired: " + method) - precision = frappe.get_precision("Journal Entry Account", "debit_in_account_currency") - - journal_entry = frappe.new_doc('Journal Entry') - journal_entry.voucher_type = 'Cash Entry' - journal_entry.user_remark = _('Payment of {0} disbursed on {1} starting from {2}')\ - .format(doc.name, doc.disbursement_date, doc.repayment_start_date) - journal_entry.company = doc.company - # If loan is from application than disbursement date is not set the use posting date. - if (doc.disbursement_date): - journal_entry.posting_date = doc.disbursement_date - else: - journal_entry.posting_date = doc.posting_date - - payment_amount = flt(doc.loan_amount, precision) - - journal_entry.set("accounts", [ - { - "account": doc.payment_account, - "credit_in_account_currency": payment_amount, - "reference_type": doc.doctype, - "reference_name": doc.name - }, - { - "account": doc.loan_account, - "debit_in_account_currency": payment_amount, - "reference_type": doc.doctype, - "reference_name": doc.name - } - ]) - journal_entry.save(ignore_permissions = True) - frappe.msgprint("Disbursement Journal: " + journal_entry.name + " has been created.") - -@frappe.whitelist() -def set_loan_paid(doc, method): - #frappe.msgprint("Method fired: " + str(method) + " on doc: " + str(doc)) - if method == "on_submit": - for loan in doc.loans: - #frappe.msgprint("Loan to be updated as paid: " + str(loan.loan)) - loan = frappe.get_doc("Loan", loan.loan) - #frappe.msgprint("Loan Doc loaded: " + str(loan.name)) - for loan_repayment_schedule in loan.repayment_schedule: - #frappe.msgprint("Loan Repayment Date " + str(loan_repayment_schedule.payment_date)) - if getdate(doc.start_date) <= getdate(loan_repayment_schedule.payment_date) <= getdate(doc.end_date): - frappe.set_value("Repayment Schedule", loan_repayment_schedule.name, "paid", 1) - #frappe.msgprint("Repayment Schedule of date " + str(loan_repayment_schedule.name) + " updated.") - elif method == "on_cancel": - for loan in doc.loans: - #frappe.msgprint("Loan to be updated as paid: " + str(loan.loan)) - loan = frappe.get_doc("Loan", loan.loan) - #frappe.msgprint("Loan Doc loaded: " + str(loan.name)) - for loan_repayment_schedule in loan.repayment_schedule: - #frappe.msgprint("Loan Repayment Date " + str(loan_repayment_schedule.payment_date)) - if getdate(doc.start_date) <= getdate(loan_repayment_schedule.payment_date) <= getdate(doc.end_date): - #frappe.msgprint("Repayment Schedule of date " + str(loan_repayment_schedule.name) + " updated.") - frappe.set_value("Repayment Schedule", loan_repayment_schedule.name, "paid", 0) - -@frappe.whitelist() -def create_loan_repayment_jv(doc, method): - loan = frappe.get_doc("Loan", doc.loan) - if method == "on_submit": - dr_account = loan.payment_account - cr_account = loan.loan_account - elif method == "on_cancel": - dr_account = loan.loan_account - cr_account = loan.payment_account - else: - frappe.msgprint("Unknown method on create_loan_repayment_jv") - return - #frappe.msgprint("Method fired: " + method) - precision = frappe.get_precision("Journal Entry Account", "debit_in_account_currency") - - journal_entry = frappe.new_doc('Journal Entry') - journal_entry.voucher_type = 'Cash Entry' - journal_entry.user_remark = _('{0} - {1} on {2}').format(doc.doctype, doc.name, doc.payment_date) - journal_entry.company = doc.company - journal_entry.posting_date = doc.payment_date - - payment_amount = flt(doc.payment_amount, precision) - - journal_entry.set("accounts", [ - { - "account": dr_account, - "debit_in_account_currency": payment_amount, - "reference_type": loan.doctype, - "reference_name": loan.name - }, - { - "account": cr_account, - "credit_in_account_currency": payment_amount, - "reference_type": loan.doctype, - "reference_name": loan.name - } - ]) - journal_entry.save(ignore_permissions = True) - - - # Create records in NFS child doctype of Loan doctype - if method == "on_submit": - #frappe.msgprint("loan nfs repayment appending...") - loan_nfs_row = loan.append("loan_repayments_not_from_salary") - loan_nfs_row.nfs_loan_repayment = doc.name - loan_nfs_row.company = doc.company - loan_nfs_row.payment_date = doc.payment_date - loan_nfs_row.payment_amount = doc.payment_amount - loan.save() - elif method == "on_cancel": - # Delete record from loan related to this repayment - for repayment in frappe.get_all("Loan NFS Repayments", "name", {"nfs_loan_repayment": doc.name}): - #frappe.msgprint("doc.name: " + str(repayment.name) + " for loan repayment: " + doc.name) - frappe.db.sql("""update `tabLoan NFS Repayments` set docstatus = 0 where name = %s""", repayment.name) - frappe.delete_doc("Loan NFS Repayments", repayment.name) - - # Update loan of Repayment Schedule child doctype of Loan doctype and set the balances right as per date - redo_repayment_schedule(loan.name) - set_repayment_period(loan.name) - calculate_totals(loan.name) - - if method == "on_submit": - frappe.set_value(doc.doctype, doc.name, "journal_name", journal_entry.name) - msg_to_print = doc.doctype + " journal " + journal_entry.name + " has been created." - elif method == "on_cancel": - msg_to_print = doc.doctype + " reverse journal " + journal_entry.name + " has been created." - frappe.msgprint(msg_to_print) - -@frappe.whitelist() -def validate_loan(doc, method): - if method == "validate": - # Check if the loan selected is submitted - # if (doc): - # loan = frappe.get_doc("Loan", str(doc.name)) - # #frappe.msgprint("This is the loan object: " + str(loan.name)) - # #frappe.msgprint("This is the repayment schedule length: " + str(len(loan.repayment_schedule))) - # # Only matters if the loan is submitted and if there are payroll entry in process - # if (loan.docstatus == 1): - # # Check draft/submitted payroll entry that is matching the nfs repayment payment_date - # # frappe.msgprint("Validate fired!") - # payroll_entry_list = frappe.get_list("Payroll Entry", fields=["name"] , \ - # filters={"start_date": ("<=", doc.payment_date), "end_date": (">=", doc.payment_date), "docstatus": ("!=", 2)}) - # if payroll_entry_list: - # frappe.throw("Payroll entry exists for date " + str(doc.payment_date) + ". Use another payment date. Please contact the system administrator for more details.") - pass - -@frappe.whitelist() -def validate_loan_repayment_nfs(doc, method): - if method == "validate": - # Check if the loan selected is submitted - loan = frappe.get_doc("Loan", str(doc.loan)) - #frappe.msgprint("This is the loan object: " + str(loan.name)) - #frappe.msgprint("This is the repayment schedule length: " + str(len(loan.repayment_schedule))) - if (loan.docstatus != 1): - frappe.throw("The loan is not submitted. Please Submit the loan and try again.") - - # Check draft/submitted payroll entry that is matching the nfs repayment payment_date - # frappe.msgprint("Validate fired!") - payroll_entry_list = frappe.get_list("Payroll Entry", fields=["name"] , \ - filters={"start_date": ("<=", doc.payment_date), "end_date": (">=", doc.payment_date), "docstatus": ("!=", 2)}) - if payroll_entry_list: - frappe.throw("Payroll entry exists for date " + str(doc.payment_date) + ". Use another payment date. Please contact the system administrator for more details.") - -@frappe.whitelist() -def redo_repayment_schedule(loan_name): - #frappe.msgprint("This is the parameter passed: " + str(loan_name)) - loan = frappe.get_doc("Loan", str(loan_name)) - #frappe.msgprint("This is the loan object: " + str(loan.name)) - #frappe.msgprint("This is the repayment schedule length: " + str(len(loan.repayment_schedule))) - - if (loan.docstatus != 1): - frappe.throw("The loan is not submitted. Please Submit the loan and try again.") - - # Identify pending schedule and remove those lines from schedule - repayment_schedule_list = frappe.get_all("Repayment Schedule", fields=["name", "parent", "paid", "change_amount", "changed_principal_amount", "changed_interest_amount", "total_payment", "payment_date"], filters={"parent": loan.name}) - - payment_date = loan.repayment_start_date - row_balance_amount = loan.loan_amount - # Delete all non-paid and not-change_amount records from schedule - for repayment_schedule in repayment_schedule_list: - # frappe.msgprint(str(repayment_schedule.payment_date) + " change_amount status = " + str(repayment_schedule.change_amount) + " amount " + str(repayment_schedule.principal_amount)) - if (not repayment_schedule.paid and not repayment_schedule.change_amount): - frappe.db.sql("""update `tabRepayment Schedule` set docstatus = 0 where name = %s""", repayment_schedule.name) - # frappe.msgprint("Repayment schedule being cleared for record: " + str(repayment_schedule.name)) - frappe.delete_doc("Repayment Schedule", repayment_schedule.name) - - # Reload the loan doc after deleting records fur futher use - loan = frappe.get_doc("Loan", str(loan_name)) - - # Find total of repayments made - #frappe.msgprint("Finding total of repayemnts made") - total_repayments_made = 0 - paid_repayment_schedule_list = frappe.get_all("Repayment Schedule", fields=["name", "parent", "total_payment", "payment_date"], filters={"parent": loan.name, "paid": 1}) - for repayment_schedule in paid_repayment_schedule_list: - total_repayments_made += repayment_schedule.total_payment - frappe.msgprint("total_repayments_made"+" "+str(total_repayments_made)) - - # Find total of NFS repayments made - #frappe.msgprint("Finding total repayemnts made") - total_nfs_repayments_made = 0 - nfs_repayment_schedule_list = frappe.get_all("Loan NFS Repayments", fields=["parent", "payment_amount"], filters={"parent": loan.name, "docstatus": 1}) - for nfs_repayment_schedule in nfs_repayment_schedule_list: - total_nfs_repayments_made += nfs_repayment_schedule.payment_amount - - # Find new balance_amount - balance_amount = loan.loan_amount - (total_repayments_made + total_nfs_repayments_made) - frappe.msgprint("Repayments records balance: " + str(balance_amount) + " with total repayments = " - + str(total_repayments_made) + " and total nfs repayments = " + str(total_nfs_repayments_made) - + " on loan of " + str(loan.loan_amount)) - - repayment_schedule_list = frappe.get_list("Repayment Schedule", fields=["name", "parent", "total_payment", "payment_date", "change_amount", "changed_principal_amount", "changed_interest_amount", "balance_loan_amount", "paid"], filters={"parent": loan.name}, order_by="payment_date") - - next_payment_date = loan.repayment_start_date - # frappe.msgprint("The number of existing records in the repayment scheudule is " + str(len(repayment_schedule_list))) - # frappe.msgprint("Balance before forloop -" + str(balance_amount)) - idx = 1 - for repayment_schedule in repayment_schedule_list: - # if the dates don't match then there is a gap to fill in - # frappe.msgprint("payment date " + str(repayment_schedule.payment_date) + " " + str(next_payment_date)) - # frappe.msgprint("Balance beforeif - " + str(balance_amount)) - if repayment_schedule.payment_date != next_payment_date: - # Gap fillers - while (repayment_schedule.payment_date != next_payment_date and balance_amount > 0): - - # frappe.msgprint("Will be creating records for " + str(next_payment_date)) - # continue - #frappe.msgprint("Creating repayments records with balance: " + str(balance_amount)) - interest_amount = rounded(balance_amount * flt(loan.rate_of_interest) / (12 * 100)) - principal_amount = loan.monthly_repayment_amount - interest_amount - balance_amount = balance_amount + interest_amount - loan.monthly_repayment_amount - - if balance_amount < 0: - principal_amount += balance_amount - balance_amount = 0.0 - - total_payment = principal_amount + interest_amount - # frappe.msgprint("Gap filler payment now is " + str(total_payment) + " and balance amount is " + str(balance_amount) + " for payment date " + str(next_payment_date)) - - loan_repay_row = loan.append("repayment_schedule") - loan_repay_row.idx = idx - loan_repay_row.payment_date = next_payment_date - loan_repay_row.principal_amount = principal_amount - loan_repay_row.interest_amount = interest_amount - loan_repay_row.total_payment = total_payment - loan_repay_row.balance_loan_amount = balance_amount - loan_repay_row.docstatus = 1 - - next_payment_date = add_months(next_payment_date, 1) - idx += 1 - - # Since gap filling is done, save the loan doc and reload it. - loan.save() - loan = frappe.get_doc("Loan", str(loan_name)) - - # frappe.msgprint("Balance afterif - " + str(balance_amount)) - if repayment_schedule.change_amount: - total_payment = repayment_schedule.changed_principal_amount + repayment_schedule.changed_interest_amount - # frappe.msgprint("Setting values for changed amounts for " + str(repayment_schedule.payment_date) + " " + str(repayment_schedule.changed_principal_amount)) - frappe.set_value("Repayment Schedule", repayment_schedule.name, "idx", idx) - frappe.set_value("Repayment Schedule", repayment_schedule.name, "principal_amount", repayment_schedule.changed_principal_amount) - frappe.set_value("Repayment Schedule", repayment_schedule.name, "interest_amount", repayment_schedule.changed_interest_amount) - frappe.set_value("Repayment Schedule", repayment_schedule.name, "total_payment", total_payment) - frappe.set_value("Repayment Schedule", repayment_schedule.name, "balance_loan_amount", (balance_amount - total_payment)) - # Reload loan doc again after inserting and/or setting values - loan = frappe.get_doc("Loan", str(loan_name)) - - if repayment_schedule.paid: - total_payment = repayment_schedule.total_payment - else: - balance_amount -= total_payment - idx += 1 - - # Now the repayment_schedule.payment_date == next_payment_date meaning gaps have been filled - next_payment_date = add_months(next_payment_date, 1) - # frappe.msgprint("Balance afterloop - " + str(balance_amount)) - - # End fillers. Insert rows starting balance_amount till it is 0 - while(balance_amount > 0): - #frappe.msgprint("Creating repayments records with balance: " + str(balance_amount)) - interest_amount = rounded(balance_amount * flt(loan.rate_of_interest) / (12 * 100)) - principal_amount = loan.monthly_repayment_amount - interest_amount - balance_amount = rounded(balance_amount + interest_amount - loan.monthly_repayment_amount) - - if balance_amount < 0: - principal_amount += balance_amount - balance_amount = 0.0 - - total_payment = principal_amount + interest_amount - # frappe.msgprint("Ending filler payment now is " + str(total_payment) + " and balance amount is " + str(balance_amount) + " for payment date " + str(next_payment_date)) - - loan_repay_row = loan.append("repayment_schedule") - # Find out payment date that is next to be paid. - loan_repay_row.idx = idx - loan_repay_row.payment_date = next_payment_date - loan_repay_row.principal_amount = principal_amount - loan_repay_row.interest_amount = interest_amount - loan_repay_row.total_payment = total_payment - loan_repay_row.balance_loan_amount = balance_amount - loan_repay_row.docstatus = 1 - - next_payment_date = add_months(next_payment_date, 1) - idx += 1 - - loan.save() - calculate_totals(loan.name, total_nfs_repayments_made) - - - frappe.msgprint("Loan repayment schedule redone. Created " + str(idx - 1) + " records!") - -@frappe.whitelist() -def set_repayment_period(loan_docname): - loan = frappe.get_doc("Loan", str(loan_docname)) - if loan.repayment_method == "Repay Fixed Amount per Period": - # No need to filter out the schedules that are marked as change_amount. Show it as a period that was part of loan repayment - loan.repayment_periods = len(loan.repayment_schedule) - loan.save() - -@frappe.whitelist() -def calculate_totals(loan_docname, nfs_repayments_made=0): - loan = frappe.get_doc("Loan", loan_docname) - loan.total_payment = 0 - loan.total_interest_payable = 0 - loan.total_amount_paid = 0 - for data in loan.repayment_schedule: - loan.total_payment += data.total_payment - loan.total_interest_payable +=data.interest_amount - if data.paid: - loan.total_amount_paid += data.total_payment - # Add nfs repayments to the total amount paid - loan.total_nsf_repayments = nfs_repayments_made - # frappe.msgprint("nfs_repayments_made set value to " + str(nfs_repayments_made) + " and set the total amoutn paid to " + str(loan.total_amount_paid)) - if (loan.loan_amount < (loan.total_payment + loan.total_nsf_repayments)): - frappe.throw("Total repayments exceeds total payment. Please check the repayment amounts.") - loan.save() - -@frappe.whitelist() -def create_additional_salary_journal(doc, method): - #frappe.msgprint("Method fired is: " + str(method)) - if (frappe.get_value("Salary Component", doc.salary_component, "create_cash_journal")): - salary_component = frappe.get_doc("Salary Component", doc.salary_component) - cash_account = frappe.db.get_single_value("Payware Settings", "default_account_for_additional_component_cash_journal") - component_account = None - try: - component_account = frappe.db.get_value("Salary Component Account", {"parent": doc.salary_component, "company": doc.company}, "default_account") - if not component_account: - frappe.throw("Ther is no account") - except Exception as e: - component_account = frappe.db.get_value("Salary Component Account", {"parent": doc.salary_component, "company": doc.company}, "account") - #frappe.msgprint("Expense account is: " + str(component_account)) - if method == "on_submit": - dr_account = component_account - cr_account = cash_account - elif method == "on_cancel": - dr_account = cash_account - cr_account = component_account - else: - frappe.msgprint("Unknown method on create_additional_salary_journal") - return - - #frappe.msgprint("Method fired: " + method) - precision = frappe.get_precision("Journal Entry Account", "debit_in_account_currency") - journal_entry = frappe.new_doc('Journal Entry') - journal_entry.voucher_type = 'Cash Entry' - journal_entry.user_remark = _('{2} by {1} for {3}').format(doc.doctype, doc.name, doc.salary_component, doc.employee_name) - journal_entry.company = doc.company - journal_entry.posting_date = doc.payroll_date - journal_entry.referance_doctype = doc.doctype - journal_entry.referance_docname = doc.name - - payment_amount = flt(doc.amount, precision) - - journal_entry.set("accounts", [ - { - "account": dr_account, - "debit_in_account_currency": payment_amount - }, - { - "account": cr_account, - "credit_in_account_currency": payment_amount - } - ]) - journal_entry.save(ignore_permissions = True) - - if method == "on_submit": - frappe.set_value(doc.doctype, doc.name, "journal_name", journal_entry.name) - msg_to_print = doc.doctype + " journal " + journal_entry.name + " has been created." - elif method == "on_cancel": - msg_to_print = doc.doctype + " reverse journal " + journal_entry.name + " has been created." - frappe.msgprint(msg_to_print) - if (doc.auto_created_based_on): - frappe.set_value("Additional Salary", doc.auto_created_based_on, "last_transaction_amount", doc.amount) - -@frappe.whitelist() -def generate_additional_salary_records(): - today_date = today() - auto_repeat_frequency = { - "Monthly": 1, - "Annually": 12 - } - additional_salary_list = frappe.get_all("Additional Salary", filters={"docstatus": "1", "auto_repeat_frequency": ("!=", "None"), "auto_repeat_end_date": ("!=", ""), "auto_repeat_end_date": (">=", today_date)}, fields={"name", "auto_repeat_end_date", "last_transaction_date", "last_transaction_amount", "auto_repeat_frequency", "payroll_date", "employee", "salary_component", "employee_name", "type", "overwrite_salary_structure_amount", "amount"}) - # frappe.msgprint("Additional Salary List lookedup: " + str(additional_salary_list)) - if additional_salary_list: - # frappe.msgprint("In the salary loop") - for additional_salary_doc in additional_salary_list: - #additional_salary_doc.last_transaction_date - if additional_salary_doc.last_transaction_date == None: - additional_salary_doc.last_transaction_date = additional_salary_doc.payroll_date - if additional_salary_doc.last_transaction_amount == 0: - additional_salary_doc.last_transaction_amount = additional_salary_doc.amount - if additional_salary_doc.auto_repeat_frequency == "Weekly": - next_date = add_days(getdate(additional_salary_doc.last_transaction_date), 7) - else: - frequency_factor = auto_repeat_frequency.get(additional_salary_doc.auto_repeat_frequency, "Invalid frequency") - if frequency_factor == "Invalid frequency": - frappe.throw("Invalid frequency: {0} for {1} not found. Contact the developers!".format(additional_salary_doc.auto_repeat_frequency, additional_salary_doc.name)) - next_date = add_months(getdate(additional_salary_doc.last_transaction_date), frequency_factor) - # Create 13 days in advance - specificlaly to allow mid salary advance. - # frappe.msgprint("next date" + str(next_date) + " todays date string " + str(add_days(getdate(today_date), 13))) - if next_date <= add_days(getdate(today_date), 13): - additional_salary = frappe.new_doc('Additional Salary') - additional_salary.employee = additional_salary_doc.employee - additional_salary.payroll_date = next_date - additional_salary.salary_component = additional_salary_doc.salary_component - additional_salary.employee_name = additional_salary_doc.employee_name - additional_salary.amount = additional_salary_doc.last_transaction_amount - additional_salary.company = additional_salary_doc.company - additional_salary.overwrite_salary_structure_amount = additional_salary_doc.overwrite_salary_structure_amount - additional_salary.type = additional_salary_doc.type - additional_salary.auto_repeat_frequency = "None" - additional_salary.auto_created_based_on = additional_salary_doc.name - additional_salary.auto_repeat_end_date = None - additional_salary.last_transaction_date = None - additional_salary.save(ignore_permissions = True) - frappe.set_value("Additional Salary", additional_salary_doc.name, "last_transaction_date", next_date) - frappe.msgprint("New additional salary created for " + additional_salary_doc.auto_repeat_frequency + " dated " + str(next_date)) - -@frappe.whitelist() -def get_number_format_info(format): - number_format_info = { - "#,###.##": (".", ",", 2), - "#.###,##": (",", ".", 2), - "# ###.##": (".", " ", 2), - "# ###,##": (",", " ", 2), - "#'###.##": (".", "'", 2), - "#, ###.##": (".", ", ", 2), - "#,##,###.##": (".", ",", 2), - "#,###.###": (".", ",", 3), - "#.###": ("", ".", 0), - "#,###": ("", ",", 0) - } - return number_format_info.get(format) or (".", ",", 2) - -# -# convert number to words -# -@frappe.whitelist() -def in_words(integer, in_million=True): - """ - Returns string in words for the given integer. - """ - locale = 'en_IN' if not in_million else frappe.local.lang - integer = int(integer) - try: - ret = num2words(integer, lang=locale) - except NotImplementedError: - ret = num2words(integer, lang='en') - except OverflowError: - ret = num2words(integer, lang='en') - return ret.replace('-', ' ') - -@frappe.whitelist() -def get_employee_base_salary_in_hours(employee,payroll_date): - """ - Returns the base salary in hours of the employee for this month - """ - last_salary_assignment = frappe.get_all("Salary Structure Assignment", filters={ - 'employee': employee, 'from_date': ['<=', payroll_date]}, - fields=['name', 'base'], - order_by='`from_date` DESC, `creation` DESC', - limit=1) - last_salary_assignment = last_salary_assignment[0] if last_salary_assignment else None - # payroll_date = datetime.strptime(payroll_date, '%Y-%m-%d') - - working_hours_per_month = frappe.db.get_single_value('Payware Settings', 'working_hours_per_month') - if not working_hours_per_month: - frappe.throw(_("Working Hours per Month not defind in Payware settings. Define it there and try again.")) - base_salary_in_hours = (last_salary_assignment.base or 0) / working_hours_per_month - return {"base_salary_in_hours": base_salary_in_hours} - -# -# convert currency to words -# -@frappe.whitelist() -def money_in_words(number, main_currency = None, fraction_currency=None): - """ - Returns string in words with currency and fraction currency. - """ - from frappe.utils import get_defaults - _ = frappe._ - - try: - # note: `flt` returns 0 for invalid input and we don't want that - number = float(number) - except ValueError: - return "" - - number = flt(number) - if number < 0: - return "" - - d = get_defaults() - if not main_currency: - main_currency = d.get('currency', 'INR') - if not fraction_currency: - fraction_currency = frappe.db.get_value("Currency", main_currency, "fraction", cache=True) or _("Cent") - - number_format = frappe.db.get_value("Currency", main_currency, "number_format", cache=True) or \ - frappe.db.get_default("number_format") or "#,###.##" - - fraction_length = get_number_format_info(number_format)[2] - - n = "%.{0}f".format(fraction_length) % number - - numbers = n.split('.') - main, fraction = numbers if len(numbers) > 1 else [n, '00'] - - if len(fraction) < fraction_length: - zeros = '0' * (fraction_length - len(fraction)) - fraction += zeros - - in_million = True - if number_format == "#,##,###.##": in_million = False - - # 0.00 - if main == '0' and fraction in ['00', '000']: - out = "{0} {1}".format(main_currency, _('Zero')) - # 0.XX - elif main == '0': - out = _(in_words(fraction, in_million).title()) + ' ' + fraction_currency - else: - out = main_currency + ' ' + _(in_words(main, in_million).title()) - if cint(fraction): - out = out + ' ' + _('and') + ' ' + _(in_words(fraction, in_million).title()) + ' ' + fraction_currency - - return out + ' ' + _('only.') - - -def set_employee_base_salary_in_hours(doc,method): - if doc.based_on_hourly_rate: - doc.payroll_date = str(doc.payroll_date) - base_salary_in_hours = get_employee_base_salary_in_hours(doc.employee,doc.payroll_date)["base_salary_in_hours"] - doc.amount = doc.hourly_rate / 100 * doc.no_of_hours * base_salary_in_hours diff --git a/payware/payware/doctype/area/__init__.py b/payware/www/__pycache__/__init__.py similarity index 100% rename from payware/payware/doctype/area/__init__.py rename to payware/www/__pycache__/__init__.py