dbmsv3 init...1

This commit is contained in:
choi.jh 2025-10-15 11:43:02 +09:00
parent 2c207d1d38
commit a36382ad18
17 changed files with 129 additions and 199 deletions

View File

@ -384,7 +384,7 @@ define("STATUS", [
'FAILED' => "fail", 'FAILED' => "fail",
'PAUSE' => "pause", 'PAUSE' => "pause",
'TERMINATED' => "terminated", 'TERMINATED' => "terminated",
'WIDTHDRAWAL' => "widthdrawal", 'WITHDRAWAL' => "withdrawal",
'DEPOSIT' => "deposit", 'DEPOSIT' => "deposit",
'PAID' => 'paid', 'PAID' => 'paid',
'UNPAID' => 'unpaid', 'UNPAID' => 'unpaid',

View File

@ -118,7 +118,7 @@ class PaymentController extends CustomerController
} }
} }
//일회성관련 //일회성결제작업
protected function create_form_process(): void protected function create_form_process(): void
{ {
$formDatas = $this->getService()->getFormDatas(); $formDatas = $this->getService()->getFormDatas();

File diff suppressed because one or more lines are too long

View File

@ -26,10 +26,6 @@ class ClientEntity extends CustomerEntity
{ {
return $this->attributes['role'] ?? ""; return $this->attributes['role'] ?? "";
} }
public function getSaleRate(): int
{
return $this->attributes['sale_rate'] ?? 0;
}
public function getAccountBalance(): int public function getAccountBalance(): int
{ {
return $this->attributes['account_balance'] ?? 0; return $this->attributes['account_balance'] ?? 0;

View File

@ -94,6 +94,24 @@ class ClientHelper extends CustomerHelper
] ]
); );
break; break;
case 'coupon':
case 'account':
$extras = [
"class" => "btn btn-sm btn-outline btn-circle btn-link form-label-sm",
"target" => "_self",
...$extras,
];
$action = form_label(
$label,
$action,
[
"data-src" => "/admin/customer/{$action}?clientinfo_uid={$viewDatas['entity']->getPK()}&ActionTemplate=popup",
"data-bs-toggle" => "modal",
"data-bs-target" => "#index_action_form",
...$extras,
]
);
break;
default: default:
$action = parent::getListButton($action, $label, $viewDatas, $extras); $action = parent::getListButton($action, $label, $viewDatas, $extras);
break; break;

View File

@ -22,6 +22,6 @@ return [
], ],
"STATUS" => [ "STATUS" => [
STATUS['DEPOSIT'] => "입금", STATUS['DEPOSIT'] => "입금",
STATUS['WIDTHDRAWAL'] => "출금", STATUS['WITHDRAWAL'] => "출금",
], ],
]; ];

View File

@ -12,6 +12,6 @@ return [
], ],
"STATUS" => [ "STATUS" => [
STATUS['DEPOSIT'] => "추가", STATUS['DEPOSIT'] => "추가",
STATUS['WIDTHDRAWAL'] => "사용", STATUS['WITHDRAWAL'] => "사용",
], ],
]; ];

View File

@ -12,6 +12,6 @@ return [
], ],
"STATUS" => [ "STATUS" => [
STATUS['DEPOSIT'] => "입금", STATUS['DEPOSIT'] => "입금",
STATUS['WIDTHDRAWAL'] => "출금", STATUS['WITHDRAWAL'] => "출금",
], ],
]; ];

View File

@ -48,13 +48,13 @@ class PaymentModel extends CommonModel
break; break;
case "title": case "title":
case "billing": case "billing":
case "pay":
case "status": case "status":
$rule = "required|trim|string"; $rule = "required|trim|string";
break; break;
case "billing_at": case "billing_at":
$rule = "required|valid_date"; $rule = "required|valid_date";
break; break;
case "pay":
case "content": case "content":
$rule = "permit_empty|trim|string"; $rule = "permit_empty|trim|string";
break; break;

View File

@ -48,21 +48,35 @@ class AccountService extends CustomerService implements PaymentInterface
} }
return $this->_clientService; return $this->_clientService;
} }
//고객예치금처리
private function setBalance(array $formDatas): ClientEntity
{
if (!array_key_exists('clientinfo_uid', $formDatas)) {
throw new \Exception("고객정보가 필요합니다.");
}
$entity = $this->getClientService()->getEntity($formDatas['clientinfo_uid']);
if (!$entity instanceof ClientEntity) {
throw new \Exception("{$formDatas['clientinfo_uid']}에 대한 고객정보를 찾을수 없습니다.");
}
return $this->getClientService()->setAccount($formDatas['status'], $entity, intval($formDatas['amount']));
}
public function setPayment(string $action, PaymentEntity $paymentEntity, array $paymentDatas): PaymentEntity public function setPayment(string $action, PaymentEntity $paymentEntity, array $paymentDatas): PaymentEntity
{ {
switch ($action) { switch ($action) {
case 'create': case 'create':
$this->create([ $formDatas = [
'clientinfo_uid' => $paymentEntity->getClientInfoUID(), 'clientinfo_uid' => $paymentEntity->getClientInfoUID(),
'bank' => null, 'bank' => null,
'title' => "[결제차감] {$paymentEntity->getTitle()}", 'title' => "[결제차감] {$paymentEntity->getTitle()}",
'issue_at' => date('Y-m-d H:i:s'), 'issue_at' => date('Y-m-d H:i:s'),
'alias' => array_key_exists('alias', $paymentDatas) ? $paymentDatas['alias'] : null, 'alias' => array_key_exists('alias', $paymentDatas) ? $paymentDatas['alias'] : null,
'amount' => $paymentEntity->getAmount(), 'amount' => $paymentEntity->getAmount(),
'status' => STATUS['WIDTHDRAWAL'], 'status' => STATUS['WITHDRAWAL'],
]); ];
$this->setBalance($formDatas);
$this->create($formDatas);
break; break;
// case 'update': // case 'modify':
// case 'delete': // case 'delete':
default: default:
throw new \Exception(__METHOD__ . "에서 오류발생: {$action}는 지원하지 않는 기능입니다."); throw new \Exception(__METHOD__ . "에서 오류발생: {$action}는 지원하지 않는 기능입니다.");
@ -70,25 +84,6 @@ class AccountService extends CustomerService implements PaymentInterface
return $paymentEntity; return $paymentEntity;
} }
//기본 기능부분 //기본 기능부분
//고객예치금처리
private function setBalance(array $formDatas): void
{
//account_balance 체크
$entity = $this->getClientService()->getEntity($formDatas['clientinfo_uid']);
if (!$entity instanceof ClientEntity) {
throw new \Exception("{$formDatas['clientinfo_uid']}에 대한 고객정보를 찾을수 없습니다.");
}
if (!array_key_exists('amount', $formDatas) || !array_key_exists('status', $formDatas)) {
throw new \Exception("입출금처리를 위한 금액과 상태값이 필요합니다.");
}
$amount = intval($formDatas['amount']);
if ($formDatas['status'] === AccountEntity::DEFAULT_STATUS) { //입금, 쿠폰추가
$entity = $this->getClientService()->deposit($entity, 'account_balance', $amount);
} else { // 출금, 쿠폰사용
$entity = $this->getClientService()->withdrawal($entity, 'account_balance', $amount);
}
}
//생성 //생성
public function create(array $formDatas): AccountEntity public function create(array $formDatas): AccountEntity
{ {

View File

@ -86,62 +86,71 @@ class ClientService extends CustomerService
} }
return $this->_paymentService; return $this->_paymentService;
} }
//입금(쿠폰:추가)처리 //예치금처리
final public function deposit(ClientEntity $entity, string $field, int $amount): ClientEntity final public function setAccount(string $action, ClientEntity $entity, int $amount): ClientEntity
{ {
switch ($field) { switch ($action) {
case 'account_balance': case STATUS['DEPOSIT']:
if ($amount < 0) { if ($amount < 0) {
throw new \Exception("입금액이 0보다 작습니다."); throw new \Exception("예치금이 0보다 작습니다.");
} }
$amount += $entity->getAccountBalance(); $amount += $entity->getAccountBalance();
break; break;
case 'coupon_balance': case STATUS['WITHDRAWAL']:
if ($amount < 0) {
throw new \Exception("쿠폰 추가갯수가 0보다 작습니다.");
}
$amount += $entity->getCouponBalance();
break;
case 'point_balance':
if ($amount < 0) {
throw new \Exception("포인트 입금액 0보다 작습니다.");
}
$amount += $entity->getPointBalance();
break;
default:
throw new \Exception("{$field}는 알수없는 Field가 정의되었습니다.");
// break;
}
return parent::modify($entity, [$field => $amount]);
}
//출금(쿠폰:사용)처리
final public function withdrawal(ClientEntity $entity, string $field, int $amount): ClientEntity
{
switch ($field) {
case 'account_balance':
if ($entity->getAccountBalance() < $amount) { if ($entity->getAccountBalance() < $amount) {
throw new \Exception("예치금[{$entity->getAccountBalance()}]이 출금액:{$amount}보다 부족합니다."); throw new \Exception("예치금액[{$entity->getAccountBalance()}]이 출금액:{$amount}보다 부족합니다.");
} }
$amount = $entity->getAccountBalance() - $amount; $amount = $entity->getAccountBalance() - $amount;
break; break;
case 'coupon_balance': default:
if ($entity->getCouponBalance() < $amount) { throw new \Exception("{$action}는 지정되지 않은 작업입니다.");
throw new \Exception("쿠폰[{$entity->getCouponBalance()}]이 사용수:{$amount}보다 부족합니다."); // break;
} }
$amount = $entity->getCouponBalance() - $amount; return parent::modify($entity, ['account_balance' => $amount]);
}
//쿠폰처리
final public function setCoupon(string $action, ClientEntity $entity, int $cnt): ClientEntity
{
switch ($action) {
case STATUS['DEPOSIT']:
if ($cnt < 0) {
throw new \Exception("쿠폰수가 0보다 작습니다.");
}
$cnt += $entity->getCouponBalance();
break; break;
case 'point_balance': case STATUS['WITHDRAWAL']:
if ($entity->getCouponBalance() < $cnt) {
throw new \Exception("쿠폰수[{$entity->getCouponBalance()}]가 사용쿠폰:{$cnt}보다 부족합니다.");
}
$cnt = $entity->getCouponBalance() - $cnt;
break;
default:
throw new \Exception("{$action}는 지정되지 않은 작업입니다.");
// break;
}
return parent::modify($entity, ['coupon_balance' => $cnt]);
}
//포인트처리
final public function setPoint(string $action, ClientEntity $entity, int $amount): ClientEntity
{
switch ($action) {
case STATUS['DEPOSIT']:
if ($amount < 0) {
throw new \Exception("포인트가 0보다 작습니다.");
}
$amount += $entity->getPointBalance();
break;
case STATUS['WITHDRAWAL']:
if ($entity->getPointBalance() < $amount) { if ($entity->getPointBalance() < $amount) {
throw new \Exception("포인트금액[{$entity->getPointBalance()}]이 출금액:{$amount}보다 부족합니다."); throw new \Exception("포인트금액[{$entity->getPointBalance()}]이 사용포인트:{$amount}보다 부족합니다.");
} }
$amount = $entity->getPointBalance() - $amount; $amount = $entity->getPointBalance() - $amount;
break; break;
default: default:
throw new \Exception("{$field}는 알수없는 Field가 정의되었습니다."); throw new \Exception("{$action}는 지정되지 않은 작업입니다.");
// break; // break;
} }
// dd([$field => $amount]); return parent::modify($entity, ['point_balance' => $amount]);
return parent::modify($entity, [$field => $amount]);
} }
//기본 기능부분 //기본 기능부분
//생성 //생성

View File

@ -4,12 +4,10 @@ namespace App\Services\Customer;
use App\Entities\Customer\ClientEntity; use App\Entities\Customer\ClientEntity;
use App\Entities\Customer\CouponEntity; use App\Entities\Customer\CouponEntity;
use App\Entities\PaymentEntity;
use App\Helpers\Customer\CouponHelper; use App\Helpers\Customer\CouponHelper;
use App\Interfaces\PaymentInterface;
use App\Models\Customer\CouponModel; use App\Models\Customer\CouponModel;
class CouponService extends CustomerService implements PaymentInterface class CouponService extends CustomerService
{ {
public function __construct() public function __construct()
{ {
@ -36,45 +34,22 @@ class CouponService extends CustomerService implements PaymentInterface
{ {
return ['status']; return ['status'];
} }
public function setPayment(string $action, PaymentEntity $paymentEntity, array $paymentDatas): PaymentEntity //고객쿠폰처리
private function setBalance(array $formDatas): ClientEntity
{ {
switch ($action) { if (!array_key_exists('clientinfo_uid', $formDatas)) {
case 'create': throw new \Exception("고객정보가 필요합니다.");
$this->create([
'clientinfo_uid' => $paymentEntity->getClientInfoUID(),
'bank' => null,
'title' => "[결제차감] {$paymentEntity->getTitle()}",
'alias' => array_key_exists('alias', $paymentDatas) ? $paymentDatas['alias'] : null,
'amount' => $paymentEntity->getAmount(),
'status' => STATUS['WIDTHDRAWAL'],
]);
break;
// case 'update':
// case 'delete':
default:
throw new \Exception(__METHOD__ . "에서 오류발생: {$action}는 지원하지 않는 기능입니다.");
} }
return $paymentEntity;
}
//기본 기능부분
//고객예치금처리
private function setBalance(array $formDatas): void
{
//coupon_balance 체크
$entity = $this->getClientService()->getEntity($formDatas['clientinfo_uid']); $entity = $this->getClientService()->getEntity($formDatas['clientinfo_uid']);
if (!$entity instanceof ClientEntity) { if (!$entity instanceof ClientEntity) {
throw new \Exception("{$formDatas['clientinfo_uid']}에 대한 고객정보를 찾을수 없습니다."); throw new \Exception("{$formDatas['clientinfo_uid']}에 대한 고객정보를 찾을수 없습니다.");
} }
$cnt = intval($formDatas['cnt']); return $this->getClientService()->setCoupon($formDatas['status'], $entity, intval($formDatas['cnt']));
if ($formDatas['status'] === CouponEntity::DEFAULT_STATUS) { //입금, 쿠폰추가
$entity = $this->getClientService()->deposit($entity, 'coupon_balance', $cnt);
} else { // 출금, 쿠폰사용
$entity = $this->getClientService()->withdrawal($entity, 'coupon_balance', $cnt);
}
} }
//기본 기능부분
public function create(array $formDatas): CouponEntity public function create(array $formDatas): CouponEntity
{ {
// dd($formDatas);
$this->setBalance($formDatas); $this->setBalance($formDatas);
return parent::create($formDatas); return parent::create($formDatas);
} }

View File

@ -4,12 +4,10 @@ namespace App\Services\Customer;
use App\Entities\Customer\ClientEntity; use App\Entities\Customer\ClientEntity;
use App\Entities\Customer\PointEntity; use App\Entities\Customer\PointEntity;
use App\Entities\PaymentEntity;
use App\Helpers\Customer\PointHelper; use App\Helpers\Customer\PointHelper;
use App\Interfaces\PaymentInterface;
use App\Models\Customer\PointModel; use App\Models\Customer\PointModel;
class PointService extends CustomerService implements PaymentInterface class PointService extends CustomerService
{ {
private ?ClientService $_clientService = null; private ?ClientService $_clientService = null;
public function __construct() public function __construct()
@ -44,41 +42,19 @@ class PointService extends CustomerService implements PaymentInterface
} }
return $this->_clientService; return $this->_clientService;
} }
public function setPayment(string $action, PaymentEntity $paymentEntity, array $paymentDatas): PaymentEntity //고객 포인트 처리
private function setBalance(array $formDatas): ClientEntity
{ {
switch ($action) { if (!array_key_exists('clientinfo_uid', $formDatas)) {
case 'create': throw new \Exception("고객정보가 필요합니다.");
$this->create([
'clientinfo_uid' => $paymentEntity->getClientInfoUID(),
'bank' => null,
'title' => "[결제차감] {$paymentEntity->getTitle()}",
'alias' => array_key_exists('alias', $paymentDatas) ? $paymentDatas['alias'] : null,
'amount' => $paymentEntity->getAmount(),
'status' => STATUS['WIDTHDRAWAL'],
]);
break;
// case 'update':
// case 'delete':
default:
throw new \Exception(__METHOD__ . "에서 오류발생: {$action}는 지원하지 않는 기능입니다.");
} }
return $paymentEntity;
}
//기본 기능부분
private function setBalance(array $formDatas): void
{
//point_balance 체크
$entity = $this->getClientService()->getEntity($formDatas['clientinfo_uid']); $entity = $this->getClientService()->getEntity($formDatas['clientinfo_uid']);
if (!$entity instanceof ClientEntity) { if (!$entity instanceof ClientEntity) {
throw new \Exception("{$formDatas['clientinfo_uid']}에 대한 고객정보를 찾을수 없습니다."); throw new \Exception("{$formDatas['clientinfo_uid']}에 대한 고객정보를 찾을수 없습니다.");
} }
$amount = intval($formDatas['amount']); return $this->getClientService()->setPoint($formDatas['status'], $entity, intval($formDatas['amount']));
if ($formDatas['status'] === PointEntity::DEFAULT_STATUS) { //입금, 쿠폰추가
$entity = $this->getClientService()->deposit($entity, 'point_balance', $amount);
} else { // 출금, 쿠폰사용
$entity = $this->getClientService()->withdrawal($entity, 'point_balance', $amount);
}
} }
//기본 기능부분
public function create(array $formDatas): PointEntity public function create(array $formDatas): PointEntity
{ {
$this->setBalance($formDatas); $this->setBalance($formDatas);

View File

@ -2,8 +2,6 @@
namespace App\Services; namespace App\Services;
use App\Entities\Customer\AccountEntity;
use App\Entities\Customer\ClientEntity;
use App\Entities\Customer\ServiceEntity; use App\Entities\Customer\ServiceEntity;
use App\Entities\Equipment\ServerPartEntity; use App\Entities\Equipment\ServerPartEntity;
use App\Entities\PaymentEntity; use App\Entities\PaymentEntity;
@ -14,8 +12,6 @@ use App\Models\PaymentModel;
use App\Services\CommonService; use App\Services\CommonService;
use App\Services\Customer\AccountService; use App\Services\Customer\AccountService;
use App\Services\Customer\ClientService; use App\Services\Customer\ClientService;
use App\Services\Customer\CouponService;
use App\Services\Customer\PointService;
use App\Services\Customer\ServiceService; use App\Services\Customer\ServiceService;
use App\Services\Equipment\ServerPartService; use App\Services\Equipment\ServerPartService;
use App\Services\UserService; use App\Services\UserService;
@ -27,8 +23,6 @@ class PaymentService extends CommonService implements ServiceInterface, ServerPa
private ?ServiceService $_serviceService = null; private ?ServiceService $_serviceService = null;
private ?ServerPartService $_serverPartService = null; private ?ServerPartService $_serverPartService = null;
private ?AccountService $_accountService = null; private ?AccountService $_accountService = null;
private ?CouponService $_couponService = null;
private ?PointService $_pointService = null;
public function __construct() public function __construct()
{ {
parent::__construct(new PaymentModel(), new PaymentHelper()); parent::__construct(new PaymentModel(), new PaymentHelper());
@ -74,12 +68,12 @@ class PaymentService extends CommonService implements ServiceInterface, ServerPa
} }
final public function getBatchjobFields(): array final public function getBatchjobFields(): array
{ {
return ['pay']; return [];
} }
final public function getBatchjobButtons(): array final public function getBatchjobButtons(): array
{ {
return [ return [
'batchjob' => '일괄 결제 ', 'batchjob' => '결제 처리',
'invoice' => '청구서 발행', 'invoice' => '청구서 발행',
]; ];
} }
@ -118,20 +112,6 @@ class PaymentService extends CommonService implements ServiceInterface, ServerPa
} }
return $this->_accountService; return $this->_accountService;
} }
final public function getCouponService(): CouponService
{
if (!$this->_couponService) {
$this->_couponService = new CouponService();
}
return $this->_couponService;
}
final public function getPointService(): PointService
{
if (!$this->_pointService) {
$this->_pointService = new PointService();
}
return $this->_pointService;
}
//총 미납건수, 금액 //총 미납건수, 금액
final public function getUnPaids(string $group, array $where = []): array final public function getUnPaids(string $group, array $where = []): array
{ {
@ -234,6 +214,7 @@ class PaymentService extends CommonService implements ServiceInterface, ServerPa
return $options; return $options;
} }
//Action 기능 //Action 기능
//일회성등록(일회성은 예치금에 관련된것만 등록한다.)
public function create(array $formDatas): PaymentEntity public function create(array $formDatas): PaymentEntity
{ {
if (!array_key_exists('serviceinfo_uid', $formDatas)) { if (!array_key_exists('serviceinfo_uid', $formDatas)) {
@ -244,36 +225,18 @@ class PaymentService extends CommonService implements ServiceInterface, ServerPa
if (!$serviceEntity instanceof ServiceEntity) { if (!$serviceEntity instanceof ServiceEntity) {
throw new \Exception(__METHOD__ . "에서 오류발생: 서비스정보[{$formDatas['serviceinfo_uid']}]를 찾을수 없습니다."); throw new \Exception(__METHOD__ . "에서 오류발생: 서비스정보[{$formDatas['serviceinfo_uid']}]를 찾을수 없습니다.");
} }
//결제 완료 처리 후 추가정보 처리
$formDatas['clientinfo_uid'] = $serviceEntity->getClientInfoUID(); $formDatas['clientinfo_uid'] = $serviceEntity->getClientInfoUID();
return parent::create($formDatas); return parent::create($formDatas);
} }
//일괄처리작업(결제작업) //일괄결제처리(결제는 무조건 예치금으로만 처리)
public function batchjob(mixed $entity, array $formDatas): mixed public function batchjob(mixed $entity, array $formDatas): mixed
{ {
if (!array_key_exists('pay', $formDatas)) {
throw new \Exception(__METHOD__ . "에서 오류발생: 결제상태(pay) 정보가 없습니다.");
}
//결제 완료 처리 후 추가정보 처리 //결제 완료 처리 후 추가정보 처리
$formDatas['status'] = STATUS['PAID']; $formDatas['status'] = STATUS['PAID'];
$entity = parent::batchjob($entity, $formDatas); $entity = parent::batchjob($entity, $formDatas);
switch ($formDatas['pay']) { //예치금처리
case PAYMENT['PAY']['ACCOUNT']: return $this->getAccountService()->setPayment('create', $entity, []);
//예치금 출금 등록처리 후 결제정보 반환
$entity = $this->getAccountService()->setPayment('create', $entity, []);
break;
case PAYMENT['PAY']['COUPON']:
//쿠폰 사용 등록처리 후 결제정보 반환
$entity = $this->getCouponService()->setPayment('create', $entity, []);
break;
case PAYMENT['PAY']['POINT']:
//포인트 출금 등록처리 후 결제정보 반환
$entity = $this->getCouponService()->setPayment('create', $entity, []);
break;
default:
throw new \Exception(__METHOD__ . "에서 오류발생: 알수없는 결제방법(pay)입니다.");
// break;
}
return $entity;
} }
//List 검색용 //List 검색용
//OrderBy 처리 //OrderBy 처리

View File

@ -34,7 +34,6 @@
<th>테스트</th> <th>테스트</th>
<th>대체</th> <th>대체</th>
<th>쿠폰</th> <th>쿠폰</th>
<th>장기할인</th>
<th>예치금</th> <th>예치금</th>
<th>전체요금</th> <th>전체요금</th>
<th>전체미납금</th> <th>전체미납금</th>
@ -49,9 +48,8 @@
<td><?= $viewDatas['totalCounts']['event']['summary'] ?></td> <td><?= $viewDatas['totalCounts']['event']['summary'] ?></td>
<td><?= $viewDatas['totalCounts']['test']['summary'] ?></td> <td><?= $viewDatas['totalCounts']['test']['summary'] ?></td>
<td><?= $viewDatas['totalCounts']['alternative']['summary'] ?></td> <td><?= $viewDatas['totalCounts']['alternative']['summary'] ?></td>
<td><?= $viewDatas['entity']->getCouponBalance() ?>%</td> <td><?= $viewDatas['service']->getHelper()->getListButton("coupon", $viewDatas['entity']->getCouponBalance(), $viewDatas) ?></td>
<td><?= $viewDatas['entity']->getSaleRate() ?>%</td> <td><?= $viewDatas['service']->getHelper()->getListButton("account", number_format($viewDatas['entity']->getAccountBalance()) . "", $viewDatas) ?></td>
<td><?= number_format($viewDatas['entity']->getAccountBalance()) ?>원</td>
<td><?= array_key_exists($viewDatas['entity']->getPK(), $viewDatas['totalAmounts']) ? number_format($viewDatas['totalAmounts'][$viewDatas['entity']->getPK()]) : 0 ?>원</td> <td><?= array_key_exists($viewDatas['entity']->getPK(), $viewDatas['totalAmounts']) ? number_format($viewDatas['totalAmounts'][$viewDatas['entity']->getPK()]) : 0 ?>원</td>
<td> <td>
<?php if (array_key_exists($viewDatas['entity']->getPK(), $viewDatas['unPaids'])): ?> <?php if (array_key_exists($viewDatas['entity']->getPK(), $viewDatas['unPaids'])): ?>

View File

@ -35,7 +35,7 @@
<tr> <tr>
<th class="p-0">코드</th> <th class="p-0">코드</th>
<th class="p-0">항목</th> <th class="p-0">항목</th>
<th class="p-0">지급기한</th> <th class="p-0">결제일</th>
</tr> </tr>
<?php foreach ($row['services'] as $service): ?> <?php foreach ($row['services'] as $service): ?>
<tr> <tr>
@ -46,7 +46,6 @@
<li class="m-0 p-0"> <li class="m-0 p-0">
<div class="row align-items-start p-0"> <div class="row align-items-start p-0">
<div class="col text-start"><?= $item['title'] ?></div> <div class="col text-start"><?= $item['title'] ?></div>
<div class="col text-nowrap"><?= number_format($item['amount']) ?>원</div>
<div class="col text-end text-nowrap"><?= number_format($item['amount']) ?>원</div> <div class="col text-end text-nowrap"><?= number_format($item['amount']) ?>원</div>
</div> </div>
</li> </li>

View File

@ -7,7 +7,7 @@
===========================<BR> ===========================<BR>
<ol> <ol>
<?php foreach ($row['services'] as $service): ?> <?php foreach ($row['services'] as $service): ?>
<li class="p-0">서비스:<?= $service['code'] ?> , 납부기한:<?= $service['billing_at'] ?></li> <li class="p-0">서비스:<?= $service['code'] ?> , 결제일:<?= $service['billing_at'] ?></li>
<?php endforeach; ?> <?php endforeach; ?>
</ol> </ol>
===========================<BR> ===========================<BR>