@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; } $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'); //calculate items $allowed_items = 70; $quantity_items = $document->items()->count(); $cycle_items = $allowed_items - $quantity_items * 3; $total_weight = 0; // $marca_agua = app_path('CoreFacturalo'.DIRECTORY_SEPARATOR.'Templates'.DIRECTORY_SEPARATOR.'pdf'.DIRECTORY_SEPARATOR.'custom_multisaba'.DIRECTORY_SEPARATOR.'marca_agua.png'); // $titulo = app_path('CoreFacturalo'.DIRECTORY_SEPARATOR.'Templates'.DIRECTORY_SEPARATOR.'pdf'.DIRECTORY_SEPARATOR.'custom_multisaba'.DIRECTORY_SEPARATOR.'logo_titulo.png'); @endphp
{{--
|
@else
{{-- ![]() |
@endif
{{ $company_name }}@if ($company_owner) De: {{ $company_owner }} @endif{{ 'RUC ' . $company->number }}@isset($establishment->aditional_information){{ $establishment->aditional_information !== '-' ? $establishment->aditional_information : '' }}@endisset{{ $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 !== '-' ? 'Central telefónica: ' . $establishment->telephone : '' }}{{ $establishment->email !== '-' ? : ' . $establishment->email : '' }}@isset($establishment->web_address){{ $establishment->web_address !== '-' ? 'Web: ' . $establishment->web_address : '' }}@endisset |
{{ 'R.U.C. ' . $company->number }}{{ $document->document_type->description }}{{ $document_number }} |
|
|
{{--
| --}}
Código | Cant. | U.M. | Descripción | P.Unit | SIN IGV | Total | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
{{ $row->item->internal_id }} | @if ((int) $row->quantity != $row->quantity) {{ $row->quantity }} @else {{ number_format($row->quantity, 0) }} @endif | {{ symbol_or_code($row->item->unit_type_id) }} |
@if ($row->name_product_pdf)
{!! $row->name_product_pdf !!}
@else
{!! $row->item->description !!}
@endif
@if ($row->attributes)
@foreach ($row->attributes as $attr)
@if ($attr->attribute_type_id === '5032')
@php
$total_weight += $attr->value * $row->quantity;
@endphp
@endif
{!! $attr->description !!} : {{ $attr->value }} @endforeach @endif @if ($row->discounts) @foreach ($row->discounts as $dtos) {{ $dtos->factor * 100 }}% {{$dtos->description ?? 'dscto' }} @endforeach @endif @if ($row->item->is_set == 1) @inject('itemSet', 'App\Services\ItemSetService') {{ join('-', $itemSet->getItemsSet($row->item_id)) }} @endif |
{{ number_format($row->unit_price, 4) }} | @php $total_discount_line = 0; if ($row->discounts) { foreach ($row->discounts as $disto) { $total_discount_line = $total_discount_line + $disto->amount; } } @endphp{{ number_format($row->unit_value - $total_discount_line / $row->quantity, 4) }} | {{ number_format($row->total, 2) }} | ||||||||||||||||
Vendedor: @if ($document->seller) {{ $document->seller->name }} @else {{ $document->user->name }} @endif | 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 | OP. GRAVADA {{ $document->currency_type->symbol }} | {{ number_format($document->total_taxed, 2) }} | |||||||||||||||||||
@php
$total_packages = $document->items()->sum('quantity');
@endphp
Total bultos:
@if ((int) $total_packages != $total_packages)
{{ $total_packages }}
@else
{{ number_format($total_packages, 0) }}
@endif
Total Peso: {{ $total_weight }} KG Observación: @foreach ($document->additional_information as $information) @if ($information) {{ $information }} @endif @endforeach {{-- @if ($document->payments()->count() > 0)
|
Código Hash: {{ $document->hash }} |
I.G.V. {{ $document->currency_type->symbol }} | {{ number_format($document->total_igv, 2) }} | |||||||||||||||||||
OP. EXONERADAS {{ $document->currency_type->symbol }} | {{ number_format($document->total_exonerated, 2) }} | |||||||||||||||||||||
TOTAL {{ $document->currency_type->symbol }} | {{ number_format($document->retention->base, 2) }} | |||||||||||||||||||||
RETENCIÓN - {{ $document->retention->percentage * 100 }}% {{ $document->currency_type->symbol }} | {{ number_format($document->retention->amount, 2) }} | |||||||||||||||||||||
OP. GRATUITAS {{ $document->currency_type->symbol }} | {{ number_format($document->total_free, 2) }} | |||||||||||||||||||||
{{(($document->total_prepayment > 0) ? 'Anticipo':'Descuento TOTAL')}} : {{ $document->currency_type->symbol }} | {{ number_format($document->total_discount, 2) }} | |||||||||||||||||||||
TOTAL A PAGAR. {{ $document->currency_type->symbol }} | {{ number_format($document->total - $document->retention->amount, 2) }} | |||||||||||||||||||||
TOTAL A PAGAR. {{ $document->currency_type->symbol }} | {{ number_format($document->total, 2) }} |
{{ $account->bank->description }} {{ $account->currency_type->description }} N°: {{ $account->number }} @if ($account->cci) CCI: {{ $account->cci }} @endif
@endforeach @endifUNA VEZ SALIDA LA MERCADERÍA NO HAY OPCIÓN A CAMBIOS NI DEVOLUCIONES
@if ($document->terms_condition)
Términos y condiciones del servicio{!! $document->terms_condition !!} |