diff --git a/app/Console/Commands/SetupDevEnvironment.php b/app/Console/Commands/SetupDevEnvironment.php index 56c7e775..a333e8e5 100644 --- a/app/Console/Commands/SetupDevEnvironment.php +++ b/app/Console/Commands/SetupDevEnvironment.php @@ -5,18 +5,19 @@ namespace App\Console\Commands; use App\Models\File; use App\Models\Folder; use App\Models\Share; -use App\Services\HelperService; use App\Services\Oasis\OasisDevService; use App\Services\SetupService; use App\Models\Setting; use App\Models\User; use Illuminate\Console\Command; -use Faker; +use Illuminate\Foundation\Testing\WithFaker; use Illuminate\Support\Facades\Storage; use Illuminate\Support\Str; class SetupDevEnvironment extends Command { + use WithFaker; + /** * The name and signature of the console command. * @@ -37,7 +38,7 @@ class SetupDevEnvironment extends Command public function __construct() { parent::__construct(); - $this->faker = Faker\Factory::create(); + $this->setUpFaker(); $this->setup = resolve(SetupService::class); } diff --git a/app/Http/Controllers/Oasis/InvoiceController.php b/app/Http/Controllers/Oasis/InvoiceController.php index f0816cf6..4469b3cb 100644 --- a/app/Http/Controllers/Oasis/InvoiceController.php +++ b/app/Http/Controllers/Oasis/InvoiceController.php @@ -9,12 +9,9 @@ use App\Http\Resources\Oasis\OasisInvoiceResource; use App\Models\Oasis\Client; use App\Models\Oasis\Invoice; use App\Notifications\Oasis\InvoiceDeliveryNotification; -use App\Notifications\SharedSendViaEmail; use Auth; -use Illuminate\Contracts\Auth\Authenticatable; use Illuminate\Contracts\Foundation\Application; use Illuminate\Contracts\Routing\ResponseFactory; -use Illuminate\Http\Request; use Illuminate\Http\Response; use Illuminate\Support\Facades\Notification; use Illuminate\Support\Str; @@ -69,20 +66,20 @@ class InvoiceController extends Controller $client = $this->getOrStoreClient($request); $invoice = Invoice::create([ - 'user_id' => $request->user()->id, - 'client_id' => $client->id ?? null, + 'user_id' => $request->user()->id, + 'client_id' => $client->id ?? null, - 'invoice_type' => $request->invoice_type, - 'invoice_number' => $request->invoice_number, + 'invoice_type' => $request->invoice_type, + 'invoice_number' => $request->invoice_number, 'variable_number' => $request->variable_number, 'delivery_at' => $request->delivery_at, - 'discount_type' => $request->discount_type ?? null, - 'discount_rate' => $request->discount_rate ?? null, - 'items' => $request->items, + 'discount_type' => $request->discount_type ?? null, + 'discount_rate' => $request->discount_rate ?? null, + 'items' => $request->items, - 'client' => [ + 'client' => [ 'email' => $client->email ?? $request->client_email, 'name' => $client->name ?? $request->client_name, 'address' => $client->address ?? $request->client_address, @@ -95,6 +92,12 @@ class InvoiceController extends Controller ], ]); + \PDF::loadView('oasis.invoices.invoice', [ + 'invoice' => Invoice::find($invoice->id), + 'user' => $request->user(), + ]) + ->save(storage_path() . "/app/faktura-{$invoice->id}.pdf"); + if ($request->send_invoice && $invoice->client['email']) { Notification::route('mail', $invoice->client['email']) diff --git a/app/Http/Resources/InvoiceResource.php b/app/Http/Resources/InvoiceResource.php index 1d2a6404..209a29c5 100644 --- a/app/Http/Resources/InvoiceResource.php +++ b/app/Http/Resources/InvoiceResource.php @@ -26,7 +26,7 @@ class InvoiceResource extends JsonResource 'customer' => $this->customer, 'total' => $this->total(), 'currency' => $this->currency, - 'created_at_formatted' => format_date($this->date(), '%d. %B. %Y'), + 'created_at_formatted' => format_date($this->date(), '%d. %B %Y'), 'created_at' => $this->created, 'order' => $this->number, 'user_id' => $user->id ?? null, diff --git a/app/Http/Resources/Oasis/OasisClientResource.php b/app/Http/Resources/Oasis/OasisClientResource.php index 4be1713a..65f1dea1 100644 --- a/app/Http/Resources/Oasis/OasisClientResource.php +++ b/app/Http/Resources/Oasis/OasisClientResource.php @@ -30,7 +30,7 @@ class OasisClientResource extends JsonResource 'totalNet' => format_to_currency($total_net, 'CZK'), 'totalInvoices' => $total_invoices, 'type' => 'client', - 'created_at' => format_date($this->created_at, '%d. %B. %Y'), + 'created_at' => format_date($this->created_at, '%d. %B %Y'), ]; } } diff --git a/app/Models/Oasis/Invoice.php b/app/Models/Oasis/Invoice.php index 33f45576..323a4a83 100644 --- a/app/Models/Oasis/Invoice.php +++ b/app/Models/Oasis/Invoice.php @@ -27,7 +27,7 @@ class Invoice extends Model protected $keyType = 'string'; - public function user() + public function author() { return $this->hasOne(User::class, 'id', 'user_id'); } @@ -73,7 +73,7 @@ class Invoice extends Model $invoice->currency = 'CZK'; - $user = Auth::user(); + $user = Auth::user() ?? User::find($invoice->user_id); $invoice->author_name = $user->settings->name ?? null; $invoice->author_stamp = ''; // TODO: doplnit diff --git a/composer.json b/composer.json index 12781933..40c0850a 100644 --- a/composer.json +++ b/composer.json @@ -9,13 +9,16 @@ "license": "MIT", "require": { "php": "^7.3", + "barryvdh/laravel-snappy": "^0.4.8", "brianium/paratest": "^6.2", "cartalyst/stripe-laravel": "^13.1", "doctrine/dbal": "^2.12.1", "fideloper/proxy": "^4.4.1", "fruitcake/laravel-cors": "^2.0.3", + "fzaninotto/faker": "^1.9", "gabrielelana/byte-units": "^0.5.0", "guzzlehttp/guzzle": "^7.2.0", + "h4cc/wkhtmltopdf-amd64": "0.12.x", "intervention/image": "^2.5.1", "jaybizzle/laravel-crawler-detect": "^1.2", "kyslik/column-sortable": "^6.4", diff --git a/composer.lock b/composer.lock index c7bda35b..8cb62fa5 100644 --- a/composer.lock +++ b/composer.lock @@ -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": "a95d28bc54abd2e97744d43210a304ab", + "content-hash": "6434fd4165eecf9e1403bf96bd63c9bd", "packages": [ { "name": "asm89/stack-cors", @@ -192,6 +192,71 @@ "homepage": "https://github.com/Bacon/BaconQrCode", "time": "2020-10-30T02:02:47+00:00" }, + { + "name": "barryvdh/laravel-snappy", + "version": "v0.4.8", + "source": { + "type": "git", + "url": "https://github.com/barryvdh/laravel-snappy.git", + "reference": "1903ab84171072b6bff8d98eb58d38b2c9aaf645" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/barryvdh/laravel-snappy/zipball/1903ab84171072b6bff8d98eb58d38b2c9aaf645", + "reference": "1903ab84171072b6bff8d98eb58d38b2c9aaf645", + "shasum": "" + }, + "require": { + "illuminate/filesystem": "^5.5|^6|^7|^8", + "illuminate/support": "^5.5|^6|^7|^8", + "knplabs/knp-snappy": "^1", + "php": ">=7" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "0.4-dev" + }, + "laravel": { + "providers": [ + "Barryvdh\\Snappy\\ServiceProvider" + ], + "aliases": { + "PDF": "Barryvdh\\Snappy\\Facades\\SnappyPdf", + "SnappyImage": "Barryvdh\\Snappy\\Facades\\SnappyImage" + } + } + }, + "autoload": { + "psr-4": { + "Barryvdh\\Snappy\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Barry vd. Heuvel", + "email": "barryvdh@gmail.com" + } + ], + "description": "Snappy PDF/Image for Laravel", + "keywords": [ + "image", + "laravel", + "pdf", + "snappy", + "wkhtmltoimage", + "wkhtmltopdf" + ], + "support": { + "issues": "https://github.com/barryvdh/laravel-snappy/issues", + "source": "https://github.com/barryvdh/laravel-snappy/tree/master" + }, + "time": "2020-09-07T12:33:10+00:00" + }, { "name": "brianium/paratest", "version": "v6.2.0", @@ -1311,6 +1376,61 @@ ], "time": "2020-10-22T13:57:20+00:00" }, + { + "name": "fzaninotto/faker", + "version": "v1.9.2", + "source": { + "type": "git", + "url": "https://github.com/fzaninotto/Faker.git", + "reference": "848d8125239d7dbf8ab25cb7f054f1a630e68c2e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/fzaninotto/Faker/zipball/848d8125239d7dbf8ab25cb7f054f1a630e68c2e", + "reference": "848d8125239d7dbf8ab25cb7f054f1a630e68c2e", + "shasum": "" + }, + "require": { + "php": "^5.3.3 || ^7.0" + }, + "require-dev": { + "ext-intl": "*", + "phpunit/phpunit": "^4.8.35 || ^5.7", + "squizlabs/php_codesniffer": "^2.9.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.9-dev" + } + }, + "autoload": { + "psr-4": { + "Faker\\": "src/Faker/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "François Zaninotto" + } + ], + "description": "Faker is a PHP library that generates fake data for you.", + "keywords": [ + "data", + "faker", + "fixtures" + ], + "support": { + "issues": "https://github.com/fzaninotto/Faker/issues", + "source": "https://github.com/fzaninotto/Faker/tree/v1.9.2" + }, + "abandoned": true, + "time": "2020-12-11T09:56:16+00:00" + }, { "name": "gabrielelana/byte-units", "version": "0.5.0", @@ -1645,6 +1765,55 @@ ], "time": "2020-09-30T07:37:11+00:00" }, + { + "name": "h4cc/wkhtmltopdf-amd64", + "version": "0.12.4", + "source": { + "type": "git", + "url": "https://github.com/h4cc/wkhtmltopdf-amd64.git", + "reference": "4e2ab2d032a5d7fbe2a741de8b10b8989523c95b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/h4cc/wkhtmltopdf-amd64/zipball/4e2ab2d032a5d7fbe2a741de8b10b8989523c95b", + "reference": "4e2ab2d032a5d7fbe2a741de8b10b8989523c95b", + "shasum": "" + }, + "bin": [ + "bin/wkhtmltopdf-amd64" + ], + "type": "library", + "autoload": { + "psr-4": { + "h4cc\\WKHTMLToPDF\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL Version 3" + ], + "authors": [ + { + "name": "Julius Beckmann", + "email": "github@h4cc.de" + } + ], + "description": "Convert html to pdf using webkit (qtwebkit). Static linked linux binary for amd64 systems.", + "homepage": "http://wkhtmltopdf.org/", + "keywords": [ + "binary", + "convert", + "pdf", + "snapshot", + "thumbnail", + "wkhtmltopdf" + ], + "support": { + "issues": "https://github.com/h4cc/wkhtmltopdf-amd64/issues", + "source": "https://github.com/h4cc/wkhtmltopdf-amd64/tree/master" + }, + "time": "2018-01-15T06:57:33+00:00" + }, { "name": "intervention/image", "version": "2.5.1", @@ -1827,6 +1996,76 @@ ], "time": "2017-06-01T20:29:30+00:00" }, + { + "name": "knplabs/knp-snappy", + "version": "v1.2.1", + "source": { + "type": "git", + "url": "https://github.com/KnpLabs/snappy.git", + "reference": "7bac60fb729147b7ccd8532c07df3f52a4afa8a4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/KnpLabs/snappy/zipball/7bac60fb729147b7ccd8532c07df3f52a4afa8a4", + "reference": "7bac60fb729147b7ccd8532c07df3f52a4afa8a4", + "shasum": "" + }, + "require": { + "php": ">=7.1", + "psr/log": "^1.0", + "symfony/process": "~3.4||~4.3||~5.0" + }, + "require-dev": { + "phpunit/phpunit": "~7.4" + }, + "suggest": { + "h4cc/wkhtmltoimage-amd64": "Provides wkhtmltoimage-amd64 binary for Linux-compatible machines, use version `~0.12` as dependency", + "h4cc/wkhtmltoimage-i386": "Provides wkhtmltoimage-i386 binary for Linux-compatible machines, use version `~0.12` as dependency", + "h4cc/wkhtmltopdf-amd64": "Provides wkhtmltopdf-amd64 binary for Linux-compatible machines, use version `~0.12` as dependency", + "h4cc/wkhtmltopdf-i386": "Provides wkhtmltopdf-i386 binary for Linux-compatible machines, use version `~0.12` as dependency", + "wemersonjanuario/wkhtmltopdf-windows": "Provides wkhtmltopdf executable for Windows, use version `~0.12` as dependency" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Knp\\Snappy\\": "src/Knp/Snappy" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "KnpLabs Team", + "homepage": "http://knplabs.com" + }, + { + "name": "Symfony Community", + "homepage": "http://github.com/KnpLabs/snappy/contributors" + } + ], + "description": "PHP5 library allowing thumbnail, snapshot or PDF generation from a url or a html page. Wrapper for wkhtmltopdf/wkhtmltoimage.", + "homepage": "http://github.com/KnpLabs/snappy", + "keywords": [ + "knp", + "knplabs", + "pdf", + "snapshot", + "thumbnail", + "wkhtmltopdf" + ], + "support": { + "issues": "https://github.com/KnpLabs/snappy/issues", + "source": "https://github.com/KnpLabs/snappy/tree/master" + }, + "time": "2020-01-20T08:30:30+00:00" + }, { "name": "kyslik/column-sortable", "version": "6.4.0", @@ -9629,57 +9868,6 @@ ], "time": "2021-01-24T12:00:00+00:00" }, - { - "name": "fzaninotto/faker", - "version": "v1.9.2", - "source": { - "type": "git", - "url": "https://github.com/fzaninotto/Faker.git", - "reference": "848d8125239d7dbf8ab25cb7f054f1a630e68c2e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/fzaninotto/Faker/zipball/848d8125239d7dbf8ab25cb7f054f1a630e68c2e", - "reference": "848d8125239d7dbf8ab25cb7f054f1a630e68c2e", - "shasum": "" - }, - "require": { - "php": "^5.3.3 || ^7.0" - }, - "require-dev": { - "ext-intl": "*", - "phpunit/phpunit": "^4.8.35 || ^5.7", - "squizlabs/php_codesniffer": "^2.9.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.9-dev" - } - }, - "autoload": { - "psr-4": { - "Faker\\": "src/Faker/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "François Zaninotto" - } - ], - "description": "Faker is a PHP library that generates fake data for you.", - "keywords": [ - "data", - "faker", - "fixtures" - ], - "abandoned": true, - "time": "2020-12-11T09:56:16+00:00" - }, { "name": "hamcrest/hamcrest-php", "version": "v2.0.1", @@ -10622,8 +10810,7 @@ "prefer-stable": true, "prefer-lowest": false, "platform": { - "php": "^7.3", - "ext-json": "*" + "php": "^7.3" }, "platform-dev": { "ext-json": "*" diff --git a/config/app.php b/config/app.php index eed216b8..cdf1dc49 100644 --- a/config/app.php +++ b/config/app.php @@ -233,7 +233,8 @@ return [ 'Image' => Intervention\Image\Facades\Image::class, 'Stripe' => Cartalyst\Stripe\Laravel\Facades\Stripe::class, 'Crawler' => Jaybizzle\LaravelCrawlerDetect\Facades\LaravelCrawlerDetect::class, - 'Madzipper' => Madnest\Madzipper\Madzipper::class, + 'Madzipper' => Madnest\Madzipper\Madzipper::class, + 'PDF' => Barryvdh\Snappy\Facades\SnappyPdf::class, ], 'deploy_secret' => env('APP_DEPLOY_SECRET'), @@ -242,53 +243,39 @@ return [ 'debug_blacklist' => [ '_ENV' => [ 'APP_KEY', - 'DB_USERNAME', 'DB_PASSWORD', 'REDIS_PASSWORD', 'MAIL_PASSWORD', - 'PUSHER_APP_KEY', 'PUSHER_APP_SECRET', - 'PASSPORT_CLIENT_ID', 'PASSPORT_CLIENT_SECRET', - 'AWS_SECRET_ACCESS_KEY', 'AWS_ACCESS_KEY_ID', - 'DO_SPACES_KEY', 'DO_SPACES_SECRET', - 'WASABI_KEY', 'WASABI_SECRET', - 'BACKBLAZE_KEY', 'BACKBLAZE_SECRET', ], '_SERVER' => [ 'APP_KEY', - 'DB_USERNAME', 'DB_PASSWORD', 'REDIS_PASSWORD', 'MAIL_PASSWORD', - 'PUSHER_APP_KEY', 'PUSHER_APP_SECRET', - 'PASSPORT_CLIENT_ID', 'PASSPORT_CLIENT_SECRET', - 'AWS_SECRET_ACCESS_KEY', 'AWS_ACCESS_KEY_ID', - 'DO_SPACES_KEY', 'DO_SPACES_SECRET', - 'WASABI_KEY', 'WASABI_SECRET', - 'BACKBLAZE_KEY', 'BACKBLAZE_SECRET', ], diff --git a/config/snappy.php b/config/snappy.php new file mode 100644 index 00000000..bc2ac856 --- /dev/null +++ b/config/snappy.php @@ -0,0 +1,52 @@ + [ + 'enabled' => true, + 'binary' => app_path() . '/vendor/h4cc/wkhtmltopdf-amd64/bin/wkhtmltopdf-amd64', + 'timeout' => false, + 'options' => [], + 'env' => [], + ], + + 'image' => [ + 'enabled' => true, + 'binary' => env('WKHTML_IMG_BINARY', '/usr/local/bin/wkhtmltoimage'), + 'timeout' => false, + 'options' => [], + 'env' => [], + ], + +]; diff --git a/public/mix-manifest.json b/public/mix-manifest.json index 82bb001b..77686b41 100644 --- a/public/mix-manifest.json +++ b/public/mix-manifest.json @@ -110,104 +110,23 @@ "/vendors~chunks/admin~chunks/admin-account~chunks/app-appearance~chunks/app-billings~chunks/app-email~f0e94b19.js": "/vendors~chunks/admin~chunks/admin-account~chunks/app-appearance~chunks/app-billings~chunks/app-email~f0e94b19.js?id=d57479525cd6baaf09f3", "/vendors~chunks/files~chunks/oasis/invoices~chunks/oasis/invoices/list~chunks/platform~chunks/shared~~c9df84c5.js": "/vendors~chunks/files~chunks/oasis/invoices~chunks/oasis/invoices/list~chunks/platform~chunks/shared~~c9df84c5.js?id=4d042d0c0d8477a4f7ac", "/vendors~chunks/oasis/invoices~chunks/oasis/invoices/list~chunks/platform~chunks/shared.js": "/vendors~chunks/oasis/invoices~chunks/oasis/invoices/list~chunks/platform~chunks/shared.js?id=a65f7c48170789f223e5", - "/js/main.e293ec2c832e438cc8d2.hot-update.js": "/js/main.e293ec2c832e438cc8d2.hot-update.js", - "/js/main.e90e115c0bc509058047.hot-update.js": "/js/main.e90e115c0bc509058047.hot-update.js", - "/js/main.4cea2769f6f751e2d6f4.hot-update.js": "/js/main.4cea2769f6f751e2d6f4.hot-update.js", - "/js/main.bcf669ff8afd0c266371.hot-update.js": "/js/main.bcf669ff8afd0c266371.hot-update.js", - "/js/main.778bb44ac2b4b2a89202.hot-update.js": "/js/main.778bb44ac2b4b2a89202.hot-update.js", - "/js/main.f72dd812135132e2ecde.hot-update.js": "/js/main.f72dd812135132e2ecde.hot-update.js", - "/js/main.c08cd4f3baeec3d843da.hot-update.js": "/js/main.c08cd4f3baeec3d843da.hot-update.js", - "/js/main.cc1f99ecc37597ffb269.hot-update.js": "/js/main.cc1f99ecc37597ffb269.hot-update.js", - "/js/main.3928b253225f387473e8.hot-update.js": "/js/main.3928b253225f387473e8.hot-update.js", - "/js/main.8df022e9fd576b7c2760.hot-update.js": "/js/main.8df022e9fd576b7c2760.hot-update.js", - "/js/main.f742d9d901ce9404ce45.hot-update.js": "/js/main.f742d9d901ce9404ce45.hot-update.js", - "/js/main.6f70c4fd9978147a0352.hot-update.js": "/js/main.6f70c4fd9978147a0352.hot-update.js", - "/js/main.43d6bd052e5c71446494.hot-update.js": "/js/main.43d6bd052e5c71446494.hot-update.js", - "/js/main.32154f2ddece420a28e6.hot-update.js": "/js/main.32154f2ddece420a28e6.hot-update.js", - "/js/main.465686d8c790a956e615.hot-update.js": "/js/main.465686d8c790a956e615.hot-update.js", - "/js/main.2863be4621d7146fe05f.hot-update.js": "/js/main.2863be4621d7146fe05f.hot-update.js", - "/js/main.e07b169b67f28e3d7ccd.hot-update.js": "/js/main.e07b169b67f28e3d7ccd.hot-update.js", - "/js/main.ec4e7a8cd427cb944ee8.hot-update.js": "/js/main.ec4e7a8cd427cb944ee8.hot-update.js", - "/js/main.fb85d6ab7bec8c1d3a29.hot-update.js": "/js/main.fb85d6ab7bec8c1d3a29.hot-update.js", - "/js/main.70bc3a9b71f468c40b60.hot-update.js": "/js/main.70bc3a9b71f468c40b60.hot-update.js", - "/js/main.b26d02d5f26ef3109fdd.hot-update.js": "/js/main.b26d02d5f26ef3109fdd.hot-update.js", - "/js/main.e6a378d4c5ed63a1ab44.hot-update.js": "/js/main.e6a378d4c5ed63a1ab44.hot-update.js", - "/js/main.9a4ef1150a923763d025.hot-update.js": "/js/main.9a4ef1150a923763d025.hot-update.js", - "/js/main.fafd4ac66b20a26bbb9e.hot-update.js": "/js/main.fafd4ac66b20a26bbb9e.hot-update.js", - "/js/main.f32d1c958f9bc030b699.hot-update.js": "/js/main.f32d1c958f9bc030b699.hot-update.js", - "/js/main.53a0d08970f322605c9c.hot-update.js": "/js/main.53a0d08970f322605c9c.hot-update.js", - "/js/main.4690f1810c83d61d2316.hot-update.js": "/js/main.4690f1810c83d61d2316.hot-update.js", - "/js/main.27a4c694221a4657e5cc.hot-update.js": "/js/main.27a4c694221a4657e5cc.hot-update.js", - "/js/main.bac5da173851e4328856.hot-update.js": "/js/main.bac5da173851e4328856.hot-update.js", - "/js/main.932d346f6a8fea57e655.hot-update.js": "/js/main.932d346f6a8fea57e655.hot-update.js", - "/js/main.032d12b71c2e3dd185a2.hot-update.js": "/js/main.032d12b71c2e3dd185a2.hot-update.js", - "/js/main.a4ff315ef77fcd5c8f06.hot-update.js": "/js/main.a4ff315ef77fcd5c8f06.hot-update.js", - "/js/main.a91f0dff9cfc6651dbb0.hot-update.js": "/js/main.a91f0dff9cfc6651dbb0.hot-update.js", - "/js/main.76d26660d66a7614aa33.hot-update.js": "/js/main.76d26660d66a7614aa33.hot-update.js", - "/js/main.f1b0a1c7f3eea169b311.hot-update.js": "/js/main.f1b0a1c7f3eea169b311.hot-update.js", - "/js/main.c6265b91e52922e739dc.hot-update.js": "/js/main.c6265b91e52922e739dc.hot-update.js", - "/js/main.857f172aecb1ac3de4b2.hot-update.js": "/js/main.857f172aecb1ac3de4b2.hot-update.js", - "/js/main.3c1702362cf804b13b89.hot-update.js": "/js/main.3c1702362cf804b13b89.hot-update.js", - "/js/main.9162293ef64da1c93176.hot-update.js": "/js/main.9162293ef64da1c93176.hot-update.js", - "/js/main.f02afd507b32a194cd66.hot-update.js": "/js/main.f02afd507b32a194cd66.hot-update.js", - "/js/main.37211e1b161a4a3ad112.hot-update.js": "/js/main.37211e1b161a4a3ad112.hot-update.js", - "/js/main.3169d8150b3cdabb3270.hot-update.js": "/js/main.3169d8150b3cdabb3270.hot-update.js", - "/js/main.5104cfb3fc0d0f1e4225.hot-update.js": "/js/main.5104cfb3fc0d0f1e4225.hot-update.js", - "/js/main.ad721ba970f8f42a6075.hot-update.js": "/js/main.ad721ba970f8f42a6075.hot-update.js", - "/js/main.35c1a5e3a5e81ae470a8.hot-update.js": "/js/main.35c1a5e3a5e81ae470a8.hot-update.js", - "/js/main.eed48cdbb425b2357c9f.hot-update.js": "/js/main.eed48cdbb425b2357c9f.hot-update.js", - "/js/main.96e0a7b463a4fa0066cf.hot-update.js": "/js/main.96e0a7b463a4fa0066cf.hot-update.js", - "/js/main.850c3ad0ff458f184f6e.hot-update.js": "/js/main.850c3ad0ff458f184f6e.hot-update.js", - "/js/main.15a58324bfa38c60c059.hot-update.js": "/js/main.15a58324bfa38c60c059.hot-update.js", - "/js/main.5cc8bff0d893bc9ef29a.hot-update.js": "/js/main.5cc8bff0d893bc9ef29a.hot-update.js", - "/js/main.f20dd08bb541bf71c0b3.hot-update.js": "/js/main.f20dd08bb541bf71c0b3.hot-update.js", - "/js/main.1e124cdc24ab68e214b8.hot-update.js": "/js/main.1e124cdc24ab68e214b8.hot-update.js", - "/js/main.a7ab217669cdf4e04eed.hot-update.js": "/js/main.a7ab217669cdf4e04eed.hot-update.js", - "/js/main.fde447c3cc2b53e3f2df.hot-update.js": "/js/main.fde447c3cc2b53e3f2df.hot-update.js", - "/js/main.880f4fdd227e12bbd23b.hot-update.js": "/js/main.880f4fdd227e12bbd23b.hot-update.js", - "/js/main.997675d0862beeaf427a.hot-update.js": "/js/main.997675d0862beeaf427a.hot-update.js", - "/js/main.ccec750cc3e6bf19d861.hot-update.js": "/js/main.ccec750cc3e6bf19d861.hot-update.js", - "/js/main.1224cd58a6e39baaf534.hot-update.js": "/js/main.1224cd58a6e39baaf534.hot-update.js", - "/js/main.794a824eb2fb04a03881.hot-update.js": "/js/main.794a824eb2fb04a03881.hot-update.js", - "/js/main.dbbeb4f282a105fcad1a.hot-update.js": "/js/main.dbbeb4f282a105fcad1a.hot-update.js", - "/js/main.5688d08f21ff7dd6cd49.hot-update.js": "/js/main.5688d08f21ff7dd6cd49.hot-update.js", - "/js/main.82d7c3eb926b60f0f746.hot-update.js": "/js/main.82d7c3eb926b60f0f746.hot-update.js", - "/js/main.dd09c8d8671e2469a236.hot-update.js": "/js/main.dd09c8d8671e2469a236.hot-update.js", - "/js/main.3bacd6390598aef93175.hot-update.js": "/js/main.3bacd6390598aef93175.hot-update.js", - "/js/main.eb7da5dddcec94a61395.hot-update.js": "/js/main.eb7da5dddcec94a61395.hot-update.js", - "/js/main.594ff5715ed21764951c.hot-update.js": "/js/main.594ff5715ed21764951c.hot-update.js", - "/js/main.3ab9a733e3d2e708ba2e.hot-update.js": "/js/main.3ab9a733e3d2e708ba2e.hot-update.js", - "/js/main.022064f4f7b157236b8f.hot-update.js": "/js/main.022064f4f7b157236b8f.hot-update.js", - "/js/main.b1f3b8079ff2354ec17e.hot-update.js": "/js/main.b1f3b8079ff2354ec17e.hot-update.js", - "/js/main.a398c6eaee1bccebe98d.hot-update.js": "/js/main.a398c6eaee1bccebe98d.hot-update.js", - "/js/main.bc5812f9b7f49c730ffb.hot-update.js": "/js/main.bc5812f9b7f49c730ffb.hot-update.js", - "/js/main.9aea472feee989a45c3d.hot-update.js": "/js/main.9aea472feee989a45c3d.hot-update.js", - "/js/main.1a8d26f37927b712dbca.hot-update.js": "/js/main.1a8d26f37927b712dbca.hot-update.js", - "/js/main.8f4f0465d475cb4a01eb.hot-update.js": "/js/main.8f4f0465d475cb4a01eb.hot-update.js", - "/js/main.21f79a6410367e057aa9.hot-update.js": "/js/main.21f79a6410367e057aa9.hot-update.js", - "/js/main.bc775a770f943d776e2f.hot-update.js": "/js/main.bc775a770f943d776e2f.hot-update.js", - "/js/main.73f6ec889a3a93e17a83.hot-update.js": "/js/main.73f6ec889a3a93e17a83.hot-update.js", - "/js/main.3c20a7b4ca21a08fa776.hot-update.js": "/js/main.3c20a7b4ca21a08fa776.hot-update.js", - "/js/main.b8473c80ac63ec780509.hot-update.js": "/js/main.b8473c80ac63ec780509.hot-update.js", - "/js/main.77dce38531737a19f1e3.hot-update.js": "/js/main.77dce38531737a19f1e3.hot-update.js", - "/js/main.5d70122902cd8f5dae40.hot-update.js": "/js/main.5d70122902cd8f5dae40.hot-update.js", - "/js/main.a0f701e40e7dc5801402.hot-update.js": "/js/main.a0f701e40e7dc5801402.hot-update.js", - "/js/main.196a76baad624c721fa6.hot-update.js": "/js/main.196a76baad624c721fa6.hot-update.js", - "/js/main.68b1fb96f6fd3c954182.hot-update.js": "/js/main.68b1fb96f6fd3c954182.hot-update.js", - "/js/main.a4797448fa5357a3d7dd.hot-update.js": "/js/main.a4797448fa5357a3d7dd.hot-update.js", - "/js/main.114977b1d6e3297b8418.hot-update.js": "/js/main.114977b1d6e3297b8418.hot-update.js", - "/js/main.0abc3643dcdc535f3a20.hot-update.js": "/js/main.0abc3643dcdc535f3a20.hot-update.js", - "/js/main.2fbac32a5220b00a62e1.hot-update.js": "/js/main.2fbac32a5220b00a62e1.hot-update.js", - "/js/main.8cfbdc19a885bb7da20d.hot-update.js": "/js/main.8cfbdc19a885bb7da20d.hot-update.js", - "/js/main.cc41f96785338d622ec2.hot-update.js": "/js/main.cc41f96785338d622ec2.hot-update.js", - "/js/main.ab4b089800c6edf859d9.hot-update.js": "/js/main.ab4b089800c6edf859d9.hot-update.js", - "/js/main.d130461e91b833dfa169.hot-update.js": "/js/main.d130461e91b833dfa169.hot-update.js", - "/js/main.6ff625f72b1127ff51c7.hot-update.js": "/js/main.6ff625f72b1127ff51c7.hot-update.js", - "/js/main.dc7c039d1f3099a6faeb.hot-update.js": "/js/main.dc7c039d1f3099a6faeb.hot-update.js", - "/js/main.4e110531450c3b790e5a.hot-update.js": "/js/main.4e110531450c3b790e5a.hot-update.js", - "/js/main.23389df260f0920bb4de.hot-update.js": "/js/main.23389df260f0920bb4de.hot-update.js", - "/js/main.4037c72f5799b4e1080d.hot-update.js": "/js/main.4037c72f5799b4e1080d.hot-update.js", - "/js/main.2dcc95bb8d8497470e39.hot-update.js": "/js/main.2dcc95bb8d8497470e39.hot-update.js", - "/js/main.1436615664d2be5c54a4.hot-update.js": "/js/main.1436615664d2be5c54a4.hot-update.js", - "/js/main.a5253190c7b9930dff85.hot-update.js": "/js/main.a5253190c7b9930dff85.hot-update.js" + "/js/main.612f3c8d1593292bb604.hot-update.js": "/js/main.612f3c8d1593292bb604.hot-update.js", + "/js/main.c40070c67217a9577042.hot-update.js": "/js/main.c40070c67217a9577042.hot-update.js", + "/js/main.5a637a89edb738712213.hot-update.js": "/js/main.5a637a89edb738712213.hot-update.js", + "/js/main.0defa764bc20be54df0b.hot-update.js": "/js/main.0defa764bc20be54df0b.hot-update.js", + "/js/main.f4334448f6705547cb65.hot-update.js": "/js/main.f4334448f6705547cb65.hot-update.js", + "/js/main.6e0bc21a639e2bdced62.hot-update.js": "/js/main.6e0bc21a639e2bdced62.hot-update.js", + "/js/main.47040e23d2d2e087e7a3.hot-update.js": "/js/main.47040e23d2d2e087e7a3.hot-update.js", + "/js/main.c2a38b7b9d4d7d457b95.hot-update.js": "/js/main.c2a38b7b9d4d7d457b95.hot-update.js", + "/js/main.0d5dcf9c19bf0c9c2178.hot-update.js": "/js/main.0d5dcf9c19bf0c9c2178.hot-update.js", + "/js/main.3b2f44e5700539c3263a.hot-update.js": "/js/main.3b2f44e5700539c3263a.hot-update.js", + "/js/main.13037464882bfb6a04ad.hot-update.js": "/js/main.13037464882bfb6a04ad.hot-update.js", + "/js/main.5d89c09ba04fc5493126.hot-update.js": "/js/main.5d89c09ba04fc5493126.hot-update.js", + "/js/main.93a5212e152926daeaf8.hot-update.js": "/js/main.93a5212e152926daeaf8.hot-update.js", + "/js/main.40c9f15d7b9e2819c284.hot-update.js": "/js/main.40c9f15d7b9e2819c284.hot-update.js", + "/js/main.852c3168f53a4c6a0a55.hot-update.js": "/js/main.852c3168f53a4c6a0a55.hot-update.js", + "/js/main.30f0091baf9429fcf66f.hot-update.js": "/js/main.30f0091baf9429fcf66f.hot-update.js", + "/js/main.0ea3443cfcd4927b7c36.hot-update.js": "/js/main.0ea3443cfcd4927b7c36.hot-update.js", + "/js/main.a56d6a0c56954df55bd1.hot-update.js": "/js/main.a56d6a0c56954df55bd1.hot-update.js", + "/js/main.ca7092be5e816da9afdd.hot-update.js": "/js/main.ca7092be5e816da9afdd.hot-update.js" } diff --git a/resources/sass/oasis/invoice.scss b/resources/sass/oasis/invoice.scss index a8ccb63d..209810d1 100644 --- a/resources/sass/oasis/invoice.scss +++ b/resources/sass/oasis/invoice.scss @@ -120,6 +120,9 @@ html { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 20px; + padding-bottom: 25px; + border-bottom: 1px dashed $border-color; + margin-bottom: 25px; .special-item { background: $background-color; @@ -218,7 +221,7 @@ html { .summary { max-width: 300px; - margin: 20px 0 30px auto; + margin: 20px 0 20px auto; text-align: right; li { @@ -246,6 +249,42 @@ html { } } +.notes { + padding-top: 25px; + border-top: 1px dashed $border-color; +} + +.invoice-author { + display: flex; + justify-content: space-between; + align-items: flex-end; + padding-bottom: 25px; + + .sign { + text-align: right; + } + + img { + max-width: 240px; + display: block; + margin: 0 0 0 auto; + } +} + +.invoice-footer { + padding-top: 15px; + border-top: 1px dashed $border-color; + text-align: center; + + p { + @include font-size(10); + } + + a { + color: $primary-color; + } +} + h3 { color: $primary-color; font-weight: 600; diff --git a/resources/views/oasis/invoices/invoice.blade.php b/resources/views/oasis/invoices/invoice.blade.php index 0e1560b0..6c38093d 100644 --- a/resources/views/oasis/invoices/invoice.blade.php +++ b/resources/views/oasis/invoices/invoice.blade.php @@ -13,6 +13,122 @@
+@php + //dd($invoice->user); +@endphp + + {{--Invoice header--}} +{{ $invoice->client['name'] }}
+{{ $invoice->client['address'] }}, {{ $invoice->client['city'] }}
+{{ $invoice->client['postal_code'] }} {{ $invoice->client['country'] }}
+ +Dátum vystavenia: {{ format_date($invoice->created_at, '%d. %B %Y') }}
+Dátum dodania: {{ format_date($invoice->delivery_at, '%d. %B %Y') }}
+Dátum splatnosti: {{ format_date($invoice->due_at, '%d. %B %Y') }}
+{{ $user->settings->name }}
+ {{ $user->settings->registration_notes }} +{{ $user->settings->address }} {{ $user->settings->city }}
+{{ $user->settings->postal_code }}, {{ $user->settings->country }}
+IČO: {{ $user->settings->ico }}
+ @endisset + @isset($user->settings->dic) +DIČ: {{ $user->settings->dic }}
+ @endisset + @isset($invoice->supplier_ic_dph) +IČ DPH: {{ $user->settings->ic_dph }}
+ @endisset + +{{ $user->settings->bank_name }}
+IBAN: {{ $user->settings->iban }}, BIC kód/SWIFT: {{ $user->settings->swift }}
+Ďakujeme, že ste sa rozhodli pre naše služby.
+