0
I have these three buttons, a cost value - profit margin - sale value. I need him to calculate the automatic sale value, put the cost value put the profit margin it shows within the sales value field automatically, anyone can tell how I can do this?
I tried to do with
function porcentagem_xn ( $porcentagem, $total ) {
return ( $porcentagem / 100 ) * $total;
}
however I cannot call in the field I want and even if the result automatically appears 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>
The types of inputs may not be the cause of the problem? There is no
input type=int
but yesinput type=number
. Other than that, I don’t know what it could be.– mutlei