@php $establishment = $document->establishment; $configuration = \App\Models\Tenant\Configuration::first(); $configurations = \App\Models\Tenant\Configuration::first(); $company_name = $company->name; $company_owner = null; if ($configurations->trade_name_pdf) { $company_name = $company->trade_name; $company_owner = $company->name; } $establishment__ = \App\Models\Tenant\Establishment::find($document->establishment_id); $logo = $establishment__->logo ?? $company->logo; if ($logo === null && !file_exists(public_path("$logo}"))) { $logo = "{$company->logo}"; } if ($logo) { $logo = "storage/uploads/logos/{$logo}"; $logo = str_replace("storage/uploads/logos/storage/uploads/logos/", "storage/uploads/logos/", $logo); } $customer = $document->customer; $accounts = \App\Models\Tenant\BankAccount::where('show_in_documents', true)->get(); $tittle = str_pad($document->id, 8, '0', STR_PAD_LEFT); $logo = "storage/uploads/logos/{$company->logo}"; if($establishment->logo) { $logo = "{$establishment->logo}"; } $template_data = \App\Models\Tenant\Establishment::where('code', '=', $establishment->code)->first(); $miimage = app_path('CoreFacturalo'.DIRECTORY_SEPARATOR.'Templates'.DIRECTORY_SEPARATOR.'pdf'.DIRECTORY_SEPARATOR.''.$template_data->template_pdf.''.DIRECTORY_SEPARATOR.'membrete.png'); $footer = app_path('CoreFacturalo'.DIRECTORY_SEPARATOR.'Templates'.DIRECTORY_SEPARATOR.'pdf'.DIRECTORY_SEPARATOR.''.$template_data->template_pdf.''.DIRECTORY_SEPARATOR.'footer.png'); //calculate items $allowed_items = 8; // $quantity_items = $document->items()->count(); $cycle_items = $allowed_items - $document->items()->count(); // $total_weight = 0; // $count_=0; @endphp
@if($company->logo)
{{$company->name}}
@endif
CONCRE MIX PERU S.A.C.
Cotización

Nº {{ $tittle }}

Fecha: {{ $document->date_of_issue->format('Y-m-d') }}
DATOS DEL CLIENTE
Razón Social: {{ $customer->name }} {{ $customer->identity_document_type->description }}: {{ $customer->number }}
Dirección Fiscal: {{ $customer->address }} {{-- {{ ($customer->district_id !== '-')? ', '.$customer->district->description : '' }} {{ ($customer->province_id !== '-')? ', '.$customer->province->description : '' }} {{ ($customer->department_id !== '-')? '- '.$customer->department->description : '' }} --}} Teléfono: @if ($customer->telephone) {{ $customer->telephone }} @endif
Dirección de Obra: @if ($document->shipping_address) {{ $document->shipping_address }} @endif Proyecto: {{ $document->description }}
Asesor Comercial: @if ($document->contact) {{ $document->contact }} @endif Email: @if($document->date_of_due) {{ $document->date_of_due }} @endif
Teléfono: @if ($document->phone) {{ $document->phone }} @endif
ESPECIFICACIONES DEL CONCRETO PREMEZCLADO
@foreach($document->items as $row) @php // dd($allowed_items); @endphp @endforeach @for($i = 0; $i < $cycle_items; $i++) @endfor
CANTIDAD
(m3)
Descripción PRECIO
(m3)
TOTAL
(S/)
@if(((int)$row->quantity != $row->quantity)) {{ $row->quantity }} @else {{ number_format($row->quantity, 0) }} @endif @if($row->item->name_product_pdf ?? false) {!!$row->item->name_product_pdf ?? ''!!} @else {!!$row->item->description!!} @endif @if($row->attributes) @foreach($row->attributes as $attr)
{!! $attr->description !!} : {{ $attr->value }} @endforeach @endif @if($row->discounts) @foreach($row->discounts as $dtos)
{{ $dtos->factor * 100 }}% {{$dtos->description }} @endforeach @endif @if($row->item !== null && property_exists($row->item,'extra_attr_value') && $row->item->extra_attr_value != '')
{{$row->item->extra_attr_name}}: {{ $row->item->extra_attr_value }} @endif @if($row->item->is_set == 1)
@inject('itemSet', 'App\Services\ItemSetService') @foreach ($itemSet->getItemsSet($row->item_id) as $item) {{$item}}
@endforeach @endif
{{ number_format($row->unit_price, 2) }} {{ number_format($row->total, 2) }}
 
@foreach($accounts as $account) @endforeach
ENTIDAD
FINANCIERA
NUMERO DE CUENTA CORRIENTE
CONCRE MIX PERU SAC
CCI Moneda
Footer {{$account->number}} @if($account->cci) {{$account->cci}} @endif currency_type->id=='USD') style='color:#00a800' @endif>{{$account->currency_type->description}}
SUB TOTAL {{ $document->currency_type->symbol }} {{ number_format($document->total_taxed, 2) }}
IGV 18% {{ $document->currency_type->symbol }} {{ number_format($document->total_igv, 2) }}
TOTAL {{ $document->currency_type->symbol }} {{ number_format($document->total, 2) }}

footer {{--
@php $payment = 0; @endphp @foreach($document->payments as $row) @php $payment += (float) $row->payment; @endphp @endforeach
Pagos:
- {{ $row->payment_method_type->description }} - {{ $row->reference ? $row->reference.' - ':'' }} {{ $document->currency_type->symbol }} {{ $row->payment }}
Saldo: {{ $document->currency_type->symbol }} {{ number_format($document->total - $payment, 2) }}
--}}