From 95abaa78a39e812dbc80094464b446e9c2d1285d Mon Sep 17 00:00:00 2001 From: Nisse Lommerde Date: Sun, 13 Apr 2025 10:59:12 -0400 Subject: [PATCH] Small cleanups --- app/Models/ProductService.php | 1 - .../012_create_product_services_table.php | 1 - .../migrations/013_create_service_files_table.php | 1 - resources/views/pdf/order.blade.php | 14 +++++++------- 4 files changed, 7 insertions(+), 10 deletions(-) diff --git a/app/Models/ProductService.php b/app/Models/ProductService.php index 35157d3..811263a 100644 --- a/app/Models/ProductService.php +++ b/app/Models/ProductService.php @@ -26,7 +26,6 @@ class ProductService extends Model 'amount', 'amount_price', 'notes', - 'size_unit', ]; protected $appends = [ diff --git a/database/migrations/012_create_product_services_table.php b/database/migrations/012_create_product_services_table.php index 1077d04..efc9fc3 100644 --- a/database/migrations/012_create_product_services_table.php +++ b/database/migrations/012_create_product_services_table.php @@ -15,7 +15,6 @@ public function up(): void $table->foreignId('service_file_id')->nullable(); $table->foreignId('service_type_id')->nullable(); - // $table->string('service_type')->nullable(); $table->string('placement')->nullable(); $table->string('amount')->nullable(); $table->string('amount_price')->nullable(); diff --git a/database/migrations/013_create_service_files_table.php b/database/migrations/013_create_service_files_table.php index f156ad4..8117038 100644 --- a/database/migrations/013_create_service_files_table.php +++ b/database/migrations/013_create_service_files_table.php @@ -16,7 +16,6 @@ public function up(): void $table->decimal('height')->nullable(); $table->string('unit')->default('inch'); $table->integer('setup_number')->nullable(); - // $table->string('notes')->nullable(); $table->softDeletes(); $table->timestamps(); }); diff --git a/resources/views/pdf/order.blade.php b/resources/views/pdf/order.blade.php index ef159e1..b8b0f33 100644 --- a/resources/views/pdf/order.blade.php +++ b/resources/views/pdf/order.blade.php @@ -156,8 +156,8 @@ @foreach($order->orderProducts as $product) {{$product->sku}} - {{$product->product_name}} - {{$product->color}} + {{$product->product_name ?? ''}} + {{$product->color ?? ''}} {{$product->productSizes()->get()->where('size', 'xs')->first()->amount ?? ''}} {{$product->productSizes()->get()->where('size', 's')->first()->amount ?? ''}} {{$product->productSizes()->get()->where('size', 'm')->first()->amount ?? ''}} @@ -176,7 +176,7 @@
- TOTAL QUANTITY: {{$order->totalProductQuantity}} + TOTAL QUANTITY: {{$order->totalProductQuantity ?? ''}}
@@ -199,7 +199,7 @@
- {{$service->placement}} + {{$service->placement ?? ''}}

@@ -221,13 +221,13 @@ {{$service->serviceFile->width}} - {{$service->serviceFile->height}} + {{$service->serviceFile->height ?? ''}} - {{$service->serviceFile->size_unit}} + {{$service->serviceFile->size_unit ?? ''}} - {{$service->amount}} + {{$service->amount ?? ''}}