File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
src/MotorTributarioNet/Impostos/CalulosDeBC Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -141,11 +141,18 @@ private decimal CalcularValorIcms()
141141 /// </summary>
142142 private decimal CalcularValorIssqn ( )
143143 {
144- // O ISSQN é calculado sobre serviços
145144 if ( _tributavel . IsServico && _tributavel . PercentualIssqn > 0 )
146145 {
147- var tributacaoIssqn = new TributacaoIssqn ( _tributavel , _tipoDesconto ) ;
148- return tributacaoIssqn . Calcula ( false ) . Valor ;
146+ try
147+ {
148+ var tributacaoIssqn = new TributacaoIssqn ( _tributavel , _tipoDesconto ) ;
149+ return tributacaoIssqn . Calcula ( false ) . Valor ;
150+ }
151+ catch
152+ {
153+ // Em caso de erro no cálculo, retorna 0 para não impactar o cálculo do IBS/CBS
154+ return 0m ;
155+ }
149156 }
150157 return 0m ;
151158 }
You can’t perform that action at this time.
0 commit comments