no message

This commit is contained in:
2025-09-15 13:43:37 +09:00
parent 3fb60c435e
commit c872cb7dad
2 changed files with 41 additions and 39 deletions

View File

@ -18,10 +18,12 @@ 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">
table {background: none; border-collapse:collapse; border:none;} table {border-collapse:collapse; border:none;}
.head { background-color:#C0C0C0;} .head {background-color:#C0C0C0; border: 1px solid black;}
.foot { background-color:#C0C0C0;} .foot {background-color:#C0C0C0; border: 1px solid black;}
.no-text { mso-number-format:'\@'; text-align:center; } .no-text {mso-number-format:'\@'; text-align: center; }
.line {border: 1px solid black;}
</style> </style>
<table> <table>
@ -70,7 +72,7 @@ header("Content-Description: PHP Generated Data");
<th></th> <th></th>
<th></th> <th></th>
<th></th> <th></th>
</td> </tr>
<tr> <tr>
<th>근무자</th> <th>근무자</th>
<th><?=$authInfo['worker']?></th> <th><?=$authInfo['worker']?></th>
@ -85,7 +87,7 @@ header("Content-Description: PHP Generated Data");
<th></th> <th></th>
<th></th> <th></th>
<th></th> <th></th>
</td> </tr>
<tr> <tr>
<th>작성자</th> <th>작성자</th>
<th><?=$authInfo['author']?></th> <th><?=$authInfo['author']?></th>
@ -100,7 +102,7 @@ header("Content-Description: PHP Generated Data");
<th></th> <th></th>
<th></th> <th></th>
<th></th> <th></th>
</td> </tr>
<tr> <tr>
<th class="head">품목</th> <th class="head">품목</th>
<th class="head">바코드</th> <th class="head">바코드</th>
@ -125,19 +127,19 @@ $t_prev_stock = $t_production = $t_inhouse_use = $t_recycling = $t_disposal = $t
foreach ( $result as $row) { foreach ( $result as $row) {
?> ?>
<tr> <tr>
<td><?=$row['product_name']?></td> <td class="line"><?=$row['product_name']?></td>
<td><?=$row['barcode']?></td> <td class="line"><?=$row['barcode']?></td>
<td><?=number_format(getPrevStock($searchDate, $row['barcode']))?></td> <td class="line"><?=number_format(getPrevStock($searchDate, $row['barcode']))?></td>
<td><?=number_format($row['production'])?></td> <td class="line"><?=number_format($row['production'])?></td>
<td><?=number_format($row['inhouse_use'])?></td> <td class="line"><?=number_format($row['inhouse_use'])?></td>
<td><?=number_format($row['recycling'])?></td> <td class="line"><?=number_format($row['recycling'])?></td>
<td><?=number_format($row['disposal'])?></td> <td class="line"><?=number_format($row['disposal'])?></td>
<td><?=number_format($row['sales'])?></td> <td class="line"><?=number_format($row['sales'])?></td>
<td><?=($row['sales'] != 0 && $row['sales_amount'] != 0) ? number_format($row['sales_amount']/$row['sales']) : 0 ?></td> <td class="line"><?=($row['sales'] != 0 && $row['sales_amount'] != 0) ? number_format($row['sales_amount']/$row['sales']) : 0 ?></td>
<td><?=number_format($row['sales_amount'])?></td> <td class="line"><?=number_format($row['sales_amount'])?></td>
<td><?=number_format($row['menu_discount'])?></td> <td class="line"><?=number_format($row['menu_discount'])?></td>
<td><?=number_format($row['payment_amount'])?></td> <td class="line"><?=number_format($row['payment_amount'])?></td>
<td><?=number_format($row['current_stock'])?></td> <td class="line"><?=number_format($row['current_stock'])?></td>
</tr> </tr>
<?php <?php
@ -155,21 +157,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 class="foot">합계</td> <td class="foot">합계</td>
<td class="foot"></td> <td class="foot"></td>
<td class="foot"><?=number_format($t_prev_stock) ?></td> <td class="foot"><?=number_format($t_prev_stock) ?></td>
<td class="foot"><?=number_format($t_production) ?></td> <td class="foot"><?=number_format($t_production) ?></td>
<td class="foot"><?=number_format($t_inhouse_use) ?></td> <td class="foot"><?=number_format($t_inhouse_use) ?></td>
<td class="foot"><?=number_format($t_recycling) ?></td> <td class="foot"><?=number_format($t_recycling) ?></td>
<td class="foot"><?=number_format($t_disposal) ?></td> <td class="foot"><?=number_format($t_disposal) ?></td>
<td class="foot"><?=number_format($t_sales) ?></td> <td class="foot"><?=number_format($t_sales) ?></td>
<td class="foot"></td> <td class="foot"></td>
<td class="foot"><?=number_format($t_sales_amount) ?></td> <td class="foot"><?=number_format($t_sales_amount) ?></td>
<td class="foot"><?=number_format($t_menu_discount) ?></td> <td class="foot"><?=number_format($t_menu_discount) ?></td>
<td class="foot"><?=number_format($t_payment_amount) ?></td> <td class="foot"><?=number_format($t_payment_amount) ?></td>
<td class="foot"><?=number_format($t_current_stock) ?></td> <td class="foot"><?=number_format($t_current_stock) ?></td>
</tr> </tr>
</tfoot> </tfoot>
</table> </table>

View File

@ -2,7 +2,7 @@
if (!isset($_SESSION['user_id'])) exit; //페이지 직접 실행 방지 if (!isset($_SESSION['user_id'])) exit; //페이지 직접 실행 방지
// 권한부여 및 체크 // 권한부여 및 체크
if ( !in_array($_SESSION['user_id'], $pageAuth['bakery']) || $_SESSION['user_id'], $pageAuth['admin']) ) { if ( !in_array($_SESSION['user_id'], $pageAuth['bakery']) && !in_array($_SESSION['user_id'], $pageAuth['admin']) ) {
alert('권한이 없습니다', false); alert('권한이 없습니다'.$pageAuth['admin'].','.$pageAuth['bakery'].'만 이용할 수 있습니다.', false);
} }
?> ?>