|
|
@@ -3,6 +3,7 @@
|
|
|
/**
|
|
|
* @var Template $template
|
|
|
* @var Test $test
|
|
|
+ * @var Mpdf $mpdf
|
|
|
* @var array $values
|
|
|
* @var string $location_text
|
|
|
* @var Customer $customer
|
|
|
@@ -14,8 +15,19 @@
|
|
|
* @var string $duration_text
|
|
|
*/
|
|
|
|
|
|
+use Helpers\PdfHelper;
|
|
|
+use Mpdf\Mpdf;
|
|
|
+
|
|
|
$pass_image = $test->pass ? "pass.png" : "fail.png";
|
|
|
|
|
|
+// Bar Receipt
|
|
|
+$receipt_path_pattern = $test->getDirectory() . "/bar_receipt.*";
|
|
|
+$receipt_config = null;
|
|
|
+foreach(glob($receipt_path_pattern) as $receipt_path) {
|
|
|
+ $receipt_config = PdfHelper::getImageConfig($receipt_path);
|
|
|
+ $mpdf->imageVars["bar_receipt"] = $receipt_config["contents"];
|
|
|
+}
|
|
|
+
|
|
|
?>
|
|
|
|
|
|
<h3 class="section">Test Result</h3>
|
|
|
@@ -256,6 +268,17 @@ $pass_image = $test->pass ? "pass.png" : "fail.png";
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
+ <?php
|
|
|
+ if($receipt_config) {
|
|
|
+ ?>
|
|
|
+ <div class="subheader">
|
|
|
+ <strong>Receipt</strong>
|
|
|
+ </div>
|
|
|
+ <img src="var:bar_receipt" width="<?=$receipt_config["width"]?>" height="<?=$receipt_config["height"]?>" alt="" />
|
|
|
+ <?php
|
|
|
+ }
|
|
|
+ ?>
|
|
|
+
|
|
|
</div>
|
|
|
|
|
|
<div style="float: right; width: 49.5%">
|