<?php include "../../root.class.php";
$html = new html();
$html->add_styles_page();
$html->prevent_enter_script();

$jc_number = new input();
$jc_number->name("jc_number");
$jc_number->id("jc_number");
$jc_number->class("inputs");
$jc_number->placeholder("JOB CARD NUMBER");
$jc_number->type("text");
$jc_number->onkeyup("search_jobcard()");

$status = new input();
$status->name("status");
$status->id("status");
$status->class("inputs");
$status->type("hidden");
$status->value(3);

$account_manager_id = new select();
$account_manager_id->name("user_to_do");
$account_manager_id->id("user_to_do");
$account_manager_id->class("inputs");
$account_manager_id->add_option("", "TECHNICIAN");
$account_manager_id->fill_from_db("users", "record_id", "username", "user_type = 'TECHNICIANS'");
$account_manager_id->onchange("search_jobcard()");

?>

<div class="search_form">
    <?php
    $jc_number->add();
    $status->add();
    $account_manager_id->add();
    ?>
</div>

<?php
$ajax = new js_ajax();
$ajax->run_on_load();
$ajax->function_name("search_jobcard");
// $ajax->submit_btn_id("submit");
$ajax->select("job_cards_tech");
$ajax->return_columns(['jc_number','company_name','company_address','contact_person','contact_number']);
$ajax->redirect("tech_jobcard_for_quotation.php");
?>