@php $pdf_generation_for = ['Original for Buyer']; @endphp @foreach($pdf_generation_for as $pdf_for)
@lang('lang_v1.purchase_order')
{{--
{{$pdf_for}}
--}}
@if(!empty($logo)) Logo @endif
@if(!empty($location_details->custom_field1) && !empty($custom_labels['location']['custom_field_1'])) {{$custom_labels['location']['custom_field_1']}} : {{$location_details->custom_field1}} @endif
@if(!empty($purchase->business->tax_number_1))
{{$purchase->business->tax_label_1}}: {{$purchase->business->tax_number_1}} @endif @if(!empty($purchase->business->tax_number_2)) , {{$purchase->business->tax_label_2}}: {{$purchase->business->tax_number_2}} @endif
{!!$purchase->business->name!!}
{{ $purchase->location->name }} @if(!empty($purchase->location->landmark))
{{$purchase->location->landmark}} @endif @if(!empty($purchase->location->city) || !empty($purchase->location->state) || !empty($purchase->location->country)) {{implode(',', array_filter([$purchase->location->city, $purchase->location->state, $purchase->location->country]))}} @endif @if(!empty($location_details->mobile) || !empty($location_details->alternate_number))
@lang('lang_v1.contact_no') : {{!empty($location_details->mobile) ? $location_details->mobile .', ': ''}} {{$location_details->alternate_number}} @endif @if(!empty($location_details->website))
@lang('lang_v1.website'): {!!$location_details->website!!} @endif @if(!empty($location_details->email))
@lang('business.email'): {!!$location_details->email!!} @endif @if(!empty($location_details->custom_field2) && !empty($custom_labels['location']['custom_field_2']))
{{$custom_labels['location']['custom_field_2']}} : {{$location_details->custom_field2}} @endif @if(!empty($location_details->custom_field3) && !empty($custom_labels['location']['custom_field_3']))
{{$custom_labels['location']['custom_field_3']}} : {{$location_details->custom_field3}} @endif @if(!empty($location_details->custom_field4) && !empty($custom_labels['location']['custom_field_4']))
{{$custom_labels['location']['custom_field_4']}} : {{$location_details->custom_field4}} @endif
@lang('lang_v1.po_no'): #{{ $purchase->ref_no }}
@lang('lang_v1.order_date'): {{ @format_date($purchase->transaction_date) }}
{{-- Due date: {{ @format_date($purchase->due_date) }}
--}} @if(!empty($purchase->shipping_custom_field_1)) {{$custom_labels['shipping']['custom_field_1'] ?? ''}}: {{$purchase->shipping_custom_field_1}}
@endif @lang('lang_v1.delivery_date'): @if(!empty($purchase->delivery_date)) {{@format_date($purchase->delivery_date)}} @else {{'-'}} @endif
@lang('purchase.supplier')
@php $customer_address = []; if (!empty($purchase->contact->supplier_business_name)) { $customer_address[] = $purchase->contact->supplier_business_name; } if (!empty($purchase->contact->address_line_1)) { $customer_address[] = '
' . $purchase->contact->address_line_1; } if (!empty($purchase->contact->address_line_2)) { $customer_address[] = '
' . $purchase->contact->address_line_2; } if (!empty($purchase->contact->city)) { $customer_address[] = '
' . $purchase->contact->city; } if (!empty($purchase->contact->state)) { $customer_address[] = $purchase->contact->state; } if (!empty($purchase->contact->country)) { $customer_address[] = $purchase->contact->country; } if (!empty($purchase->contact->zip_code)) { $customer_address[] = '
' . $purchase->contact->zip_code; } if (!empty($purchase->contact->name)) { $customer_address[] = '
' . $purchase->contact->name; } if (!empty($purchase->contact->mobile)) { $customer_address[] = '
' .$purchase->contact->mobile; } if (!empty($purchase->contact->landline)) { $customer_address[] = $purchase->contact->landline; } @endphp {!! implode(', ', $customer_address) !!} @if(!empty($purchase->contact->email))
@lang('business.email'): {{$purchase->contact->email}} @endif @if(!empty($purchase->contact->tax_number))
@lang('contact.tax_no'): {{$purchase->contact->tax_number}} @endif @if(!empty($custom_labels['contact']['custom_field_1']) && !empty($purchase->contact->custom_field1))
{{$custom_labels['contact']['custom_field_1']}} : {{$purchase->contact->custom_field1}} @endif @if(!empty($custom_labels['contact']['custom_field_2']) && !empty($purchase->contact->custom_field2))
{{$custom_labels['contact']['custom_field_2']}} : {{$purchase->contact->custom_field2}} @endif @if(!empty($custom_labels['contact']['custom_field_3']) && !empty($purchase->contact->custom_field3))
{{$custom_labels['contact']['custom_field_3']}} : {{$purchase->contact->custom_field3}} @endif @if(!empty($custom_labels['contact']['custom_field_4']) && !empty($purchase->contact->custom_field4))
{{$custom_labels['contact']['custom_field_4']}} : {{$purchase->contact->custom_field4}} @endif @if(!empty($custom_labels['contact']['custom_field_5']) && !empty($purchase->contact->custom_field5))
{{$custom_labels['contact']['custom_field_5']}} : {{$purchase->contact->custom_field5}} @endif @if(!empty($custom_labels['contact']['custom_field_6']) && !empty($purchase->contact->custom_field6))
{{$custom_labels['contact']['custom_field_6']}} : {{$purchase->contact->custom_field6}} @endif @if(!empty($custom_labels['contact']['custom_field_7']) && !empty($purchase->contact->custom_field7))
{{$custom_labels['contact']['custom_field_7']}} : {{$purchase->contact->custom_field7}} @endif @if(!empty($custom_labels['contact']['custom_field_8']) && !empty($purchase->contact->custom_field8))
{{$custom_labels['contact']['custom_field_8']}} : {{$purchase->contact->custom_field8}} @endif @if(!empty($custom_labels['contact']['custom_field_9']) && !empty($purchase->contact->custom_field9))
{{$custom_labels['contact']['custom_field_9']}} : {{$purchase->contact->custom_field9}} @endif @if(!empty($custom_labels['contact']['custom_field_10']) && !empty($purchase->contact->custom_field10))
{{$custom_labels['contact']['custom_field_10']}} : {{$purchase->contact->custom_field10}} @endif
@lang('lang_v1.delivery_at')
{!! $purchase->location->location_address !!}
{{--@lang('lang_v1.dispatch_from'): @if(!empty($purchase->contact->city)) {{$purchase->contact->city}} @else {{'-'}} @endif --}}
@php $show_cat_code = !empty($invoice_layout->show_cat_code) && $invoice_layout->show_cat_code == 1 ? true : false; $show_brand = !empty($invoice_layout->show_brand) && $invoice_layout->show_brand == 1 ? true : false; $show_sku = !empty($invoice_layout->show_sku) && $invoice_layout->show_sku == 1 ? true : false; @endphp @if($show_cat_code) @endif @php $total = 0.00; $is_empty_row_looped = true; $tax_array = []; @endphp @foreach($purchase->purchase_lines as $purchase_line) iteration % 2 !== 0) class="odd" @endif style="border:hidden;"> @if($show_cat_code) @endif @if(count($purchase->purchase_lines) < 6 && $is_empty_row_looped && $loop->last) @php $i = 0; $is_empty_row_looped = false; $loop_until = 0; if (count($purchase->purchase_lines) == 1) { $loop_until = 5; } elseif (count($purchase->purchase_lines) == 2) { $loop_until = 4; } elseif (count($purchase->purchase_lines) == 3) { $loop_until = 3; } elseif (count($purchase->purchase_lines) == 4) { $loop_until = 3; } @endphp @for($i; $i<= $loop_until ; $i++) @if($show_cat_code) @endif @endfor @endif @endforeach
# {{$invoice_layout->table_product_label}} {{$invoice_layout->cat_code_label}} {{$invoice_layout->table_qty_label}} {{$invoice_layout->table_unit_price_label}} {{$invoice_layout->table_subtotal_label}}
{{$loop->iteration}} {{ $purchase_line->product->name }} @if( $purchase_line->product->type == 'variable') - {{ $purchase_line->variations->product_variation->name}} - {{ $purchase_line->variations->name}} @endif @if($show_sku) , {{$purchase_line->variations->sub_sku}} @endif @if($show_brand && !empty($purchase_line->product->brand)) , {{$purchase_line->product->brand->name ?? ''}} @endif {{ $purchase_line->product->category->short_code ?? '' }} {{@format_quantity($purchase_line->quantity)}} @format_currency($purchase_line->purchase_price) @php $total += ($purchase_line->quantity * $purchase_line->purchase_price); if (!empty($purchase_line->tax_id)) { $tax_array[$purchase_line->tax_id][] = ($purchase_line->item_tax * $purchase_line->quantity); } @endphp @format_currency($purchase_line->quantity * $purchase_line->purchase_price)
           
{{$invoice_layout->sub_total_label}} @format_currency($total)
@if($purchase->additional_notes) {{ $purchase->additional_notes }} @else -- @endif @if(!empty($tax_array)) @foreach($tax_array as $key => $value) {{$taxes->where('id', $key)->first()->name}} ({{$taxes->where('id', $key)->first()->amount}}%) : @format_currency(array_sum($value))
@endforeach @endif {{$invoice_layout->total_label}} : @format_currency($purchase->final_total)
{!!ucfirst($total_in_words)!!}
@if(!empty($invoice_layout->footer_text)) {!!$invoice_layout->footer_text!!} @endif
@lang('lang_v1.checked_by') @lang('lang_v1.prepared_by')
{{$purchase->sales_person->user_full_name}}


@lang('lang_v1.for_business', ['business' => $purchase->business->name])

@if(!empty($last_purchase)) {{$last_purchase->sales_person->user_full_name}} @endif
{{__('lang_v1.authorized_signatory')}}
@php $bottom = '5px'; if (count($purchase->purchase_lines) >= 3) { $bottom = '-15px'; } @endphp
This is a computer generated document, no signature required.
@if (!$loop->last) @endif @endforeach