Ejemplo n.º 1
0
 function basic_margin_form()
 {
     $abs_margin_abs_val_box = "<input type='text' size='7' maxlength='7' id='abs_margin_abs_val' class='input_text' onchange=\"x_cl_call2('trade','save_basic_margin',\$('#abs_margin_abs_val').val(),1,'show_result');\" value='" . trade::getprice(trade::get_margin_by_id(1)) . "'>";
     $abs_margin_prc_val_box = "<input type='text' size='7' maxlength='7' id='abs_margin_prc_val' class='input_text' onchange=\"x_cl_call2('trade','save_basic_margin',\$('#abs_margin_prc_val').val(),2,'show_result');\" value='" . trade::getprice(trade::get_margin_by_id(2)) . "'>";
     $abs_margin_form = "Базовая абсолютная :" . $abs_margin_abs_val_box . "Грн + Процентная :" . $abs_margin_prc_val_box . "%";
     $partners_margin_form = $this->margin_by_partners_table();
     // check direct url
     if ($this->request['marginproduct'] != '') {
         $this->a('margin_management.php');
         $prod_margin = $this->margin_by_product_form($this->request['marginproduct']);
     }
     $prod_margin = $prod_margin ? $prod_margin : "<div align=center>товар не выбран</div>";
     $ans .= "<table>\r\t\t<tr></td><div class='headpost'>Наценки на все товары</div></td></tr>\r\t\t<tr></td>" . $abs_margin_form . "</td></tr>\r\t\t<tr></td>" . $partners_margin_form . "</td></tr>\r\t\t<tr></td><hr></td></tr>\r\t\t<tr></td><div class='headpost'>Наценка на выбранный товар:</div></td></tr>\r\t\t<tr></td><div id='product_margin'>" . $prod_margin . "</td></tr></table>";
     return $ans;
 }