@include('layouts.alertas')
@foreach($data as $value)
Cotización #
{{$value->numero_cotizacion}}
Fecha
@php $todayDate = date("d-m-Y"); @endphp
{{ Carbon\Carbon::parse($value->created_at)->format('d M Y') }}
Vendedor
@php $vendedor_cre = DB::table('users')->where('id', $value->vendedor_id)->get('name'); @endphp
@foreach($vendedor_cre as $vendedor_cre_value)
{{ $vendedor_cre_value->name }}
@endforeach
Total General
@php $total = $value->total; @endphp
RD$ {{ number_format($total, 2) }}
DATOS DEL CLIENTE
@php
$cliente = DB::table('clientes')->where('id', $value->cliente_id)->get()->all();
@endphp
@foreach($cliente as $value_cliente)
Nombre cliente:
{{$value_cliente->nombre}}
@php
$tipo_documento = DB::table('tipo_documentos')->where('id', $value_cliente->id_tipo_documento)->get();
@endphp
@foreach($tipo_documento as $value_documento)
Documento identidad:
{{$value_documento->nombre}} / {{$value_cliente->documento }}
@endforeach
Correo:
{{$value_cliente->email}}
Dirección:
{{$value_cliente->direccion}}
Telefono:
{{$value_cliente->tel}}
Movil:
{{$value_cliente->cel}}
WhatsApp:
{{$value_cliente->whatsapp}}
@endforeach
DATOS DE LA COTIZACIÓN
| # |
Código |
Producto / Descripcion |
Cant. |
Precio U. |
Total |
@php
$codigo = explode(',', $value->codigo);
$nombre = json_decode($value->nombre);
$descripcion = json_decode($value->descripcion);
$cantidad = explode(',', $value->cantidad);
$precio_total = explode(',', $value->precio_total);
$subtotal = explode(',', $value->subtotal);
$inicio = 1;
$count = count($codigo);
@endphp
@for( $i = 0; $i < count($codigo); $i ++ )
|
|
{{ $codigo[$i] }}
|
{{ $nombre[$i] }}, {{ $descripcion[$i] }}
|
{{ $cantidad[$i] }}
|
RD$ {{ number_format($precio_total[$i], 2) }}
|
RD$ {{ number_format($subtotal[$i], 2) }}
|
@endfor
|
|
|
|
Sub Total |
@php $subtotal = $total - $value->itbis; @endphp
RD$ {{ number_format($subtotal, 2) }} |
|
|
|
|
|
ITBIS |
RD$ {{ number_format($value->itbis, 2) }} |
|
|
|
|
|
Precio Total |
RD$ {{ number_format($total, 2) }} |
|
@if(Auth::user()->id == $value->vendedor_id)
@if($value->status == 0)
@endif
@endif
@endforeach