@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; $invoice = $document->invoice; $document_base = ($document->note) ? $document->note : null; //$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); $accounts = \App\Models\Tenant\BankAccount::where('show_in_documents', true)->get(); if($document_base) { $affected_document_number = ($document_base->affected_document) ? $document_base->affected_document->series.'-'.str_pad($document_base->affected_document->number, 8, '0', STR_PAD_LEFT) : $document_base->data_affected_document->series.'-'.str_pad($document_base->data_affected_document->number, 8, '0', STR_PAD_LEFT); } else { $affected_document_number = null; } $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; } $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; } $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; } $payments = $document->payments; $company_name = $company->name; $company_owner = null; if ($configurations->trade_name_pdf) { $company_name = $company->trade_name; $company_owner = $company->name; } $company_name = $company->name; $company_owner = null; if ($configurations->trade_name_pdf) { $company_name = $company->trade_name; $company_owner = $company->name; } $document->load('reference_guides'); $total_payment = $document->payments->sum('payment'); $balance = ($document->total - $total_payment) - $document->payments->sum('change'); @endphp
@if($company->logo)
{{ $company->name }}{{ ($establishment->address !== '-')? $establishment->address.',' : '' }} {{ ($establishment->district_id !== '-')? $establishment->district->description : '' }} {{ ($establishment->province_id !== '-')? ', '.$establishment->province->description : '' }} {{ ($establishment->department_id !== '-')? '- '.$establishment->department->description : '' }}@isset($establishment->trade_address){{ ($establishment->trade_address !== '-')? 'D. Comercial: '.$establishment->trade_address : '' }}@endisset{{ ($establishment->telephone !== '-')? 'Telf. '.$establishment->telephone : '' }}{{ ($establishment->email !== '-')? : '.$establishment->email : '' }}@isset($establishment->web_address){{ ($establishment->web_address !== '-')? 'Web: '.$establishment->web_address : '' }}@endisset @isset($establishment->aditional_information){{ ($establishment->aditional_information !== '-')? $establishment->aditional_information : '' }}@endisset |
{{ 'RUC '.$company->number }}{{ $document->document_type->description }}{{ $document_number }} |
|
|
Ubigeo | O/C | Condiciones de pago | Vendedor | GUÍA DE REMISIÓN | Agencia de transporte |
@php $payment = 0; @endphp @foreach($payments as $row) {{ $row->payment_method_type->description }} @endforeach | {{ $document->user->name }} | @if ($document->guides) @foreach($document->guides as $guide) {{ $guide->number }} @endforeach @endif @if ($document->reference_guides) @foreach($document->reference_guides as $guide) {{ $guide->number }} @endforeach @endif |
Código | MARCA | Descripción | Cant. | U.M. | P.U | Importe |
---|---|---|---|---|---|---|
{{ $row->item->internal_id }} | {{ $row->m_item->brand != null ? $row->m_item->brand->name : '' }} |
@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 --}} @if($row->item->is_set == 1) @inject('itemSet', 'App\Services\ItemSetService') {{join( "-", $itemSet->getItemsSet($row->item_id) )}} @endif |
@if(((int)$row->quantity != $row->quantity)) {{ $row->quantity }} @else {{ number_format($row->quantity, 0) }} @endif | {{ symbol_or_code($row->item->unit_type_id) }} | {{ number_format($row->unit_price, 2) }} | {{ number_format($row->total, 2) }} |
SON: @foreach(array_reverse( (array) $document->legends) as $row) @if ($row->code == "1000") {{ $row->value }} {{ $document->currency_type->description }} @else {{$row->code}}: {{ $row->value }} @endif @endforeach |
OBSERVACIONES: @if($document->additional_information) @foreach($document->additional_information as $information) @if ($information) {{ $information }} @endif @endforeach @endif |
Importe bruto | Descuentos | Total valor venta | I.G.V. 18% | Total precio venta | Pago a cuenta | Neto a pagar |
---|---|---|---|---|---|---|
@if($document->total_taxed > 0) {{ $document->currency_type->symbol }} {{ number_format($document->total_taxed, 2) }} @endif | @if($document->total_discount > 0) {{ $document->currency_type->symbol }} {{ number_format($document->total_discount, 2) }} @endif | @if($document->total_taxed > 0) {{ $document->currency_type->symbol }} {{ number_format($document->total_taxed, 2) }} @endif | {{ $document->currency_type->symbol }} {{ number_format($document->total_igv, 2) }} | {{ $document->currency_type->symbol }} {{ number_format($document->total, 2) }} | {{ $document->currency_type->symbol }} {{ number_format($document->total, 2) }} |
Banco | Moneda | Código de Cuenta Interbancaria | Código de Cuenta |
---|---|---|---|
{{$account->bank->description}} | {{$account->currency_type->description}} | @if($account->cci) {{$account->cci}} @endif | {{$account->number}} |
Términos y condiciones del servicio{!! $document->terms_condition !!} |
Representación impresa de la {{ $document_description }} Esta puede ser consultada en {!! url('/buscar') !!} |
@else
Representación impresa del Comprobante de Pago Electrónico. Esta puede ser consultada en {!! url('/buscar') !!} |
@endif