<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>Sisplan Web | Cadastro Redução Z</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="plugins/fontawesome-free/css/all.min.css?versao=3.2512.9.1">
    <link rel="stylesheet" href="dist/css/adminlte.min.css?versao=3.2512.9.1">
    <link href='https://fonts.googleapis.com/css?family=Roboto:400,300,500,600,700,400italic' rel='stylesheet' type='text/css'>
    <link rel="stylesheet" href="dist/css/custom.css?versao=3.2512.9.1">
    <link rel="stylesheet" href="dist/css/sisplan.css?versao=3.2512.9.1">
    <link rel="stylesheet" type="text/css" href="dist/css/dataTables.bootstrap4.min.css?versao=3.2512.9.1" />
    <link rel="shortcut icon" href="favicon.ico">
    <link rel="stylesheet" href="plugins/toastr/toastr.min.css?versao=3.2512.9.1">
    <link rel="stylesheet" type="text/css" href="dist/css/driver.min.css?versao=3.2512.9.1" />
    <link rel="stylesheet" href="dist/css/jquery-ui.css?versao=3.2512.9.1">
    <link rel="stylesheet" href="plugins/tempusdominus-bootstrap-4/css/tempusdominus-bootstrap-4.min.css?versao=3.2512.9.1">
    <link rel="stylesheet" href="dist/css/PesquisaVariosSelect2.css?versao=3.2512.9.1">
    <link rel="stylesheet" href="plugins/select2/css/select2.min.css?versao=3.2512.9.1">
    <link rel="stylesheet" href="plugins/select2-bootstrap4-theme/select2-bootstrap4.min.css?versao=3.2512.9.1">

    <style>
        #msform {
            text-align: start;
            position: relative;
        }

        .card {
            box-shadow: none !important;
            border-radius: 0 !important;
            margin-bottom: 0 !important;
        }

        .card-header {
            box-shadow: 0px 1px rgb(0 0 0 / 20%) !important;
        }


        .fa-angle-right,
        .fa-angle-down {
            color: #343a40;
        }

        .card-body {
            margin-left: 0px !important;
            padding-left: 1.25rem !important;
            padding-top: 0px;
            padding-bottom: 0px;
            padding-right: 1.25rem !important;
        }

        .header-content-page .title-page,
        .title-content-page .title,
        .title-page {
            font-size: 20px;
            line-height: normal;
            font-weight: 500;
            color: #343a40;
            margin: 0;
            font-family: Roboto, Arial, sans-serif;
        }

        #DadosGerais>.card,
        #obs>.card {
            background: #f7f7f7;
        }

        .radiosStyle {
            padding-top: 0.5rem;
            border: solid #e0e4e6;
            border-radius: 4px;
            border-width: 2px;
            margin-left: 0%;
        }

        .radiosStyle2 {
            padding-top: 0.5rem;
            border: solid #e0e4e6;
            border-radius: 4px;
            border-width: 2px;
        }

        .bordaProduto {
            padding: 10px;
            border: solid #e0e4e6;
            border-radius: 4px;
            border-width: 2px;
        }

        .select2-container--default .select2-selection--multiple .select2-selection__rendered {
            float: left;
        }

        .borda {
            padding: 1px;
            border: solid #e0e4e6;
            border-radius: 4px;
            border-width: 2px;
        }
    </style>
</head>

<body class="hold-transition sidebar-mini layout-fixed">
    <div class="wrapper">

        <div class="content-wrapper">
            <div class="content-header">
                <div class="container-fluid">
                    <div class="row mb-2">
                        <div class="col-sm-6">
                            <h3 class="col-mb=2"></h3>
                        </div>
                        <div class="col-sm-6">

                        </div>
                    </div>
                    <div class="row">
                        <div class="col-12">
                            <div class="card" style="height:auto;">
                                <div class="card-header bg-dark">
                                    <div class="row flex">
                                        <h4 class="text-white">Cadastro Redução Z</h4>
                                        <button title="Tutorial" class="btn btn-info btn-sm ml-2" id="tutorial">
                                            <i class="fas fa-question-circle"></i>
                                        </button>
                                    </div>
                                </div>
                                <fieldset>
                                    <div class="card-body" style="padding-left: 0rem!important; padding-right: 0rem!important;">
                                        <form id="msform" name="msform">
                                            <div class="collapse show" id="DadosGerais">
                                                <div class="card card-body" style="padding-top: 10px;">
                                                    <div class="tab-pane fade show active" role="tabpanel" aria-labelledby="dados-tab">
                                                        <label for="divGeral">Dados Redução Z</label>
                                                        <div class="form-row bordaProduto" id="divGeral">
                                                            <div class="col-12">
                                                                <div class="form-row">
                                                                    <div class="col-md-3 col-sm-3 col-3" id="divNumeroECF">
                                                                        <label data-error="wrong" data-success="right" for="txtNumeroECF">Número ECF * </label>
                                                                        <div class="relative">
                                                                            <div class="input-group">
                                                                                <!-- <input type="text" class="input-default focus form-control" id="txtNumeroECF" name="txtNumeroECF" class="form-control" placeholder="Marca"> -->
                                                                                <select class="js-example-programmatic js-states form-control" id="txtNumeroECF" multiple="multiple">
                                                                                </select>
                                                                            </div>
                                                                        </div>
                                                                    </div>
                                                                    <div class="col-3" id="divMovimentoReducaoZ">
                                                                        <div class="group-default form-group">
                                                                            <label for="txtMovimentoRedZ">Data Movimento Redução Z *</label>
                                                                            <div class="relative">
                                                                                <input type="date" max="2500-12-31" class="input-default focus form-control validate" id="txtMovimentoRedZ">
                                                                            </div>
                                                                        </div>
                                                                    </div>
                                                                    <div class="col-3">
                                                                        <div class="group-default form-group">
                                                                            <label for="txtDataEmissaoRedZ">Data Emissão Redução Z</label>
                                                                            <div class="relative">
                                                                                <input type="date" max="2500-12-31" class="input-default focus form-control validate" id="txtDataEmissaoRedZ">
                                                                            </div>
                                                                        </div>
                                                                    </div>
                                                                    <div class="col-3">
                                                                        <div class="form-group">
                                                                            <label for="txtHoraEmissaoRedZ">Hora Emissão Redução Z</label>
                                                                            <div class="input-group" id="timepicker" data-target-input="nearest">
                                                                                <input type="text" id="txtHoraEmissaoRedZ" class="form-control datetimepicker-input input-default" data-target="#timepicker" placeholder="HH:MM:SS" />
                                                                                <div class="input-group-append" data-target="#timepicker" data-toggle="datetimepicker">
                                                                                    <div class="btn bg-danger"><i class="fa fa-clock"></i></div>
                                                                                </div>
                                                                            </div>
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                                <div class="form-row">
                                                                    <div class="col-3">
                                                                        <label data-error="wrong" data-success="right" for="txtModeloECF">Modelo ECF</label>
                                                                        <div class="input-group">
                                                                            <input type="text" data-selecionado="false" class="input-default focus form-control" id="txtModeloECF" class="form-control" placeholder="Modelo ECF">
                                                                        </div>
                                                                    </div>
                                                                    <div class="col-3">
                                                                        <label data-error="wrong" data-success="right" for="txtContadorRedZ">N° Contador de Reduções Z</label>
                                                                        <div class="input-group">
                                                                            <input type="number" data-selecionado="false" class="input-default focus form-control" id="txtContadorRedZ" class="form-control" placeholder="N° Contador de Reduções Z">
                                                                        </div>
                                                                    </div>
                                                                    <div class="col-3">
                                                                        <label data-error="wrong" data-success="right" for="txtCOORedZ">COO Redução Z</label>
                                                                        <div class="input-group">
                                                                            <input type="number" data-selecionado="false" class="input-default focus form-control" id="txtCOORedZ" class="form-control" placeholder="COO Redução Z">
                                                                        </div>
                                                                    </div>
                                                                    <div class="col-3">
                                                                        <label data-error="wrong" data-success="right" for="txtCRORedZ">CRO Redução Z</label>
                                                                        <div class="input-group">
                                                                            <input type="number" data-selecionado="false" class="input-default focus form-control" id="txtCRORedZ" class="form-control" placeholder="CRO Redução Z">
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                                <div class="form-row" style="margin-top: 2%">
                                                                    <div class="col-3">
                                                                        <label data-error="wrong" data-success="right" for="txtVendaBrutaDiaria">Venda Bruta Diária</label>
                                                                        <div class="input-group">
                                                                            <input type="number" data-selecionado="false" class="input-default focus form-control" id="txtVendaBrutaDiaria" value="0" class="form-control" placeholder="Venda Bruta Diária">
                                                                        </div>
                                                                    </div>
                                                                    <div class="col-3">
                                                                        <label data-error="wrong" data-success="right" for="txtTotalizadorGeral">Totalizador Geral</label>
                                                                        <div class="input-group">
                                                                            <input type="number" data-selecionado="false" class="input-default focus form-control" id="txtTotalizadorGeral" class="form-control" placeholder="Totalizador Geral">
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </div>

                                                        <div class="input-group-append">
                                                            <label for="divImpostos" style="margin-top: 25px;">Impostos
                                                                <button class="btn bg-danger ml-2" id="btnAdicionarImpostos" data-button="absolute" type="button">
                                                                    <i class="m-0 p-0 fas fa-plus"></i>
                                                                </button>
                                                            </label>
                                                        </div>
                                                        <div class="form-row bordaProduto" id="divImpostos">
                                                            <div class="col-sm-12 table-responsive">
                                                                <div class="input-group-append">
                                                                </div>
                                                                <table id="tabelaImpostos" class="table table-sm table-select table-hover" width="100%">
                                                                    <thead>
                                                                        <tr>
                                                                            <th class="th-sm">Código</th>
                                                                            <th class="th-sm">Descrição</th>
                                                                            <th class="th-sm">Observação</th>
                                                                            <th class="th-sm">Valor</th>
                                                                        </tr>
                                                                    </thead>
                                                                    <tbody>
                                                                    </tbody>
                                                                </table>
                                                            </div>
                                                        </div>

                                                        <div class="input-group-append">
                                                            <label for="divPagamentos" style="margin-top: 25px;">Pagamentos
                                                                <button class="btn bg-danger ml-2" id="btnAdicionarPagamentos" data-button="absolute" type="button">
                                                                    <i class="m-0 p-0 fas fa-plus"></i>
                                                                </button>
                                                            </label>
                                                        </div>
                                                        <div class="form-row bordaProduto" style="margin-bottom: 15px;" id="divPagamentos">
                                                            <div class="col-sm-12 table-responsive">
                                                                <div class="input-group-append">
                                                                </div>
                                                                <table id="tabelaPagamentos" class="table table-sm table-select table-hover" width="100%">
                                                                    <thead>
                                                                        <tr>
                                                                            <th class="th-sm">Código</th>
                                                                            <th class="th-sm">Descrição</th>
                                                                            <th class="th-sm">Valor</th>
                                                                        </tr>
                                                                    </thead>
                                                                    <tbody>
                                                                    </tbody>
                                                                </table>
                                                            </div>
                                                        </div>

                                                    </div>
                                                </div>
                                                <button id="btnGravar" type="submit" style="font-size:15px;" class="btn btn-danger btn-sisp action-button mr-3" value="Gravar">Gravar</button>
                                            </div>
                                        </form>
                                    </div>
                                </fieldset>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <?php
    include_once('../../modais.php');
    ?>
    <aside class="control-sidebar control-sidebar-dark">
    </aside>
    </div>
    <script src="plugins/jquery/jquery.min.js?versao=3.2512.9.1"></script>
    <script type="text/javascript" src="dist/js/jquery.dataTables.js?versao=3.2512.9.1"></script>
    <script type="text/javascript" src="dist/js/dataTables.bootstrap4.min.js?versao=3.2512.9.1"></script>
    <script src="plugins/jquery-ui/jquery-ui.min.js?versao=3.2512.9.1"></script>
    <script>
        $.widget.bridge('uibutton', $.ui.button);
    </script>
    <script src="plugins/bootstrap/js/bootstrap.bundle.min.js?versao=3.2512.9.1"></script>
    <script src="dist/js/adminlte.min.js?versao=3.2512.9.1"></script>
    <script src="utils/cookies.js?versao=3.2512.9.1"></script>
    <script src="dist/js/requisicoes.js?versao=3.2512.9.1"></script>
    <script src="dist/js/loadingoverlay.min.js?versao=3.2512.9.1"></script>
    <script src="dist/js/driver.min.js?versao=3.2512.9.1"></script>
    <script src="plugins/toastr/toastr.min.js?versao=3.2512.9.1"></script>
    <script type="text/javascript" src="dist/js/sum().js?versao=3.2512.9.1"></script>
    <script type="text/javascript" src="config.js?versao=3.2512.9.1"></script>
    <script src="plugins/moment/moment.min.js?versao=3.2512.9.1"></script>
    <script src="plugins/tempusdominus-bootstrap-4/js/tempusdominus-bootstrap-4.min.js?versao=3.2512.9.1"></script>
    <script src="dist/js/jquery.mask.min.js?versao=3.2512.9.1"></script>
    <script type="text/javascript" src="plugins/select2/js/select2.full.min.js?versao=3.2512.9.1"></script>
    <script src="utils/funcoes.js?versao=3.2512.9.1"></script>
    <script src="dist/js/sisplan.js?versao=3.2512.9.1"></script>
    <script>
        $(document).ready(async function() {
            if (getCookie('usuario') == "") {
                window.location.href = `${BASE_URI}/login`;
                return;
            }

            let usuario = getCookie('usuario');
            let empresa = getCookie('empresa');

            ipInterno = IP_INTERNO;
            ipExterno = IP_EXTERNO;
            basicAuth = BASIC_AUTH;

            const temAcesso = await temAcessoTela('CADREDUCAOZ');
            if (!temAcesso.resultado) {
                toastrAcesso(temAcesso, BASE_URI);
                return;
            }

            sArquivo = `${BASE_URI}/pages/cadreducaoz/cadreducaoz.js?versao=3.2512.9.1`;
            insereJavaScriptPagina(sArquivo);

        });
    </script>
</body>

</html>