Calculation errors for refunded amounts

This commit is contained in:
2026-09-04 01:15:37 +02:00
parent 5beb2b1d97
commit c1c1a4f143
28 changed files with 1436 additions and 26 deletions
@@ -90,4 +90,16 @@ class InvoiceTypeSelectionTest extends TestCase
InvoiceType::selectable()->pluck('slug')->all()
);
}
public function test_the_refund_type_does_not_count_as_an_expense(): void
{
// Sie mindert die Einnahmenseite bereits -- als Ausgabe gezählt, stünde sie zweimal in der Bilanz.
$this->assertSame(
[InvoiceType::INVOICE_TYPE_PROGRAM, InvoiceType::INVOICE_TYPE_OTHER],
InvoiceType::countingAsExpense()->pluck('slug')->all()
);
$type = InvoiceType::where('slug', InvoiceType::INVOICE_TYPE_PARTICIPATION_REFUND)->first();
$this->assertFalse($type->counts_as_expense);
}
}