領収証発行サービス
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 line
818B

  1. <?php
  2. namespace App\Email\Guests;
  3. use App\Models\ReceiptIssuingOrder;
  4. use Illuminate\Support\Carbon;
  5. class ReceiptA4 extends Guest
  6. {
  7. /**
  8. * Create a new message instance.
  9. *
  10. * @return void
  11. */
  12. public function __construct(private ReceiptIssuingOrder $order)
  13. {
  14. }
  15. public function getTemplateName(): string
  16. {
  17. return 'emails.guests.receipt_a4';
  18. }
  19. public function getSubject(): string
  20. {
  21. return sprintf('領収証の送付 %s', $this->order->receipt_no);
  22. }
  23. public function getGuestParams(): array
  24. {
  25. return [
  26. 'shopName' => $this->order->receipt_shop_name,
  27. 'useDate' => $this->order->receipt_use_date->format('Y/m/d'),
  28. 'amount' => number_format($this->order->receipt_amount),
  29. ];
  30. }
  31. }