gitea init

This commit is contained in:
skryper
2025-10-08 21:28:30 +04:00
commit d4651a423d
2518 changed files with 522832 additions and 0 deletions
@@ -0,0 +1,143 @@
<?php
require_once __DIR__ . '/../../models/invoicesmodel.php';
use App\Config;
require_once Config::includePath('head.php');
require_once Config::includePath('navbar.php');
require_once Config::includePath('pageheader.php');
require_once Config::includePath('pagebodystart.php');
?>
<!-- CONTENT START -->
<div class="container-xl mt-4">
<h2 class="mb-4">ახალი ინვოისის დამატება</h2>
<form action="dashboard.php?module=billing&submodule=invoices&action=store" method="POST">
<div class="mb-3">
<label class="form-label">კლიენტი</label>
<select name="client_id" class="form-select" required>
<option value="">აირჩიე კლიენტი</option>
<?php foreach ($clients as $client): ?>
<option value="<?= $client['id'] ?>">
<?= htmlspecialchars($client['first_name'] . ' ' . $client['last_name']) ?>
</option>
<?php endforeach ?>
</select>
</div>
<div class="mb-4">
<label class="form-label">პროდუქტები</label>
<div id="product-container">
<div class="row product-item mb-2">
<div class="col-md-5">
<select name="products[]" class="form-select" required>
<option value="">აირჩიე პროდუქტი</option>
<?php foreach ($products as $product): ?>
<option value="<?= $product['id'] ?>">
<?= htmlspecialchars($product['name']) ?> (<?= $product['price'] ?> ₾)
</option>
<?php endforeach ?>
</select>
</div>
<div class="col-md-3">
<input type="number" name="amounts[]" step="0.01" class="form-control" placeholder="თანხა ₾" required>
</div>
<div class="col-md-3">
<input type="text" name="descriptions[]" class="form-control" placeholder="აღწერა (არასავალდებულო)">
</div>
<div class="col-md-1">
<button type="button" class="btn btn-danger btn-remove">-</button>
</div>
</div>
</div>
<button type="button" id="add-product" class="btn btn-secondary btn-sm mt-2">+ პროდუქტის დამატება</button>
</div>
<div class="mb-3">
<label class="form-label">ინვოისის ნომერი (არასავალდებულო)</label>
<input type="text" name="invoice_number" class="form-control"
placeholder="მაგ: INV-2025-001"
value="<?= htmlspecialchars($generatedInvoiceNumber) ?>" />
</div>
<div class="mb-3">
<label class="form-label">ინვოისის აღწერა</label>
<textarea name="description" class="form-control" rows="3"></textarea>
</div>
<div class="mb-3">
<label class="form-label">გადასახდელი თანხა (₾)</label>
<input type="number" step="0.01" name="total_amount" class="form-control" required>
</div>
<div class="mb-3">
<label class="form-label">გადახდის მეთოდი</label>
<input type="text" name="payment_method" class="form-control" value="საბანკო გადმორიცხვა" required>
</div>
<div class="mb-3">
<label class="form-label">სტატუსი</label>
<select name="status" class="form-select" required>
<option value="დრაფტი">დრაფტი</option>
<option value="გადაუხდელი">გადაუხდელი</option>
<option value="გადასახდელი">გადასახდელი</option>
<option value="გადახდილი">გადახდილი</option>
<option value="გაუქმებული">გაუქმებული</option>
</select>
</div>
<div class="mb-3 row">
<div class="col">
<label class="form-label">ინვოისის თარიღი</label>
<input type="date" name="issue_date" class="form-control" value="<?= date('Y-m-d') ?>" required>
</div>
<div class="col">
<label class="form-label">გადახდის ბოლო ვადა</label>
<input type="date" name="due_date" class="form-control" required>
</div>
</div>
<div class="mb-3">
<label class="form-check">
<input type="checkbox" name="recurring" value="1" class="form-check-input">
<span class="form-check-label">გადახდა განმეორებით (ყოველთვიურად)</span>
</label>
</div>
<div class="mt-4">
<button type="submit" class="btn btn-primary">ინვოისის შექმნა</button>
<a href="list.php" class="btn btn-secondary">გაუქმება</a>
</div>
</form>
</div></div>
<?php require_once Config::includePath('footer.php'); ?>
<script>
document.getElementById('add-product').addEventListener('click', function () {
const container = document.getElementById('product-container');
const item = container.querySelector('.product-item');
const clone = item.cloneNode(true);
// reset values
clone.querySelectorAll('input, select').forEach(el => el.value = '');
container.appendChild(clone);
});
// remove button
document.addEventListener('click', function (e) {
if (e.target.classList.contains('btn-remove')) {
const allItems = document.querySelectorAll('.product-item');
if (allItems.length > 1) {
e.target.closest('.product-item').remove();
}
}
});
</script>
@@ -0,0 +1,90 @@
<?php
require_once __DIR__ . '/../../models/invoicesmodel.php';
use App\Config;
require_once Config::includePath('head.php');
require_once Config::includePath('navbar.php');
require_once Config::includePath('pageheader.php');
require_once Config::includePath('pagebodystart.php');
?>
<!-- CONTENT START -->
<div class="page-wrapper">
<div class="container-xl mt-4">
<h2 class="mb-4">ინვოისის რედაქტირება</h2>
<form action="dashboard.php?module=billing&submodule=invoices&action=update" method="POST">
<input type="hidden" name="id" value="<?= $invoice['id'] ?>">
<div class="mb-3">
<label class="form-label">კლიენტი</label>
<select name="client_id" class="form-select" required>
<?php foreach ($clients as $client): ?>
<option value="<?= $client['id'] ?>" <?= $invoice['client_id'] == $client['id'] ? 'selected' : '' ?>>
<?= htmlspecialchars($client['first_name'] . ' ' . $client['last_name']) ?>
</option>
<?php endforeach ?>
</select>
</div>
<div class="mb-3">
<label class="form-label">ინვოისის ნომერი</label>
<input type="text" name="invoice_number" class="form-control" value="<?= htmlspecialchars($invoice['invoice_number']) ?>" required>
</div>
<div class="mb-3">
<label class="form-label">აღწერა</label>
<textarea name="description" class="form-control"><?= htmlspecialchars($invoice['description']) ?></textarea>
</div>
<div class="row mb-3">
<div class="col-md-6">
<label class="form-label">გადახდის მეთოდი</label>
<input type="text" name="payment_method" class="form-control" value="<?= htmlspecialchars($invoice['payment_method']) ?>" required>
</div>
<div class="col-md-6">
<label class="form-label">სტატუსი</label>
<select name="status" class="form-select">
<?php foreach (['დრაფტი', 'გადაუხდელი', 'გადასახდელი', 'გადახდილი', 'გაუქმებული'] as $status): ?>
<option value="<?= $status ?>" <?= $invoice['status'] == $status ? 'selected' : '' ?>><?= $status ?></option>
<?php endforeach ?>
</select>
</div>
</div>
<div class="mb-3">
<label class="form-label">თანხა (₾)</label>
<input type="number" name="total_amount" class="form-control" step="0.01" value="<?= $invoice['total_amount'] ?>" required>
</div>
<div class="row mb-3">
<div class="col-md-6">
<label class="form-label">ინვოისის თარიღი</label>
<input type="date" name="issue_date" class="form-control" value="<?= $invoice['issue_date'] ?>" required>
</div>
<div class="col-md-6">
<label class="form-label">გადახდის ბოლო ვადა</label>
<input type="date" name="due_date" class="form-control" value="<?= $invoice['due_date'] ?>" required>
</div>
</div>
<div class="mb-3">
<label class="form-check">
<input class="form-check-input" type="checkbox" name="recurring" value="1" <?= $invoice['recurring'] ? 'checked' : '' ?>>
<span class="form-check-label">გადახდა განმეორებით (ყოველთვიურად)</span>
</label>
</div>
<div class="mt-4">
<button type="submit" class="btn btn-primary">შენახვა</button>
<a href="dashboard.php?module=billing&submodule=invoices&action=view&id=<?= $invoice['id'] ?>" class="btn btn-secondary">უკან</a>
</div>
</form>
</div>
</div>
<?php require_once Config::includePath('footer.php'); ?>
@@ -0,0 +1,64 @@
<!-- ინვოისების სია + ფილტრები -->
<?php require_once __DIR__ . '/../../models/invoicesmodel.php'; ?>
<?php
use App\Config;
InvoicesModel::setDb($pdo);
$invoices = InvoicesModel::getAllInvoicesWithClientNames();
require_once Config::includePath('head.php');
require_once Config::includePath('navbar.php');
require_once Config::includePath('pageheader.php');
require_once Config::includePath('pagebodystart.php');
?>
<div class="container-xl mt-4">
<div class="d-flex justify-content-between mb-3">
<h2>ინვოისების სია</h2>
<a href="dashboard.php?module=billing&submodule=invoices&action=create" class="btn btn-primary">+ ახალი ინვოისი</a>
</div>
<div class="card">
<div class="table-responsive">
<table class="table table-striped">
<thead>
<tr>
<th>ID</th>
<th>კლიენტი</th>
<th>თანხა</th>
<th>სტატუსი</th>
<th>თარიღი</th>
<th>ვადა</th>
<th></th>
</tr>
</thead>
<tbody>
<?php foreach ($invoices as $invoice): ?>
<tr>
<td><?= $invoice['id'] ?></td>
<td><?= htmlspecialchars($invoice['client_name']) ?></td>
<td><?= number_format($invoice['total_amount'], 2) ?> ₾</td>
<td>
<span class="badge bg-light">
<?= htmlspecialchars($invoice['status']) ?>
</span>
</td>
<td><?= $invoice['issue_date'] ?></td>
<td><?= $invoice['due_date'] ?></td>
<td>
<a href="dashboard.php?module=billing&submodule=invoices&action=view&id=<?= $invoice['id'] ?>" class="btn btn-sm btn-info">ნახვა</a>
<a href="dashboard.php?module=billing&submodule=invoices&action=edit&id=<?= $invoice['id'] ?>" class="btn btn-sm btn-warning">რედაქტირება</a>
<a href="dashboard.php?module=billing&submodule=invoices&action=delete&id=<?= $invoice['id'] ?>" class="btn btn-sm btn-danger" onclick="return confirm('ნამდვილად გსურს წაშლა?')">წაშლა</a>
</td>
</tr>
<?php endforeach ?>
</tbody>
</table>
</div>
</div>
</div>
<!-- Content END -->
</div>
</div>
<?php require_once Config::includePath('footer.php'); ?>
@@ -0,0 +1,167 @@
<!DOCTYPE html>
<html lang="ka">
<head>
<meta charset="UTF-8">
<title>ინვოისი</title>
<style>
@font-face {
font-family: DejaVu Sans;
}
body {
font-family: DejaVu Sans;
font-size: 14px;
color: #333;
}
.invoice-box {
max-width: 800px;
margin: auto;
padding: 30px;
border: 1px solid #eee;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
}
.top-header {
display: flex;
justify-content: space-between;
align-items: flex-start;
}
.top-header img {
max-width: 250px;
}
.bank-info {
text-align: right;
font-size: 13px;
line-height: 1.6;
}
.green-banner {
position: absolute;
top: 0;
right: 0;
background: #4CAF50;
color: white;
padding: 5px 20px;
transform: rotate(45deg);
transform-origin: top right;
font-size: 16px;
}
.section {
margin-top: 20px;
}
.gray-box {
background: #eee;
padding: 10px;
font-weight: bold;
}
table {
width: 100%;
border-collapse: collapse;
margin-top: 15px;
}
table, th, td {
border: 1px solid #ccc;
}
th, td {
padding: 10px;
text-align: left;
}
th {
background: #f9f9f9;
}
.footer {
margin-top: 30px;
font-size: 12px;
text-align: center;
color: #777;
}
</style>
</head>
<body>
<div class="invoice-box">
<!-- <div class="green-banner">გადახდილია</div> -->
<div class="top-header">
<div>
<h3>SELFHOSTING.GE</h3>
</div>
<div class="bank-info">
/ ლევან არაბული<br>
/: 01001080490<br><br>
ბანკი: თიბისი ბანკი<br>
/: GE79TB7902736010100047<br><br>
ბანკი: საქართველოს ბანკი<br>
/: GE85BG0000000534211842<br>
იდენტიფიკატორი: 01001080490
</div>
</div>
<div class="section gray-box">
ინვოისი #: <?= htmlspecialchars($invoice['invoice_number']) ?><br>
ინვოისის თარიღი: <?= htmlspecialchars($invoice['issue_date']) ?><br>
გადახდის თარიღი: <?= htmlspecialchars($invoice['due_date']) ?>
</div>
<div class="section">
<strong>მიმღები:</strong><br>
<?= htmlspecialchars($invoice['first_name'] . ' ' . $invoice['last_name']) ?><br>
<?php if (!empty($invoice['company_name'])): ?>
<?= htmlspecialchars($invoice['company_name']) ?><br>
<?php endif; ?>
<?php if (!empty($invoice['address1'])): ?>
<?= htmlspecialchars($invoice['address1']) ?><br>
<?php endif; ?>
<?php if (!empty($invoice['vat_number'])): ?>
VAT: <?= htmlspecialchars($invoice['vat_number']) ?>
<?php endif; ?>
</div>
<div class="section">
<table>
<thead>
<tr>
<th>დასახელება</th>
<th>აღწერა</th>
<th>თანხა</th>
</tr>
</thead>
<tbody>
<?php foreach ($invoice['items'] as $item): ?>
<tr>
<td><?= htmlspecialchars($item['name']) ?></td>
<td><?= htmlspecialchars($item['description']) ?></td>
<td><?= number_format($item['amount'], 2) ?> ლარი</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
<div class="section">
<h3>ტრანზაქციები</h3>
<table>
<thead>
<tr>
<th>ინვოისის ნომერი</th>
<th>გადახდის მეთოდი</th>
<th>ტრანზაქციის ID</th>
<th>თანხა</th>
</tr>
</thead>
<tbody>
<tr>
<td># <?= htmlspecialchars($invoice['invoice_number']) ?></td>
<td><?= htmlspecialchars($invoice['payment_method']) ?></td>
<td>-</td>
<td><?= number_format($invoice['total_amount'], 2) ?></td>
</tr>
<tr>
<td colspan="3">ბალანსი</td>
<td>0.00 GEL</td>
</tr>
</tbody>
</table>
</div>
<div class="footer">
Powered By Stack.ge | შექმნილია Stack.ge-ს მიერ
</div>
</div>
</body>
</html>
@@ -0,0 +1,69 @@
<!-- კონკრეტული ინვოისის ხილვა -->
<?php require_once __DIR__ . '/../../models/invoicesmodel.php'; ?>
<?php
use App\Config;
require_once Config::includePath('head.php');
require_once Config::includePath('navbar.php');
require_once Config::includePath('pageheader.php');
require_once Config::includePath('pagebodystart.php');
?>
<!-- CONTENT START -->
<?php if ($showAlert): ?>
<div class="alert alert-success alert-dismissible fade show" role="alert" id="invoiceAlert">
✅ ინვოისი წარმატებით გაიგზავნა!
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>
<script>
setTimeout(() => {
const alertBox = document.getElementById('invoiceAlert');
if (alertBox) alertBox.remove();
}, 5000);
</script>
<?php endif; ?>
<div class="container-xl mt-4">
<h2>ინვოისი # <?= $invoice['invoice_number'] ? htmlspecialchars($invoice['invoice_number']) : '' ?></h2>
<p><strong>კლიენტი:</strong> <?= htmlspecialchars($invoice['first_name'] . ' ' . $invoice['last_name']) ?></p>
<p><strong>სტატუსი:</strong> <?= htmlspecialchars($invoice['status']) ?></p>
<p><strong>თარიღი:</strong> <?= $invoice['issue_date'] ?></p>
<p><strong>ბოლო ვადა:</strong> <?= $invoice['due_date'] ?></p>
<p><strong>გადასახდელი თანხა:</strong> <?= number_format($invoice['total_amount'], 2) ?> ₾</p>
<p><strong>გადახდის მეთოდი:</strong> <?= htmlspecialchars($invoice['payment_method']) ?></p>
<p><strong>აღწერა:</strong> <?= nl2br(htmlspecialchars($invoice['description'])) ?></p>
<?php if (!empty($productItems)): ?>
<h4 class="mt-4">პროდუქტები</h4>
<table class="table">
<thead>
<tr>
<th>პროდუქტი</th>
<th>თანხა</th>
<th>აღწერა</th>
</tr>
</thead>
<tbody>
<?php foreach ($productItems as $item): ?>
<tr>
<td><?= htmlspecialchars($item['name']) ?></td>
<td><?= number_format($item['amount'], 2) ?> ₾</td>
<td><?= htmlspecialchars($item['description']) ?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php endif; ?>
<div class="mt-4">
<a href="dashboard.php?module=billing&submodule=invoices&action=send&id=<?= $invoice['id'] ?>" class="btn btn-primary">გაგზავნა</a>
<a href="dashboard.php?module=billing&submodule=invoices&action=edit&id=<?= $invoice['id'] ?>" class="btn btn-secondary">რედაქტირება</a>
<a href="dashboard.php?module=billing&submodule=invoices&action=delete&id=<?= $invoice['id'] ?>" class="btn btn-danger">წაშლა</a>
<a href="dashboard.php?module=billing&submodule=invoices&action=list" class="btn btn-light">უკან</a>
</div>
</div>
<?php require_once Config::includePath('footer.php'); ?>
@@ -0,0 +1,70 @@
<?php
require_once __DIR__ . '/../../models/transactionsmodel.php';
use App\Config;
require_once Config::includePath('head.php');
require_once Config::includePath('navbar.php');
require_once Config::includePath('pageheader.php');
require_once Config::includePath('pagebodystart.php');
?>
<div class="container-xl mt-4">
<h2>ტრანზაქციის დამატება</h2>
<?php if (!empty($errors)): ?>
<div class="alert alert-danger"><?= implode('<br>', $errors) ?></div>
<?php endif; ?>
<form method="post">
<div class="mb-3">
<label class="form-label">ინვოისი</label>
<select name="invoice_id" class="form-select" required>
<option value="">აირჩიე</option>
<?php foreach ($invoices as $inv): ?>
<option value="<?= $inv['id'] ?>"><?= htmlspecialchars($inv['invoice_number']) ?></option>
<?php endforeach; ?>
</select>
</div>
<div class="mb-3">
<label class="form-label">კლიენტი</label>
<select name="client_id" class="form-select" required>
<option value="">აირჩიე</option>
<?php foreach ($clients as $cl): ?>
<option value="<?= $cl['id'] ?>"><?= htmlspecialchars($cl['first_name'] . ' ' . $cl['last_name']) ?></option>
<?php endforeach; ?>
</select>
</div>
<div class="mb-3">
<label class="form-label">თანხა</label>
<input type="number" name="amount" step="0.01" class="form-control" required>
</div>
<div class="mb-3">
<label class="form-label">მეთოდი</label>
<input type="text" name="method" class="form-control" required>
</div>
<div class="mb-3">
<label class="form-label">სტატუსი</label>
<select name="status" class="form-select" required>
<option value="success">წარმატებული</option>
<option value="failed">წარუმატებელი</option>
<option value="pending">მოლოდინში</option>
</select>
</div>
<div class="mb-3">
<label class="form-label">შენიშვნა</label>
<textarea name="notes" class="form-control"></textarea>
</div>
<button type="submit" class="btn btn-success">შენახვა</button>
<a href="list.php" class="btn btn-secondary">გაუქმება</a>
</form>
</div>
<?php require_once Config::includePath('footer.php'); ?>
@@ -0,0 +1,50 @@
<?php
require_once __DIR__ . '/../../models/transactionsmodel.php';
use App\Config;
require_once Config::includePath('head.php');
require_once Config::includePath('navbar.php');
require_once Config::includePath('pageheader.php');
require_once Config::includePath('pagebodystart.php');
?>
<div class="container-xl mt-4">
<h2>ტრანზაქციის რედაქტირება</h2>
<form method="post">
<div class="mb-3">
<label class="form-label">ინვოისი</label>
<input type="text" class="form-control" value="#<?= $transaction['invoice_number'] ?>" disabled>
</div>
<div class="mb-3">
<label class="form-label">კლიენტი</label>
<input type="text" class="form-control" value="<?= $transaction['first_name'] . ' ' . $transaction['last_name'] ?>" disabled>
</div>
<div class="mb-3">
<label class="form-label">თანხა</label>
<input type="text" class="form-control" value="<?= number_format($transaction['amount'], 2) ?> ₾" disabled>
</div>
<div class="mb-3">
<label class="form-label">სტატუსი</label>
<select name="status" class="form-select" required>
<option value="success" <?= $transaction['status'] === 'success' ? 'selected' : '' ?>>დადასტურებული</option>
<option value="failed" <?= $transaction['status'] === 'failed' ? 'selected' : '' ?>>ჩავარდა</option>
<option value="pending" <?= $transaction['status'] === 'pending' ? 'selected' : '' ?>>მოლოდინში</option>
</select>
</div>
<div class="mb-3">
<label class="form-label">გადახდის მეთოდი</label>
<input type="text" name="method" class="form-control" value="<?= htmlspecialchars($transaction['method']) ?>">
</div>
<div class="mb-3">
<label class="form-label">შენიშვნა</label>
<textarea name="notes" class="form-control"><?= htmlspecialchars($transaction['notes']) ?></textarea>
</div>
<button type="submit" class="btn btn-primary">შენახვა</button>
<a href="list.php" class="btn btn-secondary">უკან</a>
</form>
</div>
<?php require_once Config::includePath('footer.php'); ?>
@@ -0,0 +1,52 @@
<?php
require_once __DIR__ . '/../../models/transactionsmodel.php';
use App\Config;
require_once Config::includePath('head.php');
require_once Config::includePath('navbar.php');
require_once Config::includePath('pageheader.php');
require_once Config::includePath('pagebodystart.php');
?>
<div class="container-xl mt-4">
<h2>ტრანზაქციების ისტორია - <?= htmlspecialchars($client['first_name'] . ' ' . $client['last_name']) ?></h2>
<?php if (empty($transactions)): ?>
<div class="alert alert-info">ტრანზაქცია არ მოიძებნა.</div>
<?php else: ?>
<table class="table table-hover">
<thead>
<tr>
<th>ინვოისი</th>
<th>თანხა</th>
<th>მეთოდი</th>
<th>სტატუსი</th>
<th>შენიშვნა</th>
<th>თარიღი</th>
</tr>
</thead>
<tbody>
<?php foreach ($transactions as $t): ?>
<tr>
<td>#<?= htmlspecialchars($t['invoice_number']) ?></td>
<td><?= number_format($t['amount'], 2) ?> ₾</td>
<td><?= htmlspecialchars($t['method']) ?></td>
<td>
<span class="badge bg-<?= $t['status'] === 'success' ? 'success' : ($t['status'] === 'failed' ? 'danger' : 'warning') ?>">
<?= htmlspecialchars($t['status']) ?>
</span>
</td>
<td><?= nl2br(htmlspecialchars($t['notes'])) ?></td>
<td><?= $t['created_at'] ?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php endif; ?>
<a href="/admin/clients/view.php?id=<?= $clientId ?>" class="btn btn-light">🔙 უკან კლიენტის პროფილში</a>
</div>
<?php require_once Config::includePath('footer.php'); ?>
@@ -0,0 +1,54 @@
<?php
require_once __DIR__ . '/../../models/transactionsmodel.php';
use App\Config;
require_once Config::includePath('head.php');
require_once Config::includePath('navbar.php');
require_once Config::includePath('pageheader.php');
require_once Config::includePath('pagebodystart.php');
?>
<?php if (!empty($successMessage)): ?>
<div class="alert alert-success">
<?= htmlspecialchars($successMessage) ?>
</div>
<?php endif; ?>
<div class="container-xl mt-4">
<h2>ტრანზაქციები</h2>
<a href="dashboard.php?module=billing&submodule=transactions&action=create" class="btn btn-primary mb-3"> დამატება</a>
<table class="table table-bordered">
<thead>
<tr>
<th>ინვოისი</th>
<th>კლიენტი</th>
<th>თანხა</th>
<th>მეთოდი</th>
<th>სტატუსი</th>
<th>თარიღი</th>
<th>ქმედებები</th>
</tr>
</thead>
<tbody>
<?php foreach ($transactions as $tx): ?>
<tr>
<td><?= htmlspecialchars($tx['invoice_number']) ?></td>
<td><?= htmlspecialchars($tx['first_name'] . ' ' . $tx['last_name']) ?></td>
<td><?= number_format($tx['amount'], 2) ?> ₾</td>
<td><?= htmlspecialchars($tx['method']) ?></td>
<td><?= htmlspecialchars($tx['status']) ?></td>
<td><?= $tx['created_at'] ?></td>
<td>
<a href="dashboard.php?module=billing&submodule=transactions&action=edit&id=<?= $tx['id'] ?>" class="btn btn-sm btn-warning">✏️</a>
<a href="dashboard.php?module=billing&submodule=transactions&action=delete&id=<?= $tx['id'] ?>" class="btn btn-sm btn-danger" onclick="return confirm('დარწმუნებული ხარ?')">🗑️</a>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
<?php require_once Config::includePath('footer.php'); ?>