Documents: Fix error because of modifiers in CreditNote and DeliveryConfirmation

This commit is contained in:
2026-04-29 11:29:16 +02:00
parent 61bdb2f3b5
commit 72155fc54e
2 changed files with 10 additions and 6 deletions
+3 -2
View File
@@ -118,8 +118,9 @@ namespace Elwig.Documents {
.AddCell(NewCell(colspan: 2));
} else {
sub.AddCell(NewCell(colspan: 2));
if (i - (rows - p.Modifiers.Length) < p.Modifiers.Length) {
sub.AddCell(NewTd(p.Modifiers[i - (rows - p.Modifiers.Length)], 8, colspan: 2)
var idx = i - (rows - p.Modifiers.Length);
if (idx >= 0 && idx < p.Modifiers.Length) {
sub.AddCell(NewTd(p.Modifiers[idx], 8, colspan: 2)
.SetPaddingsMM(0.125f, 0, 0.125f, 5));
} else {
sub.AddCell(NewCell(colspan: 2));