@php $printData['start_date'] = Request()->start_date ? date('d-M-Y', strtotime(Request()->start_date)) : date('d-M-Y'); $printData['end_date'] = Request()->end_date ? date('d-M-Y', strtotime(Request()->end_date)) : date('d-M-Y'); // $routeName=Route::currentRouteName(); $routeName = str_replace('_api', '', Route::currentRouteName()); $printData = getPrintData($routeName, []); @endphp {!! $printData['head'] !!}
{{-- --}} @php $amount = 0; $damount = 0; $routeLink = ['', 'purchase', 'purchase', 'sell', 'sell-return', 'adjustment', 'adjustment', 'adjustment', 'issue', 'issue-return', 'transfer-out', 'transfer-in', 'production', 'opening']; @endphp @forelse($journals->groupBy('voucher_id') as $journalsEntry) @if (!isset($journalsEntry?->first()->voucher->voucher_no)) @continue @endif @php $reff = $journalsEntry->first()->voucher->reffInvoice ?? $journalsEntry?->first()?->voucher->reffFgInvoice; $printUrlArray = ['', 'purchase-print?id=', 'purchase-print?id=', 'sell-print?id=', 'sell-print?id=', 'adjustment-print?id=', 'adjustment-print?id=', 'adjustment-print?id=', 'issue-print?id=', 'issue-print?id=', 'store_transfer-print?model=0&store_invoice_id=', 'store_transfer-print?model=1&store_invoice_id=', 'production-print?id=', 'opening-print?id=', '', '', 'adjustment-print?id=', 'purchase-contract-print?id=', 'sales-contract-print?id=']; @endphp @php $time = strtotime($journalsEntry->first()->voucher->date); $date = date('d-M-Y', $time); $ledger_name = ''; $damountHtml = ''; $amountHtml = ''; $title = ''; $checkAmt = 0; $checkAmtC = 0; foreach ($journalsEntry->groupBy('group_type') as $journalsEntryGroup) { // ->sortBy('group_type') foreach ($journalsEntryGroup as $jr) { $ledger_name .= ($jr->type == 1 ? '        ' : '') . ($jr->globalLedger ? $jr->globalLedger->name : ''); if ($jr->voucher->reffParentVoucher) { $ledger_name .= ' [ ' . getNameLedgerName($jr->voucher->reffParentVoucher, $jr->type, $jr->reff_jr_id) . ']
'; $title .= ' {id :' . $jr->id . ' , reff_jr_id :' . $jr->reff_jr_id . ', voucher :' . $jr->voucher_id . ' parent_voucher :' . $jr->voucher->reffParentVoucher->id . '}'; } else { $ledger_name .= ($jr->refLedger && $jr->ledger_id != $jr->reff_no ? ' [ ' . $jr->refLedger->name . ' ]' : '') . '
'; } if ($jr->type == 0) { $damountHtml .= number_format($jr->amount, 2) . '
'; $amountHtml .= '
'; $damount = $damount + $jr->amount; $checkAmt = $checkAmt + $jr->amount; } else { $amountHtml .= number_format($jr->amount, 2) . '
'; $damountHtml .= '
'; $amount = $amount + $jr->amount; $checkAmtC = $checkAmtC + $jr->amount; } } } @endphp {{-- --}} @empty @endforelse
{{ __('obs.voucher') }} {{ __('obs.no') }} {{ __('obs.reff') }} {{ __('obs.no') }} {{ __('obs.date') }} {{ __('obs.account') }} {{ __('obs.title') }}Description{{ __('obs.debit') }} {{ __('obs.credit') }}
{{ $journalsEntry->first()->voucher->voucher_no ?? '' }} @if (!empty(env('APP_SHOW_WAREHOUSE_ID')))
{{ $journalsEntry->first()->voucher->warehouse_id ?? '' }}
{{ $journalsEntry->first()->voucher->id ?? '' }} @endif
@if ($reff) @if (!$reff->ref_type) @endif {{ $reff->invoice_no }}({{ strtoupper(getProductLine()[$reff->line]) }}) @endif {{-- --}} {{ $date }} {!! $ledger_name !!}{!! $damountHtml !!} {!! $amountHtml !!}
{{ $journalsEntry->first()->voucher->note }} @if (Request()->check)
{{ $title }} @endif
{{ number_format($checkAmt, 2) }} {{ number_format($checkAmtC, 2) }}
{{ __('obs.no_data') }}
{{ __('obs.total') }} {{ __('obs.transaction') }} : {{ number_format($damount, 2) }} {{ number_format($amount, 2) }}
{!! $printData['foot'] !!}