diff --git a/app/Http/Livewire/PdfSlot.php b/app/Http/Livewire/PdfSlot.php index c0f29b517a00..dc4372f12340 100644 --- a/app/Http/Livewire/PdfSlot.php +++ b/app/Http/Livewire/PdfSlot.php @@ -20,12 +20,8 @@ use Illuminate\Support\Str; use App\Models\QuoteInvitation; use App\Utils\VendorHtmlEngine; use App\Models\CreditInvitation; -use App\Services\Pdf\PdfBuilder; -use App\Services\Pdf\PdfService; use App\Models\InvoiceInvitation; -use App\Services\Pdf\PdfDesigner; use Illuminate\Support\Facades\Cache; -use App\Services\Pdf\PdfConfiguration; use App\Models\PurchaseOrderInvitation; use App\Models\RecurringInvoiceInvitation; use App\Jobs\Vendor\CreatePurchaseOrderPdf; @@ -52,6 +48,8 @@ class PdfSlot extends Component public $show_quantity = true; + public $show_line_total = true; + public $route_entity = 'client'; public function mount() @@ -104,11 +102,12 @@ class PdfSlot extends Component $this->settings = $this->entity->client ? $this->entity->client->getMergedSettings() : $this->entity->company->settings; $this->show_cost = in_array('$product.unit_cost', $this->settings->pdf_variables->product_columns); - $this->show_quantity = in_array('$product.quantity', $this->settings->pdf_variables->product_columns); + $this->show_line_total = in_array('$product.line_total', $this->settings->pdf_variables->product_columns); if($this->entity_type == 'quote' && !$this->settings->sync_invoice_quote_columns ){ $this->show_cost = in_array('$product.unit_cost', $this->settings->pdf_variables->product_quote_columns); $this->show_quantity = in_array('$product.quantity', $this->settings->pdf_variables->product_quote_columns); + $this->show_line_total = in_array('$product.line_total', $this->settings->pdf_variables->product_quote_columns); } $this->html_variables = $this->entity->client ? diff --git a/app/Transformers/TaskTransformer.php b/app/Transformers/TaskTransformer.php index 60949c0b1609..503ec0612799 100644 --- a/app/Transformers/TaskTransformer.php +++ b/app/Transformers/TaskTransformer.php @@ -130,7 +130,7 @@ class TaskTransformer extends EntityTransformer 'status_sort_order' => (int) $task->status_sort_order, //deprecated 5.0.34 'is_date_based' => (bool) $task->is_date_based, 'status_order' => is_null($task->status_order) ? null : (int) $task->status_order, - 'calculated_start_date' => $task->calculated_start_date ?: '', + 'date' => $task->calculated_start_date ?: '', ]; } } diff --git a/resources/views/portal/ninja2020/components/html-viewer.blade.php b/resources/views/portal/ninja2020/components/html-viewer.blade.php index e471ed24fa57..d630d3240959 100644 --- a/resources/views/portal/ninja2020/components/html-viewer.blade.php +++ b/resources/views/portal/ninja2020/components/html-viewer.blade.php @@ -90,7 +90,12 @@ span { - {{ $product['line_total'] }} + + + @if($show_line_total) + {{ $product['line_total'] }} + @endif + @endforeach