Zahlungszwecke
This commit is contained in:
@@ -66,50 +66,43 @@ class SaveInvoiceController extends CommonController
|
||||
}
|
||||
|
||||
$createInvoiceRequest = new CreateInvoiceRequest(
|
||||
$costUnit,
|
||||
$request->input('name'),
|
||||
InvoiceType::INVOICE_TYPE_TRAVELLING,
|
||||
$amount,
|
||||
$uploadedFile,
|
||||
'donation' === $request->input('decision') ? true : false,
|
||||
$this->users->getCurrentUserDetails()['userId'],
|
||||
$request->input('email'),
|
||||
$request->input('telephone'),
|
||||
$request->input('accountOwner'),
|
||||
$request->input('accountIban'),
|
||||
null,
|
||||
$request->input('otherText'),
|
||||
$distance,
|
||||
$request->input('havePassengers'),
|
||||
$request->input('materialTransportation'),
|
||||
$request->input('travelReason'),
|
||||
null,
|
||||
$notices
|
||||
costUnit: $costUnit,
|
||||
contactName: $request->input('name'),
|
||||
invoiceType: InvoiceType::INVOICE_TYPE_TRAVELLING,
|
||||
totalAmount: $amount,
|
||||
receiptFile: $uploadedFile,
|
||||
isDonation: 'donation' === $request->input('decision') ? true : false,
|
||||
userId: $this->users->getCurrentUserDetails()['userId'],
|
||||
contactEmail: $request->input('email'),
|
||||
contactPhone: $request->input('telephone'),
|
||||
accountOwner: $request->input('accountOwner'),
|
||||
accountIban: $request->input('accountIban'),
|
||||
travelRoute: $request->input('otherText'),
|
||||
distance: $distance,
|
||||
travelReason: $request->input('travelReason'),
|
||||
travelReasonNote: $request->input('travelReasonNote'),
|
||||
notices: $notices,
|
||||
travellers: $request->input('travellers')
|
||||
);
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
$createInvoiceRequest = new CreateInvoiceRequest(
|
||||
$costUnit,
|
||||
$request->input('name'),
|
||||
$invoiceType,
|
||||
Amount::fromString($request->input('amount'))->getAmount(),
|
||||
$uploadedFile,
|
||||
'donation' === $request->input('decision') ? true : false,
|
||||
$this->users->getCurrentUserDetails()['userId'],
|
||||
$request->input('email'),
|
||||
$request->input('telephone'),
|
||||
$request->input('accountOwner'),
|
||||
$request->input('accountIban'),
|
||||
$request->input('otherText'),
|
||||
null,
|
||||
null,
|
||||
$request->input('havePassengers'),
|
||||
$request->input('materialTransportation'),
|
||||
null,
|
||||
$paymentPurpose,
|
||||
$notices
|
||||
costUnit: $costUnit,
|
||||
contactName: $request->input('name'),
|
||||
invoiceType: $invoiceType,
|
||||
totalAmount: Amount::fromString($request->input('amount'))->getAmount(),
|
||||
receiptFile: $uploadedFile,
|
||||
isDonation: 'donation' === $request->input('decision') ? true : false,
|
||||
userId: $this->users->getCurrentUserDetails()['userId'],
|
||||
contactEmail: $request->input('email'),
|
||||
contactPhone: $request->input('telephone'),
|
||||
accountOwner: $request->input('accountOwner'),
|
||||
accountIban: $request->input('accountIban'),
|
||||
invoiceTypeExtended: $request->input('otherText'),
|
||||
paymentPurpose: $paymentPurpose,
|
||||
notices: $notices
|
||||
);
|
||||
|
||||
break;
|
||||
@@ -128,5 +121,11 @@ class SaveInvoiceController extends CommonController
|
||||
'message' => 'Alright'
|
||||
]);
|
||||
}
|
||||
|
||||
return response()->json([
|
||||
'status' => 'error',
|
||||
'message' => $response->message
|
||||
?? 'Beim Speichern ist ein Fehler aufgetreten. Bitte starte den Vorgang erneut.'
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user