# Copyright (c) 2013, VHRS and contributors
# For license information, please see license.txt

from __future__ import unicode_literals
import frappe
from frappe import _, msgprint
from frappe.utils import (cint, cstr, date_diff, flt, getdate, money_in_words,
                          nowdate, rounded, today)
from datetime import datetime
from datetime import date
import datetime
from calendar import monthrange


def execute(filters=None):
    columns = get_columns()
    data = []
    row = []
    filters
    applicant = applicants(filters)
    for app in applicant:
        row = [app.customer, app.ref_id, app.candidate_name,
                app.in_date, app.status, app.checks_group]
        if app.status != "Entry Pending":
            cg = frappe.get_doc("Checks Group", app.checks_group)
            if cg.employment_check1 == 1:
                emp = frappe.get_doc("Employment Check1", {
                    "applicant_id": app.ref_id})
                if emp.status != "Allocation Completed":
                    row += [emp.status]
                else:
                    vemp = frappe.get_doc("Verify Employment Check1", {
                        "applicant_id": app.ref_id})
                    row += [vemp.status]
            else:
                row += ["-"]
            if cg.employment_check2 == 1:
                emp = frappe.get_doc("Employment Check2", {
                    "applicant_id": app.ref_id})
                if emp.status != "Allocation Completed":
                    row += [emp.status]
                else:
                    vemp = frappe.get_doc("Verify Employment Check2", {
                        "applicant_id": app.ref_id})
                    row += [vemp.status]
            else:
                row += ["-"]
            if cg.employment_check3 == 1:
                emp = frappe.get_doc("Employment Check3", {
                    "applicant_id": app.ref_id})
                if emp.status != "Allocation Completed":
                    row += [emp.status]
                else:
                    vemp = frappe.get_doc("Verify Employment Check3", {
                        "applicant_id": app.ref_id})
                    row += [vemp.status]
            else:
                row += ["-"]
            if cg.employment_check4 == 1:
                emp = frappe.get_doc("Employment Check4", {
                    "applicant_id": app.ref_id})
                if emp.status != "Allocation Completed":
                    row += [emp.status]
                else:
                    vemp = frappe.get_doc("Verify Employment Check4", {
                        "applicant_id": app.ref_id})
                    row += [vemp.status]
            else:
                row += ["-"]
            if cg.education_check1 == 1:
                if frappe.db.exists("Education Check1", {
                        "applicant_id": app.ref_id}):
                    emp = frappe.get_doc("Education Check1", {
                        "applicant_id": app.ref_id})
                    if emp.status != "Allocation Completed":
                        row += [emp.status]
                    else:
                        vemp = frappe.get_doc("Verify Education Check1", {
                            "applicant_id": app.ref_id})
                        row += [vemp.status]
            else:
                row += ["-"]
            if cg.education_check2 == 1:
                emp = frappe.get_doc("Education Check2", {
                    "applicant_id": app.ref_id})
                if emp.status != "Allocation Completed":
                    row += [emp.status]
                else:
                    vemp = frappe.get_doc("Verify Education Check2", {
                        "applicant_id": app.ref_id})
                    row += [vemp.status]
            else:
                row += ["-"]
            if cg.education_check3 == 1:
                emp = frappe.get_doc("Education Check3", {
                    "applicant_id": app.ref_id})
                if emp.status != "Allocation Completed":
                    row += [emp.status]
                else:
                    vemp = frappe.get_doc("Verify Education Check3", {
                        "applicant_id": app.ref_id})
                    row += [vemp.status]
            else:
                row += ["-"]
            if cg.education_check4 == 1:
                emp = frappe.get_doc("Education Check4", {
                    "applicant_id": app.ref_id})
                if emp.status != "Allocation Completed":
                    row += [emp.status]
                else:
                    vemp = frappe.get_doc("Verify Education Check4", {
                        "applicant_id": app.ref_id})
                    row += [vemp.status]
            else:
                row += ["-"]
            if cg.address_check1 == 1:
                emp = frappe.get_doc("Address Check1", {
                    "applicant_id": app.ref_id})
                if emp.status != "Allocation Completed":
                    row += [emp.status]
                else:
                    vemp = frappe.get_doc("Verify Address Check1", {
                        "applicant_id": app.ref_id})
                    row += [vemp.status]
            else:
                row += ["-"]
            if cg.address_check2 == 1:
                emp = frappe.get_doc("Address Check2", {
                    "applicant_id": app.ref_id})
                if emp.status != "Allocation Completed":
                    row += [emp.status]
                else:
                    vemp = frappe.get_doc("Verify Address Check2", {
                        "applicant_id": app.ref_id})
                    row += [vemp.status]
            else:
                row += ["-"]
            if cg.address_check3 == 1:
                emp = frappe.get_doc("Address Check3", {
                    "applicant_id": app.ref_id})
                if emp.status != "Allocation Completed":
                    row += [emp.status]
                else:
                    vemp = frappe.get_doc("Verify Address Check3", {
                        "applicant_id": app.ref_id})
                    row += [vemp.status]
            else:
                row += ["-"]
            if cg.address_check4 == 1:
                emp = frappe.get_doc("Address Check4", {
                    "applicant_id": app.ref_id})
                if emp.status != "Allocation Completed":
                    row += [emp.status]
                else:
                    vemp = frappe.get_doc("Verify Address Check4", {
                        "applicant_id": app.ref_id})
                    row += [vemp.status]
            else:
                row += ["-"]
            if cg.family_check1 == 1:
                emp = frappe.get_doc("Family Check1", {
                    "applicant_id": app.ref_id})
                if emp.status != "Allocation Completed":
                    row += [emp.status]
                else:
                    vemp = frappe.get_doc("Verify Family Check1", {
                        "applicant_id": app.ref_id})
                    row += [vemp.status]
            else:
                row += ["-"]
            if cg.reference_check1 == 1:
                emp = frappe.get_doc("Reference Check1", {
                    "applicant_id": app.ref_id})
                if emp.status != "Allocation Completed":
                    row += [emp.status]
                else:
                    vemp = frappe.get_doc("Verify Reference Check1", {
                        "applicant_id": app.ref_id})
                    row += [vemp.status]
            else:
                row += ["-"]
            if cg.reference_check2 == 1:
                emp = frappe.get_doc("Reference Check2", {
                    "applicant_id": app.ref_id})
                if emp.status != "Allocation Completed":
                    row += [emp.status]
                else:
                    vemp = frappe.get_doc("Verify Reference Check2", {
                        "applicant_id": app.ref_id})
                    row += [vemp.status]
            else:
                row += ["-"]
            if cg.reference_check3 == 1:
                emp = frappe.get_doc("Reference Check3", {
                    "applicant_id": app.ref_id})
                if emp.status != "Allocation Completed":
                    row += [emp.status]
                else:
                    vemp = frappe.get_doc("Verify Reference Check3", {
                        "applicant_id": app.ref_id})
                    row += [vemp.status]
            else:
                row += ["-"]
            if cg.reference_check4 == 1:
                emp = frappe.get_doc("Reference Check4", {
                    "applicant_id": app.ref_id})
                if emp.status != "Allocation Completed":
                    row += [emp.status]
                else:
                    vemp = frappe.get_doc("Verify Reference Check4", {
                        "applicant_id": app.ref_id})
                    row += [vemp.status]
            else:
                row += ["-"]
            if cg.civil_check == 1:
                emp = frappe.get_doc("Civil Check", {
                    "applicant_id": app.ref_id})
                if emp.status != "Allocation Completed":
                    row += [emp.status]
                else:
                    vemp = frappe.get_doc("Verify Civil Check", {
                        "applicant_id": app.ref_id})
                    row += [vemp.status]
            else:
                row += ["-"]
            if cg.criminal_check == 1:
                emp = frappe.get_doc("Criminal Check", {
                    "applicant_id": app.ref_id})
                if emp.status != "Allocation Completed":
                    row += [emp.status]
                else:
                    vemp = frappe.get_doc("Verify Criminal Check", {
                        "applicant_id": app.ref_id})
                    row += [vemp.status]
            else:
                row += ["-"]
            if cg.id_check1 == 1:
                emp = frappe.get_doc("ID Check1", {
                    "applicant_id": app.ref_id})
                if emp.status != "Allocation Completed":
                    row += [emp.status]
                else:
                    vemp = frappe.get_doc("Verify ID Check1", {
                        "applicant_id": app.ref_id})
                    row += [vemp.status]
            else:
                row += ["-"]
            if cg.id_check2 == 1:
                emp = frappe.get_doc("ID Check2", {
                    "applicant_id": app.ref_id})
                if emp.status != "Allocation Completed":
                    row += [emp.status]
                else:
                    vemp = frappe.get_doc("Verify ID Check2", {
                        "applicant_id": app.ref_id})
                    row += [vemp.status]
            else:
                row += ["-"]
            if cg.id_check3 == 1:
                emp = frappe.get_doc("ID Check3", {
                    "applicant_id": app.ref_id})
                if emp.status != "Allocation Completed":
                    row += [emp.status]
                else:
                    vemp = frappe.get_doc("Verify ID Check3", {
                        "applicant_id": app.ref_id})
                    row += [vemp.status]
            else:
                row += ["-"]
            if cg.id_check4 == 1:
                emp = frappe.get_doc("ID Check4", {
                    "applicant_id": app.ref_id})
                if emp.status != "Allocation Completed":
                    row += [emp.status]
                else:
                    vemp = frappe.get_doc("Verify ID Check4", {
                        "applicant_id": app.ref_id})
                    row += [vemp.status]
            else:
                row += ["-"]
            if cg.id_check5 == 1:
                emp = frappe.get_doc("ID Check5", {
                    "applicant_id": app.ref_id})
                if emp.status != "Allocation Completed":
                    row += [emp.status]
                else:
                    vemp = frappe.get_doc("Verify ID Check5", {
                        "applicant_id": app.ref_id})
                    row += [vemp.status]
            else:
                row += ["-"]
            if cg.id_check6 == 1:
                emp = frappe.get_doc("ID Check6", {
                    "applicant_id": app.ref_id})
                if emp.status != "Allocation Completed":
                    row += [emp.status]
                else:
                    vemp = frappe.get_doc("Verify ID Check6", {
                        "applicant_id": app.ref_id})
                    row += [vemp.status]
            else:
                row += ["-"]
        data.append(row)
    return columns, data


def get_columns():
    columns = [
        _("Project Name") + ":Link/Customer:200",
        _("VHRS Ref. No") + ":Data:150",
        _("Candidate Name") + ":Data:180",
        _("Start Date") + ":Date:150",
        _("Status") + ":Data:150",
        _("Checks Group Name") + ":Data:150",
        _("Emp Check1 Status") + ":Data:150",
        _("Emp Check2 Status") + ":Data:150",
        _("Emp Check3 Status") + ":Data:150",
        _("Emp Check4 Status") + ":Data:150",
        _("Edu Check1 Status") + ":Data:150",
        _("Edu Check2 Status") + ":Data:150",
        _("Edu Check3 Status") + ":Data:150",
        _("Edu Check4 Status") + ":Data:150",
        _("Add Check1 Status") + ":Data:150",
        _("Add Check2 Status") + ":Data:150",
        _("Add Check3 Status") + ":Data:150",
        _("Add Check4 Status") + ":Data:150",
        _("Family Check Status") + ":Data:150",
        _("Ref Check1 Status") + ":Data:150",
        _("Ref Check2 Status") + ":Data:150",
        _("Ref Check3 Status") + ":Data:150",
        _("Ref Check4 Status") + ":Data:150",
        _("Civil Check1 Status") + ":Data:150",
        _("Criminal Check2 Status") + ":Data:150",
        _("ID Check1 Status") + ":Data:150",
        _("ID Check2 Status") + ":Data:150",
        _("ID Check3 Status") + ":Data:150",
        _("ID Check4 Status") + ":Data:150",
        _("ID Check5 Status") + ":Data:150",
        _("ID Check6 Status") + ":Data:150",

    ]
    return columns


def applicants(filters):
    applicant = frappe.db.sql(
        """select app.checks_group,app.customer,app.ref_id,app.candidate_name,app.in_date,app.status from `tabApplicant` app where
        app.in_date between %(start_date)s and %(end_date)s order by app.in_date""", {
            "start_date": filters.get("from_date"),
            "end_date": filters.get("to_date")
        }, as_dict=1)
    return applicant

[((25, 17, 25, 65), 'frappe.get_doc', 'frappe.get_doc', ({(25, 32, 25, 46): '"""Checks Group"""', (25, 48, 25, 64): 'app.checks_group'}, {}), "('Checks Group', app.checks_group)", False, 'import frappe\n'), ((309, 8, 309, 25), 'frappe._', '_', ({(309, 10, 309, 24): '"""Project Name"""'}, {}), "('Project Name')", False, 'from frappe import _, msgprint\n'), ((310, 8, 310, 25), 'frappe._', '_', ({(310, 10, 310, 24): '"""VHRS Ref. No"""'}, {}), "('VHRS Ref. No')", False, 'from frappe import _, msgprint\n'), ((311, 8, 311, 27), 'frappe._', '_', ({(311, 10, 311, 26): '"""Candidate Name"""'}, {}), "('Candidate Name')", False, 'from frappe import _, msgprint\n'), ((312, 8, 312, 23), 'frappe._', '_', ({(312, 10, 312, 22): '"""Start Date"""'}, {}), "('Start Date')", False, 'from frappe import _, msgprint\n'), ((313, 8, 313, 19), 'frappe._', '_', ({(313, 10, 313, 18): '"""Status"""'}, {}), "('Status')", False, 'from frappe import _, msgprint\n'), ((314, 8, 314, 30), 'frappe._', '_', ({(314, 10, 314, 29): '"""Checks Group Name"""'}, {}), "('Checks Group Name')", False, 'from frappe import _, msgprint\n'), ((315, 8, 315, 30), 'frappe._', '_', ({(315, 10, 315, 29): '"""Emp Check1 Status"""'}, {}), "('Emp Check1 Status')", False, 'from frappe import _, msgprint\n'), ((316, 8, 316, 30), 'frappe._', '_', ({(316, 10, 316, 29): '"""Emp Check2 Status"""'}, {}), "('Emp Check2 Status')", False, 'from frappe import _, msgprint\n'), ((317, 8, 317, 30), 'frappe._', '_', ({(317, 10, 317, 29): '"""Emp Check3 Status"""'}, {}), "('Emp Check3 Status')", False, 'from frappe import _, msgprint\n'), ((318, 8, 318, 30), 'frappe._', '_', ({(318, 10, 318, 29): '"""Emp Check4 Status"""'}, {}), "('Emp Check4 Status')", False, 'from frappe import _, msgprint\n'), ((319, 8, 319, 30), 'frappe._', '_', ({(319, 10, 319, 29): '"""Edu Check1 Status"""'}, {}), "('Edu Check1 Status')", False, 'from frappe import _, msgprint\n'), ((320, 8, 320, 30), 'frappe._', '_', ({(320, 10, 320, 29): '"""Edu Check2 Status"""'}, {}), "('Edu Check2 Status')", False, 'from frappe import _, msgprint\n'), ((321, 8, 321, 30), 'frappe._', '_', ({(321, 10, 321, 29): '"""Edu Check3 Status"""'}, {}), "('Edu Check3 Status')", False, 'from frappe import _, msgprint\n'), ((322, 8, 322, 30), 'frappe._', '_', ({(322, 10, 322, 29): '"""Edu Check4 Status"""'}, {}), "('Edu Check4 Status')", False, 'from frappe import _, msgprint\n'), ((323, 8, 323, 30), 'frappe._', '_', ({(323, 10, 323, 29): '"""Add Check1 Status"""'}, {}), "('Add Check1 Status')", False, 'from frappe import _, msgprint\n'), ((324, 8, 324, 30), 'frappe._', '_', ({(324, 10, 324, 29): '"""Add Check2 Status"""'}, {}), "('Add Check2 Status')", False, 'from frappe import _, msgprint\n'), ((325, 8, 325, 30), 'frappe._', '_', ({(325, 10, 325, 29): '"""Add Check3 Status"""'}, {}), "('Add Check3 Status')", False, 'from frappe import _, msgprint\n'), ((326, 8, 326, 30), 'frappe._', '_', ({(326, 10, 326, 29): '"""Add Check4 Status"""'}, {}), "('Add Check4 Status')", False, 'from frappe import _, msgprint\n'), ((327, 8, 327, 32), 'frappe._', '_', ({(327, 10, 327, 31): '"""Family Check Status"""'}, {}), "('Family Check Status')", False, 'from frappe import _, msgprint\n'), ((328, 8, 328, 30), 'frappe._', '_', ({(328, 10, 328, 29): '"""Ref Check1 Status"""'}, {}), "('Ref Check1 Status')", False, 'from frappe import _, msgprint\n'), ((329, 8, 329, 30), 'frappe._', '_', ({(329, 10, 329, 29): '"""Ref Check2 Status"""'}, {}), "('Ref Check2 Status')", False, 'from frappe import _, msgprint\n'), ((330, 8, 330, 30), 'frappe._', '_', ({(330, 10, 330, 29): '"""Ref Check3 Status"""'}, {}), "('Ref Check3 Status')", False, 'from frappe import _, msgprint\n'), ((331, 8, 331, 30), 'frappe._', '_', ({(331, 10, 331, 29): '"""Ref Check4 Status"""'}, {}), "('Ref Check4 Status')", False, 'from frappe import _, msgprint\n'), ((332, 8, 332, 32), 'frappe._', '_', ({(332, 10, 332, 31): '"""Civil Check1 Status"""'}, {}), "('Civil Check1 Status')", False, 'from frappe import _, msgprint\n'), ((333, 8, 333, 35), 'frappe._', '_', ({(333, 10, 333, 34): '"""Criminal Check2 Status"""'}, {}), "('Criminal Check2 Status')", False, 'from frappe import _, msgprint\n'), ((334, 8, 334, 29), 'frappe._', '_', ({(334, 10, 334, 28): '"""ID Check1 Status"""'}, {}), "('ID Check1 Status')", False, 'from frappe import _, msgprint\n'), ((335, 8, 335, 29), 'frappe._', '_', ({(335, 10, 335, 28): '"""ID Check2 Status"""'}, {}), "('ID Check2 Status')", False, 'from frappe import _, msgprint\n'), ((336, 8, 336, 29), 'frappe._', '_', ({(336, 10, 336, 28): '"""ID Check3 Status"""'}, {}), "('ID Check3 Status')", False, 'from frappe import _, msgprint\n'), ((337, 8, 337, 29), 'frappe._', '_', ({(337, 10, 337, 28): '"""ID Check4 Status"""'}, {}), "('ID Check4 Status')", False, 'from frappe import _, msgprint\n'), ((338, 8, 338, 29), 'frappe._', '_', ({(338, 10, 338, 28): '"""ID Check5 Status"""'}, {}), "('ID Check5 Status')", False, 'from frappe import _, msgprint\n'), ((339, 8, 339, 29), 'frappe._', '_', ({(339, 10, 339, 28): '"""ID Check6 Status"""'}, {}), "('ID Check6 Status')", False, 'from frappe import _, msgprint\n'), ((27, 22, 28, 48), 'frappe.get_doc', 'frappe.get_doc', ({(27, 37, 27, 56): '"""Employment Check1"""', (27, 58, 28, 47): "{'applicant_id': app.ref_id}"}, {}), "('Employment Check1', {'applicant_id': app.ref_id})", False, 'import frappe\n'), ((38, 22, 39, 48), 'frappe.get_doc', 'frappe.get_doc', ({(38, 37, 38, 56): '"""Employment Check2"""', (38, 58, 39, 47): "{'applicant_id': app.ref_id}"}, {}), "('Employment Check2', {'applicant_id': app.ref_id})", False, 'import frappe\n'), ((49, 22, 50, 48), 'frappe.get_doc', 'frappe.get_doc', ({(49, 37, 49, 56): '"""Employment Check3"""', (49, 58, 50, 47): "{'applicant_id': app.ref_id}"}, {}), "('Employment Check3', {'applicant_id': app.ref_id})", False, 'import frappe\n'), ((60, 22, 61, 48), 'frappe.get_doc', 'frappe.get_doc', ({(60, 37, 60, 56): '"""Employment Check4"""', (60, 58, 61, 47): "{'applicant_id': app.ref_id}"}, {}), "('Employment Check4', {'applicant_id': app.ref_id})", False, 'import frappe\n'), ((71, 19, 72, 52), 'frappe.db.exists', 'frappe.db.exists', ({(71, 36, 71, 54): '"""Education Check1"""', (71, 56, 72, 51): "{'applicant_id': app.ref_id}"}, {}), "('Education Check1', {'applicant_id': app.ref_id})", False, 'import frappe\n'), ((84, 22, 85, 48), 'frappe.get_doc', 'frappe.get_doc', ({(84, 37, 84, 55): '"""Education Check2"""', (84, 57, 85, 47): "{'applicant_id': app.ref_id}"}, {}), "('Education Check2', {'applicant_id': app.ref_id})", False, 'import frappe\n'), ((95, 22, 96, 48), 'frappe.get_doc', 'frappe.get_doc', ({(95, 37, 95, 55): '"""Education Check3"""', (95, 57, 96, 47): "{'applicant_id': app.ref_id}"}, {}), "('Education Check3', {'applicant_id': app.ref_id})", False, 'import frappe\n'), ((106, 22, 107, 48), 'frappe.get_doc', 'frappe.get_doc', ({(106, 37, 106, 55): '"""Education Check4"""', (106, 57, 107, 47): "{'applicant_id': app.ref_id}"}, {}), "('Education Check4', {'applicant_id': app.ref_id})", False, 'import frappe\n'), ((117, 22, 118, 48), 'frappe.get_doc', 'frappe.get_doc', ({(117, 37, 117, 53): '"""Address Check1"""', (117, 55, 118, 47): "{'applicant_id': app.ref_id}"}, {}), "('Address Check1', {'applicant_id': app.ref_id})", False, 'import frappe\n'), ((128, 22, 129, 48), 'frappe.get_doc', 'frappe.get_doc', ({(128, 37, 128, 53): '"""Address Check2"""', (128, 55, 129, 47): "{'applicant_id': app.ref_id}"}, {}), "('Address Check2', {'applicant_id': app.ref_id})", False, 'import frappe\n'), ((139, 22, 140, 48), 'frappe.get_doc', 'frappe.get_doc', ({(139, 37, 139, 53): '"""Address Check3"""', (139, 55, 140, 47): "{'applicant_id': app.ref_id}"}, {}), "('Address Check3', {'applicant_id': app.ref_id})", False, 'import frappe\n'), ((150, 22, 151, 48), 'frappe.get_doc', 'frappe.get_doc', ({(150, 37, 150, 53): '"""Address Check4"""', (150, 55, 151, 47): "{'applicant_id': app.ref_id}"}, {}), "('Address Check4', {'applicant_id': app.ref_id})", False, 'import frappe\n'), ((161, 22, 162, 48), 'frappe.get_doc', 'frappe.get_doc', ({(161, 37, 161, 52): '"""Family Check1"""', (161, 54, 162, 47): "{'applicant_id': app.ref_id}"}, {}), "('Family Check1', {'applicant_id': app.ref_id})", False, 'import frappe\n'), ((172, 22, 173, 48), 'frappe.get_doc', 'frappe.get_doc', ({(172, 37, 172, 55): '"""Reference Check1"""', (172, 57, 173, 47): "{'applicant_id': app.ref_id}"}, {}), "('Reference Check1', {'applicant_id': app.ref_id})", False, 'import frappe\n'), ((183, 22, 184, 48), 'frappe.get_doc', 'frappe.get_doc', ({(183, 37, 183, 55): '"""Reference Check2"""', (183, 57, 184, 47): "{'applicant_id': app.ref_id}"}, {}), "('Reference Check2', {'applicant_id': app.ref_id})", False, 'import frappe\n'), ((194, 22, 195, 48), 'frappe.get_doc', 'frappe.get_doc', ({(194, 37, 194, 55): '"""Reference Check3"""', (194, 57, 195, 47): "{'applicant_id': app.ref_id}"}, {}), "('Reference Check3', {'applicant_id': app.ref_id})", False, 'import frappe\n'), ((205, 22, 206, 48), 'frappe.get_doc', 'frappe.get_doc', ({(205, 37, 205, 55): '"""Reference Check4"""', (205, 57, 206, 47): "{'applicant_id': app.ref_id}"}, {}), "('Reference Check4', {'applicant_id': app.ref_id})", False, 'import frappe\n'), ((216, 22, 217, 48), 'frappe.get_doc', 'frappe.get_doc', ({(216, 37, 216, 50): '"""Civil Check"""', (216, 52, 217, 47): "{'applicant_id': app.ref_id}"}, {}), "('Civil Check', {'applicant_id': app.ref_id})", False, 'import frappe\n'), ((227, 22, 228, 48), 'frappe.get_doc', 'frappe.get_doc', ({(227, 37, 227, 53): '"""Criminal Check"""', (227, 55, 228, 47): "{'applicant_id': app.ref_id}"}, {}), "('Criminal Check', {'applicant_id': app.ref_id})", False, 'import frappe\n'), ((238, 22, 239, 48), 'frappe.get_doc', 'frappe.get_doc', ({(238, 37, 238, 48): '"""ID Check1"""', (238, 50, 239, 47): "{'applicant_id': app.ref_id}"}, {}), "('ID Check1', {'applicant_id': app.ref_id})", False, 'import frappe\n'), ((249, 22, 250, 48), 'frappe.get_doc', 'frappe.get_doc', ({(249, 37, 249, 48): '"""ID Check2"""', (249, 50, 250, 47): "{'applicant_id': app.ref_id}"}, {}), "('ID Check2', {'applicant_id': app.ref_id})", False, 'import frappe\n'), ((260, 22, 261, 48), 'frappe.get_doc', 'frappe.get_doc', ({(260, 37, 260, 48): '"""ID Check3"""', (260, 50, 261, 47): "{'applicant_id': app.ref_id}"}, {}), "('ID Check3', {'applicant_id': app.ref_id})", False, 'import frappe\n'), ((271, 22, 272, 48), 'frappe.get_doc', 'frappe.get_doc', ({(271, 37, 271, 48): '"""ID Check4"""', (271, 50, 272, 47): "{'applicant_id': app.ref_id}"}, {}), "('ID Check4', {'applicant_id': app.ref_id})", False, 'import frappe\n'), ((282, 22, 283, 48), 'frappe.get_doc', 'frappe.get_doc', ({(282, 37, 282, 48): '"""ID Check5"""', (282, 50, 283, 47): "{'applicant_id': app.ref_id}"}, {}), "('ID Check5', {'applicant_id': app.ref_id})", False, 'import frappe\n'), ((293, 22, 294, 48), 'frappe.get_doc', 'frappe.get_doc', ({(293, 37, 293, 48): '"""ID Check6"""', (293, 50, 294, 47): "{'applicant_id': app.ref_id}"}, {}), "('ID Check6', {'applicant_id': app.ref_id})", False, 'import frappe\n'), ((32, 27, 33, 52), 'frappe.get_doc', 'frappe.get_doc', ({(32, 42, 32, 68): '"""Verify Employment Check1"""', (32, 70, 33, 51): "{'applicant_id': app.ref_id}"}, {}), "('Verify Employment Check1', {'applicant_id': app.ref_id})", False, 'import frappe\n'), ((43, 27, 44, 52), 'frappe.get_doc', 'frappe.get_doc', ({(43, 42, 43, 68): '"""Verify Employment Check2"""', (43, 70, 44, 51): "{'applicant_id': app.ref_id}"}, {}), "('Verify Employment Check2', {'applicant_id': app.ref_id})", False, 'import frappe\n'), ((54, 27, 55, 52), 'frappe.get_doc', 'frappe.get_doc', ({(54, 42, 54, 68): '"""Verify Employment Check3"""', (54, 70, 55, 51): "{'applicant_id': app.ref_id}"}, {}), "('Verify Employment Check3', {'applicant_id': app.ref_id})", False, 'import frappe\n'), ((65, 27, 66, 52), 'frappe.get_doc', 'frappe.get_doc', ({(65, 42, 65, 68): '"""Verify Employment Check4"""', (65, 70, 66, 51): "{'applicant_id': app.ref_id}"}, {}), "('Verify Employment Check4', {'applicant_id': app.ref_id})", False, 'import frappe\n'), ((73, 26, 74, 52), 'frappe.get_doc', 'frappe.get_doc', ({(73, 41, 73, 59): '"""Education Check1"""', (73, 61, 74, 51): "{'applicant_id': app.ref_id}"}, {}), "('Education Check1', {'applicant_id': app.ref_id})", False, 'import frappe\n'), ((89, 27, 90, 52), 'frappe.get_doc', 'frappe.get_doc', ({(89, 42, 89, 67): '"""Verify Education Check2"""', (89, 69, 90, 51): "{'applicant_id': app.ref_id}"}, {}), "('Verify Education Check2', {'applicant_id': app.ref_id})", False, 'import frappe\n'), ((100, 27, 101, 52), 'frappe.get_doc', 'frappe.get_doc', ({(100, 42, 100, 67): '"""Verify Education Check3"""', (100, 69, 101, 51): "{'applicant_id': app.ref_id}"}, {}), "('Verify Education Check3', {'applicant_id': app.ref_id})", False, 'import frappe\n'), ((111, 27, 112, 52), 'frappe.get_doc', 'frappe.get_doc', ({(111, 42, 111, 67): '"""Verify Education Check4"""', (111, 69, 112, 51): "{'applicant_id': app.ref_id}"}, {}), "('Verify Education Check4', {'applicant_id': app.ref_id})", False, 'import frappe\n'), ((122, 27, 123, 52), 'frappe.get_doc', 'frappe.get_doc', ({(122, 42, 122, 65): '"""Verify Address Check1"""', (122, 67, 123, 51): "{'applicant_id': app.ref_id}"}, {}), "('Verify Address Check1', {'applicant_id': app.ref_id})", False, 'import frappe\n'), ((133, 27, 134, 52), 'frappe.get_doc', 'frappe.get_doc', ({(133, 42, 133, 65): '"""Verify Address Check2"""', (133, 67, 134, 51): "{'applicant_id': app.ref_id}"}, {}), "('Verify Address Check2', {'applicant_id': app.ref_id})", False, 'import frappe\n'), ((144, 27, 145, 52), 'frappe.get_doc', 'frappe.get_doc', ({(144, 42, 144, 65): '"""Verify Address Check3"""', (144, 67, 145, 51): "{'applicant_id': app.ref_id}"}, {}), "('Verify Address Check3', {'applicant_id': app.ref_id})", False, 'import frappe\n'), ((155, 27, 156, 52), 'frappe.get_doc', 'frappe.get_doc', ({(155, 42, 155, 65): '"""Verify Address Check4"""', (155, 67, 156, 51): "{'applicant_id': app.ref_id}"}, {}), "('Verify Address Check4', {'applicant_id': app.ref_id})", False, 'import frappe\n'), ((166, 27, 167, 52), 'frappe.get_doc', 'frappe.get_doc', ({(166, 42, 166, 64): '"""Verify Family Check1"""', (166, 66, 167, 51): "{'applicant_id': app.ref_id}"}, {}), "('Verify Family Check1', {'applicant_id': app.ref_id})", False, 'import frappe\n'), ((177, 27, 178, 52), 'frappe.get_doc', 'frappe.get_doc', ({(177, 42, 177, 67): '"""Verify Reference Check1"""', (177, 69, 178, 51): "{'applicant_id': app.ref_id}"}, {}), "('Verify Reference Check1', {'applicant_id': app.ref_id})", False, 'import frappe\n'), ((188, 27, 189, 52), 'frappe.get_doc', 'frappe.get_doc', ({(188, 42, 188, 67): '"""Verify Reference Check2"""', (188, 69, 189, 51): "{'applicant_id': app.ref_id}"}, {}), "('Verify Reference Check2', {'applicant_id': app.ref_id})", False, 'import frappe\n'), ((199, 27, 200, 52), 'frappe.get_doc', 'frappe.get_doc', ({(199, 42, 199, 67): '"""Verify Reference Check3"""', (199, 69, 200, 51): "{'applicant_id': app.ref_id}"}, {}), "('Verify Reference Check3', {'applicant_id': app.ref_id})", False, 'import frappe\n'), ((210, 27, 211, 52), 'frappe.get_doc', 'frappe.get_doc', ({(210, 42, 210, 67): '"""Verify Reference Check4"""', (210, 69, 211, 51): "{'applicant_id': app.ref_id}"}, {}), "('Verify Reference Check4', {'applicant_id': app.ref_id})", False, 'import frappe\n'), ((221, 27, 222, 52), 'frappe.get_doc', 'frappe.get_doc', ({(221, 42, 221, 62): '"""Verify Civil Check"""', (221, 64, 222, 51): "{'applicant_id': app.ref_id}"}, {}), "('Verify Civil Check', {'applicant_id': app.ref_id})", False, 'import frappe\n'), ((232, 27, 233, 52), 'frappe.get_doc', 'frappe.get_doc', ({(232, 42, 232, 65): '"""Verify Criminal Check"""', (232, 67, 233, 51): "{'applicant_id': app.ref_id}"}, {}), "('Verify Criminal Check', {'applicant_id': app.ref_id})", False, 'import frappe\n'), ((243, 27, 244, 52), 'frappe.get_doc', 'frappe.get_doc', ({(243, 42, 243, 60): '"""Verify ID Check1"""', (243, 62, 244, 51): "{'applicant_id': app.ref_id}"}, {}), "('Verify ID Check1', {'applicant_id': app.ref_id})", False, 'import frappe\n'), ((254, 27, 255, 52), 'frappe.get_doc', 'frappe.get_doc', ({(254, 42, 254, 60): '"""Verify ID Check2"""', (254, 62, 255, 51): "{'applicant_id': app.ref_id}"}, {}), "('Verify ID Check2', {'applicant_id': app.ref_id})", False, 'import frappe\n'), ((265, 27, 266, 52), 'frappe.get_doc', 'frappe.get_doc', ({(265, 42, 265, 60): '"""Verify ID Check3"""', (265, 62, 266, 51): "{'applicant_id': app.ref_id}"}, {}), "('Verify ID Check3', {'applicant_id': app.ref_id})", False, 'import frappe\n'), ((276, 27, 277, 52), 'frappe.get_doc', 'frappe.get_doc', ({(276, 42, 276, 60): '"""Verify ID Check4"""', (276, 62, 277, 51): "{'applicant_id': app.ref_id}"}, {}), "('Verify ID Check4', {'applicant_id': app.ref_id})", False, 'import frappe\n'), ((287, 27, 288, 52), 'frappe.get_doc', 'frappe.get_doc', ({(287, 42, 287, 60): '"""Verify ID Check5"""', (287, 62, 288, 51): "{'applicant_id': app.ref_id}"}, {}), "('Verify ID Check5', {'applicant_id': app.ref_id})", False, 'import frappe\n'), ((298, 27, 299, 52), 'frappe.get_doc', 'frappe.get_doc', ({(298, 42, 298, 60): '"""Verify ID Check6"""', (298, 62, 299, 51): "{'applicant_id': app.ref_id}"}, {}), "('Verify ID Check6', {'applicant_id': app.ref_id})", False, 'import frappe\n'), ((78, 31, 79, 56), 'frappe.get_doc', 'frappe.get_doc', ({(78, 46, 78, 71): '"""Verify Education Check1"""', (78, 73, 79, 55): "{'applicant_id': app.ref_id}"}, {}), "('Verify Education Check1', {'applicant_id': app.ref_id})", False, 'import frappe\n')]