@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);
}
$supplier = $document->supplier;
//$path_style = app_path('CoreFacturalo'.DIRECTORY_SEPARATOR.'Templates'.DIRECTORY_SEPARATOR.'pdf'.DIRECTORY_SEPARATOR.'style.css');
$tittle = $document->prefix . '-' . str_pad($document->id, 8, '0', STR_PAD_LEFT);
@endphp
{{-- {{ $tittle }} --}}
{{-- --}}
@if ($company->logo)
 logo}")) }};base64, {{ base64_encode(file_get_contents(public_path("storage/uploads/logos/{$company->logo}"))) }}"
alt="{{ $company->name }}" class="company_logo" style="max-width: 150px;">
@endif
|
ORDEN DE COMPRA TOC
|
|
Fecha:
|
{{ $document->date_of_issue->format('Y-m-d') }}
|
COMPRADOR:
|
{{ $company->name }}
|
RUC:
|
{{ $company->number }}
|
DOMICILIO FISCAL:
|
{{ $establishment->address !== '-' ? $establishment->address : '' }}
{{ $establishment->district_id !== '-' ? ', ' . $establishment->district->description : '' }}
{{ $establishment->province_id !== '-' ? ', ' . $establishment->province->description : '' }}
{{ $establishment->department_id !== '-' ? '- ' . $establishment->department->description : '' }}
|
CELULAR:
|
{{ $establishment->telephone }}
|
|
|
PROVEEDOR:
|
{{ $supplier->name }}
|
RUC:
|
{{ $supplier->number }}
|
DIRECCION:
|
{{ $supplier->address }}
|
CELULAR:
|
{{ $supplier->telephone }}
|
|
TIPO:
|
{{ $document->type == 'goods' ? 'BIENES' : 'SERVICIOS' }}
|
CORREO:
|
{{ $supplier->email }}
|
CÓDIGO IDENTIFICADOR:
|
{{ $document->client_internal_id }}
|
|
Item |
{{-- PRODUCTO/SERVICIO | --}}
DESCRIPCIÓN |
PRECIO UNIT |
Cantidad |
IMPORTE |
@foreach ($document->items as $row)
{{ $loop->iteration }} |
{{-- {{ $row->item->description }} | --}}
{{ $row->item->description }} |
{{ number_format($row->unit_price, 2) }} |
{{ $row->quantity }} |
{{ number_format($row->total, 2) }} |
@endforeach
|
|
SUB TOTAL
|
{{ number_format($document->total_taxed, 2) }}
|
|
IGV 18%
|
{{ number_format($document->total_igv, 2) }}
|
|
TOTAL
|
{{ number_format($document->total, 2) }}
|
@php
$letters = \App\CoreFacturalo\Helpers\Number\NumberLetter::convertToLetter($document->total);
@endphp
SON: {{ $letters }}
|
|
NOTAS:
{!!$document->observation!!}
|
|
AUTORIZACION
CREADO POR:
@if($document->createdBy)
{{$document->createdBy->name}}
@endif
APROBADO POR:
@if($document->approvedBy)
{{$document->approvedBy->name}}
@endif
|