diff --git a/app/Config/Constants.php b/app/Config/Constants.php index 2a43d92..b05e584 100644 --- a/app/Config/Constants.php +++ b/app/Config/Constants.php @@ -278,7 +278,9 @@ define('AUDIOS', [ //Default값 정의 define('DEFAULTS', [ - 'CATEGORY' => getenv('default.category') ?: 22, + 'CATEGORY_USER' => getenv('default.category.user') ?: 22, + 'CATEGORY_ORDER' => getenv('default.category.order') ?: 11, + 'CATEGORY_BILLING' => getenv('default.category.billing') ?: 28, 'ROLE' => getenv('default.role') ?: "guest", 'STATUS' => getenv('default.status') ?: "use", 'EMPTY' => getenv('default.empty') ?: "", diff --git a/app/Controllers/Front/BillingController.php b/app/Controllers/Front/BillingController.php index c1e2143..fd4128c 100644 --- a/app/Controllers/Front/BillingController.php +++ b/app/Controllers/Front/BillingController.php @@ -20,7 +20,7 @@ class BillingController extends FrontController helper($this->_viewDatas['className']); //Default 회원정보 Category - $this->_category = DEFAULTS['CATEGORY']; + $this->_category = DEFAULTS['CATEGORY_BILLING']; $this->isRole('index'); } @@ -44,7 +44,7 @@ class BillingController extends FrontController } final public function getFieldFilters(): array { - return ["user_uid", 'order_uid', "status"]; + return ['order_uid', "status"]; } final public function getFieldBatchFilters(): array { diff --git a/app/Controllers/Front/Order/OrderController.php b/app/Controllers/Front/Order/OrderController.php index 57b4df7..dbc9a72 100644 --- a/app/Controllers/Front/Order/OrderController.php +++ b/app/Controllers/Front/Order/OrderController.php @@ -26,7 +26,7 @@ class OrderController extends FrontController helper($this->_viewDatas['className']); //Default 회원정보 Category - $this->_category = DEFAULTS['CATEGORY']; + $this->_category = DEFAULTS['CATEGORY_ORDER']; $this->isRole('index'); } diff --git a/app/Controllers/Front/UserController.php b/app/Controllers/Front/UserController.php index 87a2566..a49744c 100644 --- a/app/Controllers/Front/UserController.php +++ b/app/Controllers/Front/UserController.php @@ -23,7 +23,7 @@ class UserController extends FrontController $this->initAdapters(); //Default 회원정보 Category - $this->_category = DEFAULTS['CATEGORY']; + $this->_category = DEFAULTS['CATEGORY_USER']; $this->isRole('index'); } diff --git a/app/Language/ko/Billing.php b/app/Language/ko/Billing.php index 28ee686..3b5eb3f 100644 --- a/app/Language/ko/Billing.php +++ b/app/Language/ko/Billing.php @@ -6,6 +6,7 @@ return [ 'order_uid' => "주문정보", 'user_uid' => "사용자정보", 'title' => "청구서명", + 'upload_file' => "청구서파일", 'response' => "결제처리결과", 'status' => "상태", 'updated_at' => "수정일", diff --git a/app/Models/BillingModel.php b/app/Models/BillingModel.php index 3fd1c47..857164f 100644 --- a/app/Models/BillingModel.php +++ b/app/Models/BillingModel.php @@ -7,7 +7,7 @@ use App\Entities\ProductEntity; class BillingModel extends BaseModel { - private $_product_options = null; + private $_order_options = null; protected $table = "tw_order"; protected $useAutoIncrement = false; protected $returnType = BillingEntity::class; @@ -50,12 +50,12 @@ class BillingModel extends BaseModel public function getFieldFormOption(string $field): array { switch ($field) { - case 'product_uid': - if (is_null($this->_product_options)) { - $productModel = new ProductModel(); - $this->_product_options = $productModel->getOptions(); + case 'order_uid': + if (is_null($this->_order_options)) { + $orderModel = new OrderModel(); + $this->_order_options = $orderModel->getOptions(); } - $options = $this->_product_options; + $options = $this->_order_options; break; default: return parent::getFieldFormOption($field); @@ -86,31 +86,4 @@ class BillingModel extends BaseModel $this->orLike($this->getTitleField(), $word, "both"); } } - - //장바구니에 넣기() - final public function addCart(ProductEntity $entity, int $quantity, $paymentDay = null): BillingEntity - { - $formDatas = []; - $formDatas['product_uid'] = $entity->getPrimaryKey(); - //상품명을 복사해서 구매한 상품명에 넣기 - $formDatas[$this->getTitleField()] = $entity->getTitle(); - $formDatas['cost'] = $entity->price; - $formDatas['sale'] = 0; - $formDatas['quantity'] = $quantity; - $formDatas['price'] = $formDatas['cost'] * $formDatas['quantity']; - if (!is_null($paymentDay)) { - $formDatas['paymentday'] = $paymentDay; - } - return $this->create($formDatas); - } - //장바구니에 빼기 - public function cancelCart(BillingEntity $entity) - { - $formDatas = array(); - //장바구니인경우에만 - if ($entity->status == DEFAULTS['STATUS']) { - $formDatas['status'] = 'unuse'; - } - return $this->modify($entity, $formDatas); - } } diff --git a/app/Views/front/billing/index.php b/app/Views/front/billing/index.php index 8fb38d9..e33dd3e 100644 --- a/app/Views/front/billing/index.php +++ b/app/Views/front/billing/index.php @@ -4,7 +4,6 @@
head) ?>
include('templates/front/index_head') ?>
- @@ -31,7 +30,6 @@
-
tail) ?>
endSection() ?> \ No newline at end of file diff --git a/app/Views/layouts/admin/left_menu/shoppingmall.php b/app/Views/layouts/admin/left_menu/shoppingmall.php index 210ebf9..666f50a 100644 --- a/app/Views/layouts/admin/left_menu/shoppingmall.php +++ b/app/Views/layouts/admin/left_menu/shoppingmall.php @@ -9,5 +9,8 @@

주문 관리

+
+

청구서 관리

+
\ No newline at end of file diff --git a/app/Views/layouts/front/left_menu/leftmenu_11.php b/app/Views/layouts/front/left_menu/leftmenu_11.php index 3f3b857..eb61e35 100644 --- a/app/Views/layouts/front/left_menu/leftmenu_11.php +++ b/app/Views/layouts/front/left_menu/leftmenu_11.php @@ -10,7 +10,7 @@ 주문정보
- 청구서정보 + 청구서정보
diff --git a/app/Views/layouts/front/left_menu/leftmenu_22.php b/app/Views/layouts/front/left_menu/leftmenu_22.php index 4d04d4a..45fec6e 100644 --- a/app/Views/layouts/front/left_menu/leftmenu_22.php +++ b/app/Views/layouts/front/left_menu/leftmenu_22.php @@ -10,7 +10,7 @@ 주문정보
- 청구서정보 + 청구서정보
diff --git a/app/Views/layouts/front/left_menu/leftmenu_28.php b/app/Views/layouts/front/left_menu/leftmenu_28.php index c936f6b..297a5e4 100644 --- a/app/Views/layouts/front/left_menu/leftmenu_28.php +++ b/app/Views/layouts/front/left_menu/leftmenu_28.php @@ -10,7 +10,7 @@ 주문정보
- 청구서정보 + 청구서정보