dbms_itsolution/extdbms/lib/Controller/Billing.php

49 lines
1.7 KiB
PHP

<?php
namespace lib\Controller;
use lib\Core\Controller;
class Billing extends Controller
{
public function __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;
}
}
public function execute($client_code)
{
$this->view->total_price = number_format($datas['total_price']);
$this->view->bill = $this->bill_process($datas);
$this->view->site = $this->getSite();
$this->view->client = $this->getModel("Client")->getData(array(sprintf("Client_Code='%s'", $datas['client_code'])));
$this->view->accounts = $this->getAccounts($this->view->site['id']);
return $this->render('depositbillpaper');
}
}