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:
@@ -68,6 +68,10 @@ class SettingsController extends Controller
|
||||
'remove_receipt_logo' => ['sometimes', 'boolean'],
|
||||
'printer_paper_mm' => ['required', 'in:58,80'],
|
||||
'printer_auto_print' => ['sometimes', 'boolean'],
|
||||
'customer_promo_headline' => ['nullable', 'string', 'max:160'],
|
||||
'customer_promo_body' => ['nullable', 'string', 'max:500'],
|
||||
'customer_promo_image' => ['nullable', 'image', 'mimes:jpeg,jpg,png,gif,webp', 'max:2048'],
|
||||
'remove_customer_promo_image' => ['sometimes', 'boolean'],
|
||||
'gateway_provider' => ['nullable', Rule::in([
|
||||
PaymentGatewaySetting::PROVIDER_PAYSTACK,
|
||||
PaymentGatewaySetting::PROVIDER_FLUTTERWAVE,
|
||||
@@ -103,6 +107,21 @@ class SettingsController extends Controller
|
||||
);
|
||||
}
|
||||
|
||||
if ($request->boolean('remove_customer_promo_image') && $location->customer_promo_image_path) {
|
||||
Storage::disk('public')->delete($location->customer_promo_image_path);
|
||||
$location->customer_promo_image_path = null;
|
||||
}
|
||||
|
||||
if ($request->hasFile('customer_promo_image')) {
|
||||
if ($location->customer_promo_image_path) {
|
||||
Storage::disk('public')->delete($location->customer_promo_image_path);
|
||||
}
|
||||
$location->customer_promo_image_path = $request->file('customer_promo_image')->store(
|
||||
'pos/customer-promo/'.$this->ownerRef($request),
|
||||
'public'
|
||||
);
|
||||
}
|
||||
|
||||
$location->update([
|
||||
'name' => $data['name'],
|
||||
'currency' => strtoupper($data['currency']),
|
||||
@@ -112,6 +131,9 @@ class SettingsController extends Controller
|
||||
'printer_paper_mm' => (int) $data['printer_paper_mm'],
|
||||
'printer_auto_print' => $request->boolean('printer_auto_print'),
|
||||
'receipt_logo_path' => $location->receipt_logo_path,
|
||||
'customer_promo_headline' => $data['customer_promo_headline'] ?? null,
|
||||
'customer_promo_body' => $data['customer_promo_body'] ?? null,
|
||||
'customer_promo_image_path' => $location->customer_promo_image_path,
|
||||
]);
|
||||
|
||||
$this->persistGateway($request, $user);
|
||||
|
||||
Reference in New Issue
Block a user