Jelajahi Sumber

Adds completed test check for invoices.

Alan Lam 8 tahun lalu
induk
melakukan
6318636529
1 mengubah file dengan 9 tambahan dan 3 penghapusan
  1. 9 3
      views/test_list_completed.php

+ 9 - 3
views/test_list_completed.php

@@ -81,9 +81,15 @@
 							<div class="row">
 								<div class="col order-1 order-sm-1">
 									<strong>ID: <?=$test->id?></strong><br />
-									<a href="/account/tests/<?=$test->id?>/invoice" target="_blank">
-										<i class="fal fa-fw fa-external-link"></i> Invoice
-									</a>
+									<?php
+									if($test->status == Test::STATUS_COMPLETED) {
+										?>
+										<a href="/account/tests/<?=$test->id?>/invoice" target="_blank">
+											<i class="fal fa-fw fa-external-link"></i> Invoice
+										</a>
+										<?php
+									}
+									?>
 								</div>
 								<div class="col-sm order-3 order-sm-2">
 									<hr class="d-block d-sm-none" />