I have these 3 buttons, a cost value - profit margin - sales value. I need it to calculate the value of automatic sale, I place the value of the cost I place the profit margin it shows within the field value of sale automatically, someone knows how to do it?
I tried to do with
function porcentagem_xn ( $porcentagem, $total ) {
return ( $porcentagem / 100 ) * $total;
}
But I can not call the field I want, and the result does not appear automatically in the sales value field
<div type="text" class="col-lg-2 ">
<label >Valor de Custo:</label>
<input type="int" name="txt_custo" class="form-control number_format">
</div>
<div type="text" class="col-lg-1 ">
<label >Margem(%):</label>
<input type="int" name="txt_margem" class="form-control" >
</div>
<div type="text" class="col-lg-2 ">
<label >Valor de Venda:</label>
<input type="int" name="txt_venda" class="form-control">
</div>