How to return the value that I am inserting

0

Hi, how I have a problem with this code, when I insert the value of 10% it saves it in a correct way but when wanting to edit it takes the value of another parameter I'm going crazy.

 <tr class="even pointer " >
  <td>
    <div class="descuentos " id="descuento_global_div">Descuento Global</div>
  </td>
  <td class="">
    <?php  
    $place= "";
    if($compra -> co_tipo_descuento=="porcentTot" ){ 
      $place = "%";
    } 
    if($compra -> co_tipo_descuento=="precioTot" ){
      $place = "$";
    }     
    ?>
    <div class="descuentos small" id="contPorcentDesc">
      <input type="text" name="porcentDesc" id="porcentDesc" onblur="totalizar();" 
       class="form-control" 
       placeholder="<?php echo $place; ?>" 
       value="<?php echo $compra->descuento_global; ?>" />
    </div>
  </td>
  <td class="medium">
    <div class="short descuentos">
      <input name="descuento_global" id="descuento_global" 
       type="text" onblur="totalizar();" class="form-control" placeholder="$" readonly />
    </div>
 </td>
</tr>
    
asked by Cesar Vieyra 10.10.2016 в 19:40
source

0 answers