@lang('messages.date'): {{ @format_date($purchase->transaction_date) }}
@lang('purchase.supplier'):
{!! $purchase->contact->contact_address !!}
@if(!empty($purchase->contact->tax_number))
@lang('contact.tax_no'): {{$purchase->contact->tax_number}}
@endif
@if(!empty($purchase->contact->mobile))
@lang('contact.mobile'): {{$purchase->contact->mobile}}
@endif
@if(!empty($purchase->contact->email))
@lang('business.email'): {{$purchase->contact->email}}
@endif
@if($purchase->document_path)
{{ __('purchase.download_document') }}
@endif
@lang('business.business'):
{{ $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($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
@if(!empty($purchase->location->mobile))
@lang('contact.mobile'): {{$purchase->location->mobile}}
@endif
@if(!empty($purchase->location->email))
@lang('business.email'): {{$purchase->location->email}}
@endif
@lang('purchase.ref_no'): #{{ $purchase->ref_no }}
@lang('messages.date'): {{ @format_date($purchase->transaction_date) }}
@if(!empty($purchase->status))
@lang('purchase.purchase_status'): @if($purchase->type == 'purchase_order'){{$po_statuses[$purchase->status]['label'] ?? ''}} @else {{ __('app.' . $purchase->status) }} @endif
@endif
@if(!empty($purchase->payment_status))
@lang('purchase.payment_status'): {{ __('app.' . $purchase->payment_status) }}
@endif
@if(!empty($custom_labels['purchase']['custom_field_1']))
{{$custom_labels['purchase']['custom_field_1'] ?? ''}}: {{$purchase->custom_field_1}}
@endif
@if(!empty($custom_labels['purchase']['custom_field_2']))
{{$custom_labels['purchase']['custom_field_2'] ?? ''}}: {{$purchase->custom_field_2}}
@endif
@if(!empty($custom_labels['purchase']['custom_field_3']))
{{$custom_labels['purchase']['custom_field_3'] ?? ''}}: {{$purchase->custom_field_3}}
@endif
@if(!empty($custom_labels['purchase']['custom_field_4']))
{{$custom_labels['purchase']['custom_field_4'] ?? ''}}: {{$purchase->custom_field_4}}
@endif
@if(!empty($purchase_order_nos))
@lang('restaurant.order_no'):
{{$purchase_order_nos}}
@endif
@if(!empty($purchase_order_dates))
@lang('app.order_dates'):
{{$purchase_order_dates}}
@endif
@if($purchase->type == 'purchase_order')
@php
$custom_labels = json_decode(session('business.custom_labels'), true);
@endphp
@if(count($medias))
@include('sell.partials.media_table', ['medias' => $medias])
@endif
@endif
| # |
@lang('purchase.product') |
@lang('product.sku') |
@if($purchase->type == 'purchase_order')
@lang( 'app.quantity_remaining' ) |
@endif
@if($purchase->type == 'purchase_order') @lang('app.order_quantity') @else @lang('purchase.purchase_quantity') @endif |
@lang( 'purchase.unit_cost_before_discount' ) |
@lang( 'app.discount_percent' ) |
@if($purchase->type != 'purchase_order')
@if(session('business.enable_lot_number'))
@lang('app.lot_number') |
@endif
@if(session('business.enable_product_expiry'))
@lang('purchase.exp_date') |
@endif
@endif
@lang('sale.subtotal') |
@php
$total_before_tax = 0.00;
@endphp
@foreach($purchase->purchase_lines as $purchase_line)
| {{ $loop->iteration }} |
{{ $purchase_line->product->name }}
@if( $purchase_line->product->type == 'variable')
- {{ $purchase_line->variations->product_variation->name}}
- {{ $purchase_line->variations->name}}
@endif
|
@if( $purchase_line->product->type == 'variable')
{{ $purchase_line->variations->sub_sku}}
@else
{{ $purchase_line->product->sku }}
@endif
|
@if($purchase->type == 'purchase_order')
{{ $purchase_line->quantity - $purchase_line->po_quantity_purchased }} @if(!empty($purchase_line->sub_unit)) {{$purchase_line->sub_unit->short_name}} @else {{$purchase_line->product->unit->short_name}} @endif
|
@endif
{{ $purchase_line->quantity }} @if(!empty($purchase_line->sub_unit)) {{$purchase_line->sub_unit->short_name}} @else {{$purchase_line->product->unit->short_name}} @endif
@if(!empty($purchase_line->product->second_unit) && $purchase_line->secondary_unit_quantity != 0)
{{ $purchase_line->secondary_unit_quantity }} {{$purchase_line->product->second_unit->short_name}}
@endif
|
{{ $purchase_line->pp_without_discount}} |
{{ $purchase_line->discount_percent}} % |
@if($purchase->type != 'purchase_order')
@if(session('business.enable_lot_number'))
{{$purchase_line->lot_number}} |
@endif
@if(session('business.enable_product_expiry'))
@if(!empty($purchase_line->exp_date))
{{ @format_date($purchase_line->exp_date) }}
@endif
|
@endif
@endif
{{ $purchase_line->purchase_price_inc_tax * $purchase_line->quantity }} |
@php
$total_before_tax += ($purchase_line->quantity * $purchase_line->purchase_price);
@endphp
@endforeach
@if(!empty($purchase->type == 'purchase'))
{{ __('sale.payment_info') }}:
| # |
{{ __('messages.date') }} |
{{ __('purchase.ref_no') }} |
{{ __('sale.amount') }} |
{{ __('sale.payment_mode') }} |
{{ __('sale.payment_note') }} |
@php
$total_paid = 0;
@endphp
@forelse($purchase->payment_lines as $payment_line)
@php
$total_paid += $payment_line->amount;
@endphp
| {{ $loop->iteration }} |
{{ @format_date($payment_line->paid_on) }} |
{{ $payment_line->payment_ref_no }} |
{{ $payment_line->amount }} |
{{ $payment_methods[$payment_line->method] ?? '' }} |
@if($payment_line->note)
{{ ucfirst($payment_line->note) }}
@else
--
@endif
|
@empty
|
@lang('purchase.no_payments')
|
@endforelse
@endif
| @lang('purchase.net_total_amount'): |
|
{{ $total_before_tax }} |
| @lang('purchase.discount'): |
(-)
@if($purchase->discount_type == 'percentage')
({{$purchase->discount_amount}} %)
@endif
|
@if($purchase->discount_type == 'percentage')
{{$purchase->discount_amount * $total_before_tax / 100}}
@else
{{$purchase->discount_amount}}
@endif
|
@if( !empty( $purchase->additional_expense_value_1 ) && !empty( $purchase->additional_expense_key_1 ))
| {{ $purchase->additional_expense_key_1 }}: |
(+) |
{{ $purchase->additional_expense_value_1 }} |
@endif
@if( !empty( $purchase->additional_expense_value_2 ) && !empty( $purchase->additional_expense_key_2 ))
| {{ $purchase->additional_expense_key_2 }}: |
(+) |
{{ $purchase->additional_expense_value_2 }} |
@endif
@if( !empty( $purchase->additional_expense_value_3 ) && !empty( $purchase->additional_expense_key_3 ))
| {{ $purchase->additional_expense_key_3 }}: |
(+) |
{{ $purchase->additional_expense_value_3 }} |
@endif
@if( !empty( $purchase->additional_expense_value_4 ) && !empty( $purchase->additional_expense_key_4 ))
| {{ $purchase->additional_expense_key_4 }}: |
(+) |
{{ $purchase->additional_expense_value_4 }} |
@endif
| @lang('purchase.purchase_total'): |
|
{{ $purchase->final_total }} |
@lang('purchase.additional_notes'):
@if($purchase->additional_notes)
{{ $purchase->additional_notes }}
@else
--
@endif
@if(!empty($activities))
{{ __('app.activities') }}:
@includeIf('activity_log.activities', ['activity_type' => 'purchase'])
@endif
{{-- Barcode --}}