<?php include_once('../../config.php') ?>
<?php
$hostname = gethostbyaddr($_SERVER['REMOTE_ADDR']);
?>

<!DOCTYPE html>
<html>

<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<title>Sisplan Web | Mercadorias</title>
	<!-- Tell the browser to be responsive to screen width -->
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<!-- Font Awesome -->
	<link rel="stylesheet" href="plugins/fontawesome-free/css/all.min.css?versao=3.255.7.1">
	<!-- Theme style -->
	<link rel="stylesheet" href="dist/css/adminlte.min.css?versao=3.255.7.1">
	<!-- Google Font: Source Sans Pro -->
	<!-- <link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700" rel="stylesheet"> -->
	<link rel="stylesheet" type="text/css" href="dist/css/dataTables.bootstrap4.min.css?versao=3.255.7.1" />

	<link href='../dist/css/bootstrap.min.css?versao=3.255.7.1'>
	<link rel="stylesheet" href="plugins/toastr/toastr.min.css?versao=3.255.7.1">
	<link rel="shortcut icon" href="favicon.ico">
	<link rel="stylesheet" href="dist/css/sisplan.css?versao=3.255.7.1">
	<link rel="stylesheet" href="dist/css/custom.css?versao=3.255.7.1">
	<link rel="stylesheet" href="dist/css/PesquisaVariosSelect2.css?versao=3.255.7.1">
	<link rel="stylesheet" type="text/css" href="plugins/datatables-keytable/css/keyTable.bootstrap4.min.css?versao=3.255.7.1">
	<link rel="stylesheet" type="text/css" href="dist/css/driver.min.css?versao=3.255.7.1" />
	<link rel="stylesheet" href="plugins/datatables-colreorder/css/colReorder.bootstrap4.min.css?versao=3.255.7.1">
	<!-- AutoComplete -->
	<link rel="stylesheet" href="dist/css/jquery-ui.css?versao=3.255.7.1">
	<link rel="stylesheet" href="https://cdn.datatables.net/select/1.5.0/css/select.dataTables.min.css">

	<style>
		.content-wrapper {
			margin-left: 0px !important;
		}

		.main-header,
		.main-sidebar {
			display: none;
		}

		.ui-autocomplete-loading {
			background: white url("./dist/img/ui-anim_basic_16x16.gif") center center no-repeat;
		}

		.input-group button,
		.input-group input {
			height: 40px;
		}

		.input-group button {
			min-width: 45px;
		}

		.btn.bg-danger {
			border: 1px solid white;
		}

		th {
			white-space: nowrap;
		}

		th:first-child {
			border-left: 1px solid #dddddd;
		}

		.border-Field .textoBorda {
			font-size: 1.1em !important;
			text-align: left !important;
			width: auto;
			padding: 0 10px;
			border-bottom: none;
		}

		.border-Field {
			border: 1px solid var(--font-color) !important;
			padding: 0 1.0em 1.0em 1.0em !important;
			margin: 0 0 1.0em 0 !important;
			-webkit-box-shadow: 0px 0px 0px 0px #000;
			box-shadow: 0px 0px 0px 0px #000;
			border-radius: 3px !important;
		}

		.acaoIcon:hover {
			cursor: pointer;
			color: red
		}

		.no-click {
			pointer-events: none;
			opacity: 0.6;
		}

		#tabelaVisualizarItens {
			white-space: nowrap;
			text-overflow: ellipsis;
			overflow: hidden;
		}

		.dropdownVenda::-webkit-scrollbar {
			width: 12px;
		}

		.dropdownVenda {
			scrollbar-width: thin;
			scrollbar-color: #a9a9a9 var(--fundo-Input);
		}

		.dropdownVenda::-webkit-scrollbar-track {
			background: var(--btn-hover);
		}

		.dropdownVenda::-webkit-scrollbar-thumb {
			background: var(--color-secondary);
			border-radius: 20px;
			border: 3px solid var(--font-card-color);
		}

		.dropdownVenda {
			height: 250px !important;
			min-width: 12rem !important;
			overflow-y: auto !important;
			max-height: 250px !important;
		}

		#tabelaItens tbody td {
			white-space: nowrap;
			text-overflow: ellipsis;
			overflow: hidden;
		}

		#tabelaVisualizarItens tbody td,
		#tabelaVisualizarItens thead {
			white-space: nowrap;
			text-overflow: ellipsis;
			overflow: hidden;
		}

		#tabelaVisualizarItens tr td,
		#tabelaVisualizarItens tr td,
		#tabelaVisualizarItens th {
			padding: 4px 12px;
		}


		.barcode-message {
			text-align: center;
		}

		.barcode-canvas {
			position: relative;
			overflow: hidden;
			padding-bottom: 56.25%;
			line-height: 0;
		}

		.barcode-canvas video {
			z-index: 10;
			position: absolute;
			transform: translate(-50%, -50%);
			left: 50%;
			right: 50%;
			top: 50%;
			bottom: 50%;
			background: white;
		}

		.barcode-canvas canvas.drawingBuffer {
			z-index: 20;
			position: absolute;
			left: 0;
			right: 0;
			top: 0;
			bottom: 0;
			width: 100%;
			height: 100%;
		}

		.barcode-canvas br {
			display: none;
		}
	</style>

</head>

<body class="hold-transition sidebar-mini layout-fixed">
	<div class="wrapper">
		<?php
		include_once('../../menu.php');
		?>

		<div class="content-wrapper">
			<div class="content-header">
				<div class="container-fluid">
					<div class="row mb-2">
						<div class="col-sm-6 flex">
							<h1 class="m-0 text-dark">Envio de Mercadorias</h1>
							<button type="button" class="btn btn-info btn-sm ml-2" style="color: white;" id="tutorial">
								<i class="fas fa-question-circle"></i>
							</button>
						</div>
						<div class="col-sm-6">
						</div>
					</div>
					<div id="modal-filtros" class="modal" tabindex="-1" role="dialog">
						<div class="modal-dialog modal-xl" role="document">
							<div class="modal-content" id="modalBody">
								<div class="modal-header">
									<h4 class="modal-title">Filtros

									</h4>
									<button type="button" class="close" data-dismiss="modal" aria-label="Close">
										<span aria-hidden="true">&times;</span>
									</button>
								</div>
								<div class="modal-body">
									<div class="card">
										<div class="row">
											<div class="col-6">
												<div class="">
													<label for="dtSaidaDeA">Data De:</label>
													<div class="relative">
														<input type="date" max="2500-12-31" value="1200-01-01" max="2500-12-31" class="input-default focus form-control validate" id="dtSaidaDeA" name="dtSaidaDeA">
													</div>
												</div>
											</div>
											<div class="col-6">
												<div class="">
													<label for="dtSaidaAteA">Até:</label>
													<div class="relative">
														<input type="date" max="2500-12-31" value="2500-12-01" max="2500-12-31" class="input-default focus form-control validate" id="dtSaidaAteA" name="dtSaidaAteA">
													</div>
												</div>
											</div>

											<div class="col-6">
												<label data-error="wrong" data-success="right" for="txtEmpresaSaidaA">Empresa Saída:</label>
												<div class="input-group">
													<!-- <input type="text" class="input-default focus form-control" id="txtEmpresaSaidaA" name="txtEmpresaSaidaA" class="form-control" placeholder="Empresa Saída"> -->
													<select class="js-example-programmatic js-states form-control" id="txtEmpresaSaidaA" name="txtEmpresaSaidaA" multiple="multiple">
													</select>
													<div class="input-group-append">
														<button class="btn bg-danger" id="btnEmpresaSaidaA" name="btnEmpresaSaidaA" data-button="absolute" type="button">
															<i class="m-0 p-0 fas fa-search"></i>
														</button>
														<button class="btn bg-danger" id="btnLimpaEmpresaSaidaA" type="button">
															<i class="m-0 p-0 fas fa-trash"></i>
														</button>
													</div>
												</div>
											</div>

											<div class="col-6">
												<label data-error="wrong" data-success="right" for="txtEmpresaEntradaA">Empresa Entrada:</label>
												<div class="input-group">
													<!-- <input type="text" class="input-default focus form-control" id="txtEmpresaEntradaA" name="txtEmpresaEntradaA" class="form-control" placeholder="Empresa Entrada"> -->
													<select class="js-example-programmatic js-states form-control" id="txtEmpresaEntradaA" name="txtEmpresaEntradaA" multiple="multiple">
													</select>
													<div class="input-group-append">
														<button class="btn bg-danger" id="btnEmpresaEntradaA" name="btnEmpresaEntradaA" data-button="absolute" type="button">
															<i class="m-0 p-0 fas fa-search"></i>
														</button>
														<button class="btn bg-danger" id="btnLimpaEmpresaEntradaA" type="button">
															<i class="m-0 p-0 fas fa-trash"></i>
														</button>
													</div>
												</div>
											</div>
											<div class="col-3">
												<label data-error="wrong" data-success="right" for="txtDocumentoPesquisaA">Documento: </label>
												<div class="relative">
													<div class="input-group">
														<input type="text" class="input-default focus form-control form-control" id="txtDocumentoPesquisaA" name="txtDocumentoPesquisaA" placeholder="Documento">
													</div>
												</div>
											</div>
											<div class="col-3">
												<label data-error="wrong" data-success="right" for="txtNotaFiscalPesquisaA">Nota Fiscal:</label>
												<div class="input-group">
													<!-- <input type="text" class="input-default focus form-control" id="txtNotaFiscalPesquisaA" name="txtNotaFiscalPesquisaA" class="form-control" placeholder="Nota Fiscal"> -->
													<select class="js-example-programmatic js-states form-control" id="txtNotaFiscalPesquisaA" name="txtNotaFiscalPesquisaA" multiple="multiple">
													</select>
													<div class="input-group-append">
														<button class="btn bg-danger" id="btnNotaFiscalPesquisaA" name="btnNotaFiscalPesquisaA" data-button="absolute" type="button">
															<i class="m-0 p-0 fas fa-search"></i>
														</button>
														<button class="btn bg-danger" id="btnLimpaNotaFiscalPesquisaA" type="button">
															<i class="m-0 p-0 fas fa-trash"></i>
														</button>
													</div>
												</div>
											</div>
											<div class="col-3">
												<div class="group-default">
													<label for="txtStatusConfEA">Status Conf:</label>
													<div class="relative">
														<select id="txtStatusConfEA" name="txtStatusConfEA" class="input-default focus form-control validate">
															<option value="" selected>Todos</option>
															<option value="P">Pendente</option>
															<option value="R">Rejeitada</option>
															<option value="F">Parcial</option>
															<option value="S">Conferida</option>
														</select>
													</div>
												</div>
											</div>
											<div class="col-3">
												<div class="group-default">
													<label for="txtStatusEnvioEA">Status Envio:</label>
													<div class="relative">
														<select id="txtStatusEnvioEA" name="txtStatusEnvioEA" class="input-default focus form-control validate">
															<option value="S">Enviado</option>
															<option value="C">Cancelado</option>
														</select>
													</div>
												</div>
											</div>
											<div class="col-4">
												<label data-error="wrong" data-success="right" for="txtMaterialA">Material:</label>
												<div class="input-group">
													<!-- <input type="text" class="input-default focus form-control" id="txtMaterialA" name="txtMaterialA" placeholder="Material"> -->
													<select class="js-example-programmatic js-states form-control" id="txtMaterialA" name="txtMaterialA" multiple="multiple">
													</select>
													<div class="input-group-append">
														<button class="btn bg-danger" id="btnMaterialA" name="btnMaterialA" data-button="absolute" type="button">
															<i class="m-0 p-0 fas fa-search"></i>
														</button>
														<button class="btn bg-danger" id="btnLimpaMaterialA" type="button">
															<i class="m-0 p-0 fas fa-trash"></i>
														</button>
													</div>
												</div>
											</div>
											<div class="col-4">
												<label data-error="wrong" data-success="right" for="txtCorA">Cor:</label>
												<div class="input-group">
													<!-- <input type="text" class="input-default focus form-control" id="txtCorA" name="txtCorA" placeholder="Cor"> -->
													<select class="js-example-programmatic js-states form-control" id="txtCorA" name="txtCorA" multiple="multiple">
													</select>
													<div class="input-group-append">
														<button class="btn bg-danger" id="btnCorA" name="btnCorA" data-button="absolute" type="button">
															<i class="m-0 p-0 fas fa-search"></i>
														</button>
														<button class="btn bg-danger" id="btnLimpaCorA" type="button">
															<i class="m-0 p-0 fas fa-trash"></i>
														</button>
													</div>
												</div>
											</div>
											<div class="col-4">
												<label data-error="wrong" data-success="right" for="txtQualidadeA">Qualidade:</label>
												<div class="input-group">
													<!-- <input type="text" class="input-default focus form-control validate" id="txtQualidadeA" name="txtQualidadeA" placeholder="Qualidade"> -->
													<select class="js-example-programmatic js-states form-control" id="txtQualidadeA" name="txtQualidadeA" multiple="multiple">
													</select>
													<div class="input-group-append">
														<button class="btn bg-danger" id="btnQualidadeA" name="btnQualidadeA" data-button="absolute" type="button">
															<i class="m-0 p-0 fas fa-search"></i>
														</button>
														<button class="btn bg-danger" id="btnLimpaQualidadeA" type="button">
															<i class="m-0 p-0 fas fa-trash"></i>
														</button>
													</div>
												</div>
											</div>
											<div class="col-4">
												<label data-error="wrong" data-success="right" for="txtLoteA">Lote:</label>
												<div class="input-group">
													<!-- <input type="text" class="input-default focus form-control" id="txtLoteA" name="txtLoteA" placeholder="Lote"> -->
													<select class="js-example-programmatic js-states form-control" id="txtLoteA" name="txtLoteA" multiple="multiple">
													</select>
													<div class="input-group-append">
														<button class="btn bg-danger" id="btnLoteA" name="btnLoteA" data-button="absolute" type="button">
															<i class="m-0 p-0 fas fa-search"></i>
														</button>
														<button class="btn bg-danger" id="btnLimpaLoteA" type="button">
															<i class="m-0 p-0 fas fa-trash"></i>
														</button>
													</div>
												</div>
											</div>
											<div class="col-4">
												<label data-error="wrong" data-success="right" for="txtLoteInternoA">Lote Interno:</label>
												<div class="input-group">
													<!-- <input type="text" class="input-default focus form-control" id="txtLoteInternoA" name="txtLoteInternoA" placeholder="Lote Interno"> -->
													<select class="js-example-programmatic js-states form-control" id="txtLoteInternoA" name="txtLoteInternoA" multiple="multiple">
													</select>
													<div class="input-group-append">
														<button class="btn bg-danger" id="btnLoteInternoA" name="btnLoteInternoA" data-button="absolute" type="button">
															<i class="m-0 p-0 fas fa-search"></i>
														</button>
														<button class="btn bg-danger" id="btnLimpaLoteInternoA" type="button">
															<i class="m-0 p-0 fas fa-trash"></i>
														</button>
													</div>
												</div>
											</div>
											<div class="col-4">
												<label data-error="wrong" data-success="right" for="txtTonalidadeA">Tonalidade:</label>
												<div class="input-group">
													<!-- <input type="text" class="input-default focus form-control" id="txtTonalidadeA" name="txtTonalidadeA" placeholder="Tonalidade"> -->
													<select class="js-example-programmatic js-states form-control" id="txtTonalidadeA" name="txtTonalidadeA" multiple="multiple">
													</select>
													<div class="input-group-append">
														<button class="btn bg-danger" id="btnTonalidadeA" name="btnTonalidadeA" data-button="absolute" type="button">
															<i class="m-0 p-0 fas fa-search"></i>
														</button>
														<button class="btn bg-danger" id="btnLimpaTonalidadeA" type="button">
															<i class="m-0 p-0 fas fa-trash"></i>
														</button>
													</div>
												</div>
											</div>
											<div class="col-6">
												<label for="txtDepositoSaida">Depósito Saída:</label>
												<div class="input-group">
													<!-- <input type="text" class="input-default focus form-control" id="txtDepositoSaidaA" name="txtDepositoSaidaA" placeholder="Depósito Saída"> -->
													<select class="js-example-programmatic js-states form-control" id="txtDepositoSaidaA" name="txtDepositoSaidaA" multiple="multiple">
													</select>
													<div class="input-group-append">
														<button class="btn bg-danger" id="btnDepositoSaidaA" name="btnDepositoSaidaA" data-button="absolute" type="button">
															<i class="m-0 p-0 fas fa-search"></i>
														</button>
														<button class="btn bg-danger" id="btnLimpaDepositoSaidaA" type="button">
															<i class="m-0 p-0 fas fa-trash"></i>
														</button>
													</div>
												</div>
											</div>
											<div class="col-6">
												<label for="txtDepositoEntrada">Depósito Entrada:</label>
												<div class="input-group">
													<!-- <input type="text" class="input-default focus form-control" id="txtDepositoEntradaA" name="txtDepositoEntradaA" placeholder="Depósito Entrada"> -->
													<select class="js-example-programmatic js-states form-control" id="txtDepositoEntradaA" name="txtDepositoEntradaA" multiple="multiple">
													</select>
													<div class="input-group-append">
														<button class="btn bg-danger" id="btnDepositoEntradaA" name="btnDepositoEntradaA" data-button="absolute" type="button">
															<i class="m-0 p-0 fas fa-search"></i>
														</button>
														<button class="btn bg-danger" id="btnLimpaDepositoEntradaA" type="button">
															<i class="m-0 p-0 fas fa-trash"></i>
														</button>
													</div>
												</div>
											</div>
										</div>
									</div>
								</div>
								<div class="modal-footer pl-0">
									<div class="col-md-8 col-sm-8 col-12 d-flex justify-content-end align-items-end pr-0">
										<div class="d-flex">
											<button class="btn btn-primary btn-sisp mr-2" id="btnLimparFiltrosA" style="background-color: #B22222; border-color: #B22222">
												<span class="fas fa-trash"></span> Limpar Filtros
											</button>
											<button id="btnConsultarA" class="btn btn-primary btn-sisp" type="button">
												<span class="fas fa-search"></span> Consultar
											</button>
										</div>
									</div>
								</div>
							</div>
						</div>
					</div>

					<div class="card">
						<nav>
							<div class="nav nav-tabs justify-content-start" id="nav-tab" role="tablist" style="text-decoration: none">
								<a class="nav-link abaLink active" id="tabAcesso" data-toggle="tab" href="#divAcesso" role="tab" aria-controls="divAcesso" aria-selected="false">Acesso</a>
								<a class="nav-link abaLink" id="tabEnvioMercadorias" data-toggle="tab" href="#divEnvioMercadorias" role="tab" aria-controls="divEnvioMercadorias" aria-selected="false">Envio de Mercadorias</a>
								<a class="nav-link abaLink" id="tabRecebimento" data-toggle="tab" href="#divRecebimento" role="tab" aria-controls="divRecebimento" aria-selected="true">Recebimento / Conferência</a>
							</div>
						</nav>
						<div class="modal-body">
							<div class="tab-content" id="nav-tabContent">
								<div class="tab-pane fade show active" id="divAcesso" role="tabpanel" aria-labelledby="tabAcesso">
									<fieldset>
										<div class="row">
											<div class="col-12">
												<div class="buttons">
													<button class="btn btn-success btn-sisp" id="btnFiltros" type="button"><span class="fas fa-filter"></span> Filtros</button>
													<button id="btnImprimir" class="btn-sisp btn btn-danger"><i class="fas fa-print"></i> Imprimir</button>
												</div>
											</div>
										</div>
										<div class="card-body" id="divTabelaAcessoMercadorias">
											<div class="card">
												<div class="col-sm-12 table-responsive">
													<table id="tabelaAcessoMercadorias" style="width: 100%;" class="table table-select table-hover" width="100%">
														<thead>
														</thead>
													</table>
												</div>
											</div>
										</div>
									</fieldset>
								</div>
								<div class="tab-pane fade" id="divEnvioMercadorias" role="tabpanel" aria-labelledby="tabEnvioMercadorias">
									<div class="card-body pb-0">
										<div class="row">
											<div class="col-12">
												<h5><b>Notas Enviadas</b></h5>
											</div>
										</div>
										<fieldset class="form border-Field mb-0 pb-0">
											<div class="card-body">
												<div class="row pt-2">
													<div class="col-sm-12 col-md-12 col-lg-2 form-group">
														<label data-error="wrong" data-success="right" for="dtEnvioDe">Envio de/até: </label>
														<div class="relative">
															<div class="input-group">
																<input type="date" class="input-default focus form-control" id="dtEnvioDe" value="1200-01-01" name="dtEnvioDe" class="form-control">
																<input type="date" class="input-default focus form-control" id="dtEnvioAte" value="2500-12-31" name="dtEnvioAte" class="form-control">
															</div>
														</div>
													</div>
													<div class="col-sm-12 col-md-12 col-lg-3">
														<label data-error="wrong" data-success="right" for="txtEmpresaRecebimento">Empresa:</label>
														<div class="input-group">
															<input type="text" class="input-default focus form-control" id="txtEmpresaRecebimento" name="txtEmpresaRecebimento" class="form-control" placeholder="Empresa">
															<div class="input-group-append">
																<button class="btn bg-danger" id="btnEmpresaRecebimento" name="btnEmpresaRecebimento" data-button="absolute" type="button">
																	<i class="m-0 p-0 fas fa-search"></i>
																</button>
																<button class="btn bg-danger" id="btnLimpaEmpresaRecebimento" type="button">
																	<i class="m-0 p-0 fas fa-trash"></i>
																</button>
															</div>
														</div>
													</div>
													<div class="col-sm-12 col-md-12 col-lg-2">
														<label data-error="wrong" data-success="right" for="txtDocumentoPesquisa">Documento: </label>
														<div class="relative">
															<div class="input-group">
																<input type="text" class="input-default focus form-control form-control" id="txtDocumentoPesquisa" name="txtDocumentoPesquisa" placeholder="Documento">
															</div>
														</div>
													</div>
													<div class="col-sm-12 col-md-12 col-lg-2">
														<label data-error="wrong" data-success="right" for="txtNotaFiscalPesquisa">Nota Fiscal:</label>
														<div class="input-group">
															<input type="text" class="input-default focus form-control" id="txtNotaFiscalPesquisa" name="txtNotaFiscalPesquisa" class="form-control" placeholder="Nota Fiscal">
															<div class="input-group-append">
																<button class="btn bg-danger" id="btnNotaFiscalPesquisa" name="btnNotaFiscalPesquisa" data-button="absolute" type="button">
																	<i class="m-0 p-0 fas fa-search"></i>
																</button>
																<button class="btn bg-danger" id="btnLimpaNotaFiscalPesquisa" type="button">
																	<i class="m-0 p-0 fas fa-trash"></i>
																</button>
															</div>
														</div>
													</div>
													<div class="col-sm-12 col-md-12 col-lg-1">
														<div class="form-group group-default pl-0">
															<label for="txtStatusConfE">Status Conf:</label>
															<div class="relative">
																<select id="txtStatusConfE" name="txtStatusConfE" class="input-default focus form-control validate">
																	<option value="" selected>Todos</option>
																	<option value="P">Pendente</option>
																	<option value="R">Rejeitada</option>
																	<option value="F">Parcial</option>
																	<option value="S">Conferida</option>
																</select>
															</div>
														</div>
													</div>
													<div class="col-sm-12 col-md-12 col-lg-1">
														<div class="form-group group-default pl-0">
															<label for="txtStatusEnvioE">Status Envio:</label>
															<div class="relative">
																<select id="txtStatusEnvioE" name="txtStatusEnvioE" class="input-default focus form-control validate">
																	<option value="S">Enviado</option>
																	<option value="C">Cancelado</option>
																</select>
															</div>
														</div>
													</div>
													<div class="ml-auto" style="margin-top: 26px;">
														<input type="button" id="btnConsultarEnviadas" style="font-size:15px;" class="btn btn-primary btn-lg action-button btn-sisp" value="Consultar">
													</div>
													<div class="col-sm-12 table-responsive">
														<table id="tabelaNotasEnviadas" style="width: 100%; min-height: 20vh" class="table table-sm table-select table-hover" width="100%">
															<thead>
															</thead>
														</table>
													</div>
												</div>
											</div>
										</fieldset>
									</div>

									<div class="card-body">
										<div class="row">
											<div class="col-12">
												<h5><b>Envio</b></h5>
											</div>
										</div>
										<fieldset class="form border-Field mb-0 pb-0">
											<div class="card-body">
												<div class="row">
													<div class="col-sm-12 col-md-12 col-lg-1">
														<label data-error="wrong" data-success="right" for="txtDocumento">Documento: *</label>
														<div class="input-group">
															<input type="text" class="input-default focus form-control" id="txtDocumento" name="txtDocumento" class="form-control" placeholder="Documento">
														</div>
													</div>
													<div class="col-sm-12 col-md-12 col-lg-3">
														<label data-error="wrong" data-success="right" for="txtEmpresaSaida">Empresa Destino: *</label>
														<div class="input-group">
															<input type="text" class="input-default focus form-control" id="txtEmpresaSaida" name="txtEmpresaSaida" class="form-control" placeholder="Empresa">
															<div class="input-group-append">
																<button class="btn bg-danger" id="btnEmpresaSaida" name="btnEmpresaSaida" data-button="absolute" type="button">
																	<i class="m-0 p-0 fas fa-search"></i>
																</button>
																<button class="btn bg-danger" id="btnLimpaEmpresaSaida" type="button">
																	<i class="m-0 p-0 fas fa-trash"></i>
																</button>
															</div>
														</div>
													</div>
													<div class="col-sm-12 col-md-12 col-lg-3 form-group">
														<label for="txtDepositoSaida">Depósito Saída: *</label>
														<div class="input-group">
															<input type="text" class="input-default focus form-control controlaDepositoSaida" id="txtDepositoSaida" name="txtDepositoSaida" placeholder="Depósito Saída">
															<div class="input-group-append">
																<button class="btn bg-danger controlaDepositoSaida" id="btnDepositoSaida" name="btnDepositoSaida" data-button="absolute" type="button">
																	<i class="m-0 p-0 fas fa-search"></i>
																</button>
																<button class="btn bg-danger controlaDepositoSaida" id="btnLimpaDepositoSaida" type="button">
																	<i class="m-0 p-0 fas fa-trash"></i>
																</button>
															</div>
														</div>
													</div>
													<div class="col-sm-12 col-md-12 col-lg-5 form-group">
														<label data-error="wrong" class="labelGeral" data-success="right" for="txtTipoMovSaida">Tipo Movimento Saída *</label>
														<div class="input-group">
															<input type="text" class="input-default focus form-control validate" required id="txtTipoMovSaida" name="txtTipoMovSaida" placeholder="Tipo Movimento Saída">
															<div class="input-group-append">
																<button class="btn bg-danger" id="btnTipoMov" name="btnTipoMov" data-button="absolute" type="button">
																	<i class="m-0 p-0 fas fa-search"></i>
																</button>
																<button class="btn bg-danger" id="btnLimparTipoMov" type="button">
																	<i class="m-0 p-0 fas fa-trash"></i>
																</button>
															</div>
														</div>
													</div>
												</div>
												<div class="row">
													<div class="form-group col-sm-12 col-md-12 col-lg-3">
														<label data-error="wrong" data-success="right" for="txtMaterial">Material:</label>
														<div class="input-group">
															<input type="text" class="input-default focus form-control controlaDisabled" disabled required id="txtMaterial" name="txtMaterial" placeholder="Material">
															<div class="input-group-append">
																<button class="btn bg-danger controlaDisabled" id="btnMaterial" disabled name="btnMaterial" data-button="absolute" type="button">
																	<i class="m-0 p-0 fas fa-search"></i>
																</button>
																<button class="btn bg-danger controlaDisabled" disabled id="btnLimpaMaterial" type="button">
																	<i class="m-0 p-0 fas fa-trash"></i>
																</button>
															</div>
														</div>
													</div>
													<div class="form-group col-sm-12 col-md-12 col-lg-3">
														<label data-error="wrong" data-success="right" for="txtCor">Cor:</label>
														<div class="input-group">
															<input type="text" class="input-default focus form-control controlaDisabled" disabled required id="txtCor" name="txtCor" placeholder="Cor">
															<div class="input-group-append">
																<button class="btn bg-danger controlaDisabled" disabled id="btnCor" name="btnCor" data-button="absolute" type="button">
																	<i class="m-0 p-0 fas fa-search"></i>
																</button>
																<button class="btn bg-danger controlaDisabled" disabled id="btnLimpaCor" type="button">
																	<i class="m-0 p-0 fas fa-trash"></i>
																</button>
															</div>
														</div>
													</div>
													<div class="form-group col-sm-12 col-md-12 col-lg-2">
														<label data-error="wrong" data-success="right" for="txtQualidade">Qualidade:</label>
														<div class="input-group">
															<input type="text" class="input-default focus form-control validate controlaDisabled" disabled required id="txtQualidade" name="txtQualidade" placeholder="Qualidade">
															<div class="input-group-append">
																<button class="btn bg-danger controlaDisabled" disabled id="btnQualidade" name="btnQualidade" data-button="absolute" type="button">
																	<i class="m-0 p-0 fas fa-search"></i>
																</button>
																<button class="btn bg-danger controlaDisabled" disabled id="btnLimpaQualidade" type="button">
																	<i class="m-0 p-0 fas fa-trash"></i>
																</button>
															</div>
														</div>
													</div>
													<div class="form-group col-sm-12 col-md-12 col-lg-2">
														<label data-error="wrong" data-success="right" for="txtLote">Lote:</label>
														<div class="input-group">
															<input type="text" class="input-default focus form-control controlaDisabled" disabled required id="txtLote" name="txtLote" placeholder="Lote">
															<div class="input-group-append">
																<button class="btn bg-danger controlaDisabled" disabled id="btnLote" name="btnLote" data-button="absolute" type="button">
																	<i class="m-0 p-0 fas fa-search"></i>
																</button>
																<button class="btn bg-danger controlaDisabled" disabled id="btnLimpaLote" type="button">
																	<i class="m-0 p-0 fas fa-trash"></i>
																</button>
															</div>
														</div>
													</div>
													<div class="ml-auto mr-3" style="margin-top: 26px;">
														<input type="button" id="btnConsultar" style="font-size:15px;" class="btn btn-primary btn-lg action-button btn-sisp" value="Adicionar">
													</div>
												</div>
												<div class="row">
													<div class="form-group col-sm-12 col-md-12 col-lg-4" id="divBarra">
														<label data-error="wrong" class="labelGeral" data-success="right" id="labelBarras" for="txtBarra">Barra:</label>
														<div class="input-group">
															<input type="text" class="input-default form-control" id="txtBarra" name="txtBarra" placeholder="Barra">
															<div class="input-group-append">
																<button class="btn bg-danger" id="btnMenosOuMais" data-button="absolute" type="button" data-estorno="false">
																	<i class="m-0 p-0 fas fa-plus"></i>
																</button>
															</div>
															<button title="Bipar com câmera" type="button" class="btn bg-danger" data-button="absolute" type="button" id="btnCamera">
																<i class="fas fa-camera"></i>
															</button>
														</div>
													</div>
												</div>
												<div class="col-sm-12 table-responsive">
													<table id="tabelaEnvio" class="table table-sm table-select table-hover" width="100%">
														<thead>
														</thead>
													</table>
												</div>
											</div>
											<div class="col-sm-6 col-md-6 col-lg-1">
												<label data-error="wrong" data-success="right" for="txtQuantidadeItens">Qtde Enviada:</label>
												<div class="input-group">
													<input type="text" class="input-default focus form-control text-right" id="txtQuantidadeItens" value="0" readonly name="txtQuantidadeItens" class="form-control" placeholder="Quantidade Total de Itens" title="Quantidade Total de Itens">
												</div>
											</div>
											<div class="col-sm-6 col-md-6 col-lg-1">
												<label data-error="wrong" data-success="right" for="txtQuantidadeVolumes">Volumes Enviados:</label>
												<div class="input-group">
													<input type="text" class="input-default focus form-control text-right" id="txtQuantidadeVolumes" value="0" readonly name="txtQuantidadeVolumes" class="form-control" placeholder="Quantidade de volumes" title="Quantidade de volumes">
												</div>
											</div>
											<!-- <div class="float-right pl-2 mt-3">
												<input id="btnGravarTransferencia" type="button" style="font-size:15px;" class="btn btn-danger btn-lg action-button btn-sisp mt-2" value="Gravar">
											</div> COMENTADO PARA EVITAR QUE O CLIENTE GERA SEM CRIAR NOTA FISCAL, FUTURAMENTE CRIAR UM PARAMETRO PARA OBRIGAR -->
											<div class="float-right pl-2 mt-3">
												<input id="btnGerarNFe" type="button" style="font-size:15px;" class="btn btn-danger btn-lg action-button btn-sisp mt-2" value="Gerar NFe">
											</div>
										</fieldset>
									</div>

									<div class="card-body d-none">
										<div class="row">
											<div class="col-12">
												<h5><b>Itens Enviados</b></h5>
											</div>
										</div>
										<div class="row pt-2">
											<div class="col-sm-12 table-responsive">
												<table id="tabelaItensEnviados" class="table table-sm table-select table-hover" width="100%">
													<thead>
													</thead>
												</table>
											</div>
										</div>
									</div>
								</div>

								<div class="tab-pane fade show" id="divRecebimento" role="tabpanel" aria-labelledby="tabRecebimento">
									<div class="card-body">
										<div class="row">
											<div class="col-12">
												<h5><b>Notas</b></h5>
											</div>
										</div>
										<div class="row">
											<div class="col-md-12 col-sm-12 col-lg-2">
												<label data-error="wrong" data-success="right" for="dtDe">Data de/até: </label>
												<div class="relative">
													<div class="input-group">
														<input type="date" class="input-default focus form-control" id="dtDe" value="1200-01-01" name="dtDe" class="form-control">
														<input type="date" class="input-default focus form-control" id="dtAte" value="2500-12-31" name="dtAte" class="form-control">
													</div>
												</div>
											</div>
											<div class="col-sm-12 col-md-12 col-lg-3">
												<label data-error="wrong" data-success="right" for="txtEmpresaEnvio">Empresa:</label>
												<div class="input-group">
													<input type="text" class="input-default focus form-control" id="txtEmpresaEnvio" name="txtEmpresaEnvio" class="form-control" placeholder="Empresa">
													<div class="input-group-append">
														<button class="btn bg-danger" id="btnEmpresaEnvio" name="btnEmpresaEnvio" data-button="absolute" type="button">
															<i class="m-0 p-0 fas fa-search"></i>
														</button>
														<button class="btn bg-danger" id="btnLimpaEmpresaEnvio" type="button">
															<i class="m-0 p-0 fas fa-trash"></i>
														</button>
													</div>
												</div>
											</div>
											<div class="col-sm-12 col-md-12 col-lg-2">
												<label data-error="wrong" data-success="right" for="txtDocumentoPesquisaConf">Documento: </label>
												<div class="relative">
													<div class="input-group">
														<input type="text" class="input-default focus form-control form-control" id="txtDocumentoPesquisaConf" name="txtDocumentoPesquisaConf" placeholder="Documento">
													</div>
												</div>
											</div>
											<div class="col-sm-12 col-md-12 col-lg-2">
												<label data-error="wrong" data-success="right" for="txtNotaFiscalPesquisaConf">Nota Fiscal:</label>
												<div class="input-group">
													<input type="text" class="input-default focus form-control" id="txtNotaFiscalPesquisaConf" name="txtNotaFiscalPesquisaConf" class="form-control" placeholder="Nota Fiscal">
													<div class="input-group-append">
														<button class="btn bg-danger" id="btnNotaFiscalPesquisaConf" name="btnNotaFiscalPesquisaConf" data-button="absolute" type="button">
															<i class="m-0 p-0 fas fa-search"></i>
														</button>
														<button class="btn bg-danger" id="btnLimpaNotaFiscalPesquisaConf" type="button">
															<i class="m-0 p-0 fas fa-trash"></i>
														</button>
													</div>
												</div>
											</div>
											<div class="col-sm-12 col-md-12 col-lg-1">
												<div class="form-group group-default pl-0">
													<label for="txtStatusConf">Status Conf: </label>
													<div class="relative">
														<select id="txtStatusConf" name="txtStatusConf" class="input-default focus form-control validate">
															<option value="" selected>Todos</option>
															<option value="P">Pendente</option>
															<option value="R">Rejeitada</option>
															<option value="F">Parcial</option>
															<option value="S">Conferida</option>
														</select>
													</div>
												</div>
											</div>
											<div class="col-sm-12 col-md-12 col-lg-1">
												<div class="form-group group-default">
													<label for="txtStatusEnvio">Status Envio: </label>
													<div class="relative">
														<select id="txtStatusEnvio" name="txtStatusEnvio" class="input-default focus form-control validate">
															<option value="S">Enviado</option>
															<option value="C">Cancelado</option>
														</select>
													</div>
												</div>
											</div>
											<div class="col-sm-12 col-md-6 col-lg-1" style="margin-top: 2px;">
												<div class="mt-4">
													<input type="button" id="btnBuscarNotas" style="font-size:15px;" class="btn btn-primary btn-lg action-button btn-sisp" value="Consultar">
												</div>
											</div>
										</div>
										<div class="row pt-2">
											<div class="col-sm-12 table-responsive">
												<table id="tabelaNotas" style="width: 100%; min-height: 20vh" class="table table-sm table-select table-hover" width="100%">
													<thead>
													</thead>
												</table>
											</div>
										</div>
									</div>
									<div class="card-body">
										<div class="row">
											<div class="col-12">
												<div class="row">
													<div class="col-sm-12 col-md-12 col-lg-3">
														<div class="form-group group-default pl-0">
															<label for="selectConferencia">Tipo de Conferência:</label>
															<div class="relative">
																<select id="selectConferencia" name="selectConferencia" class="input-default focus form-control validate">
																	<option value="Rejeitar">Rejeitar</option>
																	<option value="ConfManual">Conferir Manual</option>
																	<option value="ConfBipando">Conferir Bipando</option>
																	<option value="ConfTudo">Conferir Tudo</option>
																</select>
															</div>
														</div>
													</div>
													<div class="col-sm-12 col-md-6 col-lg-1 form-group" style="margin-top: 2px;">
														<div class="mt-4">
															<input type="button" id="btnConferir" style="font-size:15px;" class="btn btn-secondary btn-lg action-button btn-sisp" value="Conferir">
														</div>
													</div>
												</div>
											</div>
											<div class="col-12">
												<h5><b>Itens</b></h5>
											</div>

											<fieldset class="form border-Field mb-0 pb-0 col-12">
												<div class="card-body row">
													<div class="col-lg-1 col-12">
														<label data-error="wrong" data-success="right" for="txtDocumentoEntrada">Documento: *</label>
														<div class="input-group">
															<input type="text" class="input-default focus form-control" id="txtDocumentoEntrada" name="txtDocumentoEntrada" class="form-control" placeholder="Documento">
														</div>
													</div>
													<div class="col-lg-3 col-12">
														<label data-error="wrong" data-success="right" for="txtEmpresaEntrada">Empresa:</label>
														<div class="input-group">
															<input type="text" class="input-default focus form-control" id="txtEmpresaEntrada" name="txtEmpresaEntrada" class="form-control" placeholder="Empresa" disabled>
														</div>
													</div>
													<div class="col-lg-3 col-12">
														<label for="txtDepositoEntrada">Depósito Entrada: *</label>
														<div class="input-group">
															<input type="text" class="input-default focus form-control" id="txtDepositoEntrada" name="txtDepositoEntrada" placeholder="Depósito Entrada">
															<div class="input-group-append">
																<button class="btn bg-danger" id="btnDepositoEntrada" name="btnDepositoEntrada" data-button="absolute" type="button">
																	<i class="m-0 p-0 fas fa-search"></i>
																</button>
																<button class="btn bg-danger" id="btnLimpaDepositoEntrada" type="button">
																	<i class="m-0 p-0 fas fa-trash"></i>
																</button>
															</div>
														</div>
													</div>
													<div class="col-lg-5 col-12 form-group">
														<label data-error="wrong" class="labelGeral" data-success="right" for="txtTipoMovEntrada">Tipo Movimento Entrada *</label>
														<div class="input-group">
															<input type="text" class="input-default focus form-control validate" required id="txtTipoMovEntrada" name="txtTipoMovEntrada" placeholder="Tipo Movimento Entrada">
															<div class="input-group-append">
																<button class="btn bg-danger" id="btnTipoMovEntrada" name="btnTipoMovEntrada" data-button="absolute" type="button">
																	<i class="m-0 p-0 fas fa-search"></i>
																</button>
																<button class="btn bg-danger" id="btnLimparTipoMovEntrada" type="button">
																	<i class="m-0 p-0 fas fa-trash"></i>
																</button>
															</div>
														</div>
													</div>
													<div class="col-sm-12 table-responsive">
														<table id="tabelaItens" class="table table-sm table-select table-hover" width="100%">
															<thead>
															</thead>
															<tfoot>
															</tfoot>
														</table>
													</div>
												</div>
											</fieldset>
										</div>
									</div>

									<fieldset class="form mb-0 pb-0">
										<div class="form-group col-lg-4 col-md-12 col-sm-12 mr-auto" id="CampoConferencia">
											<label data-error="wrong" data-success="right" for="txtConferencia">Conferir lotes:</label>
											<div class="input-group">
												<input type="text" class="input-default focus form-control" required id="txtConferencia" name="txtConferencia" placeholder="Informe as barras para conferência">
												<div id="PesquisabarraProduto">
													<div class="input-group-append">
														<button class="btn bg-danger" id="btnBarraProduto" name="btnBarraProduto" data-button="absolute" type="button">
															<i class="m-0 p-0 fas fa-search"></i>
														</button>
													</div>
												</div>
											</div>
										</div>

										<div class="form-group col-lg-2 col-12" id="CampoConferenciaQtde">
											<div class="row">
												<div class="col-lg-12 col-12">
													<label data-error="wrong" class="labelGeral" data-success="right" for="txtQuantidade">Qtde</label>
													<div class="input-group">
														<input type="number" class="input-default form-control" id="txtQuantidade" name="txtQuantidade" placeholder="Quantidade" value="1">
													</div>
												</div>
											</div>
										</div>

										<div class="col-sm-6 col-md-6 col-lg-2">
											<label data-error="wrong" data-success="right" for="txtQuantidadeBipada">Qtde Conferida:</label>
											<div class="input-group">
												<input type="text" class="input-default focus form-control" id="txtQuantidadeBipada" value="0" readonly name="txtQuantidadeBipada" class="form-control" placeholder="Quantidade Conferida" title="Quantidade total de peças Conferidas">
											</div>
										</div>
										<div class="col-sm-6 col-md-6 col-lg-2">
											<label data-error="wrong" data-success="right" for="txtVolumesConferidos">Volume Conferido:</label>
											<div class="input-group">
												<input type="text" class="input-default focus form-control" id="txtVolumesConferidos" value="0" readonly name="txtVolumesConferidos" class="form-control" placeholder="Volumes Conferidos" title="Volume total de itens conferidos">
											</div>
										</div>
										<div class="col-sm-6 col-md-6 col-lg-2">
											<label data-error="wrong" data-success="right" for="txtQuantidadePendente">Qtde Pendente:</label>
											<div class="input-group">
												<input type="text" class="input-default focus form-control" id="txtQuantidadePendente" value="0" readonly name="txtQuantidadePendente" class="form-control" placeholder="Quantidade Pendente" title="Quantidade total de peças pendentes">
											</div>
										</div>
										<div class="col-sm-6 col-md-6 col-lg-2">
											<label data-error="wrong" data-success="right" for="txtVolumesPendentes">Volume Pendente:</label>
											<div class="input-group">
												<input type="text" class="input-default focus form-control" id="txtVolumesPendentes" value="0" readonly name="txtVolumesPendentes" class="form-control" placeholder="Volumes Conferidos" title="Volume total de itens pendentes">
											</div>
										</div>

										<div class="col-12">
											<div class="float-right pr-2" style="margin-top: 6px;">
												<input id="btnGravarConferencia" type="button" style="font-size:15px;" class="btn btn-danger btn-lg action-button btn-sisp mt-2" value="Gravar">
											</div>
										</div>
									</fieldset>
								</div>
							</div>
						</div>
					</div>
					<div class="modal fade" id="modalFaturarTransferencia" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="z-index: 2">
						<div class="modal-dialog">
							<div class="modal-content">
								<div class="modal-header">
									<h4 id="tituloModalFatura" class="modal-title">Faturar</h4>
									<button type="button" class="close" data-dismiss="modal" aria-label="Close">
										<span aria-hidden="true">&times;</span>
									</button>
								</div>
								<div class="modal-body">
									<div class="row">
										<div class="col-12">
											<label style="margin-bottom: .1rem!important;" data-error="wrong" data-success="right" for="txtCliente">Cliente</label>
											<div class="input-group">
												<input type="text" data-selecionado="false" class="input-default focus form-control" id="txtCliente" name="txtCliente" class="form-control" placeholder="Cliente">
												<div class="input-group-append">
													<button class="btn bg-danger" id="btnCliente" name="btnCliente" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
													<button class="btn bg-danger" id="btnLimpaCliente" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
												</div>
											</div>
										</div>
										<div class="col-12" style="margin-top: 2%">
											<label style="margin-bottom: .1rem!important;" data-error="wrong" data-success="right" for="txtNatureza">Natureza</label>
											<div class="input-group">
												<input type="text" data-selecionado="false" class="input-default focus form-control" id="txtNatureza" name="txtNatureza" class="form-control" placeholder="Natureza">
												<div class="input-group-append">
													<button class="btn bg-danger" id="btnNatureza" name="btnNatureza" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
													<button class="btn bg-danger" id="btnLimpaNatureza" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
												</div>
											</div>
										</div>
										<div class="col-lg-12" style="margin-top: 2%">
											<label data-error="wrong" data-success="right" for="txtOperacao">Operação</label>
											<div class="input-group">
												<input type="text" class="input-default focus form-control" id="txtOperacao" name="txtOperacao" placeholder="Operação">
												<div class="input-group-append">
													<button class="btn bg-danger" id="btnOperacao" name="btnOperacao" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
													<button class="btn bg-danger" id="btnLimpaOperacao" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
												</div>
											</div>
										</div>
									</div>
								</div>
								<div class="modal-footer">
									<div class="row">
										<div class="col-sm-12">
											<button type="button" id="btnConfirmarFatura" class="btn btn-danger"> Confirmar</button>
										</div>
									</div>
								</div>
							</div>
						</div>
					</div>

					<div class="modal fade" id="modalCamera" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
						<div class="modal-dialog modal-xl">
							<div class="modal-content">
								<div class="modal-body">
									<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
									<div id="camera">
										<h1>Leitor Código de Barras</h1>
										<div>
											<div data-barcode-canvas class="barcode-canvas" id="cam"></div>
											<div data-barcode-msg class="barcode-message"></div>
										</div>
									</div>
								</div>
							</div>
						</div>
					</div>

					<div class="modal fade" id="modalVisualizarItens">
						<div class="modal-dialog modal-xl">
							<div class="modal-content">
								<div class="modal-header">
									<h4 class="modal-title">Visualizar Itens</h4>
									<button type="button" class="close" data-dismiss="modal" aria-label="Close">
										<span aria-hidden="true">&times;</span>
									</button>
								</div>
								<div class="modal-body" style="max-height: 500px; overflow-y: auto;">
									<div class="row">
										<div class="col-sm-12 table-responsive" style="overflow: visible">
											<table id="tabelaVisualizarItens" class="table display nowrap" style="width:100%">
												<thead>
												</thead>
												<tbody>
												</tbody>
											</table>
										</div>
									</div>
								</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.255.7.1"></script>
	<script src="dist/js/jquery.maskMoney.min.js?versao=3.255.7.1"></script>

	<script src="plugins/jquery-ui/jquery-ui.min.js?versao=3.255.7.1"></script>

	<script>
		if ($('[type="date"]').prop('type') != 'date') {
			$('[type="date"]').datepicker();
		}
		$.widget.bridge('uibutton', $.ui.button)
	</script>

	<script src="plugins/bootstrap/js/bootstrap.bundle.min.js?versao=3.255.7.1"></script>
	<script src="dist/js/sisplan.js?versao=3.255.7.1"></script>
	<script type="text/javascript" src="utils/funcoes.js?versao=3.255.7.1"></script>
	<script src="dist/js/adminlte.min.js?versao=3.255.7.1"></script>
	<script type="text/javascript" src="dist/js/jquery.dataTables.js?versao=3.255.7.1"></script>
	<script type="text/javascript" src="dist/js/loadingoverlay.min.js?versao=3.255.7.1"></script>
	<script type="text/javascript" src="dist/js/dataTables.bootstrap4.min.js?versao=3.255.7.1"></script>
	<script src="dist/js/dataTables.keyTable.js?versao=3.255.7.1"></script>
	<script src="dist/js/requisicoes.js?versao=3.255.7.1"></script>
	<script src="utils/cookies.js?versao=3.255.7.1"></script>

	<script src="plugins/sweetalert2/sweetalert2.min.js?versao=3.255.7.1"></script>
	<script src="plugins/toastr/toastr.min.js?versao=3.255.7.1"></script>
	<script src="pages/loja/js/rotinas.js?versao=3.255.7.1"></script>
	<script src="dist/js/driver.min.js?versao=3.255.7.1"></script>
	<script type="text/javascript" src="dist/js/sum().js?versao=3.255.7.1"></script>
	<script type="text/javascript" src="config.js?versao=3.255.7.1"></script>
	<script src="plugins/jquery-validation/jquery.validate.min.js?versao=3.255.7.1"></script>
	<script src="plugins/datatables-colreorder/js/dataTables.colReorder.min.js?versao=3.255.7.1"></script>
	<script src="dist/js/quagga.min.js?versao=3.255.7.1"></script>
	<script src="dist/js/instascan.min.js?versao=3.255.7.1"></script>
	<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-scrollTo/2.1.3/jquery.scrollTo.min.js"></script>
	<script src="https://cdn.datatables.net/select/1.5.0/js/dataTables.select.min.js"></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('MERCADORIAS');
			if (!temAcesso.resultado) {
				toastrAcesso(temAcesso, BASE_URI);
				return;
			}

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

			await insereJavaScriptPagina(`pages/mercadorias/js/acesso.js?versao=3.255.7.1`);

		});
	</script>
</body>

</html>