PDF Setup and Order PDF view

orders
Nisse Lommerde 2 months ago
parent 8e80ba9480
commit 08f0a99551

@ -1,3 +1,7 @@
https://github.com/spatie/laravel-pdf/discussions/90
for spatie/pdf stuff
<p align="center"><a href="https://laravel.com" target="_blank"><img src="https://raw.githubusercontent.com/laravel/art/master/logo-lockup/5%20SVG/2%20CMYK/1%20Full%20Color/laravel-logolockup-cmyk-red.svg" width="400" alt="Laravel Logo"></a></p>
<p align="center">

@ -16,6 +16,8 @@ use Illuminate\Foundation\Application;
use Illuminate\Http\Request;
use Illuminate\Support\Carbon;
use Illuminate\View\View;
use Spatie\Browsershot\Browsershot;
use Spatie\LaravelPdf\Facades\Pdf;
class OrderController extends Controller
{
@ -97,6 +99,7 @@ class OrderController extends Controller
'placement' => $request->get('placement')[$i],
'amount' => $request->get('amount')[$i],
'amount_price' => $request->get('amount_price')[$i],
'notes' => $request->get('service_notes')[$i],
]);
}
@ -116,5 +119,20 @@ class OrderController extends Controller
public function update(Request $request, $id) {}
public function destroy($id) {}
public function destroy(int $id): void {}
public function pdf(int $id)
{
$order = Order::find($id);
Pdf::view('pdf.order', ['order' => $order])
->withBrowsershot(function (Browsershot $browsershot) {
$browsershot->noSandbox();
})
->margins(8, 8, 15, 8)
->footerView('pdf.order-footer', ['order' => $order])
->save('order.pdf');
return redirect('order.pdf');
}
}

@ -11,6 +11,7 @@ use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Support\Carbon;
class Order extends Model
{
@ -30,6 +31,7 @@ class Order extends Model
'new_art',
'digitizing',
'repeat',
'event',
'purchased_garments',
'customer_supplied_file',
'notes',
@ -49,6 +51,16 @@ class Order extends Model
});
}
public function dueDatePdf(): string
{
return Carbon::createFromDate($this->due_date)->format('M d, Y');
}
public function orderDatePdf(): string
{
return Carbon::createFromDate($this->order_date)->format('M d, Y');
}
public function generateInternalPo(int $id): string
{
$po = str_pad(strval($id), 4, '0', STR_PAD_LEFT);

@ -20,6 +20,7 @@ class ProductService extends Model
'placement',
'amount',
'amount_price',
'notes',
];
/**

@ -9,7 +9,8 @@
"davidhsianturi/blade-bootstrap-icons": "^1.5",
"laravel/framework": "^11.9",
"laravel/tinker": "^2.9",
"livewire/livewire": "^3.5"
"livewire/livewire": "^3.5",
"spatie/laravel-pdf": "^1.5"
},
"require-dev": {
"fakerphp/faker": "^1.23",

276
composer.lock generated

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "364673414a3a1d429fd6bb98138661e6",
"content-hash": "837be2b0dd2a854686dc8a65f4e0a719",
"packages": [
{
"name": "blade-ui-kit/blade-icons",
@ -3327,6 +3327,280 @@
],
"time": "2024-04-27T21:32:50+00:00"
},
{
"name": "spatie/browsershot",
"version": "4.3.0",
"source": {
"type": "git",
"url": "https://github.com/spatie/browsershot.git",
"reference": "601f2758191d8c46b2ea587eea935a87da4f39e8"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/spatie/browsershot/zipball/601f2758191d8c46b2ea587eea935a87da4f39e8",
"reference": "601f2758191d8c46b2ea587eea935a87da4f39e8",
"shasum": ""
},
"require": {
"ext-fileinfo": "*",
"ext-json": "*",
"php": "^8.2",
"spatie/temporary-directory": "^2.0",
"symfony/process": "^6.0|^7.0"
},
"require-dev": {
"pestphp/pest": "^1.20",
"spatie/image": "^3.6",
"spatie/pdf-to-text": "^1.52",
"spatie/phpunit-snapshot-assertions": "^4.2.3"
},
"type": "library",
"autoload": {
"psr-4": {
"Spatie\\Browsershot\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Freek Van der Herten",
"email": "freek@spatie.be",
"homepage": "https://github.com/freekmurze",
"role": "Developer"
}
],
"description": "Convert a webpage to an image or pdf using headless Chrome",
"homepage": "https://github.com/spatie/browsershot",
"keywords": [
"chrome",
"convert",
"headless",
"image",
"pdf",
"puppeteer",
"screenshot",
"webpage"
],
"support": {
"source": "https://github.com/spatie/browsershot/tree/4.3.0"
},
"funding": [
{
"url": "https://github.com/spatie",
"type": "github"
}
],
"time": "2024-08-22T09:14:07+00:00"
},
{
"name": "spatie/laravel-package-tools",
"version": "1.16.5",
"source": {
"type": "git",
"url": "https://github.com/spatie/laravel-package-tools.git",
"reference": "c7413972cf22ffdff97b68499c22baa04eddb6a2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/spatie/laravel-package-tools/zipball/c7413972cf22ffdff97b68499c22baa04eddb6a2",
"reference": "c7413972cf22ffdff97b68499c22baa04eddb6a2",
"shasum": ""
},
"require": {
"illuminate/contracts": "^9.28|^10.0|^11.0",
"php": "^8.0"
},
"require-dev": {
"mockery/mockery": "^1.5",
"orchestra/testbench": "^7.7|^8.0",
"pestphp/pest": "^1.22",
"phpunit/phpunit": "^9.5.24",
"spatie/pest-plugin-test-time": "^1.1"
},
"type": "library",
"autoload": {
"psr-4": {
"Spatie\\LaravelPackageTools\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Freek Van der Herten",
"email": "freek@spatie.be",
"role": "Developer"
}
],
"description": "Tools for creating Laravel packages",
"homepage": "https://github.com/spatie/laravel-package-tools",
"keywords": [
"laravel-package-tools",
"spatie"
],
"support": {
"issues": "https://github.com/spatie/laravel-package-tools/issues",
"source": "https://github.com/spatie/laravel-package-tools/tree/1.16.5"
},
"funding": [
{
"url": "https://github.com/spatie",
"type": "github"
}
],
"time": "2024-08-27T18:56:10+00:00"
},
{
"name": "spatie/laravel-pdf",
"version": "1.5.2",
"source": {
"type": "git",
"url": "https://github.com/spatie/laravel-pdf.git",
"reference": "fadf23c6249c491fd4924f8ec37166a283269966"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/spatie/laravel-pdf/zipball/fadf23c6249c491fd4924f8ec37166a283269966",
"reference": "fadf23c6249c491fd4924f8ec37166a283269966",
"shasum": ""
},
"require": {
"illuminate/contracts": "^10.0|^11.0",
"php": "^8.2",
"spatie/browsershot": "^4.0",
"spatie/laravel-package-tools": "^1.16.1",
"spatie/temporary-directory": "^2.2.1"
},
"require-dev": {
"ext-imagick": "*",
"larastan/larastan": "^2.7.0",
"laravel/pint": "^1.13.7",
"nunomaduro/collision": "^7.10",
"orchestra/testbench": "^8.18",
"pestphp/pest": "^2.30",
"pestphp/pest-plugin-arch": "^2.5",
"pestphp/pest-plugin-laravel": "^2.2",
"phpstan/extension-installer": "^1.3.1",
"phpstan/phpstan-deprecation-rules": "^1.1.4",
"phpstan/phpstan-phpunit": "^1.3.15",
"spatie/image": "^3.3.2",
"spatie/laravel-ray": "^1.33",
"spatie/pdf-to-image": "^2.2",
"spatie/pdf-to-text": "^1.52.1",
"spatie/pest-expectations": "^1.5",
"spatie/pest-plugin-snapshots": "^2.1",
"spatie/pixelmatch-php": "^1.0",
"wnx/sidecar-browsershot": "^2.0"
},
"type": "library",
"extra": {
"laravel": {
"providers": [
"Spatie\\LaravelPdf\\PdfServiceProvider"
],
"aliases": {
"LaravelPdf": "Pdf"
}
}
},
"autoload": {
"files": [
"src/Support/functions.php"
],
"psr-4": {
"Spatie\\LaravelPdf\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Freek Van der Herten",
"email": "freek@spatie.be",
"role": "Developer"
}
],
"description": "Create PDFs in Laravel apps",
"homepage": "https://github.com/spatie/laravel-pdf",
"keywords": [
"laravel",
"laravel-pdf",
"spatie"
],
"support": {
"issues": "https://github.com/spatie/laravel-pdf/issues",
"source": "https://github.com/spatie/laravel-pdf/tree/1.5.2"
},
"time": "2024-07-16T07:42:10+00:00"
},
{
"name": "spatie/temporary-directory",
"version": "2.2.1",
"source": {
"type": "git",
"url": "https://github.com/spatie/temporary-directory.git",
"reference": "76949fa18f8e1a7f663fd2eaa1d00e0bcea0752a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/spatie/temporary-directory/zipball/76949fa18f8e1a7f663fd2eaa1d00e0bcea0752a",
"reference": "76949fa18f8e1a7f663fd2eaa1d00e0bcea0752a",
"shasum": ""
},
"require": {
"php": "^8.0"
},
"require-dev": {
"phpunit/phpunit": "^9.5"
},
"type": "library",
"autoload": {
"psr-4": {
"Spatie\\TemporaryDirectory\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Alex Vanderbist",
"email": "alex@spatie.be",
"homepage": "https://spatie.be",
"role": "Developer"
}
],
"description": "Easily create, use and destroy temporary directories",
"homepage": "https://github.com/spatie/temporary-directory",
"keywords": [
"php",
"spatie",
"temporary-directory"
],
"support": {
"issues": "https://github.com/spatie/temporary-directory/issues",
"source": "https://github.com/spatie/temporary-directory/tree/2.2.1"
},
"funding": [
{
"url": "https://spatie.be/open-source/support-us",
"type": "custom"
},
{
"url": "https://github.com/spatie",
"type": "github"
}
],
"time": "2023-12-25T11:46:58+00:00"
},
{
"name": "symfony/clock",
"version": "v7.1.1",

@ -24,8 +24,9 @@ class OrderFactory extends Factory
'order_type' => $this->faker->randomElement(OrderType::cases())->value,
'order_date' => $order_date,
'due_date' => $due_date,
'status' => $this->faker->randomELement(OrderStatus::cases())->value,
'status' => $this->faker->randomElement(OrderStatus::cases())->value,
'rush' => $this->faker->boolean(10),
'event' => $this->faker->boolean(),
'new_art' => $this->faker->boolean(),
'digitizing' => $this->faker->boolean(),
'repeat' => $this->faker->boolean(),

@ -19,6 +19,7 @@ class ProductServiceFactory extends Factory
'placement' => $this->faker->randomElement(['l/c', 'c/f', 'f/b', 'r/c']),
'amount' => $this->faker->randomNumber(1),
'amount_price' => 0,
'notes' => $this->faker->randomElement(['1) 1149 2) grey 3) white', '1) white', '1) black 2) white']),
];
}
}

@ -20,7 +20,6 @@ class ServiceFileFactory extends Factory
'width' => round($this->faker->randomFloat(2, 0, 10), 1),
'height' => round($this->faker->randomFloat(2, 0, 10), 1),
'unit' => 'inch',
'notes' => $this->faker->randomElement(['1) 1149 2) grey 3) white', '1) white', '1) black 2) white']),
];
}
}

@ -19,6 +19,7 @@ return new class extends Migration
$table->date('due_date');
$table->string('status');
$table->boolean('rush')->default(0);
$table->boolean('event')->default(0);
$table->boolean('new_art')->default(0);
$table->boolean('digitizing')->default(0);
$table->boolean('repeat')->default(0);

@ -16,6 +16,7 @@ return new class extends Migration
$table->string('placement');
$table->string('amount')->nullable();
$table->string('amount_price')->nullable();
$table->string('notes')->nullable();
$table->softDeletes();
$table->timestamps();
});

@ -16,7 +16,7 @@ return new class extends Migration
$table->decimal('height')->nullable();
$table->string('unit')->default('inch');
$table->integer('setup_number')->nullable();
$table->string('notes')->nullable();
// $table->string('notes')->nullable();
$table->softDeletes();
$table->timestamps();
});

@ -17,16 +17,17 @@ class CustomerSeeder extends Seeder
{
public function run(): void
{
for ($i = 0; $i < 10; $i++) {
for ($i = 0; $i < 5; $i++) {
Customer::factory()
->has(Contact::factory(rand(1, 5)))
->has(PackingSlip::factory(rand(1, 10)))
->has(ShippingEntry::factory(rand(1, 3)))
->has(Order::factory(rand(2, 10))
->has(Order::factory(rand(2, 20))
->has(OrderProduct::factory(rand(1, 10))
->has(productSize::factory(rand(1, 8))))
->has(ProductService::factory(rand(1, 10))
->for(ServiceFile::factory())))
->has(ProductService::factory(rand(1, 10), [
'service_file_id' => ServiceFile::factory(),
])))
->create();
}
@ -89,11 +90,12 @@ class CustomerSeeder extends Seeder
'notify' => 'Jane Wellman',
'notes' => 'Don\'t CC Kathlyn for SOF orders',
]))
->has(Order::factory(10)
->has(Order::factory(rand(2, 10))
->has(OrderProduct::factory(rand(1, 10))
->has(productSize::factory(rand(1, 8))))
->has(ProductService::factory(rand(1, 10))
->for(ServiceFile::factory())))
->has(ProductService::factory(rand(1, 10), [
'service_file_id' => ServiceFile::factory(),
])))
->create();
}
}

@ -1,7 +1,7 @@
services:
laravel.test:
build:
context: ./vendor/laravel/sail/runtimes/8.3
context: ./docker/8.3
dockerfile: Dockerfile
args:
WWWGROUP: '${WWWGROUP}'
@ -40,7 +40,7 @@ services:
MYSQL_ALLOW_EMPTY_PASSWORD: 1
volumes:
- 'sail-mysql:/var/lib/mysql'
- './vendor/laravel/sail/database/mysql/create-testing-database.sh:/docker-entrypoint-initdb.d/10-create-testing-database.sh'
- './docker/mysql/create-testing-database.sh:/docker-entrypoint-initdb.d/10-create-testing-database.sh'
networks:
- sail
healthcheck:

@ -0,0 +1,65 @@
FROM ubuntu:20.04
LABEL maintainer="Taylor Otwell"
ARG WWWGROUP
ARG NODE_VERSION=20
ARG POSTGRES_VERSION=13
WORKDIR /var/www/html
ENV DEBIAN_FRONTEND noninteractive
ENV TZ=UTC
ENV SUPERVISOR_PHP_COMMAND="/usr/bin/php -d variables_order=EGPCS /var/www/html/artisan serve --host=0.0.0.0 --port=80"
ENV SUPERVISOR_PHP_USER="sail"
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN apt-get update \
&& mkdir -p /etc/apt/keyrings \
&& apt-get install -y gnupg gosu curl ca-certificates zip unzip git supervisor sqlite3 libcap2-bin libpng-dev python2 dnsutils librsvg2-bin fswatch ffmpeg nano \
&& curl -sS 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x14aa40ec0831756756d7f66c4f4ea0aae5267a6c' | gpg --dearmor | tee /usr/share/keyrings/ppa_ondrej_php.gpg > /dev/null \
&& echo "deb [signed-by=/usr/share/keyrings/ppa_ondrej_php.gpg] https://ppa.launchpadcontent.net/ondrej/php/ubuntu focal main" > /etc/apt/sources.list.d/ppa_ondrej_php.list \
&& apt-get update \
&& apt-get install -y php8.0-cli php8.0-dev \
php8.0-pgsql php8.0-sqlite3 php8.0-gd php8.0-imagick \
php8.0-curl php8.0-memcached \
php8.0-imap php8.0-mysql php8.0-mbstring \
php8.0-xml php8.0-zip php8.0-bcmath php8.0-soap \
php8.0-intl php8.0-readline php8.0-pcov \
php8.0-msgpack php8.0-igbinary php8.0-ldap \
php8.0-redis php8.0-swoole php8.0-xdebug \
&& curl -sLS https://getcomposer.org/installer | php -- --install-dir=/usr/bin/ --filename=composer \
&& curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
&& echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_VERSION.x nodistro main" > /etc/apt/sources.list.d/nodesource.list \
&& apt-get update \
&& apt-get install -y nodejs \
&& npm install -g npm \
&& npm install -g bun \
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | tee /usr/share/keyrings/yarnkey.gpg >/dev/null \
&& echo "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \
&& curl -sS https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor | tee /usr/share/keyrings/pgdg.gpg >/dev/null \
&& echo "deb [signed-by=/usr/share/keyrings/pgdg.gpg] http://apt.postgresql.org/pub/repos/apt focal-pgdg main" > /etc/apt/sources.list.d/pgdg.list \
&& apt-get update \
&& apt-get install -y yarn \
&& apt-get install -y mysql-client \
&& apt-get install -y postgresql-client-$POSTGRES_VERSION \
&& apt-get -y autoremove \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN update-alternatives --set php /usr/bin/php8.0
RUN setcap "cap_net_bind_service=+ep" /usr/bin/php8.0
RUN groupadd --force -g $WWWGROUP sail
RUN useradd -ms /bin/bash --no-user-group -g $WWWGROUP -u 1337 sail
COPY start-container /usr/local/bin/start-container
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
COPY php.ini /etc/php/8.0/cli/conf.d/99-sail.ini
RUN chmod +x /usr/local/bin/start-container
EXPOSE 80/tcp
ENTRYPOINT ["start-container"]

@ -0,0 +1,5 @@
[PHP]
post_max_size = 100M
upload_max_filesize = 100M
variables_order = EGPCS
pcov.directory = .

@ -0,0 +1,26 @@
#!/usr/bin/env bash
if [ "$SUPERVISOR_PHP_USER" != "root" ] && [ "$SUPERVISOR_PHP_USER" != "sail" ]; then
echo "You should set SUPERVISOR_PHP_USER to either 'sail' or 'root'."
exit 1
fi
if [ ! -z "$WWWUSER" ]; then
usermod -u $WWWUSER sail
fi
if [ ! -d /.composer ]; then
mkdir /.composer
fi
chmod -R ugo+rw /.composer
if [ $# -gt 0 ]; then
if [ "$SUPERVISOR_PHP_USER" = "root" ]; then
exec "$@"
else
exec gosu $WWWUSER "$@"
fi
else
exec /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf
fi

@ -0,0 +1,14 @@
[supervisord]
nodaemon=true
user=root
logfile=/var/log/supervisor/supervisord.log
pidfile=/var/run/supervisord.pid
[program:php]
command=%(ENV_SUPERVISOR_PHP_COMMAND)s
user=%(ENV_SUPERVISOR_PHP_USER)s
environment=LARAVEL_SAIL="1"
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0

@ -0,0 +1,64 @@
FROM ubuntu:22.04
LABEL maintainer="Taylor Otwell"
ARG WWWGROUP
ARG NODE_VERSION=20
ARG POSTGRES_VERSION=15
WORKDIR /var/www/html
ENV DEBIAN_FRONTEND noninteractive
ENV TZ=UTC
ENV SUPERVISOR_PHP_COMMAND="/usr/bin/php -d variables_order=EGPCS /var/www/html/artisan serve --host=0.0.0.0 --port=80"
ENV SUPERVISOR_PHP_USER="sail"
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN apt-get update \
&& mkdir -p /etc/apt/keyrings \
&& apt-get install -y gnupg gosu curl ca-certificates zip unzip git supervisor sqlite3 libcap2-bin libpng-dev python2 dnsutils librsvg2-bin fswatch ffmpeg nano \
&& curl -sS 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x14aa40ec0831756756d7f66c4f4ea0aae5267a6c' | gpg --dearmor | tee /usr/share/keyrings/ppa_ondrej_php.gpg > /dev/null \
&& echo "deb [signed-by=/usr/share/keyrings/ppa_ondrej_php.gpg] https://ppa.launchpadcontent.net/ondrej/php/ubuntu jammy main" > /etc/apt/sources.list.d/ppa_ondrej_php.list \
&& apt-get update \
&& apt-get install -y php8.1-cli php8.1-dev \
php8.1-pgsql php8.1-sqlite3 php8.1-gd php8.1-imagick \
php8.1-curl \
php8.1-imap php8.1-mysql php8.1-mbstring \
php8.1-xml php8.1-zip php8.1-bcmath php8.1-soap \
php8.1-intl php8.1-readline \
php8.1-ldap \
php8.1-msgpack php8.1-igbinary php8.1-redis php8.1-swoole \
php8.1-memcached php8.1-pcov php8.1-xdebug \
&& curl -sLS https://getcomposer.org/installer | php -- --install-dir=/usr/bin/ --filename=composer \
&& curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
&& echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_VERSION.x nodistro main" > /etc/apt/sources.list.d/nodesource.list \
&& apt-get update \
&& apt-get install -y nodejs \
&& npm install -g npm \
&& npm install -g bun \
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | tee /usr/share/keyrings/yarn.gpg >/dev/null \
&& echo "deb [signed-by=/usr/share/keyrings/yarn.gpg] https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \
&& curl -sS https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor | tee /usr/share/keyrings/pgdg.gpg >/dev/null \
&& echo "deb [signed-by=/usr/share/keyrings/pgdg.gpg] http://apt.postgresql.org/pub/repos/apt jammy-pgdg main" > /etc/apt/sources.list.d/pgdg.list \
&& apt-get update \
&& apt-get install -y yarn \
&& apt-get install -y mysql-client \
&& apt-get install -y postgresql-client-$POSTGRES_VERSION \
&& apt-get -y autoremove \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN setcap "cap_net_bind_service=+ep" /usr/bin/php8.1
RUN groupadd --force -g $WWWGROUP sail
RUN useradd -ms /bin/bash --no-user-group -g $WWWGROUP -u 1337 sail
COPY start-container /usr/local/bin/start-container
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
COPY php.ini /etc/php/8.1/cli/conf.d/99-sail.ini
RUN chmod +x /usr/local/bin/start-container
EXPOSE 80/tcp
ENTRYPOINT ["start-container"]

@ -0,0 +1,5 @@
[PHP]
post_max_size = 100M
upload_max_filesize = 100M
variables_order = EGPCS
pcov.directory = .

@ -0,0 +1,26 @@
#!/usr/bin/env bash
if [ "$SUPERVISOR_PHP_USER" != "root" ] && [ "$SUPERVISOR_PHP_USER" != "sail" ]; then
echo "You should set SUPERVISOR_PHP_USER to either 'sail' or 'root'."
exit 1
fi
if [ ! -z "$WWWUSER" ]; then
usermod -u $WWWUSER sail
fi
if [ ! -d /.composer ]; then
mkdir /.composer
fi
chmod -R ugo+rw /.composer
if [ $# -gt 0 ]; then
if [ "$SUPERVISOR_PHP_USER" = "root" ]; then
exec "$@"
else
exec gosu $WWWUSER "$@"
fi
else
exec /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf
fi

@ -0,0 +1,14 @@
[supervisord]
nodaemon=true
user=root
logfile=/var/log/supervisor/supervisord.log
pidfile=/var/run/supervisord.pid
[program:php]
command=%(ENV_SUPERVISOR_PHP_COMMAND)s
user=%(ENV_SUPERVISOR_PHP_USER)s
environment=LARAVEL_SAIL="1"
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0

@ -0,0 +1,70 @@
FROM ubuntu:22.04
LABEL maintainer="Taylor Otwell"
ARG WWWGROUP
ARG NODE_VERSION=20
ARG POSTGRES_VERSION=15
WORKDIR /var/www/html
ENV DEBIAN_FRONTEND noninteractive
ENV TZ=UTC
ENV SUPERVISOR_PHP_COMMAND="/usr/bin/php -d variables_order=EGPCS /var/www/html/artisan serve --host=0.0.0.0 --port=80"
ENV SUPERVISOR_PHP_USER="sail"
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN apt-get update \
&& mkdir -p /etc/apt/keyrings \
&& apt-get install -y gnupg gosu curl ca-certificates zip unzip git supervisor sqlite3 libcap2-bin libpng-dev python2 dnsutils librsvg2-bin fswatch ffmpeg nano \
&& curl -sS 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x14aa40ec0831756756d7f66c4f4ea0aae5267a6c' | gpg --dearmor | tee /etc/apt/keyrings/ppa_ondrej_php.gpg > /dev/null \
&& echo "deb [signed-by=/etc/apt/keyrings/ppa_ondrej_php.gpg] https://ppa.launchpadcontent.net/ondrej/php/ubuntu jammy main" > /etc/apt/sources.list.d/ppa_ondrej_php.list \
&& apt-get update \
&& apt-get install -y php8.2-cli php8.2-dev \
php8.2-pgsql php8.2-sqlite3 php8.2-gd php8.2-imagick \
php8.2-curl \
php8.2-imap php8.2-mysql php8.2-mbstring \
php8.2-xml php8.2-zip php8.2-bcmath php8.2-soap \
php8.2-intl php8.2-readline \
php8.2-ldap \
php8.2-msgpack php8.2-igbinary php8.2-redis php8.2-swoole \
php8.2-memcached php8.2-pcov php8.2-xdebug \
&& curl -sLS https://getcomposer.org/installer | php -- --install-dir=/usr/bin/ --filename=composer \
&& curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
&& echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_VERSION.x nodistro main" > /etc/apt/sources.list.d/nodesource.list \
&& apt-get update \
&& apt-get install -y nodejs \
&& npm install -g npm \
&& npm install -g pnpm \
&& npm install -g bun \
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | tee /etc/apt/keyrings/yarn.gpg >/dev/null \
&& echo "deb [signed-by=/etc/apt/keyrings/yarn.gpg] https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \
&& curl -sS https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor | tee /etc/apt/keyrings/pgdg.gpg >/dev/null \
&& echo "deb [signed-by=/etc/apt/keyrings/pgdg.gpg] http://apt.postgresql.org/pub/repos/apt jammy-pgdg main" > /etc/apt/sources.list.d/pgdg.list \
&& apt-get update \
&& apt-get install -y yarn \
&& apt-get install -y mysql-client \
&& apt-get install -y postgresql-client-$POSTGRES_VERSION \
&& apt-get -y autoremove \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN setcap "cap_net_bind_service=+ep" /usr/bin/php8.2
RUN groupadd --force -g $WWWGROUP sail
RUN useradd -ms /bin/bash --no-user-group -g $WWWGROUP -u 1337 sail
COPY start-container /usr/local/bin/start-container
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
COPY php.ini /etc/php/8.2/cli/conf.d/99-sail.ini
RUN chmod +x /usr/local/bin/start-container
RUN apt-get update \
&& apt-get install -y gconf-service libasound2 libappindicator3-1 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgbm1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget libgbm-dev libatk-bridge2.0-0 \
&& npm install --global --unsafe-perm puppeteer \
&& chmod -R o+rx /usr/lib/node_modules/puppeteer/.local-chromium
EXPOSE 80/tcp
ENTRYPOINT ["start-container"]

@ -0,0 +1,5 @@
[PHP]
post_max_size = 100M
upload_max_filesize = 100M
variables_order = EGPCS
pcov.directory = .

@ -0,0 +1,26 @@
#!/usr/bin/env bash
if [ "$SUPERVISOR_PHP_USER" != "root" ] && [ "$SUPERVISOR_PHP_USER" != "sail" ]; then
echo "You should set SUPERVISOR_PHP_USER to either 'sail' or 'root'."
exit 1
fi
if [ ! -z "$WWWUSER" ]; then
usermod -u $WWWUSER sail
fi
if [ ! -d /.composer ]; then
mkdir /.composer
fi
chmod -R ugo+rw /.composer
if [ $# -gt 0 ]; then
if [ "$SUPERVISOR_PHP_USER" = "root" ]; then
exec "$@"
else
exec gosu $WWWUSER "$@"
fi
else
exec /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf
fi

@ -0,0 +1,14 @@
[supervisord]
nodaemon=true
user=root
logfile=/var/log/supervisor/supervisord.log
pidfile=/var/run/supervisord.pid
[program:php]
command=%(ENV_SUPERVISOR_PHP_COMMAND)s
user=%(ENV_SUPERVISOR_PHP_USER)s
environment=LARAVEL_SAIL="1"
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0

@ -0,0 +1,75 @@
FROM ubuntu:22.04
LABEL maintainer="Taylor Otwell"
ARG WWWGROUP
ARG NODE_VERSION=20
ARG MYSQL_CLIENT="mysql-client"
ARG POSTGRES_VERSION=15
WORKDIR /var/www/html
ENV DEBIAN_FRONTEND noninteractive
ENV TZ=UTC
ENV SUPERVISOR_PHP_COMMAND="/usr/bin/php -d variables_order=EGPCS /var/www/html/artisan serve --host=0.0.0.0 --port=80"
ENV SUPERVISOR_PHP_USER="sail"
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN apt-get update \
&& mkdir -p /etc/apt/keyrings \
&& apt-get install -y gnupg gosu curl ca-certificates zip unzip git supervisor sqlite3 libcap2-bin libpng-dev python2 dnsutils librsvg2-bin fswatch ffmpeg nano \
&& curl -sS 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x14aa40ec0831756756d7f66c4f4ea0aae5267a6c' | gpg --dearmor | tee /etc/apt/keyrings/ppa_ondrej_php.gpg > /dev/null \
&& echo "deb [signed-by=/etc/apt/keyrings/ppa_ondrej_php.gpg] https://ppa.launchpadcontent.net/ondrej/php/ubuntu jammy main" > /etc/apt/sources.list.d/ppa_ondrej_php.list \
&& apt-get update \
&& apt-get install -y php8.3-cli php8.3-dev \
php8.3-pgsql php8.3-sqlite3 php8.3-gd \
php8.3-curl \
php8.3-imap php8.3-mysql php8.3-mbstring \
php8.3-xml php8.3-zip php8.3-bcmath php8.3-soap \
php8.3-intl php8.3-readline \
php8.3-ldap \
php8.3-msgpack php8.3-igbinary php8.3-redis php8.3-swoole \
php8.3-memcached php8.3-pcov php8.3-imagick php8.3-xdebug \
&& curl -sLS https://getcomposer.org/installer | php -- --install-dir=/usr/bin/ --filename=composer \
&& curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
&& echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_VERSION.x nodistro main" > /etc/apt/sources.list.d/nodesource.list \
&& apt-get update \
&& apt-get install -y nodejs \
&& npm install -g npm \
&& npm install -g pnpm \
&& npm install -g bun \
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | tee /etc/apt/keyrings/yarn.gpg >/dev/null \
&& echo "deb [signed-by=/etc/apt/keyrings/yarn.gpg] https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \
&& curl -sS https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor | tee /etc/apt/keyrings/pgdg.gpg >/dev/null \
&& echo "deb [signed-by=/etc/apt/keyrings/pgdg.gpg] http://apt.postgresql.org/pub/repos/apt jammy-pgdg main" > /etc/apt/sources.list.d/pgdg.list \
&& apt-get update \
&& apt-get install -y yarn \
&& apt-get install -y $MYSQL_CLIENT \
&& apt-get install -y postgresql-client-$POSTGRES_VERSION \
&& apt-get -y autoremove \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN setcap "cap_net_bind_service=+ep" /usr/bin/php8.3
RUN groupadd --force -g $WWWGROUP sail
RUN useradd -ms /bin/bash --no-user-group -g $WWWGROUP -u 1337 sail
COPY start-container /usr/local/bin/start-container
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
COPY php.ini /etc/php/8.3/cli/conf.d/99-sail.ini
RUN chmod +x /usr/local/bin/start-container
RUN npx puppeteer browsers install chrome \
&& mkdir /home/sail/.cache \
&& mv /root/.cache/puppeteer /home/sail/.cache \
&& apt-get update \
&& apt-get install -y ca-certificates fonts-liberation libappindicator3-1 libasound2 libatk-bridge2.0-0 libatk1.0-0 \
libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgbm1 libgcc1 libglib2.0-0 libgtk-3-0 libnspr4 libnss3 libpango-1.0-0 \
libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 \
libxrender1 libxss1 libxtst6 lsb-release wget xdg-utils
EXPOSE 80/tcp
ENTRYPOINT ["start-container"]

@ -0,0 +1,5 @@
[PHP]
post_max_size = 100M
upload_max_filesize = 100M
variables_order = EGPCS
pcov.directory = .

@ -0,0 +1,26 @@
#!/usr/bin/env bash
if [ "$SUPERVISOR_PHP_USER" != "root" ] && [ "$SUPERVISOR_PHP_USER" != "sail" ]; then
echo "You should set SUPERVISOR_PHP_USER to either 'sail' or 'root'."
exit 1
fi
if [ ! -z "$WWWUSER" ]; then
usermod -u $WWWUSER sail
fi
if [ ! -d /.composer ]; then
mkdir /.composer
fi
chmod -R ugo+rw /.composer
if [ $# -gt 0 ]; then
if [ "$SUPERVISOR_PHP_USER" = "root" ]; then
exec "$@"
else
exec gosu $WWWUSER "$@"
fi
else
exec /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf
fi

@ -0,0 +1,14 @@
[supervisord]
nodaemon=true
user=root
logfile=/var/log/supervisor/supervisord.log
pidfile=/var/run/supervisord.pid
[program:php]
command=%(ENV_SUPERVISOR_PHP_COMMAND)s
user=%(ENV_SUPERVISOR_PHP_USER)s
environment=LARAVEL_SAIL="1"
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0

@ -0,0 +1,6 @@
#!/usr/bin/env bash
/usr/bin/mariadb --user=root --password="$MYSQL_ROOT_PASSWORD" <<-EOSQL
CREATE DATABASE IF NOT EXISTS testing;
GRANT ALL PRIVILEGES ON \`testing%\`.* TO '$MYSQL_USER'@'%';
EOSQL

@ -0,0 +1,6 @@
#!/usr/bin/env bash
mysql --user=root --password="$MYSQL_ROOT_PASSWORD" <<-EOSQL
CREATE DATABASE IF NOT EXISTS testing;
GRANT ALL PRIVILEGES ON \`testing%\`.* TO '$MYSQL_USER'@'%';
EOSQL

@ -0,0 +1,2 @@
SELECT 'CREATE DATABASE testing'
WHERE NOT EXISTS (SELECT FROM pg_database WHERE datname = 'testing')\gexec

1299
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -14,6 +14,7 @@
"vite": "^5.0"
},
"dependencies": {
"bootstrap-icons": "^1.11.3"
"bootstrap-icons": "^1.11.3",
"puppeteer": "^23.4.0"
}
}

Binary file not shown.

@ -16,7 +16,6 @@
<!-- Scripts -->
@vite(['resources/sass/app.scss', 'resources/js/app.js'])
{{-- @livewireStyles--}}
</head>
<body>
<div id="app">
@ -28,6 +27,5 @@
</main>
</div>
{{--@livewireScripts--}}
</body>
</html>

@ -0,0 +1,7 @@
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"
integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz"
crossorigin="anonymous"></script>
@yield('content')

@ -277,11 +277,11 @@
</div>
<div class="col-9 px-1">
<textarea name="contents[]" id="contents_{{$key}}" style="resize: none" rows="2"
<textarea name="service_notes[]" id="contents_{{$key}}" style="resize: none" rows="2"
class="form-control form-control-sm"
placeholder="Thread colors"
wire:change="determineAddServiceProductRow({{$loop->index}})"
>{{ old('contents') }}</textarea>
>{{ old('service_notes') }}</textarea>
</div>
</div>
</div>

@ -72,6 +72,17 @@
<div class="col-11 col-xl-4 border-end">
<div class="row mb-3">
<div class="col">
<a href="{{route('orders.pdf', $order)}}" target="_blank" class="btn btn-primary">
<x-bi-printer-fill/>
Print Order
</a>
</div>
<div class="col"></div>
<div class="col"></div>
</div>
<div class="row ">
<label for="company_name" class="col-5 py-0 col-form-label text-md-end">Customer</label>
<div class="col-md-6">
@ -124,7 +135,7 @@
<div class="row py-0 ">
<label for="customer_po" class="col-5 py-0 col-form-label text-md-end">Customer PO</label>
<div class="col-md-6">
<code>{{$order->customer_po}}</code>
<code class="text-primary">{{$order->customer_po}}</code>
</div>
</div>
@ -205,13 +216,14 @@
<hr class="border-secondary-subtle px-0">
<div class="row mb-2">
<div class="row mb-3">
<label for="notes" class="col-5 py-0 col-form-label text-md-end">Notes</label>
<div class="col-6">
{{$order->notes}}
</div>
</div>
</div>
<div class="col-xl-7">
@ -379,7 +391,7 @@
</div>
<div class="col-9 px-1">
{{$service->serviceFile->notes}}
{{$service->notes}}
</div>
</div>
</div>

@ -0,0 +1,10 @@
<style>
* {
font-size: 12px;
margin: 10px 5px;
}
</style>
<footer>
{{$order->internal_po}}, page @pageNumber of @totalPages
</footer>'

@ -0,0 +1,236 @@
@extends('layouts.pdf')
<div class="container-fluid ">
<div class="">
{{-- First row of header--}}
<div class="row d-flex align-items-center">
<div class="col-4 align-self-center">
<div class="fs-3 fw-bold">TOP NOTCH</div>
</div>
<div class="col-4 text-center">
<div class="bg-info text-white">
<div class="fs-3 fw-bold">{{$order->order_type}}</div>
</div>
</div>
<div class="col-4 text-end d-flex flex-row-reverse gap-2">
<div class="text-decoration-underline">
{{$order->orderDatePdf()}}
</div>
<div>
Order Date:
</div>
</div>
</div>
{{-- 2nd row of header --}}
<div class="row mt-1 d-flex align-items-center">
<div class="col-4 fst-italic">
<div class="fs-3">Order Form</div>
</div>
<div class="col-4 text-center">
<div class="row gap-1">
<div class="col bg-danger text-white @if(!$order->rush) opacity-0 @endif">
<div class="fs-3"> RUSH</div>
</div>
<div class="col bg-warning text-white @if(!$order->event) opacity-0 @endif">
<div class="fs-3"> Event</div>
</div>
</div>
</div>
<div class="col-4 text-end d-flex flex-row-reverse gap-2 text-nowrap">
<div class="text-decoration-underline">
{{$order->dueDatePdf()}}
</div>
<div>
Date Required:
</div>
</div>
</div>
<hr class="border-black border-1 opacity-100 mt-2">
<!-- Company Name and New Art/Repeat Row -->
<div class="row">
<div class="col d-inline-flex gap-1 border-bottom">
<div class="fs-4">
{{$order->customer->company_name}}
</div>
</div>
<div class="col d-inline-flex align-items-end gap-3 justify-content-end">
<div class="d-inline-flex gap-2">
<div class="h-auto">
<div class="border border-1 border-opacity-50 mt-1">
<div class="@if(!$order->new_art) opacity-0 @endif">
<x-bi-check/>
</div>
</div>
</div>
<div>New Art</div>
</div>
<div class="d-inline-flex gap-2">
<div class="h-auto">
<div class="border border-1 border-opacity-50 mt-1">
<div class="@if(!$order->repeat) opacity-0 @endif">
<x-bi-check/>
</div>
</div>
</div>
<div>Repeat</div>
</div>
<div class="d-inline-flex gap-2">
<div class="h-auto">
<div class="border border-1 border-opacity-50 mt-1">
<div class="@if(!$order->digitizing) opacity-0 @endif">
<x-bi-check/>
</div>
</div>
</div>
<div>Digitizing</div>
</div>
</div>
</div>
<!-- PO and purchased gaerments row -->
<div class="row mt-3">
<div class="col-8 d-inline-flex gap-1 border-bottom">
<div class="fs-6">
PO#
</div>
<div class="fs-6 text-info">
{{$order->customer_po}}
</div>
</div>
<div class="col-4 d-inline-flex align-items-start gap-3 justify-content-end">
<div class="d-inline-flex gap-2">
<div class="h-auto">
<div class="border border-1 border-opacity-50 mt-1">
<div class="@if(!$order->purchased_garments) opacity-0 @endif">
<x-bi-check/>
</div>
</div>
</div>
<div>Purchased Garments</div>
</div>
</div>
</div>
<!-- Products Table -->
<div class="row mt-4">
<table class="table table-striped" style="font-size: 11px;">
<thead class="opacity-50 fw-normal">
<th>SKU</th>
<th>Product Name</th>
<th>Color</th>
<th>XS</th>
<th>S</th>
<th>M</th>
<th>L</th>
<th>XL</th>
<th>2XL</th>
<th>3XL</th>
<th>OSFA</th>
<th>Total</th>
</thead>
<tbody>
@foreach($order->orderProducts as $product)
<tr>
<td><code>{{$product->sku}}</code></td>
<td class="text-uppercase">{{$product->product_name}}</td>
<td class="text-uppercase">{{$product->color}}</td>
<td style="width: 40px;">{{$product->productSizes()->get()->where('size', 'xs')->first()->amount ?? ''}}</td>
<td style="width: 40px;">{{$product->productSizes()->get()->where('size', 's')->first()->amount ?? ''}}</td>
<td style="width: 40px;">{{$product->productSizes()->get()->where('size', 'm')->first()->amount ?? ''}}</td>
<td style="width: 40px;">{{$product->productSizes()->get()->where('size', 'l')->first()->amount ?? ''}}</td>
<td style="width: 40px;">{{$product->productSizes()->get()->where('size', 'xl')->first()->amount ?? ''}}</td>
<td style="width: 40px;">{{$product->productSizes()->get()->where('size', '2xl')->first()->amount ?? ''}}</td>
<td style="width: 40px;">{{$product->productSizes()->get()->where('size', '3xl')->first()->amount ?? ''}}</td>
<td style="width: 40px;">{{$product->productSizes()->get()->where('size', 'osfa')->first()->amount ?? ''}}</td>
<td style="width: 40px;">{{$product->totalQuantity()}}</td>
</tr>
@endforeach
</tbody>
</table>
</div>
<div class="row mt-3 text-end" style="font-size: 11px">
<div class="col">
TOTAL QUANTITY: {{$order->totalProductQuantity()}}
</div>
</div>
<!-- Services Table -->
<div class="row mt-3">
<table class="table table-striped" style="font-size: 11px;">
<thead class="opacity-50 fw-normal">
<th>Placement & Service</th>
<th class="w-50">Logo Name & Instructions</th>
<th>Width</th>
<th>Height</th>
<th>QTY</th>
</thead>
<tbody>
@foreach($order->productServices as $service)
<tr>
<td>
<div class="text-uppercase fw-bold">
{{$service->placement}}
</div>
<br>
<div class="text-uppercase">
<code style="font-size: 11px">
{{$service->serviceFile->code}}
</code>
</div>
</td>
<td>
<div class="text-uppercase">
{{$service->serviceFile->name}}
</div>
<br>
<div class="text-uppercase">
{{$service->notes}}
</div>
</td>
<td>
{{$service->serviceFile->width}}
</td>
<td>
{{$service->serviceFile->height}}
</td>
<td>
{{$service->amount}}
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
<div class="row mt-3">
{{$order->notes}}
</div>
</div>
</div>

@ -37,3 +37,4 @@ Route::resource('packing-slips', PackingSlipController::class);
Route::resource('shipping-entries', ShippingEntryController::class);
Route::resource('orders', OrderController::class);
Route::get('orders/{order}/pdf', [OrderController::class, 'pdf'])->name('orders.pdf');

Loading…
Cancel
Save