dbmsv3 init...1
This commit is contained in:
parent
2c207d1d38
commit
a36382ad18
@ -384,7 +384,7 @@ define("STATUS", [
|
||||
'FAILED' => "fail",
|
||||
'PAUSE' => "pause",
|
||||
'TERMINATED' => "terminated",
|
||||
'WIDTHDRAWAL' => "widthdrawal",
|
||||
'WITHDRAWAL' => "withdrawal",
|
||||
'DEPOSIT' => "deposit",
|
||||
'PAID' => 'paid',
|
||||
'UNPAID' => 'unpaid',
|
||||
|
||||
@ -118,7 +118,7 @@ class PaymentController extends CustomerController
|
||||
}
|
||||
}
|
||||
|
||||
//일회성관련
|
||||
//일회성결제작업
|
||||
protected function create_form_process(): void
|
||||
{
|
||||
$formDatas = $this->getService()->getFormDatas();
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -26,10 +26,6 @@ class ClientEntity extends CustomerEntity
|
||||
{
|
||||
return $this->attributes['role'] ?? "";
|
||||
}
|
||||
public function getSaleRate(): int
|
||||
{
|
||||
return $this->attributes['sale_rate'] ?? 0;
|
||||
}
|
||||
public function getAccountBalance(): int
|
||||
{
|
||||
return $this->attributes['account_balance'] ?? 0;
|
||||
|
||||
@ -94,6 +94,24 @@ class ClientHelper extends CustomerHelper
|
||||
]
|
||||
);
|
||||
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:
|
||||
$action = parent::getListButton($action, $label, $viewDatas, $extras);
|
||||
break;
|
||||
|
||||
@ -22,6 +22,6 @@ return [
|
||||
],
|
||||
"STATUS" => [
|
||||
STATUS['DEPOSIT'] => "입금",
|
||||
STATUS['WIDTHDRAWAL'] => "출금",
|
||||
STATUS['WITHDRAWAL'] => "출금",
|
||||
],
|
||||
];
|
||||
|
||||
@ -12,6 +12,6 @@ return [
|
||||
],
|
||||
"STATUS" => [
|
||||
STATUS['DEPOSIT'] => "추가",
|
||||
STATUS['WIDTHDRAWAL'] => "사용",
|
||||
STATUS['WITHDRAWAL'] => "사용",
|
||||
],
|
||||
];
|
||||
|
||||
@ -12,6 +12,6 @@ return [
|
||||
],
|
||||
"STATUS" => [
|
||||
STATUS['DEPOSIT'] => "입금",
|
||||
STATUS['WIDTHDRAWAL'] => "출금",
|
||||
STATUS['WITHDRAWAL'] => "출금",
|
||||
],
|
||||
];
|
||||
|
||||
@ -48,13 +48,13 @@ class PaymentModel extends CommonModel
|
||||
break;
|
||||
case "title":
|
||||
case "billing":
|
||||
case "pay":
|
||||
case "status":
|
||||
$rule = "required|trim|string";
|
||||
break;
|
||||
case "billing_at":
|
||||
$rule = "required|valid_date";
|
||||
break;
|
||||
case "pay":
|
||||
case "content":
|
||||
$rule = "permit_empty|trim|string";
|
||||
break;
|
||||
|
||||
@ -48,21 +48,35 @@ class AccountService extends CustomerService implements PaymentInterface
|
||||
}
|
||||
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
|
||||
{
|
||||
switch ($action) {
|
||||
case 'create':
|
||||
$this->create([
|
||||
$formDatas = [
|
||||
'clientinfo_uid' => $paymentEntity->getClientInfoUID(),
|
||||
'bank' => null,
|
||||
'title' => "[결제차감] {$paymentEntity->getTitle()}",
|
||||
'issue_at' => date('Y-m-d H:i:s'),
|
||||
'alias' => array_key_exists('alias', $paymentDatas) ? $paymentDatas['alias'] : null,
|
||||
'amount' => $paymentEntity->getAmount(),
|
||||
'status' => STATUS['WIDTHDRAWAL'],
|
||||
]);
|
||||
'bank' => null,
|
||||
'title' => "[결제차감] {$paymentEntity->getTitle()}",
|
||||
'issue_at' => date('Y-m-d H:i:s'),
|
||||
'alias' => array_key_exists('alias', $paymentDatas) ? $paymentDatas['alias'] : null,
|
||||
'amount' => $paymentEntity->getAmount(),
|
||||
'status' => STATUS['WITHDRAWAL'],
|
||||
];
|
||||
$this->setBalance($formDatas);
|
||||
$this->create($formDatas);
|
||||
break;
|
||||
// case 'update':
|
||||
// case 'modify':
|
||||
// case 'delete':
|
||||
default:
|
||||
throw new \Exception(__METHOD__ . "에서 오류발생: {$action}는 지원하지 않는 기능입니다.");
|
||||
@ -70,25 +84,6 @@ class AccountService extends CustomerService implements PaymentInterface
|
||||
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
|
||||
{
|
||||
|
||||
@ -86,62 +86,71 @@ class ClientService extends CustomerService
|
||||
}
|
||||
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) {
|
||||
case 'account_balance':
|
||||
switch ($action) {
|
||||
case STATUS['DEPOSIT']:
|
||||
if ($amount < 0) {
|
||||
throw new \Exception("입금액이 0보다 작습니다.");
|
||||
throw new \Exception("예치금이 0보다 작습니다.");
|
||||
}
|
||||
$amount += $entity->getAccountBalance();
|
||||
break;
|
||||
case 'coupon_balance':
|
||||
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':
|
||||
case STATUS['WITHDRAWAL']:
|
||||
if ($entity->getAccountBalance() < $amount) {
|
||||
throw new \Exception("예치금[{$entity->getAccountBalance()}]이 출금액:{$amount}보다 부족합니다.");
|
||||
throw new \Exception("예치금액[{$entity->getAccountBalance()}]이 출금액:{$amount}보다 부족합니다.");
|
||||
}
|
||||
$amount = $entity->getAccountBalance() - $amount;
|
||||
break;
|
||||
case 'coupon_balance':
|
||||
if ($entity->getCouponBalance() < $amount) {
|
||||
throw new \Exception("쿠폰[{$entity->getCouponBalance()}]이 사용수:{$amount}보다 부족합니다.");
|
||||
default:
|
||||
throw new \Exception("{$action}는 지정되지 않은 작업입니다.");
|
||||
// break;
|
||||
}
|
||||
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보다 작습니다.");
|
||||
}
|
||||
$amount = $entity->getCouponBalance() - $amount;
|
||||
$cnt += $entity->getCouponBalance();
|
||||
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) {
|
||||
throw new \Exception("포인트금액[{$entity->getPointBalance()}]이 출금액:{$amount}보다 부족합니다.");
|
||||
throw new \Exception("포인트금액[{$entity->getPointBalance()}]이 사용포인트:{$amount}보다 부족합니다.");
|
||||
}
|
||||
$amount = $entity->getPointBalance() - $amount;
|
||||
break;
|
||||
default:
|
||||
throw new \Exception("{$field}는 알수없는 Field가 정의되었습니다.");
|
||||
throw new \Exception("{$action}는 지정되지 않은 작업입니다.");
|
||||
// break;
|
||||
}
|
||||
// dd([$field => $amount]);
|
||||
return parent::modify($entity, [$field => $amount]);
|
||||
return parent::modify($entity, ['point_balance' => $amount]);
|
||||
}
|
||||
//기본 기능부분
|
||||
//생성
|
||||
|
||||
@ -4,12 +4,10 @@ namespace App\Services\Customer;
|
||||
|
||||
use App\Entities\Customer\ClientEntity;
|
||||
use App\Entities\Customer\CouponEntity;
|
||||
use App\Entities\PaymentEntity;
|
||||
use App\Helpers\Customer\CouponHelper;
|
||||
use App\Interfaces\PaymentInterface;
|
||||
use App\Models\Customer\CouponModel;
|
||||
|
||||
class CouponService extends CustomerService implements PaymentInterface
|
||||
class CouponService extends CustomerService
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
@ -36,45 +34,22 @@ class CouponService extends CustomerService implements PaymentInterface
|
||||
{
|
||||
return ['status'];
|
||||
}
|
||||
public function setPayment(string $action, PaymentEntity $paymentEntity, array $paymentDatas): PaymentEntity
|
||||
//고객쿠폰처리
|
||||
private function setBalance(array $formDatas): ClientEntity
|
||||
{
|
||||
switch ($action) {
|
||||
case 'create':
|
||||
$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}는 지원하지 않는 기능입니다.");
|
||||
if (!array_key_exists('clientinfo_uid', $formDatas)) {
|
||||
throw new \Exception("고객정보가 필요합니다.");
|
||||
}
|
||||
return $paymentEntity;
|
||||
}
|
||||
//기본 기능부분
|
||||
|
||||
//고객예치금처리
|
||||
private function setBalance(array $formDatas): void
|
||||
{
|
||||
//coupon_balance 체크
|
||||
$entity = $this->getClientService()->getEntity($formDatas['clientinfo_uid']);
|
||||
if (!$entity instanceof ClientEntity) {
|
||||
throw new \Exception("{$formDatas['clientinfo_uid']}에 대한 고객정보를 찾을수 없습니다.");
|
||||
}
|
||||
$cnt = 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);
|
||||
}
|
||||
return $this->getClientService()->setCoupon($formDatas['status'], $entity, intval($formDatas['cnt']));
|
||||
}
|
||||
//기본 기능부분
|
||||
public function create(array $formDatas): CouponEntity
|
||||
{
|
||||
// dd($formDatas);
|
||||
$this->setBalance($formDatas);
|
||||
return parent::create($formDatas);
|
||||
}
|
||||
|
||||
@ -4,12 +4,10 @@ namespace App\Services\Customer;
|
||||
|
||||
use App\Entities\Customer\ClientEntity;
|
||||
use App\Entities\Customer\PointEntity;
|
||||
use App\Entities\PaymentEntity;
|
||||
use App\Helpers\Customer\PointHelper;
|
||||
use App\Interfaces\PaymentInterface;
|
||||
use App\Models\Customer\PointModel;
|
||||
|
||||
class PointService extends CustomerService implements PaymentInterface
|
||||
class PointService extends CustomerService
|
||||
{
|
||||
private ?ClientService $_clientService = null;
|
||||
public function __construct()
|
||||
@ -44,41 +42,19 @@ class PointService extends CustomerService implements PaymentInterface
|
||||
}
|
||||
return $this->_clientService;
|
||||
}
|
||||
public function setPayment(string $action, PaymentEntity $paymentEntity, array $paymentDatas): PaymentEntity
|
||||
//고객 포인트 처리
|
||||
private function setBalance(array $formDatas): ClientEntity
|
||||
{
|
||||
switch ($action) {
|
||||
case 'create':
|
||||
$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}는 지원하지 않는 기능입니다.");
|
||||
if (!array_key_exists('clientinfo_uid', $formDatas)) {
|
||||
throw new \Exception("고객정보가 필요합니다.");
|
||||
}
|
||||
return $paymentEntity;
|
||||
}
|
||||
//기본 기능부분
|
||||
private function setBalance(array $formDatas): void
|
||||
{
|
||||
//point_balance 체크
|
||||
$entity = $this->getClientService()->getEntity($formDatas['clientinfo_uid']);
|
||||
if (!$entity instanceof ClientEntity) {
|
||||
throw new \Exception("{$formDatas['clientinfo_uid']}에 대한 고객정보를 찾을수 없습니다.");
|
||||
}
|
||||
$amount = 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);
|
||||
}
|
||||
return $this->getClientService()->setPoint($formDatas['status'], $entity, intval($formDatas['amount']));
|
||||
}
|
||||
//기본 기능부분
|
||||
public function create(array $formDatas): PointEntity
|
||||
{
|
||||
$this->setBalance($formDatas);
|
||||
|
||||
@ -2,8 +2,6 @@
|
||||
|
||||
namespace App\Services;
|
||||
|
||||
use App\Entities\Customer\AccountEntity;
|
||||
use App\Entities\Customer\ClientEntity;
|
||||
use App\Entities\Customer\ServiceEntity;
|
||||
use App\Entities\Equipment\ServerPartEntity;
|
||||
use App\Entities\PaymentEntity;
|
||||
@ -14,8 +12,6 @@ use App\Models\PaymentModel;
|
||||
use App\Services\CommonService;
|
||||
use App\Services\Customer\AccountService;
|
||||
use App\Services\Customer\ClientService;
|
||||
use App\Services\Customer\CouponService;
|
||||
use App\Services\Customer\PointService;
|
||||
use App\Services\Customer\ServiceService;
|
||||
use App\Services\Equipment\ServerPartService;
|
||||
use App\Services\UserService;
|
||||
@ -27,8 +23,6 @@ class PaymentService extends CommonService implements ServiceInterface, ServerPa
|
||||
private ?ServiceService $_serviceService = null;
|
||||
private ?ServerPartService $_serverPartService = null;
|
||||
private ?AccountService $_accountService = null;
|
||||
private ?CouponService $_couponService = null;
|
||||
private ?PointService $_pointService = null;
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct(new PaymentModel(), new PaymentHelper());
|
||||
@ -74,12 +68,12 @@ class PaymentService extends CommonService implements ServiceInterface, ServerPa
|
||||
}
|
||||
final public function getBatchjobFields(): array
|
||||
{
|
||||
return ['pay'];
|
||||
return [];
|
||||
}
|
||||
final public function getBatchjobButtons(): array
|
||||
{
|
||||
return [
|
||||
'batchjob' => '일괄 결제 ',
|
||||
'batchjob' => '결제 처리',
|
||||
'invoice' => '청구서 발행',
|
||||
];
|
||||
}
|
||||
@ -118,20 +112,6 @@ class PaymentService extends CommonService implements ServiceInterface, ServerPa
|
||||
}
|
||||
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
|
||||
{
|
||||
@ -234,6 +214,7 @@ class PaymentService extends CommonService implements ServiceInterface, ServerPa
|
||||
return $options;
|
||||
}
|
||||
//Action 기능
|
||||
//일회성등록(일회성은 예치금에 관련된것만 등록한다.)
|
||||
public function create(array $formDatas): PaymentEntity
|
||||
{
|
||||
if (!array_key_exists('serviceinfo_uid', $formDatas)) {
|
||||
@ -244,36 +225,18 @@ class PaymentService extends CommonService implements ServiceInterface, ServerPa
|
||||
if (!$serviceEntity instanceof ServiceEntity) {
|
||||
throw new \Exception(__METHOD__ . "에서 오류발생: 서비스정보[{$formDatas['serviceinfo_uid']}]를 찾을수 없습니다.");
|
||||
}
|
||||
//결제 완료 처리 후 추가정보 처리
|
||||
$formDatas['clientinfo_uid'] = $serviceEntity->getClientInfoUID();
|
||||
return parent::create($formDatas);
|
||||
}
|
||||
//일괄처리작업(결제작업)
|
||||
//일괄결제처리(결제는 무조건 예치금으로만 처리)
|
||||
public function batchjob(mixed $entity, array $formDatas): mixed
|
||||
{
|
||||
if (!array_key_exists('pay', $formDatas)) {
|
||||
throw new \Exception(__METHOD__ . "에서 오류발생: 결제상태(pay) 정보가 없습니다.");
|
||||
}
|
||||
//결제 완료 처리 후 추가정보 처리
|
||||
$formDatas['status'] = STATUS['PAID'];
|
||||
$entity = parent::batchjob($entity, $formDatas);
|
||||
switch ($formDatas['pay']) {
|
||||
case PAYMENT['PAY']['ACCOUNT']:
|
||||
//예치금 출금 등록처리 후 결제정보 반환
|
||||
$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;
|
||||
//예치금처리
|
||||
return $this->getAccountService()->setPayment('create', $entity, []);
|
||||
}
|
||||
//List 검색용
|
||||
//OrderBy 처리
|
||||
|
||||
@ -34,7 +34,6 @@
|
||||
<th>테스트</th>
|
||||
<th>대체</th>
|
||||
<th>쿠폰</th>
|
||||
<th>장기할인</th>
|
||||
<th>예치금</th>
|
||||
<th>전체요금</th>
|
||||
<th>전체미납금</th>
|
||||
@ -49,13 +48,12 @@
|
||||
<td><?= $viewDatas['totalCounts']['event']['summary'] ?></td>
|
||||
<td><?= $viewDatas['totalCounts']['test']['summary'] ?></td>
|
||||
<td><?= $viewDatas['totalCounts']['alternative']['summary'] ?></td>
|
||||
<td><?= $viewDatas['entity']->getCouponBalance() ?>%</td>
|
||||
<td><?= $viewDatas['entity']->getSaleRate() ?>%</td>
|
||||
<td><?= number_format($viewDatas['entity']->getAccountBalance()) ?>원</td>
|
||||
<td><?= $viewDatas['service']->getHelper()->getListButton("coupon", $viewDatas['entity']->getCouponBalance(), $viewDatas) ?></td>
|
||||
<td><?= $viewDatas['service']->getHelper()->getListButton("account", number_format($viewDatas['entity']->getAccountBalance()) . "원", $viewDatas) ?></td>
|
||||
<td><?= array_key_exists($viewDatas['entity']->getPK(), $viewDatas['totalAmounts']) ? number_format($viewDatas['totalAmounts'][$viewDatas['entity']->getPK()]) : 0 ?>원</td>
|
||||
<td>
|
||||
<?php if (array_key_exists($viewDatas['entity']->getPK(), $viewDatas['unPaids'])): ?>
|
||||
총 <a href="/admin/customer/payment?clientinfo_uid=<?= $viewDatas['entity']->getPK() ?>&status=unpaid"><?= $viewDatas['unPaids'][$viewDatas['entity']->getPK()]['cnt'] ?>건/<?= number_format($viewDatas['unPaids'][$viewDatas['entity']->getPK()]['amount']) ?></a>원
|
||||
총 <a href=" /admin/customer/payment?clientinfo_uid=<?= $viewDatas['entity']->getPK() ?>&status=unpaid"><?= $viewDatas['unPaids'][$viewDatas['entity']->getPK()]['cnt'] ?>건/<?= number_format($viewDatas['unPaids'][$viewDatas['entity']->getPK()]['amount']) ?></a>원
|
||||
<?php else: ?>
|
||||
0원
|
||||
<?php endif ?>
|
||||
|
||||
@ -35,7 +35,7 @@
|
||||
<tr>
|
||||
<th class="p-0">코드</th>
|
||||
<th class="p-0">항목</th>
|
||||
<th class="p-0">지급기한</th>
|
||||
<th class="p-0">결제일</th>
|
||||
</tr>
|
||||
<?php foreach ($row['services'] as $service): ?>
|
||||
<tr>
|
||||
@ -46,7 +46,6 @@
|
||||
<li class="m-0 p-0">
|
||||
<div class="row align-items-start p-0">
|
||||
<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>
|
||||
</li>
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
===========================<BR>
|
||||
<ol>
|
||||
<?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; ?>
|
||||
</ol>
|
||||
===========================<BR>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user