@extends('layouts.horizontal', ['title' => 'Purchases', 'topbarTitle' => 'Purchases', 'nonav' => true]) @section('css') @vite(['node_modules/select2/dist/css/select2.min.css']) @vite(['node_modules/datatables.net-bs5/css/dataTables.bootstrap5.min.css', 'node_modules/datatables.net-responsive-bs5/css/responsive.bootstrap5.min.css', 'node_modules/datatables.net-fixedcolumns-bs5/css/fixedColumns.bootstrap5.min.css', 'node_modules/datatables.net-fixedheader-bs5/css/fixedHeader.bootstrap5.min.css', 'node_modules/datatables.net-buttons-bs5/css/buttons.bootstrap5.min.css', 'node_modules/datatables.net-select-bs5/css/select.bootstrap5.min.css',]) @endsection @section('content')
| Product Name | Brand | Ordered | Received | Returned | Final Receiving | Unit Price | Total Qty Value | Payable |
|---|---|---|---|---|---|---|---|---|
| {{ $item->product_name }} | {{ $item->brand_name }} | {{ $item->product_qty }} | {{ $item->total_received ?? 0 }} | {{ $item->total_returned ?? 0 }} | {{ $item->total_received - ($item->total_returned ?? 0) }} | {{ config('constants.CURRENCY') }}{{ round($item->product_purchase_price, 2) }} | {{ config('constants.CURRENCY') }}{{ round($item->product_purchase_price * $item->product_qty, 2) }} | {{ config('constants.CURRENCY') }}{{ round($item->product_purchase_price * ($item->total_received - ($item->total_returned ?? 0)), 2) }} |
| Total | {{ $total_qty }} | {{ $total_received }} | {{ $total_returned }} | {{ $total_received - $total_returned }} | {{ config('constants.CURRENCY') }}{{ round($total_qty_value, 2) }} | {{ config('constants.CURRENCY') }}{{ round($total_cost, 2) }} | ||
| GRN ID | GRN# | GRN Date | Products | Comment | Received Qty | Returned Qty | |
|---|---|---|---|---|---|---|---|
| {{ $grn->grn_id }} | {{ $grn->grn_number }} | {{ $grn->formatted_grn_date }} | {!! $grn->products_received !!} | {{ $grn->grn_comment }} | {{ $grn->total_received }} | total_returned > 0) echo 'href="'.route('purchase.print_return_note', ['idgrn' => $grn->grn_id]).'"'; else echo "#"; @endphp>{{ $grn->total_returned ?? 0 }} | Add Return Note |
| Total | {{ $total_grn_received }} | {{ $total_returned }} | |||||
| Voucher ID | GRN# | Voucher Date | Paid | Payable | Running Total |
|---|---|---|---|---|---|
| {{ $av->id_account_vouchers }} | {{ $av->grn_id }} | {{ $av->formatted_voucher_date }} | {{ config('constants.CURRENCY') }}{{ round($av->total_debit, 2) }} | {{ config('constants.CURRENCY') }}{{ round($av->total_credit, 2) }} | {{ config('constants.CURRENCY') }}{{ round($running_total, 2) }} |
| Total | {{ config('constants.CURRENCY') }}{{ round($account_vouchers->sum('total_debit'), 2) }} | {{ config('constants.CURRENCY') }}{{ round($running_total, 2) }} | |||