dbmsv3 init...1
This commit is contained in:
parent
573e62423a
commit
c680bb7c3b
@ -244,11 +244,13 @@ class PaymentService extends CommonService implements PaymentInterface
|
|||||||
$rows[$clientEntity->getPK()]['services'][$serviceEntity->getPK()] = [
|
$rows[$clientEntity->getPK()]['services'][$serviceEntity->getPK()] = [
|
||||||
'ip' => $serverEntity->getIP(),
|
'ip' => $serverEntity->getIP(),
|
||||||
'billing_at' => $serviceEntity->getBillingAt(),
|
'billing_at' => $serviceEntity->getBillingAt(),
|
||||||
|
'amount' => 0,
|
||||||
'items' => [],
|
'items' => [],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
//entities에 총 결제금액 설정
|
//entities에 총 결제금액 설정
|
||||||
$rows[$clientEntity->getPK()]['services'][$serviceEntity->getPK()]['items'][] = ['title' => $entity->getTitle(), 'amount' => $entity->getAmount()];
|
$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();
|
$rows[$clientEntity->getPK()]['total_amount'] += $entity->getAmount();
|
||||||
return $rows;
|
return $rows;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
<?= $this->section('content') ?>
|
<?= $this->section('content') ?>
|
||||||
<div id="container" class="content">
|
<div id="container" class="content">
|
||||||
<link href="/css/<?= $viewDatas['layout'] ?>/form.css" media="screen" rel="stylesheet" type="text/css" />
|
<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">
|
<table class=" table table-bordered text-center">
|
||||||
<tbody>
|
<tbody>
|
||||||
@ -32,26 +32,15 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
<table class="table table-sm table-bordered">
|
<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): ?>
|
<?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>
|
<tr>
|
||||||
<td class="p-0"><?= $service['ip'] ?></td>
|
<td class="p-0"><?= $service['ip'] ?></td>
|
||||||
<td class="p-0">
|
<td class="p-0" nowrap><?= view("{$viewDatas['layout']}/payment/invoice_items", ['service' => $service]); ?></td>
|
||||||
<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 text-nowrap"><?= $service['billing_at'] ?></td>
|
<td class="p-0 text-nowrap"><?= $service['billing_at'] ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
|
|||||||
13
app/Views/admin/payment/invoice_items.php
Normal file
13
app/Views/admin/payment/invoice_items.php
Normal 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>
|
||||||
@ -7,7 +7,7 @@
|
|||||||
===========================<BR>
|
===========================<BR>
|
||||||
<ol>
|
<ol>
|
||||||
<?php foreach ($row['services'] as $service): ?>
|
<?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; ?>
|
<?php endforeach; ?>
|
||||||
</ol>
|
</ol>
|
||||||
===========================<BR>
|
===========================<BR>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user