<div class="row" id="<?php $windowid= date('YmdHis'); echo $windowid;?>">
	<form autocomplete='off' class='form-horizontal' id='admin_nueva_res_form'  method='post' action='<?php echo base_url('administracion/guardar_resolucion');?>' data-role="guardado">
		<div class="panel blank-panel">
			<div class="panel-body">
				<!--Ocultos-->
				<div>
					<input type="hidden" id="admin_nueva_res_resolucion_caja" name="admin_nueva_res_resolucion_caja" value="<?php echo $caja;?>">
					<?php if(isset($res)):?>
					<input type="hidden" id="admin_nueva_res_resolucion_id" name="admin_nueva_res_resolucion_id" value="<?php echo $res->id_resolucion;?>">
					<?php endif;?>
				</div>
				<!--Documento-->
				<div class="form-group">
					<label class="col-md-3 control-label">Documento: <i class="required-mark">*</i></label>
					<div class="col-md-9">
						<select class="form-control" id="admin_nueva_res_ducumento" name="admin_nueva_res_ducumento" tabindex="1" required>
							<?php if(!isset($res)):?>
							<option disabled selected>Seleccione uno...</option>
							<?php endif;?>
							<option value="1" <?php if(isset($res) && $res->documento_resolucion==1)echo "selected";?>>Factura</option>
							<option value="2" <?php if(isset($res) && $res->documento_resolucion==2)echo "selected";?>>Comprobante de Cr&eacute;dito Fiscal</option>
							<option value="3" <?php if(isset($res) && $res->documento_resolucion==3)echo "selected";?>>Ticket</option>
							<option value="4" <?php if(isset($res) && $res->documento_resolucion==4)echo "selected";?>>Nota de remisión</option>
							<option value="5" <?php if(isset($res) && $res->documento_resolucion==5)echo "selected";?>>Nota de env&iacute;o</option>
						</select>
					</div>
				</div>
				<div class="form-group">
					<!--Resolucion-->
					<div class="col-md-6">
						<label class="control-label">Resoluci&oacute;n:</label>
						<input type="text" class="form-control" id="admin_nueva_res_resolucion" name="admin_nueva_res_resolucion" value="<?php echo (isset($res)?$res->num_resolucion:"");?>" tabindex="2">
					</div>
					<!--Autorizacion-->
					<div class="col-md-6">
						<label class="control-label">Autorizaci&oacute;n:</label>
						<input type="text" class="form-control" name="admin_nueva_res_autorizacion" value="<?php echo (isset($res)?$res->num_autorizacion:"");?>" tabindex="3">
					</div>
				</div>
				<div class="form-group">
					<!--Fecha-->
					<div class="col-md-6" id="admin_nueva_res_fecha_wrapper">
						<label class="control-label">Fecha Autorizaci&oacute;n:</label>
						<div class="input-group date">
							<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
							<input type="text" class="form-control" name="admin_nueva_res_fecha" value="<?php echo (isset($res)? date("d-m-Y", strtotime($res->fecha_autorizacion)):"");?>" tabindex="4" readonly>
						</div>
					</div>
					<!--Autorizacion-->
					<div class="col-md-6">
						<label class="control-label">Serie Autorizada:<i class="required-mark">*</i></label>
						<input type="text" class="form-control" name="admin_nueva_res_serie" value="<?php echo (isset($res)?$res->serie_autorizada:"");?>" tabindex="4" required>
					</div>
				</div>
				<div class="form-group">
					<!--Desde-->
					<div class="col-md-4">
						<label class="control-label">Desde:<i class="required-mark">*</i></label>
						<input type="number" class="form-control" name="admin_nueva_res_desde" value="<?php echo (isset($res)?$res->tiraje_desde:"");?>" tabindex="5" required>
					</div>
					<!--Hasta-->
					<div class="col-md-4">
						<label class="control-label">Hasta:<i class="required-mark">*</i></label>
						<input type="number" class="form-control" name="admin_nueva_res_hasta" value="<?php echo (isset($res)?$res->tiraje_hasta:"");?>" tabindex="6" required>
					</div>
					<!--Actual-->
					<div class="col-md-4">
						<label class="control-label">Actual:</label>
						<input type="number" class="form-control" name="admin_nueva_res_actual" value="<?php echo (isset($res)?$res->tiraje_actual:"");?>" tabindex="7">
					</div>
				</div>
				<!--Botones-->
				<div class="form-group text-center">
					<button type="button" class="btn btn-danger btn-rounded" onclick="Custombox.close();" tabindex="9">Cancelar</button>
					<button type="submit" class="btn btn-primary btn-rounded" id="admin_nueva_res_guardar_btn" tabindex="8">Guardar serie</button>
				</div>
			</div>
		</div>
	</form>
</div>
<script>
	var administracion_facturacion_caja_nueva_view=new Administracion_facturacion_caja_nueva_view();
	administracion_facturacion_caja_nueva_view.initializeEnviroment("<?php echo base_url();?>","<?php echo $windowid;?>");
</script>