Direct payments for invoices
Events can be moved to archive and moved back Fixed validation
This commit is contained in:
@@ -25,12 +25,13 @@ class GlobalDataProvider {
|
||||
'navbar' => $this->generateNavbar(),
|
||||
'tenant' => app('tenant'),
|
||||
'activeUsers' => $this->getActiveUsers(),
|
||||
'version' => config('app.version'),
|
||||
]);
|
||||
}
|
||||
|
||||
public function getAllInvoiceTypes() : JsonResponse {
|
||||
$invoiceTypes = [];
|
||||
foreach (InvoiceType::all() as $invoiceType) {
|
||||
foreach (InvoiceType::orderBy('sort_order')->get() as $invoiceType) {
|
||||
if (
|
||||
$invoiceType->slug === InvoiceType::INVOICE_TYPE_OTHER
|
||||
) {
|
||||
@@ -52,10 +53,9 @@ class GlobalDataProvider {
|
||||
|
||||
public function getInvoiceTypes() : JsonResponse {
|
||||
$invoiceTypes = [];
|
||||
foreach (InvoiceType::all() as $invoiceType) {
|
||||
foreach (InvoiceType::orderBy('sort_order')->get() as $invoiceType) {
|
||||
if (
|
||||
$invoiceType->slug === InvoiceType::INVOICE_TYPE_TRAVELLING ||
|
||||
$invoiceType->slug === InvoiceType::INVOICE_TYPE_OTHER
|
||||
$invoiceType->slug === InvoiceType::INVOICE_TYPE_TRAVELLING
|
||||
) {
|
||||
continue;
|
||||
}
|
||||
@@ -66,8 +66,6 @@ class GlobalDataProvider {
|
||||
];
|
||||
}
|
||||
|
||||
$invoiceTypes[] = ['slug' => InvoiceType::INVOICE_TYPE_OTHER, 'name' => 'Sonstige Kosten'];
|
||||
|
||||
return response()->json([
|
||||
'invoiceTypes' => $invoiceTypes
|
||||
]);
|
||||
@@ -110,6 +108,7 @@ class GlobalDataProvider {
|
||||
'common' => [],
|
||||
'costunits' => [],
|
||||
'events' => [],
|
||||
'eventControl' => [],
|
||||
];
|
||||
|
||||
$navigation['personal'][] = ['url' => '/', 'display' => 'Home'];
|
||||
@@ -129,7 +128,8 @@ class GlobalDataProvider {
|
||||
$navigation['events'][] = ['url' => '/event/details/' . $event->identifier, 'display' => $event->name];
|
||||
}
|
||||
|
||||
$navigation['events'][] = ['url' => '/create-event', 'display' => 'Neue Veranstaltung'];
|
||||
$navigation['eventControl'][] = ['url' => '/archived-events', 'display' => 'Archivierte Veranstaltungen'];
|
||||
$navigation['eventControl'][] = ['url' => '/create-event', 'display' => 'Neue Veranstaltung'];
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ class InvoiceCsvFileProvider {
|
||||
'"Kontoinhaber*in"',
|
||||
'"Betrag"',
|
||||
'"Spende"',
|
||||
'"Beleg ohne Auszahlung"',
|
||||
'"Buchungstext"'
|
||||
]);
|
||||
|
||||
foreach ($this->invoices as $invoice) {
|
||||
@@ -38,7 +38,7 @@ class InvoiceCsvFileProvider {
|
||||
'"' . $invoiceReadable['accountOwner'] . '"',
|
||||
'"' . $invoiceReadable['amountPlain'] . '"',
|
||||
'"' . $invoiceReadable['donation'] . '"',
|
||||
'"' . $invoiceReadable['alreadyPaid'] . '"'
|
||||
'"' . $invoiceReadable['paymentPurpose'] . '"'
|
||||
]);
|
||||
|
||||
$csvArray[] = $csvLine;
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user