@php use App\Models\Tenant\Configuration; use App\Models\Tenant\Item; $establishment = $document->establishment; $customer = $document->customer; $document_number = $document->series.'-'.str_pad($document->number, 8, '0', STR_PAD_LEFT); //$document_type_driver = App\Models\Tenant\Catalogs\IdentityDocumentType::findOrFail($document->driver->identity_document_type_id); //$document_type_dispatcher = App\Models\Tenant\Catalogs\IdentityDocumentType::findOrFail($document->dispatcher->identity_document_type_id); $accounts = \App\Models\Tenant\BankAccount::where('show_in_documents', true)->get(); $template_data = \App\Models\Tenant\Establishment::where('code', '=', $establishment->code)->first(); //calculate items $allowed_items = 20; $quantity_items = $document->items()->count(); $cycle_items = $allowed_items - ($quantity_items * 3); $total_weight = 0; $count_=0; // dd($document->currency_type_id) $unitTypes = App\Models\Tenant\Catalogs\UnitType::all(); @endphp
{{--| PUNTO DE PARTIDA | PUNTO DE LLEGADA | Fecha de Emisión: | Fecha inicio del traslado |
|---|---|---|---|
| {{ $document->origin->address }} - {{ $document->origin->location_id }} | {{ $document->delivery->address }} - {{ $document->delivery->location_id }} | {{ $document->date_of_issue->format('Y-m-d') }} | {{ $document->date_of_shipping->format('d/m/Y') }} |
| DESTINATARIO | |||
| Razón Social: {{ $customer->name }} | @if ($document->reference_document)COMPROBANTE: {{$document->reference_document->document_type->description}} {{$document->reference_document->number_full}} | @else@endif | |
| RUC: {{ $customer->number }} | @if ($document->reference_document) @if ($document->reference_document->purchase_order)O. COMPRA: {{$document->reference_document->purchase_order}} | @else@endif @else | @endif |
| Dirección: {{ $customer->address }} {{ ($customer->district_id !== '-')? ', '.$customer->district->description : '' }} {{ ($customer->province_id !== '-')? ', '.$customer->province->description : '' }} {{ ($customer->department_id !== '-')? '- '.$customer->department->description : '' }} | |||
| ENVIO | |
| Fecha Emisión: {{ $document->date_of_issue->format('d/m/Y') }} |
PUNTO DE PARTIDA |
| Fecha de Traslado: {{ $document->date_of_shipping->format('d/m/Y') }} | |
| Motivo Traslado: {{ $document->transfer_reason_type->description }} |
PUNTO DE LLEGADA |
| Modalidad de Transporte: {{ $document->transport_mode_type->description }} | |
|
|
|||||||||||||||
| CANT. | UND. | DESCRIPCIÓN | LABORATORIO | LOTE | F.VTO | PESO |
|---|---|---|---|---|---|---|
| @if(((int)$row->quantity != $row->quantity)) {{ $row->quantity }} @else {{ number_format($row->quantity, 0) }} @endif | @if($unitType) {{ $unitType->description }} @else {{ $row->item->unit_type_id }} @endif |
{!!$row->item->description!!}
@if($row->relation_item->attributes)
@foreach($row->relation_item->attributes as $attr)
@if($attr->attribute_type_id === '5032')
@php
$total_weight += $attr->value * $row->quantity;
$total_weight_line += $attr->value * $row->quantity;
@endphp
@endif
{!! $attr->description !!} : {{ $attr->value }} @endforeach @endif |
@if($itemModel && $itemModel->brand) {{ $itemModel->brand->name }} @endif | @inject('itemLotGroup', 'App\Services\ItemLotsGroupService') {{ $itemLotGroup->getItemLotGroupLineBreak($row->item->IdLoteSelected) }} | @if($row->relation_item->date_of_due){{ $row->relation_item->date_of_due->format('Y-m-d') }} @endif | {{ $total_weight_line }} |
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
_____________________________ RECIBÍ CONFORME |
_____________________________ Vº Bº |
|
|
|||||
|
|
| 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}} |