pdf installation

This commit is contained in:
Peter Papp
2021-04-26 08:15:11 +02:00
parent e65e3e88d7
commit 644fbaede4
12 changed files with 525 additions and 297 deletions

View File

@@ -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