diff --git a/prototype/invoice/app-contractors-list.php b/prototype/invoice/app-contractors-list.php new file mode 100644 index 0000000..9d85c69 --- /dev/null +++ b/prototype/invoice/app-contractors-list.php @@ -0,0 +1,20 @@ + + +
+
+
+

+

Moduł "Kontrahenci" pojawi się wkrótce!

+

+ Obecnie intensywnie pracujemy nad nowymi funkcjonalnościami dla tego modułu.
+ Zaglądaj tu regularnie, aby być na bieżąco z nowościami! +

+ Wróć na Kokpit +
+
+
+ + \ No newline at end of file diff --git a/prototype/invoice/app-invoice-add.php b/prototype/invoice/app-invoice-add.php index ae521c5..c5d5dd2 100644 --- a/prototype/invoice/app-invoice-add.php +++ b/prototype/invoice/app-invoice-add.php @@ -1,5 +1,5 @@ @@ -549,4 +549,4 @@ include '../../header-invoice.php'; - \ No newline at end of file + diff --git a/prototype/invoice/app-invoice-list.php b/prototype/invoice/app-invoice-list.php index 021ea6c..1195d47 100644 --- a/prototype/invoice/app-invoice-list.php +++ b/prototype/invoice/app-invoice-list.php @@ -1,5 +1,5 @@ @@ -899,4 +899,4 @@ include '../../header-invoice.php'; - \ No newline at end of file + diff --git a/prototype/invoice/app-products.php b/prototype/invoice/app-products.php index c34be85..52202aa 100644 --- a/prototype/invoice/app-products.php +++ b/prototype/invoice/app-products.php @@ -1,5 +1,5 @@ @@ -459,4 +459,4 @@ include '../../header-invoice.php'; - \ No newline at end of file + diff --git a/prototype/invoice/app-purchase-add.php b/prototype/invoice/app-purchase-add.php index cacdf09..3e2a8a2 100644 --- a/prototype/invoice/app-purchase-add.php +++ b/prototype/invoice/app-purchase-add.php @@ -1,5 +1,5 @@ @@ -531,4 +531,4 @@ include '../../header-invoice.php'; - \ No newline at end of file + diff --git a/prototype/invoice/app-purchase-calendar.php b/prototype/invoice/app-purchase-calendar.php index 0be6e12..db68852 100644 --- a/prototype/invoice/app-purchase-calendar.php +++ b/prototype/invoice/app-purchase-calendar.php @@ -1,5 +1,5 @@ @@ -188,4 +188,4 @@ include '../../header-invoice.php'; }); }); - \ No newline at end of file + diff --git a/prototype/invoice/app-purchase-list.php b/prototype/invoice/app-purchase-list.php index 75edc7c..cecf5eb 100644 --- a/prototype/invoice/app-purchase-list.php +++ b/prototype/invoice/app-purchase-list.php @@ -1,5 +1,5 @@ @@ -1227,4 +1227,4 @@ include '../../header-invoice.php'; - \ No newline at end of file + diff --git a/prototype/invoice/app-report-customers.php b/prototype/invoice/app-report-customers.php index 8f3b034..532a3e9 100644 --- a/prototype/invoice/app-report-customers.php +++ b/prototype/invoice/app-report-customers.php @@ -1,5 +1,5 @@ @@ -346,4 +346,4 @@ include '../../header-invoice.php'; customersChart.render(); } }); - \ No newline at end of file + diff --git a/prototype/invoice/app-report-sales.php b/prototype/invoice/app-report-sales.php index 75640dd..f550c26 100644 --- a/prototype/invoice/app-report-sales.php +++ b/prototype/invoice/app-report-sales.php @@ -1,5 +1,5 @@ @@ -37,6 +37,28 @@ include '../../header-invoice.php'; + +
@@ -47,7 +69,8 @@ include '../../header-invoice.php'; - Maksymalny okres dla tej opcji wynosi 366 dni. + Maksymalny okres dla tej opcji wynosi + 366 dni.
@@ -159,11 +182,51 @@ include '../../header-invoice.php'; if (typeof flatpickr !== 'undefined') { const dateRangeEl = document.querySelector('.flatpickr-range'); if (dateRangeEl) { - flatpickr(dateRangeEl, { + const fp = flatpickr(dateRangeEl, { mode: 'range', dateFormat: 'Y-m-d', locale: 'pl' }); + + // Obsługa szybkich zakresów dat + document.querySelectorAll('.preset-date-range').forEach(item => { + item.addEventListener('click', function (e) { + e.preventDefault(); + const rangeType = this.getAttribute('data-range'); + const today = new Date(); + let startDate = new Date(); + let endDate = new Date(); + + switch (rangeType) { + case 'last-6-months': + startDate.setMonth(today.getMonth() - 6); + break; + case 'last-12-months': + startDate.setFullYear(today.getFullYear() - 1); + break; + case 'this-month': + startDate = new Date(today.getFullYear(), today.getMonth(), 1); + endDate = new Date(today.getFullYear(), today.getMonth() + 1, 0); + break; + case 'last-month': + startDate = new Date(today.getFullYear(), today.getMonth() - 1, 1); + endDate = new Date(today.getFullYear(), today.getMonth(), 0); + break; + case 'this-year': + startDate = new Date(today.getFullYear(), 0, 1); + endDate = new Date(today.getFullYear(), 11, 31); + break; + case 'last-year': + startDate = new Date(today.getFullYear() - 1, 0, 1); + endDate = new Date(today.getFullYear() - 1, 11, 31); + break; + } + + if (startDate && endDate) { + fp.setDate([startDate, endDate]); + } + }); + }); } } @@ -264,4 +327,4 @@ include '../../header-invoice.php'; salesChart.render(); } }); - \ No newline at end of file + diff --git a/prototype/invoice/app-reports.php b/prototype/invoice/app-reports.php index fa5ef2a..866f850 100644 --- a/prototype/invoice/app-reports.php +++ b/prototype/invoice/app-reports.php @@ -1,5 +1,5 @@ @@ -161,4 +161,4 @@ include '../../header-invoice.php';
- \ No newline at end of file + diff --git a/prototype/invoice/index.php b/prototype/invoice/index.php index 4711b5d..2f304ad 100644 --- a/prototype/invoice/index.php +++ b/prototype/invoice/index.php @@ -1,5 +1,5 @@ @@ -415,4 +415,4 @@ include '../../header-invoice.php'; - \ No newline at end of file + diff --git a/prototype/invoice/menu.php b/prototype/invoice/menu.php index f6abe05..f3bde13 100644 --- a/prototype/invoice/menu.php +++ b/prototype/invoice/menu.php @@ -1,17 +1,95 @@ -