dbmsv2 init...1
This commit is contained in:
parent
f2b2388da3
commit
6df8db1fa1
@ -28,18 +28,8 @@ class ServiceCell extends CustomerCell
|
||||
$this->getService()->setFormFilters();
|
||||
$this->getService()->setFormRules();
|
||||
$this->getService()->setFormOptions();
|
||||
$unPaids = [];
|
||||
$entities = [];
|
||||
foreach ($this->getService()->getEntities(['clientinfo_uid' => $params['clientinfo_uid']]) as $entity) {
|
||||
if (!array_key_exists($entity->getPK(), $unPaids)) {
|
||||
$unPaids[$entity->getPK()] = ['cnt' => 0, 'amount' => 0];
|
||||
}
|
||||
foreach ($this->getPaymentService()->getUnPaids('serviceinfo_uid', ['serviceinfo_uid' => $entity->getPK()]) as $unPaid) {
|
||||
$unPaids[$entity->getPK()]['cnt'] += $unPaid->cnt;
|
||||
$unPaids[$entity->getPK()]['amount'] += $unPaid->amount;
|
||||
}
|
||||
$entities[] = $entity;
|
||||
}
|
||||
$unPaids = $this->getPaymentService()->getUnPaids('serviceinfo_uid', ['clientinfo_uid' => $params['clientinfo_uid']]);
|
||||
$entities = $this->getService()->getEntities(['clientinfo_uid' => $params['clientinfo_uid']]);
|
||||
$template = array_key_exists('template', $params) ? $params['template'] : __FUNCTION__;
|
||||
return view('cells/service/' . $template, [
|
||||
'serviceCellDatas' => [
|
||||
|
||||
@ -77,9 +77,9 @@ class Home extends AdminController
|
||||
//서비스별 미납 Count
|
||||
$totalUnPaidCount = 0;
|
||||
$totalUnPaidAmount = 0;
|
||||
foreach ($this->getPaymentService()->getUnPaids('serviceinfo_uid') as $unPaid) {
|
||||
$totalUnPaidCount += $unPaid->cnt;
|
||||
$totalUnPaidAmount += $unPaid->amount;
|
||||
foreach ($this->getPaymentService()->getUnPaids('serviceinfo_uid') as $key => $datas) {
|
||||
$totalUnPaidCount += $datas['cnt'];
|
||||
$totalUnPaidAmount += $datas['amount'];
|
||||
}
|
||||
$this->totalUnPaidCount = $totalUnPaidCount;
|
||||
$this->totalUnPaidAmount = $totalUnPaidAmount;
|
||||
|
||||
@ -272,11 +272,11 @@ class CommonHelper
|
||||
// create, modify, create_form, modify_form일때 checkbox로 표시
|
||||
if (in_array($viewDatas['control']['action'], ['create_form', 'modify_form'])) {
|
||||
$forms = [];
|
||||
foreach ($viewDatas['control']['field_optons'][$field] as $key => $filterEntity) {
|
||||
foreach ($viewDatas['control']['field_optons'][$field] as $key => $label) {
|
||||
if ($key !== '') { // 빈값은 제외
|
||||
$values = is_array($value) ? $value : explode(DEFAULTS["DELIMITER_ROLE"], $value);
|
||||
//form_check에는 "class" => "form-control" 쓰면 않되거나 form-check를 써야함
|
||||
$forms[] = form_checkbox("{$field}[]", $key, in_array($key, $values), $extras) . $filterEntity->getTitle();
|
||||
$forms[] = form_checkbox("{$field}[]", $key, in_array($key, $values), $extras) . $label;
|
||||
}
|
||||
}
|
||||
$form = implode(" ", $forms);
|
||||
|
||||
@ -73,7 +73,7 @@ class ClientHelper extends CustomerHelper
|
||||
if (!$this->getMyAuth()->isAccessRole(['security'])) {
|
||||
$action = $viewDatas['entity']->getCode();
|
||||
} else {
|
||||
$action = parent::getListButton($action, $label ? $label : $viewDatas['entity']->getCode(), $viewDatas, $extras);
|
||||
$action = parent::getListButton($action, $label, $viewDatas, $extras);
|
||||
}
|
||||
break;
|
||||
case 'create':
|
||||
|
||||
@ -64,6 +64,9 @@ class ServiceHelper extends CustomerHelper
|
||||
$attributes = ['data-price' => 'getPrice'];
|
||||
$form = $this->form_dropdown_common($field, $value, $viewDatas, $extras, $attributes);
|
||||
break;
|
||||
case 'amount':
|
||||
$form = form_input($field, 0, ["readonly" => "readonly", ...$extras]);
|
||||
break;
|
||||
default:
|
||||
$form = parent::getFieldForm($field, $value, $viewDatas, $extras);
|
||||
break;
|
||||
@ -79,11 +82,12 @@ class ServiceHelper extends CustomerHelper
|
||||
case 'billing_at':
|
||||
if (array_key_exists('unPaids', $viewDatas)) {
|
||||
if (array_key_exists($viewDatas['entity']->getPK(), $viewDatas['unPaids'])) {
|
||||
foreach ($viewDatas['unPaids'] as $unPaid) {
|
||||
if ($unPaid->serviceinfo_uid = $viewDatas['entity']->getPK()) {
|
||||
$value .= "<div><a href=\"/admin/customer/payment?={$viewDatas['entity']->getPK()}\">미지급: <span style=\"color:red;\">" . $unPaid->cnt . "개,총 " . number_format($unPaid->amount) . "원</span></a></div>";
|
||||
}
|
||||
}
|
||||
$value .= sprintf(
|
||||
"<div><a href=\"/admin/customer/payment?serviceinfo_uid=%s\">미지급: <span style=\"color:red;\">%s개,총 %s원</span></a></div>",
|
||||
$viewDatas['entity']->getPK(),
|
||||
$viewDatas['unPaids'][$viewDatas['entity']->getPK()]['cnt'],
|
||||
number_format($viewDatas['unPaids'][$viewDatas['entity']->getPK()]['amount'])
|
||||
);
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -101,7 +105,7 @@ class ServiceHelper extends CustomerHelper
|
||||
{
|
||||
switch ($action) {
|
||||
case 'modify':
|
||||
$action = parent::getListButton($action, $label ? $label : $viewDatas['entity']->getCode(), $viewDatas, $extras);
|
||||
$action = parent::getListButton($action, $label, $viewDatas, $extras);
|
||||
break;
|
||||
case 'history':
|
||||
$extras = ["class" => "btn btn-outline btn-primary btn-circle", "target" => "_self", ...$extras];
|
||||
|
||||
@ -14,6 +14,14 @@ class ServerHelper extends EquipmentHelper
|
||||
public function getFieldForm(string $field, mixed $value, array $viewDatas, array $extras = []): string
|
||||
{
|
||||
switch ($field) {
|
||||
case 'clientinfo_uid':
|
||||
case 'serviceinfo_uid':
|
||||
$form = parent::getFieldForm($field, $value, $viewDatas, $extras);
|
||||
if (in_array($viewDatas['control']['action'], ['modify_form']) && $value) {
|
||||
$form = $this->getFieldView($field, $value, $viewDatas, $extras);
|
||||
$form .= form_hidden($field, (string)$value);
|
||||
}
|
||||
break;
|
||||
case 'code':
|
||||
// $extras['readonly'] = in_array($viewDatas['control']['action'], ['modify_form']) ? ' readonly' : '';
|
||||
$form = parent::getFieldForm($field, $value, $viewDatas, $extras);
|
||||
@ -57,7 +65,7 @@ class ServerHelper extends EquipmentHelper
|
||||
{
|
||||
switch ($action) {
|
||||
case 'modify':
|
||||
$action = parent::getListButton($action, $viewDatas['entity']->getCode(), $viewDatas, $extras);
|
||||
$action = parent::getListButton($action, $label ? $label : $viewDatas['entity']->getCode(), $viewDatas, $extras);
|
||||
break;
|
||||
case 'history':
|
||||
$extras = ["class" => "btn btn-outline btn-primary btn-circle", "target" => "_self", ...$extras];
|
||||
|
||||
@ -57,6 +57,18 @@ class ServerPartHelper extends EquipmentHelper
|
||||
$attributes = ['data-title' => 'getTitle', 'data-price' => 'getPrice'];
|
||||
$form = $this->form_dropdown_common($field, $value, $viewDatas, $extras, $attributes);
|
||||
break;
|
||||
case 'billing':
|
||||
//결제방식이 항상 매월지급으로 설정되는 항목형식(IP,CS)
|
||||
if (array_key_exists('type', $viewDatas['control']['form_datas'])) {
|
||||
switch ($viewDatas['control']['form_datas']['type']) {
|
||||
case 'IP':
|
||||
case 'CS':
|
||||
$value = PAYMENT['BILLING']['MONTH'];
|
||||
break;
|
||||
}
|
||||
}
|
||||
$form = parent::getFieldForm($field, $value, $viewDatas, $extras);;
|
||||
break;
|
||||
case 'extra':
|
||||
if (array_key_exists('type', $viewDatas['control']['form_datas']) && $viewDatas['control']['form_datas']['type'] === 'DISK') {
|
||||
$options = ["" => lang("{$viewDatas['class_path']}.label.{$field}") . " 선택", ...lang("{$viewDatas['class_path']}.EXTRA.{$viewDatas['control']['form_datas']['type']}")];
|
||||
|
||||
@ -19,7 +19,7 @@ class SwitchHelper extends EquipmentHelper
|
||||
if (!$this->getMyAuth()->isAccessRole(['security'])) {
|
||||
$action = $viewDatas['entity']->getCode();
|
||||
} else {
|
||||
$action = parent::getListButton($action, $viewDatas['entity']->getCode(), $viewDatas, $extras);
|
||||
$action = parent::getListButton($action, $label ? $label : $viewDatas['entity']->getCode(), $viewDatas, $extras);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
||||
@ -44,8 +44,25 @@ class PaymentHelper extends CommonHelper
|
||||
case 'batchjob_delete':
|
||||
$action = "";
|
||||
break;
|
||||
case 'modify':
|
||||
$oldBatchJobUids = old("batchjob_uids", null);
|
||||
$oldBatchJobUids = is_array($oldBatchJobUids) ? $oldBatchJobUids : [$oldBatchJobUids];
|
||||
$action = form_checkbox([
|
||||
"id" => "checkbox_uid_{$viewDatas['entity']->getPK()}",
|
||||
"name" => "batchjob_uids[]",
|
||||
"value" => $label ? $label : $viewDatas['entity']->getPK(),
|
||||
"class" => "batchjobuids_checkboxs",
|
||||
"checked" => in_array($viewDatas['entity']->getPK(), $oldBatchJobUids)
|
||||
]);
|
||||
if ($this->getMyAuth()->isAccessRole(['security'])) {
|
||||
$action = parent::getListButton($action, $label, $viewDatas, $extras);
|
||||
}
|
||||
break;
|
||||
case 'delete':
|
||||
$action = "";
|
||||
if ($this->getMyAuth()->isAccessRole(['security'])) {
|
||||
$action = $viewDatas['entity']->getStatus() !== $viewDatas['entity']::DEFAULT_STATUS ? "" : parent::getListButton($action, $label, $viewDatas, $extras);
|
||||
}
|
||||
break;
|
||||
case 'invoice':
|
||||
$action = form_submit($action . "_submit", $label ? $label : '청구서 발행', [
|
||||
|
||||
10
app/Interfaces/Customer/ServiceInterface.php
Normal file
10
app/Interfaces/Customer/ServiceInterface.php
Normal file
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace App\Interfaces\Customer;
|
||||
|
||||
use App\Entities\Equipment\ServerPartEntity;
|
||||
|
||||
interface ServiceInterface extends CustomerInterface
|
||||
{
|
||||
public function setServiceAmount(array $formDatas): ServerPartEntity;
|
||||
}
|
||||
@ -17,8 +17,8 @@ return [
|
||||
'countdown' => "납부기한",
|
||||
],
|
||||
"BILLING" => [
|
||||
"month" => "매월",
|
||||
"onetime" => "일회성",
|
||||
PAYMENT['BILLING']['MONTH'] => "매월",
|
||||
PAYMENT['BILLING']['ONETIME'] => "일회성",
|
||||
],
|
||||
"PAY" => [
|
||||
"account" => "예치금",
|
||||
|
||||
@ -73,7 +73,6 @@ abstract class CommonModel extends Model
|
||||
$data[8] = chr(ord($data[8]) & 0x3f | 0x80); // variant 10
|
||||
return vsprintf('%s%s-%s-%s-%s-%s%s%s', str_split(bin2hex($data), 4));
|
||||
}
|
||||
//기본 기능
|
||||
public function getFormRule(string $action, string $field): string
|
||||
{
|
||||
if (is_array($field)) {
|
||||
@ -111,7 +110,6 @@ abstract class CommonModel extends Model
|
||||
}
|
||||
return $rule;
|
||||
}
|
||||
// create, modify 직전 작업용 작업
|
||||
protected function convertFormDatas(string $action, string $field, array $formDatas): mixed
|
||||
{
|
||||
// 필드 값 존재 여부 확인
|
||||
@ -143,6 +141,7 @@ abstract class CommonModel extends Model
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
//기본 기능
|
||||
public function create(array $formDatas): mixed
|
||||
{
|
||||
$convertedFormDatas = [];
|
||||
|
||||
@ -61,6 +61,24 @@ class ServerModel extends EquipmentModel
|
||||
}
|
||||
return $rule;
|
||||
}
|
||||
protected function convertFormDatas(string $action, string $field, array $formDatas): mixed
|
||||
{
|
||||
// 필드 값 존재 여부 확인
|
||||
$value = array_key_exists($field, $formDatas) ? $formDatas[$field] : null;
|
||||
switch ($field) {
|
||||
case 'clientinfo_uid':
|
||||
case 'serviceinfo_uid':
|
||||
if ($value === '') {
|
||||
$value = null;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
$value = parent::convertFormDatas($action, $field, $formDatas);
|
||||
break;
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
//기본기능
|
||||
//create용 장비코드 마지막번호 가져오기
|
||||
final public function getLastestCode(string $format, int $default): string
|
||||
{
|
||||
|
||||
@ -122,15 +122,20 @@ class PaymentService extends CommonService implements ServerPartInterface
|
||||
$this->getModel()->orderBy('billing_at ASC');
|
||||
parent::setOrderBy($field, $value);
|
||||
}
|
||||
//총 미납건수, 금액
|
||||
//당일 기준으로 총 미납건수, 금액
|
||||
final public function getUnPaids(string $group, array $where = []): array
|
||||
{
|
||||
return $this->getModel()->groupBy($group)
|
||||
->select("serviceinfo_uid,COUNT(uid) as cnt, SUM(amount) as amount")
|
||||
$rows = $this->getModel()->groupBy($group)
|
||||
->select("{$group},COUNT(uid) as cnt, SUM(amount) as amount")
|
||||
->where(['billing_at <=' => date('Y-m-d')])
|
||||
->where(['status' => STATUS['UNPAID']])
|
||||
->where($where)
|
||||
->get()->getResult();
|
||||
$unPaids = [];
|
||||
foreach ($rows as $row) {
|
||||
$unPaids[$row->$group] = ['cnt' => $row->cnt, 'amount' => $row->amount];
|
||||
}
|
||||
return $unPaids;
|
||||
}
|
||||
//생성
|
||||
final public function create(array $formDatas): PaymentEntity
|
||||
@ -152,8 +157,10 @@ class PaymentService extends CommonService implements ServerPartInterface
|
||||
}
|
||||
public function setServerPart(ServerPartEntity $serverPartEntity, array $formDatas = []): ServerPartEntity
|
||||
{
|
||||
switch ($serverPartEntity->getBilling()) {
|
||||
case PAYMENT['BILLING']['MONTH']:
|
||||
if ($serverPartEntity->getServiceInfoUID() === null) {
|
||||
throw new \Exception("서비스정보가 정의된 후에만 가능합니다.");
|
||||
throw new \Exception(lang("{$this->getClassName()}.BILLING." . PAYMENT['BILLING']['MONTH']) . "지급 상품은 서비스정보가 정의된 후에만 가능합니다.");
|
||||
}
|
||||
//Service Entity 가져오기
|
||||
$serviceEntity = $this->getServiceService()->getEntity($serverPartEntity->getServiceInfoUID());
|
||||
@ -167,6 +174,16 @@ class PaymentService extends CommonService implements ServerPartInterface
|
||||
$formDatas['amount'] = $serviceEntity->getAmount() + $serverPartEntity->getAmount();
|
||||
$this->getServiceService()->modify($serviceEntity, $formDatas);
|
||||
}
|
||||
break;
|
||||
case PAYMENT['BILLING']['ONETIME']:
|
||||
if ($serverPartEntity->getServiceInfoUID() === null) {
|
||||
throw new \Exception(lang("{$this->getClassName()}.BILLING." . PAYMENT['BILLING']['ONETIME']) . "지급 상품은 서비스정보가 정의된 후에만 가능합니다.");
|
||||
}
|
||||
//Service Entity 가져오기
|
||||
$serviceEntity = $this->getServiceService()->getEntity($serverPartEntity->getServiceInfoUID());
|
||||
if (!$serviceEntity) {
|
||||
throw new \Exception("[{$serverPartEntity->getServiceInfoUID()}]에 대한 서비스정보를 찾을수 없습니다.");
|
||||
}
|
||||
//일회성인경우
|
||||
if ($serverPartEntity->getBilling() === PAYMENT['BILLING']['ONETIME']) {
|
||||
$formDatas['clientinfo_uid'] = $serverPartEntity->getClientInfoUID();
|
||||
@ -179,6 +196,8 @@ class PaymentService extends CommonService implements ServerPartInterface
|
||||
$formDatas['billing_at'] = $serverPartEntity->getBilling() === PAYMENT['BILLING']['ONETIME'] ? date("Y-m-d") : $serviceEntity->getBillingAT();
|
||||
$serverPartEntity = $this->setServerPart_process($serverPartEntity, $serviceEntity, $formDatas);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return $serverPartEntity;
|
||||
}
|
||||
//서비스정보용 등록
|
||||
|
||||
@ -63,7 +63,7 @@
|
||||
<td><?= $viewDatas['entity']->getSaleRate() ?>%</td>
|
||||
<td><?= $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['unPaids']) ? number_format($viewDatas['unPaids'][$viewDatas['entity']->getPK()]['amount']) : 0 ?></td>
|
||||
<td><?= array_key_exists($viewDatas['entity']->getPK(), $viewDatas['unPaids']) ? "총:" . $viewDatas['unPaids'][$viewDatas['entity']->getPK()]['cnt'] . "건/" . number_format($viewDatas['unPaids'][$viewDatas['entity']->getPK()]['amount']) : 0 ?>원</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@ -42,7 +42,7 @@
|
||||
<?= $viewDatas['service']->getHelper()->getListLabel('type', lang("{$viewDatas['class_path']}.label.type"), $viewDatas) ?>/
|
||||
<?= $viewDatas['service']->getHelper()->getListLabel('title', lang("{$viewDatas['class_path']}.label.title"), $viewDatas) ?>
|
||||
</th>
|
||||
<th class="index_head_short_column">
|
||||
<th class="index_head_short_column" style="width:900px;">
|
||||
부품정보<div class="float-end rounded border border-primary" style="cursor:pointer;" onclick="copyServerPartsToClipboard()">All COPY</div>
|
||||
</th>
|
||||
<th class="index_head_short_column">
|
||||
@ -65,7 +65,7 @@
|
||||
<?php $viewDatas['entity'] = $entity; ?>
|
||||
<tr <?= $entity->getStatus() === $entity::DEFAULT_STATUS ? "" : 'class="table-danger"' ?>>
|
||||
<?php $num = $viewDatas['total_count'] - (($viewDatas['page'] - 1) * $viewDatas['per_page'] + $cnt); ?>
|
||||
<td nowrap><?= $viewDatas['service']->getHelper()->getListButton('modify', $num, $viewDatas) ?></td>
|
||||
<td nowrap><?= $viewDatas['service']->getHelper()->getListButton('modify', "", $viewDatas) ?></td>
|
||||
<td nowrap>
|
||||
<?= $viewDatas['service']->getHelper()->getFieldView('clientinfo_uid', $entity->getClientInfoUID(), $viewDatas) ?><BR>
|
||||
<?= $viewDatas['service']->getHelper()->getFieldView('serviceinfo_uid', $entity->getServiceInfoUID(), $viewDatas) ?>
|
||||
@ -74,7 +74,7 @@
|
||||
<?= $viewDatas['service']->getHelper()->getFieldView('type', $entity->type, $viewDatas) ?><BR>
|
||||
<?= $viewDatas['service']->getHelper()->getFieldView('title', $entity->getTitle(), $viewDatas) ?>
|
||||
</td>
|
||||
<td nowrap>
|
||||
<td>
|
||||
<?= view_cell("\App\Cells\Equipment\ServerPartCell::parttable", [
|
||||
'serverinfo_uid' => $entity->getPK(),
|
||||
'types' => SERVERPART['SERVER_PARTTYPES'],
|
||||
|
||||
@ -3,8 +3,6 @@
|
||||
<?php if ($error = session('error')): echo $viewDatas['service']->getHelper()->alert($error) ?><?php endif ?>
|
||||
<div id="container" class="content">
|
||||
<div class="form_top"><?= $this->include("templates/{$viewDatas['layout']}/form_content_top"); ?></div>
|
||||
<?= form_open(current_url(), $viewDatas['forms']['attributes'], $viewDatas['forms']['hiddens']) ?>
|
||||
<div class="action_form">
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
<th>서버정보</th>
|
||||
@ -16,10 +14,7 @@
|
||||
<?php foreach (["code", "type", "title", "price", "manufactur_at", "format_at", "status",] as $field): ?>
|
||||
<tr>
|
||||
<th nowrap class="text-end"><?= $viewDatas['service']->getHelper()->getFieldLabel($field, lang("{$viewDatas['class_path']}.label.{$field}"), $viewDatas) ?></th>
|
||||
<td nowrap class="text-start">
|
||||
<?= $viewDatas['service']->getHelper()->getFieldView($field, $viewDatas['entity']->$field ?? null, $viewDatas) ?>
|
||||
<span><?= validation_show_error($field); ?></span>
|
||||
</td>
|
||||
<td nowrap class="text-start"><?= $viewDatas['service']->getHelper()->getFieldView($field, $viewDatas['entity']->$field ?? null, $viewDatas) ?></td>
|
||||
</tr>
|
||||
<?php endforeach ?>
|
||||
</table>
|
||||
@ -30,8 +25,6 @@
|
||||
]) ?></td>>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="text-center"><?= form_submit('', '수정', array("class" => "btn btn-outline btn-primary")); ?></div>
|
||||
<?= form_close(); ?>
|
||||
</div>
|
||||
<div class="form_bottom"><?= $this->include("templates/{$viewDatas['layout']}/form_content_bottom"); ?></div>
|
||||
</div>
|
||||
|
||||
@ -46,7 +46,7 @@
|
||||
<th class="index_head_short_column">
|
||||
<?= $viewDatas['service']->getHelper()->getListLabel('clientinfo_uid', lang("{$viewDatas['class_path']}.label.clientinfo_uid"), $viewDatas) ?>
|
||||
</th>
|
||||
<th class="index_head_short_column">
|
||||
<th class="index_head_short_column" style="width:500px;">
|
||||
서버정보<div class="float-end rounded border border-primary" style="cursor:pointer;" onclick="copyServerPartsToClipboard()">All COPY</div>
|
||||
</th>
|
||||
<th class="index_head_short_column">
|
||||
@ -82,7 +82,7 @@
|
||||
<td nowrap>
|
||||
<?= $viewDatas['service']->getHelper()->getFieldView('clientinfo_uid', $entity->clientinfo_uid, $viewDatas) ?>
|
||||
</td>
|
||||
<td nowrap>
|
||||
<td>
|
||||
<?= view_cell("\App\Cells\Equipment\ServerPartCell::parttable", [
|
||||
'serverinfo_uid' => $entity->getServerEntity()->getPK(),
|
||||
'types' => SERVERPART['SERVICE_PARTTYPES'],
|
||||
@ -98,7 +98,7 @@
|
||||
<td nowrap>
|
||||
<?= $viewDatas['service']->getHelper()->getFieldView('status', $entity->status, $viewDatas) ?>
|
||||
</td>
|
||||
<td><?= $viewDatas['service']->getHelper()->getFieldView('start_at', $entity->start_at, $viewDatas) ?></td>
|
||||
<td nowrap><?= $viewDatas['service']->getHelper()->getFieldView('start_at', $entity->start_at, $viewDatas) ?></td>
|
||||
<td nowrap>
|
||||
<?= $viewDatas['service']->getHelper()->getListButton('view', '', $viewDatas) ?>
|
||||
<?= $viewDatas['service']->getHelper()->getListButton('delete', '', $viewDatas) ?>
|
||||
|
||||
@ -132,7 +132,7 @@
|
||||
<i class="fa fa-support fa-5x"></i>
|
||||
</div>
|
||||
<div class="col-8 text-end">
|
||||
<div class="huge"><?= number_format($viewDatas['totalUnPaidCount']) ?>건/<?= number_format($viewDatas['totalUnPaidAmount']) ?>원</div>
|
||||
<div class="fs-2"><?= number_format($viewDatas['totalUnPaidCount']) ?>건/<?= number_format($viewDatas['totalUnPaidAmount']) ?>원</div>
|
||||
<div><?= date("Y-m-d") ?> 금일 기준 미납 서비스</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -58,7 +58,11 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="fw-bold">미납금</th>
|
||||
<td class="amount-red">총: <?= $serviceCellDatas['unPaids'][$entity->getPK()]['cnt'] ?>건,<?= number_format($serviceCellDatas['unPaids'][$entity->getPK()]['amount']) ?>원</td>
|
||||
<td class="amount-red">
|
||||
<?php if (array_key_exists($entity->getPK(), $serviceCellDatas['unPaids'])): ?>
|
||||
총: <?= $serviceCellDatas['unPaids'][$entity->getPK()]['cnt'] ?>건/<?= number_format($serviceCellDatas['unPaids'][$entity->getPK()]['amount']) ?>원
|
||||
<?php endif ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="text-center"><a href="/admin/customer/payment?clientinfo_uid=<?= $entity->getClientInfoUID() ?>"><button class="btn btn-success">결제내역</button></a></td>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user