Browse Source

Bug 26273: (follow-up) Add 'Cashier' to the cashups table

This patch adds the 'Cashier' field as discussed on the bug report.

Test plan
1/ Apply patch and reload the register page to refresh the table
2/ Note that a 'Cashier' field now appears in the table
3/ Sorting and searching on 'Cashier' should work as expected
4/ Default sorting should remain as 'Date' order.
5/ Signoff

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Bug 26273: (QA follow-up) Check for null firstname

This patch adds a test for firstname being defined before constructing
fullname from it.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
21.05.x
Martin Renvoize 1 year ago
committed by Jonathan Druart
parent
commit
1ff61e7206
  1. 5
      api/v1/swagger/paths/cash_registers.json
  2. 24
      koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt

5
api/v1/swagger/paths/cash_registers.json

@ -57,7 +57,10 @@
"permissions": {
"cash_management": "cashup"
}
}
},
"x-koha-embed": [
"manager"
]
}
},
"/cashups/{cashup_id}": {

24
koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt

@ -229,6 +229,7 @@
<thead>
<tr>
<th>Date</th>
<th>Cashier</th>
<th>Amount</th>
<th data-class-name="actions">Actions</th>
</tr>
@ -408,9 +409,13 @@
"ajax": {
"url": cashups_table_url
},
"order": [[ 1, "asc" ]],
"header_filter": true,
"embed": [
"manager"
],
"order": [[ 0, "asc" ]],
"columnDefs": [ {
"targets": [0,1],
"targets": [0,1,2],
"render": function (data, type, row, meta) {
if ( type == 'display' ) {
return data.escapeHtml();
@ -427,6 +432,21 @@
return $datetime(row.timestamp);
}
},
{
"data": "manager.firstname:manager.surname",
"searchable": true,
"orderable": true,
"render": function(data, type, row, meta) {
var fullname;
if ( row.manager.firstname == null ) {
fullname = row.manager.surname;
}
else {
fullname = row.manager.firstname + " " + row.manager.surname;
}
return fullname;
}
},
{
"data": "amount",
"searchable": true,

Loading…
Cancel
Save