<html>

<head>

<style>

body {font-family: sans-serif;

	font-size: 10pt;

}

p {	margin: 0pt; }

table.items {

	border: 0.1mm solid #000000;

}

td { vertical-align: top; }

.items td {

	border-left: 0.1mm solid #000000;

	border-right: 0.1mm solid #000000;

}

table thead td { background-color: #EEEEEE;

	text-align: center;

	border: 0.1mm solid #000000;

	font-variant: small-caps;

}

.items td.blanktotal {

	background-color: #EEEEEE;

	border: 0.1mm solid #000000;

	background-color: #FFFFFF;

	border: 0mm none #000000;

	border-top: 0.1mm solid #000000;

	border-right: 0.1mm solid #000000;

}

.items td.totals {

	text-align: right;

	border: 0.1mm solid #000000;

}

.items td.cost {

	text-align: "." center;

}

</style>

</head>

<body>
	@foreach ($compra as $c)



<!--mpdf



<htmlpageheader name="myheader">

<table width="100%"><tr>

<td width="50%" style="color:#0000BB; "><span style="font-weight: bold; font-size: 14pt;">FACTURA</span></td>

<td width="50%" style="text-align: right;">RUC NO.<br /><span style="font-weight: bold; font-size: 12pt;">{{ $c->ruc }}</span></td>

</tr></table>

</htmlpageheader>



<htmlpagefooter name="myfooter" style="margin-top:50px;">

Representacion Impresa de la Factura ElectronicaCodigo Hash: 

Autorizado para ser Emisor electronico mediante la Resolucion de Intendencia N° 01800557999/SUNAT

Para consultar el comprobante ingresar a : https://sunat.gob.pe/

<div style="border-top: 1px solid #000000; font-size: 9pt; text-align: center; padding-top: 3mm; ">

Page {PAGENO} of {nb}

</div>

</htmlpagefooter>



<sethtmlpageheader name="myheader" value="on" show-this-page="1" />

<sethtmlpagefooter name="myfooter" value="on" />

mpdf-->



<div style="text-align: right">{{ $c->fec_emision }}</div>



<br />



<table class="items" width="100%" style="font-size: 9pt; border-collapse: collapse; " cellpadding="8">

<thead>

<tr>

<td width="15%">Codigo.</td>

<td width="10%">Cantidad</td>

<td width="45%">Descripcion</td>

<td width="15%">Precio por unidad</td>

<td width="15%">Totales</td>

</tr>

</thead>

<tbody>

<!-- ITEMS HERE -->
@php
	$cont = 0;
	$cont_cuenta = 0;
	$cont_dolares = 0;
@endphp
@foreach ($c->Compras_lineas as $l)
	@php
		$cont += $l->precio;
		$cont_cuenta += $l->cuenta;
		$cont_dolares += $l->dolares;
	@endphp
	<tr>

	<td align="center">{{ $l->codigo }}</td>

	<td align="center">{{ $l->cantidad }}</td>

	<td>{{ $l->concepto }}</td>

	<td class="cost">$ {{$l->cuenta}}</td>

	<td class="cost">$ {{ $l->precio }}</td>

	</tr>
@endforeach

<!-- END ITEMS HERE -->

<tr>

<td class="blanktotal" colspan="3" rowspan="2"></td>

<td class="totals">Subtotal:</td>

<td class="totals cost">$ {{$cont}}</td>

</tr>


<tr>

<td class="totals"><b>TOTAL:</b></td>

<td class="totals cost"><b>$ {{$cont}}</b></td>

</tr>

</tbody>

</table>





<div style="text-align: center; font-style: italic;">Payment terms: payment due in 30 days

</div>




	@endforeach

</body>

</html>