@php use App\CoreFacturalo\Helpers\Template\TemplateHelper; use App\Models\Tenant\Document; use App\Models\Tenant\Company; use App\Models\Tenant\SaleNote; if ($document != null) { $establishment = $document->establishment; $customer = $document->customer; $invoice = $document->invoice; $company = Company::first(); $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); 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; } $payments = $document->payments; // $document->load('reference_guides'); if ($document->payments) { $total_payment = $document->payments->sum('payment'); $balance = ($document->total - $total_payment) - $document->payments->sum('change'); } } $accounts = \App\Models\Tenant\BankAccount::all(); $path_style = app_path('CoreFacturalo'.DIRECTORY_SEPARATOR.'Templates'.DIRECTORY_SEPARATOR.'pdf'.DIRECTORY_SEPARATOR.'style.css'); // Pago/Coutas detalladas $paymentDetailed= []; if( $document != null && ( get_class($document) == Document::class || get_class($document) == SaleNote::class ) ){ $paymentDetailed = TemplateHelper::getDetailedPayment($document); } @endphp @if($document != null)
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
@if ($document->retention) @endif
Información de la retención:
Base imponible de la retención: S/ {{ round($document->retention->amount / $document->retention->percentage, 2) }}
Porcentaje de la retención {{ $document->retention->percentage * 100 }}%
Monto de la retención S/ {{ $document->retention->amount_pen }}
OBSERVACIONES: @if($document->additional_information) @foreach($document->additional_information as $information) @if ($information) {{ $information }} @endif @endforeach @endif
@if($document->retention) @endif @if ($document->retention) @endif
Importe bruto Descuentos Total valor venta I.G.V. 18% Total precio venta Pago a cuenta RETENCIÓN {{ $document->retention->percentage * 100 }}% 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) }} @if(!empty($paymentDetailed)) @foreach($paymentDetailed as $detailed) @foreach($detailed as $row) {{--{{ isset($paymentDetailed['CUOTA'])?'Cuotas:':'Pagos:' }}--}} {{ $row['description'] }} - {{ $row['reference'] }} {{ $row['symbol'] }} {{ number_format( $row['amount'], 2) }} @endforeach
@endforeach @endif
{{$document->currency_type->symbol}} {{number_format($document->retention->amount, 2)}} @if($document->retention) {{ $document->currency_type->symbol }} {{ number_format($document->total - $document->retention->amount, 2) }} @else {{ $document->currency_type->symbol }} {{ number_format($document->total, 2) }} @endif
@foreach($accounts as $account) @endforeach
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}}
@endif @php $document_description = null; if (is_object($document)) { if ($document && $document->prefix == 'NV') { $document_description = 'NOTA DE VENTA ELECTRÓNICA'; } if ($document && $document->document_type_id) { $document_description = $document->document_type->description; } } @endphp @if ($document_description) @else @endif
Representación impresa de la {{ $document_description }}
Esta puede ser consultada en {!! url('/buscar') !!}
Representación impresa del Comprobante de Pago Electrónico.
Esta puede ser consultada en {!! url('/buscar') !!}