Add receipt logo upload and redesign thermal receipt header.
Deploy Ladill POS / deploy (push) Successful in 1m32s
Deploy Ladill POS / deploy (push) Successful in 1m32s
Per-location logo in settings with remove/replace support; receipt template reserves space at the top when a logo is set. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -5,6 +5,7 @@ namespace App\Models;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
|
||||
class PosLocation extends Model
|
||||
{
|
||||
@@ -19,6 +20,7 @@ class PosLocation extends Model
|
||||
'service_style',
|
||||
'receipt_footer',
|
||||
'receipt_header',
|
||||
'receipt_logo_path',
|
||||
'printer_paper_mm',
|
||||
'printer_auto_print',
|
||||
];
|
||||
@@ -36,6 +38,15 @@ class PosLocation extends Model
|
||||
return $this->service_style === self::STYLE_RESTAURANT;
|
||||
}
|
||||
|
||||
public function receiptLogoUrl(): ?string
|
||||
{
|
||||
if (! $this->receipt_logo_path) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return Storage::disk('public')->url($this->receipt_logo_path);
|
||||
}
|
||||
|
||||
public function products(): HasMany
|
||||
{
|
||||
return $this->hasMany(PosProduct::class, 'location_id');
|
||||
|
||||
Reference in New Issue
Block a user