add SiteAccount.php

This commit is contained in:
최준흠 2024-09-02 14:20:18 +09:00
parent 191f5bbc25
commit cd5629476c
4 changed files with 40 additions and 67 deletions

View File

@ -11,51 +11,11 @@ class Billing extends Controller
parent::__construct(); parent::__construct();
} // } //
final public function getAccounts($site_id)
{
switch ($site_id) {
case 'PRIMEIDC':
return [
["id" => "1005-202-907217", "name" => '우리은행', "owner" => "(주)브엘세바"],
["id" => "355-0040-4154-03", "name" => '농협', "owner" => "(주)브엘세바"],
];
break;
case "ITSOLUTION":
return [
["id" => "1005-503-404205", "name" => '우리', "owner" => "주식회사 르호봇"],
["id" => "9002-1932-1654-1", "name" => '새마을금고', "owner" => "주식회사 르호봇"],
];
break;
case 'GDIDC':
return [
["id" => "1005-204-100758", "name" => '우리은행', "owner" => " (주)브엘라해로이"],
];
break;
default:
throw new \Exception(sprintf(__METHOD__ . "에서 오류 SiteID[%s]가 정의되지 않았습니다.", $site_id));
break;
}
}
private function bill_process($datas)
{
$bills = [];
foreach (explode("<>", $datas['bills']) as $bill) {
if ($bill != "") {
$temps = explode("||", $bill);
$bills[] = sprintf("{$temps[0]} / {$temps[1]} / %s원", number_format($temps[2]));
}
}
return implode("<BR>", $bills);
}
public function execute($datas) public function execute($datas)
{ {
$this->view->total_price = number_format($datas['total_price']);
$this->view->bill = $this->bill_process($datas);
$this->view->site = $this->getSite(); $this->view->site = $this->getSite();
$this->view->client = $this->getModel("Client")->getData(array(sprintf("Client_Code='%s'", $datas['client_code']))); $this->view->client = $this->getModel("Client")->getData(array(sprintf("Client_Code='%s'", $datas['client_code'])));
$this->view->accounts = $this->getAccounts($this->view->site['id']); $this->view->accounts = $this->getModel("siteAccount")->getDatas();
return $this->render('depositbillpaper'); return $this->render('depositbillpaper');
} }
} }

View File

@ -0,0 +1,18 @@
<?php
namespace lib\Model;
use lib\Core\Model as Model;
class SiteAccount extends Model
{
public function __construct()
{
parent::__construct();
} //
final public function getTable()
{
return 'siteAccount';
}
} //Class

View File

@ -3,9 +3,9 @@
<p>입금 하실 계좌 번호 입니다.</p> <p>입금 하실 계좌 번호 입니다.</p>
<?php foreach ($this->accounts as $account) { ?> <?php foreach ($this->accounts as $account) { ?>
<div style="margin-top:20px; margin-bottom:20px; color:red;"> <div style="margin-top:20px; margin-bottom:20px; color:red;">
은행명 : <?= $account['name'] ?><br> 은행명 : <?= $account->bank ?><br>
계좌번호 : <?= $account['id'] ?><br> 계좌번호 : <?= $account->account ?><br>
예금주: <?= $account['owner'] ?> 예금주: <?= $account->owner ?>
</div> </div>
<?php } ?> <?php } ?>
<p>고객명과 입금자명이 상이한 경우 반드시 확인 연락이 필요합니다.<br /> <p>고객명과 입금자명이 상이한 경우 반드시 확인 연락이 필요합니다.<br />
@ -77,23 +77,3 @@
(요청하시면 백업을 위해 무료로 추가 하드를 제공해 드리고 있지만, 추가가 불가능한 경우도 있습니다.<br /> (요청하시면 백업을 위해 무료로 추가 하드를 제공해 드리고 있지만, 추가가 불가능한 경우도 있습니다.<br />
번거로우시더라도 주기적인 데이터백업을 부탁드리겠습니다.) </p> 번거로우시더라도 주기적인 데이터백업을 부탁드리겠습니다.) </p>
</div> </div>
<div style="border:1px solid red; background-color:pink;">
안녕하세요 ITSOLUTION입니다.<BR>
항상 저희 IDC를 이용해 주셔서 감사합니다.<BR>
서버비 안내 드립니다.<BR>
===========================<BR>
<?= $this->bill ?><BR>
===========================<BR>
입금 주실 금액 : <?= $this->total_price ?>원<BR>
<BR> ITSOLUTION IDC 계좌<BR>
<?php foreach ($this->accounts as $account) { ?>
<div style="margin-top:20px;">
예금주&nbsp;&nbsp;&nbsp;:&nbsp;<?= $account['owner'] ?><br>
은행명&nbsp;&nbsp;&nbsp;:&nbsp;<?= $account['name'] ?><br>
계좌번호&nbsp;:&nbsp;<?= $account['id'] ?><br>
</div>
<?php } ?>
===========================<BR>
결제담당자분 확인 말씀 한번 부탁 드립니다.<BR>
감사합니다.<BR>
</div>

View File

@ -164,9 +164,24 @@ $(function()
</tfoot> </tfoot>
</table> </table>
</div> </div>
<c:set var="bills" value="" /> <c:import url="${phpurl}/depositbillpaper.php?client_code=${ClientDto.client_code}" />
<c:forEach items="${IdcBillPaperList }" var="temp"><c:set var="bills" value="${bills}${temp.service_mainip}||${temp.payment_date}||${temp.service_amount}<>" /></c:forEach> <div style="border:1px solid red; background-color:pink;">
<c:import url="${phpurl}/depositbillpaper.php?client_code=${ClientDto.client_code}&total_price=${total_price}&bills=${bills}" /> 안녕하세요 ITSolution IDC 입니다.<BR>
항상 저희 IDC를 이용해 주셔서 감사합니다.<BR>
서버비 안내 드립니다.<BR>
===========================<BR>
<c:forEach items="${IdcBillPaperList }" var="temp">${temp.service_mainip} / ${temp.payment_date} / ${temp.service_amount}원<BR></c:forEach>
===========================<BR>
입금 주실 금액 : <span id="total_price"></span><BR>
<BR>■ ITSolution IDC 계좌<BR>
<div style="margin-top:20px;">
예금주&nbsp;&nbsp;&nbsp;:&nbsp;(주)와이와이와이(영업소)<br>
은행명&nbsp;&nbsp;&nbsp;:&nbsp;국민은행<br>
계좌번호&nbsp;:&nbsp;989801-00-065482<br>
</div>
===========================<BR>
결제담당자분 확인 후 말씀 한번 부탁 드립니다.<BR>
감사합니다.<BR>
</div> </div>
</div> </div>
<!-- panel-body --> <!-- panel-body -->