{{-- Excel table title format start --}}
{{ config('settings.company_name') }}
{{ config('settings.address_1') }}
{{ $heading }}
@if ($search_by['from'] && $search_by['to']) From: {{ $transaction->date_format($search_by['from']) }} To: {{ $transaction->date_format($search_by['to']) }} @else {{ 'Upto ' . $transaction->date_format(now()) }} @endif
{{-- Excel title format end --}} @if (!$items['customers']->isEmpty()) @foreach ($items['customers'] as $key => $customer) @endforeach
CUSTOMERS
S. No. {{__('lang.head_code')}} {{__('lang.name')}} Father / Husband Name {{__('lang.phone')}} Email Mailing Address NIC Created At
{{ $loop->iteration }} {{ $customer->head->code }} {{ $customer->name }} {{ $customer->father_or_husband_name }} {{ $customer->phone }} {{ $customer->email }} {{ $customer->mailing_address }} {{ $customer->nid }} {{ date(config('settings.date_format'), strtotime($customer->created_at)) }}

@endif @if (!$items['vendors']->isEmpty()) @foreach ($items['vendors'] as $key => $vendor) {{-- --}} @endforeach {{-- --}}
VENDORS
S. No. {{__('lang.head_code')}} {{__('lang.name')}} {{__('lang.phone')}} Email Mailing Address Created At
{{ $loop->iteration }} {{ $vendor->head->code }} {{ $vendor->name }} {{ $vendor->phone }} {{ $vendor->email }} {{ $vendor->mailing_address }} {{ date(config('settings.date_format'), strtotime($vendor->created_at)) }} {{ $transaction->convert_money_format(100) }}
TOTAL

@endif @if (!$items['purchase_requisitions']->isEmpty()) @php $total_pr_amount = 0; @endphp @foreach ($items['purchase_requisitions'] as $key => $pr) @php $total_pr_amount += $pr->amount; @endphp @endforeach
PAYMENT REQUISITIONS
S. No. PR No. Employee Project Remarks Amount {{$transaction->systemSettingCurrency()}} Created At
{{ $loop->iteration }} {{ $pr->requisition_id }} {{ $pr->employee_id }} {{ $pr->branch->name }} {{ $pr->comment }} {{ $transaction->convert_money_format($pr->amount) }} {{ date(config('settings.date_format'), strtotime($pr->created_at)) }}
Total {{ $transaction->convert_money_format($total_pr_amount) }}

@endif @if (!$items['purchase_orders']->isEmpty()) @php $total_of_po_amount = 0; $total_po_discount = 0; $total_po_amount = 0; @endphp @foreach ($items['purchase_orders'] as $key => $po) @php $total_of_po_amount += $po->totalAmount; $total_po_discount += $po->totalPODiscount; $total_po_amount += $po->totalPOAmount; @endphp @endforeach
PURCHASE ORDERS
S. No. PO No. PR No. Vendor Project Issue Date Delivery Date Total {{$transaction->systemSettingCurrency()}} Discount Paid Amount {{$transaction->systemSettingCurrency()}} GRN Status Payment Status Created At
{{ $loop->iteration }} {{ $po->purchase_id }} {{ $po->requisition_id }} {{ $po->vendor->name }} {{ $po->branch->name }} {{ date(config('settings.date_format'), strtotime($po->issuing_date)) }} {{ date(config('settings.date_format'), strtotime($po->date_of_delevery)) }} {{ $transaction->convert_money_format($po->totalAmount) }} {{ $transaction->convert_money_format($po->totalPODiscount) }} {{ $transaction->convert_money_format($po->totalPOAmount) }} {{ $po->status }} {{ $po->payment_status }} {{ date(config('settings.date_format'), strtotime($po->created_at)) }}
Total {{ $transaction->convert_money_format($total_of_po_amount) }} {{ $transaction->convert_money_format($total_po_discount) }} {{ $transaction->convert_money_format($total_po_amount) }}

@endif @if (!$items['sells']->isEmpty()) @php $total_cost_amount = 0; $total_additional_cost = 0; $total_discount_amount = 0; $total_net_amount = 0; $total_employee_rebate = 0; $total_external_employee_rebate = 0; @endphp @foreach ($items['sells'] as $key => $sell) @php $total_cost_amount += $sell->cost_amount; $total_additional_cost += $sell->additional_charges; $total_discount_amount += $sell->discount_amount; $total_net_amount += $sell->net_amount; $total_employee_rebate += $sell->employee_rebate; $total_external_employee_rebate += $sell->external_employee_rebate; @endphp @endforeach
SELLS
S. No. Customer Registration No. Project I Rebate Employee I Rebate Amount {{$transaction->systemSettingCurrency()}} E Rebate Employee E Rebate Amount {{$transaction->systemSettingCurrency()}} Amount {{$transaction->systemSettingCurrency()}} Additional Charges Discount Net Amount {{$transaction->systemSettingCurrency()}} Sell Date Created At
{{ $loop->iteration }} {{ $sell->customer->name }} {{ $sell->registration_no }} {{ $sell->branch->name }} {{ $sell->employee->name }} {{ $transaction->convert_money_format($sell->employee_rebate) }} {{ $sell->ext_employee->name }} {{ $transaction->convert_money_format($sell->external_employee_rebate) }} {{ $transaction->convert_money_format($sell->cost_amount) }} {{ $transaction->convert_money_format($sell->additional_charges) }} {{ $transaction->convert_money_format($sell->discount_amount) }} {{ $transaction->convert_money_format($sell->net_amount) }} {{ date(config('settings.date_format'), strtotime($sell->sale_date_v2)) }} {{ date(config('settings.date_format'), strtotime($sell->created_at)) }}
Total {{ $transaction->convert_money_format($total_employee_rebate) }} {{ $transaction->convert_money_format($total_external_employee_rebate) }} {{ $transaction->convert_money_format($total_cost_amount) }} {{ $transaction->convert_money_format($total_additional_cost) }} {{ $transaction->convert_money_format($total_discount_amount) }} {{ $transaction->convert_money_format($total_net_amount) }}

@endif @if (!$items['receipts']->isEmpty()) @php $rv_total_amount = 0; @endphp @foreach ($items['receipts'] as $key => $rv) @if ($rv->type == NULL || $rv->type =="") @else @endif @if($rv->type == 'general' && !empty($rv->customer_id)) @else @endif @php $rv_total_amount += $rv->actual_amount; @endphp @endforeach
RECEIPTS
S. No. Receipt No. Customers / Heads Registration No. Unit No Payment Mode of Payment Amount {{$transaction->systemSettingCurrency()}} Date of Collection Created At
{{ $loop->iteration }}{{ $rv->receipt_no }} {{ $rv->receipt_no }} {{ App\Models\IncomeExpenseHead::find($rv->customer_id)->name }} {{ $rv->customer }} {{ $rv->registration_no ?? '-' }} {{ App\Models\Sell::find($rv->sell_id)->product_id ?? '-' }} {{ $rv->term }} {{ (strtolower($rv->made_of_payment) == 'bank' ? 'Cheque' .' - '. App\Models\IncomeExpenseHead::bankdetail()->where('id',$rv->bank_id)->first()->name : ucwords($rv->made_of_payment) ) }} {{ $transaction->convert_money_format($rv->actual_amount) }} {{ !empty($rv->date_of_collection) ? $rv->date_of_collection : date(config('settings.date_format'), strtotime($rv->created_at)) }} {{ date(config('settings.date_format'), strtotime($rv->created_at)) }}
Total {{ $transaction->convert_money_format($rv_total_amount) }}

@endif @if (!$items['payment_vouchers']->isEmpty()) @php $total_payments = 0; @endphp @foreach ($items['payment_vouchers'] as $key => $pv) @php $total_payments+= $pv->amount; @endphp @endforeach
PAYMENT VOUCHERS
S. No. PV No. {{__('lang.type')}} Project Mode of Payment Payee Name Amount {{$transaction->systemSettingCurrency()}} Voucher Date Created At
{{ $loop->iteration }} {{ $pv->pv_no }} {{ ucfirst(str_replace('_', " ", $pv->type)) }} {{ $pv->branch->name }} {{ (strtolower($pv->mode_of_payment) == 'bank' ? 'Cheque' .' - '. App\Models\IncomeExpenseHead::bankdetail()->where ('id',$pv['report_transaction_cr']->income_expense_head_id)->first()->name :ucwords($pv->mode_of_payment)) }} {{ $pv->payee_name }} {{ $transaction->convert_money_format($pv->amount) }} {{ date(config('settings.date_format'), strtotime($pv->voucher_date)) }} {{ date(config('settings.date_format'), strtotime($pv->created_at)) }}
Total {{ $transaction->convert_money_format($total_payments) }}

@endif @if (!$items['journal_vouchers']->isEmpty()) @php $jv_total_cr_amount = 0; $jv_total_dr_amount = 0; @endphp @foreach ($items['journal_vouchers'] as $key => $jv) @php $jv_total_cr_amount += $jv->cr; $jv_total_dr_amount += $jv->dr; @endphp @endforeach
JOURNAL VOUCHERS
S. No. JV No. Project Head Of Account Particulars CR {{$transaction->systemSettingCurrency()}} DR {{$transaction->systemSettingCurrency()}} Voucher Date Created At
{{ $loop->iteration }} {{ $jv->voucher_no }} {{ $jv->name }} {{ App\Models\IncomeExpenseHead::find($jv->income_expense_head_id)->name }} {{ $jv->particulars }} {{ $transaction->convert_money_format($jv->cr) }} {{ $transaction->convert_money_format($jv->dr) }} {{ date(config('settings.date_format'), strtotime($jv->voucher_date)) }} {{ !empty($jv->created_at) ? date(config('settings.date_format'), strtotime($jv->created_at)) : date(config('settings.date_format'), strtotime($jv->voucher_date)) }}
Total {{ $transaction->convert_money_format($jv_total_cr_amount) }} {{ $transaction->convert_money_format($jv_total_dr_amount) }}
@endif @if (!$items['refunds']->isEmpty()) @php $rf_total_amount = 0; $rf_total_discount_amount = 0; $rf_total_refund_amount = 0; @endphp @foreach ($items['refunds'] as $key => $rc) @php $rf_total_amount += $rc->actual_amount; $rf_total_discount_amount += $rc->discounted_amount_deduction; $rf_total_refund_amount += $rc->total_refund_amount; @endphp @endforeach
REFUNDS
S No. JV No. Project Customer Actual Amount {{$transaction->systemSettingCurrency()}} Discount {{$transaction->systemSettingCurrency()}} Total Refund {{$transaction->systemSettingCurrency()}} Payment Status Created At
{{ $loop->iteration }} {{ $rc->refrence_computation }} {{ $rc->branch->name }} {{ $rc->customer->name }} {{ $transaction->convert_money_format($rc->actual_amount) }} {{ $transaction->convert_money_format($rc->discounted_amount_deduction) }} {{ $transaction->convert_money_format($rc->total_refund_amount) }} {{ $rc->payment_status }} {{date(config('settings.date_format'), strtotime($rc->created_at)) }}
Total {{ $transaction->convert_money_format($rf_total_amount) }} {{ $transaction->convert_money_format($rf_total_discount_amount) }} {{ $transaction->convert_money_format($rf_total_refund_amount) }}
@endif