dbmsv4 init...3

This commit is contained in:
최준흠 2025-12-16 18:33:30 +09:00
parent eb61a4bf9f
commit 486e83a0ec
4 changed files with 2 additions and 60 deletions

View File

@ -77,58 +77,6 @@ class PaymentController extends AdminController
return $this->action_redirect_process('error', static::class . '->' . __FUNCTION__ . "에서 {$this->getTitle()} 생성폼 오류:" . $e->getMessage()); return $this->action_redirect_process('error', static::class . '->' . __FUNCTION__ . "에서 {$this->getTitle()} 생성폼 오류:" . $e->getMessage());
} }
} }
final public function coupon_form(): string|RedirectResponse
{
try {
$uid = $this->request->getVar('serviceinfo_uid');
if (!$uid) {
throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 오류발생: 서비스정보 번호가 정의되지 않았습니다..");
}
$serviceEntity = service('customer_serviceservice')->getEntity($uid);
if (!$serviceEntity) {
throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 오류발생: {$uid}에 해당하는 서비스정보을 찾을수 없습니다.");
}
$action = __FUNCTION__;
$formDatas = [];
$formDatas['serviceinfo_uid'] = $uid;
$formDatas['title'] = $serviceEntity->getTitle() . " 쿠폰 결제";
$formDatas['billing'] = PAYMENT['BILLING']['ONETIME'];
$formDatas['billing_at'] = date('Y-m-d');
$formDatas['pay'] = PAYMENT['PAY']['COUPON'];
$formDatas['status'] = STATUS['PAID'];
$this->action_init_process($action, $formDatas);
$this->addViewDatas('formDatas', $formDatas);
return $this->action_render_process($action, $this->getViewDatas(), $this->request->getVar('ActionTemplate'));
} catch (\Throwable $e) {
return $this->action_redirect_process('error', static::class . '->' . __FUNCTION__ . "에서 {$this->getTitle()} 생성폼 오류:" . $e->getMessage());
}
}
final public function point_form(): string|RedirectResponse
{
try {
$uid = $this->request->getVar('serviceinfo_uid');
if (!$uid) {
throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 오류발생: 서비스정보 번호가 정의되지 않았습니다..");
}
$serviceEntity = service('customer_serviceservice')->getEntity($uid);
if (!$serviceEntity) {
throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 오류발생: {$uid}에 해당하는 서비스정보을 찾을수 없습니다.");
}
$action = __FUNCTION__;
$formDatas = [];
$formDatas['serviceinfo_uid'] = $uid;
$formDatas['title'] = $serviceEntity->getTitle() . " 포인트 결제";
$formDatas['billing'] = PAYMENT['BILLING']['ONETIME'];
$formDatas['billing_at'] = date('Y-m-d');
$formDatas['pay'] = PAYMENT['PAY']['POINT'];
$formDatas['status'] = STATUS['PAID'];
$this->action_init_process($action, $formDatas);
$this->addViewDatas('formDatas', $formDatas);
return $this->action_render_process($action, $this->getViewDatas(), $this->request->getVar('ActionTemplate'));
} catch (\Throwable $e) {
return $this->action_redirect_process('error', static::class . '->' . __FUNCTION__ . "에서 {$this->getTitle()} 생성폼 오류:" . $e->getMessage());
}
}
//단일 지불 완료처리 //단일 지불 완료처리
final public function paid($uid): string|RedirectResponse final public function paid($uid): string|RedirectResponse
{ {

View File

@ -130,8 +130,6 @@ class ServiceHelper extends CustomerHelper
break; break;
case 'onetime': case 'onetime':
case 'prepayment': case 'prepayment':
case 'coupon':
case 'point':
$action = form_label( $action = form_label(
$label ? $label : ICONS['ONETIME'], $label ? $label : ICONS['ONETIME'],
$action, $action,

View File

@ -16,7 +16,7 @@ class PaymentHelper extends CommonHelper
array_shift($viewDatas['formOptions'][$field]['options']); //Radio 선택기는 첫번째 옵션제거해야 함 array_shift($viewDatas['formOptions'][$field]['options']); //Radio 선택기는 첫번째 옵션제거해야 함
foreach ($viewDatas['formOptions'][$field]['options'] as $key => $label) { foreach ($viewDatas['formOptions'][$field]['options'] as $key => $label) {
$billing_month = ""; $billing_month = "";
if ($key == PAYMENT['BILLING']['PREPAYMENT']) { //선결제의 if ($key == PAYMENT['BILLING']['PREPAYMENT']) { //선결제의
$initalTitle = $viewDatas['formDatas']['title'] ?? ""; $initalTitle = $viewDatas['formDatas']['title'] ?? "";
$initalAmount = $viewDatas['formDatas']['amount'] ?? 0; $initalAmount = $viewDatas['formDatas']['amount'] ?? 0;
$initalPayMonth = $viewDatas['formDatas']['billing_month'] ?? ""; $initalPayMonth = $viewDatas['formDatas']['billing_month'] ?? "";

View File

@ -18,11 +18,7 @@
</td> </td>
</tr> </tr>
<tr> <tr>
<td nowrap class="text-center"><?= $serviceCellDatas['helper']->getListButton('onetime', '일회성 결제', ['entity' => $serviceEntity], ['class' => 'btn btn-sm btn-primary']) ?></td> <td nowrap class="text-center"><?= $serviceCellDatas['helper']->getListButton('onetime', '일회성추가', ['entity' => $serviceEntity], ['class' => 'btn btn-sm btn-primary']) ?></td>
<td nowrap class="text-center"><?= $serviceCellDatas['helper']->getListButton('prepayment', '선결제', ['entity' => $serviceEntity], ['class' => 'btn btn-sm btn-primary']) ?></td> <td nowrap class="text-center"><?= $serviceCellDatas['helper']->getListButton('prepayment', '선결제', ['entity' => $serviceEntity], ['class' => 'btn btn-sm btn-primary']) ?></td>
</tr> </tr>
<tr>
<td nowrap class="text-center"><?= $serviceCellDatas['helper']->getListButton('coupon', '쿠폰 결제', ['entity' => $serviceEntity], ['class' => 'btn btn-sm btn-primary']) ?></td>
<td nowrap class="text-center"><?= $serviceCellDatas['helper']->getListButton('point', '포인트 결제', ['entity' => $serviceEntity], ['class' => 'btn btn-sm btn-primary']) ?></td>
</tr>
</table> </table>