Skip to content

Commit

Permalink
Issue #658 (#660)
Browse files Browse the repository at this point in the history
Corretto nullpointer per la stampa delle ricevute senza dataApplicativa.
  • Loading branch information
pintorig committed Dec 1, 2023
1 parent bcae632 commit c954e59
Showing 1 changed file with 14 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -322,20 +322,25 @@ private ElencoVoci getElencoVoci(CtReceipt rt, List<CtTransferPA> datiSingoloPag


private void setDataApplicativa(RicevutaTelematicaInput input, Date dataRt) {
Calendar cRt = Calendar.getInstance();
cRt.setTime(dataRt);

input.setDataApplicativa( this.sdfSoloData.format(dataRt));
if(dataRt != null) {
input.setDataApplicativa( this.sdfSoloData.format(dataRt));
} else {
input.setDataApplicativa("--");
}
}


private void setDataOperazione(RicevutaTelematicaInput input, Date dataRpt) {
Calendar cRpt = Calendar.getInstance();
cRpt.setTime(dataRpt);
if((cRpt.get(Calendar.HOUR_OF_DAY) + cRpt.get(Calendar.MINUTE) + cRpt.get(Calendar.SECOND)) == 0) {
input.setDataOperazione( this.sdfSoloData.format(dataRpt));
if(dataRpt != null) {
Calendar cRpt = Calendar.getInstance();
cRpt.setTime(dataRpt);
if((cRpt.get(Calendar.HOUR_OF_DAY) + cRpt.get(Calendar.MINUTE) + cRpt.get(Calendar.SECOND)) == 0) {
input.setDataOperazione( this.sdfSoloData.format(dataRpt));
} else {
input.setDataOperazione( this.sdfDataOraMinuti.format(dataRpt));
}
} else {
input.setDataOperazione( this.sdfDataOraMinuti.format(dataRpt));
input.setDataOperazione("--");
}
}

Expand Down

0 comments on commit c954e59

Please sign in to comment.