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

$batch_no = new input();
$batch_no->class("inputs");
$batch_no->type("text");
$batch_no->placeholder("BATCH NO");
$batch_no->name("batch_no");
$batch_no->id("batch_no");
$batch_no->onchange("search_jobcard()");

$product_id = new input();
$product_id->class("inputs");
$product_id->type("text");
$product_id->placeholder("PRODUCT ID");
$product_id->name("product_id");
$product_id->id("product_id");
$product_id->onchange("search_jobcard()");

$quality_control_checked_by = new input();
$quality_control_checked_by->class("inputs");
$quality_control_checked_by->type("text");
$quality_control_checked_by->placeholder("QUALITY CONTROL CHECKED BY");
$quality_control_checked_by->name("checked_by_quality_control");
$quality_control_checked_by->id("checked_by_quality_control");
$quality_control_checked_by->onchange("search_jobcard()");

$production_checked_by = new input();
$production_checked_by->class("inputs");
$production_checked_by->type("text");
$production_checked_by->placeholder("PRODUCTION CHECKED BY");
$production_checked_by->name("production_checked_by");
$production_checked_by->id("production_checked_by");
$production_checked_by->onchange("search_jobcard()");

?>
<div class="column">
    <div class="banner">
        <div class="row">
            <div class="search_form">
                <div class="row">
                    <div class="row">
                        <?php $batch_no->add(); ?>
                        <?php $product_id->add(); ?>
                        <?php $quality_control_checked_by->add(); ?>
                        <?php $production_checked_by->add(); ?>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <?php
    $ajax = new js_ajax();
    $ajax->run_on_load();
    $ajax->function_name("search_jobcard");
    $ajax->select("final_sorting_jobcard");
    $ajax->return_columns(['batch_no', '	checked_by_quality_control', 'production_supervisor','jobcard_closed']);
    $ajax->redirect("final_sorting.pdf.php");
    ?>