@include('layouts.header')
@include('layouts.nav') @include('layouts.sidebar')

Transaction Add Payment

@if (session('success')) @endif @if (session('deleteStatus')) @endif @if (session('updateStatus')) @endif
{{-- @dd($transaction); --}}
Transaction Name -{{ $transaction->transaction_name }}
@php $groupedPayments = $payment->groupBy('transaction_id'); @endphp @foreach ($groupedPayments as $transactionId => $payments) @php $sumInAmount = $payments->where('payment_status', 'IN')->sum('amount'); $sumOutAmount = $payments->where('payment_status', 'OUT')->sum('amount'); @endphp
Amount: {{ number_format($sumInAmount - $sumOutAmount) }}
@endforeach {{-- Modal Content --}}
@php $no = '1'; @endphp @foreach ($payment as $index => $payments) @php $no++; @endphp @endforeach
No Account Name Status Amount Description Action
{{ $no }} @foreach ($accounts as $account) @if ($payments->account_id == $account->id) {{ $account->account_name }} @endif @endforeach {{ $payments->payment_status }} @if ($index == 0) (Invoice) @elseif ($index == 1) (POS) @elseif ($index == 2) (Purchase Order) @elseif ($index == 3) (Purchase Return) @elseif ($index == 4) (Sale Return Invoice) @elseif ($index == 5) (Sale Return POS) @elseif($index == 6) (Receivable Invoice) @elseif($index == 7) (Payable Purchase Order) @elseif($index == 8) (Expense) @endif {{ $payments->amount }} {{ $payments->note ?? 'N/A' }} @if ( $index == 0 || $index == 1 || $index == 2 || $index == 3 || $index == 4 || $index == 5 || $index == 6 || $index == 7 || $index == 8) @else @endif
@php $no = '1'; @endphp @foreach ($invoices as $invoice) @if ($invoice->total == $invoice->deposit) @elseif($invoice->total > $invoice->deposit && $invoice->deposit > 0) @else @endif @php $no++; @endphp @endforeach
No Invoice No. Location Deposit Balance Total Payment Status Invoice Date
{{ $no }} {{ $invoice->invoice_no }} @foreach ($warehouses as $warehouse) @if ($warehouse->id == $invoice->branch) {{ $warehouse->name }} @endif @endforeach {{ number_format($invoice->deposit) }} {{ number_format($invoice->remain_balance) }} {{ number_format($invoice->total) }}PaidPartial PaidUnpaid {{ $invoice->invoice_date }}
@php $no = '1'; @endphp @foreach ($point_of_sales as $pos) @php $no++; @endphp @endforeach
No. POS No. Location Date Cash Change Due Total Amount Sale By
{{ $no }} {{ $pos->invoice_no }} @foreach ($warehouses as $warehouse) @if ($warehouse->id == $pos->branch) {{ $warehouse->name }} @endif @endforeach {{ $pos->invoice_date }} {{ number_format($pos->deposit) }} {{ number_format($pos->remain_balance) }} {{ number_format($pos->total) }} {{ $pos->sale_by }}
@php $no = '1'; @endphp @foreach ($purchase_orders as $po) @php $no++; @endphp @endforeach
No PO No. Location Deposit Balance Total PO Date
{{ $no }} {{ $po->quote_no }} @foreach ($warehouses as $warehouse) @if ($warehouse->id == $po->branch) {{ $warehouse->name }} @endif @endforeach {{ number_format($po->remain_balance) }} {{ number_format($po->deposit) }} {{ number_format($po->total) }} {{ $po->po_date }}
@php $no = '1'; @endphp @foreach ($po_returns as $po) @php $no++; @endphp @endforeach
No PO Return No. Location Deposit Balance Total Invoice Date
{{ $no }} {{ $po->invoice_no }} @foreach ($warehouses as $warehouse) @if ($warehouse->id == $po->branch) {{ $warehouse->name }} @endif @endforeach {{ number_format($po->deposit) }} {{ number_format($po->remain_balance) }} {{ number_format($po->total) }} {{ $po->invoice_date }}
@php $no = '1'; @endphp @foreach ($sale_return_invoices as $sr_inv) @php $no++; @endphp @endforeach
No Sale Return No. Location Deposit Balance Total Date
{{ $no }} {{ $sr_inv->quote_no }} @foreach ($warehouses as $warehouse) @if ($warehouse->id == $sr_inv->branch) {{ $warehouse->name }} @endif @endforeach {{ number_format($sr_inv->deposit) }} {{ number_format($sr_inv->remain_balance) }} {{ number_format($sr_inv->total) }} {{ $sr_inv->po_date }}
@php $no = '1'; @endphp @foreach ($sale_return_pos as $sr_pos) @php $no++; @endphp @endforeach
No Sale Return No. Location Deposit Balance Total Date
{{ $no }} {{ $sr_pos->quote_no }} @foreach ($warehouses as $warehouse) @if ($warehouse->id == $sr_pos->branch) {{ $warehouse->name }} @endif @endforeach {{ number_format($sr_pos->deposit) }} {{ number_format($sr_pos->remain_balance) }} {{ number_format($sr_pos->total) }} {{ $sr_pos->po_date }}
@php $no = '1'; @endphp @foreach ($sale_return_pos as $sr_pos) @php $no++; @endphp @endforeach
No Sale Return No. Location Deposit Balance Total Date
{{ $no }} {{ $sr_pos->quote_no }} @foreach ($warehouses as $warehouse) @if ($warehouse->id == $sr_pos->branch) {{ $warehouse->name }} @endif @endforeach {{ number_format($sr_pos->deposit) }} {{ number_format($sr_pos->remain_balance) }} {{ number_format($sr_pos->total) }} {{ $sr_pos->po_date }}