Bring back some services logic to still needed by charges

This commit is contained in:
Deon George
2022-06-13 14:21:48 +10:00
parent c1080481ec
commit 2590997b1a
5 changed files with 61 additions and 4 deletions

View File

@@ -284,7 +284,7 @@
success: function(data) {
$("select[name=service_id]").empty();
$.each(data,function(i,j) {
var row = '<option value="' + j.id + '" '+(j.id == {{ $o->service_id ?: 'null' }} ? 'selected' : '')+'>' + j.id + ': ' + j.product_name + ' ' + j.name_short + ((! j.active) ? ' **' : '') +'</option>';
var row = '<option value="' + j.id + '" '+(j.id == {{ $o->service_id ?: 'null' }} ? 'selected' : '')+'>' + j.id + ': ' + j.category_name + ' ' + j.name_short + ((! j.active) ? ' **' : '') +'</option>';
$(row).appendTo("select[name=service_id]");
});

View File

@@ -22,8 +22,8 @@
@foreach ($x as $co)
<tr>
<td><a href="{{ url('a/charge/addedit',[$co->id]) }}">{{ $co->id }}</a></td>
<td>{{ $co->date_orig->format('Y-m-d') }}</td>
<td>{{ $co->charge_date->format('Y-m-d') }}</td>
<td>{{ $co->created_at->format('Y-m-d') }}</td>
<td>{{ $co->charged_at ? $co->charged_at->format('Y-m-d') : '-' }}</td>
<td>{{ $co->service->sid }}</td>
<td>{{ $co->type }}</td>
<td>{{ $co->description }}</td>