| {{__('admin.receivable')}} | @foreach($payments_type as $key => $payment_type){{ $payment_type['account_name'] }} | @endforeach{{__('admin.total')}} | |||
|---|---|---|---|---|---|
| {{__('admin.Expenses')}} | @if(isset($expensesTotals[-1])){{ Helpers::formatNumber($expensesTotals[-1]) }} | @else0 | @endif @foreach($payments_type as $key => $payment_type) @if(isset($expensesTotals[$payment_type['id']])){{ Helpers::formatNumber($expensesTotals[$payment_type['id']]) }} | @else0 | @endif @endforeach{{ Helpers::formatNumber(array_sum($expensesTotals->toArray())) }} |
| {{ __('admin.SaleReturns') }} | @if(isset($saleReturnsTotals[-1])){{ Helpers::formatNumber($saleReturnsTotals[-1]) }} | @else0 | @endif @foreach($payments_type as $key => $payment_type) @if(isset($saleReturnsTotals[$payment_type['id']])){{ Helpers::formatNumber($saleReturnsTotals[$payment_type['id']]) }} | @else0 | @endif @endforeach{{ Helpers::formatNumber(array_sum($saleReturnsTotals->toArray())) }} |
| {{ __('admin.Sale_invoices') }} | @if(isset($invoiceSalesTotals[-1])){{ Helpers::formatNumber($invoiceSalesTotals[-1]) }} | @else0 | @endif @foreach($payments_type as $key => $payment_type) @if(isset($invoiceSalesTotals[$payment_type['id']])){{ Helpers::formatNumber($invoiceSalesTotals[$payment_type['id']]) }} | @else0 | @endif @endforeach{{ Helpers::formatNumber(array_sum($invoiceSalesTotals)) }} |
| {{__('admin.total')}} | {{ Helpers::formatNumber((!empty($invoiceSalesTotals[-1]) ? $invoiceSalesTotals[-1] : 0) - (!empty($saleReturnsTotals[-1]) ? $saleReturnsTotals[-1] : 0) - (!empty($expensesTotals[-1]) ? $expensesTotals[-1] : 0)) }} | @foreach($payments_type as $key => $payment_type){{ Helpers::formatNumber((!empty($invoiceSalesTotals[$payment_type['id']]) ? $invoiceSalesTotals[$payment_type['id']] : 0) - (!empty($saleReturnsTotals[$payment_type['id']]) ? $saleReturnsTotals[$payment_type['id']] : 0) - (!empty($expensesTotals[$payment_type['id']]) ? $expensesTotals[$payment_type['id']] : 0)) }} | @endforeach{{ Helpers::formatNumber(array_sum($invoiceSalesTotals) - array_sum($saleReturnsTotals->toArray()) - array_sum($expensesTotals->toArray())) }} |
| {{ __('admin.shiftOpenBalance') }} | {{ $employeeShift->stair_balance_at_open }} | {{ __('admin.shiftCloseBalance') }} | {{ $employeeShift->stair_balance_at_close }} | {{ __('admin.totalsOutcome') }} | {{ Helpers::formatNumber(array_sum($invoiceSalesTotals) - array_sum($saleReturnsTotals->toArray()) - array_sum($expensesTotals->toArray())) }} |
| {{ __('admin.payment_type') }} | {{ __('admin.Date') }} | {{ __('admin.Expense_type') }} | {{ __('admin.amount') }} | {{ __('admin.notes') }} | {{ __('admin.total') }} | @php $all_shift_expenses_total_price = 0; @endphp @foreach($expenses as $key1 => $expense) @php $payment_type_expense_count = $expense->count(); $total_payment_type_amount = 0; @endphp @foreach($expense as $key => $e) @php $e = $e->expense_data_object; $total_payment_type_amount += $e['amount']; @endphp
|---|---|---|---|---|---|
| {{ $e['payment_type_name'] }} | @endif{{ $e['date_receipt'] }} | {{ $e['expense_name'] }} | {{ $e['amount'] }} | {{ $e['note'] }} | @if(!$key)@endif @if($key==($payment_type_expense_count-1)) @endif |
| {{ __('admin.total_summation') }} | {{ Helpers::formatNumber($all_shift_expenses_total_price) }} | ||||
| {{ __('admin.payment_type') }} | {{ __('admin.customer_name') }} | {{ __('admin.product_name') }} | {{ __('admin.product_quantity') }} | {{ __('admin.product_price') }} | {{ __('admin.total') }} | @php $payment_type_loop_iteration = -1; $all_shift_returned_items_total_price = 0; @endphp @foreach($saleReturns as $payment_types_id_key => $payment_type_saleReturn) @php $payment_type_loop_iteration++; $customer_loop_iteration = -1; $customer_returned_items_count = 0; $payment_type_customers_count = count($payment_type_saleReturn); @endphp @foreach($payment_type_saleReturn as $customers_id_key => $customer_saleReturn) @php $customer_loop_iteration++; $customer_returned_items_count += count($customer_saleReturn); //echo $payment_type_customers_count . ' ' . $customer_returned_items_count . ' ' . $payment_type_customers_count * $customer_returned_items_count.'
|---|---|---|---|---|---|
| @endif @if($payment_type_customers_count > 1) @if(!$customer_loop_iteration) | 2 | 25 | 50 | ||
| كولا | 5 | 2 | 10 | 2 | 25 | 50 | @endif @foreach($customer_saleReturn as $key => $saleReturn) @php $all_shift_returned_items_total_price += $saleReturn['total_price']; @endphp @if(!$key) @else
| {{ $saleReturn['item_name'] }} | {{ $saleReturn['qty'] }} | {{ $saleReturn['total'] }} | {{ Helpers::formatNumber($saleReturn['total_price']) }} | ||
| {{ __('admin.total_summation') }} | {{ Helpers::formatNumber($all_shift_returned_items_total_price) }} | ||||
| {{ __('admin.payment_type') }} | {{ __('admin.customer_name') }} | {{__('admin.products_count')}} | {{ __('admin.products') }} | {{ __('admin.total_price') }} | {{ __('admin.total_price_for_payment_type') }} | @php $payment_type_loop_iteration = -1; $all_shift_invoice_sales_total_price = 0; @endphp @foreach($invoiceSales as $payment_types_id_key => $payment_type_invoiceSale) @php $payment_type_loop_iteration++; $customer_loop_iteration = -1; $payment_type_shift_invoice_sales_total_price = 0; $customer_invoice_sale_items_count = 0; $payment_type_customers_count = count($payment_type_invoiceSale); @endphp @foreach($payment_type_invoiceSale as $customers_id_key => $customer_invoiceSale) @php $customer_loop_iteration++; $customer_invoice_sale_items_count += count($customer_invoiceSale); //echo $payment_type_customers_count . ' ' . $customer_invoice_sale_items_count . ' ' . $payment_type_customers_count * $customer_invoice_sale_items_count.'
|---|---|---|---|---|---|
| @endif @if($payment_type_customers_count > 1) @if(!$customer_loop_iteration) | |||||
| @endif @foreach($customer_invoiceSale as $key => $invoiceSale) @php $all_shift_invoice_sales_total_price += round($invoiceSale['total_tax'],Config('app.system_digit')); $payment_type_shift_invoice_sales_total_price += round($invoiceSale['total_tax'],Config('app.system_digit')); @endphp @if(!$key) @else | |||||
| {{ $invoiceSale['items_count'] }} | {{ $invoiceSale['items_list'] }} | {{ Helpers::formatNumber($invoiceSale['total_tax']) }} | |||
| {{ __('admin.total_summation') }} | {{ Helpers::formatNumber($all_shift_invoice_sales_total_price) }} | {{ Helpers::formatNumber($all_shift_invoice_sales_total_price) }} | |||