fixes bug#14565
dev:Wallace qua:Renato git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/Integracion/IntegracaoReceitaDespesa/trunk/IntegracaoReceitaDespesa@94262 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
09c1ae2382
commit
9dd6cfc80e
|
@ -26,7 +26,7 @@ public class DespesaReceita {
|
|||
protected final String documentoVenda = "000000";// 202 6 Numérico
|
||||
protected final String tipoDocumentoVenda = " ";// 208 1 Alfanumérico
|
||||
protected final String numerodocumentoCPG = "0000000000";// 209 10 Numérico
|
||||
protected String formaPagamentoId = "";// 218 Numérico
|
||||
protected String formaPagamentoId = "0";// 218 Numérico
|
||||
protected final String finalLinha = "*";// 239 1 Alfanumérico
|
||||
|
||||
|
||||
|
@ -53,10 +53,10 @@ public class DespesaReceita {
|
|||
sb.append(numeroReciboTurismo);
|
||||
sb.append(getFormaPagamentoTurismo());
|
||||
sb.append(getTipoPagamentoTurismo());
|
||||
sb.append(descricaoDetalhada);
|
||||
sb.append(StringUtils.rightPad(StringUtils.isNotEmpty(descricaoDetalhada) ? truncStr(descricaoDetalhada, 100) : "", 100, " "));
|
||||
sb.append(documentoVenda);
|
||||
sb.append(tipoDocumentoVenda);
|
||||
sb.append(StringUtils.rightPad("", 10, "0"));
|
||||
sb.append(StringUtils.rightPad("", 9, "0"));
|
||||
sb.append(formaPagamentoId);
|
||||
sb.append(finalLinha);
|
||||
sb.append(System.getProperty("line.separator"));
|
||||
|
@ -92,11 +92,11 @@ public class DespesaReceita {
|
|||
}
|
||||
|
||||
public void setValorLancamento(String valorLancamento) {
|
||||
this.valorLancamento = StringUtils.leftPad(valorLancamento.replace(",", "").replace(".", ""), 13, "0");
|
||||
this.valorLancamento = StringUtils.leftPad(valorLancamento!=null?truncStr(valorLancamento.replace(",", ""), 100):valorLancamento.replace(",", "").replace(".", ""), 13, "0");
|
||||
}
|
||||
|
||||
public void setDescricaoDetalhada(String desc) {
|
||||
this.descricaoDetalhada = StringUtils.rightPad(desc != null ? truncStr(desc, 100) : "", 100, " ");
|
||||
this.descricaoDetalhada = StringUtils.rightPad(StringUtils.isNotEmpty(desc) ? truncStr(desc, 100) : "", 100, " ");
|
||||
}
|
||||
|
||||
public String getFormaPagamentoTurismo() {
|
||||
|
@ -116,7 +116,7 @@ public class DespesaReceita {
|
|||
}
|
||||
|
||||
public void setFormaPagamentoId(String formaPagamentoId) {
|
||||
this.formaPagamentoId = formaPagamentoId;
|
||||
this.formaPagamentoId = StringUtils.leftPad(StringUtils.isNotEmpty(formaPagamentoId) ? truncStr(formaPagamentoId.toString(), 1) : "", 1, "0");
|
||||
}
|
||||
|
||||
protected String truncStr(String str, int size) {
|
||||
|
|
Loading…
Reference in New Issue