Skip to content

Commit

Permalink
Added link to invoice
Browse files Browse the repository at this point in the history
  • Loading branch information
MasterZydra committed Feb 11, 2024
1 parent 65ecf7a commit b79c8d5
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion resources/Views/entities/deliveryNote/edit.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
<?php /** @var \App\Models\DeliveryNote $deliveryNote */ ?>
<?php
use \App\Models\Invoice;

/** @var \App\Models\DeliveryNote $deliveryNote */
?>
<?= component('layout.header') ?>

<h1><?= __('EditDeliveryNote') ?></h1>
Expand Down Expand Up @@ -40,6 +44,15 @@
<?= __('ReadyForInvoice') ?>
</label><br>

<?php if ($deliveryNote->getInvoiceId() !== null) {
$invoice = Invoice::findById($deliveryNote->getInvoiceId());
?>
<label><?= __('Invoice') ?>:</label>
<a href="/invoice/edit?id=<?= $deliveryNote->getInvoiceId() ?>">
<?= $invoice->getYear() ?> <?= $invoice->getNr() ?>
</a><br>
<?php } ?>

<button><?= __('Save') ?></button>
</form>

Expand Down

0 comments on commit b79c8d5

Please sign in to comment.