wip: finalize implementation

This commit is contained in:
Björn Fromme
2025-10-18 11:46:12 +02:00
parent 434c4d0a11
commit 49b5ccf308
3 changed files with 7 additions and 3 deletions
+1
View File
@@ -28,6 +28,7 @@ class BookingResponse
public readonly array $priceItems = [], public readonly array $priceItems = [],
public readonly ?float $totalPrice = null, public readonly ?float $totalPrice = null,
public readonly ?PaymentTerms $paymentTerms = null, public readonly ?PaymentTerms $paymentTerms = null,
public readonly ?string $message = null,
) { ) {
} }
@@ -17,6 +17,7 @@ use Symfony\Component\DomCrawler\Crawler;
* <satz typ="BUCHUNG" /> * <satz typ="BUCHUNG" />
* <buchung>möglich|erfolgt</buchung> * <buchung>möglich|erfolgt</buchung>
* <vorgang>321530</vorgang> * <vorgang>321530</vorgang>
* <hinweis>...</hinweis>
* <preise> * <preise>
* <preis position="1" art="BEF" unterart="BUS" bezeichnung="..." ... /> * <preis position="1" art="BEF" unterart="BUS" bezeichnung="..." ... />
* </preise> * </preise>
@@ -34,6 +35,7 @@ class BookingResponseParser extends AbstractParser
$status = $node->filterXPath('//buchung')->text(); $status = $node->filterXPath('//buchung')->text();
$transactionNumber = $this->getStringOrNullValue($node->filterXPath('//vorgang')); $transactionNumber = $this->getStringOrNullValue($node->filterXPath('//vorgang'));
$totalPrice = $this->getFloatOrNullValue($node->filterXPath('//gesamtpreis')); $totalPrice = $this->getFloatOrNullValue($node->filterXPath('//gesamtpreis'));
$message = $this->getStringOrNullValue($node->filterXPath('//hinweis'));
$priceItems = $this->parsePriceItems($node); $priceItems = $this->parsePriceItems($node);
$paymentTerms = $this->parsePaymentTerms($node); $paymentTerms = $this->parsePaymentTerms($node);
@@ -43,7 +45,8 @@ class BookingResponseParser extends AbstractParser
transactionNumber: $transactionNumber, transactionNumber: $transactionNumber,
priceItems: $priceItems, priceItems: $priceItems,
totalPrice: $totalPrice, totalPrice: $totalPrice,
paymentTerms: $paymentTerms paymentTerms: $paymentTerms,
message: $message,
); );
} }
+2 -2
View File
@@ -22,12 +22,12 @@
{% endblock %} {% endblock %}
{% block content %} {% block content %}
{% include '_partials/_flashes.html.twig' %}
<h1>Neue Buchung</h1> <h1>Neue Buchung</h1>
<div class="grid grid-cols-3 gap-8"> <div class="grid grid-cols-3 gap-8">
<div id="form-wrapper" class="col-span-2"> <div id="form-wrapper" class="col-span-2">
{% include '_partials/_flashes.html.twig' %}
<h2 class="mb-6">Zahlungsart</h2> <h2 class="mb-6">Zahlungsart</h2>
{{ form_start(form, { {{ form_start(form, {