Invoice: Moduł faktur cyklicznych
This commit is contained in:
@@ -0,0 +1,484 @@
|
||||
<?php
|
||||
$enablePrototypeComments = true;
|
||||
include '../../header-invoice.php';
|
||||
?>
|
||||
|
||||
<div class="container-fluid flex-grow-1 container-p-y">
|
||||
|
||||
<!-- Header & Form Buttons -->
|
||||
<div class="d-flex flex-column flex-md-row justify-content-between align-items-start align-items-md-center mb-4 gap-3">
|
||||
<div class="d-flex flex-column justify-content-center">
|
||||
<h4 class="mb-1 text-body"><i class="bx bx-repeat me-2 text-primary"></i>Nowy Szablon Faktury Cyklicznej</h4>
|
||||
<p class="text-muted mb-0">Skonfiguruj reguły automatycznego generowania i wystawiania dokumentów abonamentowych</p>
|
||||
</div>
|
||||
<div class="d-flex align-content-center flex-wrap gap-2">
|
||||
<a href="app-invoice-recurring-list.php" class="btn btn-label-secondary">Anuluj</a>
|
||||
<button type="submit" form="recurringForm" class="btn btn-primary"><i class="bx bx-save me-1"></i> Zapisz szablon cyklu</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<form id="recurringForm" onsubmit="return false">
|
||||
|
||||
<!-- Top Section: Status & Cycle Rules -->
|
||||
<div class="row mb-4">
|
||||
|
||||
<!-- Card 1: Harmonogram i Reguły Cyklu -->
|
||||
<div class="col-lg-6 mb-4 mb-lg-0">
|
||||
<div class="card mb-4">
|
||||
<div class="card-header border-bottom py-3 d-flex justify-content-between align-items-center bg-label-primary">
|
||||
<h6 class="card-title m-0 text-primary"><i class="bx bx-calendar-repeat me-2"></i>Harmonogram i Reguły Cyklu</h6>
|
||||
|
||||
<!-- Global Master Switch ON/OFF -->
|
||||
<div class="d-flex align-items-center gap-2 me-4">
|
||||
<span class="fw-bold small text-body">Status cyklu:</span>
|
||||
<div class="form-check form-switch m-0 d-flex align-items-center">
|
||||
<input class="form-check-input mt-0 me-3" type="checkbox" id="masterStatusToggle" checked style="width: 2.5em; height: 1.3em; cursor: pointer;">
|
||||
<label class="form-check-label mb-0 ms-1" for="masterStatusToggle" style="cursor: pointer;">
|
||||
<span class="badge bg-label-success" id="statusLabelText">AKTYWNY (ON)</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body pt-3">
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label fw-bold">Nazwa własna cyklu / Szablonu</label>
|
||||
<input type="text" class="form-control" placeholder="np. Abonament IT - Usługi Chmurowe (ABC Logistics)" value="Abonament IT i Wsparcie Techniczne">
|
||||
<small class="text-muted">Nazwa widoczna w rejestrze cykli dla ułatwienia identyfikacji.</small>
|
||||
</div>
|
||||
|
||||
<!-- Przebudowany Konfigurator Cyklu -->
|
||||
<div class="card shadow-none border bg-lighter mb-3">
|
||||
<div class="card-body p-3">
|
||||
<h6 class="fw-bold mb-3 text-primary"><i class="bx bx-time-five me-1"></i>Konfiguracja Powtarzania</h6>
|
||||
|
||||
<!-- Data rozpoczęcia & Cykl rozliczeń -->
|
||||
<div class="row g-2 mb-3">
|
||||
<div class="col-md-6">
|
||||
<label class="form-label fw-bold">Data rozpoczęcia</label>
|
||||
<input type="text" class="form-control date-picker" id="startDateInput" value="2026-08-01">
|
||||
<small class="text-muted">Dzień wystawienia pierwszej faktury.</small>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label class="form-label fw-bold">Cykl rozliczeń</label>
|
||||
<select class="form-select" id="cycleUnitSelect">
|
||||
<option value="miesiac" selected>Miesiąc</option>
|
||||
<option value="rok">Rok</option>
|
||||
<option value="dzien">Dzień</option>
|
||||
</select>
|
||||
<small class="text-muted">Jednostka czasu dla powtarzania.</small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Interwał & Obowiązuje do -->
|
||||
<div class="row g-2 mb-3">
|
||||
<div class="col-md-6">
|
||||
<label class="form-label fw-bold">Interwał (Co ile cykli)</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-text">Co</span>
|
||||
<input type="number" class="form-control" value="1" min="1" id="intervalInput">
|
||||
<span class="input-group-text" id="intervalUnitText">miesiąc</span>
|
||||
</div>
|
||||
<small class="text-muted">np. "1" = co miesiąc, "3" = kwartalnie, "12" = co rok.</small>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label class="form-label fw-bold">Obowiązuje do</label>
|
||||
<input type="text" class="form-control date-picker" id="endDateInput" placeholder="RRRR-MM-DD (Bezterminowo)">
|
||||
<small class="text-muted">Data, po której system automatycznie wyłączy cykl.</small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Informacyjna ramka dynamicznego opisu -->
|
||||
<div class="alert alert-primary mb-0 p-2 d-flex align-items-center" role="alert">
|
||||
<i class="bx bx-info-circle fs-4 me-2"></i>
|
||||
<span class="small" id="summaryDescription">
|
||||
Faktura będzie generowana <strong>co 1 miesiąc</strong>, rozpoczynając od dnia <strong>01.08.2026 r.</strong> bezterminowo.
|
||||
</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr class="my-3">
|
||||
|
||||
<div class="form-check form-switch">
|
||||
<input class="form-check-input" type="checkbox" id="emailAutoSend" checked>
|
||||
<label class="form-check-label fw-bold" for="emailAutoSend">Automatyczna wysyłka e-mail do kontrahenta</label>
|
||||
<div class="text-muted small">Wyślij e-mail z podpiętą fakturą w PDF zaraz po automatycznym wystawieniu (zgodnie z <b>globalnym szablonem e-mail</b> zdefiniowanym w Ustawieniach Systemowych).</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Card 2: Kontrahent - Nabywca i Odbiorca -->
|
||||
<div class="col-lg-6">
|
||||
<div class="card mb-4">
|
||||
<div class="card-header border-bottom py-3 d-flex justify-content-between align-items-center">
|
||||
<h6 class="card-title m-0"><i class="bx bx-user-check me-2 text-primary"></i>Kontrahent (Nabywca i Odbiorca)</h6>
|
||||
</div>
|
||||
<div class="card-body pt-3">
|
||||
|
||||
<!-- Nabywca -->
|
||||
<div class="mb-3">
|
||||
<label class="form-label fw-bold">Nabywca (Główny kontrahent / Płatnik)</label>
|
||||
<div class="card shadow-none border bg-lighter">
|
||||
<div class="card-body p-3 d-flex justify-content-between align-items-center">
|
||||
<div>
|
||||
<h6 class="mb-1 text-primary fw-bold">ABC Logistics Sp. z o.o.</h6>
|
||||
<p class="mb-0 small text-muted">NIP: PL 865 223 11 90 • ul. Warszawska 45, 00-001 Warszawa</p>
|
||||
<p class="mb-0 small text-muted">E-mail do faktur: ksiegowosc@abclogistics.pl</p>
|
||||
</div>
|
||||
<button type="button" class="btn btn-outline-primary btn-sm"><i class="bx bx-refresh me-1"></i> Zmień</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Switches for Recipient and Extra -->
|
||||
<div class="d-flex flex-column gap-2 mb-3">
|
||||
<label class="form-check form-switch m-0">
|
||||
<input class="form-check-input" type="checkbox" id="recipientToggle">
|
||||
<span class="form-check-label fw-bold">Wskaż innego Odbiorcę / Miejsce dostawy</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<!-- Odbiorca Container (Domyślnie ukryty) -->
|
||||
<div class="card shadow-none border mb-3 bg-white d-none" id="recipientBox">
|
||||
<div class="card-header py-2 bg-label-secondary d-flex justify-content-between align-items-center">
|
||||
<span class="small fw-bold"><i class="bx bx-buildings me-1"></i>Dane Odbiorcy (np. Szkoła, Oddział, Filia)</span>
|
||||
<button type="button" class="btn btn-xs btn-outline-secondary">Wybierz z listy</button>
|
||||
</div>
|
||||
<div class="card-body p-3">
|
||||
<div class="mb-2">
|
||||
<label class="form-label small text-muted mb-1">Nazwa Odbiorcy</label>
|
||||
<input type="text" class="form-control form-control-sm" value="ABC Logistics - Oddział Magazynowy Stalowa Wola">
|
||||
</div>
|
||||
<div class="row g-2">
|
||||
<div class="col-8">
|
||||
<label class="form-label small text-muted mb-1">Adres Odbiorcy</label>
|
||||
<input type="text" class="form-control form-control-sm" value="ul. Przemysłowa 12, 37-450 Stalowa Wola">
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<label class="form-label small text-muted mb-1">NIP Odbiorcy (opcja)</label>
|
||||
<input type="text" class="form-control form-control-sm" placeholder="Opcjonalny NIP">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row g-2">
|
||||
<div class="col-6">
|
||||
<label class="form-label small text-uppercase fw-bold text-muted">Miejsce wystawienia</label>
|
||||
<input type="text" class="form-control" value="Stalowa Wola">
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<label class="form-label small text-uppercase fw-bold text-muted">Osoba wystawiająca</label>
|
||||
<input type="text" class="form-control" value="Bartłomiej Banaczyk">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Kontakt i powiadomienia -->
|
||||
<div class="card mb-4">
|
||||
<div class="card-body">
|
||||
<h6 class="card-title text-primary mb-3">Kontakt i powiadomienia</h6>
|
||||
<div class="mb-3">
|
||||
<label class="form-label small text-uppercase text-muted fw-bold">Email kontaktowy</label>
|
||||
<input type="email" class="form-control" value="ksiegowosc@abclogistics.pl">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label small text-uppercase text-muted fw-bold">Numer SMS</label>
|
||||
<input type="text" class="form-control" placeholder="+48 ...">
|
||||
</div>
|
||||
<div class="mb-0">
|
||||
<label class="form-label small text-uppercase text-muted fw-bold">Powiadomienia SMS</label>
|
||||
<select class="form-select">
|
||||
<option value="" selected>Wybierz opcję</option>
|
||||
<option value="1">Wyślij powiadomienie SMS po wygenerowaniu</option>
|
||||
<option value="0">Brak powiadomień</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Ostatni dokument -->
|
||||
<div class="card mb-4 mb-lg-0">
|
||||
<div class="card-body">
|
||||
<h6 class="card-title text-primary mb-3">Ostatni dokument</h6>
|
||||
<p class="text-muted mb-0 small">Brak dokumentów</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Section 2: Document Settings & Variables -->
|
||||
<div class="card mb-4">
|
||||
<div class="card-header border-bottom py-3">
|
||||
<h6 class="card-title m-0"><i class="bx bx-slider-alt me-2 text-primary"></i>Ustawienia Dokumentów Generowanych</h6>
|
||||
</div>
|
||||
<div class="card-body pt-3">
|
||||
<div class="row g-3">
|
||||
<div class="col-md-3">
|
||||
<label class="form-label fw-bold">Rodzaj dokumentu</label>
|
||||
<select class="form-select border-primary text-primary fw-bold">
|
||||
<option value="faktura" selected>Faktura VAT</option>
|
||||
<option value="proforma">Proforma</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label class="form-label fw-bold">Waluta & Język</label>
|
||||
<div class="input-group">
|
||||
<select class="form-select">
|
||||
<option value="PLN" selected>PLN (zł)</option>
|
||||
<option value="EUR">EUR (€)</option>
|
||||
<option value="USD">USD ($)</option>
|
||||
</select>
|
||||
<select class="form-select">
|
||||
<option value="PL" selected>PL</option>
|
||||
<option value="EN">EN</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label class="form-label fw-bold">Forma płatności</label>
|
||||
<select class="form-select">
|
||||
<option value="przelew" selected>Przelew bankowy</option>
|
||||
<option value="gotowka">Gotówka</option>
|
||||
<option value="split">Split Payment (MPP)</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label class="form-label fw-bold">Termin płatności</label>
|
||||
<div class="input-group">
|
||||
<input type="number" class="form-control" value="14">
|
||||
<span class="input-group-text">dni</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row g-3 mt-1">
|
||||
<div class="col-md-3">
|
||||
<label class="form-label fw-bold">Konto bankowe</label>
|
||||
<select class="form-select">
|
||||
<option value="1">Main PLN: 89 1050 ... 4491</option>
|
||||
<option value="2">EUR IBAN: PL 12 1050 ... 9901</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<label class="form-label fw-bold">Data sprzedaży</label>
|
||||
<select class="form-select">
|
||||
<option value="issue_date" selected>Zgodna z datą wystawienia</option>
|
||||
<option value="last_day_prev_month">Ostatni dzień poprzedniego miesiąca</option>
|
||||
<option value="first_day_curr_month">Pierwszy dzień bieżącego miesiąca</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<label class="form-label fw-bold">Komentarz / Uwagi na fakturze (dla klienta)</label>
|
||||
<input type="text" class="form-control" value="Opłata abonamentowa za miesiąc {MIESIAC} {ROK}. Dziękujemy za współpracę!">
|
||||
<div class="mt-1">
|
||||
<span class="badge bg-label-secondary me-1" style="cursor:pointer;">+ {MIESIAC}</span>
|
||||
<span class="badge bg-label-secondary me-1" style="cursor:pointer;">+ {ROK}</span>
|
||||
<span class="badge bg-label-secondary me-1" style="cursor:pointer;">+ {POPRZEDNI_MIESIAC}</span>
|
||||
<span class="badge bg-label-secondary" style="cursor:pointer;">+ {KWARTAL}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Section 3: Items Configurator with Dynamic Tags -->
|
||||
<div class="card mb-4">
|
||||
<div class="card-header bg-label-primary py-2 d-flex justify-content-between align-items-center">
|
||||
<span class="fw-bold text-primary"><i class="bx bx-list-plus me-2"></i>Pozycje na fakturze cyklicznej</span>
|
||||
<div class="d-flex align-items-center gap-3">
|
||||
<div class="d-flex align-items-center">
|
||||
<label class="text-muted small me-2 text-nowrap">Licz od:</label>
|
||||
<select class="form-select form-select-sm">
|
||||
<option value="netto" selected>Cen netto</option>
|
||||
<option value="brutto">Cen brutto</option>
|
||||
</select>
|
||||
</div>
|
||||
<button type="button" class="btn btn-primary btn-sm"><i class="bx bx-plus me-1"></i> Dodaj pozycję</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body p-0">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered m-0">
|
||||
<thead class="table-light">
|
||||
<tr>
|
||||
<th style="width: 35%;">Nazwa towaru / usługi (oraz zmienne okresu)</th>
|
||||
<th style="width: 10%;">Ilość</th>
|
||||
<th style="width: 10%;">J.m.</th>
|
||||
<th style="width: 12%;">Cena netto</th>
|
||||
<th style="width: 10%;">VAT</th>
|
||||
<th style="width: 13%;">Wartość brutto</th>
|
||||
<th style="width: 5%;" class="text-center">Usuń</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<!-- Item row 1 -->
|
||||
<tr>
|
||||
<td>
|
||||
<input type="text" class="form-control mb-1 fw-medium" value="Abonament za opiekę serwerową IT - okres {MIESIAC} {ROK}">
|
||||
</td>
|
||||
<td><input type="number" class="form-control" value="1"></td>
|
||||
<td>
|
||||
<select class="form-select">
|
||||
<option value="usluga" selected>usł.</option>
|
||||
<option value="szt">szt.</option>
|
||||
<option value="msc">m-c</option>
|
||||
</select>
|
||||
</td>
|
||||
<td><input type="text" class="form-control" value="1 200,00"></td>
|
||||
<td>
|
||||
<select class="form-select">
|
||||
<option value="23" selected>23%</option>
|
||||
<option value="8">8%</option>
|
||||
<option value="0">0%</option>
|
||||
<option value="zw">zw.</option>
|
||||
</select>
|
||||
</td>
|
||||
<td><input type="text" class="form-control fw-bold" value="1 476,00" readonly></td>
|
||||
<td class="text-center align-middle">
|
||||
<button type="button" class="btn btn-icon btn-sm btn-label-danger"><i class="bx bx-trash"></i></button>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- Item row 2 -->
|
||||
<tr>
|
||||
<td>
|
||||
<input type="text" class="form-control mb-1 fw-medium" value="Hosting Chmurowy Magico Cloud (Kwartalnie)">
|
||||
</td>
|
||||
<td><input type="number" class="form-control" value="1"></td>
|
||||
<td>
|
||||
<select class="form-select">
|
||||
<option value="usluga" selected>usł.</option>
|
||||
<option value="szt">szt.</option>
|
||||
</select>
|
||||
</td>
|
||||
<td><input type="text" class="form-control" value="300,00"></td>
|
||||
<td>
|
||||
<select class="form-select">
|
||||
<option value="23" selected>23%</option>
|
||||
</select>
|
||||
</td>
|
||||
<td><input type="text" class="form-control fw-bold" value="369,00" readonly></td>
|
||||
<td class="text-center align-middle">
|
||||
<button type="button" class="btn btn-icon btn-sm btn-label-danger"><i class="bx bx-trash"></i></button>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- Dynamic Tag Guide below table -->
|
||||
<div class="p-3 border-top bg-lighter">
|
||||
<div class="d-flex align-items-center gap-2">
|
||||
<small class="text-muted fw-bold">Dostępne zmienne dla pozycji (kliknij aby skopiować):</small>
|
||||
<span class="badge bg-label-primary px-2 py-1" style="cursor:pointer;">{MIESIAC}</span>
|
||||
<span class="badge bg-label-primary px-2 py-1" style="cursor:pointer;">{ROK}</span>
|
||||
<span class="badge bg-label-primary px-2 py-1" style="cursor:pointer;">{POPRZEDNI_MIESIAC}</span>
|
||||
<span class="badge bg-label-primary px-2 py-1" style="cursor:pointer;">{KWARTAL}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-footer bg-lighter d-flex justify-content-end py-3 border-top">
|
||||
<div class="d-flex flex-column align-items-end me-3">
|
||||
<span class="text-muted small">Suma netto: <strong>1 500,00 PLN</strong></span>
|
||||
<span class="text-muted small">Suma VAT (23%): <strong>345,00 PLN</strong></span>
|
||||
<h5 class="mb-0 text-primary mt-1">Razem brutto: <strong>1 845,00 PLN</strong></h5>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Submit Bottom Bar -->
|
||||
<div class="d-flex justify-content-end gap-2 mb-4">
|
||||
<a href="app-invoice-recurring-list.php" class="btn btn-label-secondary">Anuluj</a>
|
||||
<button type="submit" class="btn btn-primary"><i class="bx bx-save me-1"></i> Zapisz szablon cyklu</button>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
<?php include '../../footer.php'; ?>
|
||||
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
const toggle = document.getElementById('masterStatusToggle');
|
||||
const label = document.getElementById('statusLabelText');
|
||||
const unitSelect = document.getElementById('cycleUnitSelect');
|
||||
const intervalText = document.getElementById('intervalUnitText');
|
||||
|
||||
if (toggle && label) {
|
||||
toggle.addEventListener('change', function () {
|
||||
if (this.checked) {
|
||||
label.textContent = 'AKTYWNY (ON)';
|
||||
label.className = 'badge bg-label-success';
|
||||
} else {
|
||||
label.textContent = 'WYŁĄCZONY (OFF)';
|
||||
label.className = 'badge bg-label-danger';
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
const intervalInput = document.getElementById('intervalInput');
|
||||
const summaryDesc = document.getElementById('summaryDescription');
|
||||
const startDateInput = document.getElementById('startDateInput');
|
||||
const endDateInput = document.getElementById('endDateInput');
|
||||
|
||||
function updateUnitsAndSummary() {
|
||||
if (!unitSelect || !intervalInput || !intervalText) return;
|
||||
const val = unitSelect.value;
|
||||
const num = parseInt(intervalInput.value) || 1;
|
||||
|
||||
let unitLabel = '';
|
||||
let unitGenitive = '';
|
||||
|
||||
if (val === 'miesiac') {
|
||||
if (num === 1) unitLabel = 'miesiąc';
|
||||
else if (num >= 2 && num <= 4) unitLabel = 'miesiące';
|
||||
else unitLabel = 'miesięcy';
|
||||
unitGenitive = unitLabel;
|
||||
} else if (val === 'rok') {
|
||||
if (num === 1) unitLabel = 'rok';
|
||||
else if (num >= 2 && num <= 4) unitLabel = 'lata';
|
||||
else unitLabel = 'lat';
|
||||
unitGenitive = unitLabel;
|
||||
} else if (val === 'dzien') {
|
||||
if (num === 1) unitLabel = 'dzień';
|
||||
else unitLabel = 'dni';
|
||||
unitGenitive = unitLabel;
|
||||
}
|
||||
|
||||
intervalText.textContent = unitLabel;
|
||||
|
||||
if (summaryDesc) {
|
||||
const startDate = startDateInput ? startDateInput.value || 'dzisiaj' : 'dzisiaj';
|
||||
const endDate = endDateInput && endDateInput.value ? ` do dnia <strong>${endDateInput.value}</strong>` : ' bezterminowo';
|
||||
summaryDesc.innerHTML = `Faktura będzie generowana <strong>co ${num} ${unitGenitive}</strong>, rozpoczynając od dnia <strong>${startDate}</strong>${endDate}.`;
|
||||
}
|
||||
}
|
||||
|
||||
if (unitSelect) unitSelect.addEventListener('change', updateUnitsAndSummary);
|
||||
if (intervalInput) intervalInput.addEventListener('input', updateUnitsAndSummary);
|
||||
if (startDateInput) startDateInput.addEventListener('change', updateUnitsAndSummary);
|
||||
if (endDateInput) endDateInput.addEventListener('change', updateUnitsAndSummary);
|
||||
|
||||
const recipientToggle = document.getElementById('recipientToggle');
|
||||
const recipientBox = document.getElementById('recipientBox');
|
||||
|
||||
if (recipientToggle && recipientBox) {
|
||||
recipientToggle.addEventListener('change', function () {
|
||||
if (this.checked) {
|
||||
recipientBox.classList.remove('d-none');
|
||||
} else {
|
||||
recipientBox.classList.add('d-none');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,519 @@
|
||||
<?php
|
||||
$enablePrototypeComments = true;
|
||||
include '../../header-invoice.php';
|
||||
?>
|
||||
|
||||
<div class="container-fluid flex-grow-1 container-p-y">
|
||||
|
||||
<h4 class="py-3 mb-4">
|
||||
<span class="text-muted fw-light">Sprzedaż /</span> Faktury cykliczne
|
||||
</h4>
|
||||
|
||||
<!-- Summary KPI Cards -->
|
||||
<div class="row g-4 mb-4">
|
||||
<div class="col-sm-6 col-xl-3">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="d-flex align-items-start justify-content-between">
|
||||
<div class="content-left">
|
||||
<span class="text-heading">Aktywne cykle</span>
|
||||
<div class="d-flex align-items-center my-1">
|
||||
<h4 class="mb-0 me-2">18</h4>
|
||||
<span class="text-success small fw-medium">(85%)</span>
|
||||
</div>
|
||||
<small class="text-muted">Szablonów zlecających wysyłkę</small>
|
||||
</div>
|
||||
<div class="avatar">
|
||||
<span class="avatar-initial rounded bg-label-primary">
|
||||
<i class="bx bx-repeat bx-sm"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6 col-xl-3">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="d-flex align-items-start justify-content-between">
|
||||
<div class="content-left">
|
||||
<span class="text-heading">Szacowany MRR</span>
|
||||
<div class="d-flex align-items-center my-1">
|
||||
<h4 class="mb-0 me-2">42 850,00 zł</h4>
|
||||
</div>
|
||||
<small class="text-muted">Przychód powtarzalny / m-c</small>
|
||||
</div>
|
||||
<div class="avatar">
|
||||
<span class="avatar-initial rounded bg-label-success">
|
||||
<i class="bx bx-trending-up bx-sm"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6 col-xl-3">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="d-flex align-items-start justify-content-between">
|
||||
<div class="content-left">
|
||||
<span class="text-heading">Emisja w tym miesiącu</span>
|
||||
<div class="d-flex align-items-center my-1">
|
||||
<h4 class="mb-0 me-2">12 faktur</h4>
|
||||
</div>
|
||||
<small class="text-muted">Najbliższa: jutro (3 firmy)</small>
|
||||
</div>
|
||||
<div class="avatar">
|
||||
<span class="avatar-initial rounded bg-label-info">
|
||||
<i class="bx bx-calendar-event bx-sm"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6 col-xl-3">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="d-flex align-items-start justify-content-between">
|
||||
<div class="content-left">
|
||||
<span class="text-heading">Wstrzymane / Szkice</span>
|
||||
<div class="d-flex align-items-center my-1">
|
||||
<h4 class="mb-0 me-2">3</h4>
|
||||
<span class="text-warning small fw-medium">Wymagają uwagi</span>
|
||||
</div>
|
||||
<small class="text-muted">Zastrzeżone lub pauzowane</small>
|
||||
</div>
|
||||
<div class="avatar">
|
||||
<span class="avatar-initial rounded bg-label-warning">
|
||||
<i class="bx bx-pause-circle bx-sm"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Main Grid: Table Left (9 cols), Filter Panel Right (3 cols) -->
|
||||
<div class="row">
|
||||
|
||||
<!-- Table Column -->
|
||||
<div class="col-lg-9" id="invoice-list-col">
|
||||
<div class="card">
|
||||
<div
|
||||
class="card-header border-bottom d-flex justify-content-between align-items-center flex-wrap gap-2">
|
||||
|
||||
<div class="me-2">
|
||||
<div class="input-group input-group-merge">
|
||||
<span class="input-group-text" id="basic-addon-search31"><i class="bx bx-search"></i></span>
|
||||
<input type="text" class="form-control" placeholder="Wpisz aby wyszukać cykl..."
|
||||
aria-label="Search..." aria-describedby="basic-addon-search31">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="d-flex align-items-center gap-2">
|
||||
|
||||
<div class="dropdown">
|
||||
<button type="button" class="btn btn-label-secondary p-2" data-bs-toggle="dropdown"
|
||||
aria-expanded="false">
|
||||
<i class="bx bx-cog"></i>
|
||||
</button>
|
||||
|
||||
<ul class="dropdown-menu dropdown-menu-end">
|
||||
<li>
|
||||
<h6 class="dropdown-header">Widoczność kolumn</h6>
|
||||
</li>
|
||||
<li>
|
||||
<div class="dropdown-item">
|
||||
<div class="form-check"><input class="form-check-input" type="checkbox" checked>
|
||||
<label class="form-check-label">Nazwa cyklu</label>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="dropdown-item">
|
||||
<div class="form-check"><input class="form-check-input" type="checkbox" checked>
|
||||
<label class="form-check-label">Kontrahent</label>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="dropdown-item">
|
||||
<div class="form-check"><input class="form-check-input" type="checkbox" checked>
|
||||
<label class="form-check-label">Wartość brutto</label>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<button type="button" class="btn btn-label-secondary d-flex align-items-center gap-2"
|
||||
id="filter-toggle-btn">
|
||||
<i class="bx bx-filter-alt"></i> Filtry
|
||||
</button>
|
||||
|
||||
<select class="form-select" style="width: 80px;">
|
||||
<option value="40">40</option>
|
||||
<option value="60">60</option>
|
||||
<option value="100">100</option>
|
||||
</select>
|
||||
|
||||
<a href="app-invoice-recurring-add.php" class="btn btn-primary">
|
||||
<i class="bx bx-plus me-1"></i> <span class="d-none d-sm-inline-block">Utwórz fakturę
|
||||
cykliczną</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="table-responsive text-nowrap" style="min-height: 400px;">
|
||||
<table class="table table-hover table-striped">
|
||||
<thead class="table-light">
|
||||
<tr>
|
||||
<th style="width: 50px;">#</th>
|
||||
<th>Nazwa szablonu / Cykl</th>
|
||||
<th>Nabywca / Odbiorca</th>
|
||||
<th>Wartość brutto</th>
|
||||
<th>Częstotliwość</th>
|
||||
<th>Najbliższa emisja</th>
|
||||
<th>Status</th>
|
||||
<th class="text-center">Akcje</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="table-border-bottom-0">
|
||||
<!-- Item 1 -->
|
||||
<tr>
|
||||
<td>1</td>
|
||||
<td>
|
||||
<div class="d-flex flex-column">
|
||||
<a href="app-invoice-recurring-add.php" class="fw-bold text-body">Abonament
|
||||
Serwis IT i Hosting</a>
|
||||
<small class="text-muted">Szablon #CYK-2026-001 • Generuj jako Szkic</small>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="d-flex flex-column">
|
||||
<span class="fw-semibold">ABC Logistics Sp. z o.o.</span>
|
||||
<small class="text-muted">NIP: 865-223-11-90</small>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<span class="fw-bold text-heading">1 845,00 PLN</span>
|
||||
<br><small class="text-muted">1 500,00 netto</small>
|
||||
</td>
|
||||
<td>
|
||||
<span class="badge bg-label-info"><i class="bx bx-calendar me-1"></i> Co 1
|
||||
miesiąc</span>
|
||||
<br><small class="text-muted">1. dzień miesiąca</small>
|
||||
</td>
|
||||
<td>
|
||||
<span class="fw-medium text-primary">01.08.2026</span>
|
||||
<br><small class="text-muted">Ostatnio: 01.07.2026</small>
|
||||
</td>
|
||||
<td>
|
||||
<div class="form-check form-switch m-0" data-bs-toggle="tooltip" title="Włącz / Wyłącz cykl">
|
||||
<input class="form-check-input" type="checkbox" checked style="cursor: pointer;">
|
||||
<span class="badge bg-label-success ms-1"><i class="bx bx-power-off me-1"></i> ON</span>
|
||||
</div>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<div class="d-flex justify-content-center align-items-center gap-1">
|
||||
<button type="button" class="btn btn-icon btn-sm text-primary"
|
||||
data-bs-toggle="tooltip" title="Wystaw teraz (Wymuś)">
|
||||
<i class="bx bx-play-circle fs-5"></i>
|
||||
</button>
|
||||
<a href="app-invoice-recurring-add.php"
|
||||
class="btn btn-icon btn-sm text-secondary" data-bs-toggle="tooltip"
|
||||
title="Edytuj szablon">
|
||||
<i class="bx bx-edit-alt fs-5"></i>
|
||||
</a>
|
||||
<div class="dropdown">
|
||||
<button type="button" class="btn p-0 dropdown-toggle hide-arrow"
|
||||
data-bs-toggle="dropdown">
|
||||
<i class="bx bx-dots-vertical-rounded fs-5"></i>
|
||||
</button>
|
||||
<div class="dropdown-menu dropdown-menu-end">
|
||||
<a class="dropdown-item" href="javascript:void(0);"><i
|
||||
class="bx bx-pause me-1"></i> Wstrzymaj (Pauza)</a>
|
||||
<a class="dropdown-item" href="app-invoice-list.php"><i
|
||||
class="bx bx-history me-1"></i> Historia wygenerowanych
|
||||
faktur</a>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item text-danger" href="javascript:void(0);"><i
|
||||
class="bx bx-trash me-1"></i> Usuń cykl</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- Item 2 -->
|
||||
<tr>
|
||||
<td>2</td>
|
||||
<td>
|
||||
<div class="d-flex flex-column">
|
||||
<a href="app-invoice-recurring-add.php" class="fw-bold text-body">Obsługa
|
||||
Księgowa i Kadrowa</a>
|
||||
<small class="text-muted">Szablon #CYK-2026-002 • Automatyczne wysyłanie</small>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="d-flex flex-column">
|
||||
<span class="fw-semibold">Bud-Spec Budownictwo S.A.</span>
|
||||
<small class="text-muted">Nabywca: Bud-Spec • Odbiorca: Oddział Warszawa</small>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<span class="fw-bold text-heading">4 305,00 PLN</span>
|
||||
<br><small class="text-muted">3 500,00 netto</small>
|
||||
</td>
|
||||
<td>
|
||||
<span class="badge bg-label-info"><i class="bx bx-calendar me-1"></i> Co 1
|
||||
miesiąc</span>
|
||||
<br><small class="text-muted">10. dzień miesiąca</small>
|
||||
</td>
|
||||
<td>
|
||||
<span class="fw-medium text-primary">10.08.2026</span>
|
||||
<br><small class="text-muted">Ostatnio: 10.07.2026</small>
|
||||
</td>
|
||||
<td>
|
||||
<div class="form-check form-switch m-0" data-bs-toggle="tooltip" title="Włącz / Wyłącz cykl">
|
||||
<input class="form-check-input" type="checkbox" checked style="cursor: pointer;">
|
||||
<span class="badge bg-label-success ms-1"><i class="bx bx-power-off me-1"></i> ON</span>
|
||||
</div>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<div class="d-flex justify-content-center align-items-center gap-1">
|
||||
<button type="button" class="btn btn-icon btn-sm text-primary"
|
||||
data-bs-toggle="tooltip" title="Wystaw teraz (Wymuś)">
|
||||
<i class="bx bx-play-circle fs-5"></i>
|
||||
</button>
|
||||
<a href="app-invoice-recurring-add.php"
|
||||
class="btn btn-icon btn-sm text-secondary" data-bs-toggle="tooltip"
|
||||
title="Edytuj szablon">
|
||||
<i class="bx bx-edit-alt fs-5"></i>
|
||||
</a>
|
||||
<div class="dropdown">
|
||||
<button type="button" class="btn p-0 dropdown-toggle hide-arrow"
|
||||
data-bs-toggle="dropdown">
|
||||
<i class="bx bx-dots-vertical-rounded fs-5"></i>
|
||||
</button>
|
||||
<div class="dropdown-menu dropdown-menu-end">
|
||||
<a class="dropdown-item" href="javascript:void(0);"><i
|
||||
class="bx bx-pause me-1"></i> Wstrzymaj (Pauza)</a>
|
||||
<a class="dropdown-item" href="app-invoice-list.php"><i
|
||||
class="bx bx-history me-1"></i> Historia wygenerowanych
|
||||
faktur</a>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item text-danger" href="javascript:void(0);"><i
|
||||
class="bx bx-trash me-1"></i> Usuń cykl</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- Item 3 -->
|
||||
<tr>
|
||||
<td>3</td>
|
||||
<td>
|
||||
<div class="d-flex flex-column">
|
||||
<a href="app-invoice-recurring-add.php" class="fw-bold text-body">Licencja
|
||||
Oprogramowania Magico ERP</a>
|
||||
<small class="text-muted">Szablon #CYK-2026-003 • Automatyczne wysyłanie</small>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="d-flex flex-column">
|
||||
<span class="fw-semibold">Klinika Stomatologiczna DentaMed</span>
|
||||
<small class="text-muted">NIP: 554-190-88-21</small>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<span class="fw-bold text-heading">14 760,00 PLN</span>
|
||||
<br><small class="text-muted">12 000,00 netto</small>
|
||||
</td>
|
||||
<td>
|
||||
<span class="badge bg-label-warning"><i class="bx bx-calendar me-1"></i> Co 1
|
||||
rok</span>
|
||||
<br><small class="text-muted">15. stycznia</small>
|
||||
</td>
|
||||
<td>
|
||||
<span class="fw-medium text-muted">15.01.2027</span>
|
||||
<br><small class="text-muted">Ostatnio: 15.01.2026</small>
|
||||
</td>
|
||||
<td>
|
||||
<div class="form-check form-switch m-0" data-bs-toggle="tooltip" title="Włącz / Wyłącz cykl">
|
||||
<input class="form-check-input" type="checkbox" style="cursor: pointer;">
|
||||
<span class="badge bg-label-danger ms-1"><i class="bx bx-power-off me-1"></i> OFF</span>
|
||||
</div>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<div class="d-flex justify-content-center align-items-center gap-1">
|
||||
<button type="button" class="btn btn-icon btn-sm text-primary"
|
||||
data-bs-toggle="tooltip" title="Wystaw teraz (Wymuś)">
|
||||
<i class="bx bx-play-circle fs-5"></i>
|
||||
</button>
|
||||
<a href="app-invoice-recurring-add.php"
|
||||
class="btn btn-icon btn-sm text-secondary" data-bs-toggle="tooltip"
|
||||
title="Edytuj szablon">
|
||||
<i class="bx bx-edit-alt fs-5"></i>
|
||||
</a>
|
||||
<div class="dropdown">
|
||||
<button type="button" class="btn p-0 dropdown-toggle hide-arrow"
|
||||
data-bs-toggle="dropdown">
|
||||
<i class="bx bx-dots-vertical-rounded fs-5"></i>
|
||||
</button>
|
||||
<div class="dropdown-menu dropdown-menu-end">
|
||||
<a class="dropdown-item text-success" href="javascript:void(0);"><i
|
||||
class="bx bx-play me-1"></i> Wznowienie cyklu</a>
|
||||
<a class="dropdown-item" href="app-invoice-list.php"><i
|
||||
class="bx bx-history me-1"></i> Historia wygenerowanych
|
||||
faktur</a>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item text-danger" href="javascript:void(0);"><i
|
||||
class="bx bx-trash me-1"></i> Usuń cykl</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="card-footer d-flex justify-content-between align-items-center">
|
||||
<span class="text-muted small">Wyświetlono 1-3 z 21 szablonów</span>
|
||||
<nav aria-label="Page navigation">
|
||||
<ul class="pagination pagination-sm mb-0">
|
||||
<li class="page-item disabled"><a class="page-link" href="#"><i
|
||||
class="bx bx-chevron-left"></i></a></li>
|
||||
<li class="page-item active"><a class="page-link" href="#">1</a></li>
|
||||
<li class="page-item"><a class="page-link" href="#">2</a></li>
|
||||
<li class="page-item"><a class="page-link" href="#">3</a></li>
|
||||
<li class="page-item"><a class="page-link" href="#"><i class="bx bx-chevron-right"></i></a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Filter Column Right (Expandable / Collapsible) -->
|
||||
<div class="col-lg-3" id="invoice-filters-col">
|
||||
<div class="card sticky-top" style="top: 20px;">
|
||||
<div class="card-header border-bottom d-flex justify-content-between align-items-center py-3">
|
||||
<h5 class="card-title mb-0">Filtry cykli</h5>
|
||||
<button type="button" class="btn-close text-reset small" aria-label="Close" id="close-filter-btn"
|
||||
style="display:none;"></button>
|
||||
</div>
|
||||
<div class="card-body pt-4">
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Kontrahent (Nabywca)</label>
|
||||
<select class="select2 form-select" data-allow-clear="true">
|
||||
<option value="">Wszyscy kontrahenci</option>
|
||||
<option value="1">ABC Logistics Sp. z o.o.</option>
|
||||
<option value="2">Bud-Spec Budownictwo S.A.</option>
|
||||
<option value="3">Klinika Stomatologiczna DentaMed</option>
|
||||
<option value="4">MCreo Mateusz Łada</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Status cyklu</label>
|
||||
<div class="d-flex flex-column gap-2">
|
||||
<div class="form-check">
|
||||
<input name="status-radio" class="form-check-input" type="radio" value="" id="statusAll"
|
||||
checked>
|
||||
<label class="form-check-label" for="statusAll"> Wszystkie </label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input name="status-radio" class="form-check-input" type="radio" value=""
|
||||
id="statusActive">
|
||||
<label class="form-check-label" for="statusActive"> tylko Aktywne </label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input name="status-radio" class="form-check-input" type="radio" value=""
|
||||
id="statusPaused">
|
||||
<label class="form-check-label" for="statusPaused"> Wstrzymane (Pauza) </label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Częstotliwość wystawiania</label>
|
||||
<select class="form-select">
|
||||
<option value="">Wszystkie częstotliwości</option>
|
||||
<option value="1M">Co 1 miesiąc</option>
|
||||
<option value="3M">Co 3 miesiące (Kwartalnie)</option>
|
||||
<option value="12M">Co 1 rok (Rocznie)</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Zakres dat najbliższej emisji</label>
|
||||
<input type="text" class="form-control flatpickr-range"
|
||||
placeholder="RRRR-MM-DD do RRRR-MM-DD" />
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Tryb automatyzacji</label>
|
||||
<select class="form-select">
|
||||
<option value="">Wszystkie tryby</option>
|
||||
<option value="auto">Automatyczne wystawianie i wysyłka</option>
|
||||
<option value="draft">Tworzenie jako Szkic</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="d-flex justify-content-end gap-2 pt-2">
|
||||
<button class="btn btn-outline-secondary btn-sm">Wyczyść filtry</button>
|
||||
<button class="btn btn-primary btn-sm">Filtruj</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<?php include '../../footer.php'; ?>
|
||||
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
// Obsługa przełącznika panelu filtrów po prawej stronie
|
||||
const filterBtn = document.getElementById('filter-toggle-btn');
|
||||
const filtersCol = document.getElementById('invoice-filters-col');
|
||||
const listCol = document.getElementById('invoice-list-col');
|
||||
|
||||
if (filterBtn && filtersCol && listCol) {
|
||||
filterBtn.addEventListener('click', function () {
|
||||
filtersCol.classList.toggle('d-none');
|
||||
|
||||
if (filtersCol.classList.contains('d-none')) {
|
||||
listCol.classList.remove('col-lg-9');
|
||||
listCol.classList.add('col-lg-12');
|
||||
} else {
|
||||
listCol.classList.remove('col-lg-12');
|
||||
listCol.classList.add('col-lg-9');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Flatpickr range jeśli obecny
|
||||
if (typeof flatpickr !== 'undefined') {
|
||||
document.querySelectorAll('.flatpickr-range').forEach(function (element) {
|
||||
flatpickr(element, {
|
||||
mode: 'range',
|
||||
dateFormat: 'Y-m-d'
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -108,7 +108,7 @@ $currentPage = basename($_SERVER['PHP_SELF']);
|
||||
</li>
|
||||
|
||||
<li
|
||||
class="menu-item <?php echo ($currentPage == 'app-invoice-list.php' || $currentPage == 'app-purchase-list.php' || $currentPage == 'app-purchase-calendar.php' || $currentPage == 'app-products.php') ? 'active open' : ''; ?>">
|
||||
class="menu-item <?php echo ($currentPage == 'app-invoice-list.php' || $currentPage == 'app-invoice-recurring-list.php' || $currentPage == 'app-invoice-recurring-add.php' || $currentPage == 'app-purchase-list.php' || $currentPage == 'app-purchase-calendar.php' || $currentPage == 'app-products.php') ? 'active open' : ''; ?>">
|
||||
<a href="javascript:void(0);" class="menu-link menu-toggle">
|
||||
<i class="menu-icon tf-icons bx bx-cart-alt"></i>
|
||||
<div class="text-truncate" data-i18n="Faktury i sprzedaż">Faktury i sprzedaż</div>
|
||||
@@ -119,6 +119,11 @@ $currentPage = basename($_SERVER['PHP_SELF']);
|
||||
<div class="text-truncate" data-i18n="Faktury sprzedaż">Faktury sprzedaż</div>
|
||||
</a>
|
||||
</li>
|
||||
<li class="menu-item <?php echo ($currentPage == 'app-invoice-recurring-list.php' || $currentPage == 'app-invoice-recurring-add.php') ? 'active' : ''; ?>">
|
||||
<a href="app-invoice-recurring-list.php" class="menu-link">
|
||||
<div class="text-truncate" data-i18n="Faktury cykliczne">Faktury cykliczne</div>
|
||||
</a>
|
||||
</li>
|
||||
<li class="menu-item <?php echo ($currentPage == 'app-purchase-list.php') ? 'active' : ''; ?>">
|
||||
<a href="app-purchase-list.php" class="menu-link">
|
||||
<div class="text-truncate" data-i18n="Faktury zakupy">Faktury zakupy</div>
|
||||
|
||||
Reference in New Issue
Block a user