@if ($errors->has('supplier_id')) {{ $errors->first('supplier_id') }} @endif
@if($supplier_id == $purchaseInvoice->supplier_id)

{{$purchaseInvoice->supplier->commercial_name}}

{{trans('applang.commercial_record')}}: {{$purchaseInvoice->supplier->commercial_record}}
{{trans('applang.tax_registration')}}: {{$purchaseInvoice->supplier->tax_registration}}
{{trans('applang.name')}}: {{$purchaseInvoice->supplier->first_name}} {{$purchaseInvoice->supplier->last_name}}
{{trans('applang.address')}}:
{{$purchaseInvoice->supplier->street_address}} {{$purchaseInvoice->supplier->city}}, {{$purchaseInvoice->supplier->state}}, {{$purchaseInvoice->supplier->country}}
@elseif($supp)

{{$supp->commercial_name}}

{{trans('applang.commercial_record')}}: {{$supp->commercial_record}}
{{trans('applang.tax_registration')}}: {{$supp->tax_registration}}
{{trans('applang.name')}}: {{$supp->first_name}} {{$supp->last_name}}
{{trans('applang.address')}}:
{{$supp->street_address}} {{$supp->city}}, {{$supp->state}}, {{$supp->country}}
@else @endif
@if ($errors->has('due_date')) {{ $errors->first('due_date') }} @endif

@if(count($taxes) > 1) @endif @foreach($addProduct as $index => $more) @if(count($taxes) > 1) @endif @if($loop->index > 0) @else @endif @endforeach @if($discount && $discount_inv && $discount_type != '' && $subtotal != '') @endif @if($total_taxes_ids) @foreach($total_taxes_ids as $key => $total_tax) @if($total_tax_inv[$key]) @endif @endforeach @endif @if($shipping_expense && $subtotal != '') @endif @if($down_payment && $down_payment_inv && $down_payment_type >= 0 && $subtotal != '' && $deposit_is_paid == true) @endif @if($paid_to_supplier_checkbox && $due_amount != '') @endif
{{trans('applang.item')}} {{trans('applang.description')}} {{trans('applang.unit_price')}} {{trans('applang.quantity')}} {{trans('applang.tax')}} 1{{trans('applang.tax')}} 2{{trans('applang.total')}}
@if ($errors->has('product_id.'.$index)) {{ $errors->first('product_id[]') }} @endif
@error('description.'.$index) {{ $message }} @enderror
@error('unit_price.'.$index) {{ $message }} @enderror
@error('quantity.'.$index) {{ $message }} @enderror
{{trans('applang.total_before')}}
{{trans('applang.discount')}}
{{trans('applang.shipping_expense')}}
{{trans('applang.down_payment')}}
{{trans('applang.due_amount')}}
{{trans('applang.paid')}}
{{trans('applang.due_amount_after_paid')}}
@if ($errors->has('discount')) {{ $errors->first('discount') }} @endif
@if ($errors->has('discount_type')) {{ $errors->first('discount_type') }} @endif
@if ($errors->has('down_payment')) {{ $errors->first('down_payment') }} @endif
@if ($errors->has('down_payment_type')) {{ $errors->first('down_payment_type') }} @endif
@if ($errors->has('deposit_payment_method')) {{ $errors->first('deposit_payment_method') }} @endif
@if ($errors->has('deposit_transaction_id')) {{ $errors->first('deposit_transaction_id') }} @endif
@if ($errors->has('warehouse_id')) {{ $errors->first('warehouse_id') }} @endif
@if(count($purchaseInvoice->purchaseInvoiceAttachments) > 0) @foreach ($purchaseInvoice->purchaseInvoiceAttachments as $index => $file) @endforeach
# {{trans('applang.file_name')}} {{trans('applang.created_at')}} {{trans('applang.actions')}}
{{$index+1}} {{$file->attachments}} {{$file->created_at->format('d-m-Y')}}
@endif

@if ($errors->has('payment_payment_method')) {{ $errors->first('payment_payment_method') }} @endif
@if ($errors->has('payment_transaction_id')) {{ $errors->first('payment_transaction_id') }} @endif
{{trans('applang.back_btn')}}