$query_item = select_detail($id, $_SESSION['user_id']);
     $query_item2 = select_detail($id, $_SESSION['user_id']);
     $query_item3 = select_detail($id, $_SESSION['user_id']);
     $query_item4 = select_detail($id, $_SESSION['user_id']);
     include '../views/transaksi_produksi/form.php';
     get_footer();
     break;
 case 'add_menu':
     $item_id = get_isset($_GET['item_id']);
     $data = "'',\n\t\t\t\t\t'0',\n\t\t\t\t\t'{$item_id}',\n\t\t\t\t\t'0', \n\t\t\t\t\t'" . $_SESSION['user_id'] . "'\n\t\t\t\t\t\n\t\t\t";
     create_config("transaction_production_details", $data);
     header("Location: transaksi_produksi.php?page=form");
     break;
 case 'add_resep':
     $item_id = get_isset($_GET['item_id']);
     $query_resep = select_resep($item_id);
     while ($row = mysql_fetch_array($query_resep)) {
         $data = "'',\n\t\t\t\t\t\t'0',\n\t\t\t\t\t\t'" . $row['item_id'] . "',\n\t\t\t\t\t\t'" . $row['resep_detail_qty'] . "', \n\t\t\t\t\t\t'" . $_SESSION['user_id'] . "'\n\t\t\t\t\t\t\n\t\t\t\t";
         create_config("transaction_production_details", $data);
     }
     header("Location: transaksi_produksi.php?page=form&item_id={$item_id}");
     break;
 case 'save':
     extract($_POST);
     //echo "test";
     $i_item = get_isset($_GET['i_item']);
     //$i_item = get_resep($i_resep);
     //$item_id = $i_item['item_id'];
     $row_id = get_isset($_GET['row_id']);
     $i_date = get_isset($_GET['i_date']);
     $i_date = format_back_date($i_date);
Example #2
0
     $close_button = "stock.php?page=list";
     $query_unit = select_unit();
     $id = isset($_GET['id']) ? $_GET['id'] : null;
     if ($id) {
         $row = read_id($id);
         $action = "stock.php?page=edit&id={$id}";
     } else {
         //inisialisasi
         $row = new stdClass();
         $row->item_name = false;
         $row->unit_id = false;
         $row->item_limit = false;
         $action = "stock.php?page=save";
     }
     $query_resep = select_resep($id);
     $query_resep2 = select_resep($id);
     include '../views/stock/form.php';
     //include '../views/stock/list_resep.php';
     get_footer();
     break;
 case 'add_menu':
     $item_id = get_isset($_GET['item_id']);
     $i_id = get_isset($_GET['i_id']);
     $data = "'',\n\t\t\t\t\t'{$i_id}',\n\t\t\t\t\t'{$item_id}',\n\t\t\t\t\t'0', \n\t\t\t\t\t'" . $_SESSION['user_id'] . "'\n\t\t\t\t\t\n\t\t\t";
     create_config("resep_details", $data);
     header("Location: stock.php?page=form&id={$i_id}");
     break;
 case 'save':
     extract($_POST);
     $i_name = get_isset($i_name);
     $i_unit_id = get_isset($i_unit_id);