Yummytime

{!! __('order_invoice.proforma') !!}

{{--
Yummytime
{!! dateFormat($orderInvoice->created_at , 'd.m.Y') !!}
{!! dateFormat($orderInvoice->invoice_date , 'd.m.Y') !!}
--}}
{!! $order->store_company_name ?? '' !!}
{!! $order->order_address ?? '' !!}
{!! $order->order_email ?? '' !!}
{!! $order->org_number ?? '' !!}
{!! $order->order_dial_code.$order->order_phone ?? '' !!}
{{-- --}} @if($order->proforma_nr) @endif
{!! dateFormat($order->created_at , 'd.m.Y') !!}
{!! $order->user_company_name ?? '' !!}
{!! $order->user_company_address ?? '' !!}
{!! $order->user_invoice_email ?? '' !!}
{!! $order->organization_no ?? '' !!}
{{ "#".orderNumber($order->order_from, $order->order_number, $order->order_prefix, $order->is_offline); }}
{{ "#".$order->proforma_nr }}
@php $rewardApplied = false; $rewardApplied = isset($order->orderItemsList)?$order->orderItemsList->pluck(['reward_applied']):false ?? false; if ($rewardApplied && $rewardApplied->contains(1)) { $rewardApplied = true; }else{ $rewardApplied = false; } @endphp @if($rewardApplied) @endif @php $invoiceTotal = 0; $invoiceMVATotal = 0; @endphp @php $orderNumber = orderNumber($order->order_from, $order->order_number, $order->order_prefix); @endphp {{-- --}} @foreach ($order->orderItemsList as $row) @if($rewardApplied) @endif @if($rewardApplied && $row->reward_applied) @php $subTotal = 0; @endphp @endif @endforeach @php $invoiceTotal += $order->sub_total; $invoiceMVATotal += $order->total_tax; $addColspan = $rewardApplied ? 1 : 0; @endphp @if(isset($employeeCompanyInvoice) && $employeeCompanyInvoice) @else @endif
{!! __('order_invoice.sr_no') !!} {!! __('order_invoice.description') !!} {!! __('order_invoice.qty') !!} {!! __('order_invoice.price') !!}{!! __('order_invoice.discount') !!}{!! __('order_invoice.amount') !!}
{!! __('order_invoice.order_no') !!}: #{!! $orderNumber !!} - {!! date_format( $order->created_at , 'd.m.Y' ) !!} {!! __('order_invoice.emp_code') !!}: {!! $order->employee_no !!}     {!! __('order_invoice.emp_name') !!}: {!! $order->employee_name !!}     {!! __('order_invoice.our_ref') !!}: {!! in_array($order->order_from,['web','android','IOS']) ? __('order_invoice.online_order') : $order->emp_name !!} {!! __('order_invoice.emp_code') !!}: {!! $data->employee_no !!} {!! __('order_invoice.emp_name') !!}: {!! $data->employee_name !!} {!! __('order_invoice.our_ref') !!}: {!! $data->emp_name !!}
{!! $row->id !!} @if($row->is_half==1) @php $halfPizzaData=json_decode($row->item_json); @endphp {{ $halfPizzaData[0]->item_name ." + ".$halfPizzaData[1]->item_name}} @else {{ $row->item_name }} {{ ($row->variation > 0) ? ' - ' . $row->variation_name : "" }} @endif @php $dataJson = isset($row->data_json) && $row->data_json ? json_decode($row->data_json,true) : []; $extraIngredients = []; if(count($dataJson) > 0){ if(isset($dataJson['extra_ingredients'])){ $extraIngredients = $dataJson['extra_ingredients']; $extraIngredients = array_column($extraIngredients,'name','id'); } } @endphp @if( count($extraIngredients) > 0 && $row->is_half == "0")
+ {{ implode(',',$extraIngredients) }} ({!! $row->extra_price !!}) @endif @if($row->is_offer_item ==1 && $row->item_json !="") @php $offerItems=json_decode($row->item_json); $i=0; @endphp @foreach ($offerItems as $oItem)

{{ ++$i.") ". $oItem->item_name }} @if($oItem->variation_name !="") {{ "(".$oItem->variation_name.")" }} @endif

@if($oItem->extra_name !="")

+ {{ $oItem->extra_name }}

@endif @endforeach @endif
{!! $row->quantity !!} {{ numberFormat($subTotal,true,false) }} @if($row->reward_applied) ({!!__('order_invoice.100_per_off')!!}) @endif {!! numberFormat($row->quantity * $subTotal,true,false) !!}
{!! __('order_invoice.sum') !!} ({!! __('order_invoice.order_no') !!} #{!! $orderNumber !!}) {!! numberFormat($order->sub_total,true,false)!!}
{!! __('order_invoice.mva') !!} {!! numberFormat($order->total_tax,true,false)!!}
{!! __('order_invoice.sum') !!} {!! numberFormat($invoiceTotal,true,false) !!}
{!! __('order_invoice.mva') !!} {!! numberFormat($invoiceMVATotal,true,false) !!}
{!! __('order_invoice.employee_paid') !!} {!! '- '.numberFormat(($invoiceTotal+$invoiceMVATotal) - $order->company_partial_payment,true,false) !!}
{!! __('order_invoice.company_paid') !!} {!! numberFormat($order->company_partial_payment,true,false) !!}
{!! __('order_invoice.total') !!} {!! numberFormat($invoiceTotal+$invoiceMVATotal,true,false) !!}