Email digital receipts, add promo settings, and apply tips at charge.
Deploy Ladill POS / deploy (push) Successful in 31s
Deploy Ladill POS / deploy (push) Successful in 31s
Send real receipt emails from the customer display and sale page, store branch promo content for the idle screen, and fold selected tips into totals.
This commit is contained in:
@@ -24,6 +24,9 @@ class PosLocation extends Model
|
||||
'receipt_logo_path',
|
||||
'printer_paper_mm',
|
||||
'printer_auto_print',
|
||||
'customer_promo_headline',
|
||||
'customer_promo_body',
|
||||
'customer_promo_image_path',
|
||||
];
|
||||
|
||||
protected function casts(): array
|
||||
@@ -49,6 +52,25 @@ class PosLocation extends Model
|
||||
return Storage::disk('public')->url($this->receipt_logo_path);
|
||||
}
|
||||
|
||||
public function customerPromoImageUrl(): ?string
|
||||
{
|
||||
if ($this->customer_promo_image_path) {
|
||||
return Storage::disk('public')->url($this->customer_promo_image_path);
|
||||
}
|
||||
|
||||
return $this->receiptLogoUrl();
|
||||
}
|
||||
|
||||
/** Default idle-screen promo for the customer-facing display. */
|
||||
public function customerPromo(): array
|
||||
{
|
||||
return [
|
||||
'headline' => $this->customer_promo_headline ?: $this->name,
|
||||
'body' => $this->customer_promo_body ?: 'Thank you for shopping with us.',
|
||||
'image_url' => $this->customerPromoImageUrl(),
|
||||
];
|
||||
}
|
||||
|
||||
public function products(): HasMany
|
||||
{
|
||||
return $this->hasMany(PosProduct::class, 'location_id');
|
||||
|
||||
@@ -56,6 +56,7 @@ class PosSale extends Model
|
||||
'loyalty_points_redeemed',
|
||||
'loyalty_points_earned',
|
||||
'loyalty_external_ref',
|
||||
'tip_minor',
|
||||
'total_minor',
|
||||
'currency',
|
||||
'paid_at',
|
||||
@@ -71,6 +72,7 @@ class PosSale extends Model
|
||||
'loyalty_discount_minor' => 'integer',
|
||||
'loyalty_points_redeemed' => 'integer',
|
||||
'loyalty_points_earned' => 'integer',
|
||||
'tip_minor' => 'integer',
|
||||
'total_minor' => 'integer',
|
||||
'pay_order_id' => 'integer',
|
||||
'crm_customer_id' => 'integer',
|
||||
|
||||
Reference in New Issue
Block a user