@php $note = $document->note; $establishment = $document->establishment; $customer = $document->customer; $series = ($note->affected_document) ? $note->affected_document->series : $note->data_affected_document->series; $document_type_id = ($note->affected_document) ? $note->affected_document->document_type_id : $note->data_affected_document->document_type_id; $number = ($note->affected_document) ? $note->affected_document->number : $note->data_affected_document->number; @endphp {!! '' !!} 2.1 2.0 {{ $document->series }}-{{ $document->number }} {{ $document->date_of_issue->format('Y-m-d') }} {{ $document->time_of_issue }} @foreach($document->legends as $leg) value }}]]> @endforeach {{ $document->currency_type_id }} {{ $series.'-'.$number }} {{ $note->note_credit_type_id }} {{ $note->note_description }} @if($document->purchase_order) {{ $document->purchase_order }} @endif {{ $series.'-'.$number }} {{ $document_type_id }} @if($document->guides) @foreach($document->guides as $guide) {{ $guide->number }} {{ $guide->document_type_id }} @endforeach @endif @if($document->related) @foreach($document->related as $rel) {{ $rel->number }} {{ $rel->document_type_id }} @endforeach @endif {{ config('configuration.signature_uri') }} {{ config('configuration.signature_note') }} {{ $company->number }} trade_name }}]]> #{{ config('configuration.signature_uri') }} {{ $company->number }} trade_name }}]]> name }}]]> {{ $establishment->district_id }} {{ $establishment->code }} @if($establishment->urbanization) {{ $establishment->urbanization }} @endif {{ $establishment->province->description }} {{ $establishment->department->description }} {{ $establishment->district->description }} @if($establishment->address && $establishment->address !== '-') address }}]]> @endif {{ $establishment->country_id }} @if($establishment->email || $establishment->telephone) @if($establishment->telephone) {{ $establishment->telephone }} @endif @if($establishment->email) {{ $establishment->email }} @endif @endif {{ $customer->number }} name }}]]> @if($customer->address && $customer->address !== '-') @if($customer->district_id) {{ $customer->district_id }} @endif address }}]]> {{ $customer->country_id }} @endif @if($customer->email || $customer->telephone) @if($customer->telephone) {{ $customer->telephone }} @endif @if($customer->email) {{ $customer->email }} @endif @endif @if ($note->note_credit_type_id === '13' && $document->payment_condition_id === '02') FormaPago Credito {{ $document->fee()->sum('amount') }} @foreach($document->fee as $fee) FormaPago Cuota{{ sprintf("%03d", $loop->iteration) }} {{ $fee->amount }} {{ $fee->date->format('Y-m-d') }} @endforeach @endif {{ $document->total_taxes }} @if($document->total_isc > 0) {{ $document->total_base_isc }} {{ $document->total_isc }} 2000 ISC EXC @endif @if($document->total_taxed > 0) {{ $document->total_taxed }} {{ $document->total_igv }} 1000 IGV VAT @endif @if($document->total_unaffected > 0) {{ $document->total_unaffected }} 0 9998 INA FRE @endif @if($document->total_exonerated > 0) {{ $document->total_exonerated }} 0 9997 EXO VAT @endif @if($document->total_free > 0) {{ $document->total_free }} {{ $document->total_igv }} 9996 GRA FRE @endif @if($document->total_exportation > 0) {{ $document->total_exportation }} 0 9995 EXP FRE @endif @if($document->total_other_taxes > 0) {{ $document->total_other_taxes }} {{ $document->total_base_other_taxes }} 9999 OTROS OTH @endif @if($document->total_plastic_bag_taxes > 0) {{ $document->total_plastic_bag_taxes }} 7152 ICBPER OTH @endif {{ $document->total_value }} {{ $document->total }} @if($document->total_charge > 0) {{ $document->total_charge }} @endif {{ $document->total }} @foreach($document->items as $row) {{ $loop->iteration }} {{ $row->quantity }} {{-- @if($note->note_credit_type_id === '13' && $document->payment_condition_id === '02') --}} @if( ($note->note_credit_type_id === '13' && $document->payment_condition_id === '02') || $note->note_credit_type_id === '03' ) @if($row->total_value >= 0) {{ $row->total_value }} @endif @else @if($row->total_value > 0) {{ $row->total_value }} @endif @endif {{ $row->unit_price }} {{ $row->price_type_id }} {{ $row->total_taxes }} @if($row->total_isc > 0) {{ $row->total_base_isc }} {{ $row->total_isc }} {{ $row->percentage_isc }} {{ $row->system_isc_type_id }} 2000 ISC EXC @endif {{ $row->total_base_igv }} {{ $row->total_igv }} {{ $row->percentage_igv }} {{ $row->affectation_igv_type_id }} @php($affectation = \App\CoreFacturalo\Templates\FunctionTribute::getByAffectation($row->affectation_igv_type_id)) {{ $affectation['id'] }} {{ $affectation['name'] }} {{ $affectation['code'] }} @if($row->total_other_taxes > 0) {{ $row->total_base_other_taxes }} {{ $row->total_other_taxes }} {{ $row->percentage_other_taxes }} 9999 OTROS OTH @endif @if($row->total_plastic_bag_taxes > 0) {{ $row->total_plastic_bag_taxes }} {{ round($row->quantity,0) }} {{$row->item->amount_plastic_bag_taxes}} 7152 ICBPER OTH @endif item->description }}]]> @if($row->item->internal_id) {{ $row->item->internal_id }} @endif @if($row->item->item_code) {{ $row->item->item_code }} @endif @if($row->item->item_code_gs1) {{ $row->item->item_code_gs1 }} @endif @if($row->attributes) @foreach($row->attributes as $attr) description }}]]> {{ $attr->attribute_type_id }} @if($attr->value) {{ $attr->value }} @endif @if($attr->start_date || $attr->end_date || $attr->duration) @if($attr->start_date) {{ $attr->start_date }} @endif @if($attr->end_date) {{ $attr->end_date }} @endif @if($attr->duration) {{ $attr->duration }} @endif @endif @endforeach @endif {{ $row->unit_value }} @endforeach