@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; //$path_style = app_path('CoreFacturalo'.DIRECTORY_SEPARATOR.'Templates'.DIRECTORY_SEPARATOR.'pdf'.DIRECTORY_SEPARATOR.'style.css'); $document_number = $document->series.'-'.str_pad($document->number, 8, '0', STR_PAD_LEFT); // $document_type_driver = App\Models\Tenant\Catalogs\IdentityDocumentType::findOrFail($document->driver->identity_document_type_id); // $document_type_dispatcher = App\Models\Tenant\Catalogs\IdentityDocumentType::findOrFail($document->dispatcher->identity_document_type_id); //calculate items $allowed_items = 20; $quantity_items = $document->items()->count(); $cycle_items = $allowed_items - ($quantity_items * 3); $total_weight = 0; $item_=0; $template_data = \App\Models\Tenant\Establishment::where('code', '=', $establishment->code)->first(); @endphp
{{--I T E M | C Ó D I G O | D E S C R I P C I Ó N | U. M. | C A N T. |
---|---|---|---|---|
{{ $item_ }} | {{ $row->item->internal_id }} |
@if($row->name_product_pdf)
{!!$row->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 --}} |
{{ symbol_or_code($row->item->unit_type_id) }} | @if(((int)$row->quantity != $row->quantity)) {{ $row->quantity }} @else {{ number_format($row->quantity, 0) }} @endif |
TOTAL | {{ number_format($document->total, 2) }} |
OBSERVACIONES |
{{ $document->observations }} |
COMPROBANTE DE PAGO RELACIONADO A LA GUIA DE REMISIÓN REMItemTE: |
{{ ($document->reference_document) ? $document->reference_document->number_full : "" }} |
{{$textDocumentType}} |
{{$Series }}-{{$number}} |
ORDEN DE PEDIDO |
{{ ($document->order_form) ? $document->order_form->number_full : "" }} |
NOTA DE VENTA |
{{ ($document->sale_note) ? $document->sale_note->number_full : "" }} |