Installment calculation function

My existing codes are doing the calculation wrong, I can't find the right code. For example, 14.75% commission, $100 transaction, 114.75 should be paid, while after the transaction it turns out to be $ 117.30. I am sharing my codes below, how can I calculate correctly?

  $install = DB::getRow("SELECT installment FROM installments WHERE id='{$k}'");

        $montly  = round($mInfo->fPrice / (1 - str_replace(",", ".", $i) / 100) / $install->installment, 2);
        $total = round($mInfo->fPrice / (1 - str_replace(",", ".", $i) / 100), 2); 


from Recent Questions - Stack Overflow https://ift.tt/3mhdcSE
https://ift.tt/eA8V8J

Comments

Popular posts from this blog

Today Walkin 14th-Sept

Hibernate Search - Elasticsearch with JSON manipulation

Spring Elasticsearch Operations