<?php

$page_security = 'SA_JOB_CARD_LABOUR_INQ';
$path_to_root = "../..";

include_once($path_to_root . "/includes/db_pager.inc");
include_once($path_to_root . "/includes/session.inc");
include_once($path_to_root . "/includes/ui/ui_input.inc"); 
include_once($path_to_root . "/services/includes/ui/job_order_labours_ui.inc"); 
include_once($path_to_root . "/services/includes/db/job_order_labours_db.inc"); 
include_once($path_to_root . "/includes/ui/ui_lists_custom.inc"); 
include_once($path_to_root . "/includes/ui/ui_view_custom.inc"); 
include_once($path_to_root . "/payroll/includes/db/employees_db.inc"); 

$js = "";
$js .= get_js_open_window(900, 500);
$js .= get_js_date_picker();

page(_($help_context = "Job Card Labour Inquiry"), false, false, "", $js);

start_form();

    start_table(TABLESTYLE_NOBORDER);
        start_row();
            ref_cells(_("Job Card #:"), 'jo_id', '', null, '', true);
            employee_search_list_cells(_("Employee:"), 'employee_code', null, false, true);
            date_cells(_("from:"), 'from_date', null, null, 0, -1);
            date_cells(_("to:"), 'to_date');
            value_list_cells('Employee Rate Category:', 'emp_rate_category', 'EMPLOYEE_RATE_CATEGORY', null, '', true);
            submit_cells('Search', _("Search"),'',_('Search'), 'default');
        end_row();

    end_table(1);

    display_job_order_labours_inquiry($_POST['jo_id'], $_POST['employee_code'], $_POST['from_date'], $_POST['to_date'], $_POST['emp_rate_category']);

end_form(2);
end_page();

?>