Skip to content

Commit

Permalink
BugID: 593
Browse files Browse the repository at this point in the history
  • Loading branch information
mspasiano committed Sep 22, 2011
1 parent 8f2e360 commit deb1b45
Showing 1 changed file with 16 additions and 11 deletions.
Expand Up @@ -253,20 +253,25 @@ private Date findDataDiCompetenzaDocumentoAmm(UserContext userContext, MandatoBu
Date result = null;
Collection<Mandato_rigaBulk> righeMandato = findMandato_riga(userContext, mandato);
for (Mandato_rigaBulk mandatoRiga : righeMandato) {
IDocumentoAmministrativoSpesaBulk docAmm = SpringUtil.getBean(mandatoRiga.getCd_tipo_documento_amm(), IDocumentoAmministrativoSpesaBulk.class);
docAmm.setCd_cds(mandatoRiga.getCd_cds_doc_amm());
docAmm.setCd_uo(mandatoRiga.getCd_uo_doc_amm());
docAmm.setEsercizio(mandatoRiga.getEsercizio_doc_amm());
docAmm.setPg_doc_amm(mandatoRiga.getPg_doc_amm());
docAmm.setCd_tipo_doc_amm(mandatoRiga.getCd_tipo_documento_amm());
docAmm = (IDocumentoAmministrativoSpesaBulk)getHomeCache().getHome(docAmm.getClass()).findByPrimaryKey(docAmm);
if (result == null)
result = docAmm.getDt_da_competenza_coge();
else{
if (result.before(docAmm.getDt_da_competenza_coge()) )
try{
IDocumentoAmministrativoSpesaBulk docAmm = SpringUtil.getBean(mandatoRiga.getCd_tipo_documento_amm(), IDocumentoAmministrativoSpesaBulk.class);
docAmm.setCd_cds(mandatoRiga.getCd_cds_doc_amm());
docAmm.setCd_uo(mandatoRiga.getCd_uo_doc_amm());
docAmm.setEsercizio(mandatoRiga.getEsercizio_doc_amm());
docAmm.setPg_doc_amm(mandatoRiga.getPg_doc_amm());
docAmm.setCd_tipo_doc_amm(mandatoRiga.getCd_tipo_documento_amm());
docAmm = (IDocumentoAmministrativoSpesaBulk)getHomeCache().getHome(docAmm.getClass()).findByPrimaryKey(docAmm);
if (result == null)
result = docAmm.getDt_da_competenza_coge();
else{
if (result.before(docAmm.getDt_da_competenza_coge()) )
result = docAmm.getDt_da_competenza_coge();
}
}catch(NoSuchBeanDefinitionException _ex){
}
}
if (result == null)
result = mandato.getDt_emissione();
return result;
}

Expand Down

0 comments on commit deb1b45

Please sign in to comment.