<?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()");

$room_no = new input();
$room_no->class("inputs");
$room_no->type("text");
$room_no->placeholder("ROOM NUMBER");
$room_no->name("room_no");
$room_no->id("room_no");
$room_no->onchange("search_jobcard()");

$number_of_trolleys = new input();
$number_of_trolleys->class("inputs");
$number_of_trolleys->type("text");
$number_of_trolleys->placeholder("NUMBER OF TROLLEYS");
$number_of_trolleys->name("number_of_trolleys");
$number_of_trolleys->id("number_of_trolleys");
$number_of_trolleys->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 $room_no->add(); ?>
                        <?php $number_of_trolleys->add(); ?>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <?php
    $ajax = new js_ajax();
    $ajax->run_on_load();
    $ajax->function_name("search_jobcard");
    $ajax->select("lop_jobcard");
    $ajax->return_columns(['batch_no', 'room_no', 'number_of_trolleys','jobcard_date_closed']);
    $ajax->redirect("lop.pdf.php");
    ?>