<?php $__env->startSection('content'); ?>
<style type="text/css">
.filterable {
margin-top: 15px;
}
.filterable .panel-heading .pull-right {
margin-top: -20px;
}
.filterable .filters input[disabled] {
background-color: transparent;
border: none;
cursor: auto;
box-shadow: none;
padding: 0;
height: auto;
}
.filterable .filters input[disabled]::-webkit-input-placeholder {
color: #333;
}
.filterable .filters input[disabled]::-moz-placeholder {
color: #333;
}
.filterable .filters input[disabled]:-ms-input-placeholder {
color: #333;
}
</style>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/daterangepicker/daterangepicker.css" />
<div id="page-content">
<div class="content-header">
<div class="header-section">
<h1>
<i class="fa fa-recycle"></i>Costo Reciclable<br><small>Recolectora Metropolitana</small>
</h1>
</div>
</div>
<div class="block">
<div class="block-title">
<h2><strong>Costo de los Reciclables</strong> </h2>
</div>
<div class="panel">
<div class="row">
<div class="col-md-offset-4 col-md-4">
<label>Selecciona el rango de fechas</label>
<div class="input-group">
<div class="input-group-addon">
<i class="fa fa-calendar"></i>
</div>
<input type="text" data-start="" data-end="" name="daterange" class="form-control pull-right" id="date-range">
</div>
</div>
</div>
</div>
<div id="table-reciclable">
</div>
</div>
</div>
<div id="cost-modal" class="modal fade" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">Nuevo Costo Reciclable</h4>
</div>
<div class="modal-body">
<form id="form-actor" method="post" enctype="multipart/form-data" class="form-horizontal form-bordered" onsubmit="return false;">
<input type="hidden" name="_token" id="csrf-token" value="<?php echo e(csrf_token()); ?>" />
<div class="form-group">
<label class="col-md-3 control-label">Reciclable <span class="text-danger">*</span></label>
<div class="col-md-6">
<select id="reciclable-select" name="reciclable-select" class="select-chosen" data-placeholder="Selecciona el Reciclable" style="width: 250px; display: none;" >
<?php if(isset($reciclables)): ?>
<?php foreach($reciclables as $reciclable): ?>
<option value="<?php echo e($reciclable->id); ?>"><?php echo e($reciclable->reciclable); ?></option>
<?php endforeach; ?>
<?php endif; ?>
</select>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label">Cliente <span class="text-danger">*</span></label>
<div class="col-md-6">
<select id="cliente-select" name="clientes-select" class="select-chosen" data-placeholder="Selecciona el Cliente" style="width: 250px; display: none;" >
<?php if(isset($clientes)): ?>
<?php foreach($clientes as $clientes): ?>
<option value="<?php echo e($clientes->id); ?>"><?php echo e($clientes->nombre_comercial); ?></option>
<?php endforeach; ?>
<?php endif; ?>
</select>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label">Año <span class="text-danger">*</span></label>
<div class="col-md-6">
<select id="year-select" name="year-select" class="form-control">
<?php if(isset($years)): ?>
<?php foreach($years as $year): ?>
<option <?php echo e(($year == date('Y'))? 'selected' : ''); ?> value="<?php echo e($year); ?>"><?php echo e($year); ?></option>
<?php endforeach; ?>
<?php endif; ?>
</select>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label">Mes <span class="text-danger">*</span> </label>
<div class="col-md-6">
<select id="month-select" name="month-select" class="form-control">
<?php if(isset($months)): ?>
<?php foreach($months as $month): ?>
<option <?php echo e(($month['month_id'] == date('m'))? 'selected' : ''); ?> value="<?php echo e($month['month_id']); ?>"><?php echo e($month['month']); ?></option>
<?php endforeach; ?>
<?php endif; ?>
</select>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label">Pago Cliente<span class="text-danger">*</span></label>
<div class="col-md-6">
<input id="pay-customer" class="form-control" type="number" placeholder="0.0" step="0.01" min="0.0" />
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label">Pago Chofer<span class="text-danger">*</span></label>
<div class="col-md-6">
<input id="pay-driver" class="form-control" type="number" placeholder="0.0" step="0.01" min="0.0" />
</div>
</div>
<div class="form-group form-actions">
<div class="col-md-9 col-md-offset-3">
<button id="send-button" type="submit" data-id="0" class="btn btn-sm btn-success" onclick="Reciclable.getPayReciclable(this);"><i class="fa fa-angle-right"></i> Guardar</button>
</div>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<div id="viewlUser" class="modal fade" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">Vista de Usuario</h4>
</div>
<div class="modal-body">
<div class="row">
<div class="col-md-3 col-lg-3 " allign="center"> <img alt="User Pic" src="../img/users.png" class="img-circle img-responsive"> </div>
<div class=" col-md-9 col-lg-9 ">
<table class="table table-user-information">
<tbody>
<tr>
<td>Usuario</td>
<td id="user-td"></td>
</tr>
<tr>
<td>Nombre</td>
<td id="nombre-td"></td>
</tr>
<tr>
<td>Apellido Paterno</td>
<td id="ape-pat-td"></td>
</tr>
<tr>
<td>Apellido Materno</td>
<td id="ape-mat-td"></td>
</tr>
<tr>
<td>Telefono</td>
<td id="tel-td"></td>
</tr>
<tr>
<td >Tipo</td>
<td id="tipo-td"></td>
</tr>
<tr>
<td >Clientes Relacionados</td>
<td>
<table id="table-userc" class="table table-borderless table-striped table-vcenter">
</table>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="https://cdn.jsdelivr.net/momentjs/latest/moment.min.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/daterangepicker/daterangepicker.min.js"></script>
<?php echo Html::script("/js/catalogo_js/reciclable.js"); ?>
<script>
$(function(){
$('#date-range').daterangepicker({
opens: 'left',
locale : { format : 'YYYY-MM-DD'}
}, function(start, end, label) {
console.log("A new date selection was made: " + start.format('YYYY-MM-DD') + ' to ' + end.format('YYYY-MM-DD'));
Reciclable.getReciclablesCosto(start.format('YYYY-MM-DD'),end.format('YYYY-MM-DD'));
});
Reciclable.getReciclablesCosto();
})
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layout', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>