<?php $__env->startSection('content'); ?>
    <link href="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css" rel="stylesheet" />
    <style>
        .check {
            border: 1px solid red !important;
        }

        .d-flex.f2.justify-content-between a,
        .compalintBox .justify-content-between .btns.common-btn,
        .compalintBox .card .justify-content-between span.view-msg {
            padding: 8px 10px;
            font-size: 13px;
            font-weight: 600;
            height: 34px;
            margin-right: 3px;
            margin-top: 0;
        }

        .user-rating {
            direction: rtl;
            font-size: 20px;
            unicode-bidi: bidi-override;
            padding: 10px 30px;
            display: inline-block;
        }

        .user-rating input {
            opacity: 0;
            position: relative;
            left: -15px;
            z-index: 2;
            cursor: pointer;
        }

        .user-rating span.star:before {
            color: #777777;
            content: "ï€†";
            /*padding-right: 5px;*/
        }

        .user-rating span.star {
            display: inline-block;
            font-family: FontAwesome;
            font-style: normal;
            font-weight: normal;
            position: relative;
            z-index: 1;
        }

        .user-rating span {
            margin-left: -15px;
        }

        .user-rating span.star:before {
            color: #777777;
            content: "\f006";
            /*padding-right: 5px;*/
        }

        .user-rating input:hover+span.star:before,
        .user-rating input:hover+span.star~span.star:before,
        .user-rating input:checked+span.star:before,
        .user-rating input:checked+span.star~span.star:before {
            color: #ffd100;
            content: "\f005";
        }

        .selected-rating {
            color: #ffd100;
            font-weight: bold;
            font-size: 3em;
        }

        label.error {
            color: red;
        }

        .user i:before {
            display: inline-block;
            font: normal normal normal 14px/1 FontAwesome;
            font-size: inherit;
            text-rendering: auto;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
            content: "\f2c0";
        }

        .page {
            width: 100%;
            height: 100%;
        }

        .phone {
            width: 100%;
            height: 100%;
            background-position: center center;
            background-repeat: no-repeat;
            background-size: auto 800px;
        }

        .chat-root {
            height: 100%;
        }

        .wa-container {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            position: relative;
        }

        .sent-btttn {
            position: relative;
            display: table;
            margin: 0px auto;
            background: #14a852 !important;
            font-family: roboto, sans-serif;
            color: #fff;
        }

        .sent-btttn i {
            margin-top: 16px;
        }

        .wa-container .status-bar {
            height: 25px;
            background: #054d44;
            color: #fff;
            font-size: 14px;
            padding: 0 8px;
        }

        .wa-container .status-bar:after {
            content: "";
            display: table;
            clear: both;
        }

        .wa-container .status-bar div {
            float: right;
            position: relative;
            top: 50%;
            transform: translateY(-50%);
            margin: 0 0 0 8px;
        }

        .wa-container .user-bar {
            height: 55px;
            background: #14a852;
            color: #fff;
            padding: 0 8px;
            font-size: 24px;
        }

        .wa-container .user-bar:after {
            content: "";
            display: table;
            clear: both;
        }

        .wa-container .user-bar div {
            float: left;
            position: relative;
            top: 50%;
            transform: translateY(-50%);
        }

        .wa-container .user-bar div.actions {
            float: right;
            margin: 0 0 0 20px;
        }

        .wa-container .user-bar div.actions.more {
            margin: 0 12px 0 20px;
        }

        .wa-container .user-bar div.actions.attachment i {
            display: block;
            transform: rotate(-45deg);
        }

        .wa-container .user-bar .user {
            margin: 0 0 0 8px;
            width: 36px;
            height: 36px;
        }

        .wa-container .user-bar .user img {
            border-radius: 50%;
            display: block;
            box-shadow: 0 1px 0 rgba(255, 255, 255, 0.1);
            width: 100%;
        }

        .wa-container .user-bar .user-name {
            font-size: 16px;
            margin: 0 0 0 8px;
            width: 165px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .wa-container .user-bar .user-name span {
            display: block;
            font-size: 12px;
        }

        .wa-container .bottom-bar {
            height: 47px;
            background: #000;
            color: #fff;
            font-size: 22px;
        }

        .wa-container .bottom-bar div {
            width: 33.333333%;
            float: left;
            text-align: center;
            position: relative;
            top: 50%;
            transform: translateY(-50%);
        }

        .wa-container .bottom-bar div.triangle i {
            display: block;
            transform: rotate(-90deg);
        }

        .wa-container .chat-window {
            height: calc(100% - 152px);
            position: relative;
            background-size: 100%;
            border: 1px solid #14a85275;
            background: #14a8521f;
            box-shadow: inset 0 10px 10px -10px #000000;
        }

        .wa-container .chat-window:after {
            content: "";
            display: table;
            clear: both;
        }

        .wa-container .chat-window .conversation {
            width: 100%;
            overflow: auto;
            height: calc(100% - 68px);
            padding: 0 16px;
        }

        .wa-container .chat-window .conversation:after {
            content: "";
            display: table;
            clear: both;
        }

        .wa-container .chat-window .balloon {
            padding: 8px;
            position: relative;
            color: #000;
            font-size: 14px;
            line-height: 18px;
            box-shadow: 0 0 1px rgba(0, 0, 0, 0.2);
            clear: both;
            margin: 8px 0;
            max-width: 85%;
        }

        .wa-container .chat-window .balloon:after {
            position: absolute;
            content: "";
            width: 0;
            height: 0;
            border-style: solid;
        }

        .wa-container .chat-window .balloon .data {
            display: inline-block;
            padding: 0 20px 0 16px;
            font-size: 11px;
            color: #b9b9b9;
            position: relative;
            bottom: -5px;
            float: right;
            background-repeat: no-repeat;
            background-position: right 3px;
            background-color: transparent;
            background-size: 16px auto;
        }

        .sent-btttn {
            padding: 0px 30px;
            cursor: pointer;
        }

        .wa-container .chat-window .balloon .data.blue {
            background-image: url("http://wutsapp.net/images/dist/blue.png");
        }

        .wa-container .chat-window .balloon img {
            width: 100%;
        }

        .wa-container .chat-window .balloon:first-child {
            margin: 16px 0 8px;
        }

        .wa-container .chat-window .balloon.him {
            background: #fff;
            float: left;
            border-radius: 0px 5px 5px 5px;
        }

        .wa-container .chat-window .balloon.him .data {
            padding: 0 0 0 16px;
        }

        .wa-container .chat-window .balloon.him:after {
            top: 0;
            left: -10px;
            border-width: 0px 10px 10px 0;
            border-color: transparent #fff transparent transparent;
        }

        .wa-container .chat-window .balloon.you {
            background: #e1ffc7;
            float: right;
            border-radius: 5px 0px 5px 5px;
        }

        .wa-container .chat-window .balloon.you:after {
            top: 0;
            right: -10px;
            border-width: 0px 0 10px 10px;
            border-color: transparent transparent transparent #e1ffc7;
        }

        .wa-container .chat-window .textarea {
            width: 100%;
            z-index: 2;
            left: 0;
            position: absolute;
            bottom: 8px;
            height: 50px;
            padding: 0 0 0 8px;
        }

        .wa-container .chat-window .textarea:after {
            content: "";
            display: table;
            clear: both;
        }

        .wa-container .chat-window .textarea ::-webkit-input-placeholder {
            color: #b9b9b9;
        }

        .wa-container .chat-window .textarea ::-moz-placeholder {
            /* Firefox 19+ */
            color: #b9b9b9;
        }

        .wa-container .chat-window .textarea :-ms-input-placeholder {
            color: #b9b9b9;
        }

        .wa-container .chat-window .textarea div,
        .wa-container .chat-window .textarea textarea {
            height: 100%;
            float: left;
            background: #fff;
        }

        .wa-container .chat-window .textarea .emoticons {
            width: 10%;
            background: url("http://valeriopierbattista.com/projects/wutsapp/images/dist/smile.png") center center no-repeat #fff;
            background-size: 20px;
            border-radius: 5px 0 0 5px;
        }

        .wa-container .chat-window .textarea textarea {
            width: 80%;
            border: 0;
            outline: none;
            padding-top: 14px;
            resize: none;
        }

        .wa-container .chat-window .textarea .photo {
            width: 10%;
            border-radius: 0 0 5px 0;
            position: relative;
            text-align: center;
        }

        .wa-container .chat-window .textarea .photo:after {
            position: absolute;
            width: 0;
            height: 0;
            border-style: solid;
            content: "";
            top: 0;
            right: -10px;
            border-width: 0px 0 10px 10px;
            border-color: transparent transparent transparent #fff;
        }

        .wa-container .chat-window .textarea .photo i {
            display: block;
            position: relative;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            color: #7d8488;
            font-size: 24px;
        }

        .wa-container .chat-window .textarea .send-mic {
            width: 17%;
            background: transparent;
            position: relative;
            cursor: pointer;
        }

        .wa-container .chat-window .textarea .send-mic .circle-cont {
            color: #fff;
            border-radius: 50%;
            position: relative;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background: #14a852;
            width: 48px;
            height: 48px;
            box-shadow: 0 1px 0 #14a852;
        }

        .wa-container .chat-window .textarea .send-mic .circle-cont i {
            display: inline-block;
            position: relative;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            font-size: 24px;
        }

        .wrapperchat {
            height: calc(100% - 81px);
        }

        .page.nexus6 .phone {
            /*background-image: url("http://valeriopierbattista.com/projects/wutsapp/images/dist/nexus6.png");*/
            background-size: auto 799px;
        }

        .page.nexus6 .wa-container {
            width: 700px;
            height: 681px;
            padding: 6px 0 0;
        }

        .page.nexus6 .wa-container .chat-window {
            height: calc(100% - 55px);
        }

        .page.nexus6 .wrapperchat {
            height: calc(100% - 69px);
        }

        .more {
            position: absolute;
            bottom: 30px;
            left: 10px;
        }

        .more a,
        .more a:visited {
            padding: 10px 20px;
            color: black;
            font-size: 24px;
            background: yellow;
        }

        .certWraper .amc_title {
            margin-left: 0;
        }

        .certWraper .amc_details>div:first-child {
            margin-left: 0;
        }

        a.eye {
            color: #11beb4;
            background: transparent;
            padding: 4px 0px;
            border-radius: 0;
        }

        a.eye i {
            margin-right: 2px;
        }

        .amc_details>div {
            text-transform: inherit;
            font-size: 15px;
        }

        .amc_details {
            justify-content: center;
        }

        button.G-add {
            padding: 6px 30px;
            background: linear-gradient(90deg, rgba(2, 188, 177, 1) 0%, rgb(3, 152, 213, 1) 100%);
            border: none;
            border-radius: 35px;
            margin-top: 30px;
            color: #fff;
        }
    </style>
    <div class="common-content">
        <div class="page-content">
            <div class="page-heading">
                <div class="headings">
                    <h6>Asset management</h6>
                    <?php if(session()->has('sucess')): ?>
                        <div class="col-sm-12">
                            <div class="alert wraper alert-success alert-dismissible fade show" role="alert"
                                style="position: absolute;left: 0;top: 43px;z-index: 1;text-align: center;">
                                <span class="badge badge-pill badge-success">Success</span> <?php echo e(session()->get('sucess')); ?>!
                                <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                                    <span aria-hidden="true">&times;</span>
                                </button>
                            </div>
                        </div>
                    <?php endif; ?>
                    <?php if(session()->has('warning')): ?>
                        <div class="col-sm-12">
                            <div class="alert wraper alert-success alert-dismissible fade show" role="alert"
                                style="position: absolute;left: 0;top: 43px;z-index: 1;text-align: center;">
                                <span class="badge badge-pill badge-warning">Warning</span> <?php echo e(session()->get('warning')); ?>!
                                <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                                    <span aria-hidden="true">&times;</span>
                                </button>
                            </div>
                        </div>
                    <?php endif; ?>
                </div>
            </div>
            <input name="_token" type="hidden" id="token_buyer" value="<?php echo e(csrf_token()); ?>">
            <div id="accordion" style="display: block;  width: 100%;margin: 0 0 10px;">
                <!--REGISTER EXISTING PRODUCT START--->
                <!-- <button onclick="check()">check</button>-->
                <!-- REGISTER NEW PRODUCT START -->
                <div class="boxings card">
                    <div class="card-header">
                        <?php if($asset_from == ''): ?>
                            <h6 class="collapsed card-link" data-toggle="collapse" href="#collapseTwo">APPROVE NEW PRODUCT
                            </h6>
                        <?php else: ?>
                            <h6 class="card-link" data-toggle="collapse" href="#collapseTwo">APPROVE NEW PRODUCT</h6>
                        <?php endif; ?>
                    </div>
                    <?php if($asset_from == ''): ?>
                        <div class="bxNew collapse" id="collapseTwo" data-parent="#accordion">
                        <?php else: ?>
                            <div class="bxNew collapse show" id="collapseTwo" data-parent="#accordion">
                    <?php endif; ?>
                    <form name="register_new" id="register_new" method="POST"
                        action="<?php echo e(url('buyers/register_new_product')); ?>" enctype="multipart/form-data">
                        <?php echo csrf_field(); ?>
                        <div class="row manufacturerlist">
                            <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
                                <div class="form-inputs">
                                    <div class="form-group">
                                        <label>Product Name</label>
                                        <select class="form-control selectmanufacturer invoiceselect" id="product"
                                            name="product">
                                            <option value="">Select</option>
                                            <?php if(!empty($buyerproducts)): ?>
                                                <?php $__currentLoopData = $buyerproducts; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $buyerproducts): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                    <option
                                                        value="<?php echo e($buyerproducts->id . '_' . $buyerproducts->product_id . '_' . $buyerproducts->vendor_id . '_' . $buyerproducts->bid_id); ?>">
                                                        <?php echo e(ucfirst($buyerproducts->product_name)); ?></option>
                                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                            <?php endif; ?>
                                        </select>
                                    </div>
                                    <input type="hidden" name="bid_id" id="bid_id">
                                    <input type="hidden" name="register_sold_id" id="register_sold_id">
                                </div>
                            </div>
                            <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12" style="display:none;"
                                id="approve_departmentdiv">
                                <div class="form-inputs">
                                    <div class="form-group">
                                        <label>Department<sup>*</sup></label>
                                        <select class="form-control selectmanufacturer invoiceselect" id="department"
                                            name="department">
                                            <option value="">Select</option>
                                            <?php $__currentLoopData = $departmentlist; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $departmentlist): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                <option value="<?php echo e($departmentlist->id); ?>">
                                                    <?php echo e(ucfirst($departmentlist->name)); ?></option>
                                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                        </select>
                                    </div>
                                </div>
                            </div>
                            <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12" id="test_name_div" style="display:none">
                                <div class="form-inputs">
                                    <div class="form-group">
                                        <label>Test Name</label>
                                        <input id="test_name" name="test_name" type="text"
                                            class="form-control" readonly>
                                    </div>
                                </div>
                            </div>
                            <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12" id="waranty_date_new" style="display:none">
                                <div class="form-inputs">
                                    <div class="form-group">
                                        <label>Product Warranty Date</label><input type="checkbox" name="warrenty_check"
                                            id="warrenty_check" class="approve_check">
                                        <input id="validation_date_new" name="validation_date_new" type="text"
                                            class="form-control" readonly>
                                    </div>
                                </div>
                            </div>
                            <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12" style="display:none"
                                id="validation_date_div">
                                <div class="form-inputs">
                                    <div class="form-group">
                                        <label>Validation Date</label><input type="checkbox" name="validation_date_check"
                                            id="validation_date_check" class="approve_check">
                                        <input id="validation_date" name="validation_date" type="text"
                                            class="form-control" readonly>
                                    </div>
                                </div>
                            </div>
                            <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12" id="product_code_div_new"
                                style="display:none">
                                <div class="form-inputs">
                                    <div class="form-group">
                                        <label>Model No</label>
                                        <input id="product_code_new" name="product_code_new" type="text"
                                            class="form-control" readonly>
                                    </div>
                                </div>
                            </div>
                            <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12" style="display:none" id="serialno_div">
                                <div class="form-inputs">
                                    <div class="form-group">
                                        <label>Serial Number </label>
                                        <input id="serial_no" name="serial_no" type="text" class="form-control"
                                            readonly>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12" style="display:none" id="invoice_div">
                                <div class="form-inputs">
                                    <div class="form-group">
                                        <label>Invoice Number </label><input type="checkbox" name="invoice_check"
                                            id="invoice_check" class="approve_check">
                                        <input id="invoice_number" name="invoice_number" type="text"
                                            class="form-control" readonly>
                                    </div>
                                </div>
                            </div>
                            <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12" style="display:none"
                                id="product_discard_div">
                                <div class="form-inputs app-vend">
                                    <div class="form-group newAlign">
                                        <label>Product Discard Date</label><input type="checkbox" name="discardyear_check"
                                            id="discardyear_check" class="approve_check">
                                        <input id="product_discard_years" type="text" class="form-control"
                                            data-zdp_readonly_element="false" name="product_discard_years" readonly>
                                    </div>
                                </div>
                            </div>
                            <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12" style="display:none"
                                id="product_preventive_div">
                                <div class="form-inputs">
                                    <div class="form-group">
                                        <label>Preventive Maintenance Frequency</label><input type="checkbox"
                                            name="pmaintenance_check" id="pmaintenance_check" class="approve_check">
                                        <input id="preventive" type="text" class="form-control"
                                            data-zdp_readonly_element="false" name="preventive" readonly>
                                    </div>
                                </div>
                            </div>
                            <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12" id="equipment_month_approve_div"
                                style="display:none">
                                <div class="form-inputs app-vend" style="    margin-top: 29px;">
                                    <div class="form-group newAlign">
                                        <label>No. of days Equipment can be used in a month</label>
                                        <select class="form-control selectmanufacturer" id="equipment_month_approve"
                                            name="equipment_month_approve">
                                        </select>
                                    </div>
                                </div>
                            </div>
                            <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12" id="equipment_test_approve_div"
                                style="display:none">
                                <div class="form-inputs app-vend" style="    margin-top: 29px;">
                                    <div class="form-group newAlign">
                                        <span id="equipment_default"></span>
                                        <select class="form-control selectmanufacturer" id="equipment_val"
                                            name="equipment_val">
                                        </select>
                                    </div>
                                </div>
                            </div>
                            <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
                            </div>
                            <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12" id="barcodenewdiv" style="display:none">
                                <div class="form-inputs app-vend">
                                    <div class="form-group">
                                        <label>Barcode</label>
                                        <input id="barcode_new" type="text" class="form-control" name="barcode_new"
                                            readonly>
                                    </div>
                                </div>
                            </div>
                            <div class="col-lg-3 col-md-4 col-md-12 barcodebutton" style="display:none">
                                <button type="button" class="barcodeBtn" id="generate_new"
                                    onclick="generatebarcode()"
                                    style="display:none;height: 38px;margin-top: 25px;cursor: pointer;">Generate
                                    Barcode</button>
                            </div>
                            <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12" style="display:none"
                                id="product_additional_div">
                                <div class="form-inputs app-vend">
                                    <div class="form-group newAlign">
                                        <label>Additional Information</label>
                                        <textarea name="product_additional_info" class="form-control" id="product_additional_info" readonly></textarea>
                                    </div>
                                </div>
                            </div>
                            <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12 my-3" id="critical_div"
                                style="display:none">
                                <div class="form-inputs app-vend">
                                    <div class="form-group">
                                        <label>Criticality Rating of the Product</label>
                                        <div class="slider-wrapper green">
                                            <input class="input-range1" data-slider-id='ex1Slider' type="text"
                                                data-slider-min="0" data-slider-tooltip="always" data-slider-max="10"
                                                data-slider-step="1" data-slider-value="1" />
                                        </div>
                                        <input id="current_value_new" type="hidden" class="form-control"
                                            data-zdp_readonly_element="false" name="current_value_new" value="1">
                                    </div>
                                </div>
                            </div>
                            <div class="col-lg-8 col-md-6 col-sm-12 col-xs-12 mb-y" id="warranty_div"
                                style="display:none">
                                <div class="form-inputs app-vend">
                                    <div class="form-group padSpc">
                                        <input id="amc_cmc_new" type="checkbox" checked class="form-control"
                                            name="amc_cmc_new">
                                        AMC/CMC on Warranty Expiration
                                    </div>
                                </div>
                            </div>
                            <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12" id="renewdate_div" style="display:none">
                                <div class="form-inputs app-vend">
                                    <div class="form-group">
                                        <label>Registration Renewal Date<sup>*</sup></label>
                                        <div class="slider-wrapper green mt-2">
                                            <input id="renewal_date_edit" type="text" class="form-control" readonly>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12" id="documessage" style="display:none">
                                <div class="form-inputs app-vend">
                                    <span style="color:red">This equipment doesn't have a registration document</span>
                                </div>
                            </div>
                            <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12" style="display:none;"
                                id="documenteditdiv">
                                <div class="form-inputs">
                                    <div class="form-group">
                                        <label>Registration document<sup>*</sup></label>
                                        <input type="file" id="document_edit" name="document_edit">
                                    </div>
                                </div>
                            </div>
                            <input type="hidden" id="document_prev" name="document_prev">
                            <input type="hidden" id="govtpermission" name="govtpermission">
                            <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12" id="document_div" style="display:none">
                                <div class="form-inputs app-vend">
                                    <div class="form-group">
                                        <label>Registration Document<sup>*</sup></label>
                                        <div class="slider-wrapper green mt-2">
                                            <a target="_blank" class="eye regdoc" href=""><i class="fa fa-eye"
                                                    aria-hidden="true"></i> View</a>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12" style="display:none;" id="renewaldiv">
                                <div class="form-inputs">
                                    <div class="form-group">
                                        <label>Renewal Date(Government Document)<sup>*</sup></label>
                                        <input id="renewal_date" type="text" class="form-control"
                                            data-zdp_readonly_element="false" name="renewal_date" value="">
                                    </div>
                                </div>
                            </div>
                            <div class="col-lg-3 col-md-4 col-md-12 barcodebutton" style="display:none">
                                <button type="button" class="barcodeBtn" id="generate_new"
                                    onclick="generatebarcode()"
                                    style="display:none;height: 38px;margin-top: 25px;cursor: pointer;">Generate
                                    Barcode</button>
                            </div>
                            <div class="col-md-12" id="certificate_div" style="display:none">
                                <div class="row">
                                    <div class="col-md-6 certWraper">
                                        <input type="checkbox" name="amc_check" id="amc_check" class="approve_check">
                                        <div id="amcdetails" class=""
                                            style="display:block;margin: 25px 0 10px;text-align:center;">
                                            <div class="row">
                                                <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12" id="document_div">
                                                    <div class="form-inputs app-vend">
                                                        <div class="form-group">
                                                            <label>AMC Validity</label>
                                                            <div class="slider-wrapper green">
                                                                ssdd
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12" id="document_div">
                                                    <div class="form-inputs app-vend">
                                                        <div class="form-group">
                                                            <label>Price</label>
                                                            <div class="slider-wrapper green">
                                                                dsfdf
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="form-group text-center amccertificate" style="display:none;">
                                            <label>Amc Certificate</label>
                                            <div class="slider-wrapper green">
                                                <a target="_blank" class="eye amcdoc" href=""><i
                                                        class="fa fa-eye" aria-hidden="true"></i> View</a>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-md-6 certWraper">
                                        <input type="checkbox" name="cmc_check" id="cmc_check" class="approve_check">
                                        <div id="cmcdetails" class=""
                                            style="display:block;margin: 25px 0 10px;text-align:center;">
                                            <div class="row">
                                                <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
                                                    <div class="form-inputs app-vend">
                                                        <div class="form-group">
                                                            <label>AMC Validity</label>
                                                            <div class="slider-wrapper green">
                                                                ssdd
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
                                                    <div class="form-inputs app-vend">
                                                        <div class="form-group">
                                                            <label>Price</label>
                                                            <div class="slider-wrapper green">
                                                                dsfdf
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="form-group  text-center cmccertificate" style="display:none">
                                            <label>Cmc Certificate</label>
                                            <div class="slider-wrapper green">
                                                <a target="_blank" class="eye cmcdoc" href=""><i
                                                        class="fa fa-eye" aria-hidden="true"></i> View</a>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div> <!-- row-end -->
                        <div class="row">
                            <div class="col-12">
                                <div class="green-button" style="display: flex; justify-content: center;">
                                    <button id="sendmessage" class="sendBtns"
                                        style="display:none; margin-right: 10px;">Send Message</button>
                                    <button type="submit" class="btn btn-primary" id="regnew">
                                        <?php echo e(__('Confirm')); ?>

                                    </button>
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
            </div> <!-- boxings end -->
            <!--REGISTER COMPLAINT START--->
            <div class="boxings card" style="display:none;">
                <div class="card-header">
                    <h6 class="collapsed card-link" data-toggle="collapse" href="#collapseThree">REGISTER COMPLAINT</h6>
                </div>
                <div class="bxNew collapse" id="collapseThree" data-parent="#accordion">
                    <form name="add_complaint" id="add_complaint" method="POST"
                        action="<?php echo e(url('buyers/add_complaint')); ?>">
                        <?php echo csrf_field(); ?>
                        <input type="hidden" name="selecttype" id="selecttype">
                        <input type="hidden" name="reg_soldid" id="reg_soldid">
                        <input type="hidden" name="reg_id" id="reg_id">
                        <input type="hidden" name="product_id" id="product_id">
                        <input type="hidden" name="vendor_id" id="vendor_id">
                        <input type="hidden" name="producttype" id="producttype">
                        <div class="row manufacturerlist">
                            <div class="col-lg-8 col-md-5 col-sm-12 col-xs-12 spaDivision">
                                <div class="form-inputs formSer">
                                    <div class="form-group">
                                        <label>Serial Number</label>
                                        <select class="form-control selectmanufacturer invoiceselect"
                                            id="product_complaint" name="product_complaint">
                                            <option value="">Select</option>
                                            <?php $__currentLoopData = $buyerproducts_complaint; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $buyerproducts): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                <option
                                                    value="<?php echo e($buyerproducts->register_sold_id . '_' . 'invoice' . '_' . $buyerproducts->type . '_' . $buyerproducts->id); ?>">
                                                    <?php echo e($buyerproducts->product_serial_no); ?></option>
                                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                        </select>
                                    </div>
                                </div>
                                <div class="orCirc divCents">OR</div>
                                <div class="form-inputs formSer">
                                    <div class="form-group barsection">
                                        <label>Barcode</label>
                                        <select class="form-control selectmanufacturer invoiceselect" id="product_barcode"
                                            name="product_barcode">
                                            <option value="">Select</option>
                                            <?php $__currentLoopData = $buyerproducts_complaint; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $buyerproducts): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                <option
                                                    value="<?php echo e($buyerproducts->register_sold_id . '_' . 'barcode' . '_' . $buyerproducts->type . '_' . $buyerproducts->id); ?>">
                                                    <?php echo e($buyerproducts->barcode); ?></option>
                                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                        </select>
                                    </div>
                                </div>
                            </div>
                            <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12" id="department_div" style="display:none">
                                <div class="form-inputs">
                                    <div class="form-group">
                                        <label>Department</label>
                                        <input id="department_name" name="department_name" type="text"
                                            class="form-control" readonly>
                                    </div>
                                </div>
                            </div>
                            <input id="department_complaint" name="department_complaint" type="hidden"
                                class="form-control">
                            <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12" id="pname_div" style="display:none">
                                <div class="form-inputs">
                                    <div class="form-group">
                                        <label>Product Name</label>
                                        <input id="pname_complaint" name="pname_complaint" type="text"
                                            class="form-control" readonly>
                                    </div>
                                </div>
                            </div>
                            <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12" id="model_div" style="display:none">
                                <div class="form-inputs">
                                    <div class="form-group">
                                        <label>Model No</label>
                                        <input id="model_no" name="model_no" type="text" class="form-control"
                                            readonly>
                                    </div>
                                </div>
                            </div>
                            <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12" id="name_complaint_div"
                                style="display:none">
                                <div class="form-inputs">
                                    <div class="form-group">
                                        <label>Product Name</label>
                                        <input id="name_complaint" name="name_complaint" type="text"
                                            class="form-control" readonly>
                                    </div>
                                </div>
                            </div>
                            <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12" id="warrenty_complaint_div"
                                style="display:none">
                                <div class="form-inputs">
                                    <div class="form-group">
                                        <label>Product Warranty Date</label>
                                        <input id="warrenty_complaint" name="warrenty_complaint" type="text"
                                            class="form-control" readonly>
                                    </div>
                                </div>
                            </div>
                            <!--<div class="col-lg-4 col-md-6 col-sm-12 col-xs-12" id="code_complaint_div" style="display:none">
                                    <div class="form-inputs">
                                      <div class="form-group">
                                        <label>Product Code</label>
                                        <input id="code_complaint" name="code_complaint" type="text" class="form-control" readonly>
                                      </div>
                                    </div>
                                </div>-->
                            <!--<div class="col-lg-4 col-md-6 col-sm-12 col-xs-12" id="serail_complaint_div" style="display:none">
                                    <div class="form-inputs">
                                      <div class="form-group">
                                        <label>Manufacturer serial number</label>
                                        <input id="serail_complaint" name="serail_complaint" type="text" class="form-control" readonly>
                                      </div>
                                    </div>
                                </div>-->
                            <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12" id="prd_serail_no_div"
                                style="display:none">
                                <div class="form-inputs">
                                    <div class="form-group">
                                        <label>Invoice Number</label>
                                        <input id="prd_serail_no" name="prd_serail_no" type="text"
                                            class="form-control" readonly>
                                    </div>
                                </div>
                            </div>
                            <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12" id="discard_complaint_div"
                                style="display:none">
                                <div class="form-inputs">
                                    <div class="form-group">
                                        <label>Product Discard Date</label>
                                        <input id="discard_complaint" name="discard_complaint" type="text"
                                            class="form-control" readonly>
                                    </div>
                                </div>
                            </div>
                            <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12" id="preventive_complaint_div"
                                style="display:none">
                                <div class="form-inputs">
                                    <div class="form-group">
                                        <label>Preventive maintenance frequency</label>
                                        <input id="preventive_complaint" name="preventive_complaint" type="text"
                                            class="form-control" readonly>
                                    </div>
                                </div>
                            </div>
                            <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12" id="rating_complaint_div"
                                style="display:none">
                                <div class="form-inputs">
                                    <div class="form-group">
                                        <label>Criticality rating of the product</label>
                                        <input id="rating_complaint" name="rating_complaint" type="text"
                                            class="form-control" readonly>
                                    </div>
                                </div>
                            </div>
                            <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12" id="vendor_div" style="display:none">
                                <div class="form-inputs">
                                    <div class="form-group">
                                        <label>Vendor/Manufacturer Name</label>
                                        <input id="vendor_name" name="vendor_name" type="text" class="form-control"
                                            readonly>
                                    </div>
                                </div>
                            </div>
                            <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12" id="contact_div" style="display:none">
                                <div class="form-inputs">
                                    <div class="form-group">
                                        <label>Contact Name</label>
                                        <input id="contact_name" name="contact_name" type="text" class="form-control"
                                            readonly>
                                    </div>
                                </div>
                            </div>
                            <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12" id="phone_div" style="display:none">
                                <div class="form-inputs">
                                    <div class="form-group">
                                        <label>Contact Phone Number</label>
                                        <input id="contact_phone" name="contact_phone" type="text"
                                            class="form-control" readonly>
                                    </div>
                                </div>
                            </div>
                            <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12" id="email_div" style="display:none">
                                <div class="form-inputs">
                                    <div class="form-group">
                                        <label>Contact Email</label>
                                        <input id="contact_email" name="contact_email" type="text"
                                            class="form-control" readonly>
                                    </div>
                                </div>
                            </div>
                            <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
                                <div class="form-inputs">
                                    <div class="form-group">
                                        <label>Complaints</label>
                                        <textarea height="200px" class="form-control" id="complaint_des" name="complaint_des"></textarea>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row" id="product_status" style="display:none">
                            <div class="col-md-6 certWraper">
                                <h1 class="amc_title">Product Status</h1>
                                <div class="amc_cmc product-status-r complaint">
                                    <div class="d-flex"> <span>Product warranty </span>
                                        <p>:</p>
                                        <div id="warranty_status"></div>
                                    </div>
                                    <div class="d-flex"> <span>Validation Date </span>
                                        <p>:</p>
                                        <div id="validation_status"></div>
                                    </div>
                                    <div class="d-flex"> <span id="register_maintenance">Maintenance contract </span>
                                        <p id="register_maintenance_p">:</p>
                                        <div id="activated_status"></div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-12">
                                <div class="green-button">
                                    <button>Submit</button>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-12">
                                <div class="green-button">
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
            </div> <!-- boxings end -->
            <div class="boxings card" style="display:none;">
                <div class="card-header">
                    <h6 class="collapsed card-link" data-toggle="collapse" href="#collapseFour">COMPLAINT STATUS</h6>
                </div>
                <div class="bxNew collapse" id="collapseFour"data-parent="#accordion">
                    <div class="row manufacturerlist">
                        <div class="col-12">
                        </div>
                        <?php $__currentLoopData = $complaint_status; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $complaint_status): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <div class="col-lg-6 col-md-6 col-sm-6 col-12 compalintBox"
                                id="complaint_<?php echo e($complaint_status->serviceid); ?>">
                                <div class="card3 card card-statistic-1 wraper audio-g" style="display: block;">
                                    <div class="card-icon">
                                        <?php if(!empty($complaint_status->pro_pic)): ?>
                                            <img class="img-fluid complaint-image"
                                                src="<?php echo e(url('user_files')); ?>/<?php echo e($complaint_status->pro_pic); ?>">
                                        <?php else: ?>
                                            <img class="img-fluid complaint-image"
                                                src="<?php echo e(url('assets/images/1200px-No-Image-Placeholder.svg.png')); ?>">
                                        <?php endif; ?>
                                    </div>
                                    <div class="card-wrap card-itms">
                                        <div class="dealer-details">
                                            <h3 class="company-name company-name-rs">
                                                <?php echo e(ucfirst($complaint_status->name)); ?></h3>
                                            <ul style="margin-bottom: 10px;min-height: auto;">
                                                <?php
                                                $current_date = date('d-m-Y');
                                                $product_warranty = $complaint_status->warrentysold;
                                                ?>
                                                <?php if($complaint_status->type == 'approve'): ?>
                                                    <?php
                                                        $pname = App\Helpers\CustomHelper::product_name($complaint_status->productid);
                                                    ?>
                                                    <?php
                                                        $pdetails = App\Helpers\CustomHelper::vendorproduct_details($complaint_status->productid);
                                                        $modelno = $pdetails->product_code;
                                                    ?>
                                                    <?php
                                                        $prdid = $complaint_status->productid;
                                                    ?>
                                                <?php else: ?>
                                                    <?php
                                                        $pname = App\Helpers\CustomHelper::product_existing_name($complaint_status->existing_product_id);
                                                    ?>
                                                    <?php
                                                        $modelno = $complaint_status->product_code_existing;
                                                    ?>
                                                    <?php
                                                        $prdid = $complaint_status->existing_product_id;
                                                    ?>
                                                <?php endif; ?>
                                                <li>
                                                    <label>Model No</label>:<span><?php echo e($modelno); ?></span>
                                                </li>
                                                <li>
                                                    <label>Product Name</label>:<span><?php echo e(ucfirst($pname)); ?></span>
                                                </li>
                                                <li>
                                                    <label>Serial No</label>:
                                                    <span><?php echo e($complaint_status->product_serial_no); ?></span>
                                                </li>
                                                <?php if($complaint_status->invoice_number != null): ?>
                                                    <li>
                                                        <label>Invoice No</label>:
                                                        <span><?php echo e($complaint_status->invoice_number); ?></span>
                                                    </li>
                                                <?php endif; ?>
                                                <li><label>Department name</label>:
                                                    <span><?php echo e(ucfirst($complaint_status->departmentname)); ?></span>
                                                </li>
                                                <?php if($complaint_status->barcode != null): ?>
                                                    <li>
                                                        <label>Barcode</label>:
                                                        <span><?php echo e($complaint_status->barcode); ?></span>
                                                    </li>
                                                <?php endif; ?>
                                                <li><label>Posted date</label>:
                                                    <span><?php echo e(date('d-m-Y', strtotime($complaint_status->date))); ?></span>
                                                </li>
                                            </ul>
                                        </div>
                                    </div><!-- card-wrap-end-->
                                    <ul class="complaint_details">
                                        <li><label>Complaint Id</label>: <span><?php echo e(ucfirst($complaint_status->id)); ?></span>
                                        </li>
                                        <li><label>Complaint</label>:
                                            <span><?php echo e(ucfirst($complaint_status->complaint)); ?></span>
                                            <?php if($complaint_status->text_type == 'voice'): ?>
                                                <audio controls>
                                                    <source
                                                        src="https://www.meddbot.com/uploads/voice/<?php echo e($complaint_status->complaint); ?>"
                                                        type="audio/mpeg">
                                                    Audio tag is not supported in this browser.
                                                </audio>
                                            <?php endif; ?>
                                        </li>
                                        <?php if($complaint_status->charge != ''): ?>
                                            <li><label>Charges</label>:
                                                <span><?php echo e($complaint_status->charge + $complaint_status->charge * ($complaint_status->tax / 100)); ?>

                                                    INR ( Tax <?php echo e($complaint_status->tax); ?> %)</span>
                                            <li><label>Quotation</label>: <span><a target="_blank" class="eye"
                                                        href="<?php echo e(url('uploads/document/' . $complaint_status->charge_doc)); ?>"><?php echo e($complaint_status->charge_doc); ?><i
                                                            class="fa fa-file" aria-hidden="true"></i> View</a></span>
                                            </li>
                                        <?php endif; ?>
                                        <!-- AMC RENEW start-->
                                        <?php if($complaint_status->complaint_type == 'amc_cmc_rene' ||
                                            $complaint_status->complaint_type == 'validation_date' ||
                                            $complaint_status->complaint_type == 'amc_cmc_activation'): ?>
                                            <li><label>Status</label>: <span
                                                    id="complaintstatus_<?php echo e($complaint_status->serviceid); ?>">
                                                    <?php if($complaint_status->complaint_status == 1): ?>
                                                        <?php if(strtotime($product_warranty) > strtotime($current_date)): ?>
                                                            Approved
                                                        <?php else: ?>
                                                            Approved, waiting for the assignment of service engineer
                                                        <?php endif; ?>
                                                    <?php elseif($complaint_status->complaint_status == 4): ?>
                                                        <?php if(strtotime($product_warranty) > strtotime($current_date)): ?>
                                                            Pending
                                                        <?php else: ?>
                                                            Open
                                                        <?php endif; ?>
                                                    <?php elseif($complaint_status->complaint_status == 12): ?>
                                                        Scheduled
                                                    <?php elseif($complaint_status->complaint_status == 15): ?>
                                                        Quotation submitted
                                                    <?php elseif($complaint_status->complaint_status == 16): ?>
                                                        Quotation rejected
                                                    <?php elseif($complaint_status->complaint_status == 5): ?>
                                                        Complaint resolved
                                                    <?php elseif($complaint_status->complaint_status == 6): ?>
                                                        Under observation
                                                    <?php elseif($complaint_status->complaint_status == 7): ?>
                                                        Closed
                                                    <?php elseif($complaint_status->complaint_status == 8): ?>
                                                        Scheduled
                                                    <?php elseif($complaint_status->complaint_status == 9): ?>
                                                        Approved, waiting for the assignment of service engineer
                                                    <?php elseif($complaint_status->complaint_status == 10): ?>
                                                        Reopened
                                                    <?php elseif($complaint_status->complaint_status == 30): ?>
                                                        <?php echo e(ucfirst($complaint_status->activate_val) . ' ' . 'Renewed'); ?>

                                                    <?php elseif($complaint_status->complaint_status == 20): ?>
                                                        <?php if($complaint_status->complaint_type == 'amc_cmc_activation'): ?>
                                                            <?php echo e(ucfirst($complaint_status->activate_val) . ' '); ?>submitted
                                                        <?php elseif($complaint_status->complaint_type == 'amc_cmc_rene'): ?>
                                                            <?php echo e(ucfirst($complaint_status->activate_val) . ' '); ?>submitted
                                                        <?php else: ?>
                                                            Validation date submitted
                                                        <?php endif; ?>
                                                    <?php elseif($complaint_status->complaint_status == 21): ?>
                                                        <?php if($complaint_status->complaint_type == 'amc_cmc_activation'): ?>
                                                            <?php echo e(ucfirst($complaint_status->activate_val) . ' '); ?> rejected
                                                        <?php elseif($complaint_status->complaint_type == 'amc_cmc_rene'): ?>
                                                            <?php echo e(ucfirst($complaint_status->activate_val) . ' '); ?>rejected
                                                        <?php else: ?>
                                                            Validation date rejected
                                                        <?php endif; ?>
                                                    <?php elseif($complaint_status->complaint_status == 22): ?>
                                                        <?php if($complaint_status->complaint_type == 'amc_cmc_activation'): ?>
                                                            <?php echo e(ucfirst($complaint_status->activate_val) . ' '); ?> activated
                                                        <?php elseif($complaint_status->complaint_type == 'amc_cmc_rene'): ?>
                                                            <?php echo e(ucfirst($complaint_status->activate_val) . ' '); ?>activated
                                                        <?php else: ?>
                                                            Renewed validation date
                                                        <?php endif; ?>
                                                    <?php elseif($complaint_status->complaint_status == 17): ?>
                                                        Quotation approved
                                                    <?php else: ?>
                                                        Open
                                                    <?php endif; ?>
                                                </span>
                                            </li>
                                            <?php if($complaint_status->complaint_status == 6): ?>
                                                <li><label>Observation period</label>:&nbsp;&nbsp;<span
                                                        style="color: #29c5bc;padding:0;">
                                                        <?php echo e(' ' . date('d-m-Y', strtotime($complaint_status->underobservation_from))); ?><?php echo e(' ' . 'to' . ' '); ?><?php echo e(date('d-m-Y', strtotime($complaint_status->underobservation_to))); ?></span>
                                                </li>
                                            <?php endif; ?>
                                            <?php if($complaint_status->complaint_status == 6 || $complaint_status->complaint_status == 7): ?>
                                                <li><label>Resolved on </label>:
                                                    <span><?php echo e(date('d-m-Y', strtotime($complaint_status->completed_date))); ?></span>
                                                </li>
                                            <?php endif; ?>
                                            <?php if($complaint_status->complaint_status == 7): ?>
                                                <li><label>Closed on </label>:
                                                    <span><?php echo e(date('d-m-Y', strtotime($complaint_status->closed_date))); ?></span>
                                                </li>
                                            <?php endif; ?>
                                            <?php if($complaint_status->status == 4 ||
                                                $complaint_status->status == 12 ||
                                                $complaint_status->status == 8 ||
                                                $complaint_status->status == 15 ||
                                                $complaint_status->status == 16 ||
                                                $complaint_status->status == 17): ?>
                                                <li><label>Service Engineer Name</label>:
                                                    <span><?php echo e(ucfirst($complaint_status->first_name . ' ' . $complaint_status->last_name)); ?></span>
                                                </li>
                                                <li><label>Service Engineer Phone number</label>:
                                                    <span><?php echo e($complaint_status->phone); ?></span>
                                                </li>
                                                <li><span class="full-content" style="font-weight: 500;padding:0;">Dear
                                                        customer, your complaint will be resolved by <span
                                                            style="color: #29c5bc;padding:0;"><?php echo e($complaint_status->dateservice . ' ' . $complaint_status->time); ?></span></span>
                                                </li>
                                            <?php endif; ?>
                                            <li class="dex">
                                                <?php if($complaint_status->charge != ''): ?>
                                                    <?php if($complaint_status->complaint_status == 3): ?>
                                                        <button class="complaint_approve btns  float-left"
                                                            onclick="approve('<?php echo e($complaint_status->serviceid); ?>','<?php echo e($complaint_status->id); ?>','<?php echo e($complaint_status->user_id); ?>',<?php echo e($prdid); ?>,'<?php echo e($complaint_status->type); ?>')">Approve</button>
                                                        <button class="complaint_reject btns float-left"
                                                            onclick="reject('<?php echo e($complaint_status->serviceid); ?>','<?php echo e($complaint_status->id); ?>','<?php echo e($complaint_status->user_id); ?>',<?php echo e($prdid); ?>,'<?php echo e($complaint_status->type); ?>')">Reject</button>
                                                    <?php endif; ?>
                                                <?php endif; ?>
                                                <?php if($complaint_status->complaint_status == 5): ?>
                                                <?php endif; ?>
                                                <?php if($complaint_status->complaint_status == 4): ?>
                                                    <button class="complaint_approve btns  float-left"
                                                        onclick="approveschedule('<?php echo e($complaint_status->serviceid); ?>','<?php echo e($complaint_status->id); ?>','<?php echo e($complaint_status->user_id); ?>',<?php echo e($prdid); ?>,'<?php echo e($complaint_status->type); ?>','<?php echo e($complaint_status->engg_id); ?>')">Approve</button>
                                                    <button class="complaint_reject btns float-left"
                                                        onclick="rejectschedule('<?php echo e($complaint_status->serviceid); ?>','<?php echo e($complaint_status->id); ?>','<?php echo e($complaint_status->user_id); ?>',<?php echo e($prdid); ?>,'<?php echo e($complaint_status->type); ?>')">Reject</button>
                                                <?php endif; ?>
                                                <?php if($complaint_status->complaint_status == 15): ?>
                                                    <button class="complaint_approve btns  float-left"
                                                        onclick="approvequotation('<?php echo e($complaint_status->serviceid); ?>','<?php echo e($complaint_status->id); ?>','<?php echo e($complaint_status->user_id); ?>',<?php echo e($prdid); ?>,'<?php echo e($complaint_status->type); ?>')">Approve</button>
                                                    <button class="complaint_reject btns float-left"
                                                        onclick="rejectquotation('<?php echo e($complaint_status->serviceid); ?>','<?php echo e($complaint_status->id); ?>','<?php echo e($complaint_status->user_id); ?>',<?php echo e($prdid); ?>,'<?php echo e($complaint_status->type); ?>')">Reject</button>
                                                <?php endif; ?>
                                                <?php if($complaint_status->price != ''): ?>
                                                    <button class="complaint_approve btns  float-left"
                                                        onclick="viewquotation('<?php echo e($complaint_status->price); ?>','<?php echo e($complaint_status->parts_replace); ?>','<?php echo e($complaint_status->quotation_doc); ?>')">View
                                                        Quotation</button>
                                                <?php endif; ?>
                                            </li>
                                    </ul>
                        <?php endif; ?>
                        <!-- AMC RENEW END-->
                        <?php if($complaint_status->complaint_type == 'manual' ||
                            $complaint_status->complaint_type == 'installation_date' ||
                            $complaint_status->complaint_type == 'preventive_contract'): ?>
                            <li><label>Status</label>: <span id="complaintstatus_<?php echo e($complaint_status->serviceid); ?>">
                                    <?php if($complaint_status->complaint_status == 1): ?>
                                        <?php if(strtotime($product_warranty) > strtotime($current_date)): ?>
                                            Approved
                                        <?php else: ?>
                                            Approved, waiting for the assignment of service engineer
                                        <?php endif; ?>
                                    <?php elseif($complaint_status->complaint_status == 4): ?>
                                        <?php if(strtotime($product_warranty) > strtotime($current_date)): ?>
                                            Pending
                                        <?php else: ?>
                                            Open
                                        <?php endif; ?>
                                    <?php elseif($complaint_status->complaint_status == 12): ?>
                                        Scheduled
                                    <?php elseif($complaint_status->complaint_status == 15): ?>
                                        Quotation submitted
                                    <?php elseif($complaint_status->complaint_status == 16): ?>
                                        Quotation rejected
                                    <?php elseif($complaint_status->complaint_status == 5): ?>
                                        Complaint resolved
                                    <?php elseif($complaint_status->complaint_status == 6): ?>
                                        Under observation
                                    <?php elseif($complaint_status->complaint_status == 7): ?>
                                        Closed
                                    <?php elseif($complaint_status->complaint_status == 8): ?>
                                        Scheduled
                                    <?php elseif($complaint_status->complaint_status == 9): ?>
                                        Approved, waiting for the assignment of service engineer
                                    <?php elseif($complaint_status->complaint_status == 10): ?>
                                        Reopened
                                    <?php elseif($complaint_status->complaint_status == 20): ?>
                                        Renewed validation date
                                    <?php elseif($complaint_status->complaint_status == 17): ?>
                                        Quotation approved
                                    <?php else: ?>
                                        Open
                                    <?php endif; ?>
                                </span>
                            </li>
                            <?php if($complaint_status->complaint_status == 6): ?>
                                <li><label>Observation period</label>:&nbsp;&nbsp;<span style="color: #29c5bc;padding:0;">
                                        <?php echo e(' ' . date('d-m-Y', strtotime($complaint_status->underobservation_from))); ?><?php echo e(' ' . 'to' . ' '); ?><?php echo e(date('d-m-Y', strtotime($complaint_status->underobservation_to))); ?></span>
                                </li>
                            <?php endif; ?>
                            <?php if($complaint_status->complaint_status == 6 ||
                                $complaint_status->complaint_status == 7 ||
                                $complaint_status->complaint_status == 5): ?>
                                <li><label>Resolved on </label>: <span>
                                        <?php echo e(date('d-m-Y', strtotime($complaint_status->resolved_date))); ?></span></li>
                            <?php endif; ?>
                            <?php if($complaint_status->complaint_status == 7): ?>
                                <li><label>Closed on </label>:
                                    <span><?php echo e(date('d-m-Y', strtotime($complaint_status->closed_date))); ?></span>
                                </li>
                            <?php endif; ?>
                            <?php if($complaint_status->status == 4 ||
                                $complaint_status->status == 12 ||
                                $complaint_status->status == 8 ||
                                $complaint_status->status == 15 ||
                                $complaint_status->status == 16 ||
                                $complaint_status->status == 17): ?>
                                <li><label>Service Engineer Name</label>:
                                    <span><?php echo e(ucfirst($complaint_status->first_name . ' ' . $complaint_status->last_name)); ?></span>
                                </li>
                                <li><label>Service Engineer Phone number</label>:
                                    <span><?php echo e($complaint_status->phone); ?></span>
                                </li>
                                <li><span class="full-content" style="font-weight: 500;padding:0;">Dear customer, your
                                        complaint will be resolved by <span
                                            style="color: #29c5bc;padding:0;"><?php echo e($complaint_status->dateservice . ' ' . $complaint_status->time); ?></span></span>
                                </li>
                            <?php endif; ?>
                            <li class="dex">
                                <?php if($complaint_status->charge != ''): ?>
                                    <?php if($complaint_status->complaint_status == 3): ?>
                                        <button class="complaint_approve btns  float-left"
                                            onclick="approve('<?php echo e($complaint_status->serviceid); ?>','<?php echo e($complaint_status->id); ?>','<?php echo e($complaint_status->user_id); ?>',<?php echo e($prdid); ?>,'<?php echo e($complaint_status->type); ?>')">Approve</button>
                                        <button class="complaint_reject btns float-left"
                                            onclick="reject('<?php echo e($complaint_status->serviceid); ?>','<?php echo e($complaint_status->id); ?>','<?php echo e($complaint_status->user_id); ?>',<?php echo e($prdid); ?>,'<?php echo e($complaint_status->type); ?>')">Reject</button>
                                    <?php endif; ?>
                                <?php endif; ?>
                                <?php if($complaint_status->complaint_status == 5): ?>
                                    <span class="view-msg float-left"
                                        onclick="view_updates(<?php echo e($complaint_status->id); ?>)">View</span>
                                    <span class="view-msg float-left"
                                        onclick="under_observation(<?php echo e($complaint_status->id); ?>,<?php echo e($prdid); ?>,<?php echo e($complaint_status->user_id); ?>,'<?php echo e($complaint_status->type); ?>')">Under
                                        observation</span>
                                    <span class="view-msg float-left"
                                        onclick="closecomplaint(<?php echo e($complaint_status->id); ?>)">Close</span>
                                <?php endif; ?>
                                <?php if($complaint_status->complaint_status == 6): ?>
                                    <span class="view-msg float-left"
                                        onclick="view_updates(<?php echo e($complaint_status->id); ?>)">View</span>
                                <?php endif; ?>
                                <?php if($complaint_status->complaint_status == 4): ?>
                                    <button class="complaint_approve btns  float-left"
                                        onclick="approveschedule('<?php echo e($complaint_status->serviceid); ?>','<?php echo e($complaint_status->id); ?>','<?php echo e($complaint_status->user_id); ?>',<?php echo e($prdid); ?>,'<?php echo e($complaint_status->type); ?>','<?php echo e($complaint_status->engg_id); ?>')">Approve</button>
                                    <button class="complaint_reject btns float-left"
                                        onclick="rejectschedule('<?php echo e($complaint_status->serviceid); ?>','<?php echo e($complaint_status->id); ?>','<?php echo e($complaint_status->user_id); ?>',<?php echo e($prdid); ?>,'<?php echo e($complaint_status->type); ?>')">Reject</button>
                                <?php endif; ?>
                                <?php if($complaint_status->complaint_status == 15): ?>
                                    <button class="complaint_approve btns  float-left"
                                        onclick="approvequotation('<?php echo e($complaint_status->serviceid); ?>','<?php echo e($complaint_status->id); ?>','<?php echo e($complaint_status->user_id); ?>',<?php echo e($prdid); ?>,'<?php echo e($complaint_status->type); ?>')">Approve</button>
                                    <button class="complaint_reject btns float-left"
                                        onclick="rejectquotation('<?php echo e($complaint_status->serviceid); ?>','<?php echo e($complaint_status->id); ?>','<?php echo e($complaint_status->user_id); ?>',<?php echo e($prdid); ?>,'<?php echo e($complaint_status->type); ?>')">Reject</button>
                                <?php endif; ?>
                                <?php if($complaint_status->price != ''): ?>
                                    <button class="complaint_approve btns  float-left"
                                        onclick="viewquotation('<?php echo e($complaint_status->price); ?>','<?php echo e($complaint_status->parts_replace); ?>','<?php echo e($complaint_status->quotation_doc); ?>')">View
                                        Quotation</button>
                                <?php endif; ?>
                            </li>
                            </ul>
                        <?php endif; ?>
                        <div class="btns_area wraper">
                            <!--<div class="col-lg-6">
                                                                        <span class="view-msg" onclick="viewmessage(<?php echo e($complaint_status->id); ?>)">View message</span>
                                                                    </div>-->
                            <!--<span class="complaintmsg view-msg" data-complaintid="<?php echo e($complaint_status->id); ?>" data-productid="<?php echo e($complaint_status->product_id); ?>"  data-receivername="<?php echo e($complaint_status->vendorname); ?>"  data-receiverid="<?php echo e($complaint_status->user_id); ?>" >Send Message</span>-->
                            <div class="d-flex f2 justify-btns" style="margin-top:5px;">
                                <?php if($complaint_status->type == 'approve'): ?>
                                    <a class="float-left"
                                        href="<?php echo e(url('/message/' . $complaint_status->user_id . '/' . $complaint_status->productid . '/' . $complaint_status->id)); ?>">Send
                                        Message</a>
                                <?php else: ?>
                                    <a class="float-left"
                                        href="<?php echo e(url('/message/' . $complaint_status->user_id . '/' . $complaint_status->existing_product_id . '/' . $complaint_status->id)); ?>">Send
                                        Message</a>
                                <?php endif; ?>
                                <button style="cursor: pointer;" class="btns common-btn yellow-btn float-left"
                                    data-toggle="modal" data-target="#myModalaction"
                                    data-cpostdate="<?php echo e(date('d-m-Y', strtotime($complaint_status->date))); ?>"
                                    data-servicechargeapprove="<?php echo e(date('d-m-Y', strtotime($complaint_status->servicecharge_approved_date))); ?>"
                                    data-servicechargereject="<?php echo e(date('d-m-Y', strtotime($complaint_status->servicecharge_removed_date))); ?>"
                                    data-scheduleddate="<?php echo e(date('d-m-Y', strtotime($complaint_status->scheduled_date))); ?>"
                                    data-closeddate="<?php echo e(date('d-m-Y', strtotime($complaint_status->closed_date))); ?>"
                                    data-productname="<?php echo e($pname); ?>"
                                    data-vendorname="<?php echo e($complaint_status->vendorname); ?>"
                                    data-resolveddate="<?php echo e(date('d-m-Y', strtotime($complaint_status->resolved_date))); ?>">Complaint
                                    History</button>
                                <?php if($complaint_status->complaint_status == 7): ?>
                                    <button style="cursor: pointer;"
                                        class="btns common-btn yellow-btn complaintrate  float-left"
                                        onclick="complaintrate('<?php echo e($complaint_status->id); ?>')">Rate our services</button>
                                    <span class="view-msg  float-left"
                                        onclick="reopencomplaint(<?php echo e($complaint_status->id); ?>)">Reopen</span>
                                <?php endif; ?>
                                <?php if($complaint_status->complaint_status == 6): ?>
                                <?php endif; ?>
                            </div>
                        </div>
                        <!--<div class="specifications wraper">
                            <p><label>Posted date</label>: <span><?php echo e($complaint_status->date); ?></span></p>
                            <p><label>Complaint</label>: <span><?php echo e(ucfirst($complaint_status->complaint)); ?></span></p>
                            <?php if($complaint_status->charge != ''): ?>
    <p><label>Charges</label>: <span><?php echo e($complaint_status->charge + $complaint_status->charge * ($complaint_status->tax / 100)); ?> INR ( Tax <?php echo e($complaint_status->tax); ?> %)</span>
                            </p>
    <?php endif; ?>
                            <?php if($complaint_status->tax != ''): ?>
    <?php endif; ?>
                            <p><label>Status</label>: <span id="complaintstatus_<?php echo e($complaint_status->serviceid); ?>">
                <?php if($complaint_status->complaint_status == 1): ?>
    Approved
<?php elseif($complaint_status->complaint_status == 4): ?>
    Scheduled
<?php elseif($complaint_status->complaint_status == 5): ?>
    Scheduled
<?php elseif($complaint_status->complaint_status == 6): ?>
    Completed
<?php elseif($complaint_status->complaint_status == 7): ?>
    Closed
<?php else: ?>
    Open
    <?php endif; ?>
                </span></p>
                           <?php if($complaint_status->complaint_status == 6 || $complaint_status->complaint_status == 7): ?>
    <p><label>Resolved on </label>: <span><?php echo e($complaint_status->completed_date); ?></span></p>
    <?php endif; ?>
                           <?php if($complaint_status->complaint_status == 7): ?>
    <p><label>Closed on </label>: <span><?php echo e($complaint_status->closed_date); ?></span></p>
    <?php endif; ?>
                           <?php if($complaint_status->charge != ''): ?>
    <?php if($complaint_status->complaint_status == 3): ?>
    <button class="complaint_approve" onclick="approve('<?php echo e($complaint_status->serviceid); ?>','<?php echo e($complaint_status->id); ?>','<?php echo e($complaint_status->user_id); ?>')">Approve</button>
                            <button class="complaint_reject" onclick="reject('<?php echo e($complaint_status->serviceid); ?>','<?php echo e($complaint_status->id); ?>','<?php echo e($complaint_status->user_id); ?>')">Reject</button>
<?php elseif($complaint_status->complaint_status == 4): ?>
    <p><span>Dear customer your registered complaint will be fixed with in <?php echo e($complaint_status->dateservice . ' ' . $complaint_status->time); ?></span></p>
<?php else: ?>
    <?php endif; ?>
    <?php endif; ?>
                                                                <div class="row row-rs5">
                                                                    <div class="col-lg-6">
                                                                      <span class="complaintmsg view-msg" data-complaintid="<?php echo e($complaint_status->id); ?>" data-productid="<?php echo e($complaint_status->product_id); ?>"  data-receivername="<?php echo e($complaint_status->vendorname); ?>"  data-receiverid="<?php echo e($complaint_status->user_id); ?>" >Send Message</span>
                                                                    </div>
                             <?php if($complaint_status->complaint_status == 6): ?>
    <div class="col-lg-6">
                                                                        <span class="view-msg" onclick="closecomplaint(<?php echo e($complaint_status->id); ?>)">Close</span>
                                                                    </div>
    <?php endif; ?>
                                                                </div>
                         </div>
                -->
                    </div>
                </div>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </div>
        </div>
    </div> <!-- boxings end -->
    <div class="boxings card">
        <div class="card-header">
            <h6 class="collapsed card-link" data-toggle="collapse" href="#collapseOne">REGISTER EXISTING PRODUCT</h6>
        </div>
        <div class="bxNew collapse" id="collapseOne" data-parent="#accordion">
            <form name="register_existing" id="register_existing_product" method="POST" enctype="multipart/form-data"
                action="<?php echo e(url('buyers/register_existing_product')); ?>">
                <?php echo csrf_field(); ?>
                <input type="hidden" id="existing" name="existing" value="existing">
                <div class="row manufacturerlist">
                    <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
                        <div class="form-inputs">
                            <div class="form-group">
                                <label>Department<sup>*</sup></label>
                                <select class="form-control selectmanufacturer invoiceselect1" id="department_existing"
                                    name="department_existing">
                                    <option value="">Select</option>
                                    <?php $__currentLoopData = $departmentlist_existing; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $departmentlist_existing): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                        <option value="<?php echo e($departmentlist_existing->id); ?>">
                                            <?php echo e($departmentlist_existing->name); ?></option>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                </select>
                            </div>
                        </div>
                    </div>
                    <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
                        <div class="form-inputs">
                            <div class="form-group">
                                <label>Product<sup>*</sup></label>
                                <select class="form-control selectmanufacturer invoiceselect" id="product_existing"
                                    name="product_existing">
                                    <option value="">Select</option>
                                    <?php $__currentLoopData = $ExistingProduct; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $allproducts): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                        <option value="<?php echo e($allproducts->product_id); ?>">
                                            <?php echo e(ucfirst($allproducts->product_name)); ?></option>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                </select>
                            </div>
                        </div>
                    </div>
                    <!--<div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
                                <button class="barcodeBtn" type="button"  onclick="request_existingproduct()" style="display:block;height: 38px;margin-top: 25px;">
                            New Request
                            </button>
                              </div>-->
                    <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
                        <div class="form-inputs">
                            <div class="form-group">
                                <label>Gst No<sup>*</sup></label>
                                <input type="text" id="gst_no" class="form-control " name="gst_no"
                                    value="" required autocomplete="gst_no" autofocus>
                            </div>
                        </div>
                    </div>
                    <input type="hidden" id="user_id" class="form-control " name="user_id" value="">
                    <input type="hidden" id="user_type" class="form-control " name="user_type" value="">
                    <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
                        <div class="form-inputs">
                            <div class="form-group">
                                <label>Name<sup>*</sup></label>
                                <input type="text" class="form-control " name="name" id="name"
                                    value="" required autocomplete="name" readonly autofocus>
                            </div>
                        </div>
                    </div>
                    <input type="hidden" name="vendor_existing" id="vendor_existing">
                    <input type="hidden" name="usertype" id="usertype">
                    <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
                        <div class="form-inputs">
                            <div class="form-group">
                                <label>Address<sup>*</sup></label>
                                <input type="text" class="form-control " id="address" name="address"
                                    value="" required autocomplete="address" readonly autofocus>
                            </div>
                        </div>
                    </div>
                    <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
                        <div class="form-inputs">
                            <div class="form-group">
                                <label>Zipcode<sup>*</sup></label>
                                <input type="number" class="form-control" id="zipcode" name="zipcode" value=""
                                    required autocomplete="zipcode" readonly autofocus>
                            </div>
                        </div>
                    </div>
                    <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
                        <button class="barcodeBtn" type="button" id="contact_info"
                            style="display:block;height: 38px;margin-top: 25px;">
                            Contact Information
                        </button>
                        <input type="hidden" name="existing_contact_name" id="existing_contact_name">
                        <input type="hidden" name="existing_contact_no" id="existing_contact_no">
                        <input type="hidden" name="existing_contact_email" id="existing_contact_email">
                        <input type="hidden" name="existing_primarycontact" id="existing_primarycontact">
                    </div>
                    <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12" id="waranty_date_existing" style="display:block">
                        <div class="form-inputs">
                            <div class="form-group">
                                <label>Product Warranty Date<sup>*</sup></label>
                                <input id="waranty_date_existings" name="waranty_date_existings"
                                    data-zdp_readonly_element="false" type="text" class="form-control">
                            </div>
                        </div>
                    </div>
                    <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12" id="validation_date_existing_div"
                        style="display:block">
                        <div class="form-inputs">
                            <div class="form-group">
                                <label>Validation Date<sup>*</sup></label>
                                <input id="validation_date_existing" name="validation_date_existing"
                                    data-zdp_readonly_element="false" type="text" class="form-control">
                            </div>
                        </div>
                    </div>
                    <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12" id="product_code_div_existing"
                        style="display:block">
                        <div class="form-inputs">
                            <div class="form-group">
                                <label>Model No<sup>*</sup></label>
                                <input id="product_code_existing" name="product_code_existing" type="text"
                                    class="form-control">
                            </div>
                        </div>
                    </div>
                    <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
                        <div class="form-inputs">
                            <div class="form-group">
                                <label>Serial Number<sup>*</sup></label>
                                <input id="serial_existing" name="serial_existing" type="text" class="form-control">
                            </div>
                        </div>
                    </div>
                    <!--<div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
                                  <div class="form-inputs">
                                    <div class="form-group">
                                      <label>Manufacturer Serial Number </label>
                                      <input id="manufacturer_serial_existing" name="manufacturer_serial_existing" type="text" class="form-control">
                                    </div>
                                  </div>
                              </div>-->
                    <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
                        <div class="form-inputs">
                            <div class="form-group">
                                <label>Invoice Number <sup>*</sup></label>
                                <input id="invoicenumber_existing" name="invoicenumber_existing" type="text"
                                    class="form-control">
                            </div>
                        </div>
                    </div>
                    <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
                        <div class="form-inputs app-vend">
                            <div class="form-group newAlign">
                                <label>Product Discard Date<sup>*</sup></label>
                                <input id="productdiscarddate_existing" type="text" class="form-control"
                                    data-zdp_readonly_element="false" name="productdiscarddate_existing">
                            </div>
                        </div>
                    </div>
                    <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
                        <div class="form-inputs app-vend">
                            <div class="form-group newAlign">
                                <label>No. of Days Equipment can be used in a month<sup>*</sup></label>
                                <input id="equipment_day_existing" type="text" class="form-control"
                                    data-zdp_readonly_element="false" name="equipment_day_existing">
                            </div>
                        </div>
                    </div>
                    <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
						<div class="form-inputs">
							 <div class="form-group">
								<label>No. of Hours Equipment can be used in a day<sup>*</sup></label>
								<input id="equipment_day_approve" type="radio" class="form-control" name="equipment_existing"  value="hours">
								
							</div>
						</div>
					</div>
					
				  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
					<div class="form-inputs">
						 <div class="form-group">
							<label>No. of Test Equipment can be used in a day<sup>*</sup></label>
							<input id="equipment_test_approve" type="radio" class="form-control"  name="equipment_existing"  value="test">
							
						</div>
					</div>
				  </div>

                  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12" id="equipmentlink" style="display:none;">
					<div class="form-inputs">
						 <div class="form-group">
							<span id="eval"></span>
							<input id="equipment_existing_default"  type="number" class="form-control"  name="equipment_existing_default"  value="">
							
						</div>
					</div>
				  </div>


                    <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
                        <div class="form-inputs">
                            <div class="form-group">
                                <label>Preventive Maintenance Frequency<sup>*</sup></label>
                                <select class="form-control selectmanufacturer invoiceselect" id="preventive_existing"
                                    name="preventive_existing">
                                    <option value="">Select</option>
                                    <option value="Monthly">Monthly</option>
                                    <option value="Quarterly">Quarterly</option>
                                    <option value="Half Yearly">Half Yearly</option>
                                    <option value="Yearly">Yearly</option>
                                </select>
                            </div>
                        </div>
                    </div>
                    <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12 ">
                        <div class="form-inputs app-vend">
                            <div class="form-group">
                                <label>Criticality Rating of the Product</label>
                                <input id="current_value" type="hidden" class="form-control"
                                    data-zdp_readonly_element="false" name="current_value" value="1">
                                <div class="slider-wrapper green">
                                    <input class="input-range" data-slider-id='ex1Slider' type="text"
                                        data-slider-min="0" data-slider-tooltip="always" data-slider-max="10"
                                        data-slider-step="1" data-slider-value="1" />
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12" style="display:block"
                        id="product_additional_div">
                        <div class="form-inputs app-vend">
                            <div class="form-group newAlign">
                                <label>Additional Information<sup>*</sup></label>
                                <textarea name="additional_info_existing" class="form-control" id="additional_info_existing"></textarea>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
                        <div class="form-inputs">
                            <div class="form-group">
                                <label>Government Permission Required</label>
                                <input type="checkbox" id="permission_existing" name="permission_existing"
                                    value="1" checked>
                            </div>
                        </div>
                    </div>
                    <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12" style="display:block;" id="documentdiv">
                        <div class="form-inputs">
                            <div class="form-group">
                                <label>Registration Document<sup>*</sup></label>
                                <input type="file" id="documents_existing" name="documents_existing">
                            </div>
                        </div>
                    </div>
                    <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12" id="expiry_existing_div" style="display:block">
                        <div class="form-inputs">
                            <div class="form-group">
                                <label>Expiry date<sup>*</sup></label>
                                <input id="expiry_existing" name="expiry_existing" data-zdp_readonly_element="false"
                                    type="text" class="form-control">
                            </div>
                        </div>
                    </div>
                </div>
                <div class="row">
                  
                    <!--<div class="col-lg-4 col-md-6 col-sm-12 col-xs-12" id="generate_existing_div" style="display:none">
                        <button class="barcodeBtn" type="button" id="generate_existing" onclick="generatebarcode_existing()"
                            style="display:block;height: 38px;margin-top: 25px;">
                            Generate Barcode
                        </button>
                    </div>-->
                </div>
                <div class="amc">
                    What are the charges quoted by vendor for AMC AND CMC yearly?
                </div>
                <div class="amcname">
                    AMC FOR PRODUCT
                </div>
                <div id="amitems">
                    <div class="row">
                        <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
                            <div class="form-inputs">
                                <div class="form-group">
                                    <!--<label>AMC Validity</label>-->
                                    <select class="form-control selectmanufacturer" id="amc_validity"
                                        name="amc_validity">
                                        <option value="Yearly">Yearly</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                        <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
                            <div class="form-inputs">
                                <div class="form-group">
                                    <label>Price(INR)<sup>*</sup></label>
                                    <input type="number" class="form-control" id="amc_price" name="amc_price"
                                        value="">
                                </div>
                            </div>
                        </div>
                        <!-- <div class="col-lg-2 col-md-6 col-sm-12 col-xs-12">
                                        <div class="form-inputs">
                                             <div class="green-button add">
                                                 <button class=""onclick="addamc()">ADD<i class="fa fa-plus" aria-hidden="true"></i></button>
                                              </div>
                                        </div>
                                      </div>-->
                    </div>
                </div>
                <div class="amcname">
                    CMC FOR PRODUCT
                </div>
                <div id="amitems">
                    <div class="row">
                        <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
                            <div class="form-inputs">
                                <div class="form-group">
                                    <!--<label>AMC Validity</label>-->
                                    <select class="form-control selectmanufacturer" id="cmc_validity"
                                        name="cmc_validity">
                                        <option value="Yearly">Yearly</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                        <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
                            <div class="form-inputs">
                                <div class="form-group">
                                    <label>Price(INR)<sup>*</sup></label>
                                    <input type="number" class="form-control" id="cmc_price" name="cmc_price"
                                        value="">
                                </div>
                            </div>
                        </div>
                        <!-- <div class="col-lg-2 col-md-6 col-sm-12 col-xs-12">
                                        <div class="form-inputs">
                                             <div class="green-button add">
                                                 <button class=""onclick="addamc()">ADD<i class="fa fa-plus" aria-hidden="true"></i></button>
                                              </div>
                                        </div>
                                      </div>-->
                    </div>
                </div>
                <div class="amc">
                    Select contract you Activated<sup>*</sup>
                </div>
                <div>
                    <input type="radio" id="amc" name="amc_cmc_existing" value="amc">
                    <label for="html">AMC</label><br>
                    <input type="radio" id="cmc" name="amc_cmc_existing" value="cmc">
                    <label for="css">CMC</label><br>
                </div>
                <div>
                    <p id="active_title"></p>
                </div>
                <div id="cmitems_edit" style="display:none;">
                    <div class="row">
                        <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12" style="display:block;">
                            <div class="form-inputs">
                                <div class="form-group">
                                    <label>Certificate<sup>*</sup></label>
                                    <input type="file" id="certificate" name="certificate">
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="row cmcs_edit">
                        <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
                            <div class="form-inputs">
                                <div class="form-group">
                                    <label>Start Date<sup>*</sup></label>
                                    <input id="start_date" type="text" class="form-control"
                                        data-zdp_readonly_element="false" name="start_date" value="">
                                </div>
                            </div>
                        </div>
                        <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
                            <div class="form-inputs">
                                <div class="form-group">
                                    <label>End Date<sup>*</sup></label>
                                    <input id="end_date" type="text" class="form-control"
                                        data-zdp_readonly_element="false" name="end_date" value="">
                                </div>
                            </div>
                        </div>
                        <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
                            <div class="form-inputs">
                                <div class="form-group">
                                    <label>Price(INR)<sup>*</sup></label>
                                    <input type="number" class="form-control" id="priceitem" name="priceitem"
                                        value="">
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="col-12">
                        <div class="green-button">
                            <button>Save</button>
                        </div>
                    </div>
                </div>
            </form>
        </div>
    </div> <!-- boxings end -->
    </div> <!-- Accordion End -->
    <!-- TAB start-->
    <div class="boxings">
        <div class="custom-tabs" style="margin-top: 0;">
            <ul class="nav nav-tabs" role="tablist">
                <li class="nav-item">
                    <a class="nav-link active" data-toggle="tab" href="#first">Registered Products</a>
                </li>
            </ul>
            <!-- nav-tabs End -->
            <div class="tab-content">
                <div id="first" class="tab-pane active">
                    <div class="registered_prdcts wraper" style="margin: 10px 0;">
                        <h6 class="sub-headings" style="margin: 0 0 10px;font-size: 18px;">Registered Products</h6>
                        <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
                            <div class="form-inputs">
                                <div class="form-group">
                                    <label>Product Name</label>
                                    <select class="form-control selectmanufacturer invoiceselect"
                                        id="productname_filter" onchange="searchFilters()" name="productname_filter">
                                        <option value="all">All</option>
                                        <?php if(!empty($productList)): ?>
                                            <?php $__currentLoopData = $productList; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $productList): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                <option value="<?php echo e($productList['product_id'].'-'.$productList['product_type']); ?>">
                                                    <?php echo e(ucfirst($productList['product_name'])); ?></option>
                                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                        <?php endif; ?>
                                    </select>
                                </div>
                                <div class="form-group">
                                    <label>Department Name</label>
                                    <select class="form-control selectmanufacturer invoiceselect"
                                        id="department_filter_new" onchange="searchFilters()"
                                        name="department_filter">
                                        <option value="all">All</option>
                                        <?php if(!empty($departmentlist_filter)): ?>
                                            <?php $__currentLoopData = $departmentlist_filter; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $dep): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                <option value="<?php echo e($dep->id); ?>"><?php echo e($dep->name); ?></option>
                                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                        <?php endif; ?>
                                    </select>
                                </div>
                                <input type="hidden" name="bid_id" id="bid_id">
                                <input type="hidden" name="register_sold_id" id="register_sold_id">
                            </div>
                        </div>
                        <div class="row">
                            <?php $__currentLoopData = $partners; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $partners): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>

                            <?php

                            if($partners->type=='approve'){

                                $prdid=$partners->product_id;

                            }
                            else{

                                $prdid=$partners->existingprdid;

                            }


                            ?>
                                <div class="col-lg-6 pointer-cs js-category-filterable js-productname-filterable"
                                    data-category="<?php echo $partners->departmentid; ?>" data-productname="<?php echo $prdid.'-'.$partners->type; ?>">
                                    <div class="main-bgd cx">
                                        <a
                                            href="<?php echo e(url('buyers/registerproduct_details/')); ?><?php echo e('/' . $partners->registerid); ?>">
                                            <div class="gridSpace newDes">
                                                <div class="partner-box">
                                                    <h6 class="titles"><?php echo e(ucfirst($partners->product_name)); ?></h6>
                                                    <div class="d-flex">
                                                        <div class="partner-logo">
                                                            <?php if(!empty($partners->photo)): ?>
                                                                <img
                                                                    src="<?php echo e(url('product_files')); ?>/<?php echo e($partners->photo); ?>">
                                                            <?php else: ?>
                                                                <img
                                                                    src="<?php echo e(url('assets/images/1200px-No-Image-Placeholder.svg.png')); ?>">
                                                            <?php endif; ?>
                                                        </div>
                                                        <div class="partner-details">
                                                            <?php if($partners->registertype == 'existing'): ?>
                                                                <p>Model No: <?php echo e($partners->product_code_existing); ?></p>
                                                                <p>Product Name:
                                                                    <?php echo e(ucfirst($partners->existing_product_name)); ?></p>
                                                            <?php else: ?>
                                                                <p>Model No: <?php echo e($partners->vendor_product_code); ?></p>
                                                                <p>Product Name:
                                                                    <?php echo e(ucfirst($partners->vendor_product_name)); ?></p>
                                                            <?php endif; ?>
                                                            <p>Registration No: <?php echo e($partners->registerid); ?></p>
                                                            <p>Invoice No     : <?php echo e($partners->invoice_number); ?></p>

                                                            <p class="dept-name">Department Name:
                                                                <?php echo e($partners->departmentname); ?></p>
                                                            <?php if($partners->registertype == 'existing'): ?>
                                                                <?php if($partners->vendor_data == 'in'): ?>
                                                                    <p>Vendor/Manufacturer: <?php echo e($partners->name); ?></p>
                                                                <?php else: ?>
                                                                    <p>Vendor/Manufacturer:
                                                                        <?php echo e($partners->existing_vendor_name); ?></p>
                                                                <?php endif; ?>
                                                            <?php else: ?>
                                                                <p>Vendor/Manufacturer: <?php echo e(ucfirst($partners->name)); ?></p>
                                                            <?php endif; ?>

                                                            <?php if($partners->change_vendor !=0): ?>
                                                            <?php
                                                            $newvendor = App\Helpers\CustomHelper::manu_name($partners->change_vendor);
                                                            ?>
                                                            <p>New Vendor: <?php echo e(ucfirst($newvendor)); ?></p>
                                                            <?php endif; ?>


                                                            <?php
                                                            $tests = App\Helpers\CustomHelper::assignedtests($partners->id);
                                                            ?>

                                                    <?php if(count($tests['assignedtests'])!=0): ?>
                                                    <?php $testslist='';?>
                                                            <?php $__currentLoopData = $tests['assignedtests']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $test): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>  

                                                               <?php $testslist.=  $test->name.',';?>
                                                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                                        <?php echo 'Asssigned Tests are:'?> <?php echo e(rtrim($testslist, ",")); ?>

                                                    <?php endif; ?>
                                                     </br>
                                                    <span class="textmanage">Manage Test</span>
                                                          
                                                        </div>
                                                        <?php
                                                        $product_warranty = $partners->warrenty;
                                                        $current_date = date('d-m-Y');
                                                        $validation_date = $partners->validation_date;
                                                        $activated_enddate = $partners->activated_enddate;
                                                        $activate_val = $partners->activate_val;
                                                        $activate_status = $partners->activate_status;
                                                        $status_amc = '';
                                                        $status_amc_val = '';
                                                        ?>
                                                        <?php
                                                            $dayswarrenty = App\Helpers\CustomHelper::dateDiffInDays($current_date, $product_warranty);
                                                        ?>
                                                        <?php
                                                            $daysvalidity = App\Helpers\CustomHelper::dateDiffInDays($current_date, $validation_date);
                                                        ?>
                                                        <?php
                                                            $amcexpired = App\Helpers\CustomHelper::dateDiffInDays($current_date, $activated_enddate);
                                                        ?>
                                                        <?php
                                                        if (strtotime($product_warranty) >= strtotime($current_date)) {
                                                            if ($dayswarrenty == '+1' || $dayswarrenty == '+2' || $dayswarrenty == '+3' || $dayswarrenty == '+4' || $dayswarrenty == '+5' || $dayswarrenty == '+6' || $dayswarrenty == '+7') {
                                                                $status_warrenty = '<span class="status red">Warranty About to Expire</span>';
                                                            } else {
                                                                $status_warrenty = '<span class="status green">In Warranty</span>';
                                                            }
                                                        } else {
                                                            $status_warrenty = '<span class="status red">Out of Warranty</span>';
                                                        }
                                                        if (strtotime($validation_date) >= strtotime($current_date)) {
                                                            if ($daysvalidity == '+1' || $daysvalidity == '+2' || $daysvalidity == '+3' || $daysvalidity == '+4' || $daysvalidity == '+5' || $daysvalidity == '+6' || $daysvalidity == '+7') {
                                                                $status_validity = '<span class="status red">Validation date about to expire</span>';
                                                            } else {
                                                                $status_validity = '<span class="status green">In Validity</span>';
                                                            }
                                                        } else {
                                                            $status_validity = '<span class="status red">Out of Validity</span>';
                                                            $validation_date;
                                                        }
                                                        if ($activate_status == 0) {
                                                            if (strtotime($product_warranty) >= strtotime($current_date)) {
                                                                $status_amc = '';
                                                                $status_amc_val = '';
                                                            } else {
                                                                $status_amc = '<span class="status orange">' . strtoupper($activate_val) . ' ' . 'Contract not activated</span>';
                                                                $status_amc_val = '';
                                                            }
                                                        } elseif ($activate_status == 1) {
                                                            $status_amc = '<span class="status orange">' . strtoupper($activate_val) . ' ' . 'Pending' . '</span>';
                                                            $status_amc_val = '';
                                                        } elseif ($activate_status == 3 || $activate_status == 4) {
                                                            $status_amc = '<span class="status orange">' . strtoupper($activate_val) . ' ' . 'Pending' . '</span>';
                                                            $status_amc_val = '';
                                                        } elseif (strtotime($activated_enddate) >= strtotime($current_date)) {
                                                            if ($amcexpired == '+0' || $amcexpired == '+1' || $amcexpired == '+2' || $amcexpired == '+3' || $amcexpired == '+4' || $amcexpired == '+5' || $amcexpired == '+6' || $amcexpired == '+7') {
                                                                $status_amc = '<span class="status red">' . strtoupper($activate_val) . ' ' . 'About to Expire</span>';
                                                                $status_amc_val = 1;
                                                            } else {
                                                                $status_amc = '<span class="status green">' . 'In' . ' ' . strtoupper($activate_val);
                                                                $status_amc_val = 2;
                                                            }
                                                        } else {
                                                            $status_amc = '<span class="status red">' . strtoupper($activate_val) . ' ' . 'Expired';
                                                            $status_amc_val = '';
                                                        }
                                                        ?>
                                                    </div>
                                                    <div class="row" id="product_status" style="display:block">
                                                        <div class="col-md-12 certWraper product-status-area">
                                                            <h1 class="tittles">Product Status</h1>
                                                            <div class="prevnt amc_cmc product-status-r">
                                                                <div class="d-flex"> <span>Product warranty </span>
                                                                    <?php if($status_amc_val == 2): ?>
<p>:</p>
                                                                    <span
                                                                            class="status green"><?php echo e('In' . ' ' . strtoupper($activate_val)); ?>

                                                                    </span>
                                                                    <?php else: ?>


                                                                    <p>:</p><?php echo $status_warrenty; ?>
                                                                    <?php if($status_amc_val == 2): ?>
                                                                        <span
                                                                            class="status green"><?php echo e('In' . ' ' . strtoupper($activate_val)); ?>

                                                                        </span>
                                                                            <?php else: ?>
                                                                    <?php endif; ?>


                                                                    <?php endif; ?>

                                                                </div>
                                                                <div class="d-flex"> <span>Validation Date </span>
                                                                    <p>:</p><?php echo $status_validity; ?>
                                                                </div>
                                                                <?php if($status_amc != ''): ?>
                                                                    <div class="d-flex"> <span>Maintenance contract
                                                                        </span>
                                                                        <p>:</p><?php echo $status_amc; ?>
                                                                    </div>
                                                                <?php endif; ?>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                           
                                        </a>
                                        <div class="preventive-card-custom">
                                            <button class="btn"
                                                onclick="prev(<?php echo e($partners->registerid); ?>);">Preventive Maintenance Card
                                            </button>
                                        </div>
                                    </div>
                                </div>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </div>
                    </div>
                </div>
                <!-- All Bids< End -->
            </div>
        </div>
    </div>
    </div>
    <!--tab-content End -->
    </div>
    <!--custom-tabs End -->
    </div>
    <!--boxings End -->
    <!-- Contact info popup-->
    <div class="modal fade" id="contact_pop" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
        aria-hidden="true">
        <div class="modal-dialog modal-lg">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title" id="exampleModalLabel">Contact Information</h5>
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>
                <form name="cinfo" id="cinfo" method="POST" action="#">
                    <div class="modal-body imageArea" id="demo">
                        <div class="prrequest_contact">
                            <div class="row mb-4">
                                <div class="col-lg-3 pr-0">
                                    <div class="form-inputs">
                                        <div class="form-group">
                                            <label>Contact Name</label>
                                            <input id="contactname[]" name="contactname[]" value=""
                                                type="text" class="form-control">
                                        </div>
                                    </div>
                                </div>
                                <div class="col-lg-3 pr-0">
                                    <div class="form-inputs">
                                        <div class="form-group">
                                            <label>Contact Phone No</label>
                                            <input id="contactno[]" name="contactno[]" value="" minlength="10" maxlength="13" type="number"
                                                class="form-control">
                                        </div>
                                    </div>
                                </div>
                                <div class="col-lg-3 pr-0">
                                    <div class="form-inputs">
                                        <div class="form-group">
                                            <label>Contact Email</label>
                                            <input id="contactemail[]" name="contactemail[]" value=""
                                                type="text" class="form-control">
                                        </div>
                                    </div>
                                </div>
                                <div class="col-lg-2 pr-0">
                                    <div class="form-inputs">
                                        <div class="form-group">
                                            <label>Set Us Primary</label>
                                            <input id="" name="primarycontact" value=""
                                                type="radio" checked class="form-control">
                                        </div>
                                    </div>
                                </div>
                                <div class="col-lg-1 pr-0">
                                    <div class="Add-buttons">
                                        <button class="G-add" onclick="addcontact()"><i class="fa fa-plus"
                                                aria-hidden="true"></i></button>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="d-flex justify-content-center ">
                            <button type="submit" class="save-btn btn btn-primary common-btn" id="contactsubmit">
                                <?php echo e(__('Save')); ?>

                            </button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
    <!-- Modal Request Product -->
    <div class="modal fade" id="exampleModal_requestproduct" tabindex="-1" role="dialog"
        aria-labelledby="exampleModalLabel" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title" id="exampleModalLabel">Request Product</h5>
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>
                <div class="modal-body imageArea" id="demo">
                    <form name="request_product_pop" id="request_product_pop" method="POST" action="#">
                        <?php echo csrf_field(); ?>
                        <div class="prrequest">
                            <div class="row mb-4">
                                <div class="col-lg-4">
                                    <div class="form-inputs">
                                        <div class="form-group">
                                            <label>Product Name</label>
                                            <input id="request_product_name[]" name="request_product_name[]"
                                                value="" type="text" class="form-control">
                                        </div>
                                    </div>
                                </div>
                                <div class="col-lg-4 ">
                                    <div class="form-inputs">
                                        <div class="form-group">
                                            <label>Department</label>
                                            <select class="form-control selectmanufacturer" id="department_existing"
                                                name="department_existing[]">
                                                <option value="">Select</option>
                                                <?php $__currentLoopData = $departmentlist_request; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $departmentlist_request): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                    <option value="<?php echo e($departmentlist_request->id); ?>">
                                                        <?php echo e($departmentlist_request->name); ?></option>
                                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                            </select>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-lg-4 ">
                                    <div class="Add-buttons">
                                        <button class="G-add addproduct">ADD<i class="fa fa-plus"
                                                aria-hidden="true"></i></button>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="prrequest1">
                        </div>
                        <div class="modal-footer">
                            <button type="button" class="btn btn-secondary closemessage" data-dismiss="modal"
                                id="closebar">Close</button>
                            <button type="submit" class="btn btn-primary sendmessage" id="requestproduct">
                                <?php echo e(__('Send')); ?>

                            </button>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
    <!--Rating start modal-->
    <div class="modal fade" id="myModalrate" role="dialog">
        <div class="modal-dialog modal-dialog-centered">
            <!-- Modal content-->
            <div class="modal-content ratingPops">
                <div class="modal-header text-center">
                    <h5 class="modal-title" id="exampleModalLabel">RATE OUR SERVICES</h5>
                    <button type="button" class="close close_message" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>
                <div class="modal-body  text-center">
                    <div class="rate-rs">
                        <form name="ratingcheck" id="ratingcheck" method="POST"
                            action="<?php echo e(url('buyers/ratingcheck')); ?>">
                            <?php echo csrf_field(); ?>
                            <div id="pro" class="col-lg-12">
                                <div class="col-lg-12">
                                    <label>Professionalism</label>
                                </div>
                                <div class="col-lg-12">
                                    <span class="user-rating">
                                        <input type="radio" name="rating1" value="5"><span
                                            class="star"></span>
                                        <input type="radio" name="rating1" value="4"><span
                                            class="star"></span>
                                        <input type="radio" name="rating1" value="3"><span
                                            class="star"></span>
                                        <input type="radio" name="rating1" value="2"><span
                                            class="star"></span>
                                        <input type="radio" name="rating1" value="1"><span
                                            class="star"></span>
                                    </span>
                                </div>
                            </div>
                            <div id="pro" class="col-lg-12">
                                <div style="" class="col-lg-12">
                                    <label>Knowledge of product</label>
                                </div>
                                <div class="col-lg-12">
                                    <span class="user-rating">
                                        <input type="radio" name="rating2" value="5"><span
                                            class="star"></span>
                                        <input type="radio" name="rating2" value="4"><span
                                            class="star"></span>
                                        <input type="radio" name="rating2" value="3"><span
                                            class="star"></span>
                                        <input type="radio" name="rating2" value="2"><span
                                            class="star"></span>
                                        <input type="radio" name="rating2" value="1"><span
                                            class="star"></span>
                                    </span>
                                </div>
                            </div>
                            <div id="pro" class="col-lg-12">
                                <div style="" class="col-lg-12">
                                    <label>Timely attending complaint</label>
                                </div>
                                <div class="col-lg-12">
                                    <span class="user-rating">
                                        <input type="radio" name="rating3" value="5"><span
                                            class="star"></span>
                                        <input type="radio" name="rating3" value="4"><span
                                            class="star"></span>
                                        <input type="radio" name="rating3" value="3"><span
                                            class="star"></span>
                                        <input type="radio" name="rating3" value="2"><span
                                            class="star"></span>
                                        <input type="radio" name="rating3" value="1"><span
                                            class="star"></span>
                                    </span>
                                </div>
                            </div>
                            <div id="pro" class="col-lg-12">
                                <div style="" class="col-lg-12">
                                    <label>Overall satisfaction</label>
                                </div>
                                <div class="col-lg-12">
                                    <span class="user-rating">
                                        <input type="radio" name="rating4" value="5"><span
                                            class="star"></span>
                                        <input type="radio" name="rating4" value="4"><span
                                            class="star"></span>
                                        <input type="radio" name="rating4" value="3"><span
                                            class="star"></span>
                                        <input type="radio" name="rating4" value="2"><span
                                            class="star"></span>
                                        <input type="radio" name="rating4" value="1"><span
                                            class="star"></span>
                                    </span>
                                </div>
                            </div>
                            <div class="col-sm-12 col-xs-12">
                                <div class="form-inputs">
                                    <div class="form-group">
                                        <label>Enter your feedback</label>
                                        <textarea style="width:100%;border: 1px solid #cacaca;border-radius: 5px;padding: 15px;" id="complaint_feedback"
                                            name="complaint_feedback" rows="4" cols="50"></textarea>
                                    </div>
                                </div>
                            </div>
                            <div id="pro" class="col-lg-12">
                                <input type="hidden" name="complaint_rating_updateid" id="complaint_rating_updateid">
                                <button type="submit" class="btn btn-primary common-btn" id="regnewss">
                                    <?php echo e(__('Save')); ?>

                                </button>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- Modal -->
    <div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
        aria-hidden="true">
        <div class="modal-dialog barcodePopup" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title" id="exampleModalLabel">BARCODE</h5>
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>
                <div class="modal-body imageArea" id="demo_print">
                    <img style="text-align: center;     padding: 48px 2px;   margin: 0 auto;display: block;"
                        width="900" height="500" id="barcode" />
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-secondary" data-dismiss="modal"
                        id="closebar">Close</button>
                    <button type="button" id="printBtn" class="btn btn-primary">Print</button>
                </div>
            </div>
        </div>
    </div>
    <!-- Modal view updates -->
    <div class="modal fade" id="exampleModal_updates" tabindex="-1" role="dialog"
        aria-labelledby="exampleModalLabel" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title" id="exampleModalLabel">View Updates</h5>
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>
                <div class="modal-body imageArea" id="demo">
                    <p id="update_content"></p>
                    <img id="myImg" src="" width="300" height="300">
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-secondary" data-dismiss="modal"
                        id="closebar">Close</button>
                </div>
            </div>
        </div>
    </div>
    <!-- Modal Request Product -->
    <!-- Modal Reject -->
    <div class="modal fade" id="myModalreject" role="dialog">
        <div class="modal-dialog modal-dialog-centered">
            <!-- Modal content-->
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title" id="exampleModalLabel">Reason for rejection</h5>
                    <button type="button" class="close close_message" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>
                <div class="modal-body">
                    <div class="col-sm-12 col-xs-12">
                        <div class="right-panel vendor">
                            <Span class="Tittle">Reason</Span>
                            <Span class="Collon">:</Span>
                            <Span class="Value qparts"></Span>
                        </div>
                        <div class="right-panel vendor">
                            <Span class="Tittle">Price</Span>
                            <Span class="Collon">:</Span>
                            <Span class="Value qprice"></Span>
                        </div>
                        <div class="right-panel vendor">
                            <Span class="Tittle">Document</Span>
                            <Span class="Collon">:</Span>
                            <Span class="Value qdoc"></Span>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- Modal -->
    <!-- Modal view quotation -->
    <div class="modal fade" id="myModalactionview" role="dialog">
        <div class="modal-dialog modal-dialog-centered">
            <!-- Modal content-->
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title" id="exampleModalLabel">View Quotation</h5>
                    <button type="button" class="close close_message" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>
                <div class="modal-body">
                    <div class="col-sm-12 col-xs-12">
                        <div class="right-panel vendor">
                            <Span class="Tittle">Parts need to be replace</Span>
                            <Span class="Collon">:</Span>
                            <Span class="Value qparts"></Span>
                        </div>
                        <div class="right-panel vendor">
                            <Span class="Tittle">Price</Span>
                            <Span class="Collon">:</Span>
                            <Span class="Value qprice"></Span>
                        </div>
                        <div class="right-panel vendor">
                            <Span class="Tittle">Quotation</Span>
                            <Span class="Collon">:</Span>
                            <Span class="Value qdoc"></Span>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- Modal -->
    <!-- Modal Under observation -->
    <div class="modal fade" id="exampleModal_observation" tabindex="-1" role="dialog"
        aria-labelledby="exampleModalLabel" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title" id="exampleModalLabel">Under Observation</h5>
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>
                <div class="modal-body imageArea" id="demo">
                    <form name="add_observation" id="add_observation" method="POST" action="#">
                        <?php echo csrf_field(); ?>
                        <div class="row manufacturerlist manufacturerlist-rs">
                            <div class="col-sm-12 col-xs-12">
                                <div class="form-inputs">
                                    <div class="form-group">
                                        <label>Number of days</label>
                                        <input id="no_day" name="no_day" value="7" type="number"
                                            class="form-control">
                                        <input id="complaint_id_observation" name="complaint_id_observation"
                                            type="hidden" class="form-control">
                                        <input id="observation_product_id" name="observation_product_id"
                                            type="hidden" class="form-control">
                                        <input id="observation_vendor_id" name="observation_vendor_id" type="hidden"
                                            class="form-control">
                                        <input id="complaint_regsoldtype" name="complaint_regsoldtype" type="hidden"
                                            class="form-control">
                                    </div>
                                </div>
                            </div>
                        </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-secondary closemessage" data-dismiss="modal"
                        id="closebar">Close</button>
                    <button type="submit" class="btn btn-primary sendmessage" id="sendobservation">
                        <?php echo e(__('Send')); ?>

                    </button>
                </div>
                </form>
            </div>
            <!--
                      <div class="modal-footer">
                        <button type="button" class="btn btn-secondary" data-dismiss="modal" id="closebar">Close</button>
                      </div>
                -->
        </div>
    </div>
    <!-- Modal -->
    <div class="modal fade" id="message_pop" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
        aria-hidden="true">
        <div class="modal-dialog barcodePopup" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title" id="exampleModalLabel">Send Message</h5>
                    <button type="button" class="close closemessage" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>
                <div class="modal-body" id="">
                    <form name="add_msg" id="add_msg" method="POST" action="#">
                        <?php echo csrf_field(); ?>
                        <div class="row manufacturerlist manufacturerlist-rs">
                            <div class="col-sm-12 col-xs-12">
                                <div class="form-inputs">
                                    <div class="form-group">
                                        <label>To</label>
                                        <input id="to_name" name="to_name" type="text" class="form-control"
                                            readonly>
                                        <input id="to_id" name="to_id" type="hidden" class="form-control">
                                        <input id="p_id" name="p_id" type="hidden" class="form-control">
                                        <input id="complaint_id" name="complaint_id" type="hidden"
                                            class="form-control">
                                        <input id="messagetype" name="messagetype" type="hidden"
                                            class="form-control">
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="col-sm-12 col-xs-12">
                            <div class="form-inputs">
                                <div class="form-group">
                                    <label>Message</label>
                                    <textarea style="width:100%;border: 1px solid #cacaca;border-radius: 5px;" id="messagedetails"
                                        name="messagedetails" rows="4" cols="50"></textarea>
                                </div>
                            </div>
                        </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-secondary closemessage" data-dismiss="modal"
                        id="closebar">Close</button>
                    <button type="submit" class="btn btn-primary sendmessage" id="sendmessage">
                        <?php echo e(__('Send')); ?>

                    </button>
                </div>
                </form>
            </div>
        </div>
    </div>
    <!-- Modal -->
    <!-- Modal -->
    <div class="modal fade" id="myModalaction" role="dialog">
        <div class="modal-dialog modal-dialog-centered">
            <!-- Modal content-->
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title" id="exampleModalLabel">Action History</h5>
                    <button type="button" class="close close_message" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>
                <div class="modal-body">
                    <div class="col-sm-12 col-xs-12">
                        <div class="right-panel vendor">
                            <Span class="Tittle">Vendor/Manufacturer</Span>
                            <Span class="Collon">:</Span>
                            <Span class="Value vendorval"></Span>
                        </div>
                        <div class="right-panel productname">
                            <Span class="Tittle">Product name</Span>
                            <Span class="Collon">:</Span>
                            <Span class="Value productnameval"></Span>
                        </div>
                        <div class="right-panel cpostdate">
                            <Span class="Tittle">Complaint posted date</Span>
                            <Span class="Collon">:</Span>
                            <Span class="Value cpostdateval"></Span>
                        </div>
                        <div class="right-panel service_accept">
                            <Span class="Tittle">Service Charge Accepted </Span>
                            <Span class="Collon">:</Span>
                            <Span class="Value service_acceptval"></Span>
                        </div>
                        <div class="right-panel service_reject">
                            <Span class="Tittle">Service Charge Rejected</Span>
                            <Span class="Collon">:</Span>
                            <Span class="Value service_rejectval"></Span>
                        </div>
                        <div class="right-panel scheduled">
                            <Span class="Tittle">Scheduled date</Span>
                            <Span class="Collon">:</Span>
                            <Span class="Value scheduledval"></Span>
                        </div>
                        <div class="right-panel resolved">
                            <Span class="Tittle">Resolved date </Span>
                            <Span class="Collon">:</Span>
                            <Span class="Value resolvedval"></Span>
                        </div>
                        <div class="right-panel closeddate">
                            <Span class="Tittle">Closed date </Span>
                            <Span class="Collon">:</Span>
                            <Span class="Value closeddateval"></Span>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- Modal -->
    </div>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('scripts'); ?>
    <script src="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/js/select2.min.js"></script>
    <script src="<?php echo e(URL::to('assets/js/vendor.js')); ?>"></script>
    <script type="text/javascript">
        function prev(regid) {
            window.location.href = 'https://www.meddbot.com/buyers/preventive_card_buyer/' + regid;
        }
        $('#permission_existing').click(function() {
            if ($(this).prop("checked") == true) {
                console.log("Checkbox is checked.");
                $("#documentdiv").css("display", "block");
                $("#renewaldiv").css("display", "block");
                $("#documenteditdiv").css("display", "block");
                $("#renewaleditdiv").css("display", "block");
                $("#expiry_existing_div").css("display", "block");
            } else if ($(this).prop("checked") == false) {
                console.log("Checkbox is unchecked.");
                $("#documenteditdiv").css("display", "none");
                $("#renewaleditdiv").css("display", "none");
                $("#documentdiv").css("display", "none");
                $("#renewaldiv").css("display", "none");
                $("#expiry_existing_div").css("display", "none");
            }
        });
        $(function() {
            $(".invoiceselect").select2();
            $(".invoiceselect1").select2();
        });
        window.baseurl = 'https://www.meddbot.com/';
        $(document).ready(function() {
            $('#gst_no').focusout(function() {
                var gst_no = $('#gst_no').val();

               
                if ($('#gst_no').val() != "") {
                    $(".pageloader").show();


                    var gst_no = $('#gst_no').val();
                    var APP_URL = <?php echo json_encode(url('/getmanufacturedetails_existing')); ?>;
                    var saveData = $.ajax({
                        type: 'GET',
                        url: APP_URL + '/' + gst_no,
                        data: {
                            gst_no: gst_no,
                            _token: '<?php echo e(csrf_token()); ?>'
                        },
                        dataType: "text",
                        success: function(resultData) {
                            //console.log(resultData);
                            var res = JSON.parse(resultData);
                            console.log(res);
                            if (res.gntinfo == 1) {
                                //alert();
                                $('#name').val('');
                                $('#address').val('');
                                $('#zipcode').val('');
                                var name = res.userinfo.name;
                                var address = res.userinfo.address;
                                var zipcode = res.userinfo.zipcode;
                                var userid = res.userinfo.id;
                                $('#name').val(name);
                                $('#address').val(address);
                                $('#zipcode').val(zipcode);
                                $('#usertype').val('in');
                                $('#vendor_existing').val(userid);

                                $('label[for="name"]').hide();
                                $('label[for="address"]').hide();
                                $('label[for="zipcode"]').hide();

                                $(".pageloader").hide();


                            } else {
                                //alert(' NULL')
                                $('#email').val('');
                                $('#name').val('');
                                $('#address').val('');
                                $('#zipcode').val('');
                                $('#contact_name').val('');
                                $('#contact_phone_no').val('');
                                var APP_URL = <?php echo json_encode(url('/getgstdetails')); ?>;
                                var saveData = $.ajax({
                                    type: 'GET',
                                    url: APP_URL + '/' + gst_no,
                                    data: {
                                        gst_no: gst_no,
                                        _token: '<?php echo e(csrf_token()); ?>'
                                    },
                                    dataType: "text",
                                    success: function(resultData) {
                                        var res = JSON.parse(resultData);
                                        console.log(res);
                                        if(res.error==true){
                                           
                                           swal("", "Invalid GST Number");
                                           $(".pageloader").hide();
                                           }else{




                                        var name = res.taxpayerInfo.lgnm;
                                        console.log(name);
                                        var dno = res.taxpayerInfo.pradr.addr.bno;
                                        var bnm = res.taxpayerInfo.pradr.addr.bnm;
                                        var st = res.taxpayerInfo.pradr.addr.st;
                                        var loc = res.taxpayerInfo.pradr.addr.loc;
                                        var dst = res.taxpayerInfo.pradr.addr.dst;
                                        var stcd = res.taxpayerInfo.pradr.addr.stcd;
                                        var pncd = res.taxpayerInfo.pradr.addr.pncd;
                                        var address = dno + ',' + bnm + ',' + st +
                                            ',' + loc + ',' + dst + ',' + stcd +
                                            ',' + pncd;
                                        $('#name').val(name);
                                        $('#address').val(address);
                                        $('#zipcode').val(pncd);
                                        $('#usertype').val('out');
                                        $('#vendor_existing').val('');                                       
                                        $(".pageloader").hide();
                                           }
                                    }
                                });
                            }
                        }
                    });
                   
                    //$(".pageloader").delay(3000).fadeOut("slow");
                }
               
            });
        });
        $(document).ready(function() {
            $('#table_id').DataTable();
        });
        $('#myModalaction').on('show.bs.modal', function(event) {
            var button = $(event.relatedTarget) // Button that triggered the modal
            var productname = button.data('productname') // Extract info from data-* attributes
            var vendorname = button.data('vendorname') // Extract info from data-* attributes
            var complaint_postdate = button.data('cpostdate') // Extract info from data-* attributes
            var charge_approve = button.data('servicechargeapprove')
            var charge_reject = button.data('servicechargereject')
            var scheduleddate = button.data('scheduleddate')
            var resolveddate = button.data('resolveddate')
            var closeddate = button.data('closeddate')
            $('.vendorval').html(vendorname);
            $('.productnameval').html(productname);
            $('.cpostdateval').html(complaint_postdate);
            if (charge_approve != "") {
                $('.service_acceptval').html(charge_approve);
            } else {
                $(".service_accept").hide();
            }
            if (charge_reject != "") {
                $('.service_rejectval').html(charge_reject);
            } else {
                $(".service_reject").hide();
            }
            if (scheduleddate != "") {
                $('.scheduledval').html(scheduleddate);
            } else {
                $(".scheduled").hide();
            }
            if (resolveddate != "") {
                $('.resolvedval').html(resolveddate);
            } else {
                $(".resolved").hide();
            }
            if (closeddate != "") {
                $('.closeddateval').html(closeddate);
            } else {
                $(".closeddate").hide();
            }
            // Extract info from data-* attributes
        })

        function reopencomplaint(complaintid) {
            swal({
                title: "Are you sure want to reopen?",
                text: "",
                type: "warning",
                showCancelButton: true,
                confirmButtonColor: "#DD6B55",
                confirmButtonText: "Yes, Reopen it!",
                closeOnConfirm: false,
                html: false
            }, function() {
                var data1 = {
                    _token: $('#token_buyer').val(),
                    complaintid: complaintid
                }
                $.ajax({
                    url: baseurl + 'complaint_reopen',
                    type: "POST",
                    data: data1,
                    success: function(res) {
                        if (res == 1) {
                            swal({
                                title: "",
                                text: "Successfully  Reopened!",
                                type: "success",
                                showCancelButton: false,
                                dangerMode: false,
                                confirmButtonText: 'OK'
                            }, function() {
                                window.location = baseurl + 'buyers/asset_management';
                            })
                        }
                    }
                });
            });
        }

        function closecomplaint(complaintid) {
            swal({
                title: "Are you sure want to close?",
                text: "",
                type: "warning",
                showCancelButton: true,
                confirmButtonColor: "#DD6B55",
                confirmButtonText: "Yes, Closed it!",
                closeOnConfirm: false,
                html: false
            }, function() {
                var data1 = {
                    _token: $('#token_buyer').val(),
                    complaintid: complaintid
                }
                $.ajax({
                    url: baseurl + 'complaint_close',
                    type: "POST",
                    data: data1,
                    success: function(res) {
                        console.log(res);
                        if (res == 1) {
                            swal({
                                title: "",
                                text: "Successfully  Closed!",
                                type: "success",
                                showCancelButton: false,
                                dangerMode: false,
                                confirmButtonText: 'OK'
                            }, function() {
                                window.location = baseurl + 'buyers/asset_management';
                            })
                        }
                    }
                });
            });
        }
        <?php if($asset_from != ''): ?>
            var x = '<?php echo $asset_from; ?>';
            $("#product").val(x).trigger('change');

            if ($("#product option:selected").val() != '') {


                $("#certificate_div").css("display", "block");
                $("#generate_new").css("display", "block");
                $("#waranty_date_new").css("display", "block");
                $("#product_code_div_new").css("display", "block");
                $("#serialno_div").css("display", "block");
                $("#approve_departmentdiv").css("display", "block");
                $("#equipment_test_approve_div").css("display", "block");
                $("#equipment_day_approve_div").css("display", "block");
                $("#equipment_month_approve_div").css("display", "block");
                $("#test_name_div").css("display", "block");

                
                //$("#barcodenewdiv").css("display","block");
                //$(".barcodebutton").css("display","block");
                $("#critical_div").css("display", "block");
                $("#warranty_div").css("display", "block");
                $("#invoice_div").css("display", "block");
                $("#product_additional_div").css("display", "block");
                $("#barcode_new").val('');
                $("#validation_date_div").css("display", "block");
                $("#documenteditdiv").css("display", "block");
                $("#renewaldiv").css("display", "block");
                $("#to_id").val();
                $("#sendmessage").css("display", "block");
                $("#product_additional_div").css("display", "block");


                var reg_product = $("#product option:selected").val();
                var Arr = reg_product.split('_');
                var register_sold_id = Arr[0];
                var product_id = Arr[1];
                var vendor_id = Arr[2];
                var bid_id = Arr[3];
                $("#to_id").val(vendor_id);
                $("#p_id").val(product_id);
                $("#register_sold_id").val(register_sold_id);
                var data = {
                    _token: $('#token_buyer').val(),
                    product_id: product_id,
                    vendor_id: vendor_id,
                    invoice_no: '',
                    bid_id: bid_id
                }
                $.ajax({
                    url: 'https://www.meddbot.com/productdetails',
                    type: "POST",
                    data: data,
                    success: function(res) {
                        var obj = jQuery.parseJSON(res);
                        console.log(obj);
                        $("#product_code_new").val(obj.productdetails.product_code);
                        $("#serial_no").val(obj.solddetails.product_serial_no);
                        $("#validation_date_new").val(obj.solddetails.warrenty);
                        $("#manufacturer_serial").val(obj.solddetails.serial_no);
                        $("#bid_id").val(obj.solddetails.bid_id);
                        $("#invoice_number").val(obj.solddetails.invoice_number);
                        $("#product_additional_info").val(obj.solddetails.additional_info);
                        $("#validation_date").val(obj.solddetails.validation_date);
                        $("#renewal_date").val(obj.solddetails.renewal_date);
                        $("#test_name").val(obj.solddetails.testname);

                        var eval = '';
                        var emonth = '';
                        for (i = 1; i <= obj.solddetails.equipment_val; i++) {
                            if (obj.solddetails.equipment_val == i) {
                                eval += '<option value="' + i + '"selected>' + i + '</option>';
                            } else {
                                eval += '<option value="' + i + '">' + i + '</option>';
                            }
                        }
                        for (j = 1; j <= obj.solddetails.equipment_month; j++) {
                            if (obj.solddetails.equipment_month == j) {
                                emonth += '<option value="' + j + '"selected>' + j + '</option>';
                            } else {
                                emonth += '<option value="' + j + '">' + j + '</option>';
                            }
                        }
                        var x = '';
                        if (obj.solddetails.equipment_default == 'hours') {
                            x = 'No. of Hours Equipment can be used in a day';
                        } else {
                            x = 'No. of Test Equipment can be used';
                        }
                        $("#equipment_default").html('<label>' + x + '</label>');
                        $("#equipment_month_approve").html(emonth);
                        $("#equipment_val").html(eval);
                        if (obj.solddetails.department_id != '') {
                            $("#department").val(obj.solddetails.department_id).trigger('change');
                        } else {
                            $("#department").val('').trigger('change');
                        }
                        //$("#department").select2("val","9");
                        $("#document_prev").val(obj.solddetails.document);
                        $("#govtpermission").val(obj.solddetails.govmt_permission);
                        if (obj.approve_check == 1) {
                            if (obj.checking.validation_date_check == 1) {
                                $('#validation_date_check').prop('checked', true);
                                $("#validation_date").removeClass("check");
                            } else {
                                $('#validation_date_check').prop('checked', false);
                                $("#validation_date").addClass("check");
                            }
                            if (obj.checking.product_warranty == 1) {
                                $('#warrenty_check').prop('checked', true);
                                $("#validation_date_new").removeClass("check");
                            } else {
                                $('#warrenty_check').prop('checked', false);
                                $("#validation_date_new").addClass("check");
                            }
                            if (obj.checking.amc_check == 1) {
                                $('#amc_check').prop('checked', true);
                                $("#amcdetails").removeClass("check");
                            } else {
                                $('#amc_check').prop('checked', false);
                                $("#amcdetails").addClass("check");
                            }
                            if (obj.checking.cmc_check == 1) {
                                $('#cmc_check').prop('checked', true);
                                $("#cmcdetails").removeClass("check");
                            } else {
                                $('#cmc_check').prop('checked', false);
                                $("#cmcdetails").addClass("check");
                            }
                            if (obj.checking.invoice_number == 1) {
                                $('#invoice_check').prop('checked', true);
                                $("#invoice_number").removeClass("check");
                            } else {
                                $('#invoice_check').prop('checked', false);
                                $("#invoice_number").addClass("check");
                            }
                            if (obj.checking.product_discard_date == 1) {
                                $('#discardyear_check').prop('checked', true);
                                $("#product_discard_years").removeClass("check");
                            } else {
                                $('#discardyear_check').prop('checked', false);
                                $("#product_discard_years").addClass("check");
                            }
                            if (obj.checking.preventive_frequency == 1) {
                                $('#pmaintenance_check').prop('checked', true);
                                $("#preventive").removeClass("check");
                            } else {
                                $('#pmaintenance_check').prop('checked', false);
                                $("#preventive").addClass("check");
                            }
                        } else {
                            $('#prcode_check').prop('checked', false);
                            $('#invoice_check').prop('checked', false);
                            $('#discardyear_check').prop('checked', false);
                            $('#pmaintenance_check').prop('checked', false);
                            $('#warrenty_check').prop('checked', false);
                            $("#preventive").removeClass("check");
                            $("#product_discard_years").removeClass("check");
                            $("#product_code_new").removeClass("check");
                            $("#invoice_number").removeClass("check");
                            $("#preventive").removeClass("check");
                        }
                        $("#product_discard_years").val(obj.solddetails.product_discard_years);
                        $("#preventive").val(obj.solddetails.preventive_maintenance);
                        var urlamc = baseurl + 'uploads/document/' + obj.solddetails.amc_certificate
                        $("a.amcdoc").attr("href", urlamc)
                        var urlcmc = baseurl + 'uploads/document/' + obj.solddetails.cmc_certificate
                        $("a.cmcdoc").attr("href", urlcmc)
                        if (obj.solddetails.govmt_permission == 1) {
                            $("#renewal_date_edit").val(obj.solddetails.renewal_date);
                            var url = baseurl + 'uploads/document/' + obj.solddetails.document
                            $("a.regdoc").attr("href", url)
                            $("#document_div").css("display", "block");
                            $("#documessage").css("display", "none");
                        } else {
                            $("#document_div").css("display", "none");
                            $("#documessage").css("display", "block");
                        }
                        $("#product_discard_div").css("display", "block");
                        $("#product_preventive_div").css("display", "block");
                        $("#manufacturer_serial_div").css("display", "block");
                        $("#to_name").val(obj.vendordetails.name);
                        var amccount = obj.sold_amc.length;
                        var cmccount = obj.sold_cmc.length;
                        var amcopt = '<h1 class="amc_title">AMC Details </h1>';
                        var cmcopt = '<h1 class="amc_title">CMC Details</h1>';
                        amcopt += '<span>Validity' + ' ' + ':' + ' ' + obj.solddetails.amc_validity +
                            '</span></br>';
                        amcopt += '<span>Price' + ' ' + ':' + ' ' + obj.solddetails.amc_price + '</span></br>';
                        cmcopt += '<span>Validity' + ' ' + ':' + ' ' + obj.solddetails.cmc_validity +
                            '</span></br>';
                        cmcopt += '<span>Price' + ' ' + ':' + ' ' + obj.solddetails.cmc_price + '</span></br>';
                        /*for (i = 0; i < amccount; i++) {
                          var amc_month		=obj.sold_amc[i].month;
                          var amc_year		=obj.sold_amc[i].year;
                          var amc_price		=obj.sold_amc[i].price;
                          amcopt+='<div class="amc_details"><div>Month: '+amc_month+'</div><div>Year: '+amc_year+'</div>'+'<div>Price: '+amc_price+' '+'INR</div></div>';
                        }
                        for (i = 0; i < cmccount; i++) {
                          var cmc_month		=obj.sold_cmc[i].month;
                          var cmc_year		=obj.sold_cmc[i].year;
                          var cmc_price		=obj.sold_cmc[i].price;
                          cmcopt+='<div class="amc_details"><div>Month: '+cmc_month+'</div><div>Year: '+cmc_year+'</div>'+'<div>Price: '+cmc_price+' '+'INR</div></div>';
                        }*/
                        console.log('raji');
                        console.log(amcopt);
                        $("#amcdetails").html(amcopt);
                        $("#cmcdetails").html(cmcopt);
                    }
                });
            } else {
                $("#certificate_div").css("display", "none");
                $("#generate_new").css("display", "none");
                $("#waranty_date_new").css("display", "none");
                $("#product_code_div_new").css("display", "none");
                $("#barcodenewdiv").css("display", "none");
                $("#barcode_new").val('');
                $("#amcdetails").html('');
                $("#cmcdetails").html('');
                $("#sendmessage").css("display", "none");
                $("#serialno_div").css("display", "none");
                $("#product_discard_div").css("display", "none");
                $("#product_preventive_div").css("display", "none");
                $("#manufacturer_serial_div").css("display", "none");
                $("#invoice_div").css("display", "none");
                $("#document_div").css("display", "none");
                $("#renewdate_div").css("display", "none");
                $("#product_additional_div").css("display", "none");
                $("#critical_div").css("display", "none");
                $("#warranty_div").css("display", "none");
                $("#validation_date_div").css("display", "none");
                $("#documenteditdiv").css("display", "none");
                $("#renewaldiv").css("display", "none");
                $("#documessage").css("display", "none");
                $("#equipment_test_approve_div").css("display", "none");
                $("#approve_departmentdiv").css("display", "none");
                $("#equipment_day_approve_div").css("display", "none");
                $("#equipment_month_approve_div").css("display", "none");
            }
        <?php endif; ?>
        <?php if(Session::has('message')): ?>
            swal({
                title: "",
                text: "<?php echo e(Session::get('message')); ?>",
                type: "success",
                showCancelButton: false,
                dangerMode: false,
                confirmButtonText: 'OK',
            });
        <?php endif; ?>
        <?php if(Session::has('errormessage')): ?>
            swal({
                title: "",
                text: "<?php echo e(Session::get('errormessage')); ?>",
                type: "error",
                showCancelButton: false,
                dangerMode: true,
                confirmButtonText: 'OK',
            });
        <?php endif; ?>
        $('#renewal_date').Zebra_DatePicker({
            format: 'd-m-Y',
            direction: 1
        });
        $('#start_date').Zebra_DatePicker({
            format: 'd-m-Y',
            direction: 1
        });
        $('#end_date').Zebra_DatePicker({
            format: 'd-m-Y',
            direction: 1
        });
        $('#expiry_existing').Zebra_DatePicker({
            format: 'd-m-Y',
            direction:1
        });
        $('#waranty_date_existings').Zebra_DatePicker({
            format: 'd-m-Y',
            direction:1
        });
        $('#productdiscarddate_existing').Zebra_DatePicker({
            format: 'd-m-Y',
            direction:1
        });
        $('#product_existing_years').Zebra_DatePicker({
            format: 'd-m-Y',
            direction:1
        });
        $('#validation_date_existing').Zebra_DatePicker({
            format: 'd-m-Y',
            direction:1
        });
        $('#product_new_years').Zebra_DatePicker({
            format: 'd-m-Y',
            direction:1
        });

        function closebar() {
            $('#exampleModal').modal('hide');
        }

        function generatebarcode() {
            $.ajax({
                type: "POST",
                dataType: "json",
                url: "<?php echo e(url('buyers/generate-barcode')); ?>",
                data: {
                    _token: '<?php echo e(csrf_token()); ?>'
                },
                success: function(response) {
                    // console.log(response);
                    if (response.status == true) {
                        swal({
                            title: "",
                            text: "Barcode generated successfully",
                            type: "success",
                        }, function() {
                            $("#barcode_new").val(response.barcode);                 
                            $('.barcodebutton').hide();
                            viewBarcode();
                        });


                    } else {
                        swal({
                            title: "",
                            text: "try again",
                            type: "warning",
                        });
                    }

                },
                error: function(request, status, error) {
                    console.log("ajax call went wrong:" + request.responseText);
                }
            });
        }

        function generatebarcode_existing() {
            $.ajax({
                type: "POST",
                dataType: "json",
                url: "<?php echo e(url('buyers/generate-barcode')); ?>",
                data: {
                    _token: '<?php echo e(csrf_token()); ?>'
                },
                success: function(response) {
                    // console.log(response);
                    if (response.status == true) {
                        swal({
                            title: "",
                            text: "Barcode generated successfully",
                            type: "success",
                        }, function() {
                            $("#barcode_existing").val(response.barcode);
                            $('#generate_existing_div').hide();               
                            viewNewBarcode();
                        });


                    } else {
                        swal({
                            title: "",
                            text: "try again",
                            type: "warning",
                        });
                    }

                },
                error: function(request, status, error) {
                    console.log("ajax call went wrong:" + request.responseText);
                }
            });
        }

        function viewBarcode() {
            var barcode = $("#barcode_new").val();
            $('#exampleModal').modal('show');
            $('#barcode').JsBarcode(barcode, {
                width: 1,
                height: 40
            });
        }

        function viewNewBarcode() {
            var barcode = $("#barcode_existing").val();
            $('#exampleModal').modal('show');
            $('#barcode').JsBarcode(barcode, {
                width: 1,
                height: 40
            });
        }

        $("#printBtn").click(function() {
            var divToPrint = document.getElementById('demo_print');
            var newWin = window.open('', 'Print-Window');
            newWin.document.open();
            newWin.document.write('<html><body onload="window.print()">' + divToPrint.innerHTML + '</body></html>');
            newWin.document.close();
            setTimeout(function() {
                newWin.close();
            }, 10);
        });
    </script>
    <link rel="stylesheet"
        href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-slider/10.0.0/css/bootstrap-slider.min.css">
    <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-slider/10.0.0/bootstrap-slider.min.js"></script>
    <script>
        (function($) {
            $(document).ready(function() {
                $('.input-range').each(function() {
                    var value = $(this).attr('data-slider-value');
                    var separator = value.indexOf(',');
                    if (separator !== -1) {
                        value = value.split(',');
                        value.forEach(function(item, i, arr) {
                            arr[i] = parseFloat(item);
                        });
                    } else {
                        value = parseFloat(value);
                    }
                    $(this).slider({
                        formatter: function(value) {
                            console.log(value);
                            $("#current_value").val(value);
                            //alert(value);
                            return ' ' + value;
                        },
                        min: parseFloat($(this).attr('data-slider-min')),
                        max: parseFloat($(this).attr('data-slider-max')),
                        range: $(this).attr('data-slider-range'),
                        value: value,
                        tooltip_split: $(this).attr('data-slider-tooltip_split'),
                        tooltip: $(this).attr('data-slider-tooltip')
                    });
                });
                $('.input-range1').each(function() {
                    var value = $(this).attr('data-slider-value');
                    var separator = value.indexOf(',');
                    if (separator !== -1) {
                        value = value.split(',');
                        value.forEach(function(item, i, arr) {
                            arr[i] = parseFloat(item);
                        });
                    } else {
                        value = parseFloat(value);
                    }
                    $(this).slider({
                        formatter: function(value) {
                            console.log(value);
                            $("#current_value_new").val(value);
                            //alert(value);
                            return ' ' + value;
                        },
                        min: parseFloat($(this).attr('data-slider-min')),
                        max: parseFloat($(this).attr('data-slider-max')),
                        range: $(this).attr('data-slider-range'),
                        value: value,
                        tooltip_split: $(this).attr('data-slider-tooltip_split'),
                        tooltip: $(this).attr('data-slider-tooltip')
                    });
                });
            });
        })(jQuery);
    </script>
    <script>
        function searchFilters() {
            var $productFilter = $('#productname_filter');
            var $departmentFilter = $('#department_filter_new');
            if ($productFilter.val() == 'all' && $departmentFilter.val() == 'all') {
                $('.js-category-filterable').show();
                $('.js-productname-filterable').show();
            }
            if ($productFilter.val() == 'all' && $departmentFilter.val() != 'all') {
                $('.js-productname-filterable').show();
                $('.js-category-filterable').each(function() {
                    if ($(this).data('category') == $departmentFilter.val()) {
                        $(this).show();
                    } else {
                        $(this).hide();
                    }
                });
            }
            if ($productFilter.val() != 'all' && $departmentFilter.val() == 'all') {
                $('.js-category-filterable').show();
                $('.js-productname-filterable').each(function() {
                    if ($(this).data('productname') == $productFilter.val()) {
                        $(this).show();
                    } else {
                        $(this).hide();
                    }
                });
            }
            if ($productFilter.val() != 'all' && $departmentFilter.val() != 'all') {
                $('.js-productname-filterable').each(function() {
                    if ($(this).data('productname') == $productFilter.val() && $(this).data('category') ==
                        $departmentFilter.val()) {
                        $(this).show();
                    } else {
                        $(this).hide();
                    }
                });
            }
        }
    </script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.main_assetmanage', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/meddbot/public_html/resources/views/buyers/asset_management.blade.php ENDPATH**/ ?>