fixes bug #07962
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@60622 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
f67d5223a4
commit
7fd46cfc81
|
@ -34,6 +34,7 @@ import com.rjconsultores.ventaboletos.entidad.OrgaoConcedente;
|
||||||
import com.rjconsultores.ventaboletos.entidad.Parada;
|
import com.rjconsultores.ventaboletos.entidad.Parada;
|
||||||
import com.rjconsultores.ventaboletos.entidad.Ruta;
|
import com.rjconsultores.ventaboletos.entidad.Ruta;
|
||||||
import com.rjconsultores.ventaboletos.service.OrgaoConcedenteService;
|
import com.rjconsultores.ventaboletos.service.OrgaoConcedenteService;
|
||||||
|
import com.rjconsultores.ventaboletos.utilerias.ApplicationProperties;
|
||||||
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||||
|
|
||||||
@Repository("calcularPeajeDAO")
|
@Repository("calcularPeajeDAO")
|
||||||
|
@ -314,9 +315,17 @@ public class CalcularPeajeHibernateDAO extends GenericHibernateDAO<String, Strin
|
||||||
// ((importe * rutaCantEixos) / (indice * rutaCantAsientos)) / ( 1 - icms)
|
// ((importe * rutaCantEixos) / (indice * rutaCantAsientos)) / ( 1 - icms)
|
||||||
private static BigDecimal calculateImportePeajeANTT(BigDecimal importe, BigDecimal icms,
|
private static BigDecimal calculateImportePeajeANTT(BigDecimal importe, BigDecimal icms,
|
||||||
BigDecimal indice, BigDecimal rutaCantEixos, BigDecimal rutaCantAsientos) {
|
BigDecimal indice, BigDecimal rutaCantEixos, BigDecimal rutaCantAsientos) {
|
||||||
return importe.multiply(rutaCantEixos)
|
|
||||||
.divide(indice.multiply(rutaCantAsientos), HIGH_PRECISION, RoundingMode.HALF_UP)
|
if (ApplicationProperties.getInstance().calculoPeajeReunidasANTT()) {
|
||||||
.divide(BigDecimal.ONE.subtract(icms), HIGH_PRECISION, RoundingMode.HALF_UP);
|
//pedágio * eixo / indice - > REUNIDAS
|
||||||
|
BigDecimal big = new BigDecimal((importe.doubleValue() * rutaCantEixos.doubleValue() / indice.doubleValue())) ;
|
||||||
|
return big;
|
||||||
|
}else{
|
||||||
|
return importe.multiply(rutaCantEixos)
|
||||||
|
.divide(indice.multiply(rutaCantAsientos), HIGH_PRECISION, RoundingMode.HALF_UP)
|
||||||
|
.divide(BigDecimal.ONE.subtract(icms), HIGH_PRECISION, RoundingMode.HALF_UP);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ((importe * rutaCantEixos) / (indice)) / ( 1 - icms)
|
// ((importe * rutaCantEixos) / (indice)) / ( 1 - icms)
|
||||||
|
|
Loading…
Reference in New Issue