Send wash certificate email to the customer if a booking is associated
This commit is contained in:
@@ -98,6 +98,11 @@ class orderRoute
|
||||
// Generate (no-op if already exists)
|
||||
$orders_o->generateWashCertificate($safety_seal, $operator, $date);
|
||||
$now_exists = $orders_o->hasWashCertificateAttached();
|
||||
// If a booking is associated, send the wash certificate email to the customer
|
||||
if ($orders_o->booking_id->value()) {
|
||||
$order_booking = $orders_o->getOrderBooking();
|
||||
$order_booking?->sendWashCertificateToCustomer();
|
||||
}
|
||||
|
||||
(new logs_o())->add('orders', $orders_o->department_id->value(), 1, $user->id, 'GENERATE_ORDER_WASH_CERTIFICATE', 'Wash certificate ' . ($already_exists ? 'already existed' : 'generated'));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user