423 lines
10 KiB
Java
423 lines
10 KiB
Java
package it.acxent.contab;
|
|
|
|
import it.acxent.anag.Clifor;
|
|
import it.acxent.anag.TipoPagamento;
|
|
import it.acxent.db.ApplParmFull;
|
|
import it.acxent.db.CRAdapter;
|
|
import it.acxent.util.SimpleDateFormat;
|
|
import java.io.Serializable;
|
|
import java.sql.Date;
|
|
|
|
public class DocumentoPagamentoCR extends CRAdapter implements Serializable {
|
|
private static final long serialVersionUID = 8044331984020899695L;
|
|
|
|
private long id_documentoPagamento;
|
|
|
|
private Date data;
|
|
|
|
private double importo;
|
|
|
|
private String nota;
|
|
|
|
private long id_documento;
|
|
|
|
private Documento documento;
|
|
|
|
private long id_tipoPagamentoS;
|
|
|
|
private Date dataDa;
|
|
|
|
private Date dataA;
|
|
|
|
private Date dataFatturaDa;
|
|
|
|
private Date dataScadenzaA;
|
|
|
|
private long numeroFattura;
|
|
|
|
private long annoFattura;
|
|
|
|
private long id_clifor;
|
|
|
|
private Clifor clifor;
|
|
|
|
private long flgTipoSaldo = 1L;
|
|
|
|
private long id_tipoDocumento;
|
|
|
|
private long flgTipoIncasso;
|
|
|
|
private String filePdf;
|
|
|
|
private String flgClienteFornitore;
|
|
|
|
public static final long SALDO_DOCUMENTI_TUTTI = 0L;
|
|
|
|
public static final long SALDO_DOCUMENTI_APERTI = 1L;
|
|
|
|
public static final long SALDO_DOCUMENTI_CHIUSI = 2L;
|
|
|
|
private String riferimento;
|
|
|
|
private long flgTipoMovimento;
|
|
|
|
private TipoPagamento tipoPagamento;
|
|
|
|
private TipoDocumento tipoDocumento;
|
|
|
|
private Date dataFatturaA;
|
|
|
|
private Date dataScadenzaDa;
|
|
|
|
private String flgTipoClifor;
|
|
|
|
private Date dataRiferimentoDa;
|
|
|
|
private Date dataRiferimentoA;
|
|
|
|
public DocumentoPagamentoCR(ApplParmFull newApplParmFull) {
|
|
super(newApplParmFull);
|
|
}
|
|
|
|
public DocumentoPagamentoCR() {}
|
|
|
|
public long getId_documentoPagamento() {
|
|
return this.id_documentoPagamento;
|
|
}
|
|
|
|
public void setId_documentoPagamento(long id_incassoPagamento) {
|
|
this.id_documentoPagamento = id_incassoPagamento;
|
|
}
|
|
|
|
public Date getData() {
|
|
return this.data;
|
|
}
|
|
|
|
public void setData(Date data) {
|
|
this.data = data;
|
|
}
|
|
|
|
public double getImporto() {
|
|
return this.importo;
|
|
}
|
|
|
|
public void setImporto(double importo) {
|
|
this.importo = importo;
|
|
}
|
|
|
|
public String getNota() {
|
|
return (this.nota == null) ? "" : this.nota;
|
|
}
|
|
|
|
public void setNota(String nota) {
|
|
this.nota = nota;
|
|
}
|
|
|
|
public long getId_documento() {
|
|
return this.id_documento;
|
|
}
|
|
|
|
public void setId_documento(long id_documento) {
|
|
this.id_documento = id_documento;
|
|
}
|
|
|
|
public Documento getDocumento() {
|
|
this.documento = (Documento)getSecondaryObject(this.documento, Documento.class, getId_documento());
|
|
return this.documento;
|
|
}
|
|
|
|
public void setDocumento(Documento documento) {
|
|
this.documento = documento;
|
|
}
|
|
|
|
public long getId_tipoPagamentoS() {
|
|
return this.id_tipoPagamentoS;
|
|
}
|
|
|
|
public void setId_tipoPagamentoS(long id_tipoPagamento) {
|
|
this.id_tipoPagamentoS = id_tipoPagamento;
|
|
}
|
|
|
|
public Date getDataDa() {
|
|
return this.dataDa;
|
|
}
|
|
|
|
public void setDataDa(Date dataDa) {
|
|
this.dataDa = dataDa;
|
|
}
|
|
|
|
public Date getDataA() {
|
|
return this.dataA;
|
|
}
|
|
|
|
public void setDataA(Date dataA) {
|
|
this.dataA = dataA;
|
|
}
|
|
|
|
public Date getDataFatturaDa() {
|
|
return this.dataFatturaDa;
|
|
}
|
|
|
|
public void setDataFatturaDa(Date dataFatturaDa) {
|
|
this.dataFatturaDa = dataFatturaDa;
|
|
}
|
|
|
|
public Date getDataFatturaA() {
|
|
return this.dataFatturaA;
|
|
}
|
|
|
|
public void setDataFatturaA(Date dataFatturaA) {
|
|
this.dataFatturaA = dataFatturaA;
|
|
}
|
|
|
|
public long getNumeroFattura() {
|
|
return this.numeroFattura;
|
|
}
|
|
|
|
public void setNumeroFattura(long numeroFattura) {
|
|
this.numeroFattura = numeroFattura;
|
|
}
|
|
|
|
public long getAnnoFattura() {
|
|
return this.annoFattura;
|
|
}
|
|
|
|
public void setAnnoFattura(long annoFattura) {
|
|
this.annoFattura = annoFattura;
|
|
}
|
|
|
|
public long getId_clifor() {
|
|
return this.id_clifor;
|
|
}
|
|
|
|
public void setId_clifor(long id_clifor) {
|
|
this.id_clifor = id_clifor;
|
|
}
|
|
|
|
public Clifor getClifor() {
|
|
this.clifor = (Clifor)getSecondaryObject(this.clifor, Clifor.class, getId_clifor());
|
|
return this.clifor;
|
|
}
|
|
|
|
public void setClifor(Clifor clifor) {
|
|
this.clifor = clifor;
|
|
}
|
|
|
|
public long getFlgTipoSaldo() {
|
|
return this.flgTipoSaldo;
|
|
}
|
|
|
|
public void setFlgTipoSaldo(long flgTipoSaldo) {
|
|
this.flgTipoSaldo = flgTipoSaldo;
|
|
}
|
|
|
|
public long getId_tipoDocumento() {
|
|
return this.id_tipoDocumento;
|
|
}
|
|
|
|
public void setId_tipoDocumento(long id_tipoDocumento) {
|
|
this.id_tipoDocumento = id_tipoDocumento;
|
|
}
|
|
|
|
public long getFlgTipoIncasso() {
|
|
return this.flgTipoIncasso;
|
|
}
|
|
|
|
public void setFlgTipoIncasso(long flgTipoIncasso) {
|
|
this.flgTipoIncasso = flgTipoIncasso;
|
|
}
|
|
|
|
public long getFlgTipoMovimento() {
|
|
return this.flgTipoMovimento;
|
|
}
|
|
|
|
public void setFlgTipoMovimento(long tipoMovimento) {
|
|
this.flgTipoMovimento = tipoMovimento;
|
|
}
|
|
|
|
public String getRiferimento() {
|
|
return (this.riferimento == null) ? AB_EMPTY_STRING : this.riferimento.trim();
|
|
}
|
|
|
|
public void setRiferimento(String riferimento) {
|
|
this.riferimento = riferimento;
|
|
}
|
|
|
|
public String getFilePdf() {
|
|
return this.filePdf;
|
|
}
|
|
|
|
public void setFilePdf(String filePdf) {
|
|
this.filePdf = filePdf;
|
|
}
|
|
|
|
public String getFlgClienteFornitore() {
|
|
return (this.flgClienteFornitore == null) ? AB_EMPTY_STRING : this.flgClienteFornitore;
|
|
}
|
|
|
|
public void setFlgClienteFornitore(String flgAttivoPassivo) {
|
|
this.flgClienteFornitore = flgAttivoPassivo;
|
|
}
|
|
|
|
public String getCriteriDiRicerca() {
|
|
SimpleDateFormat df = new SimpleDateFormat("dd/MM/yyyy");
|
|
StringBuilder sb = new StringBuilder();
|
|
if (getId_clifor() > 0L)
|
|
sb.append("Cliente: " + getClifor().getCognomeNome());
|
|
if (getDataDa() != null) {
|
|
if (sb.length() > 0)
|
|
sb.append(" ");
|
|
sb.append("Data Da: " + df.format(getDataDa()));
|
|
}
|
|
if (getDataA() != null) {
|
|
if (sb.length() > 0)
|
|
sb.append(" ");
|
|
sb.append("Data A: " + df.format(getDataA()));
|
|
}
|
|
if (getFlgTipoSaldo() == 0L) {
|
|
if (sb.length() > 0)
|
|
sb.append(" ");
|
|
sb.append("Tipo: Tutte");
|
|
}
|
|
if (getFlgTipoSaldo() == 1L) {
|
|
if (sb.length() > 0)
|
|
sb.append(" ");
|
|
sb.append("Tipo: Aperte");
|
|
}
|
|
if (getFlgTipoSaldo() == 2L) {
|
|
if (sb.length() > 0)
|
|
sb.append(" ");
|
|
sb.append("Tipo: Chiuse");
|
|
}
|
|
if (getId_tipoPagamentoS() > 0L) {
|
|
if (sb.length() > 0)
|
|
sb.append(" ");
|
|
sb.append("Tipo Pagamento: " + getTipoPagamento().getDescrizione());
|
|
}
|
|
if (!getRiferimento().isEmpty()) {
|
|
if (sb.length() > 0)
|
|
sb.append(" ");
|
|
sb.append("Riferimento: " + getRiferimento());
|
|
}
|
|
if (getId_tipoDocumento() > 0L) {
|
|
if (sb.length() > 0)
|
|
sb.append(" ");
|
|
sb.append("Tipo Documento: " + getTipoDocumento().getDescrizione());
|
|
}
|
|
if (getNumeroFattura() > 0L) {
|
|
if (sb.length() > 0)
|
|
sb.append(" ");
|
|
sb.append("Numero Fattura: " + getNumeroFattura());
|
|
}
|
|
if (getAnnoFattura() > 0L) {
|
|
if (sb.length() > 0)
|
|
sb.append(" ");
|
|
sb.append("Anno Fattura: " + getAnnoFattura());
|
|
}
|
|
if (getDataFatturaDa() != null) {
|
|
if (sb.length() > 0)
|
|
sb.append(" ");
|
|
sb.append("Data Doc. Da: " + df.format(getDataFatturaDa()));
|
|
}
|
|
if (getDataFatturaA() != null) {
|
|
if (sb.length() > 0)
|
|
sb.append(" ");
|
|
sb.append("Data Doc. A: " + df.format(getDataFatturaA()));
|
|
}
|
|
if (getDataRiferimentoDa() != null) {
|
|
if (sb.length() > 0)
|
|
sb.append(" ");
|
|
sb.append("Data Rif. Da: " + df.format(getDataRiferimentoDa()));
|
|
}
|
|
if (getDataRiferimentoA() != null) {
|
|
if (sb.length() > 0)
|
|
sb.append(" ");
|
|
sb.append("Data Rif. A: " + df.format(getDataRiferimentoA()));
|
|
}
|
|
if (getFlgClienteFornitore().equals("C")) {
|
|
if (sb.length() > 0)
|
|
sb.append(" ");
|
|
sb.append("Attività/Passività: Attività");
|
|
}
|
|
if (getFlgClienteFornitore().equals("F")) {
|
|
if (sb.length() > 0)
|
|
sb.append(" ");
|
|
sb.append("Attività/Passività: Passività");
|
|
}
|
|
return sb.toString();
|
|
}
|
|
|
|
public TipoPagamento getTipoPagamento() {
|
|
this.tipoPagamento = (TipoPagamento)getSecondaryObject(this.tipoPagamento, TipoPagamento.class, getId_tipoPagamentoS());
|
|
return this.tipoPagamento;
|
|
}
|
|
|
|
public void setTipoPagamento(TipoPagamento tipoPagamento) {
|
|
this.tipoPagamento = tipoPagamento;
|
|
}
|
|
|
|
public TipoDocumento getTipoDocumento() {
|
|
this.tipoDocumento = (TipoDocumento)getSecondaryObject(this.tipoDocumento, TipoDocumento.class, getId_tipoDocumento());
|
|
return this.tipoDocumento;
|
|
}
|
|
|
|
public void setTipoDocumento(TipoDocumento tipoDocumento) {
|
|
this.tipoDocumento = tipoDocumento;
|
|
}
|
|
|
|
public static final String getTipoIncasso(long l_flgTipoIncasso) {
|
|
return DocumentoPagamento.getTipoIncasso(l_flgTipoIncasso);
|
|
}
|
|
|
|
public static final String getTipoMovimento(long l_flgTipoMovimento) {
|
|
return DocumentoPagamento.getTipoMovimento(l_flgTipoMovimento);
|
|
}
|
|
|
|
public String getTipoIncasso() {
|
|
return DocumentoPagamento.getTipoIncasso(getFlgTipoIncasso());
|
|
}
|
|
|
|
public String getTipoMovimento() {
|
|
return DocumentoPagamento.getTipoMovimento(getFlgTipoMovimento());
|
|
}
|
|
|
|
public Date getDataScadenzaA() {
|
|
return this.dataScadenzaA;
|
|
}
|
|
|
|
public void setDataScadenzaA(Date dataScadenzaA) {
|
|
this.dataScadenzaA = dataScadenzaA;
|
|
}
|
|
|
|
public Date getDataScadenzaDa() {
|
|
return this.dataScadenzaDa;
|
|
}
|
|
|
|
public void setDataScadenzaDa(Date dataScadenzaDa) {
|
|
this.dataScadenzaDa = dataScadenzaDa;
|
|
}
|
|
|
|
public String getFlgTipoClifor() {
|
|
return (this.flgTipoClifor == null) ? AB_EMPTY_STRING : this.flgTipoClifor.trim();
|
|
}
|
|
|
|
public void setFlgTipoClifor(String flgTipoClifor) {
|
|
this.flgTipoClifor = flgTipoClifor;
|
|
}
|
|
|
|
public Date getDataRiferimentoDa() {
|
|
return this.dataRiferimentoDa;
|
|
}
|
|
|
|
public void setDataRiferimentoDa(Date dataRiferimentoDa) {
|
|
this.dataRiferimentoDa = dataRiferimentoDa;
|
|
}
|
|
|
|
public Date getDataRiferimentoA() {
|
|
return this.dataRiferimentoA;
|
|
}
|
|
|
|
public void setDataRiferimentoA(Date dataRiferimentoA) {
|
|
this.dataRiferimentoA = dataRiferimentoA;
|
|
}
|
|
}
|