<commit_before><?php
defined('BASEPATH') OR exit('No direct script access allowed');
?>

<!DOCTYPE html>
<html>
<head>
	<?php includeJQuery(); ?>
	<?php includeBootstrap(); ?>

	<script type="text/javascript" src="<?php echo base_url(); ?>includes/js/mainFunctions.js"></script>

	<script type="text/javascript">
		var baseURL = "<?php echo base_url(); ?>";
		<?php if (isset($factura)){ ?>

		var factura = jQuery.parseJSON('<?php echo json_encode($factura); ?>'.replace(/\s+/g,""));

		<?php } ?>
	</script>
	<script type="text/javascript" src="<?php echo base_url(); ?>includes/js/JSControllers/Lectura_factura_ctrl.js"></script>
	<title>JOBS</title>

	<style type="text/css">
		.row-impuesto {
		    border-radius: 7px;
		    background-color: rgb(187, 221, 255);
		    margin-bottom: 6px;
		}

		.data-group {
		    border-bottom: 1px solid #eee;
		    padding-right: 10px;
		    padding-left: 10px;
		    padding-top: 5px;
		    padding-bottom: 5px;
		}

		.data-group:hover {
		    background-color: white !important;
		}

		#sc-data-factura {
			margin-bottom: 15px;
		}

		#sc-data-factura div span {
		    float: right;
		}

		#sc-data-factura div {
		    border-bottom: 1px solid #ddd;
		}

		#sc-data-factura div:hover {
		    background-color: black !important;
		    color: white !important;
		}

		.btn-delete-match:hover {
			cursor: pointer;
		}
	</style>
</head>
<body>
	<?=$menu; ?>
	<?php //print_r($factura); 
	?>

	<div class="container" id="processBar" style="display: none;">
		<div class="row">
			<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
				 <div class="progress">
				  	<div class="progress-bar progress-bar-striped active" role="progressbar" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100" style="width:100%">
				  </div>
				</div>
			</div>
		</div>
	</div>

	<div class="container">
		<div class="row">
			<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
				<form
					class = "form"
					id = "form-submit-factura"
					action = "<?php echo base_url() ?>index.php/Lectura_factura_ctrl/procesarXML"
					method = "post"
					enctype="multipart/form-data"
				>
					<div class="form-group">
						<label>Seleccione el archivo XML que contiene la información de la factura</label>
						<input type="file" name="fileXML" class="form-control">
					</div>

					<div class="form-group">
						<input type="submit" class="form-control btn btn-default" value="Procesar">
					</div>
				</form>
			</div>
		</div>

		<?php if(isset($factura)){ ?>
		<div class="row">
			<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
				<div class="form-group">
					<label>Cliente sugerido</label>
					<div style="text-align: right;"><?php echo $receptor["cliente_sugerido"]; ?></div>
				</div>
				<br>
				<div class="form-group">
					<label>Razón social sugerida</label>
					<div style="text-align: right;" id="razonSocialSugerida" ><?php echo $receptor["razonSocial"]; ?></div>
				</div>
			</div>
			<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
				<div class="form-group">
					<label>Cliente</label>
					<select class="form-control" id="clienteAsociado">
						<option value="-1">Ninguno</option>
						<?php foreach($clientes as $cliente){ ?>
						<option value="<?php echo $cliente->id; ?>">
							<?php echo $cliente->nombre; ?>		
						</option>
						<?php } ?>
					</select>
				</div>
				<div class="form-group">
					<label>Razón social</label>
					<select class="form-control" id="razonSocialAsociada">
						<option value="-1">Ninguna</option>
					</select>
				</div>
			</div>
		</div>
		<div class="row">
			<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12" style="overflow: scroll; width: 100%" >
				<table class="table table-bordered table-hover" id="conceptos-tbl" style="width: 6000px;">
					<thead>
						<th>#</th>
						<th>Match</th>
						<th>Cantidad</th>
						<th>Unidad de medida</th>
						<th>Descripción</th>
						<th>Valor unitario</th>
						<th>Importe</th>
						<th>Precio de lista</th>
						<th>Importe de lista</th>
						<th>Importe total</th>
						<th>Monto</th>
						<th>Textos de posicion</th>
						<th>Impuestos</th>
						<th>Notas</th>
					</thead>
					<tbody>
					<?php 
					$k = -1;
					foreach($factura->conceptos as $c){ 
					$k++;
					?>
					<tr>
						<td id="id"><?php echo $k; ?></td>
						<td id="matchCol">
							<span id="append-section-matchCol" class="append-section-matchCol">
								<div id="clone-match-col" class="clone-match-col">
									<div class="form-group">
										<span class="glyphicon glyphicon-remove btn-delete-match" style="float: right; margin-right: 10px; font-size: 20px;"></span>
									</div>
									<div class="form-group">
										<span id="append-matchCol">
											<label>Fecha de facturación asociada</label><commit_msg>Cambios<commit_after><?php
defined('BASEPATH') OR exit('No direct script access allowed');
?>

<!DOCTYPE html>
<html>
<head>
	<?php includeJQuery(); ?>
	<?php includeBootstrap(); ?>

	<script type="text/javascript" src="<?php echo base_url(); ?>includes/js/mainFunctions.js"></script>

	<script type="text/javascript">
		var baseURL = "<?php echo base_url(); ?>";
		<?php if (isset($factura)){ ?>

		var factura = jQuery.parseJSON('<?php echo json_encode($factura); ?>'.replace(/\s+/g,""));

		<?php } ?>
	</script>
	<script type="text/javascript" src="<?php echo base_url(); ?>includes/js/JSControllers/Lectura_factura_ctrl.js"></script>
	<title>JOBS</title>

	<style type="text/css">
		.row-impuesto {
		    border-radius: 7px;
		    background-color: rgb(187, 221, 255);
		    margin-bottom: 6px;
		}

		.data-group {
		    border-bottom: 1px solid #eee;
		    padding-right: 10px;
		    padding-left: 10px;
		    padding-top: 5px;
		    padding-bottom: 5px;
		}

		.data-group:hover {
		    background-color: white !important;
		}

		#sc-data-factura {
			margin-bottom: 15px;
		}

		#sc-data-factura div span {
		    float: right;
		}

		#sc-data-factura div {
		    border-bottom: 1px solid #ddd;
		}

		#sc-data-factura div:hover {
		    background-color: black !important;
		    color: white !important;
		}

		.btn-delete-match:hover {
			cursor: pointer;
		}
	</style>
</head>
<body>
	<?=$menu; ?>
	<?php //print_r($factura); 
	?>

	<div class="container" id="processBar" style="display: none;">
		<div class="row">
			<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
				 <div class="progress">
				  	<div class="progress-bar progress-bar-striped active" role="progressbar" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100" style="width:100%">
				  </div>
				</div>
			</div>
		</div>
	</div>

	<div class="container">
		<div class="row">
			<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
				<form
					class = "form"
					id = "form-submit-factura"
					action = "<?php echo base_url() ?>index.php/Lectura_factura_ctrl/procesarXML"
					method = "post"
					enctype="multipart/form-data"
				>
					<div class="form-group">
						<label>Seleccione el archivo XML que contiene la información de la factura</label>
						<input type="file" name="fileXML" class="form-control">
					</div>

					<div class="form-group">
						<input type="submit" class="form-control btn btn-default" value="Procesar">
					</div>
				</form>
			</div>
		</div>

		<?php if(isset($factura)){ ?>
		<div class="row">
			<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
				<div class="form-group">
					<label>Cliente sugerido</label>
					<div style="text-align: right;"><?php echo $receptor["cliente_sugerido"]; ?></div>
				</div>
				<br>
				<div class="form-group">
					<label>Razón social sugerida</label>
					<div style="text-align: right;" id="razonSocialSugerida" ><?php echo $receptor["razonSocial"]; ?></div>
				</div>
			</div>
			<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
				<div class="form-group">
					<label>Cliente</label>
					<select class="form-control" id="clienteAsociado">
						<option value="-1">Ninguno</option>
						<?php foreach($clientes as $cliente){ ?>
						<option value="<?php echo $cliente->id; ?>">
							<?php echo $cliente->nombre; ?>		
						</option>
						<?php } ?>
					</select>
				</div>
				<div class="form-group">
					<label>Razón social</label>
					<select class="form-control" id="razonSocialAsociada">
						<option value="-1">Ninguna</option>
					</select>
				</div>
			</div>
		</div>
		<div class="row">
			<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12" style="overflow: scroll; width: 100%" >
				<table class="table table-bordered table-hover" id="conceptos-tbl" style="width: 6000px;">
					<thead>
						<th>#</th>
						<th>Match</th>
						<th>Cantidad</th>
						<th>Unidad de medida</th>
						<th>Descripción</th>
						<th>Valor unitario</th>
						<th>Importe</th>
						<th>Precio de lista</th>
						<th>Importe de lista</th>
						<th>Importe total</th>
						<th>Monto</th>
						<th>Textos de posicion</th>
						<th>Impuestos</th>
						<th>Notas</th>
					</thead>
					<tbody>
					<?php 
					$k = -1;
					foreach($factura->conceptos as $c){ 
					$k++;
					?>
					<tr>
						<td id="id"><?php echo $k; ?></td>
						<td id="matchCol">
							<span id="append-section-matchCol" class="append-section-matchCol">
								<div id="clone-match-col" class="clone-match-col">
									<div class="form-group">
										<button class="btn-delete-match">
											<span 
												class="glyphicon glyphicon-remove" 
												style="float: right; margin-right: 10px; font-size: 20px;"
											>
											</span>
										</button>
									</div>
									<div class="form-group">
										<span id="append-matchCol">
											<label>Fecha de facturación asociada</label>
{'fraction_non_alphanumeric': 0.19069192751235584, 'fraction_numerical': 0.016268533772652388, 'mean_word_length': 2.8315581854043392, 'pattern_counts': {'":': 0, '<': 297, '<?xml version=': 0, '>': 303, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1069865', 'n_tokens_mistral': 4612, 'n_tokens_neox': 3523, 'n_words': 702}