gitea init
This commit is contained in:
@@ -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'); ?>
|
||||
Reference in New Issue
Block a user