Esempio n. 1
0
 public static function generate_page_2($event_id)
 {
     $data = inventoryManage::Get_DB($event_id);
     $return_data = '<div class="container">
                   <div class="row">
                     <div class="col-md-12">
                       <h4 class="text-center">รายละเอียดอุปกรณ์</h4>
                     </div>
                   </div>
                 </div>
                 <table class="table table-bordered table-hover table-striped inventory">
                 <thead>
                   <tr>
                     <th class="text-center" style="width:3%">ลำดับ</th>
                     <th class="text-center">รายการ</th>
                     <th class="text-center">Amt</th>
                     <th class="text-center">OJ</th>
                     <th class="text-center">Sup</th>
                     <th class="text-center">Cus</th>
                     <th class="text-center">รับ</th>
                     <th class="text-center">คืน</th>
                     <th class="text-left">Remark/Note</th>
                   </tr>
                 </thead>
                 <tbody>';
     if (count($data['inventory_amt']) == 0) {
         for ($i = 1; $i <= count($data['inventory_name']); $i++) {
             $return_data .= '<tr>
                           <td class="text-center">' . $i . '</td>
                           <td>' . $data['inventory_name'][$i]['name'] . '</td>
                           <td></td>
                           <td></td>
                           <td></td>
                           <td></td>
                           <td></td>
                           <td></td>
                           <td>' . $data['inventory_name'][$i]['remark'] . '</td>
                       </tr>';
         }
     } else {
         for ($i = 1; $i <= count($data['inventory_name']); $i++) {
             $return_data .= '<tr>
                           <td class="text-center">' . $i . '</td>
                           <td>' . $data['inventory_name'][$i]['name'] . '</td>
                           <td class="text-center">' . ($data['inventory_amt'][$i]['amt_all'] == 0 ? "" : $data['inventory_amt'][$i]['amt_all']) . '</td>
                           <td class="text-center">' . ($data['inventory_amt'][$i]['amt_oj'] == 0 ? "" : $data['inventory_amt'][$i]['amt_oj']) . '</td>
                           <td class="text-center">' . ($data['inventory_amt'][$i]['amt_sup'] == 0 ? "" : $data['inventory_amt'][$i]['amt_sup']) . '</td>
                           <td class="text-center">' . ($data['inventory_amt'][$i]['amt_cus'] == 0 ? "" : $data['inventory_amt'][$i]['amt_cus']) . '</td>
                           <td class="text-center">' . ($data['inventory_amt'][$i]['amt_receive'] == 0 ? "" : $data['inventory_amt'][$i]['amt_receive']) . '</td>
                           <td class="text-center">' . ($data['inventory_amt'][$i]['amt_return'] == 0 ? "" : $data['inventory_amt'][$i]['amt_return']) . '</td>
                           <td>' . $data['inventory_name'][$i]['remark'] . '</td>
                       </tr>';
         }
     }
     $return_data .= '</tbody></table>';
     echo $return_data;
 }
Esempio n. 2
0
 public static function main($event_id)
 {
     inventory::generate_html(inventoryManage::Get_DB($event_id));
 }