Fix error loading page after adding promotion with items to transaction

This commit is contained in:
James Chapman 2023-12-05 22:49:32 +00:00
parent 12f91cbf93
commit fd05501fad
Signed by: jamsch0
GPG Key ID: 765FE58130277547

View File

@ -40,7 +40,7 @@
@promotion.Name @promotion.Name
</td> </td>
<td class="table__cell table__cell--compact table__cell--numeric"> <td class="table__cell table__cell--compact table__cell--numeric">
@promotion.Items.Sum(item => Transaction.Items.Single(i => i.ItemId == i.ItemId).Quantity) @promotion.Items.Sum(item => Transaction.Items.Single(i => i.ItemId == item.Id).Quantity)
</td> </td>
<td class="table__cell table__cell--compact table__cell--numeric"> <td class="table__cell table__cell--compact table__cell--numeric">
@((-promotion.Amount).ToString("c")) @((-promotion.Amount).ToString("c"))
@ -53,7 +53,7 @@
</tbody> </tbody>
<tfoot> <tfoot>
<tr> <tr>
<td class="table__cell table__cell--compact table__cell--total" colspan="3">Total</td> <td class="table__cell table__cell--compact table__cell--total" colspan="2">Total</td>
<td class="table__cell table__cell--compact table__cell--numeric table__cell--total"> <td class="table__cell table__cell--compact table__cell--numeric table__cell--total">
@Transaction.Total.ToString("c") @Transaction.Total.ToString("c")
</td> </td>