Commit 1d33254f authored by sandroresende's avatar sandroresende

correcao formula tarifa caixa

parent 2405eda4
...@@ -504,8 +504,8 @@ class SelecaoController extends Controller ...@@ -504,8 +504,8 @@ class SelecaoController extends Controller
$listaSelecaoProposta->vlr_repasse = floatval($vlr_repasse); $listaSelecaoProposta->vlr_repasse = floatval($vlr_repasse);
$listaSelecaoProposta->vlr_tarifa = floatval(round($vlr_tarifa, 0, PHP_ROUND_HALF_UP)); $listaSelecaoProposta->vlr_tarifa = floatval(ceil($vlr_tarifa));
$listaSelecaoProposta->vlr_final_transferegov = floatval($vlr_repasse) - floatval($vlr_tarifa); $listaSelecaoProposta->vlr_final_transferegov = floatval($vlr_repasse-ceil($vlr_tarifa));
$listaSelecaoProposta->created_at = Date("Y-m-d h:i:s"); $listaSelecaoProposta->created_at = Date("Y-m-d h:i:s");
......
This diff is collapsed.
...@@ -284,19 +284,24 @@ ...@@ -284,19 +284,24 @@
}, },
calcular(){ calcular(){
if((this.vlr_repasse > 238856) && (this.vlr_repasse < 777450)){ if((this.vlr_repasse > 238856) && (this.vlr_repasse < 777450)){
this.vlr_tarifa = Number(Math.round(((this.vlr_repasse - 3500)* 0.03100775) + 3500)); this.vlr_tarifa = Number(Math.ceil(((this.vlr_repasse - 3500)* 0.03100775) + 3500));
}else if((this.vlr_repasse >= 777450) && (this.vlr_repasse < 1560500)){ }else if((this.vlr_repasse >= 777450) && (this.vlr_repasse < 1560500)){
this.vlr_tarifa = Number(Math.round(((this.vlr_repasse - 3500)* 0.03660886) + 3500)); this.vlr_tarifa = Number(Math.ceil(((this.vlr_repasse - 3500)* 0.03660886) + 3500));
}else if((this.vlr_repasse >= 1569500) && (this.vlr_repasse < 83523500)){ }else if((this.vlr_repasse >= 1569500) && (this.vlr_repasse < 83523500)){
this.vlr_tarifa = Number(Math.round(((this.vlr_repasse - 3500)* 0.042145594) + 3500)); this.vlr_tarifa = Number(Math.ceil(((this.vlr_repasse - 3500)* 0.042145594) + 3500));
}else if(this.vlr_repasse >= 83523500){ }else if(this.vlr_repasse >= 83523500){
this.vlr_tarifa = Number(Math.round(((this.vlr_repasse - 3500)* 0.0421455939) + 3500)); this.vlr_tarifa = Number(Math.ceil(((this.vlr_repasse - 3500)* 0.0421455939) + 3500));
}else{ }else{
this.vlr_tarifa = Number(0); this.vlr_tarifa = Number(0);
} }
this.vlr_tarifa = this.formatarValor(Number(Math.round(this.vlr_tarifa)),2); this.vlr_tarifa = Number(Math.ceil(this.vlr_tarifa));
this.vlr_final_transferegov = this.formatarValor(Number(this.vlr_repasse - this.vlr_tarifa),2); this.vlr_final_transferegov = Number(this.vlr_repasse - this.vlr_tarifa);
// this.vlr_repasse = this.formatarValor(this.vlr_repasse,2);
this.vlr_tarifa = this.formatarValor(this.vlr_tarifa,2);
this.vlr_final_transferegov = this.formatarValor(this.vlr_final_transferegov,2);
}, },
...@@ -406,21 +411,27 @@ ...@@ -406,21 +411,27 @@
this.num_pop_atendida_abastecimento_agua = this.dados_proposta.num_pop_atendida_abastecimento_agua; this.num_pop_atendida_abastecimento_agua = this.dados_proposta.num_pop_atendida_abastecimento_agua;
if((this.dados_proposta.vlr_intervencao > 238856) && (this.dados_proposta.vlr_intervencao < 777450)){ if((this.dados_proposta.vlr_intervencao > 238856) && (this.dados_proposta.vlr_intervencao < 777450)){
this.vlr_tarifa = Number(Math.round(((this.dados_proposta.vlr_intervencao - 3500)* 0.03100775) + 3500)); this.vlr_tarifa = Number(Math.ceil(((this.dados_proposta.vlr_intervencao - 3500)* 0.03100775) + 3500));
}else if((this.dados_proposta.vlr_intervencao >= 777450) && (this.dados_proposta.vlr_intervencao < 1560500)){ }else if((this.dados_proposta.vlr_intervencao >= 777450) && (this.dados_proposta.vlr_intervencao < 1560500)){
this.vlr_tarifa = Number(Math.round(((this.dados_proposta.vlr_intervencao - 3500)* 0.03660886) + 3500)); this.vlr_tarifa = Number(Math.ceil(((this.dados_proposta.vlr_intervencao - 3500)* 0.03660886) + 3500));
}else if((this.dados_proposta.vlr_intervencao >= 1569500) && (this.dados_proposta.vlr_intervencao < 83523500)){ }else if((this.dados_proposta.vlr_intervencao >= 1569500) && (this.dados_proposta.vlr_intervencao < 83523500)){
this.vlr_tarifa = Number(Math.round(((this.dados_proposta.vlr_intervencao - 3500)* 0.042145594) + 3500)); this.vlr_tarifa = Number(Math.ceil(((this.dados_proposta.vlr_intervencao - 3500)* 0.042145594) + 3500));
}else if(this.dados_proposta.vlr_intervencao >= 83523500){ }else if(this.dados_proposta.vlr_intervencao >= 83523500){
this.vlr_tarifa = Number(Math.round(((this.dados_proposta.vlr_intervencao - 3500)* 0.0421455939) + 3500)); this.vlr_tarifa = Number(Math.ceil(((this.dados_proposta.vlr_intervencao - 3500)* 0.0421455939) + 3500));
}else{ }else{
this.vlr_tarifa = Number(0); this.vlr_tarifa = Number(0);
} }
this.vlr_repasse = this.formatarValor(Number(this.dados_proposta.vlr_intervencao),2); this.vlr_repasse =Number(this.dados_proposta.vlr_intervencao);
this.vlr_tarifa = this.formatarValor(Number(Math.round(this.vlr_tarifa)),2); this.vlr_tarifa =Number(Math.ceil(this.vlr_tarifa).toFixed());
this.vlr_final_transferegov = this.formatarValor(Number(this.dados_proposta.vlr_intervencao - this.vlr_tarifa),2); this.vlr_final_transferegov = Number(Math.ceil(this.dados_proposta.vlr_intervencao - this.vlr_tarifa).toFixed());
this.vlr_repasse = this.formatarValor(this.vlr_repasse,2);
this.vlr_tarifa = this.formatarValor(this.vlr_tarifa,2);
this.vlr_final_transferegov = this.formatarValor(this.vlr_final_transferegov,2);
}else{ }else{
Swal({ Swal({
title: 'Atenção!', title: 'Atenção!',
......
...@@ -145,7 +145,7 @@ ...@@ -145,7 +145,7 @@
<div class="p-3 text-right"> <div class="p-3 text-right">
<button class="br-button primary mr-3" type="button" name="imprimir" value="Imprimir" onclick="window.print();">Imprimir <button class="br-button primary mr-3" type="button" name="imprimir" value="Imprimir" onclick="window.print();">Imprimir
</button> </button>
<button class="br-button danger mr-3" type="button" onclick="javascript:window.history.go(-1)">Fechar <button class="br-button danger mr-3" type="button" onclick="window.location.href='/admin/selecao/propostas/selecionar'">Fechar
</button> </button>
</div> </div>
</div> </div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment