@foreach ($accountingVouchers as $accountingVoucher) @if ($logoPath != null)
@else

{{ $company->name }}

@endif {{--

{{ $company->name }}

--}}

{{ $company->address }}

PH:{{ $company->phone }}

GST:{{ $company->gst }}


@else @foreach ($paymentLedgers as $paymentLedger) @php $ledger = App\Models\AccountingVoucherDetails::where( 'accounting_voucher_id', $accountingVoucher->id, ) ->where('ledger_id', $paymentLedger->id) ->first(); @endphp @if ($ledger != null) {{ $paymentLedger->name }}({{ $ledger->amount }}), @endif @endforeach @endif
Party: @if ($accountingVoucher->debit_ledger_id != null) {{ $accountingVoucher->debitLedger->name }}
Billed Staff:{{ $accountingVoucher->user ? $accountingVoucher->user->name : '' }} Date:{{ date('d-m-Y', strtotime($accountingVoucher->voucher_date)) }}
Time :{{ \Carbon\Carbon::parse($accountingVoucher->created_at)->timezone('Asia/Kolkata')->format('h:i A') }}
Staff:{{ $accountingVoucher->costCenter ? $accountingVoucher->costCenter->name : '' }} Invoice No:{{ $accountingVoucher->voucher_number }}

@foreach ($accountingVoucher->items as $key => $item) @endforeach @if ($accountingVoucher->items->count() < 5) @for ($i = $accountingVoucher->items->count(); $i <= 4; $i++) @endfor @endif @if ($accountingVoucher->sales_return_id != null) @php $returnAmount = \App\Models\AccountingVoucher::find($accountingVoucher->sales_return_id)->amount; $netAmount = $accountingVoucher->amount - $returnAmount; @endphp @else @if ( $accountingVoucher->debitLedger != null && !in_array($accountingVoucher->debitLedger->group->name, ['Cash in hand', 'Bank Accounts'])) @php if ($accountingVoucher->previousBalanceDrCr == 'Dr') { $nettotal = $accountingVoucher->previousBalance + $accountingVoucher->amount; } elseif ($accountingVoucher->previousBalanceDrCr == 'Cr') { if ($accountingVoucher->previousBalance > $accountingVoucher->amount) { $nettotal = $accountingVoucher->previousBalance - $accountingVoucher->amount; } else { $nettotal = $accountingVoucher->amount - $accountingVoucher->previousBalance; } } else { $nettotal = $accountingVoucher->previousBalance + $accountingVoucher->amount; } @endphp @endif @endif
Items Tax% Qty Rate Amount
{{ $key + 1 }} {{ $item->stockItem->name }} {{ $item->gst_per }} {{ $item->quantity }} {{ number_format($item->price_inc_tax, 2) }} {{ number_format($item->total, 2) }}
           
 

Total

{{ number_format($accountingVoucher->items->sum('total'), 2) }}

Discount

{{ number_format($accountingVoucher->discount, 2) }}

Round Off

{{ number_format($accountingVoucher->round_off, 2) }}

Return Amount

{{ number_format($returnAmount, 2) }}

Net Amount

{{ number_format($netAmount, 2) }}

Bill Amount

{{ number_format($accountingVoucher->amount, 2) }}

Previous Day Balance

{{ number_format($accountingVoucher->previousBalance, 2) }} {{ $accountingVoucher->previousBalanceDrCr }}

Closing Balance

{{ number_format($accountingVoucher->totalOutstanding, 2) }} {{ $accountingVoucher->totalOutstandingDrCr }}

 

Tax Details

Taxable Amount

{{ number_format($accountingVoucher->items->sum('taxable_value'), 2) }}

Tax Amount

{{ number_format($accountingVoucher->items->sum('cgst') + $accountingVoucher->items->sum('sgst') + $accountingVoucher->items->sum('igst'), 2) }}

@php $items = \App\Models\AccountingVoucherItem::where( 'accounting_voucher_id', $accountingVoucher->id, ) ->join('stock_items', 'stock_items.id', '=', 'accounting_voucher_items.stock_item_id') ->select( 'stock_items.gst', DB::raw('SUM(accounting_voucher_items.cgst) as cgst'), DB::raw('SUM(accounting_voucher_items.sgst) as sgst'), ) ->groupBy('stock_items.gst') ->get(); @endphp @foreach ($items as $item) @endforeach
Tax Rate CGST SGST
{{ $item->gst }}% {{ $item->cgst }} {{ $item->sgst }}
{!! $company->terms_conditions !!}

THANK YOU FOR SHOPPING WITH US

@if ($accountingVouchers->last() != $accountingVoucher)
@endif @endforeach