Merge branch 'manager'
# Conflicts: # manager/bakery/bakery_stock_excel.php
This commit is contained in:
@ -7,6 +7,7 @@ if(!$_SESSION['user_id']) exit; // 로그인 되어있지 않으면 확인 불
|
|||||||
$searchDate = $_POST['searchDate'];
|
$searchDate = $_POST['searchDate'];
|
||||||
$ord_by = $_POST['ordBy'];
|
$ord_by = $_POST['ordBy'];
|
||||||
$result = getBakeryInvenData($searchDate, $ord_by);
|
$result = getBakeryInvenData($searchDate, $ord_by);
|
||||||
|
$authInfo = getAuthorInfo($searchDate);
|
||||||
|
|
||||||
// UTF-8 BOM 추가
|
// UTF-8 BOM 추가
|
||||||
echo "\xEF\xBB\xBF";
|
echo "\xEF\xBB\xBF";
|
||||||
@ -17,26 +18,105 @@ header("Content-Description: PHP Generated Data");
|
|||||||
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
.tit { background-color:#C0C0C0; height:30px; }
|
table {border-collapse:collapse; border:none;}
|
||||||
.no-text { mso-number-format:'\@'; text-align:center; }
|
.head {background-color:#C0C0C0; border: 1px solid black;}
|
||||||
|
.foot {background-color:#C0C0C0; border: 1px solid black;}
|
||||||
|
.no-text {mso-number-format:'\@'; text-align: center; }
|
||||||
|
.line {border: 1px solid black;}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<table cellspacing="0" cellpadding="0" border="1">
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="tit">품목</th>
|
<th>베이커리일일현황</th>
|
||||||
<th class="tit">바코드</th>
|
<th></th>
|
||||||
<th class="tit">전일재고</th>
|
<th></th>
|
||||||
<th class="tit">생산</th>
|
<th></th>
|
||||||
<th class="tit">업장사용</th>
|
<th></th>
|
||||||
<th class="tit">재활용</th>
|
<th></th>
|
||||||
<th class="tit">폐기</th>
|
<th></th>
|
||||||
<th class="tit">판매수량</th>
|
<th></th>
|
||||||
<th class="tit">판매단가</th>
|
<th></th>
|
||||||
<th class="tit">판매금액</th>
|
<th></th>
|
||||||
<th class="tit">메뉴별할인</th>
|
<th></th>
|
||||||
<th class="tit">결제금액</th>
|
<th></th>
|
||||||
<th class="tit">현재고</th>
|
<th></th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>날짜</th>
|
||||||
|
<th><?=$searchDate?></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>근무자</th>
|
||||||
|
<th><?=$authInfo['worker']?></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>작성자</th>
|
||||||
|
<th><?=$authInfo['author']?></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th class="head">품목</th>
|
||||||
|
<th class="head">바코드</th>
|
||||||
|
<th class="head">전일재고</th>
|
||||||
|
<th class="head">생산</th>
|
||||||
|
<th class="head">업장사용</th>
|
||||||
|
<th class="head">재활용</th>
|
||||||
|
<th class="head">폐기</th>
|
||||||
|
<th class="head">판매수량</th>
|
||||||
|
<th class="head">판매단가</th>
|
||||||
|
<th class="head">판매금액</th>
|
||||||
|
<th class="head">메뉴별할인</th>
|
||||||
|
<th class="head">결제금액</th>
|
||||||
|
<th class="head">현재고</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@ -48,6 +128,7 @@ foreach ( $result as $row) {
|
|||||||
$previous_stock = getPrevStock($searchDate, $row['barcode']);
|
$previous_stock = getPrevStock($searchDate, $row['barcode']);
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
|
<<<<<<< HEAD
|
||||||
<td><?=$row['product_name']?></td>
|
<td><?=$row['product_name']?></td>
|
||||||
<td><?=$row['barcode']?></td>
|
<td><?=$row['barcode']?></td>
|
||||||
<td><?=number_format($previous_stock)?></td>
|
<td><?=number_format($previous_stock)?></td>
|
||||||
@ -61,6 +142,21 @@ foreach ( $result as $row) {
|
|||||||
<td><?=number_format($row['menu_discount'])?></td>
|
<td><?=number_format($row['menu_discount'])?></td>
|
||||||
<td><?=number_format($row['payment_amount'])?></td>
|
<td><?=number_format($row['payment_amount'])?></td>
|
||||||
<td><?=number_format($row['current_stock'])?></td>
|
<td><?=number_format($row['current_stock'])?></td>
|
||||||
|
=======
|
||||||
|
<td class="line"><?=$row['product_name']?></td>
|
||||||
|
<td class="line"><?=$row['barcode']?></td>
|
||||||
|
<td class="line"><?=number_format(getPrevStock($searchDate, $row['barcode']))?></td>
|
||||||
|
<td class="line"><?=number_format($row['production'])?></td>
|
||||||
|
<td class="line"><?=number_format($row['inhouse_use'])?></td>
|
||||||
|
<td class="line"><?=number_format($row['recycling'])?></td>
|
||||||
|
<td class="line"><?=number_format($row['disposal'])?></td>
|
||||||
|
<td class="line"><?=number_format($row['sales'])?></td>
|
||||||
|
<td class="line"><?=($row['sales'] != 0 && $row['sales_amount'] != 0) ? number_format($row['sales_amount']/$row['sales']) : 0 ?></td>
|
||||||
|
<td class="line"><?=number_format($row['sales_amount'])?></td>
|
||||||
|
<td class="line"><?=number_format($row['menu_discount'])?></td>
|
||||||
|
<td class="line"><?=number_format($row['payment_amount'])?></td>
|
||||||
|
<td class="line"><?=number_format($row['current_stock'])?></td>
|
||||||
|
>>>>>>> manager
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
@ -78,21 +174,21 @@ foreach ( $result as $row) {
|
|||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</tbody>
|
</tbody>
|
||||||
<tfoot class="table-group-divider">
|
<tfoot class="table-group-divider">
|
||||||
<tr class="bakery_total">
|
<tr class="bakery_total">
|
||||||
<td>합계</td>
|
<td class="foot">합계</td>
|
||||||
<td></td>
|
<td class="foot"></td>
|
||||||
<td><?=number_format($t_prev_stock) ?></td>
|
<td class="foot"><?=number_format($t_prev_stock) ?></td>
|
||||||
<td><?=number_format($t_production) ?></td>
|
<td class="foot"><?=number_format($t_production) ?></td>
|
||||||
<td><?=number_format($t_inhouse_use) ?></td>
|
<td class="foot"><?=number_format($t_inhouse_use) ?></td>
|
||||||
<td><?=number_format($t_recycling) ?></td>
|
<td class="foot"><?=number_format($t_recycling) ?></td>
|
||||||
<td><?=number_format($t_disposal) ?></td>
|
<td class="foot"><?=number_format($t_disposal) ?></td>
|
||||||
<td><?=number_format($t_sales) ?></td>
|
<td class="foot"><?=number_format($t_sales) ?></td>
|
||||||
<td></td>
|
<td class="foot"></td>
|
||||||
<td><?=number_format($t_sales_amount) ?></td>
|
<td class="foot"><?=number_format($t_sales_amount) ?></td>
|
||||||
<td><?=number_format($t_menu_discount) ?></td>
|
<td class="foot"><?=number_format($t_menu_discount) ?></td>
|
||||||
<td><?=number_format($t_payment_amount) ?></td>
|
<td class="foot"><?=number_format($t_payment_amount) ?></td>
|
||||||
<td><?=number_format($t_current_stock) ?></td>
|
<td class="foot"><?=number_format($t_current_stock) ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
</tfoot>
|
</tfoot>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
@ -2,12 +2,7 @@
|
|||||||
if (!isset($_SESSION['user_id'])) exit; //페이지 직접 실행 방지
|
if (!isset($_SESSION['user_id'])) exit; //페이지 직접 실행 방지
|
||||||
|
|
||||||
// 권한부여 및 체크
|
// 권한부여 및 체크
|
||||||
$pageAuth = array(
|
if ( !in_array($_SESSION['user_id'], $pageAuth['bakery']) && !in_array($_SESSION['user_id'], $pageAuth['admin']) ) {
|
||||||
'abc',
|
alert('권한이 없습니다'.$pageAuth['admin'].','.$pageAuth['bakery'].'만 이용할 수 있습니다.', false);
|
||||||
'firstgarden',
|
|
||||||
'bakery'
|
|
||||||
);
|
|
||||||
if ( !in_array($_SESSION['user_id'], $pageAuth) ) {
|
|
||||||
alert('권한이 없습니다', false);
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
@ -40,6 +40,14 @@ $recnum = 15; // 출력할 아이템 수
|
|||||||
$pagenum = 20; // 한 페이지에 출력할 페이지 수
|
$pagenum = 20; // 한 페이지에 출력할 페이지 수
|
||||||
$query_limit = "LIMIT ".(($p - 1) * $recnum).",".$recnum; // 출력할 아이템 수 만큼만 가져오기
|
$query_limit = "LIMIT ".(($p - 1) * $recnum).",".$recnum; // 출력할 아이템 수 만큼만 가져오기
|
||||||
|
|
||||||
|
// 권한설정
|
||||||
|
$pageAuth = [
|
||||||
|
'bakery' => ['bakery', 'firstgarden'],
|
||||||
|
'vip' => ['ticket', 'firstgarden', 'service', 'gift', 'heyum', 'dksdpwl'],
|
||||||
|
'ticket' => ['ticket'],
|
||||||
|
'admin' => ['abc']
|
||||||
|
];
|
||||||
|
|
||||||
// page 설정
|
// page 설정
|
||||||
// 페이지가 많지 않기 때문에 수동으로 배열을 만들었지만, 페이지가 많아지면 DB를 이용하는것이 편함
|
// 페이지가 많지 않기 때문에 수동으로 배열을 만들었지만, 페이지가 많아지면 DB를 이용하는것이 편함
|
||||||
// 1차배열의 index 순으로 출력함. 특정 메뉴가 상단에 출력되게 하고 싶다면 순서를 바꿔줄 것
|
// 1차배열의 index 순으로 출력함. 특정 메뉴가 상단에 출력되게 하고 싶다면 순서를 바꿔줄 것
|
||||||
@ -136,3 +144,4 @@ $setpage = array(
|
|||||||
'purl' => FG_MANAGER_URL.'/bakery/bakery_stock.php'
|
'purl' => FG_MANAGER_URL.'/bakery/bakery_stock.php'
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -45,6 +45,9 @@
|
|||||||
</button>
|
</button>
|
||||||
<div class="collapse navbar-collapse" id="navbar">
|
<div class="collapse navbar-collapse" id="navbar">
|
||||||
<ul class="navbar-nav me-auto mb-2 mb-lg-0 justify-content-end">
|
<ul class="navbar-nav me-auto mb-2 mb-lg-0 justify-content-end">
|
||||||
|
|
||||||
|
<?php if ( in_array($_SESSION['user_id'], $pageAuth['ticket']) || in_array($_SESSION['user_id'], $pageAuth['admin']) ) { ?>
|
||||||
|
|
||||||
<li class="nav-item dropdown">
|
<li class="nav-item dropdown">
|
||||||
<a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
<a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||||
입장처리
|
입장처리
|
||||||
@ -54,6 +57,11 @@
|
|||||||
<li><a class="dropdown-item" href="<?=FG_MANAGER_URL.'/annual_member/annual_member_list_ent.php'?>">연간회원</a></li>
|
<li><a class="dropdown-item" href="<?=FG_MANAGER_URL.'/annual_member/annual_member_list_ent.php'?>">연간회원</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
<?php if ( in_array($_SESSION['user_id'], $pageAuth['vip']) || in_array($_SESSION['user_id'], $pageAuth['admin']) ) { ?>
|
||||||
|
|
||||||
<li class="nav-item dropdown">
|
<li class="nav-item dropdown">
|
||||||
<a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
<a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||||
명단관리
|
명단관리
|
||||||
@ -66,7 +74,11 @@
|
|||||||
<li><a class="dropdown-item" href="<?=FG_MANAGER_URL.'/annual_member/annual_member_category.php'?>">연간회원 구분관리</a></li>
|
<li><a class="dropdown-item" href="<?=FG_MANAGER_URL.'/annual_member/annual_member_category.php'?>">연간회원 구분관리</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<?php if ($_SESSION['user_id'] === 'abc' || $_SESSION['user_id'] === 'firstgarden' || $_SESSION['user_id'] === 'bakery') { ?>
|
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
<?php if ( in_array($_SESSION['user_id'], $pageAuth['bakery']) || in_array($_SESSION['user_id'], $pageAuth['admin']) ) { ?>
|
||||||
|
|
||||||
<li class="nav-item dropdown">
|
<li class="nav-item dropdown">
|
||||||
<a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
<a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||||
베이커리
|
베이커리
|
||||||
@ -79,7 +91,9 @@
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<li class="nav-item dropdown">
|
<li class="nav-item dropdown">
|
||||||
<a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
<a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||||
관리자
|
관리자
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
include_once '_common.php'; // 그누보드 설정 파일 불러오기
|
include_once '_common.php'; // 그누보드 설정 파일 불러오기
|
||||||
|
include_once 'config.php';
|
||||||
include_once 'head.php';
|
include_once 'head.php';
|
||||||
// 로그인 체크
|
// 로그인 체크
|
||||||
if( isset($_SESSION['user_id']) ) { // 로그인 했다면
|
if( isset($_SESSION['user_id']) ) { // 로그인 했다면
|
||||||
|
|||||||
Reference in New Issue
Block a user