<?php

require('../../asset/mod/autoLoad.php');

?>
<style>
    .fontInput {
        font-size: 13px;
        font-family: arial;
    }

    .fontJudul {
        font-size: 12px;
        font-family: arial;
        color: dodgerblue;
        background: #000;

    }
</style>

<div class="content-wrapper">

    <?php require('./layout/headerpage.php'); ?>

    <div class="container col-12 mb-4 pb-5">
        <div class="row  mx-0 pr-3">
            <div class="col-12">
                <div class="col-12 ">
                    <div class="card  mx-0">
                        <div class="timeline-header bg-primary py-2 pl-2">
                            <b class="text-light judul"><span class="bi bi-clipboard-plus"></span> Rekam Transaksi </b>
                        </div>

                        <div class="row col-md-12">
                            <div class="col-md-8">
                                <div class="card-body mt-4 px-1 mx-2">

                                    <div class="row">
                                        <div class="col-12 col-sm-6 col-md-12">
                                            <div class="info-box mb-3">


                                                <div class="info-box-content">
                                                    <div class="relative mb-0 pb-4">
                                                        <input name="judul" value="FILTER KATEGORI TRANSAKSI" style="background-color: gainsboro;" class="form-control-sm col-sm-3 fontInput small bg-default mt-3 text-center" disabled>
                                                    </div>

                                                    <div class="col-sm-12 invoice-col pt-0">

                                                        <form action="<?php $class = new linkpage;
                                                                        echo $class->pageAction('transaksi/transaksi_create_step2'); ?>" method="post">

                                                            <div class="row">

                                                                <label class="col-sm-3 col-form-label">Mode Kas </label>
                                                                <div class="col-md-9">
                                                                    <select name="model" id="model" class="form-control form-control-sm fontInput " required>
                                                                        <option value="">--Pilih Model--</option>

                                                                    </select>
                                                                </div>

                                                            </div>

                                                            <div class="row">
                                                                <label class="col-sm-3 col-form-label">Kategori Transaksi</label>
                                                                <div class="col-md-9">
                                                                    <select name="kategori" id="kategori" class="form-control form-control-sm fontInput " required>
                                                                        <option value="">--Pilih Kategori--</option>
                                                                    </select>
                                                                </div>

                                                            </div>
                                                            <div class="row">

                                                                <label class="col-sm-3 col-form-label">Jenis Transaksi</label>
                                                                <div class="col-md-9">
                                                                    <select name="jenis" id="jenis" class="form-control form-control-sm fontInput " required>
                                                                    </select>
                                                                </div>

                                                            </div>
                                                            <div class='row '>
                                                                <div class="col-12 my-0 pl-3 py-0 my-3">
                                                                    <div class="row float-left">
                                                                        <div class="col-auto">
                                                                            <button type="submit" class="btn btn-primary btn-xs mx-1 px-2 mt-1" name="submitStep1"> LANJUT <i class="bi-chevron-double-right"></i></button>
                                                                            <a <?php echo $link->page('transaksi/transaksi_read'); ?> class="btn btn-primary btn-xs float-right mx-1 px-2 mt-1"><i class="bi-arrow-left-circle"></i> Cancel</a>
                                                                        </div>

                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </form>
                                                    </div>
                                                </div>

                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>


<script type="text/javascript">
    $(document).ready(function() {
        $.ajax({
            type: 'POST',
            url: "view/transaksi/get_model.php",
            cache: false,
            success: function(msg) {
                $("#model").html(msg);
            }
        });

        $("#model").change(function() {
            var model = $("#model").val();
            $.ajax({
                type: 'POST',
                url: "view/transaksi/get_kategori.php",
                data: {
                    model: model
                },
                cache: false,
                success: function(msg) {
                    $("#kategori").html(msg);
                }
            });
        });

        $("#kategori").change(function() {
            var kategori = $("#kategori").val();
            $.ajax({
                type: 'POST',
                url: "view/transaksi/get_jenis.php",
                data: {
                    kategori: kategori
                },
                cache: false,
                success: function(msg) {
                    $("#jenis").html(msg);
                }
            });
        });
        $("#jenis").change(function() {
            var jenis = $("#jenis").val();
            $.ajax({
                type: 'POST',
                url: "view/transaksi/get_pajak.php",
                data: {
                    jenis: jenis
                },
                cache: false,
                success: function(msg) {
                    $("#pajak").html(msg);
                }
            });
        });
    });
</script>