CasperSecurity

Current Path : /var/www/orientalss.com/resources/views/livewire/report/
Upload File :
Current File : /var/www/orientalss.com/resources/views/livewire/report/ledger-head-report-livewire.blade.php

<div class="content d-flex flex-column flex-column-fluid" id="kt_content">
    <div id="kt_content_container" class="container-fluid">
        <div class="card card-flush">
            <!-- Card Header -->
            <div class="card-header flex items-center space-x-4 w-full  mb-6">
                <!-- Ledger Head Type -->
                <div class="xl:w-1/6 mb-2 bg-gray-200 p-2 rounded-md">
                    <label class="text-sm font-medium">Ledger Type<span class="text-danger">*</span></label>
                    <select name="lhd_type" wire:model="lhd_type" class="form-control relative text-[13px] text-body-color h-[2.813rem] border border-gray-300 block rounded-md py-1.5 px-3 focus:border-primary dark:hover:border-b-color outline-none w-full">
                        <option value="">Select Ledger Head Type</option>
                        @foreach($ledger_head_types as $head_type)
                            <option value="{{ $head_type->id }}">{{ $head_type->ledger_type }}</option>
                        @endforeach
                    </select>
                    @error('lhd_type') <span class="text-danger">{{ $message }}</span> @enderror
                </div>
                
                <!-- Ledger Head Name -->
                <div class="xl:w-1/6 mb-2 bg-gray-200 p-2 rounded-md">
                    <label class="text-sm font-medium">Ledger Heads<span class="text-danger">*</span></label>
                    <input type="text" class="form-control relative text-[13px] text-body-color h-[2.813rem] border border-gray-300 block rounded-md py-1.5 px-3 focus:border-primary dark:hover:border-b-color outline-none w-full" placeholder="Select Ledger Head" name="ledger_head_name" wire:model.debounce.50ms="ledger_head_name" list="lh" autocomplete="off"/>
                    <datalist id="lh">
                        @foreach($ledger_head as $lhd)
                            <option value="{{ $lhd->ledger_head_name }}"></option>
                        @endforeach
                    </datalist>
                    @error('ledger_head_name') <span class="text-red-500 text-xs">{{ $message }}</span> @enderror
                </div>

                <!-- Start Date Input -->
                <div class="xl:w-1/6 mb-2 bg-gray-200 p-2 rounded-md">
                    <label class="text-sm font-medium">Start Date<span class="text-danger">*</span></label>
                    <input type="date" class="form-control relative text-[13px] text-body-color h-[2.813rem] border border-gray-300 block rounded-md py-1.5 px-3 focus:border-primary dark:hover:border-b-color outline-none w-full" name="start_date" wire:model="start_date">
                    @error('start_date') <span class="w-full mt-1 text-xs text-danger">{{ $message }}</span> @enderror
                </div>

                <!-- End Date Input -->
                <div class="xl:w-1/6 mb-2 bg-gray-200 p-2 rounded-md">
                    <label class="text-sm font-medium">End Date<span class="text-danger">*</span></label>
                    <input type="date" class="form-control relative text-[13px] text-body-color h-[2.813rem] border border-gray-300 block rounded-md py-1.5 px-3 focus:border-primary dark:hover:border-b-color outline-none w-full" name="end_date" wire:model="end_date">
                    @error('end_date') <span class="w-full mt-1 text-xs text-danger">{{ $message }}</span> @enderror
                </div>

                <!-- Show Button -->
               <div class="xl:w-1/6 mb-2 bg-gray-200 p-2 rounded-md ml-auto">
                                    <button type="button" class="nav-link px-[25px] py-[10px] ml-[-1px] border border-b-color mb-[-1px] bg-primary text-white dark:text-white dark:bg-[#242424] sm:text-sm text-[13px] duration-500 hover:bg-primary-light hover:text-link-hover flex justify-center items-center h-[2.813rem] w-full rounded-md"
                                            wire:click="show">  
                                        <span>Show</span>
                                    </button>
                </div>
            </div>

            <!-- Card Body (Table) -->
            <div class="card-body">
                <div class="overflow-x-auto"> <!-- Add horizontal scrolling for small screens -->
                    <table class="table table-bordered table-striped w-full text-sm ">
                        <thead class="bg-gray-100">
                            <tr class="text-start text-gray-400 fw-bolder fs-7 text-uppercase gs-0">
                                <th class="text-black text-center">Sl No.</th>
                                <th class="text-black text-center">Date</th>
                                <th class="text-black text-center">Voucher No.</th>
                                <th class="text-black text-center">Ledger Head</th>
                                <th class="text-black text-center">Party</th>
                                <th class="text-black text-center">Particular</th>
                                <th class="text-black text-right">Debit</th>
                                <th class="text-black text-right">Credit</th>
                                <th class="text-black text-right">Balance</th>
                            </tr>
                        </thead>
                        <tbody>
                            @if($ledger_data != null && sizeof($ledger_data)>0)
                                <tr>
                                    <td class="text-center">1</td>
                                    <td class="text-center">{{ Carbon\Carbon::parse($start_date)->format('d-m-Y') }}</td>
                                    <td class="text-center" colspan="4">Opening Balance</td>
                                    <td class="text-right">{{ $ob < 0 ? number_format(abs($ob), 2, '.', '') : 0.00 }}</td>
                                    <td class="text-right">{{ $ob > 0 ? number_format(abs($ob), 2, '.', '') : 0.00 }}</td>
                                    <td class="text-right">{{ $ob < 0 ? number_format(abs($ob), 2, '.', '') . ' Cr.' : number_format(abs($ob), 2, '.', '') . ' Dr.' }}</td>
                                </tr>
                                <?php
                                $debit_amount = $credit_amount = 0;
                                ?>
                                @foreach($ledger_data as $key => $ld)
                                    <?php
                                        if($ld['amount'] < 0){
                                            $debit_amount += $ld['amount'];
                                        } elseif($ld['amount'] > 0){
                                            $credit_amount += $ld['amount'];
                                        }
                                    ?>
                                    <tr>
                                        <td class="text-center">{{ $key + 2 }}</td>
                                        <td class="text-center">{{ Carbon\Carbon::parse($ld['voucher_date'])->format('d-m-Y') }}</td>
                                        <td class="text-center">{{ $ld['voucher_no'] }}</td>
                                        <td class="text-center">{{ $ld['ledger_head_name'] }}</td>
                                        <td class="text-center">{{ $ld['paid_to_received_from'] }}</td>
                                        <td class="text-start">{{ $ld['voucher_particulars'] }}</td>
                                        <td class="text-right">{{ $ld['amount'] < 0 ? number_format(abs($ld['amount']), 2, '.', '') : '0.00' }}</td>
                                        <td class="text-right">{{ $ld['amount'] > 0 ? number_format(abs($ld['amount']), 2, '.', '') : '0.00' }}</td>
                                        <td class="text-right">{{ $ld['balance_amt'] > 0 ? number_format(abs($ld['balance_amt']), 2, '.', '') . ' Cr.' : number_format(abs($ld['balance_amt']), 2, '.', '') . ' Dr.' }}</td>
                                    </tr>
                                @endforeach
                                <tr class="fw-bolder fs-4">
                                    <td colspan="6" class="text-right">Total</td>
                                    <td class="text-right">{{ number_format(abs($debit_amount), 2, '.', '') }}</td>
                                    <td class="text-right">{{ number_format(abs($credit_amount), 2, '.', '') }}</td>
                                </tr>
                            @else
                                <tr class="bg-transparent">
                                    <td colspan="9" class="text-danger border-2 border-solid border-[#E6E6E6] dark:border-[#444444] bg-transparent xl:py-2 py-2 xl:px-[0.9375rem] px-[0.9375rem] capitalize whitespace-nowrap xl:text-[15px] text-[15px] font-bold text-center">No Data Available</td>
                                </tr>
                            @endif
                        </tbody>
                    </table>
                </div>
            </div>

        </div>
    </div>
</div>
Hacker Blog, Shell İndir, Sql İnjection, XSS Attacks, LFI Attacks, Social Hacking, Exploit Bot, Proxy Tools, Web Shell, PHP Shell, Alfa Shell İndir, Hacking Training Set, DDoS Script, Denial Of Service, Botnet, RFI Attacks, Encryption
Telegram @BIBIL_0DAY