Summe & gm pro Spieler

This commit is contained in:
Flummi 2022-12-29 03:59:51 +01:00
parent 196fc337e0
commit 85d2cf4be2
2 changed files with 6 additions and 3 deletions

View File

@ -43,7 +43,8 @@ if(!empty($protocol)) {
'datum' => $res['datetime'][$i],
'gold' => (int)str_replace('.', '', $res['gm'][$i]),
'amt' => $res['amt'][$i],
'laeufer' => $laeufer
'laeufer' => $laeufer,
'a' => (int)str_replace('.', '', $res['gm'][$i]) / (count($laeufer) + 1)
];
}

View File

@ -45,7 +45,8 @@
<thead>
<tr>
<th>Datum</th>
<th>Goldm&uuml;nzen</th>
<th>Summe</th>
<th>à Spieler</th>
<th>Amtsteher</th>
<th>L&auml;ufer</th>
</tr>
@ -55,6 +56,7 @@
<tr>
<td style="vertical-align: top">{{ $tmp['datum'] }}</td>
<td style="vertical-align: top">{{ $tmp['gold'] }} gm</td>
<td style="vertical-align: top">{{ $tmp['a'] }} gm</td>
<td style="vertical-align: top">{{ $tmp['amt'] }}</td>
<td style="vertical-align: top">{{ implode(', ', $tmp['laeufer']) }}</td>
</tr>
@ -97,7 +99,7 @@
for(let entry of vm.list) {
// fill vmlist
const tr = document.createElement('tr');
tr.innerHTML = `<td>${entry.datum}</td><td>${entry.gold} gm</td><td>${entry.amt}</td><td>${entry.laeufer.join(', ')}</td>`;
tr.innerHTML = `<td>${entry.datum}</td><td>${entry.gold} gm</td><td>${entry.a} gm</td><td>${entry.amt}</td><td>${entry.laeufer.join(', ')}</td>`;
vmlist.insertAdjacentElement('beforeend', tr);
}