Calculos - diversos |
Top Previous Next |
|
function CalcDesconto(Valor1,Valor2 : Double) : Double; begin if ((Valor1 = 0) and (Valor2 = 0)) then Begin Result := 0; Exit; end; Result := (1-(Valor1/Valor2))*100; end;
function CalcEncargosDia(Valor,tx : Double) : Double; begin if ((Valor = 0) and (tx = 0)) then begin Result := 0; Exit; end; Result := (Valor * (tx/100))/30; end;
function mlcalcTotalcomIcms(ValorTotal,icms : Double) : Double; begin Result := (ValorTotal * (icms + 100))/100; end;
function CalcIcms(ValorTotal,icms : Double) : Double; begin Result := (ValorTotal * (icms + 100))/100; Result := Result - ValorTotal; end;
function CalcComissao(ValorTotal,PerComi : Double) : Double; begin Result := CalcIcms(ValorTotal,PerComi); end;
function CalcRegraTresSimples(SeIssoIgualA,Isso,EntaoIssoSera : Double) : double; begin Result := (EntaoIssoSera*Isso)/SeIssoIgualA; end;
function CalcPerComissao(ValorTotal,PerComi : Double) : Double; begin Result := CalcIcms(ValorTotal,PerComi); end; |