@php $payment_methods = []; if ($Paymethods) { foreach ($Paymethods as $Paymethod) { $payment_methods[$Paymethod->payment_key] = $Paymethod->payment_key; } } $SimplePaymentMain= []; if(!empty($establishmentData)){ foreach($establishmentData as $data){ $estaId = $data['establishmentId']; $SimplePaymentMain['empty_key'][$estaId] = $data['business_name']; $SimplePaymentMain['gross_sales'][$estaId] = $data['total_gross_sales']; $SimplePaymentMain['discounts'][$estaId] = $data['total_discount']; $SimplePaymentMain['repayments'][$estaId] = '0.00'; $SimplePaymentMain['net_sales'][$estaId] = $data['total_net_sales']; $SimplePaymentMain['non_revenue_items'][$estaId] = '0.00'; $SimplePaymentMain['gift_card_activations'][$estaId] = '0.00'; if(Helper::widgetAccess('show_column_tax_amount')){ $SimplePaymentMain['taxes_and_fees'][$estaId] = $data['total_tax_amount']; } $SimplePaymentMain['surcharges'][$estaId] = $data['total_surcharge']; $SimplePaymentMain['tips'][$estaId] = $data['total_tip_amount']; $SimplePaymentMain['service_charge'][$estaId] = $data['total_service_charge']; $SimplePaymentMain['service_charge_cash'][$estaId] = $data['total_service_charge_cash']; $SimplePaymentMain['service_charge_card'][$estaId] = $data['total_service_charge_card']; $SimplePaymentMain['amount_collected'][$estaId] = $data['total_order_amount']; $SimplePaymentMain['cash_payments'][$estaId] = $data['total_cash_amount']; $SimplePaymentMain['card_payments'][$estaId] = $data['total_card_amount']; $SimplePaymentMain['CreditM'][$estaId] = $data['total_CreditM']; if ($payment_methods) { foreach ($payment_methods as $payment_method) { $pay_method = 'total_'.$payment_method; $SimplePaymentMain[$payment_method][$estaId] = $data[$pay_method]; } } $SimplePaymentMain['total_payments'][$estaId] = $data['total_payments']; /*$SimplePaymentMain['refunds_card_only'][$estaId] = '0.00'; $SimplePaymentMain['discounts_payments'][$estaId] = '0.00'; $SimplePaymentMain['total_net_payments'][$estaId] = $data['total_net_sales'];*/ } } @endphp @if(!empty($SimplePaymentMain)) @php $i=0; $datetimes = $timeFilter['start'].' '.$timeFilter['end']; @endphp {{ __('lbl.establishment') }} : {{ $storeName }} ( {{ $datetimes }} ) @foreach($SimplePaymentMain as $key => $storeData) @if(in_array($key,$payment_methods)) @else @endif @foreach($storeData as $MainData) @php $dollar_sign = $i==0 ? '' : ''; $main_number = $key=='empty_key' ? $MainData : number_format((float)$MainData,2); $values = substr($key,-2) =='_b' || $i==0 ? ''.$dollar_sign.''.$main_number.'' : $dollar_sign.''.$main_number; @endphp @endforeach @if($i==10) @php $colspan = count($storeData)+1; @endphp @endif @php $i++; @endphp @endforeach
{{ $key }} {{ __('lbl.'.$key.'') }}{{ $values }}
{{ __('lbl.payment_total') }}
@endif