Comments for invoices #3
@@ -47,7 +47,5 @@ class ParticipantPaymentController extends CommonController
|
|||||||
'class' => $amountLeft->getAmount() != 0 ? 'not-paid' : 'paid',
|
'class' => $amountLeft->getAmount() != 0 ? 'not-paid' : 'paid',
|
||||||
]
|
]
|
||||||
]);
|
]);
|
||||||
|
|
||||||
dd($participant);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ class CreateInvoiceCommand {
|
|||||||
'passengers' => $this->request->passengers,
|
'passengers' => $this->request->passengers,
|
||||||
'transportation' => $this->request->transportations,
|
'transportation' => $this->request->transportations,
|
||||||
'payment_purpose' => $this->request->paymentPurpose,
|
'payment_purpose' => $this->request->paymentPurpose,
|
||||||
|
'comment' => $this->request->notices,
|
||||||
'document_filename' => $this->request->receiptFile !== null ? $this->request->receiptFile->fullPath : null,
|
'document_filename' => $this->request->receiptFile !== null ? $this->request->receiptFile->fullPath : null,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ class CreateInvoiceRequest {
|
|||||||
public ?int $userId;
|
public ?int $userId;
|
||||||
public ?string $travelReason;
|
public ?string $travelReason;
|
||||||
public ?string $paymentPurpose;
|
public ?string $paymentPurpose;
|
||||||
|
public ?string $notices;
|
||||||
|
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
@@ -45,6 +46,7 @@ class CreateInvoiceRequest {
|
|||||||
?int $transportations,
|
?int $transportations,
|
||||||
?string $travelReason = null,
|
?string $travelReason = null,
|
||||||
?string $paymentPurpose = null,
|
?string $paymentPurpose = null,
|
||||||
|
?string $notices = null,
|
||||||
|
|
||||||
) {
|
) {
|
||||||
$this->costUnit = $costUnit;
|
$this->costUnit = $costUnit;
|
||||||
@@ -65,6 +67,7 @@ class CreateInvoiceRequest {
|
|||||||
$this->userId = $userId;
|
$this->userId = $userId;
|
||||||
$this->travelReason = $travelReason;
|
$this->travelReason = $travelReason;
|
||||||
$this->paymentPurpose = $paymentPurpose;
|
$this->paymentPurpose = $paymentPurpose;
|
||||||
|
$this->notices = $notices;
|
||||||
|
|
||||||
if ($accountIban === 'undefined') {
|
if ($accountIban === 'undefined') {
|
||||||
$this->accountIban = null;
|
$this->accountIban = null;
|
||||||
|
|||||||
@@ -60,7 +60,6 @@ class CreateInvoiceReceiptCommand {
|
|||||||
storage_path('app/private/' .$filename) . '.zip',
|
storage_path('app/private/' .$filename) . '.zip',
|
||||||
ZipArchive::CREATE | ZipArchive::OVERWRITE
|
ZipArchive::CREATE | ZipArchive::OVERWRITE
|
||||||
);
|
);
|
||||||
dd($receipt);
|
|
||||||
$zip->addFile(storage_path('app/private/' . $tmpFileName ), 'antrag.pdf');
|
$zip->addFile(storage_path('app/private/' . $tmpFileName ), 'antrag.pdf');
|
||||||
$zip->addFile(storage_path('app/private/' . $receipt), 'beleg.pdf');
|
$zip->addFile(storage_path('app/private/' . $receipt), 'beleg.pdf');
|
||||||
|
|
||||||
@@ -114,6 +113,9 @@ HTML;
|
|||||||
<tr><td>Name:</td><td>%3\$s</td></tr>
|
<tr><td>Name:</td><td>%3\$s</td></tr>
|
||||||
<tr><td>E-Mail:</td><td>%4\$s</td></tr>
|
<tr><td>E-Mail:</td><td>%4\$s</td></tr>
|
||||||
<tr><td>Telefon:</td><td>%5\$s</td></tr>
|
<tr><td>Telefon:</td><td>%5\$s</td></tr>
|
||||||
|
<tr><td>Anmerkungen:</td><td>%16\$s</td></tr>
|
||||||
|
|
||||||
|
|
||||||
<tr><td>Name der Kostenstelle:</td><td>%6\$s</td></tr>
|
<tr><td>Name der Kostenstelle:</td><td>%6\$s</td></tr>
|
||||||
<tr><td>Zahlungsgrund:</td><td>%7\$s</td></tr>
|
<tr><td>Zahlungsgrund:</td><td>%7\$s</td></tr>
|
||||||
<tr><td>Wird der Betrag gespendet:</td><td>%8\$s</td></tr>
|
<tr><td>Wird der Betrag gespendet:</td><td>%8\$s</td></tr>
|
||||||
@@ -186,7 +188,8 @@ HTML;
|
|||||||
$invoiceReadable['createdAt'],
|
$invoiceReadable['createdAt'],
|
||||||
$invoiceReadable['approvedAt'],
|
$invoiceReadable['approvedAt'],
|
||||||
$invoiceReadable['approvedBy'],
|
$invoiceReadable['approvedBy'],
|
||||||
$changes
|
$changes,
|
||||||
|
$invoiceReadable['comment'],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,13 +8,13 @@ use App\Models\Invoice;
|
|||||||
use App\ValueObjects\Amount;
|
use App\ValueObjects\Amount;
|
||||||
|
|
||||||
class UpdateInvoiceRequest {
|
class UpdateInvoiceRequest {
|
||||||
public string $comment;
|
public ?string $comment;
|
||||||
public InvoiceType $invoiceType;
|
public InvoiceType $invoiceType;
|
||||||
public CostUnit $costUnit;
|
public CostUnit $costUnit;
|
||||||
public Invoice $invoice;
|
public Invoice $invoice;
|
||||||
public Amount $amount;
|
public Amount $amount;
|
||||||
|
|
||||||
public function __construct(Invoice $invoice, string $comment, InvoiceType $invoiceType, CostUnit $costUnit, Amount $amount) {
|
public function __construct(Invoice $invoice, ?string $comment, InvoiceType $invoiceType, CostUnit $costUnit, Amount $amount) {
|
||||||
$this->comment = $comment;
|
$this->comment = $comment;
|
||||||
$this->invoiceType = $invoiceType;
|
$this->invoiceType = $invoiceType;
|
||||||
$this->costUnit = $costUnit;
|
$this->costUnit = $costUnit;
|
||||||
|
|||||||
@@ -47,7 +47,10 @@ class EditController extends CommonController{
|
|||||||
$invoice->travel_direction,
|
$invoice->travel_direction,
|
||||||
$invoice->distance,
|
$invoice->distance,
|
||||||
$invoice->passengers,
|
$invoice->passengers,
|
||||||
$invoice->transportation
|
$invoice->transportation,
|
||||||
|
$invoice->travel_reason,
|
||||||
|
$invoice->payment_purpose,
|
||||||
|
$invoice->comment,
|
||||||
);
|
);
|
||||||
|
|
||||||
$invoiceCreationCommand = new CreateInvoiceCommand($createInvoiceRequest);
|
$invoiceCreationCommand = new CreateInvoiceCommand($createInvoiceRequest);
|
||||||
@@ -86,7 +89,7 @@ class EditController extends CommonController{
|
|||||||
|
|
||||||
$updateInvoiceRequest = new UpdateInvoiceRequest(
|
$updateInvoiceRequest = new UpdateInvoiceRequest(
|
||||||
$invoice,
|
$invoice,
|
||||||
$modifyData['reason_of_correction'] ?? 'Abrechnungskorrektur',
|
$modifyData['notices'],
|
||||||
$invoiceType,
|
$invoiceType,
|
||||||
$newCostUnit,
|
$newCostUnit,
|
||||||
$newAmount
|
$newAmount
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ class SaveInvoiceController extends CommonController
|
|||||||
public function __invoke(Request $request, int $costUnitId, string $invoiceType) : JsonResponse {
|
public function __invoke(Request $request, int $costUnitId, string $invoiceType) : JsonResponse {
|
||||||
$costUnit = $this->costUnits->getById($costUnitId, true);
|
$costUnit = $this->costUnits->getById($costUnitId, true);
|
||||||
$paymentPurpose = $request->input('paymentPurpose') ?? null;
|
$paymentPurpose = $request->input('paymentPurpose') ?? null;
|
||||||
|
$notices = $request->input('notices') ?? null;
|
||||||
if (null === $costUnit) {
|
if (null === $costUnit) {
|
||||||
return response()->json([
|
return response()->json([
|
||||||
'status' => 'error',
|
'status' => 'error',
|
||||||
@@ -82,6 +83,8 @@ class SaveInvoiceController extends CommonController
|
|||||||
$request->input('havePassengers'),
|
$request->input('havePassengers'),
|
||||||
$request->input('materialTransportation'),
|
$request->input('materialTransportation'),
|
||||||
$request->input('travelReason'),
|
$request->input('travelReason'),
|
||||||
|
null,
|
||||||
|
$notices
|
||||||
);
|
);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
@@ -106,6 +109,7 @@ class SaveInvoiceController extends CommonController
|
|||||||
$request->input('materialTransportation'),
|
$request->input('materialTransportation'),
|
||||||
null,
|
null,
|
||||||
$paymentPurpose,
|
$paymentPurpose,
|
||||||
|
$notices
|
||||||
);
|
);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ const formData = reactive({
|
|||||||
type_internal: props.newInvoice.internalType || '',
|
type_internal: props.newInvoice.internalType || '',
|
||||||
cost_unit: props.newInvoice.costUnitId || '',
|
cost_unit: props.newInvoice.costUnitId || '',
|
||||||
amount: props.newInvoice.amountPlain || '',
|
amount: props.newInvoice.amountPlain || '',
|
||||||
reason_of_correction: '',
|
notices: props.newInvoice.comments || '',
|
||||||
})
|
})
|
||||||
|
|
||||||
const submitForm = () => {
|
const submitForm = () => {
|
||||||
@@ -71,9 +71,13 @@ onMounted(async () => {
|
|||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>Grund der Korrektur:</td>
|
<td>Anmerkungen:</td>
|
||||||
<td>
|
<td>
|
||||||
<input type="text" v-model="formData.reason_of_correction" class="width-half-full" />
|
<textarea
|
||||||
|
id="notices"
|
||||||
|
name="notices" v-model="formData.notices"
|
||||||
|
maxlength="128"
|
||||||
|
style="font-size: 14pt; width: 550px;" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ const decision = ref('')
|
|||||||
const errorMsg = ref('')
|
const errorMsg = ref('')
|
||||||
const confirmation = ref(null)
|
const confirmation = ref(null)
|
||||||
const receiptError = ref('')
|
const receiptError = ref('')
|
||||||
|
const notices = ref('')
|
||||||
|
|
||||||
async function sendData() {
|
async function sendData() {
|
||||||
if (!userName.value) return
|
if (!userName.value) return
|
||||||
@@ -62,6 +63,7 @@ async function sendData() {
|
|||||||
formData.append('havePassengers', props.havePassengers ? 1 : 0)
|
formData.append('havePassengers', props.havePassengers ? 1 : 0)
|
||||||
formData.append('materialTransportation', props.materialTransportation ? 1 : 0)
|
formData.append('materialTransportation', props.materialTransportation ? 1 : 0)
|
||||||
formData.append('travelReason', props.travelReason)
|
formData.append('travelReason', props.travelReason)
|
||||||
|
formData.append('notices', notices.value)
|
||||||
|
|
||||||
if (props.receipt) {
|
if (props.receipt) {
|
||||||
formData.append('receipt', props.receipt)
|
formData.append('receipt', props.receipt)
|
||||||
@@ -121,6 +123,15 @@ async function sendData() {
|
|||||||
name="contact_telephone" v-model="userTelephone"
|
name="contact_telephone" v-model="userTelephone"
|
||||||
style="font-size: 14pt; width: 550px;" /><br /><br />
|
style="font-size: 14pt; width: 550px;" /><br /><br />
|
||||||
|
|
||||||
|
<label v-if="userName !== ''">
|
||||||
|
<strong>Weitere Informationen zur Abrechnung (Max. 128 Zeichen):</strong>
|
||||||
|
</label><br />
|
||||||
|
<textarea
|
||||||
|
id="notices"
|
||||||
|
name="notices" v-model="notices"
|
||||||
|
maxlength="128"
|
||||||
|
style="font-size: 14pt; width: 550px;" /><br /><br />
|
||||||
|
|
||||||
<span id="decision" v-if="userEmail !== '' && userTelephone !== '' && decision === ''">
|
<span id="decision" v-if="userEmail !== '' && userTelephone !== '' && decision === ''">
|
||||||
<label><br />
|
<label><br />
|
||||||
<strong>Möchtest du den Betrag spenden?</strong>
|
<strong>Möchtest du den Betrag spenden?</strong>
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body" style="max-height: 600px; overflow: auto;">
|
||||||
<slot />
|
<slot />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -12,6 +12,8 @@ install -d -m 0755 -o $USER -g $GROUPNAME \
|
|||||||
storage/app/private \
|
storage/app/private \
|
||||||
storage/logs
|
storage/logs
|
||||||
|
|
||||||
|
php artisan migrate --force
|
||||||
|
|
||||||
rm .dockerignore
|
rm .dockerignore
|
||||||
rm .editorconfig
|
rm .editorconfig
|
||||||
rm .env.example
|
rm .env.example
|
||||||
@@ -31,6 +33,4 @@ rm -rf docker
|
|||||||
rm -rf database
|
rm -rf database
|
||||||
rm -rf app/Installer
|
rm -rf app/Installer
|
||||||
|
|
||||||
php artisan migrate --force
|
|
||||||
|
|
||||||
exec "php-fpm"
|
exec "php-fpm"
|
||||||
|
|||||||
Reference in New Issue
Block a user