Zahlungszwecke
This commit is contained in:
@@ -260,7 +260,26 @@ class EventIncomeSurplusStatementTest extends TestCase
|
||||
typeOther: 'Bastelmaterial'
|
||||
);
|
||||
|
||||
$this->assertSame('Bastelmaterial — Materialkauf', $this->group('Programmkosten')['rows'][0]['purpose']);
|
||||
$this->assertSame('Bastelmaterial', $this->group('Programmkosten')['rows'][0]['purpose']);
|
||||
}
|
||||
|
||||
public function test_a_recorded_purpose_wins(): void
|
||||
{
|
||||
// Der Regelfall für neue Belege: Der Zahlungsgrund wird beim Einreichen erfasst und steht in
|
||||
// seiner eigenen Spalte -- korrigierbar, ohne dass ihn etwas wieder überschreibt.
|
||||
$this->makeEvent();
|
||||
$this->makeInvoice(
|
||||
InvoiceType::INVOICE_TYPE_PROGRAM,
|
||||
100.0,
|
||||
InvoiceStatus::INVOICE_STATUS_EXPORTED,
|
||||
typeOther: 'Bastelmaterial',
|
||||
purpose: 'Material für den Bastelnachmittag'
|
||||
);
|
||||
|
||||
$this->assertSame(
|
||||
'Material für den Bastelnachmittag',
|
||||
$this->group('Programmkosten')['rows'][0]['purpose']
|
||||
);
|
||||
}
|
||||
|
||||
public function test_travel_costs_name_the_reason_and_who_travelled(): void
|
||||
@@ -286,16 +305,18 @@ class EventIncomeSurplusStatementTest extends TestCase
|
||||
travelReason: 'Landeslager'
|
||||
);
|
||||
|
||||
$this->assertSame('Landeslager — Mika Muster — Materialkauf', $this->group('Fahrtkosten')['rows'][0]['purpose']);
|
||||
$this->assertSame('Landeslager — Mika Muster', $this->group('Fahrtkosten')['rows'][0]['purpose']);
|
||||
}
|
||||
|
||||
public function test_an_older_receipt_without_the_purchase_note_falls_back_to_the_comment(): void
|
||||
public function test_the_comment_is_no_longer_part_of_the_purpose(): void
|
||||
{
|
||||
// Belege von vor der Pflichtangabe haben `type_other` leer.
|
||||
// Die Anmerkung trägt, was die Kassenwart*in beim Korrigieren notiert hat -- sie steht auf dem
|
||||
// Beleg-PDF und hat im Zweck nichts zu suchen. Bestandsbelege ohne erfassten Zahlungsgrund haben
|
||||
// hier deshalb eine leere Zelle; nachtragen lässt er sich beim Korrigieren.
|
||||
$this->makeEvent();
|
||||
$this->makeInvoice(InvoiceType::INVOICE_TYPE_PROGRAM, 100.0, InvoiceStatus::INVOICE_STATUS_NEW);
|
||||
|
||||
$this->assertSame('Materialkauf', $this->group('Programmkosten')['rows'][0]['purpose']);
|
||||
$this->assertSame('', $this->group('Programmkosten')['rows'][0]['purpose']);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -498,7 +519,8 @@ class EventIncomeSurplusStatementTest extends TestCase
|
||||
string $status,
|
||||
bool $donation = false,
|
||||
?string $typeOther = null,
|
||||
?string $travelReason = null
|
||||
?string $travelReason = null,
|
||||
?string $purpose = null
|
||||
): Invoice {
|
||||
return Invoice::create([
|
||||
'tenant' => $this->tenant->slug,
|
||||
@@ -507,6 +529,7 @@ class EventIncomeSurplusStatementTest extends TestCase
|
||||
'status' => $status,
|
||||
'type' => $type,
|
||||
'type_other' => $typeOther,
|
||||
'purpose' => $purpose,
|
||||
'travel_reason' => $travelReason,
|
||||
'donation' => $donation,
|
||||
'contact_name' => 'Mika Muster',
|
||||
|
||||
Reference in New Issue
Block a user