Przeglądaj źródła

Invoices download with reference and tester name.

Alan Lam 8 lat temu
rodzic
commit
ef6425ec72
2 zmienionych plików z 4 dodań i 3 usunięć
  1. 2 1
      controllers/test_invoice.php
  2. 2 2
      views/modal_test_invoice.php

+ 2 - 1
controllers/test_invoice.php

@@ -209,7 +209,8 @@ switch($tester->preferred_payment_method) {
 }
 
 // Output
+$name = str_replace("/", "_", $reference) . " - " . $tester->getDisplayName() . " - Invoice.pdf";
 
-$pdf->Output();
+$pdf->Output("D", $name);
 
 ?>

+ 2 - 2
views/modal_test_invoice.php

@@ -4,7 +4,7 @@
 			<form method="get" action="" target="_blank">
 
 				<div class="modal-header">
-					<h5 class="modal-title"><strong>Generate Invoice</strong></h5>
+					<h5 class="modal-title"><strong>Download Invoice</strong></h5>
 					<button type="button" class="close" data-dismiss="modal" aria-label="Close">
 						<span aria-hidden="true">&times;</span>
 					</button>
@@ -26,7 +26,7 @@
 					</div>
 					<div class="row">
 						<div class="col-sm offset-sm-4">
-							<button class="btn btn-primary" type="submit">Generate Invoice</button>
+							<button class="btn btn-primary" type="submit">Download Invoice</button>
 						</div>
 					</div>
 				</div>