| @@ -10,4 +10,5 @@ enum Email: string | |||||
| case ENTRY_APPROVE = '申込受付'; | case ENTRY_APPROVE = '申込受付'; | ||||
| case ENTRY_PAYMENT_COMPLETE = '申込承認'; | case ENTRY_PAYMENT_COMPLETE = '申込承認'; | ||||
| case CHANGE_PLAN_ORDER_APPROVE = 'プラン変更完了'; | case CHANGE_PLAN_ORDER_APPROVE = 'プラン変更完了'; | ||||
| case COULD_NOT_PEY_NOTICE = '口座振替・未納者通知'; | |||||
| } | } | ||||
| @@ -0,0 +1,46 @@ | |||||
| <?php | |||||
| namespace App\Email\Members; | |||||
| use App\Kintone\Models\Customer; | |||||
| use App\Kintone\Models\PaymentPlan; | |||||
| use App\Kintone\Models\SeasonTicketContract; | |||||
| /** | |||||
| * 口座振替・未納者通知 | |||||
| */ | |||||
| class CouldNotPayNotice extends Members | |||||
| { | |||||
| public function __construct( | |||||
| private SeasonTicketContract $seasonTicketContract, | |||||
| private PaymentPlan $paymentPlan, | |||||
| protected ?Customer $customer = null, | |||||
| ) { | |||||
| if ($customer === null) { | |||||
| $customer = $seasonTicketContract->getCustomer(); | |||||
| } | |||||
| parent::__construct($customer); | |||||
| } | |||||
| public function getTemplateName(): string | |||||
| { | |||||
| return 'emails.members.could_not_pay_notice'; | |||||
| } | |||||
| public function getSubject(): string | |||||
| { | |||||
| return "定期駐車場料金未納のお知らせ"; | |||||
| } | |||||
| public function getMemberParams(): array | |||||
| { | |||||
| return [ | |||||
| 'url' => $this->getAppUrl([ | |||||
| 'login', | |||||
| ]), | |||||
| 'smbc_register_url' => $this->getAppUrl([ | |||||
| 'dashboard', 'update', 'user', 'back-register', | |||||
| ]), | |||||
| ]; | |||||
| } | |||||
| } | |||||
| @@ -7,6 +7,9 @@ use App\Kintone\Models\SeasonTicketContractSelection; | |||||
| use App\Logic\SeasonTicketContractEntryManager; | use App\Logic\SeasonTicketContractEntryManager; | ||||
| use App\Logic\SeasonTicketContractSelectionManager; | use App\Logic\SeasonTicketContractSelectionManager; | ||||
| /** | |||||
| * 定期選考_一斉通知 | |||||
| */ | |||||
| class SelectionNotice extends Members | class SelectionNotice extends Members | ||||
| { | { | ||||
| @@ -24,7 +27,7 @@ class SelectionNotice extends Members | |||||
| public function getSubject(): string | public function getSubject(): string | ||||
| { | { | ||||
| return "##TODO## 選考通知"; | |||||
| return "定期利用抽選のお知らせ"; | |||||
| } | } | ||||
| public function getMemberParams(): array | public function getMemberParams(): array | ||||
| @@ -5,6 +5,7 @@ namespace App\Http\Controllers\Web\Email; | |||||
| use App\Codes\Email; | use App\Codes\Email; | ||||
| use App\Email\BaseEmailer; | use App\Email\BaseEmailer; | ||||
| use App\Email\Members\ChangePlanOrderApprove; | use App\Email\Members\ChangePlanOrderApprove; | ||||
| use App\Email\Members\CouldNotPayNotice; | |||||
| use App\Email\Members\EntryApprove; | use App\Email\Members\EntryApprove; | ||||
| use App\Email\Members\EntryPaymentComplete; | use App\Email\Members\EntryPaymentComplete; | ||||
| use App\Email\Members\TerminateOrderApprove; | use App\Email\Members\TerminateOrderApprove; | ||||
| @@ -12,6 +13,7 @@ use App\Email\Members\UserInfoUpdateOrderApprove; | |||||
| use App\Email\Members\VehicleInfoUpdateOrderApprove; | use App\Email\Members\VehicleInfoUpdateOrderApprove; | ||||
| use App\Http\Controllers\Web\FromKintoneController; | use App\Http\Controllers\Web\FromKintoneController; | ||||
| use App\Kintone\Models\ChangePlanApplication; | use App\Kintone\Models\ChangePlanApplication; | ||||
| use App\Kintone\Models\PaymentPlan; | |||||
| use App\Kintone\Models\SeasonTicketContract; | use App\Kintone\Models\SeasonTicketContract; | ||||
| use App\Kintone\Models\SeasonTicketContractEntry; | use App\Kintone\Models\SeasonTicketContractEntry; | ||||
| use App\Kintone\Models\TerminateApplication; | use App\Kintone\Models\TerminateApplication; | ||||
| @@ -112,6 +114,12 @@ class EmailSendController extends FromKintoneController | |||||
| $this->setEmail(new ChangePlanOrderApprove($seasonTicketContract, $application)); | $this->setEmail(new ChangePlanOrderApprove($seasonTicketContract, $application)); | ||||
| return; | return; | ||||
| } | } | ||||
| if ($emailId === Email::COULD_NOT_PEY_NOTICE) { | |||||
| $seasonTicketContract = SeasonTicketContract::find($this->param->seasonTicketContractRecordNo); | |||||
| $paymentPlan = PaymentPlan::find($this->param->paymentPlanRecordNo); | |||||
| $this->setEmail(new CouldNotPayNotice($seasonTicketContract, $paymentPlan)); | |||||
| return; | |||||
| } | |||||
| if ($this->email === null || $this->emailManager === null) { | if ($this->email === null || $this->emailManager === null) { | ||||
| @@ -8,7 +8,9 @@ use Illuminate\Validation\Rules\Enum; | |||||
| /** | /** | ||||
| * @property Email emailId | * @property Email emailId | ||||
| * @property ?int seasonTicketContractRecordNo | |||||
| * @property ?int seasonTicketContractEntryRecordNo | * @property ?int seasonTicketContractEntryRecordNo | ||||
| * @property ?int paymentPlanRecordNo | |||||
| * @property ?string applicationNo | * @property ?string applicationNo | ||||
| */ | */ | ||||
| class EmailSendParam extends BaseParam | class EmailSendParam extends BaseParam | ||||
| @@ -17,7 +19,9 @@ class EmailSendParam extends BaseParam | |||||
| { | { | ||||
| return [ | return [ | ||||
| 'email_id' => $this->enum([new Enum(Email::class)]), | 'email_id' => $this->enum([new Enum(Email::class)]), | ||||
| 'season_ticket_contract_record_no' => $this->numeric(true), | |||||
| 'season_ticket_contract_entry_record_no' => $this->numeric(true), | 'season_ticket_contract_entry_record_no' => $this->numeric(true), | ||||
| 'payment_plan_record_no' => $this->numeric(true), | |||||
| 'application_no' => $this->str(true), | 'application_no' => $this->str(true), | ||||
| ]; | ]; | ||||
| } | } | ||||
| @@ -88,7 +88,7 @@ abstract class KintoneModel | |||||
| /** | /** | ||||
| * @return static | * @return static | ||||
| */ | */ | ||||
| public static function find(string $recordId) | |||||
| public static function find(int $recordId) | |||||
| { | { | ||||
| return static::getAccess()->find($recordId); | return static::getAccess()->find($recordId); | ||||
| } | } | ||||
| @@ -0,0 +1,20 @@ | |||||
| @extends('emails.layouts.member') | |||||
| @section('contents') | |||||
| 駐車料金口座引落にて(資金不足or口座未登録)のため、未納となっております。 | |||||
| 前月までに(翌月分or翌年分)を前納によりお支払い頂くため、次回口座引落にて合算にて引落しさせて | |||||
| 頂きます。 | |||||
| 27日(土日祝の場合、翌営業日)の前日には、口座に駐車料金を必ずご用意下さいますようお願い致します。 | |||||
| なお、本メールと行き違いで、既にご対応頂いている場合は何卒ご容赦頂けますと幸いです。 | |||||
| ご確認のほど何卒宜しくお願い申し上げます。 | |||||
| ※お支払い状況、お問い合わせ、その他各種お手続きはマイページから確認・申請頂けます。 | |||||
| (初回のみ新規登録済のメールアドレスにてパスワード設定が必要となります。) | |||||
| {{ $url }} | |||||
| ※振替口座登録がお済みでない方は、下記URLから速やかに振替口座登録を行って下さい。 | |||||
| (登録の際は、金融機関での登録完了画面までお進み頂いている事をご確認下さい。) | |||||
| (金融機関登録の進捗状況により、合算での振替となります。) | |||||
| {{ $smbc_register_url }} | |||||
| @endsection | |||||