Direct payments for invoices

Events can be moved to archive and moved back
Fixed validation
This commit is contained in:
2026-05-12 16:04:15 +02:00
parent e2fb616565
commit 0cf9602958
42 changed files with 851 additions and 132 deletions
+5 -1
View File
@@ -3,8 +3,10 @@
namespace App\Providers;
use App\Models\Invoice;
use App\Resources\InvoiceResource;
use DOMDocument;
use Exception;
use Illuminate\Http\Request;
class PainFileProvider {
public string $senderIban;
@@ -89,6 +91,8 @@ class PainFileProvider {
$pmt_inf->appendChild($dbtr_agt);
foreach ($this->invoices as $index => $invoice) {
$invoiceResource = new InvoiceResource($invoice)->toArray(new Request());
$cdt_trf_tx_inf = $doc->createElement('CdtTrfTxInf');
$pmt_id = $doc->createElement('PmtId');
@@ -112,7 +116,7 @@ class PainFileProvider {
$cdt_trf_tx_inf->appendChild($cdtr_acct);
$rmt_inf = $doc->createElement('RmtInf');
$rmt_inf->appendChild($doc->createElement('Ustrd', 'Auslagenerstattung Rechnungsnummer ' . $invoice['invoice_number']));
$rmt_inf->appendChild($doc->createElement('Ustrd', $invoiceResource['paymentPurpose']));
$cdt_trf_tx_inf->appendChild($rmt_inf);
$pmt_inf->appendChild($cdt_trf_tx_inf);