/home/dvjjulio/softtrash/storage/framework/views/ecb3d2626ac289e38b14f4d2acbe0630
<style>

.hiddenRow {
    padding: 0 !important;
}
</style>
<div class="block">
	<div class="block-title">
			<h2><strong>Combustible Mensual (<?php echo e((isset($month))? Helper::month($month) : Helper::month(date('m'))); ?> - <?php echo e((isset($year))? $year : date('Y')); ?>)</strong> </h2>
	</div>
	<div class="row">
		<div class="col-md-12">
			<table class="table table-condensed table-striped">
				<thead>
						<tr>
							<th>Semana</th>
							<th colspan="4">&nbsp;</th>
							<th>Litros</th>
							<th>Total</th>
						</tr>
				</thead>
				<tbody>
				<?php if(isset($combustibleObject )): ?>
					<?php foreach($combustibleObject as $key => $value2): ?>
					<tr>
						<td colspan="12" class="hiddenRow">
							<div class="accordian-body collapse" id="<?php echo e($value2["semana"]); ?>"> 
								<table class="table table-striped">
									<thead>
										<tr>
											<th>Orden</th>
											<th>Nota</th>
											<th>Fecha</th>
											<th>Gasolinera</th>
											<th>Tipo</th>
											<th>Chofer</th>
											<th>Placas</th>
											<th>Litros</th>
											<th>Precio</th>
											<th>Kilometraje</th>
											<th>Rendimiento</th>
											<th>Total</th>
										</tr>
									</thead>	
									<tbody>
										<?php
											$total = 0;
											$litros = 0;
										?>
										<?php foreach($value2['notas'] as $key => $value): ?>
										<?php
											$total += $value->total;
											$litros += $value->litros;
										?>
										<tr>
											<td><?php echo e($value->orden_id); ?></td>
											<td><?php echo e($value->nota); ?></td>
											<td><?php echo e($value->fecha_inicio); ?></td>
											<td><?php echo e($value->nombre_comercial); ?></td>
											<td><?php echo e($value->tipo); ?></td>
											<td><?php echo e($value->nombre); ?></td>
											<td><?php echo e($value->placas); ?></td>
											<td><?php echo e($value->litros); ?></td>
											<td>$<?php echo e($value->precio_litro); ?></td>
											<td><?php echo e($value->kilometraje); ?></td>
											<td><?php echo e($value->rendimiento ? $value->rendimiento."/L" : null); ?></td>
											<td>$<?php echo e(number_format($value->total, 2)); ?></td>
										</tr>
										 <?php if(isset($value2['notas'][$key + 1]) && $value->nombre != $value2['notas'][$key + 1]->nombre): ?>
										 <tr>
											<td><?php echo e($value->nombre); ?></td>
											<td colspan="6"></td>
											<td>Litros: <?php echo e($litros); ?></td>
											<td colspan="3"></td>
											<td>Total: $<?php echo e(number_format($total, 2)); ?></td>
										</tr>
										 <?php
												$total = 0;
												$litros = 0;
											?>
										 <?php elseif(!isset($value2['notas'][$key + 1])): ?>
											 <tr>
												<td><?php echo e($value->nombre); ?></td>
												<td colspan="6"></td>
												<td>Litros: <?php echo e($litros); ?></td>
												<td colspan="3"></td>
												<td>Total: $<?php echo e(number_format($total, 2)); ?></td>
											</tr>
										 <?php endif; ?>
										<?php endforeach; ?>
									</tbody>
									</table>
								</div> 
						</td>
					</tr>
						<tr data-toggle="collapse" data-target="#<?php echo e($value2['semana']); ?>" class="accordion-toggle success"	>
							<td>Semana <?php echo e($value2["semana"]." (".\Helper::getStartAndEndDate($value2["semana"], 2021).")"); ?></td>
							<td colspan="4">&nbsp;</td>
							<td><?php echo e($value2['litros']); ?></td>
							<td>$<?php echo e(number_format($value2['total'], 2)); ?></td>
					</tr>
				<?php endforeach; ?>
				<?php else: ?>
					<tr>
						<td colspan="6">No hay registros</td>
					</tr>
				<?php endif; ?>
				</tbody>
			</table>
		</div>
	</div>
</div>
<div class="block">
	<div class="block-title">
			<h2><strong>Combustible Anual (<?php echo e((isset($year))? $year : date('Y')); ?>)</strong> </h2>
	</div>
	<div class="row">
		<div class="col-md-12">
			<div> 
				<table class="table table-striped">
					<thead>
						<tr>
							<th>Mes</th>
							<th>No. Notas</th>
							<th>Litros</th>
							<th>Total</th>
						</tr>
					</thead>	
					<tbody>
						<?php if(isset($combustibleOrdenYear )): ?>
						<?php foreach($combustibleOrdenYear as $key => $value): ?>
						<tr>
							<td><?php echo e($value->mes); ?></td>
							<td><?php echo e($value->notas); ?></td>
							<td><?php echo e($value->litros); ?></td>
							<td>$<?php echo e(number_format($value->total, 2)); ?></td>
						</tr>
						<?php endforeach; ?>
						<?php else: ?>
							<tr>
								<td colspan="6">No hay registros</td>
							</tr>
						<?php endif; ?>
					</tbody>
					</table>
				</div> 
		</div>
	</div>
</div>