Przeglądaj źródła

Fix item name in invoice to use template name

Alan Lam 8 lat temu
rodzic
commit
289053473a
1 zmienionych plików z 2 dodań i 1 usunięć
  1. 2 1
      controllers/test_invoice.php

+ 2 - 1
controllers/test_invoice.php

@@ -6,6 +6,7 @@ if($test->status != Test::STATUS_COMPLETED) throw new Exception("An invoice cann
 if(Core::$user->id != $test->tester_id && !Core::$user->canAdmin()) throw new Exception("You do not have permission to access this resource.");
 
 $project = $test->getProject();
+$template = $project->getTemplate();
 $location = $test->getLocation();
 $tester = $test->getTester();
 $values = $test->getValues(true);
@@ -146,7 +147,7 @@ $pdf->SetTextColor(0);
 $pdf->SetFont("Arial", "", $normal_font_size);
 
 $y = $pdf->GetY();
-$pdf->MultiCell(115, 5, "Age Verification Test\n$location_address\n" . date("d/m/Y H:i", strtotime($test->dts_start . " UTC")), 0, "L");
+$pdf->MultiCell(115, 5, $template->name . " Test\n$location_address\n" . date("d/m/Y H:i", strtotime($test->dts_start . " UTC")), 0, "L");
 $next_y = $pdf->GetY();
 $pdf->SetXY(125, $y);
 $pdf->Cell(15, 5, 1, 0, 0, "R");