From de0b0ee97c3d1a3395c52f9c124b5812552a3e4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Chili=C5=84ski?= Date: Thu, 1 Jun 2023 12:42:49 +0200 Subject: [PATCH 1/7] improvement: show cash source name in imported operations pending for confirmation --- modules/cashimport.php | 17 ++++++++++++----- templates/default/cash/cashimport.html | 11 +++++++++-- 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/modules/cashimport.php b/modules/cashimport.php index f0c9239871..198d547bb4 100644 --- a/modules/cashimport.php +++ b/modules/cashimport.php @@ -257,11 +257,18 @@ $divisions[0] = array('id' => 0, 'name' => ''); -if ($importlist = $DB->GetAll('SELECT i.*, c.divisionid - FROM cashimport i - LEFT JOIN customerview c ON (i.customerid = c.id) - WHERE i.closed = 0 AND i.value > 0 - ORDER BY i.id')) { +if ($importlist = $DB->GetAll( + 'SELECT + i.*, + c.divisionid, + cs.name AS sourcename + FROM cashimport i + LEFT JOIN customerview c ON i.customerid = c.id + LEFT JOIN cashsources cs ON cs.id = i.sourceid + WHERE i.closed = 0 + AND i.value > 0 + ORDER BY i.id' +)) { $listdata['total'] = count($importlist); foreach ($importlist as $idx => $row) { diff --git a/templates/default/cash/cashimport.html b/templates/default/cash/cashimport.html index e758e7a445..97ca163c16 100644 --- a/templates/default/cash/cashimport.html +++ b/templates/default/cash/cashimport.html @@ -35,6 +35,7 @@

{$layout.pagetitle}

+ @@ -45,6 +46,9 @@

{$layout.pagetitle}

{trans("ID:")} + + {trans("Source")} + {trans("Date:")} @@ -69,7 +73,7 @@

{$layout.pagetitle}

{foreach $divisions as $division} {if $division.list} - + {icon name="division"} {$division.name|escape} @@ -82,6 +86,9 @@

{$layout.pagetitle}

{$item.id|string_format:"%04d"} + + {$item.sourcename|escape} + {$item.date|date_format:"Y-m-d"} @@ -113,7 +120,7 @@

{$layout.pagetitle}

{/foreach} {if !$listdata.total} - + {trans("No cash operations to import.")} From 5952622a408b630dfc225e105f336a2d2cfeb8ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Chili=C5=84ski?= Date: Thu, 1 Jun 2023 12:43:28 +0200 Subject: [PATCH 2/7] improvement: show cash source name in imported operations pending for confirmation (changelog entry) --- doc/ChangeLog | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/ChangeLog b/doc/ChangeLog index 48b7622bab..a3822de70f 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -509,6 +509,7 @@ version 28-git (????-??-??): - enhancement: 'without start date' assignment filter added in customer search form [chilan] - improvement: show customer id for addresses in 'merge' mode lms-teryt.php script [chilan] - enhancement: added division property to network devices [chilan] + - improvement: show source name in imported operation list pending for confirmation [chilan] version 27.0 (2021-08-20): From 6ebde1d0af1a296220e206732f3b58dfc6f4b3fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Chili=C5=84ski?= Date: Thu, 1 Jun 2023 12:46:24 +0200 Subject: [PATCH 3/7] improvement: show cash source name in imported operations pending for confirmation (small visual fix) --- templates/default/cash/cashimport.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/default/cash/cashimport.html b/templates/default/cash/cashimport.html index 97ca163c16..8c43a1a09e 100644 --- a/templates/default/cash/cashimport.html +++ b/templates/default/cash/cashimport.html @@ -128,7 +128,7 @@

{$layout.pagetitle}

- +