diff --git a/app/Designs/Custom.php b/app/Designs/Custom.php
index 260314835bbc..9bfbdbc4bb60 100644
--- a/app/Designs/Custom.php
+++ b/app/Designs/Custom.php
@@ -25,22 +25,31 @@ class Custom extends AbstractDesign
public $footer;
+ public $name;
+
public function __construct($design)
{
- $this->includes = $design->includes;
+ $this->name = $design->name;
- $this->header = $design->header;
-
- $this->body = $design->body;
-
- $this->product = $design->product;
-
- $this->task = $design->task;
+ $this->includes = $design->design->includes;
- $this->footer = $design->footer;
+ $this->header = $design->design->header;
+
+ $this->body = $design->design->body;
+
+ $this->product = $design->design->product;
+
+ $this->task = $design->design->task;
+
+ $this->footer = $design->design->footer;
}
+ public function name()
+ {
+ return $this->name;
+ }
+
public function includes()
{
return $this->includes;
diff --git a/app/Designs/Designer.php b/app/Designs/Designer.php
index a38fa0f0e1d3..039038c6ba5d 100644
--- a/app/Designs/Designer.php
+++ b/app/Designs/Designer.php
@@ -57,7 +57,7 @@ class Designer {
{
$this->entity = $entity;
- $this->design = $design;
+ $this->design = $design->design;
$this->design_name = property_exists($design, 'name') ? lcfirst($design->name) : 'custom';
diff --git a/app/Http/Controllers/PreviewController.php b/app/Http/Controllers/PreviewController.php
index 8a6ae000eb34..bee326dc21b6 100644
--- a/app/Http/Controllers/PreviewController.php
+++ b/app/Http/Controllers/PreviewController.php
@@ -99,7 +99,7 @@ class PreviewController extends BaseController
if(!is_object($design_object))
return response()->json(['message' => 'Invalid custom design object'], 400);
- $invoice_design = new Custom($design_object->design->design);
+ $invoice_design = new Custom($design_object->design);
$entity = ucfirst(request()->input('entity'));
@@ -158,7 +158,7 @@ class PreviewController extends BaseController
if(!is_object($design_object))
return response()->json(['message' => 'Invalid custom design object'], 400);
- $invoice_design = new Custom($design_object->design->design);
+ $invoice_design = new Custom($design_object->design);
$designer = new Designer($invoice, $invoice_design, $invoice->client->getSetting('pdf_variables'), lcfirst(request()->has('entity')));
diff --git a/app/Http/Requests/Invoice/StoreInvoiceRequest.php b/app/Http/Requests/Invoice/StoreInvoiceRequest.php
index 03c13f258e14..a67de19d9854 100644
--- a/app/Http/Requests/Invoice/StoreInvoiceRequest.php
+++ b/app/Http/Requests/Invoice/StoreInvoiceRequest.php
@@ -45,7 +45,6 @@ class StoreInvoiceRequest extends Request
protected function prepareForValidation()
{
$input = $this->all();
-\Log::error(print_r($input,));
if(array_key_exists('design_id', $input) && is_string($input['design_id']))
$input['design_id'] = $this->decodePrimaryKey($input['design_id']);
diff --git a/app/Utils/Traits/MakesInvoiceValues.php b/app/Utils/Traits/MakesInvoiceValues.php
index bf7f75ff5285..2c8ad3dc8028 100644
--- a/app/Utils/Traits/MakesInvoiceValues.php
+++ b/app/Utils/Traits/MakesInvoiceValues.php
@@ -511,14 +511,14 @@ trait MakesInvoiceValues
/* Table Header */
//$table_header = '';
$column_headers = $this->transformColumnsForHeader($columns);
foreach ($column_headers as $column)
$table_header .= '';
- //$table_header .= '
';
+ $table_header .= '';
return $table_header;
diff --git a/tests/Integration/HtmlGenerationTest.php b/tests/Integration/HtmlGenerationTest.php
index adae010e4432..4cb977205e9f 100644
--- a/tests/Integration/HtmlGenerationTest.php
+++ b/tests/Integration/HtmlGenerationTest.php
@@ -32,8 +32,6 @@ class HtmlGenerationTest extends TestCase
$html = $this->generateEntityHtml($designer, $this->invoice);
- \Log::error($html);
-
$this->assertNotNull($html);
}