Email quick sale receipts and send them again from the sales list
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace App\Modules\Sales\Infrastructure\Receipts;
|
||||
|
||||
use App\Modules\Sales\Application\Contracts\ReceiptMailer;
|
||||
|
||||
/**
|
||||
* Sends receipts through the queue, after the surrounding transaction (if
|
||||
* any) has committed.
|
||||
*/
|
||||
class QueuedReceiptMailer implements ReceiptMailer
|
||||
{
|
||||
public function send(int $saleId): void
|
||||
{
|
||||
SendQuickSaleReceipt::dispatch($saleId)->afterCommit();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user