@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; //$path_style = app_path('CoreFacturalo'.DIRECTORY_SEPARATOR.'Templates'.DIRECTORY_SEPARATOR.'pdf'.DIRECTORY_SEPARATOR.'style.css'); $accounts = \App\Models\Tenant\BankAccount::all(); $tittle = $document->prefix . '-' . str_pad($document->number ?? $document->id, 8, '0', STR_PAD_LEFT); $logo = "storage/uploads/logos/{$company->logo}"; if ($establishment->logo) { $logo = "{$establishment->logo}"; } $cont_ = 0; $rubrica = "storage/uploads/firms/{$company->img_firm}"; //calculate items $allowed_items = 35 - \App\Models\Tenant\BankAccount::all()->count() * 3; $quantity_items = $document->items()->count(); $cycle_items = $allowed_items - $quantity_items * 3; $total_weight = 0; $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; } $company_name = $company->name; $company_owner = null; if ($configurations->trade_name_pdf) { $company_name = $company->trade_name; $company_owner = $company->name; } @endphp
{{--Observación: | {!! str_replace("\n", ' ', $document->description) !!} |
{{-- {{ $document->description }} | --}}
Item | Cant. | U.M | Descripción | PRECIO UNITARIO |
VALOR UNITARIO |
DSCTO | VALOR VENTA |
|
---|---|---|---|---|---|---|---|---|
{{ $cont_ }} | @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->item->name_product_pdf ?? false)
{!! $row->item->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 !== null && property_exists($row->item, 'extra_attr_value') && $row->item->extra_attr_value != '') {{ $row->item->extra_attr_name }}: {{ $row->item->extra_attr_value }} @endif @if ($row->item->is_set == 1) @inject('itemSet', 'App\Services\ItemSetService') @foreach ($itemSet->getItemsSet($row->item_id) as $item) {{ $item }} @endforeach @endif |
{{ number_format($row->unit_price, 2) }} | {{ number_format($row->unit_value, 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) }} @else 0 @endif | {{ number_format($row->total, 2) }} | |
@foreach (array_reverse((array) $document->legends) as $row)
@if ($row->code == '1000')
Son: {{ $row->value }} {{ $document->currency_type->description }} @if (count((array) $document->legends) > 1)Leyendas @endif @else{{ $row->code }}: {{ $row->value }} @endif @endforeach |