function AddAllPrn()
{
    $PersonList = manage_pay_get_list_items::SelectListOfPrn($_REQUEST['cost_center_id']);
    $return = "";
    $msg = "";
    if ($_POST['list_type'] == EXTRA_WORK_LIST) {
        $obj = new manage_pay_get_list_items();
        for ($i = 0; $i < count($PersonList); $i++) {
            $obj->list_id = $_REQUEST['list_id'];
            $obj->staff_id = $PersonList[$i]['staff_id'];
            if ($PersonList[$i]['person_type'] == HR_EMPLOYEE) {
                $obj->salary_item_type_id = 39;
            } else {
                if ($PersonList[$i]['person_type'] == HR_WORKER) {
                    $obj->salary_item_type_id = 152;
                } else {
                    if ($PersonList[$i]['person_type'] == HR_CONTRACT) {
                        $obj->salary_item_type_id = 639;
                    }
                }
            }
            $return = $obj->Add();
            if (!$return) {
                break;
            }
        }
    } else {
        if ($_POST['list_type'] == MISSION_LIST) {
            $obj = new manage_mission_list_items();
            for ($i = 0; $i < count($PersonList); $i++) {
                $obj->list_id = $_REQUEST['list_id'];
                $obj->staff_id = $PersonList[$i]['staff_id'];
                if ($PersonList[$i]['person_type'] == HR_PROFESSOR) {
                    $obj->salary_item_type_id = 42;
                } else {
                    if ($PersonList[$i]['person_type'] == HR_EMPLOYEE) {
                        $obj->salary_item_type_id = 43;
                    } else {
                        if ($PersonList[$i]['person_type'] == HR_CONTRACT) {
                            $obj->salary_item_type_id = 643;
                        }
                    }
                }
                $return = $obj->Add();
                if (!$return) {
                    break;
                }
            }
        } else {
            if ($_POST['list_type'] == PAY_GET_LIST) {
                $obj = new manage_pay_get_list_items();
                for ($i = 0; $i < count($PersonList); $i++) {
                    $obj->list_id = $_REQUEST['list_id'];
                    $obj->staff_id = $PersonList[$i]['staff_id'];
                    $obj->salary_item_type_id = $_REQUEST['itemID'];
                    $return = $obj->Add();
                    if (!$return) {
                        break;
                    }
                }
            }
        }
    }
    if (count($PersonList) == 0) {
        $msg = 'این واحد شامل این گروه افراد نمی باشد.';
    }
    if (!$return) {
        echo Response::createObjectiveResponse($return, $msg);
        die;
    }
    echo Response::createObjectiveResponse(true, "");
    die;
}