|
|
|
@@ -2,6 +2,7 @@ |
|
|
|
|
|
|
|
namespace App\Kintone\Models; |
|
|
|
|
|
|
|
use App\Kintone\Models\DropDown\PaymentPlan\PaymentType; |
|
|
|
use Illuminate\Support\Carbon; |
|
|
|
|
|
|
|
/** |
|
|
|
@@ -69,6 +70,7 @@ class PaymentPlan extends KintoneModel |
|
|
|
{ |
|
|
|
return [ |
|
|
|
'payment_status' => $this->donePayment() ? "支払済み" : "未払い", |
|
|
|
'payment_name' => $this->getViewName(), |
|
|
|
]; |
|
|
|
} |
|
|
|
|
|
|
|
@@ -79,4 +81,14 @@ class PaymentPlan extends KintoneModel |
|
|
|
|
|
|
|
return !!$paymentDate && $remainingAmount === 0; |
|
|
|
} |
|
|
|
|
|
|
|
private function getViewName(): string |
|
|
|
{ |
|
|
|
|
|
|
|
if ($this->paymentType === PaymentType::SEASON_TICKET) { |
|
|
|
return sprintf("%d年%d月分 定期料金", $this->targetYear, $this->targetMonth); |
|
|
|
} |
|
|
|
|
|
|
|
return $this->paymentType; |
|
|
|
} |
|
|
|
} |