@php $establishment = $document->establishment; $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::all(); 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; } $payments = $document->payments; $document->load('reference_guides'); $total_payment = $document->payments->sum('payment'); $balance = ($document->total - $total_payment) - $document->payments->sum('change'); //calculate items $allowed_items = 100; $quantity_items = $document->items()->count(); $cycle_items = $allowed_items - ($quantity_items * 3); $total_weight = 0; @endphp
{{--|
|
@else
{{-- --}}
|
@endif
@if($company->number=='20601890071')
TEC MED EQUIPOS MEDICOS S.A.C.Av. Primavera N° 120 Int. B-401
@else
|
{{ 'R.U.C. '.$company->number }}{{ $document->document_type->description }}{{ $document_number }} |
|
|
{{--
| --}}
|||||||||||||||||||||||||||||||||||||||||||
| Código | Cant. | Unid. | Descripción | P.V. Unit. | Dscto. | Importe Total | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| {{ $row->item->internal_id }} | @if(((int)$row->quantity != $row->quantity)) {{ $row->quantity }} @else {{ number_format($row->quantity, 0) }} @endif | @if($row->item->unit_type_id=='NIU') UND @else {{ $row->item->unit_type_id }} @endif |
@if($row->name_product_pdf)
{!!$row->name_product_pdf!!}
@else
{!!$row->item->description!!}
@endif
@inject('descriptionProduct', 'App\Services\ItemLotsGroupService')
@if ($descriptionProduct->getProductSecondName($row->item_id))
{{ $descriptionProduct->getProductSecondName($row->item_id) }} @endif @if ($descriptionProduct->getProductDes($row->item_id)) {{ $descriptionProduct->getProductDes($row->item_id) }} @endif @if (!empty($row->item->presentation)) {!!$row->item->presentation->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(!empty($itemLotGroup->getLote($row->item->IdLoteSelected))) Lote {{ $itemLotGroup->getLote($row->item->IdLoteSelected) }} @endif @if(!empty($itemLotGroup->date_of_due($row->item->IdLoteSelected))) F.V. {{ $itemLotGroup->date_of_due($row->item->IdLoteSelected) }} @endif @if( $row->item->lots ) Series:
|
{{ number_format($row->unit_price, 2) }} | @if($row->discounts) @php $total_discount_line = 0; foreach ($row->discounts as $disto) { $total_discount_line = $total_discount_line + $disto->amount; } @endphp {{ number_format($total_discount_line, 2) }} @endif | {{ 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 |
| Op. Gravadas {{$document->currency_type->symbol}} | {{ number_format($document->total_taxed, 2) }} |
| Op. Inafectas {{$document->currency_type->symbol}} | {{ number_format($document->total_unaffected, 2) }} |
| Op. Exoneradas {{$document->currency_type->symbol}} | {{ number_format($document->total_exonerated, 2) }} |
| Op. Gratuitas {{$document->currency_type->symbol}} | {{ number_format($document->total_free, 2) }} |
| Total Dctos {{$document->currency_type->symbol}} | {{ number_format($document->total_discount, 2) }} |
| IGV {{$document->currency_type->symbol}} | {{ number_format($document->total_igv, 2) }} |
| Total a Pagar {{$document->currency_type->symbol}} | {{ number_format($document->total, 2) }} |
|
Observación:
@foreach($document->additional_information as $information)
@if ($information)
{{ $information }} @endif @endforeach |
| BBVA | SOLES | 011 194 000100112325 84 | BBVA CCI SOLES | 011 194 000100112325 84 | |
| BBVA | DOLARES | 0011 0194 0100112090 84 | BBVA CCI DOLARES | 0011 0194 0100112090 84 | |
| BCP | SOLES | 194-8744823-0-43 | BCP CCI SOLES | 00219400874482304390 | |
| BCP | DOLARES | 194-8737297-1-3 | BCP CCI DOLARES | 00219400873729713390 | |
| NACION | SOLES | 01800800000807441035 | NACION CCI SOLES | 01800800000807441035 |