dbmsv3 init...1

This commit is contained in:
choi.jh 2025-10-31 09:47:00 +09:00
parent 573e62423a
commit c680bb7c3b
4 changed files with 23 additions and 19 deletions

View File

@ -244,11 +244,13 @@ class PaymentService extends CommonService implements PaymentInterface
$rows[$clientEntity->getPK()]['services'][$serviceEntity->getPK()] = [
'ip' => $serverEntity->getIP(),
'billing_at' => $serviceEntity->getBillingAt(),
'amount' => 0,
'items' => [],
];
}
//entities에 총 결제금액 설정
$rows[$clientEntity->getPK()]['services'][$serviceEntity->getPK()]['items'][] = ['title' => $entity->getTitle(), 'amount' => $entity->getAmount()];
$rows[$clientEntity->getPK()]['services'][$serviceEntity->getPK()]['amount'] += $entity->getAmount();
$rows[$clientEntity->getPK()]['total_amount'] += $entity->getAmount();
return $rows;
}

View File

@ -2,7 +2,7 @@
<?= $this->section('content') ?>
<div id="container" class="content">
<link href="/css/<?= $viewDatas['layout'] ?>/form.css" media="screen" rel="stylesheet" type="text/css" />
<div class="action_form" style="width:600px;">
<div class="action_form" style="width:700px;">
<!-- 청구서 정보 -->
<table class=" table table-bordered text-center">
<tbody>
@ -32,26 +32,15 @@
<tr>
<td colspan="2">
<table class="table table-sm table-bordered">
<tr>
<th class="p-0">서버 IP</th>
<th class="p-0">항목</th>
<th class="p-0">결제일</th>
</tr>
<?php foreach ($row['services'] as $service): ?>
<tr>
<th class="p-0">서버 IP</th>
<th class="p-0">항목</th>
<th class="p-0">결제일</th>
</tr>
<tr>
<td class="p-0"><?= $service['ip'] ?></td>
<td class="p-0">
<ol>
<?php foreach ($service['items'] as $item): ?>
<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-end text-nowrap"><?= number_format($item['amount']) ?>원</div>
</div>
</li>
<?php endforeach; ?>
</ol>
</td>
<td class="p-0" nowrap><?= view("{$viewDatas['layout']}/payment/invoice_items", ['service' => $service]); ?></td>
<td class="p-0 text-nowrap"><?= $service['billing_at'] ?></td>
</tr>
<?php endforeach; ?>

View File

@ -0,0 +1,13 @@
<table class="table table-sm">
<?php $cnt = 1 ?>
<?php foreach ($service['items'] as $item): ?>
<tr>
<td class="p-0 text-nowrap text-start" width="80%"><?= $cnt++ ?>. <?= $item['title'] ?></td>
<td class="p-0 text-nowrap text-end"><?= number_format($item['amount']) ?>원</td>
</tr>
<?php endforeach; ?>
<tr>
<td class="p-0 text-nowrap text-end">총계</td>
<td class="p-0 text-nowrap text-end"><?= number_format($service['amount']) ?>원</td>
</tr>
</table>

View File

@ -7,7 +7,7 @@
===========================<BR>
<ol>
<?php foreach ($row['services'] as $service): ?>
<li class="p-0">서버 IP:<?= $service['ip'] ?> , 결제일:<?= $service['billing_at'] ?></li>
<li class="p-0">서버IP:<?= $service['ip'] ?> , 결제금:<?= number_format($service['amount']) ?>원 , 결제일:<?= $service['billing_at'] ?></li>
<?php endforeach; ?>
</ol>
===========================<BR>