Yohohohohohooho | Sanrei Aya
Sanrei Aya


Server : LiteSpeed
System : Linux barito.iixcp.rumahweb.net 5.14.0-611.49.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Apr 21 16:39:08 EDT 2026 x86_64
User : elvh3918 ( 1528)
PHP Version : 8.2.31
Disable Function : mail
Directory :  /home/elvh3918/public_html/tenant/storage/framework/views/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/elvh3918/public_html/tenant/storage/framework/views/d81e8fcfbf693d3bfb5298493aa64fd4.php
<?php $__env->startSection('content-detail'); ?>
    <div class="mb-2">
        <div class="input-group">
            <input type="text" class="form-control" id="enter_code_item" name="enter_code_item" placeholder="Enter Code" onkeypress="scanDataItem(event, 'enter')">
            <div class="input-group-append">
                <button class="btn btn-outline-primary" type="button" onclick='scanDataItem(event, "click")'>Enter</button>
            </div>
        </div>
        <span class="" id="lbl_code_item"></span>
    </div>

    <table class="table table-sm table-bordered mb-2">
        <thead class="bg-dark">
            <tr>
                <th class="text-center align-middle text-capitalize">type</th>
                <th class="text-center align-middle text-capitalize">item</th>
                <th class="text-center align-middle text-capitalize">qty</th>
                <th class="text-center align-middle text-capitalize d-print-none"width="30px">#</th>
            </tr>
        </thead>
        <tbody id="tbody-item"></tbody>
        <tfoot class="bg-light">
            <tr>
                <td class="text-center align-middle text-capitalize font-weight-bold" colspan="2">total</td>
                <td>
                    <input type="number" step="any" class="form-control" id="total_qty" name="total_qty" value=0 style="text-align: right;" readonly />
                </td>
                <td></td>
            </tr>
        </tfoot>
    </table>

    <div class="d-flex justify-content-center">
        <button type="button" onclick='addNewItem()' class="btn btn-sm btn-outline-dark mr-2">
            <i class="fa fa-plus"></i>
            <span class="ml-1">Add New</span>
        </button>

        <button type="button" onclick='clearTableItem("item")' class="btn btn-sm btn-outline-danger">
            <i class="fa fa-trash"></i>
            <span class="ml-1">Clear</span>
        </button>
    </div>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('page-script-detail'); ?>
<script>
    function resetTableDetail(type) {
        var total_element = $(".rowCount" + type).length;
        if (total_element == 0) {
            var html="";
            html +='<tr>';
                html +='<td class="text-center align-middle text-capitalize text-muted" colspan="5">no matching records found</td>';
            html +='</tr>';

            $("#tbody-" + type).append(html);
        }

        calculateQty();
    }

    function addNewItem() {
        $('#modal_item').modal('toggle');
    }

    function clearTableItem(type) {
        document.getElementById("tbody-" + type).innerHTML = "";

        resetTableDetail('item');
    }

    function scanDataItem(e, fromEvent) {
        if (fromEvent == 'enter') {
            if (e.keyCode === 13) { // where 13 is the enter button
                e.preventDefault(); //ignore submit
                exec_scanDataItem();
            }
        }

        if (fromEvent == 'click') {
            exec_scanDataItem();
            document.getElementById("enter_code_item").focus();
        }
    }

    function exec_scanDataItem() {
        scan_indicator("lbl_code_item", "enter_code_item", "reset", "", false);

        var code = document.getElementById("enter_code_item").value;
        var item = <?php echo json_encode($item); ?>;
        for (let index = 0; index < item.length; index++) {
            if (item[index]['code'] == code) {
                selectModalItem(item[index], false, 'enter');
                return;
            }
        }

        scan_indicator("lbl_code_item", "enter_code_item", "error", "Data not found!");
    }
</script>
<?php $__env->stopSection(); ?><?php /**PATH /home/elvh3918/public_html/tenant/resources/views/content/trans/incoming/partials/detail.blade.php ENDPATH**/ ?>

Yohohohohohooho | Sanrei Aya