File manager - Edit - /home2/zetasolve/poss.shayantraders.com/pages.zip
Back
PK ��\M�y�7 �7 invoices.htmlnu �[��� <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="icon" type="image/png" href="../assets/favicon.png"> <title>Invoices - Shayan Food</title> <link rel="stylesheet" href="../styles/index.css"> </head> <body> <div class="app-container"> <!-- Sidebar Navigation --> <aside class="sidebar"> <div class="logo"> <img src="../assets/logo.png" alt="Shayan Food Logo" class="logo-img"> <p>Inventory Management</p> </div> <nav class="nav-menu"> <a href="../index.html" class="nav-item"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M3 13h8V3H3v10zm0 8h8v-6H3v6zm10 0h8V11h-8v10zm0-18v6h8V3h-8z" /> </svg> <span>Dashboard</span> </a> <a href="inventory.html" class="nav-item"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M20 2H4c-1 0-2 .9-2 2v3.01c0 .72.43 1.34 1 1.69V20c0 1.1 1.1 2 2 2h14c.9 0 2-.9 2-2V8.7c.57-.35 1-.97 1-1.69V4c0-1.1-1-2-2-2zm-5 12H9v-2h6v2zm5-7H4V4h16v3z" /> </svg> <span>Inventory</span> </a> <a href="billing.html" class="nav-item"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-5 14H7v-2h7v2zm3-4H7v-2h10v2zm0-4H7V7h10v2z" /> </svg> <span>Billing</span> </a> <a href="invoices.html" class="nav-item" class="nav-item active"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm2 16H8v-2h8v2zm0-4H8v-2h8v2zm-3-5V3.5L18.5 9H13z" /> </svg> <span>Invoices</span> </a> <a href="returns.html" class="nav-item"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M11 9h2V6h3V4h-3V1h-2v3H8v2h3v3zm-4 9c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zm10 0c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2zm-9.83-3.25l.03-.12.9-1.63h7.45c.75 0 1.41-.41 1.75-1.03l3.86-7.01L19.42 4h-.01l-1.1 2-2.76 5H8.53l-.13-.27L6.16 6l-.95-2-.94-2H1v2h2l3.6 7.59-1.35 2.45c-.16.28-.25.61-.25.96 0 1.1.9 2 2 2h12v-2H7.42c-.13 0-.25-.11-.25-.25z" /> </svg> <span>Returns</span> </a> <a href="damage_items.html" class="nav-item"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z" /> </svg> <span>Damage Items</span> </a> <a href="credit.html" class="nav-item"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4v-6h16v6zm0-10H4V6h16v2z" /> </svg> <span>Credit Ledger</span> </a> <a href="expenses.html" class="nav-item"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M11.8 10.9c-2.27-.59-3-1.2-3-2.15 0-1.09 1.01-1.85 2.7-1.85 1.78 0 2.44.85 2.5 2.1h2.21c-.07-1.72-1.12-3.3-3.21-3.81V3h-3v2.16c-1.94.42-3.5 1.68-3.5 3.61 0 2.31 1.91 3.46 4.7 4.13 2.5.6 3 1.48 3 2.41 0 .69-.49 1.79-2.7 1.79-2.06 0-2.87-.92-2.98-2.1h-2.2c.12 2.19 1.76 3.42 3.68 3.83V21h3v-2.15c1.95-.37 3.5-1.5 3.5-3.55 0-2.84-2.43-3.81-4.7-4.4z" /> </svg> <span>Expenses</span> </a> <!-- Admin Link (Dynamically shown) --> <a href="admin.html" class="nav-item" id="adminLink" style="display: none;"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M12 12c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm6-1.8C18 6.57 15.35 4 12 4s-6 2.57-6 6.2c0 2.34 1.95 5.44 6 9.14 4.05-3.7 6-6.8 6-9.14zM12 2c4.2 0 8 3.22 8 8.2 0 3.32-2.67 7.25-8 11.8-5.33-4.55-8-8.48-8-11.8C4 5.22 7.8 2 12 2z" /> </svg> <span>Administrator</span> </a> <a href="#" onclick="app.logout(); return false;" class="nav-item" style="margin-top: auto; color: var(--danger); border-top: 1px solid var(--border-color);"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M17 7l-1.41 1.41L18.17 11H8v2h10.17l-2.58 2.58L17 17l5-5zM4 5h8V3H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h8v-2H4V5z" /> </svg> <span>Logout</span> </a> </nav> </aside> <!-- Main Content --> <main class="main-content"> <header class="page-header no-print"> <h2>Invoice Generator</h2> <div class="header-actions"> <button class="btn btn-secondary" onclick="goToBilling()"> <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"/> </svg> <span>Back to Billing</span> </button> <button class="btn btn-secondary" onclick="window.print()"> <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M19 8H5c-1.66 0-3 1.34-3 3v6h4v4h12v-4h4v-6c0-1.66-1.34-3-3-3zm-3 11H8v-5h8v5zm3-7c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm-1-9H6v4h12V3z" /> </svg> <span>Print Invoice</span> </button> <button class="btn btn-primary" onclick="generateInvoice()"> <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z" /> </svg> <span>New Invoice</span> </button> </div> </header> <!-- Invoice Container --> <div class="invoice-container" id="invoiceContent"> <div class="invoice-header"> <div> <img src="../assets/logo.png" alt="Shayan Food Logo" style="max-height: 80px; width: auto; margin-bottom: 0.5rem;"> <p style="color: var(--text-muted); margin: 0;">Masala & Food Products</p> <p style="color: var(--text-muted); margin: 0;">Phone: +92 XXX XXXXXXX</p> </div> <div style="text-align: right;"> <div class="invoice-title">INVOICE</div> <p style="margin: 0.5rem 0;"><strong>Invoice #:</strong> <span id="invoiceNumber">INV-001</span> </p> <p style="margin: 0.5rem 0;"><strong>Date:</strong> <span id="invoiceDate"></span></p> </div> </div> <div class="invoice-details"> <div> <h3 style="margin-bottom: 0.5rem;">Bill To:</h3> <p id="customerName" style="margin: 0.25rem 0; font-weight: 600;">Customer Name</p> <p id="customerAddress" style="margin: 0.25rem 0; color: var(--text-muted);">Address</p> <p id="customerPhone" style="margin: 0.25rem 0; color: var(--text-muted);">Phone</p> </div> <div> <h3 style="margin-bottom: 0.5rem;">Payment Details:</h3> <p style="margin: 0.25rem 0;"><strong>Payment Type:</strong> <span id="paymentType">Cash</span> </p> <p style="margin: 0.25rem 0;"><strong>Due Date:</strong> <span id="dueDate">-</span></p> </div> </div> <div class="invoice-table"> <table> <thead> <tr> <th style="width: 50px;">#</th> <th>Description</th> <th style="width: 100px; text-align: center;">Quantity</th> <th style="width: 120px; text-align: right;">Unit Price</th> <th style="width: 120px; text-align: right;">Total</th> </tr> </thead> <tbody id="invoiceItems"> <tr> <td colspan="5" class="text-center" style="padding: 2rem; color: var(--text-muted);"> No items added. Create a sale from the Billing page to generate an invoice. </td> </tr> </tbody> <tfoot> <tr> <td colspan="4" style="text-align: right; font-weight: 600;">Subtotal:</td> <td style="text-align: right;" id="invoiceSubtotal">PKR 0</td> </tr> <tr id="invoiceDiscountRow" style="display: none;"> <td colspan="4" style="text-align: right; font-weight: 600;">Discount (<span id="invoiceDiscountPercentage">0</span>%):</td> <td style="text-align: right; color: var(--success);" id="invoiceDiscountAmount">PKR 0</td> </tr> <tr> <td colspan="4" style="text-align: right; font-weight: 600;">Tax (0%):</td> <td style="text-align: right;" id="invoiceTax">PKR 0</td> </tr> <tr style="font-size: 1.125rem;"> <td colspan="4" style="text-align: right; font-weight: 700;">TOTAL:</td> <td style="text-align: right; font-weight: 700; color: var(--primary);" id="invoiceTotal">PKR 0</td> </tr> </tfoot> </table> </div> <div class="invoice-footer"> <p style="margin: 0.5rem 0;"><strong>Notes:</strong></p> <p id="invoiceNotes" style="margin: 0.5rem 0; color: var(--text-muted);">Thank you for your business!</p> <div style="margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--border-color);"> <p style="margin: 0; color: var(--text-muted); font-size: 0.875rem; text-align: center;"> This is a computer-generated invoice and does not require a signature. </p> </div> </div> </div> <!-- Invoice List --> <div class="card no-print" style="margin-top: 2rem;"> <div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem;"> <h3 style="margin: 0;">Recent Invoices</h3> <button class="btn btn-secondary" onclick="exportToExcel('invoiceList', 'invoices')"> <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M19 12v7H5v-7H3v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zm-6 .67l2.59-2.58L17 11.5l-5 5-5-5 1.41-1.41L11 12.67V3h2z" /> </svg> <span>Export to Excel</span> </button> </div> <div class="table-container"> <table id="invoiceList"> <thead> <tr> <th>Invoice #</th> <th>Date</th> <th>Customer</th> <th>Amount</th> <th>Status</th> <th>Actions</th> </tr> </thead> <tbody id="invoiceListBody"> <tr> <td colspan="6" class="loading">Loading invoices...</td> </tr> </tbody> </table> </div> </div> </main> </div> <script src="../scripts/main.js"></script> <script src="../scripts/excel-export.js"></script> <script src="../scripts/invoices.js"></script> </body> </html>PK ��\�X:�`8 `8 reports.htmlnu �[��� <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="icon" type="image/png" href="../assets/favicon.png"> <title>Monthly Reports - Shayan Food</title> <link rel="stylesheet" href="../styles/index.css"> <link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet"> <!-- Libraries for Excel and PDF export --> <script src="https://cdnjs.cloudflare.com/ajax/libs/xlsx/0.18.5/xlsx.full.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/2.5.1/jspdf.umd.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf-autotable/3.5.31/jspdf.plugin.autotable.min.js"></script> </head> <body> <div class="app-container"> <!-- Sidebar Navigation --> <aside class="sidebar"> <div class="logo"> <img src="../assets/logo.png" alt="Shayan Food Logo" class="logo-img"> <p>Inventory Management</p> </div> <nav class="nav-menu"> <a href="../index.html" class="nav-item"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M3 13h8V3H3v10zm0 8h8v-6H3v6zm10 0h8V11h-8v10zm0-18v6h8V3h-8z" /> </svg> <span>Dashboard</span> </a> <a href="inventory.html" class="nav-item"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M20 2H4c-1 0-2 .9-2 2v3.01c0 .72.43 1.34 1 1.69V20c0 1.1 1.1 2 2 2h14c.9 0 2-.9 2-2V8.7c.57-.35 1-.97 1-1.69V4c0-1.1-1-2-2-2zm-5 12H9v-2h6v2zm5-7H4V4h16v3z" /> </svg> <span>Inventory</span> </a> <a href="billing.html" class="nav-item"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-5 14H7v-2h7v2zm3-4H7v-2h10v2zm0-4H7V7h10v2z" /> </svg> <span>Billing</span> </a> <a href="invoices.html" class="nav-item"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm2 16H8v-2h8v2zm0-4H8v-2h8v2zm-3-5V3.5L18.5 9H13z" /> </svg> <span>Invoices</span> </a> <a href="returns.html" class="nav-item"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M11 9h2V6h3V4h-3V1h-2v3H8v2h3v3zm-4 9c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zm10 0c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2zm-9.83-3.25l.03-.12.9-1.63h7.45c.75 0 1.41-.41 1.75-1.03l3.86-7.01L19.42 4h-.01l-1.1 2-2.76 5H8.53l-.13-.27L6.16 6l-.95-2-.94-2H1v2h2l3.6 7.59-1.35 2.45c-.16.28-.25.61-.25.96 0 1.1.9 2 2 2h12v-2H7.42c-.13 0-.25-.11-.25-.25z" /> </svg> <span>Returns</span> </a> <a href="damage_items.html" class="nav-item"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z" /> </svg> <span>Damage Items</span> </a> <a href="credit.html" class="nav-item"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4v-6h16v6zm0-10H4V6h16v2z" /> </svg> <span>Credit Ledger</span> </a> <a href="expenses.html" class="nav-item"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M11.8 10.9c-2.27-.59-3-1.2-3-2.15 0-1.09 1.01-1.85 2.7-1.85 1.78 0 2.44.85 2.5 2.1h2.21c-.07-1.72-1.12-3.3-3.21-3.81V3h-3v2.16c-1.94.42-3.5 1.68-3.5 3.61 0 2.31 1.91 3.46 4.7 4.13 2.5.6 3 1.48 3 2.41 0 .69-.49 1.79-2.7 1.79-2.06 0-2.87-.92-2.98-2.1h-2.2c.12 2.19 1.76 3.42 3.68 3.83V21h3v-2.15c1.95-.37 3.5-1.5 3.5-3.55 0-2.84-2.43-3.81-4.7-4.4z" /> </svg> <span>Expenses</span> </a> <a href="reports.html" class="nav-item active" id="reportsLink" style="display: none;"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z" /> </svg> <span>Reports</span> </a> <!-- Admin Link (Dynamically shown) --> <a href="admin.html" class="nav-item" id="adminLink" style="display: none;"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M12 12c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm6-1.8C18 6.57 15.35 4 12 4s-6 2.57-6 6.2c0 2.34 1.95 5.44 6 9.14 4.05-3.7 6-6.8 6-9.14zM12 2c4.2 0 8 3.22 8 8.2 0 3.32-2.67 7.25-8 11.8-5.33-4.55-8-8.48-8-11.8C4 5.22 7.8 2 12 2z" /> </svg> <span>Administrator</span> </a> <a href="#" onclick="app.logout(); return false;" class="nav-item" style="margin-top: auto; color: var(--danger); border-top: 1px solid var(--border-color);"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M17 7l-1.41 1.41L18.17 11H8v2h10.17l-2.58 2.58L17 17l5-5zM4 5h8V3H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h8v-2H4V5z" /> </svg> <span>Logout</span> </a> </nav> </aside> <!-- Main Content --> <main class="main-content"> <header class="page-header"> <h2>Monthly Sales Reports</h2> <div class="header-actions"> <div style="display: flex; gap: 1rem;"> <button class="btn btn-success" onclick="downloadExcelReport()" id="excelBtn" disabled> <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" style="width: 1.25rem; height: 1.25rem; vertical-align: bottom; margin-right: 0.5rem;"> <path d="M19 12v7H5v-7H3v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zm-6 .67l2.59-2.58L17 11.5l-5 5-5-5 1.41-1.41L11 12.67V3h2z" /> </svg> Download Excel </button> <button class="btn btn-danger" onclick="downloadPDFReport()" id="pdfBtn" disabled> <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" style="width: 1.25rem; height: 1.25rem; vertical-align: bottom; margin-right: 0.5rem;"> <path d="M19 12v7H5v-7H3v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zm-6 .67l2.59-2.58L17 11.5l-5 5-5-5 1.41-1.41L11 12.67V3h2z" /> </svg> Download PDF </button> </div> </div> </header> <!-- Month Selector --> <div class="card"> <div style="display: flex; gap: 1rem; align-items: end;"> <div class="form-group" style="margin: 0; flex: 1;"> <label>Select Month</label> <input type="month" class="form-control" id="monthSelector" onchange="loadMonthlyReport()"> </div> <button class="btn btn-primary" onclick="loadMonthlyReport()"> Load Report </button> </div> </div> <!-- Summary Cards --> <div class="dashboard-grid" id="summarySection" style="display: none;"> <div class="stat-card"> <div class="stat-card-header"> <div class="stat-content"> <h3>Total Sales</h3> <div class="stat-value" id="totalSales">PKR 0</div> </div> <div class="stat-icon" style="background: #10b981;"> <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M11.8 10.9c-2.27-.59-3-1.2-3-2.15 0-1.09 1.01-1.85 2.7-1.85 1.78 0 2.44.85 2.5 2.1h2.21c-.07-1.72-1.12-3.3-3.21-3.81V3h-3v2.16c-1.94.42-3.5 1.68-3.5 3.61 0 2.31 1.91 3.46 4.7 4.13 2.5.6 3 1.48 3 2.41 0 .69-.49 1.79-2.7 1.79-2.06 0-2.87-.92-2.98-2.1h-2.2c.12 2.19 1.76 3.42 3.68 3.83V21h3v-2.15c1.95-.37 3.5-1.5 3.5-3.55 0-2.84-2.43-3.81-4.7-4.4z" /> </svg> </div> </div> </div> <div class="stat-card"> <div class="stat-card-header"> <div class="stat-content"> <h3>Total Transactions</h3> <div class="stat-value" id="totalTransactions">0</div> </div> <div class="stat-icon" style="background: #2563eb;"> <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-5 14H7v-2h7v2zm3-4H7v-2h10v2zm0-4H7V7h10v2z" /> </svg> </div> </div> </div> <div class="stat-card"> <div class="stat-card-header"> <div class="stat-content"> <h3>Total Discounts</h3> <div class="stat-value text-success" id="totalDiscounts">PKR 0</div> </div> <div class="stat-icon" style="background: #f59e0b;"> <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M21.41 11.58l-9-9C12.05 2.22 11.55 2 11 2H4c-1.1 0-2 .9-2 2v7c0 .55.22 1.05.59 1.42l9 9c.36.36.86.58 1.41.58.55 0 1.05-.22 1.41-.59l7-7c.37-.36.59-.86.59-1.41 0-.55-.23-1.06-.59-1.42zM5.5 7C4.67 7 4 6.33 4 5.5S4.67 4 5.5 4 7 4.67 7 5.5 6.33 7 5.5 7z" /> </svg> </div> </div> </div> <div class="stat-card"> <div class="stat-card-header"> <div class="stat-content"> <h3>Net Sales</h3> <div class="stat-value" id="netSales">PKR 0</div> </div> <div class="stat-icon" style="background: #8b5cf6;"> <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1.41 16.09V20h-2.67v-1.93c-1.71-.36-3.16-1.46-3.27-3.4h1.96c.1 1.05.82 1.87 2.65 1.87 1.96 0 2.4-.98 2.4-1.59 0-.83-.44-1.61-2.67-2.14-2.48-.6-4.18-1.62-4.18-3.67 0-1.72 1.39-2.84 3.11-3.21V4h2.67v1.95c1.86.45 2.79 1.86 2.85 3.39H14.3c-.05-1.11-.64-1.87-2.22-1.87-1.5 0-2.4.68-2.4 1.64 0 .84.65 1.39 2.67 1.91s4.18 1.39 4.18 3.91c-.01 1.83-1.38 2.83-3.12 3.16z" /> </svg> </div> </div> </div> </div> <!-- Transactions Table --> <div class="card" id="transactionsSection" style="display: none;"> <h3>Transactions for <span id="reportMonthDisplay"></span></h3> <div class="table-container"> <table> <thead> <tr> <th>Date</th> <th>Customer</th> <th>Payment Type</th> <th>Items</th> <th>Subtotal</th> <th>Discount</th> <th>Final Total</th> </tr> </thead> <tbody id="transactionsTableBody"> <tr> <td colspan="7" class="loading">Select a month to view report</td> </tr> </tbody> </table> </div> </div> </main> </div> <script src="../scripts/main.js"></script> <script src="../scripts/reports.js"></script> </body> </html>PK ��\�U��2 �2 admin.htmlnu �[��� <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="icon" type="image/png" href="../assets/favicon.png"> <title>Administrator - Shayan Food</title> <link rel="stylesheet" href="../styles/index.css"> <link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet"> <style> .permissions-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.5rem; margin-top: 0.5rem; } .permission-item { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem; background: var(--bg-secondary); border-radius: var(--radius-sm); font-size: 0.875rem; } .status-badge.active { background: rgba(16, 185, 129, 0.2); color: #10b981; } .status-badge.disabled { background: rgba(239, 68, 68, 0.2); color: #ef4444; } </style> </head> <body> <div class="app-container"> <!-- Sidebar Navigation --> <aside class="sidebar"> <div class="logo"> <img src="../assets/logo.png" alt="Shayan Food Logo" class="logo-img"> <p>Inventory Management</p> </div> <nav class="nav-menu"> <a href="../index.html" class="nav-item"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M3 13h8V3H3v10zm0 8h8v-6H3v6zm10 0h8V11h-8v10zm0-18v6h8V3h-8z" /> </svg> <span>Dashboard</span> </a> <a href="inventory.html" class="nav-item"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M20 2H4c-1 0-2 .9-2 2v3.01c0 .72.43 1.34 1 1.69V20c0 1.1 1.1 2 2 2h14c.9 0 2-.9 2-2V8.7c.57-.35 1-.97 1-1.69V4c0-1.1-1-2-2-2zm-5 12H9v-2h6v2zm5-7H4V4h16v3z" /> </svg> <span>Inventory</span> </a> <a href="billing.html" class="nav-item"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-5 14H7v-2h7v2zm3-4H7v-2h10v2zm0-4H7V7h10v2z" /> </svg> <span>Billing</span> </a> <a href="invoices.html" class="nav-item"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm2 16H8v-2h8v2zm0-4H8v-2h8v2zm-3-5V3.5L18.5 9H13z" /> </svg> <span>Invoices</span> </a> <a href="returns.html" class="nav-item"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M11 9h2V6h3V4h-3V1h-2v3H8v2h3v3zm-4 9c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zm10 0c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2zm-9.83-3.25l.03-.12.9-1.63h7.45c.75 0 1.41-.41 1.75-1.03l3.86-7.01L19.42 4h-.01l-1.1 2-2.76 5H8.53l-.13-.27L6.16 6l-.95-2-.94-2H1v2h2l3.6 7.59-1.35 2.45c-.16.28-.25.61-.25.96 0 1.1.9 2 2 2h12v-2H7.42c-.13 0-.25-.11-.25-.25z" /> </svg> <span>Returns</span> </a> <a href="damage_items.html" class="nav-item"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z" /> </svg> <span>Damage Items</span> </a> <a href="credit.html" class="nav-item"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4v-6h16v6zm0-10H4V6h16v2z" /> </svg> <span>Credit Ledger</span> </a> <a href="expenses.html" class="nav-item"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M11.8 10.9c-2.27-.59-3-1.2-3-2.15 0-1.09 1.01-1.85 2.7-1.85 1.78 0 2.44.85 2.5 2.1h2.21c-.07-1.72-1.12-3.3-3.21-3.81V3h-3v2.16c-1.94.42-3.5 1.68-3.5 3.61 0 2.31 1.91 3.46 4.7 4.13 2.5.6 3 1.48 3 2.41 0 .69-.49 1.79-2.7 1.79-2.06 0-2.87-.92-2.98-2.1h-2.2c.12 2.19 1.76 3.42 3.68 3.83V21h3v-2.15c1.95-.37 3.5-1.5 3.5-3.55 0-2.84-2.43-3.81-4.7-4.4z" /> </svg> <span>Expenses</span> </a> <a href="reports.html" class="nav-item" id="reportsLink" style="display: none;"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z" /> </svg> <span>Reports</span> </a> <!-- Admin Link (Dynamically shown) --> <a href="admin.html" class="nav-item active" id="adminLink" style="display: none;"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M12 12c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm6-1.8C18 6.57 15.35 4 12 4s-6 2.57-6 6.2c0 2.34 1.95 5.44 6 9.14 4.05-3.7 6-6.8 6-9.14zM12 2c4.2 0 8 3.22 8 8.2 0 3.32-2.67 7.25-8 11.8-5.33-4.55-8-8.48-8-11.8C4 5.22 7.8 2 12 2z" /> </svg> <span>Administrator</span> </a> <a href="#" onclick="app.logout(); return false;" class="nav-item" style="margin-top: auto; color: var(--danger); border-top: 1px solid var(--border-color);"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M17 7l-1.41 1.41L18.17 11H8v2h10.17l-2.58 2.58L17 17l5-5zM4 5h8V3H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h8v-2H4V5z" /> </svg> <span>Logout</span> </a> </nav> </aside> <!-- Main Content --> <main class="main-content"> <header class="page-header"> <h2>User Management</h2> <div class="header-actions"> <button class="btn btn-primary" onclick="openAddUserModal()"> <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" style="width: 1.25rem; height: 1.25rem; vertical-align: bottom; margin-right: 0.5rem;"> <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z" /> </svg> Add New User </button> </div> </header> <div class="card"> <table class="table"> <thead> <tr> <th>Username</th> <th>Role</th> <th>Permissions</th> <th>Status</th> <th>Created At</th> <th>Actions</th> </tr> </thead> <tbody id="usersTableBody"> <tr> <td colspan="6" class="loading">Loading users...</td> </tr> </tbody> </table> </div> </main> </div> <!-- User Modal (Add/Edit) --> <div class="modal" id="userModal"> <div class="modal-content"> <div class="modal-header"> <h3 id="modalTitle">Add User</h3> <button class="close-modal" onclick="closeUserModal()">×</button> </div> <form id="userForm" onsubmit="saveUser(event)"> <input type="hidden" id="editUserId"> <div class="form-group"> <label>Username</label> <input type="text" class="form-control" id="username" required> </div> <div class="form-group"> <label>Password <span id="passwordHint" class="text-muted" style="font-size: 0.8em; font-weight: normal; display: none;">(Leave blank to keep current)</span></label> <input type="password" class="form-control" id="password"> </div> <div class="form-group"> <label>Role</label> <select class="form-control" id="role" onchange="togglePermissions()"> <option value="Manager">Manager</option> <option value="Distributor">Distributor</option> <option value="Cashier">Cashier</option> <option value="Staff">Staff</option> <option value="Admin">Admin (Full Access)</option> </select> </div> <div class="form-group" id="statusGroup" style="display: none;"> <label>Status</label> <select class="form-control" id="status"> <option value="Active">Active</option> <option value="Disabled">Disabled</option> </select> </div> <div class="form-group" id="permissionsGroup"> <label>Page Access </label> <div class="permissions-grid"> <label class="permission-item"> <input type="checkbox" name="permissions" value="dashboard.html"> Dashboard </label> <label class="permission-item"> <input type="checkbox" name="permissions" value="inventory.html"> Inventory </label> <label class="permission-item"> <input type="checkbox" name="permissions" value="billing.html"> Billing </label> <label class="permission-item"> <input type="checkbox" name="permissions" value="invoices.html"> Invoices </label> <label class="permission-item"> <input type="checkbox" name="permissions" value="returns.html"> Returns </label> <label class="permission-item"> <input type="checkbox" name="permissions" value="damage_items.html"> Damage Items </label> <label class="permission-item"> <input type="checkbox" name="permissions" value="credit.html"> Credit Ledger </label> <label class="permission-item"> <input type="checkbox" name="permissions" value="expenses.html"> Expenses </label> </div> </div> <div style="display: flex; gap: 1rem; justify-content: flex-end; margin-top: 1.5rem;"> <button type="button" class="btn btn-secondary" onclick="closeUserModal()">Cancel</button> <button type="submit" class="btn btn-primary">Save User</button> </div> </form> </div> </div> <script src="../scripts/main.js"></script> <script src="../scripts/admin.js"></script> </body> </html>PK ��\:t��8 8 expenses.htmlnu �[��� <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="icon" type="image/png" href="../assets/favicon.png"> <title>Expense Sheet - Shayan Food</title> <link rel="stylesheet" href="../styles/index.css"> <link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet"> </head> <body> <div class="app-container"> <!-- Sidebar Navigation --> <aside class="sidebar"> <div class="logo"> <img src="../assets/logo.png" alt="Shayan Food Logo" class="logo-img"> <p>Inventory Management</p> </div> <nav class="nav-menu"> <a href="../index.html" class="nav-item"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M3 13h8V3H3v10zm0 8h8v-6H3v6zm10 0h8V11h-8v10zm0-18v6h8V3h-8z" /> </svg> <span>Dashboard</span> </a> <a href="inventory.html" class="nav-item"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M20 2H4c-1 0-2 .9-2 2v3.01c0 .72.43 1.34 1 1.69V20c0 1.1 1.1 2 2 2h14c.9 0 2-.9 2-2V8.7c.57-.35 1-.97 1-1.69V4c0-1.1-1-2-2-2zm-5 12H9v-2h6v2zm5-7H4V4h16v3z" /> </svg> <span>Inventory</span> </a> <a href="billing.html" class="nav-item"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-5 14H7v-2h7v2zm3-4H7v-2h10v2zm0-4H7V7h10v2z" /> </svg> <span>Billing</span> </a> <a href="invoices.html" class="nav-item"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm2 16H8v-2h8v2zm0-4H8v-2h8v2zm-3-5V3.5L18.5 9H13z" /> </svg> <span>Invoices</span> </a> <a href="returns.html" class="nav-item"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M11 9h2V6h3V4h-3V1h-2v3H8v2h3v3zm-4 9c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zm10 0c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2zm-9.83-3.25l.03-.12.9-1.63h7.45c.75 0 1.41-.41 1.75-1.03l3.86-7.01L19.42 4h-.01l-1.1 2-2.76 5H8.53l-.13-.27L6.16 6l-.95-2-.94-2H1v2h2l3.6 7.59-1.35 2.45c-.16.28-.25.61-.25.96 0 1.1.9 2 2 2h12v-2H7.42c-.13 0-.25-.11-.25-.25z" /> </svg> <span>Returns</span> </a> <a href="damage_items.html" class="nav-item"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z" /> </svg> <span>Damage Items</span> </a> <a href="credit.html" class="nav-item"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4v-6h16v6zm0-10H4V6h16v2z" /> </svg> <span>Credit Ledger</span> </a> <a href="expenses.html" class="nav-item" class="nav-item active"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M11.8 10.9c-2.27-.59-3-1.2-3-2.15 0-1.09 1.01-1.85 2.7-1.85 1.78 0 2.44.85 2.5 2.1h2.21c-.07-1.72-1.12-3.3-3.21-3.81V3h-3v2.16c-1.94.42-3.5 1.68-3.5 3.61 0 2.31 1.91 3.46 4.7 4.13 2.5.6 3 1.48 3 2.41 0 .69-.49 1.79-2.7 1.79-2.06 0-2.87-.92-2.98-2.1h-2.2c.12 2.19 1.76 3.42 3.68 3.83V21h3v-2.15c1.95-.37 3.5-1.5 3.5-3.55 0-2.84-2.43-3.81-4.7-4.4z" /> </svg> <span>Expenses</span> </a> <a href="reports.html" class="nav-item" id="reportsLink" style="display: none;"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z" /> </svg> <span>Reports</span> </a> <!-- Admin Link (Dynamically shown) --> <a href="admin.html" class="nav-item" id="adminLink" style="display: none;"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M12 12c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm6-1.8C18 6.57 15.35 4 12 4s-6 2.57-6 6.2c0 2.34 1.95 5.44 6 9.14 4.05-3.7 6-6.8 6-9.14zM12 2c4.2 0 8 3.22 8 8.2 0 3.32-2.67 7.25-8 11.8-5.33-4.55-8-8.48-8-11.8C4 5.22 7.8 2 12 2z" /> </svg> <span>Administrator</span> </a> <a href="#" onclick="app.logout(); return false;" class="nav-item" style="margin-top: auto; color: var(--danger); border-top: 1px solid var(--border-color);"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M17 7l-1.41 1.41L18.17 11H8v2h10.17l-2.58 2.58L17 17l5-5zM4 5h8V3H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h8v-2H4V5z" /> </svg> <span>Logout</span> </a> </nav> </aside> <!-- Main Content --> <main class="main-content"> <header class="page-header"> <h2>Expense Sheet</h2> <div class="header-actions"> <div style="background: var(--glass-bg); padding: 0.75rem 1.5rem; border-radius: var(--radius-md); border: 1px solid var(--glass-border);"> <div style="font-size: 0.875rem; color: var(--text-muted);">Total Expenses</div> <div id="totalExpenses" style="font-size: 1.5rem; font-weight: 700; color: var(--danger);">PKR 0 </div> </div> </div> </header> <div style="display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem;"> <!-- Left: Add Expense --> <div class="card"> <h3>Add Expense</h3> <form id="expenseForm" onsubmit="addExpense(event)"> <div class="form-group"> <label>Expense Date</label> <input type="date" class="form-control" id="expenseDate" required> </div> <div class="form-group"> <label>Category</label> <select class="form-control" id="expenseCategory" required> <option value="">Select Category</option> <option value="Rent">Rent</option> <option value="Advance">Staff Advance</option> <option value="Transport">Transport/Delivery</option> <option value="Utilities">Utilities</option> <option value="Other">Other</option> </select> </div> <div class="form-group"> <label>Description</label> <input type="text" class="form-control" id="expenseDescription" required placeholder="e.g., Vehicle rent for delivery"> </div> <div class="form-group"> <label>Amount (PKR)</label> <input type="number" class="form-control" id="expenseAmount" required min="0" step="0.01" placeholder="0.00"> </div> <button type="submit" class="btn btn-primary" style="width: 100%; padding: 1rem;"> Add Expense </button> </form> </div> <!-- Right: Summary by Category --> <div class="card"> <h3>Expense Summary</h3> <div style="display: flex; gap: 0.5rem; margin-bottom: 1rem;"> <div class="form-group" style="margin: 0; flex: 1;"> <label>From Date</label> <input type="date" class="form-control" id="summaryStartDate"> </div> <div class="form-group" style="margin: 0; flex: 1;"> <label>To Date</label> <input type="date" class="form-control" id="summaryEndDate"> </div> <button class="btn btn-primary" onclick="updateSummary()" style="align-self: flex-end; height: 42px;"> Update </button> </div> <div id="expenseSummary" style="margin-top: 1.5rem;"> <p class="loading">Loading summary...</p> </div> </div> </div> <!-- Expense List --> <div class="card" style="margin-top: 1.5rem;"> <div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem;"> <h3>Expense History</h3> <div style="display: flex; gap: 0.5rem;"> <div class="form-group" style="margin: 0;"> <input type="date" class="form-control" id="filterStartDate" placeholder="From"> </div> <div class="form-group" style="margin: 0;"> <input type="date" class="form-control" id="filterEndDate" placeholder="To"> </div> <select class="form-control" id="filterCategory" style="width: auto;"> <option value="">All Categories</option> <option value="Rent">Rent</option> <option value="Advance">Staff Advance</option> <option value="Transport">Transport/Delivery</option> <option value="Utilities">Utilities</option> <option value="Other">Other</option> </select> <button class="btn btn-primary" onclick="filterExpenses()">Filter</button> <button class="btn btn-secondary" onclick="clearExpenseFilters()">Clear</button> <button class="btn btn-secondary" onclick="exportExpensesToExcel(document.getElementById('filterStartDate').value, document.getElementById('filterEndDate').value)" style="margin-left: 0.5rem;"> <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" style="width: 1rem; height: 1rem; vertical-align: middle; margin-right: 0.25rem;"> <path d="M19 12v7H5v-7H3v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zm-6 .67l2.59-2.58L17 11.5l-5 5-5-5 1.41-1.41L11 12.67V3h2z" /> </svg> Export </button> </div> </div> <div class="table-container"> <table> <thead> <tr> <th>Date</th> <th>Category</th> <th>Description</th> <th>Amount</th> <th>Action</th> </tr> </thead> <tbody id="expenseTableBody"> <tr> <td colspan="4" class="loading">Loading expenses...</td> </tr> </tbody> <tfoot> <tr style="background: rgba(239, 68, 68, 0.1); font-weight: 700;"> <td colspan="3" style="text-align: right; padding: 1rem;">TOTAL:</td> <td id="footerTotal" style="color: var(--danger); font-size: 1.25rem;">PKR 0</td> </tr> </tfoot> </table> </div> </div> </main> </div> <script src="../scripts/main.js"></script> <script src="../scripts/excel-export.js"></script> <script src="../scripts/expenses.js"></script> </body> </html>PK ��\�r4�k k _sidebar_template.htmlnu �[��� <aside class="sidebar"> <div class="logo"> <img src="../assets/logo.png" alt="Shayan Food Logo" class="logo-img"> <p>Inventory Management</p> </div> <nav class="nav-menu"> <a href="../index.html" class="nav-item" id="nav-dashboard"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M3 13h8V3H3v10zm0 8h8v-6H3v6zm10 0h8V11h-8v10zm0-18v6h8V3h-8z" /> </svg> <span>Dashboard</span> </a> <a href="inventory.html" class="nav-item" id="nav-inventory"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M20 2H4c-1 0-2 .9-2 2v3.01c0 .72.43 1.34 1 1.69V20c0 1.1 1.1 2 2 2h14c.9 0 2-.9 2-2V8.7c.57-.35 1-.97 1-1.69V4c0-1.1-1-2-2-2zm-5 12H9v-2h6v2zm5-7H4V4h16v3z" /> </svg> <span>Inventory</span> </a> <a href="billing.html" class="nav-item" id="nav-billing"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-5 14H7v-2h7v2zm3-4H7v-2h10v2zm0-4H7V7h10v2z" /> </svg> <span>Billing</span> </a> <a href="invoices.html" class="nav-item" id="nav-invoices"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm2 16H8v-2h8v2zm0-4H8v-2h8v2zm-3-5V3.5L18.5 9H13z" /> </svg> <span>Invoices</span> </a> <a href="returns.html" class="nav-item" id="nav-returns"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M11 9h2V6h3V4h-3V1h-2v3H8v2h3v3zm-4 9c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zm10 0c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2zm-9.83-3.25l.03-.12.9-1.63h7.45c.75 0 1.41-.41 1.75-1.03l3.86-7.01L19.42 4h-.01l-1.1 2-2.76 5H8.53l-.13-.27L6.16 6l-.95-2-.94-2H1v2h2l3.6 7.59-1.35 2.45c-.16.28-.25.61-.25.96 0 1.1.9 2 2 2h12v-2H7.42c-.13 0-.25-.11-.25-.25z" /> </svg> <span>Returns</span> </a> <a href="credit.html" class="nav-item" id="nav-credit"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4v-6h16v6zm0-10H4V6h16v2z" /> </svg> <span>Credit Ledger</span> </a> <a href="expenses.html" class="nav-item" id="nav-expenses"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M11.8 10.9c-2.27-.59-3-1.2-3-2.15 0-1.09 1.01-1.85 2.7-1.85 1.78 0 2.44.85 2.5 2.1h2.21c-.07-1.72-1.12-3.3-3.21-3.81V3h-3v2.16c-1.94.42-3.5 1.68-3.5 3.61 0 2.31 1.91 3.46 4.7 4.13 2.5.6 3 1.48 3 2.41 0 .69-.49 1.79-2.7 1.79-2.06 0-2.87-.92-2.98-2.1h-2.2c.12 2.19 1.76 3.42 3.68 3.83V21h3v-2.15c1.95-.37 3.5-1.5 3.5-3.55 0-2.84-2.43-3.81-4.7-4.4z" /> </svg> <span>Expenses</span> </a> <a href="#" onclick="app.logout(); return false;" class="nav-item" style="margin-top: auto; color: var(--danger); border-top: 1px solid var(--border-color);"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M17 7l-1.41 1.41L18.17 11H8v2h10.17l-2.58 2.58L17 17l5-5zM4 5h8V3H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h8v-2H4V5z" /> </svg> <span>Logout</span> </a> </nav> </aside> PK ��\�˃��4 �4 credit.htmlnu �[��� <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="icon" type="image/png" href="../assets/favicon.png"> <title>Credit Management - Shayan Food</title> <link rel="stylesheet" href="../styles/index.css"> <link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet"> <style> .search-container { margin-bottom: 1rem; display: flex; gap: 1rem; align-items: center; } .search-container input { flex: 1; max-width: 300px; } .pdf-download-btn { background: var(--primary); color: white; border: none; padding: 0.5rem 1rem; border-radius: var(--radius-md); cursor: pointer; display: flex; align-items: center; gap: 0.5rem; } .pdf-download-btn:hover { background: var(--primary-dark); } </style> </head> <body> <div class="app-container"> <!-- Sidebar Navigation --> <aside class="sidebar"> <div class="logo"> <img src="../assets/logo.png" alt="Shayan Food Logo" class="logo-img"> <p>Inventory Management</p> </div> <nav class="nav-menu"> <a href="../index.html" class="nav-item"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M3 13h8V3H3v10zm0 8h8v-6H3v6zm10 0h8V11h-8v10zm0-18v6h8V3h-8z" /> </svg> <span>Dashboard</span> </a> <a href="inventory.html" class="nav-item"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M20 2H4c-1 0-2 .9-2 2v3.01c0 .72.43 1.34 1 1.69V20c0 1.1 1.1 2 2 2h14c.9 0 2-.9 2-2V8.7c.57-.35 1-.97 1-1.69V4c0-1.1-1-2-2-2zm-5 12H9v-2h6v2zm5-7H4V4h16v3z" /> </svg> <span>Inventory</span> </a> <a href="billing.html" class="nav-item"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-5 14H7v-2h7v2zm3-4H7v-2h10v2zm0-4H7V7h10v2z" /> </svg> <span>Billing</span> </a> <a href="invoices.html" class="nav-item"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm2 16H8v-2h8v2zm0-4H8v-2h8v2zm-3-5V3.5L18.5 9H13z" /> </svg> <span>Invoices</span> </a> <a href="returns.html" class="nav-item"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M11 9h2V6h3V4h-3V1h-2v3H8v2h3v3zm-4 9c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zm10 0c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2zm-9.83-3.25l.03-.12.9-1.63h7.45c.75 0 1.41-.41 1.75-1.03l3.86-7.01L19.42 4h-.01l-1.1 2-2.76 5H8.53l-.13-.27L6.16 6l-.95-2-.94-2H1v2h2l3.6 7.59-1.35 2.45c-.16.28-.25.61-.25.96 0 1.1.9 2 2 2h12v-2H7.42c-.13 0-.25-.11-.25-.25z" /> </svg> <span>Returns</span> </a> <a href="credit.html" class="nav-item active"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4v-6h16v6zm0-10H4V6h16v2z" /> </svg> <span>Credit</span> </a> <a href="damage_items.html" class="nav-item"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z" /> </svg> <span>Damage Items</span> </a> <a href="expenses.html" class="nav-item"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M11.8 10.9c-2.27-.59-3-1.2-3-2.15 0-1.09 1.01-1.85 2.7-1.85 1.78 0 2.44.85 2.5 2.1h2.21c-.07-1.72-1.12-3.3-3.21-3.81V3h-3v2.16c-1.94.42-3.5 1.68-3.5 3.61 0 2.31 1.91 3.46 4.7 4.13 2.5.6 3 1.48 3 2.41 0 .69-.49 1.79-2.7 1.79-2.06 0-2.87-.92-2.98-2.1h-2.2c.12 2.19 1.76 3.42 3.68 3.83V21h3v-2.15c1.95-.37 3.5-1.5 3.5-3.55 0-2.84-2.43-3.81-4.7-4.4z" /> </svg> <span>Expenses</span> </a> <a href="reports.html" class="nav-item" id="reportsLink" style="display: none;"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z" /> </svg> <span>Reports</span> </a> <!-- Admin Link (Dynamically shown) --> <a href="admin.html" class="nav-item" id="adminLink" style="display: none;"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M12 12c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm6-1.8C18 6.57 15.35 4 12 4s-6 2.57-6 6.2c0 2.34 1.95 5.44 6 9.14 4.05-3.7 6-6.8 6-9.14zM12 2c4.2 0 8 3.22 8 8.2 0 3.32-2.67 7.25-8 11.8-5.33-4.55-8-8.48-8-11.8C4 5.22 7.8 2 12 2z" /> </svg> <span>Administrator</span> </a> <a href="#" onclick="app.logout(); return false;" class="nav-item" style="margin-top: auto; color: var(--danger); border-top: 1px solid var(--border-color);"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M17 7l-1.41 1.41L18.17 11H8v2h10.17l-2.58 2.58L17 17l5-5zM4 5h8V3H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h8v-2H4V5z" /> </svg> <span>Logout</span> </a> </nav> </aside> <!-- Main Content --> <main class="main-content"> <header class="page-header"> <h2>Credit Management</h2> <div class="header-actions"> <button class="pdf-download-btn" onclick="downloadCreditPDF()"> <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="16" height="16"> <path d="M19 12v7H5v-7H3v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zm-6 .67l2.59-2.58L17 11.5l-5 5-5-5 1.41-1.41L11 12.67V3h2z" /> </svg> Download PDF </button> </div> </header> <!-- Credit Add Form (Top Section) --> <div class="card" style="margin-bottom: 2rem;"> <h3>Add New Credit Record</h3> <form id="creditAddForm" onsubmit="addCreditRecord(event)"> <div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1rem;"> <div class="form-group"> <label>Customer ID</label> <input type="number" class="form-control" id="customerId" required min="1" readonly style="background-color: #f0f0f0;"> </div> <div class="form-group"> <label>Customer Name</label> <input type="text" class="form-control" id="customerName" required maxlength="100"> </div> <div class="form-group"> <label>Total Amount Due</label> <input type="number" class="form-control" id="totalAmount" required min="0" step="0.01"> </div> <div class="form-group"> <label>Amount Paid (Optional)</label> <input type="number" class="form-control" id="amountPaid" min="0" step="0.01" value="0"> </div> </div> <button type="submit" class="btn btn-primary" style="width: auto; padding: 0.75rem 1.5rem;"> Add Credit Record </button> </form> </div> <!-- Search Bar --> <div class="card" style="margin-bottom: 1rem;"> <div class="search-container"> <input type="text" id="searchInput" class="form-control" placeholder="Search by Customer ID or Name..." oninput="searchCredits()"> <button class="btn btn-secondary" onclick="searchCredits()">Search</button> <button class="btn btn-outline" onclick="clearSearch()">Clear</button> </div> </div> <!-- Credit List Table (Main Section) --> <div class="table-container"> <table> <thead> <tr> <th>Customer ID</th> <th>Username</th> <th>Total Amount</th> <th>Paid Amount</th> <th>Remaining Amount</th> <th>Status</th> <th>Actions</th> </tr> </thead> <tbody id="creditTableBody"> <tr> <td colspan="7" class="loading">Loading credit records...</td> </tr> </tbody> </table> </div> </main> </div> <!-- Edit Credit Modal --> <div class="modal" id="editCreditModal"> <div class="modal-content"> <div class="modal-header"> <h3>Update Credit Payment</h3> <button class="close-modal" onclick="closeEditCreditModal()">×</button> </div> <form id="editCreditForm" onsubmit="updateCreditPayment(event)"> <input type="hidden" id="editCreditId"> <div class="form-group"> <label>Customer ID</label> <input type="text" class="form-control" id="editCustomerId" readonly> </div> <div class="form-group"> <label>Customer Name</label> <input type="text" class="form-control" id="editCustomerName" readonly> </div> <div class="form-group"> <label>Total Amount</label> <input type="text" class="form-control" id="editTotalAmount" readonly> </div> <div class="form-group"> <label>Current Paid Amount</label> <input type="text" class="form-control" id="editCurrentPaid" readonly> </div> <div class="form-group"> <label>New Payment Amount</label> <input type="number" class="form-control" id="newPaymentAmount" required min="0" step="0.01"> </div> <div style="display: flex; gap: 1rem; justify-content: flex-end; margin-top: 1.5rem;"> <button type="button" class="btn btn-secondary" onclick="closeEditCreditModal()">Cancel</button> <button type="submit" class="btn btn-success">Update Payment</button> </div> </form> </div> </div> <script src="../scripts/main.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/2.5.1/jspdf.umd.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf-autotable/3.5.31/jspdf.plugin.autotable.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/html2canvas/1.4.1/html2canvas.min.js"></script> <script src="../scripts/credit.js"></script> </body> </html>PK ��\��^��( �( damage_items.htmlnu �[��� <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="icon" type="image/png" href="../assets/favicon.png"> <title>Damage Items - Shayan Food</title> <link rel="stylesheet" href="../styles/index.css"> <link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet"> </head> <body> <div class="app-container"> <!-- Sidebar Navigation --> <aside class="sidebar"> <div class="logo"> <img src="../assets/logo.png" alt="Shayan Food Logo" class="logo-img"> <p>Inventory Management</p> </div> <nav class="nav-menu"> <a href="../index.html" class="nav-item"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M3 13h8V3H3v10zm0 8h8v-6H3v6zm10 0h8V11h-8v10zm0-18v6h8V3h-8z" /> </svg> <span>Dashboard</span> </a> <a href="inventory.html" class="nav-item"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M20 2H4c-1 0-2 .9-2 2v3.01c0 .72.43 1.34 1 1.69V20c0 1.1 1.1 2 2 2h14c.9 0 2-.9 2-2V8.7c.57-.35 1-.97 1-1.69V4c0-1.1-1-2-2-2zm-5 12H9v-2h6v2zm5-7H4V4h16v3z" /> </svg> <span>Inventory</span> </a> <a href="billing.html" class="nav-item"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-5 14H7v-2h7v2zm3-4H7v-2h10v2zm0-4H7V7h10v2z" /> </svg> <span>Billing</span> </a> <a href="invoices.html" class="nav-item"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm2 16H8v-2h8v2zm0-4H8v-2h8v2zm-3-5V3.5L18.5 9H13z" /> </svg> <span>Invoices</span> </a> <a href="returns.html" class="nav-item"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M11 9h2V6h3V4h-3V1h-2v3H8v2h3v3zm-4 9c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zm10 0c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2zm-9.83-3.25l.03-.12.9-1.63h7.45c.75 0 1.41-.41 1.75-1.03l3.86-7.01L19.42 4h-.01l-1.1 2-2.76 5H8.53l-.13-.27L6.16 6l-.95-2-.94-2H1v2h2l3.6 7.59-1.35 2.45c-.16.28-.25.61-.25.96 0 1.1.9 2 2 2h12v-2H7.42c-.13 0-.25-.11-.25-.25z" /> </svg> <span>Returns</span> </a> <a href="damage_items.html" class="nav-item active"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z" /> </svg> <span>Damage Items</span> </a> <a href="credit.html" class="nav-item"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4v-6h16v6zm0-10H4V6h16v2z" /> </svg> <span>Credit Ledger</span> </a> <a href="expenses.html" class="nav-item"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M11.8 10.9c-2.27-.59-3-1.2-3-2.15 0-1.09 1.01-1.85 2.7-1.85 1.78 0 2.44.85 2.5 2.1h2.21c-.07-1.72-1.12-3.3-3.21-3.81V3h-3v2.16c-1.94.42-3.5 1.68-3.5 3.61 0 2.31 1.91 3.46 4.7 4.13 2.5.6 3 1.48 3 2.41 0 .69-.49 1.79-2.7 1.79-2.06 0-2.87-.92-2.98-2.1h-2.2c.12 2.19 1.76 3.42 3.68 3.83V21h3v-2.15c1.95-.37 3.5-1.5 3.5-3.55 0-2.84-2.43-3.81-4.7-4.4z" /> </svg> <span>Expenses</span> </a> <a href="reports.html" class="nav-item" id="reportsLink" style="display: none;"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z" /> </svg> <span>Reports</span> </a> <!-- Admin Link (Dynamically shown) --> <a href="admin.html" class="nav-item" id="adminLink" style="display: none;"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M12 12c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm6-1.8C18 6.57 15.35 4 12 4s-6 2.57-6 6.2c0 2.34 1.95 5.44 6 9.14 4.05-3.7 6-6.8 6-9.14zM12 2c4.2 0 8 3.22 8 8.2 0 3.32-2.67 7.25-8 11.8-5.33-4.55-8-8.48-8-11.8C4 5.22 7.8 2 12 2z" /> </svg> <span>Administrator</span> </a> <a href="#" onclick="app.logout(); return false;" class="nav-item" style="margin-top: auto; color: var(--danger); border-top: 1px solid var(--border-color);"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M17 7l-1.41 1.41L18.17 11H8v2h10.17l-2.58 2.58L17 17l5-5zM4 5h8V3H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h8v-2H4V5z" /> </svg> <span>Logout</span> </a> </nav> </aside> <!-- Main Content --> <main class="main-content"> <header class="page-header"> <h2>Damaged Items Report</h2> <div class="header-actions"> <button class="btn btn-secondary" onclick="exportToExcel('damageItemsTable')"> <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M19 12v7H5v-7H3v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zm-6 .67l2.59-2.58L17 11.5l-5 5-5-5 1.41-1.41L11 12.67V3h2z" /> </svg> <span>Export to Excel</span> </button> </div> </header> <div class="card"> <div class="table-container"> <table id="damageItemsTable"> <thead> <tr> <th>Date</th> <th>Item Code</th> <th>Product Name</th> <th>Weight</th> <th>Quantity</th> <th>Reason</th> <th>Actions</th> </tr> </thead> <tbody id="damageItemsList"> <tr> <td colspan="7" class="loading">Loading damaged items...</td> </tr> </tbody> </table> </div> </div> </main> </div> <!-- Edit Damage Item Modal --> <div class="modal" id="editDamageModal"> <div class="modal-content"> <div class="modal-header"> <h3>Edit Damaged Item</h3> <button class="close-modal" onclick="closeEditModal()">×</button> </div> <form id="editDamageForm" onsubmit="updateDamageItem(event)"> <input type="hidden" id="editReturnId"> <input type="hidden" id="editReturnType"> <input type="hidden" id="editSkuId"> <div class="form-group"> <label>Product Details</label> <input type="text" class="form-control" id="editProductDetails" readonly> </div> <div class="form-group"> <label>Return Date</label> <input type="date" class="form-control" id="editDate" required> </div> <div class="form-group"> <label>Customer Name</label> <input type="text" class="form-control" id="editCustomerName"> </div> <div class="form-group"> <label>Quantity</label> <input type="number" class="form-control" id="editQuantity" required min="1"> </div> <div class="form-group"> <label>Reason</label> <input type="text" class="form-control" id="editReason" required> </div> <div style="display: flex; gap: 1rem; justify-content: flex-end;"> <button type="button" class="btn btn-secondary" onclick="closeEditModal()">Cancel</button> <button type="submit" class="btn btn-primary">Update</button> </div> </form> </div> </div> <script src="../scripts/main.js"></script> <script src="../scripts/excel-export.js"></script> <script src="../scripts/damage_items.js"></script> </body> </html>PK ��\m��8 �8 inventory.htmlnu �[��� <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="icon" type="image/png" href="../assets/favicon.png"> <title>Inventory Management - Shayan Food Masala</title> <link rel="stylesheet" href="../styles/index.css"> <link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet"> </head> <body> <div class="app-container"> <!-- Sidebar Navigation --> <aside class="sidebar"> <div class="logo"> <img src="../assets/logo.png" alt="Shayan Food Logo" class="logo-img"> <p>Inventory Management</p> </div> <nav class="nav-menu"> <a href="../index.html" class="nav-item"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M3 13h8V3H3v10zm0 8h8v-6H3v6zm10 0h8V11h-8v10zm0-18v6h8V3h-8z" /> </svg> <span>Dashboard</span> </a> <a href="inventory.html" class="nav-item" class="nav-item active"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M20 2H4c-1 0-2 .9-2 2v3.01c0 .72.43 1.34 1 1.69V20c0 1.1 1.1 2 2 2h14c.9 0 2-.9 2-2V8.7c.57-.35 1-.97 1-1.69V4c0-1.1-1-2-2-2zm-5 12H9v-2h6v2zm5-7H4V4h16v3z" /> </svg> <span>Inventory</span> </a> <a href="billing.html" class="nav-item"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-5 14H7v-2h7v2zm3-4H7v-2h10v2zm0-4H7V7h10v2z" /> </svg> <span>Billing</span> </a> <a href="invoices.html" class="nav-item"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm2 16H8v-2h8v2zm0-4H8v-2h8v2zm-3-5V3.5L18.5 9H13z" /> </svg> <span>Invoices</span> </a> <a href="returns.html" class="nav-item"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M11 9h2V6h3V4h-3V1h-2v3H8v2h3v3zm-4 9c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zm10 0c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2zm-9.83-3.25l.03-.12.9-1.63h7.45c.75 0 1.41-.41 1.75-1.03l3.86-7.01L19.42 4h-.01l-1.1 2-2.76 5H8.53l-.13-.27L6.16 6l-.95-2-.94-2H1v2h2l3.6 7.59-1.35 2.45c-.16.28-.25.61-.25.96 0 1.1.9 2 2 2h12v-2H7.42c-.13 0-.25-.11-.25-.25z" /> </svg> <span>Returns</span> </a> <a href="damage_items.html" class="nav-item"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z" /> </svg> <span>Damage Items</span> </a> <a href="credit.html" class="nav-item"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4v-6h16v6zm0-10H4V6h16v2z" /> </svg> <span>Credit Ledger</span> </a> <a href="expenses.html" class="nav-item"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M11.8 10.9c-2.27-.59-3-1.2-3-2.15 0-1.09 1.01-1.85 2.7-1.85 1.78 0 2.44.85 2.5 2.1h2.21c-.07-1.72-1.12-3.3-3.21-3.81V3h-3v2.16c-1.94.42-3.5 1.68-3.5 3.61 0 2.31 1.91 3.46 4.7 4.13 2.5.6 3 1.48 3 2.41 0 .69-.49 1.79-2.7 1.79-2.06 0-2.87-.92-2.98-2.1h-2.2c.12 2.19 1.76 3.42 3.68 3.83V21h3v-2.15c1.95-.37 3.5-1.5 3.5-3.55 0-2.84-2.43-3.81-4.7-4.4z" /> </svg> <span>Expenses</span> </a> <a href="reports.html" class="nav-item" id="reportsLink" style="display: none;"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z" /> </svg> <span>Reports</span> </a> <!-- Admin Link (Dynamically shown) --> <a href="admin.html" class="nav-item" id="adminLink" style="display: none;"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M12 12c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm6-1.8C18 6.57 15.35 4 12 4s-6 2.57-6 6.2c0 2.34 1.95 5.44 6 9.14 4.05-3.7 6-6.8 6-9.14zM12 2c4.2 0 8 3.22 8 8.2 0 3.32-2.67 7.25-8 11.8-5.33-4.55-8-8.48-8-11.8C4 5.22 7.8 2 12 2z" /> </svg> <span>Administrator</span> </a> <a href="#" onclick="app.logout(); return false;" class="nav-item" style="margin-top: auto; color: var(--danger); border-top: 1px solid var(--border-color);"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M17 7l-1.41 1.41L18.17 11H8v2h10.17l-2.58 2.58L17 17l5-5zM4 5h8V3H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h8v-2H4V5z" /> </svg> <span>Logout</span> </a> </nav> </aside> <!-- Main Content --> <main class="main-content"> <header class="page-header"> <h2>Inventory Management</h2> <div class="header-actions"> <button class="btn btn-secondary" onclick="exportInventoryToExcel()"> <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M19 12v7H5v-7H3v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zm-6 .67l2.59-2.58L17 11.5l-5 5-5-5 1.41-1.41L11 12.67V3h2z" /> </svg> <span>Export to Excel</span> </button> <button class="btn btn-primary" onclick="openAddSkuModal()"> <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z" /> </svg> <span>Add New SKU</span> </button> </div> </header> <!-- Filter Section --> <div class="card"> <div style="display: flex; gap: 1rem; align-items: center;"> <div class="form-group" style="margin: 0; flex: 1;"> <label>Filter by Product</label> <select class="form-control" id="productFilter" onchange="filterInventory()"> <option value="">All Products</option> <option value="Achar">Achar</option> <option value="Jam">Jam</option> <option value="Juice">Juice</option> </select> </div> <div class="form-group" style="margin: 0; flex: 1;"> <label>Search SKU</label> <input type="text" class="form-control" id="searchSku" placeholder="Search by SKU code or flavour" oninput="filterInventory()"> </div> </div> </div> <!-- Inventory Table --> <div class="table-container"> <table> <thead> <tr> <th>SKU Code</th> <th>Product</th> <th>Flavour</th> <th>Weight</th> <th>TAG</th> <th>Current Stock</th> <th>Price (PKR)</th> <th>Stock Value</th> <th>Actions</th> </tr> </thead> <tbody id="inventoryTableBody"> <tr> <td colspan="9" class="loading">Loading inventory...</td> </tr> </tbody> </table> </div> </main> </div> <!-- Edit Stock Modal --> <div class="modal" id="editStockModal"> <div class="modal-content"> <div class="modal-header"> <h3>Update Stock & Price</h3> <button class="close-modal" onclick="closeEditStockModal()">×</button> </div> <form id="editStockForm" onsubmit="updateStock(event)"> <input type="hidden" id="editSkuId"> <div class="form-group"> <label>SKU Code</label> <input type="text" class="form-control" id="editSkuCode" readonly> </div> <div class="form-group"> <label>Product Details</label> <input type="text" class="form-control" id="editProductDetails" readonly> </div> <div class="form-group"> <label>Current Stock</label> <input type="number" class="form-control" id="editCurrentStock" required min="0"> </div> <div class="form-group"> <label>Price (PKR)</label> <input type="number" class="form-control" id="editPrice" required min="0" step="0.01"> </div> <div class="form-group"> <label>TAG (Brand/Company)</label> <input type="text" class="form-control" id="editTag" placeholder="e.g., Shan, National, Habib"> </div> <div style="display: flex; gap: 1rem; justify-content: flex-end;"> <button type="button" class="btn btn-secondary" onclick="closeEditStockModal()">Cancel</button> <button type="submit" class="btn btn-primary">Update</button> </div> </form> </div> </div> <!-- Add SKU Modal --> <div class="modal" id="addSkuModal"> <div class="modal-content"> <div class="modal-header"> <h3>Add New SKU</h3> <button class="close-modal" onclick="closeAddSkuModal()">×</button> </div> <form id="addSkuForm" onsubmit="addNewSku(event)"> <div class="form-group"> <label>SKU Code</label> <input type="text" class="form-control" id="newSkuCode" required placeholder="e.g., AC-MX-05"> </div> <div class="form-group"> <label>Product Category</label> <select class="form-control" id="newProductSelect" onchange="toggleCategoryInput()"> <option value="">Select Existing or Create New</option> </select> <input type="text" class="form-control" id="newProductCategory" placeholder="Or enter new category..." style="margin-top: 0.5rem; display: none;"> <input type="hidden" id="newProductId"> </div> <div class="form-group"> <label>Flavour</label> <input type="text" class="form-control" id="newFlavour" required placeholder="e.g., Mixed, Mango"> </div> <div class="form-group"> <label>Weight/Size</label> <input type="text" class="form-control" id="newWeight" required placeholder="e.g., 500g, 5kg, 1L"> </div> <div class="form-group"> <label>Initial Stock</label> <input type="number" class="form-control" id="newStock" required min="0" value="0"> </div> <div class="form-group"> <label>Price (PKR)</label> <input type="number" class="form-control" id="newPrice" required min="0" step="0.01"> </div> <div class="form-group"> <label>TAG (Brand/Company)</label> <input type="text" class="form-control" id="newTag" placeholder="e.g., Shan, National, Habib"> </div> <div style="display: flex; gap: 1rem; justify-content: flex-end;"> <button type="button" class="btn btn-secondary" onclick="closeAddSkuModal()">Cancel</button> <button type="submit" class="btn btn-primary">Add SKU</button> </div> </form> </div> </div> <script src="../scripts/main.js"></script> <script src="../scripts/excel-export.js"></script> <script src="../scripts/inventory.js"></script> </body> </html>PK ��\=Р-QC QC billing.htmlnu �[��� <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="icon" type="image/png" href="../assets/favicon.png"> <title>Billing & Sales - Shayan Food</title> <link rel="stylesheet" href="../styles/index.css"> <link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet"> </head> <body> <div class="app-container"> <!-- Sidebar Navigation --> <aside class="sidebar"> <div class="logo"> <img src="../assets/logo.png" alt="Shayan Food Logo" class="logo-img"> <p>Inventory Management</p> </div> <nav class="nav-menu"> <a href="../index.html" class="nav-item"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M3 13h8V3H3v10zm0 8h8v-6H3v6zm10 0h8V11h-8v10zm0-18v6h8V3h-8z" /> </svg> <span>Dashboard</span> </a> <a href="inventory.html" class="nav-item"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M20 2H4c-1 0-2 .9-2 2v3.01c0 .72.43 1.34 1 1.69V20c0 1.1 1.1 2 2 2h14c.9 0 2-.9 2-2V8.7c.57-.35 1-.97 1-1.69V4c0-1.1-1-2-2-2zm-5 12H9v-2h6v2zm5-7H4V4h16v3z" /> </svg> <span>Inventory</span> </a> <a href="billing.html" class="nav-item" class="nav-item active"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-5 14H7v-2h7v2zm3-4H7v-2h10v2zm0-4H7V7h10v2z" /> </svg> <span>Billing</span> </a> <a href="invoices.html" class="nav-item"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm2 16H8v-2h8v2zm0-4H8v-2h8v2zm-3-5V3.5L18.5 9H13z" /> </svg> <span>Invoices</span> </a> <a href="returns.html" class="nav-item"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M11 9h2V6h3V4h-3V1h-2v3H8v2h3v3zm-4 9c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zm10 0c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2zm-9.83-3.25l.03-.12.9-1.63h7.45c.75 0 1.41-.41 1.75-1.03l3.86-7.01L19.42 4h-.01l-1.1 2-2.76 5H8.53l-.13-.27L6.16 6l-.95-2-.94-2H1v2h2l3.6 7.59-1.35 2.45c-.16.28-.25.61-.25.96 0 1.1.9 2 2 2h12v-2H7.42c-.13 0-.25-.11-.25-.25z" /> </svg> <span>Returns</span> </a> <a href="damage_items.html" class="nav-item"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z" /> </svg> <span>Damage Items</span> </a> <a href="credit.html" class="nav-item"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4v-6h16v6zm0-10H4V6h16v2z" /> </svg> <span>Credit Ledger</span> </a> <a href="expenses.html" class="nav-item"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M11.8 10.9c-2.27-.59-3-1.2-3-2.15 0-1.09 1.01-1.85 2.7-1.85 1.78 0 2.44.85 2.5 2.1h2.21c-.07-1.72-1.12-3.3-3.21-3.81V3h-3v2.16c-1.94.42-3.5 1.68-3.5 3.61 0 2.31 1.91 3.46 4.7 4.13 2.5.6 3 1.48 3 2.41 0 .69-.49 1.79-2.7 1.79-2.06 0-2.87-.92-2.98-2.1h-2.2c.12 2.19 1.76 3.42 3.68 3.83V21h3v-2.15c1.95-.37 3.5-1.5 3.5-3.55 0-2.84-2.43-3.81-4.7-4.4z" /> </svg> <span>Expenses</span> </a> <a href="reports.html" class="nav-item" id="reportsLink" style="display: none;"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z" /> </svg> <span>Reports</span> </a> <!-- Admin Link (Dynamically shown) --> <a href="admin.html" class="nav-item" id="adminLink" style="display: none;"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M12 12c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm6-1.8C18 6.57 15.35 4 12 4s-6 2.57-6 6.2c0 2.34 1.95 5.44 6 9.14 4.05-3.7 6-6.8 6-9.14zM12 2c4.2 0 8 3.22 8 8.2 0 3.32-2.67 7.25-8 11.8-5.33-4.55-8-8.48-8-11.8C4 5.22 7.8 2 12 2z" /> </svg> <span>Administrator</span> </a> <a href="#" onclick="app.logout(); return false;" class="nav-item" style="margin-top: auto; color: var(--danger); border-top: 1px solid var(--border-color);"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M17 7l-1.41 1.41L18.17 11H8v2h10.17l-2.58 2.58L17 17l5-5zM4 5h8V3H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h8v-2H4V5z" /> </svg> <span>Logout</span> </a> </nav> </aside> <!-- Main Content --> <main class="main-content"> <header class="page-header"> <h2>Billing & Sales</h2> <div class="header-actions"> <button class="btn btn-secondary" onclick="viewSalesHistory()"> <span>Sales History</span> </button> </div> </header> <div style="display: grid; grid-template-columns: 2fr 1fr; gap: 1.5rem;"> <!-- Left: New Bill Form --> <div class="card"> <h3>New Sale</h3> <form id="billingForm" onsubmit="processSale(event)"> <div class="form-group"> <label>Transaction Date</label> <input type="date" class="form-control" id="transactionDate" required> </div> <div class="form-group"> <label>Customer Name (Optional)</label> <input type="text" class="form-control" id="customerName" placeholder="Walk-in Customer"> </div> <!-- Discount Input (Visible only for authorized users) --> <div class="form-group" id="discountGroup" style="display: none;"> <label>Discount (%)</label> <div style="display: flex; gap: 0.5rem; align-items: center;"> <input type="number" class="form-control" id="discountPercentage" min="0" max="100" step="0.1" placeholder="Enter discount % (0-100)" onchange="updateDiscountAmount()"> <span id="discountAmountDisplay" style="color: var(--success); font-weight: 600; min-width: 100px;"></span> <button type="button" class="btn btn-secondary" onclick="clearDiscount()" style="padding: 0.5rem 0.75rem; font-size: 0.875rem;">Clear</button> </div> <div style="font-size: 0.875rem; color: var(--text-muted); margin-top: 0.25rem;"> Manual discount only - no automatic discounts applied </div> </div> <div class="form-group"> <label>Amount Paid (Cash)</label> <input type="number" class="form-control" id="amountPaid" min="0" step="0.01" placeholder="Enter amount paid by customer"> </div> <hr style="border: none; border-top: 1px solid var(--glass-border); margin: 1.5rem 0;"> <h4 style="margin-bottom: 1rem;">Add Items</h4> <div style="display: grid; grid-template-columns: 2fr 1fr auto; gap: 0.5rem; align-items: end; margin-bottom: 1rem;"> <div class="form-group" style="margin: 0;"> <label>Select Product</label> <select class="form-control" id="skuSelect"> <option value="">Loading products...</option> </select> </div> <div class="form-group" style="margin: 0;"> <label>Quantity</label> <input type="number" class="form-control" id="itemQuantity" min="1" value="1"> </div> <button type="button" class="btn btn-primary" onclick="addItemToCart()" style="height: 42px;"> Add </button> </div> <div id="cartItems" style="margin-top: 1.5rem;"> <p class="text-muted" style="text-align: center; padding: 2rem;">No items added yet</p> </div> <div style="margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--glass-border); display: flex; gap: 0.5rem;"> <button type="button" class="btn btn-secondary" onclick="previewInvoiceFromCart()" style="flex: 1; padding: 1rem; font-size: 1rem;" id="previewInvoiceBtn" disabled> Preview Invoice </button> <button type="submit" class="btn btn-success" style="flex: 1; padding: 1rem; font-size: 1rem;" id="submitBtn" disabled> Complete Sale </button> </div> </form> </div> <!-- Right: Bill Summary --> <div> <div class="card" style="position: sticky; top: 1.5rem;"> <h3>Bill Summary</h3> <div id="billSummary" style="margin-top: 1rem;"> <div style="display: flex; justify-content: space-between; padding: 0.75rem 0; border-bottom: 1px solid var(--glass-border);"> <span>Items:</span> <strong id="summaryItemCount">0</strong> </div> <div style="display: flex; justify-content: space-between; padding: 0.75rem 0; border-bottom: 1px solid var(--glass-border);"> <span>Subtotal:</span> <strong id="summarySubtotal">PKR 0</strong> </div> <div style="display: flex; justify-content: space-between; padding: 0.75rem 0; border-bottom: 1px solid var(--glass-border);"> <span>Discount:</span> <strong id="summaryDiscount">PKR 0</strong> </div> <div style="display: flex; justify-content: space-between; padding: 1rem 0; margin-top: 0.5rem;"> <span style="font-size: 1.25rem; font-weight: 600;">Total:</span> <strong id="summaryTotal" style="font-size: 1.5rem; color: var(--danger);">PKR 0</strong> </div> </div> </div> </div> </div> <!-- Sales History Section --> <div id="salesHistorySection" style="display: none; margin-top: 2rem;"> <div class="card"> <div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem;"> <h3>Sales History</h3> <button class="btn btn-secondary" onclick="closeSalesHistory()">Close</button> </div> <div style="display: flex; gap: 1rem; margin-bottom: 1rem;"> <div class="form-group" style="margin: 0; flex: 1;"> <label>From Date</label> <input type="date" class="form-control" id="filterStartDate"> </div> <div class="form-group" style="margin: 0; flex: 1;"> <label>To Date</label> <input type="date" class="form-control" id="filterEndDate"> </div> <button class="btn btn-primary" onclick="filterSalesHistory()" style="align-self: flex-end; height: 42px;"> Filter </button> <button class="btn btn-secondary" onclick="exportTransactionsToExcel(document.getElementById('filterStartDate').value, document.getElementById('filterEndDate').value)" style="align-self: flex-end; height: 42px;"> <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" style="width: 1rem; height: 1rem; vertical-align: middle; margin-right: 0.25rem;"> <path d="M19 12v7H5v-7H3v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zm-6 .67l2.59-2.58L17 11.5l-5 5-5-5 1.41-1.41L11 12.67V3h2z" /> </svg> Export </button> </div> <div class="table-container"> <table> <thead> <tr> <th>Date</th> <th>Customer</th> <th>Total Amount</th> <th>Actions</th> </tr> </thead> <tbody id="salesHistoryBody"> <tr> <td colspan="5" class="loading">Loading sales history...</td> </tr> </tbody> </table> </div> </div> </div> </main> </div> <!-- Transaction Details Modal --> <div class="modal" id="transactionDetailsModal"> <div class="modal-content"> <div class="modal-header"> <h3>Transaction Details</h3> <button class="close-modal" onclick="closeTransactionDetails()">×</button> </div> <div id="transactionDetailsContent"> <p class="loading">Loading...</p> </div> </div> </div> <script src="../scripts/main.js"></script> <script src="../scripts/excel-export.js"></script> <script src="../scripts/billing.js"></script> </body> </html>PK ��\t�?8 ?8 returns.htmlnu �[��� <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="icon" type="image/png" href="../assets/favicon.png"> <title>Returns Management - Shayan Food</title> <link rel="stylesheet" href="../styles/index.css"> <link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet"> </head> <body> <div class="app-container"> <!-- Sidebar Navigation --> <aside class="sidebar"> <div class="logo"> <img src="../assets/logo.png" alt="Shayan Food Logo" class="logo-img"> <p>Inventory Management</p> </div> <nav class="nav-menu"> <a href="../index.html" class="nav-item"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M3 13h8V3H3v10zm0 8h8v-6H3v6zm10 0h8V11h-8v10zm0-18v6h8V3h-8z" /> </svg> <span>Dashboard</span> </a> <a href="inventory.html" class="nav-item"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M20 2H4c-1 0-2 .9-2 2v3.01c0 .72.43 1.34 1 1.69V20c0 1.1 1.1 2 2 2h14c.9 0 2-.9 2-2V8.7c.57-.35 1-.97 1-1.69V4c0-1.1-1-2-2-2zm-5 12H9v-2h6v2zm5-7H4V4h16v3z" /> </svg> <span>Inventory</span> </a> <a href="billing.html" class="nav-item"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-5 14H7v-2h7v2zm3-4H7v-2h10v2zm0-4H7V7h10v2z" /> </svg> <span>Billing</span> </a> <a href="invoices.html" class="nav-item"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm2 16H8v-2h8v2zm0-4H8v-2h8v2zm-3-5V3.5L18.5 9H13z" /> </svg> <span>Invoices</span> </a> <a href="returns.html" class="nav-item" class="nav-item active"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M11 9h2V6h3V4h-3V1h-2v3H8v2h3v3zm-4 9c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zm10 0c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2zm-9.83-3.25l.03-.12.9-1.63h7.45c.75 0 1.41-.41 1.75-1.03l3.86-7.01L19.42 4h-.01l-1.1 2-2.76 5H8.53l-.13-.27L6.16 6l-.95-2-.94-2H1v2h2l3.6 7.59-1.35 2.45c-.16.28-.25.61-.25.96 0 1.1.9 2 2 2h12v-2H7.42c-.13 0-.25-.11-.25-.25z" /> </svg> <span>Returns</span> </a> <a href="damage_items.html" class="nav-item"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z" /> </svg> <span>Damage Items</span> </a> <a href="credit.html" class="nav-item"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4v-6h16v6zm0-10H4V6h16v2z" /> </svg> <span>Credit Ledger</span> </a> <a href="expenses.html" class="nav-item"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M11.8 10.9c-2.27-.59-3-1.2-3-2.15 0-1.09 1.01-1.85 2.7-1.85 1.78 0 2.44.85 2.5 2.1h2.21c-.07-1.72-1.12-3.3-3.21-3.81V3h-3v2.16c-1.94.42-3.5 1.68-3.5 3.61 0 2.31 1.91 3.46 4.7 4.13 2.5.6 3 1.48 3 2.41 0 .69-.49 1.79-2.7 1.79-2.06 0-2.87-.92-2.98-2.1h-2.2c.12 2.19 1.76 3.42 3.68 3.83V21h3v-2.15c1.95-.37 3.5-1.5 3.5-3.55 0-2.84-2.43-3.81-4.7-4.4z" /> </svg> <span>Expenses</span> </a> <!-- Admin Link (Dynamically shown) --> <a href="admin.html" class="nav-item" id="adminLink" style="display: none;"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M12 12c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm6-1.8C18 6.57 15.35 4 12 4s-6 2.57-6 6.2c0 2.34 1.95 5.44 6 9.14 4.05-3.7 6-6.8 6-9.14zM12 2c4.2 0 8 3.22 8 8.2 0 3.32-2.67 7.25-8 11.8-5.33-4.55-8-8.48-8-11.8C4 5.22 7.8 2 12 2z" /> </svg> <span>Administrator</span> </a> <a href="#" onclick="app.logout(); return false;" class="nav-item" style="margin-top: auto; color: var(--danger); border-top: 1px solid var(--border-color);"> <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M17 7l-1.41 1.41L18.17 11H8v2h10.17l-2.58 2.58L17 17l5-5zM4 5h8V3H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h8v-2H4V5z" /> </svg> <span>Logout</span> </a> </nav> </aside> <!-- Main Content --> <main class="main-content"> <header class="page-header"> <h2>Returns Management</h2> </header> <div style="display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem;"> <!-- Left: Process Return --> <div class="card"> <h3>Process Return</h3> <form id="returnForm" onsubmit="processReturn(event)"> <div class="form-group"> <label>Return Date</label> <input type="date" class="form-control" id="returnDate" required> </div> <div class="form-group"> <label>Customer Name (Optional)</label> <input type="text" class="form-control" id="customerName" placeholder="Customer name"> </div> <div class="form-group"> <label>Return Type</label> <select class="form-control" id="returnType"> <option value="Normal">Normal Return (Add to Stock)</option> <option value="Damaged">Damaged Item (Do Not Restock)</option> </select> </div> <div class="form-group"> <label>Reason for Return (Optional)</label> <textarea class="form-control" id="returnReason" rows="2" placeholder="e.g., Damaged, Wrong item"></textarea> </div> <hr style="border: none; border-top: 1px solid var(--glass-border); margin: 1.5rem 0;"> <h4 style="margin-bottom: 1rem;">Return Items</h4> <div style="display: grid; grid-template-columns: 2fr 1fr auto; gap: 0.5rem; align-items: end; margin-bottom: 1rem;"> <div class="form-group" style="margin: 0;"> <label>Select SKU</label> <select class="form-control" id="returnSkuSelect"> <option value="">Loading SKUs...</option> </select> </div> <div class="form-group" style="margin: 0;"> <label>Quantity</label> <input type="number" class="form-control" id="returnQuantity" min="1" value="1"> </div> <button type="button" class="btn btn-primary" onclick="addReturnItem()" style="height: 42px;"> Add </button> </div> <div id="returnItems" style="margin-top: 1.5rem;"> <p class="text-muted" style="text-align: center; padding: 2rem;">No items added yet</p> </div> <div style="margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--glass-border);"> <button type="submit" class="btn btn-success" style="width: 100%; padding: 1rem; font-size: 1rem;" id="submitReturnBtn" disabled> Process Return </button> </div> </form> </div> <!-- Right: Return History --> <div class="card"> <h3>Return History</h3> <div style="display: flex; gap: 0.5rem; margin-bottom: 1rem;"> <div class="form-group" style="margin: 0; flex: 1;"> <label>From Date</label> <input type="date" class="form-control" id="filterStartDate"> </div> <div class="form-group" style="margin: 0; flex: 1;"> <label>To Date</label> <input type="date" class="form-control" id="filterEndDate"> </div> <button class="btn btn-primary" onclick="filterReturns()" style="align-self: flex-end; height: 42px;"> Filter </button> <button class="btn btn-secondary" onclick="exportReturnsToExcel(document.getElementById('filterStartDate').value, document.getElementById('filterEndDate').value)" style="align-self: flex-end; height: 42px;"> <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" style="width: 1rem; height: 1rem; vertical-align: middle; margin-right: 0.25rem;"> <path d="M19 12v7H5v-7H3v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zm-6 .67l2.59-2.58L17 11.5l-5 5-5-5 1.41-1.41L11 12.67V3h2z" /> </svg> Export </button> </div> <div id="returnHistoryList" style="max-height: 600px; overflow-y: auto;"> <p class="loading">Loading returns...</p> </div> </div> </div> </main> </div> <!-- Edit Return Item Modal --> <div class="modal" id="editReturnModal"> <div class="modal-content"> <div class="modal-header"> <h3>Edit Return</h3> <button class="close-modal" onclick="closeEditReturnModal()">×</button> </div> <form id="editReturnForm" onsubmit="updateReturnRecord(event)"> <input type="hidden" id="editReturnId"> <input type="hidden" id="editSkuId"> <div class="form-group"> <label>Product Details</label> <input type="text" class="form-control" id="editProductDetails" readonly> </div> <div class="form-group"> <label>Return Date</label> <input type="date" class="form-control" id="editReturnDate" required> </div> <div class="form-group"> <label>Customer Name</label> <input type="text" class="form-control" id="editCustomerName"> </div> <div class="form-group"> <label>Return Type</label> <select class="form-control" id="editReturnType" required> <option value="Normal">Normal Return (Add to Stock)</option> <option value="Damaged">Damaged Item (Do Not Restock)</option> </select> </div> <div class="form-group"> <label>Quantity</label> <input type="number" class="form-control" id="editReturnQuantity" required min="1"> </div> <div class="form-group"> <label>Reason</label> <input type="text" class="form-control" id="editReturnReason"> </div> <div style="display: flex; gap: 1rem; justify-content: flex-end;"> <button type="button" class="btn btn-secondary" onclick="closeEditReturnModal()">Cancel</button> <button type="submit" class="btn btn-primary">Update Return</button> </div> </form> </div> </div> <script src="../scripts/main.js"></script> <script src="../scripts/excel-export.js"></script> <script src="../scripts/returns.js"></script> </body> </html>PK ��\M�y�7 �7 invoices.htmlnu �[��� PK ��\�X:�`8 `8 68 reports.htmlnu �[��� PK ��\�U��2 �2 �p admin.htmlnu �[��� PK ��\:t��8 8 �� expenses.htmlnu �[��� PK ��\�r4�k k T� _sidebar_template.htmlnu �[��� PK ��\�˃��4 �4 � credit.htmlnu �[��� PK ��\��^��( �( � damage_items.htmlnu �[��� PK ��\m��8 �8 �I inventory.htmlnu �[��� PK ��\=Р-QC QC �� billing.htmlnu �[��� PK ��\t�?8 ?8 !� returns.htmlnu �[��� PK ��
| ver. 1.4 |
Github
|
.
| PHP 8.1.34 | Generation time: 0.75 |
proxy
|
phpinfo
|
Settings