'Adição de multa itau feat bug#AL-3283' (#4) from AL-3283 into master
Reviewed-on: utilidades/GeneradorBoletosCNAB#4 Reviewed-by: Valdir Cordeiro <valdir.cordeiro@totvs.com.br>master
commit
049ec8ad38
2
pom.xml
2
pom.xml
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
<groupId>br.com.rjconsultores</groupId>
|
<groupId>br.com.rjconsultores</groupId>
|
||||||
<artifactId>GeneradorBoletosCNAB</artifactId>
|
<artifactId>GeneradorBoletosCNAB</artifactId>
|
||||||
<version>1.1.2</version>
|
<version>1.2.0</version>
|
||||||
<name>GeneradorBoletosCNAB</name>
|
<name>GeneradorBoletosCNAB</name>
|
||||||
|
|
||||||
<distributionManagement>
|
<distributionManagement>
|
||||||
|
|
|
@ -0,0 +1,63 @@
|
||||||
|
package com.rjconsultores.ventaboletos.blocos;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
public class DetalheMulta {
|
||||||
|
|
||||||
|
private Integer tipoRegistro;
|
||||||
|
private String codigoMulta;
|
||||||
|
private Date dataMulta;
|
||||||
|
private BigDecimal valorMulta;
|
||||||
|
private BigDecimal percentualMulta;
|
||||||
|
private Integer numeroSequencial;
|
||||||
|
|
||||||
|
public Integer getTipoRegistro() {
|
||||||
|
return tipoRegistro;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTipoRegistro(Integer tipoRegistro) {
|
||||||
|
this.tipoRegistro = tipoRegistro;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodigoMulta() {
|
||||||
|
return codigoMulta;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCodigoMulta(String codigoMulta) {
|
||||||
|
this.codigoMulta = codigoMulta;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getDataMulta() {
|
||||||
|
return dataMulta;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDataMulta(Date dataMulta) {
|
||||||
|
this.dataMulta = dataMulta;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getValorMulta() {
|
||||||
|
return valorMulta;
|
||||||
|
}
|
||||||
|
public void setValorMulta(BigDecimal valorMulta) {
|
||||||
|
this.valorMulta = valorMulta;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getPercentualMulta() {
|
||||||
|
return percentualMulta;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPercentualMulta(BigDecimal percentualMulta) {
|
||||||
|
this.percentualMulta = percentualMulta;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getNumeroSequencial() {
|
||||||
|
return numeroSequencial;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNumeroSequencial(Integer numeroSequencial) {
|
||||||
|
this.numeroSequencial = numeroSequencial;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -4,6 +4,7 @@ import java.math.BigDecimal;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
import com.rjconsultores.ventaboletos.blocos.DadosBoleto;
|
import com.rjconsultores.ventaboletos.blocos.DadosBoleto;
|
||||||
|
import com.rjconsultores.ventaboletos.blocos.DetalheMulta;
|
||||||
import com.rjconsultores.ventaboletos.blocos.DetalheObrigatorio;
|
import com.rjconsultores.ventaboletos.blocos.DetalheObrigatorio;
|
||||||
import com.rjconsultores.ventaboletos.blocos.RateioDeCredito;
|
import com.rjconsultores.ventaboletos.blocos.RateioDeCredito;
|
||||||
import com.rjconsultores.ventaboletos.enuns.TipoInscricaoPagador;
|
import com.rjconsultores.ventaboletos.enuns.TipoInscricaoPagador;
|
||||||
|
@ -61,6 +62,8 @@ public class DetalheObrigatorioItau implements DetalheObrigatorio{
|
||||||
|
|
||||||
private RateioDeCredito rateioDeCredito;
|
private RateioDeCredito rateioDeCredito;
|
||||||
|
|
||||||
|
private DetalheMulta detalheMulta;
|
||||||
|
|
||||||
public DadosBoleto getDadosBoleto() {
|
public DadosBoleto getDadosBoleto() {
|
||||||
return dadosBoleto;
|
return dadosBoleto;
|
||||||
}
|
}
|
||||||
|
@ -362,6 +365,12 @@ public class DetalheObrigatorioItau implements DetalheObrigatorio{
|
||||||
public void setNumCpfCnpj(String numCpfCnpj) {
|
public void setNumCpfCnpj(String numCpfCnpj) {
|
||||||
this.numCpfCnpj = numCpfCnpj;
|
this.numCpfCnpj = numCpfCnpj;
|
||||||
}
|
}
|
||||||
|
public DetalheMulta getDetalheMulta() {
|
||||||
|
return detalheMulta;
|
||||||
|
}
|
||||||
|
public void setDetalheMulta(DetalheMulta detalheMulta) {
|
||||||
|
this.detalheMulta = detalheMulta;
|
||||||
|
}
|
||||||
public DetalheObrigatorioItau clone() throws CloneNotSupportedException {
|
public DetalheObrigatorioItau clone() throws CloneNotSupportedException {
|
||||||
return (DetalheObrigatorioItau) super.clone();
|
return (DetalheObrigatorioItau) super.clone();
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,6 +8,7 @@ import org.jrimum.texgit.Record;
|
||||||
import com.rjconsultores.ventaboletos.blocos.CabecalhoRemessa;
|
import com.rjconsultores.ventaboletos.blocos.CabecalhoRemessa;
|
||||||
import com.rjconsultores.ventaboletos.blocos.CabecalhoRetorno;
|
import com.rjconsultores.ventaboletos.blocos.CabecalhoRetorno;
|
||||||
import com.rjconsultores.ventaboletos.blocos.DadosBoleto;
|
import com.rjconsultores.ventaboletos.blocos.DadosBoleto;
|
||||||
|
import com.rjconsultores.ventaboletos.blocos.DetalheMulta;
|
||||||
import com.rjconsultores.ventaboletos.blocos.DetalheObrigatorio;
|
import com.rjconsultores.ventaboletos.blocos.DetalheObrigatorio;
|
||||||
import com.rjconsultores.ventaboletos.blocos.DetalheRetorno;
|
import com.rjconsultores.ventaboletos.blocos.DetalheRetorno;
|
||||||
import com.rjconsultores.ventaboletos.blocos.RateioDeCredito;
|
import com.rjconsultores.ventaboletos.blocos.RateioDeCredito;
|
||||||
|
@ -112,11 +113,11 @@ public class ItauFlatFile extends AbstractFlatFile implements RemessaInterface {
|
||||||
}
|
}
|
||||||
}catch(UnsupportedOperationException e){ }
|
}catch(UnsupportedOperationException e){ }
|
||||||
|
|
||||||
RateioDeCredito rateioDeCredito = titulo.getRateioDeCredito();
|
DetalheMulta detalheMulta = titulo.getDetalheMulta();
|
||||||
|
|
||||||
try{
|
try{
|
||||||
if(dadosBoleto != null){
|
if(detalheMulta != null){
|
||||||
transacaoTitulos.addInnerRecord(createRateioDeCredito(rateioDeCredito));
|
transacaoTitulos.addInnerRecord(createDetalheMulta(detalheMulta));
|
||||||
}
|
}
|
||||||
}catch(UnsupportedOperationException e){ }
|
}catch(UnsupportedOperationException e){ }
|
||||||
|
|
||||||
|
@ -128,9 +129,15 @@ public class ItauFlatFile extends AbstractFlatFile implements RemessaInterface {
|
||||||
throw new UnsupportedOperationException("Não necessário...");
|
throw new UnsupportedOperationException("Não necessário...");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
protected Record createDetalheMulta(DetalheMulta detalheMulta) {
|
||||||
protected Record createRateioDeCredito(RateioDeCredito rateioDeCredito) {
|
Record detalhe = getFlatFile().createRecord("DetalheMulta");
|
||||||
throw new UnsupportedOperationException("Não necessário...");
|
|
||||||
|
detalhe.setValue("CodigoMulta", FormataUtil.formatarValorPorTamanho(detalheMulta.getCodigoMulta(), 1));
|
||||||
|
detalhe.setValue("DataMulta", FormataUtil.formataData( detalheMulta.getDataMulta()) );
|
||||||
|
detalhe.setValue("ValorMulta", FormataUtil.formatarValorPorTamanho(detalheMulta.getPercentualMulta(), 13));
|
||||||
|
detalhe.setValue("NumeroSequencialRegistro", FormataUtil.formatarValorPorTamanho(detalheMulta.getNumeroSequencial(), 6));
|
||||||
|
|
||||||
|
return detalhe;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -157,4 +164,9 @@ public class ItauFlatFile extends AbstractFlatFile implements RemessaInterface {
|
||||||
protected RodapeRetorno readTrailler(Record trailler) {
|
protected RodapeRetorno readTrailler(Record trailler) {
|
||||||
throw new UnsupportedOperationException("Somente classe de Retorno.");
|
throw new UnsupportedOperationException("Somente classe de Retorno.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Record createRateioDeCredito(RateioDeCredito rateioDeCredito) {
|
||||||
|
throw new UnsupportedOperationException("Não necessário...");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<txg:Texgit xmlns:txg="http://jrimum.org/texgit"
|
<txg:Texgit xmlns:txg="http://jrimum.org/texgit"
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance"
|
||||||
xsi:schemaLocation="http://jrimum.org/texgit http://jrimum.org/texgit/chrome/site/TexgitSchema.xsd"
|
xsi:schemaLocation="http://jrimum.org/texgit http://jrimum.org/texgit/chrome/site/TexgitSchema.xsd"
|
||||||
version="1.0-academic">
|
version="1.0-academic">
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<txg:Texgit xmlns:txg="http://jrimum.org/texgit"
|
<txg:Texgit xmlns:txg="http://jrimum.org/texgit"
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance"
|
||||||
xsi:schemaLocation="http://jrimum.org/texgit http://jrimum.org/texgit/chrome/site/TexgitSchema.xsd"
|
xsi:schemaLocation="https://jrimum.org/texgit https://jrimum.org/texgit/chrome/site/TexgitSchema.xsd"
|
||||||
version="1.0-academic">
|
version="1.0-academic">
|
||||||
<FlatFile>
|
<FlatFile>
|
||||||
<layout>
|
<layout>
|
||||||
|
@ -95,27 +95,19 @@
|
||||||
<Field name="Brancos4" length="1" type="CHARACTER" /><!--Enviar 1 Branco -->
|
<Field name="Brancos4" length="1" type="CHARACTER" /><!--Enviar 1 Branco -->
|
||||||
<Field name="NumeroSequencialRegistro" type="INTEGER" length="6" padding="ZERO_LEFT" />
|
<Field name="NumeroSequencialRegistro" type="INTEGER" length="6" padding="ZERO_LEFT" />
|
||||||
</GroupOfFields>
|
</GroupOfFields>
|
||||||
<!-- De forma aninhada mesmo
|
|
||||||
<GroupOfInnerRecords>
|
<GroupOfInnerRecords>
|
||||||
<Record name="DadosBoleto">
|
<Record name="DetalheMulta">
|
||||||
<GroupOfFields>
|
<GroupOfFields>
|
||||||
<IdType name="IDReg" value="2" length="1" position="1" />
|
<IdType name="IDReg" value="2" length="1" position="1" />
|
||||||
<Field name="Mensagem1" length="80" />
|
<Field name="CodigoMulta" length="1" type="INTEGER" padding="ZERO_LEFT" />
|
||||||
<Field name="Mensagem2" length="80" />
|
<Field name="DataMulta" length="8" type="DATE" format="DATE_DDMMYYYY" padding="ZERO_LEFT" />
|
||||||
<Field name="Mensagem3" length="80" />
|
<Field name="ValorMulta" length="13" type="INTEGER" padding="ZERO_LEFT" />
|
||||||
<Field name="Mensagem4" length="80" />
|
<Field name="Brancos" length="371" type="CHARACTER" />
|
||||||
<Field name="Filler" length="45" />
|
<Field name="NumeroSequencialRegistro" type="INTEGER" length="6" padding="ZERO_LEFT" />
|
||||||
<Field name="Carteira" length="3" type="INTEGER" padding="ZERO_LEFT" />
|
|
||||||
<Field name="Agencia" length="5" type="INTEGER" padding="ZERO_LEFT" />
|
|
||||||
<Field name="ContaCorrente" length="7" type="INTEGER" padding="ZERO_LEFT" />
|
|
||||||
<Field name="DigitoCC" length="1" type="CHARACTER" />
|
|
||||||
<Field name="NossoNumero" length="11" padding="ZERO_LEFT" />
|
|
||||||
<Field name="DigitoNN" length="1" type="CHARACTER" />
|
|
||||||
<SequencialNumber name="sequencia" type="INTEGER" length="6" position="13" padding="ZERO_LEFT" />
|
|
||||||
</GroupOfFields>
|
</GroupOfFields>
|
||||||
</Record>
|
</Record>
|
||||||
</GroupOfInnerRecords>
|
</GroupOfInnerRecords>
|
||||||
-->
|
|
||||||
</Record>
|
</Record>
|
||||||
<Record name="Trailler">
|
<Record name="Trailler">
|
||||||
<GroupOfFields>
|
<GroupOfFields>
|
||||||
|
|
Loading…
Reference in New Issue