Added button to send copy of Invoice in PreorderBillingInvoice

This commit is contained in:
Frank Schubert
2025-04-24 14:06:21 +02:00
parent 7a4aa119a3
commit 16ae5149c4
4 changed files with 66 additions and 1 deletions
@@ -175,6 +175,7 @@ $pagination_entity_name = "Rechnungen";
<th>Brutto</th>
<th>Versendet</th>
<th>Erstellt</th>
<th></th>
</tr>
<?php foreach($invoices as $invoice): ?>
<tr>
@@ -207,6 +208,9 @@ $pagination_entity_name = "Rechnungen";
<?=$invoice->creator->name?><br />
<?=date("d.m.Y H:i", $invoice->create)?>
</td>
<td>
<a href="#" onclick="openSendCopyModal(<?=$invoice->id?>); return false;" title="Rechungskopie versenden"><i class="fas fa-fw fa-paper-plane"></i></a>
</td>
</tr>
<?php endforeach; ?>
</table>
@@ -227,6 +231,32 @@ $pagination_entity_name = "Rechnungen";
</div>
<div class="modal fade" id="sendCopyModal" tabindex="-1" aria-labelledby="sendCopyModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<form method="post" action="<?=self::getUrl("PreorderBillingInvoice", "sendCopy")?>">
<input type="hidden" name="id" value="" />
<div class="modal-header">
<h5 class="modal-title" id="sendCopyModalLabel">Rechungskopie versenden</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<div class="form-group">
<label for="recipient-name" class="col-form-label">Empfänger Emailadresse:</label>
<input type="text" class="form-control email_to" name="email_to">
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Abbrechen</button>
<button type="submit" class="btn btn-primary">Rechnungskopie versenden</button>
</div>
</form>
</div>
</div>
</div>
<script>
$("#filter_start_date_from").datepicker({
orientation: "bottom",
@@ -253,6 +283,12 @@ $pagination_entity_name = "Rechnungen";
autoclose: true
});
function openSendCopyModal(id) {
$('#sendCopyModal input[name="id"]').val(id);
$('#sendCopyModal input[name="email_to"]').val("");
$('#sendCopyModal').modal();
}
var status_update;
function updateStatus() {