Skip to content

Commit

Permalink
Show customer and invoice number in admin edit and info pages
Browse files Browse the repository at this point in the history
  • Loading branch information
jbtronics committed Jan 8, 2025
1 parent edff29a commit 158f458
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
13 changes: 11 additions & 2 deletions src/Controller/Admin/PaymentOrderCrudController.php
Original file line number Diff line number Diff line change
Expand Up @@ -366,8 +366,7 @@ public function configureFields(string $pageName): iterable
->setCurrency('EUR')
->setStoredAsCents();
$supportingFundingID = TextField::new('supporting_funding_id', 'Unterstützende Mittelfreigabe')
->setRequired(false)
->setEmptyData('');
->setRequired(false);
$supportingFundingDate = DateField::new('supporting_funding_date', 'Datum der unterstützenden MF')
->setRequired(false);

Expand Down Expand Up @@ -418,6 +417,10 @@ public function configureFields(string $pageName): iterable
$bankInfoReference = TextField::new('bank_info.reference', 'bank_info.reference.label')
->setRequired(false)
->setFormTypeOption('empty_data', '');
$invoiceNumber = TextField::new('invoice_number', 'payment_order.invoice_number.label')
->setRequired(false);
$customerNumber = TextField::new('customer_number', 'payment_order.customer_number.label')
->setRequired(false);

if (Crud::PAGE_INDEX === $pageName) {
return [$id, $projectName, $department, $amount, $mathematicallyCorrect, $factuallyCorrect, $funding_id_index, $creationDate];
Expand Down Expand Up @@ -459,12 +462,16 @@ public function configureFields(string $pageName): iterable
$bankInfoStreet,
$bankInfoZipCode,
$bankInfoCity,

//Banking informations
$bankInfoPanel,
$bankInfoIban,
$bankInfoBic,
$bankInfoBankName,
$bankInfoReference,
$invoiceNumber,
$customerNumber,


FormField::addTab('payment_order.tab.status', 'fas fa-list-check'),
//Status infos
Expand Down Expand Up @@ -522,6 +529,8 @@ public function configureFields(string $pageName): iterable
$bankInfoBic,
$bankInfoBankName,
$bankInfoReference,
$invoiceNumber,
$customerNumber,


FormField::addTab('payment_order.tab.status', 'fas fa-list-check'),
Expand Down
2 changes: 1 addition & 1 deletion src/Entity/PaymentOrder.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ class PaymentOrder implements DBElementInterface, TimestampedElementInterface, \
#[ORM\Column(type: Types::STRING, nullable: true)]
#[Assert\Regex(PaymentOrder::FUNDING_ID_STURA_FSRKOM)]
#[Assert\Expression("value === null || this.getSupportingAmount() !== null", message: 'validator.supporting_funding_id.needed_for_supporting_amount')]
private ?string $supporting_funding_id = '';
private ?string $supporting_funding_id = null;

/**
* The day, when the supporting funding was decided
Expand Down
6 changes: 6 additions & 0 deletions translations/validators.de.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,11 @@
Ein FSR benötigt mindestens 2 Bestätigungspersonen, Referate mindestens 1 Person!</target>
</segment>
</unit>
<unit id="aKu1fAw" name="validator.supporting_amount.needed_for_supporting_funding_id">
<segment>
<source>validator.supporting_amount.needed_for_supporting_funding_id</source>
<target>Alle drei Angaben der unterstützenden Mittelfreigabe (Betrag, MF-Nummer und Beschlussdatum) müssen angegeben werden, wenn eines der Angaben gewünscht ist!</target>
</segment>
</unit>
</file>
</xliff>

0 comments on commit 158f458

Please sign in to comment.