$r_tree_category['i_tree_type_id'] = $k; $r_tree_category['i_value'] = $value; $r_tree_category['i_volume'] = $value * $volumeTableDetail[$_POST['treetype_id']][$catList[$key]->id]['volume']; $id = $db->insert('r_tree_opening_category', $r_tree_category); } } $common->updateEcmonicsDetails($_POST['markid']); } ob_end_clean(); header("Location:" . BASE_URL . "index.php?page=addMarkingOpening&markId=" . $_POST['markid']); } if (isset($_POST['cancel'])) { ob_end_clean(); header("Location:" . BASE_URL . "index.php?page=addMarkingOpening&markId=" . $markDetailId); } $markList = $markDetail->getTreeMarkDetailOpening($markDetailId, $treeId); $voulmeDetail = $markDetail->getMarkIdVolumeOpening($markDetailId, $treeId); $treeEntryDetail = $markList; $treeEntryList = $markDetail->getTreeMarkedDetailOpeningVolume($markDetailId); $arrMarkDetail = $common->getInfo('c_mark_detail', $markDetailId); $forestId = $arrMarkDetail[0]['i_forest_id']; $arrCondition = array('i_forest_id' => $forestId); $priceMasterNew = $common->selectCondition('m_price', $arrCondition); foreach ($priceMasterNew as $priceMasterDetail) { $priceMaster[$priceMasterDetail['i_tree_id']] = $priceMasterDetail; } $arrCondition = array('i_mark_id' => $markDetailId, 'i_tree_id' => $treeId); $currentPrice = $common->selectCondition('c_marked_opening_price', $arrCondition); $unitPriceValue = 0; $defaultPrice = $priceMaster[$treeId]['price']; if ($currentPrice != '' && $currentPrice[0]['i_value'] > 0) {