Examples of MovimentoContabile


Examples of it.pdor.contabilita.domain.hbm.MovimentoContabile

      getDettaglioMovimentoContabileBackingBean().preparaDatiDettaglioMovimentoContabile(null);
    }
  }

  private void controllaCoerenzaDatiArticolo(List<MovimentoContabile> movimentiCaricati) throws ImpossibileImportareMovimentoException {
    MovimentoContabile primoMovimentoCaricato = movimentiCaricati.get(0);
    String codiceSocietaVeicolo = primoMovimentoCaricato.getCodiceSocietaVeicolo();
    Date dataRegistrazione = primoMovimentoCaricato.getDataRegistrazione();
    Date dataCompetenza = primoMovimentoCaricato.getDataCompetenza();
    String tipoMovimento = primoMovimentoCaricato.getTipoMovimento();
    for (int i = 1; i < movimentiCaricati.size(); i++) {
      MovimentoContabile movimentoCaricatoCorrente = movimentiCaricati.get(i);
      if (!movimentoCaricatoCorrente.getCodiceSocietaVeicolo().equals(codiceSocietaVeicolo))
        throw new ImpossibileImportareMovimentoException(messageBundle.getMessage("TextDatiArticoloNonCoerentiPerSocietaVeicolo"));
      if (!movimentoCaricatoCorrente.getDataRegistrazione().equals(dataRegistrazione))
        throw new ImpossibileImportareMovimentoException(messageBundle.getMessage("TextDatiArticoloNonCoerentiPerDataRegistrazione"));
      if (!movimentoCaricatoCorrente.getDataCompetenza().equals(dataCompetenza))
        throw new ImpossibileImportareMovimentoException(messageBundle.getMessage("TextDatiArticoloNonCoerentiPerDataCompetenza"));
      if (!movimentoCaricatoCorrente.getTipoMovimento().equals(tipoMovimento))
        throw new ImpossibileImportareMovimentoException(messageBundle.getMessage("TextDatiArticoloNonCoerentiPerTipoMovimento"));
    }
  }
View Full Code Here

Examples of it.pdor.contabilita.domain.hbm.MovimentoContabile

    }
  }

  private void importaMovimenti(List<MovimentoContabile> movimentiCaricati) throws ImpossibileImportareMovimentoException {
    for (int i = 0; i < movimentiCaricati.size(); i++) {
      MovimentoContabile movimentoCaricato = movimentiCaricati.get(i);
      MovimentoContabileId movimentoCaricatoId = new MovimentoContabileId(0l, i+1);
      movimentoCaricato.setMovimentoContabileId(movimentoCaricatoId);
      try {
        getDettaglioMovimentoContabileBackingBean().importaMovimento(movimentoCaricato);
      } catch (MovimentoNonValidoException e) {
        String alertMsg = messageBundle.getMessage("TextProgressivoRigaArticolo") + " "
          + movimentoCaricato.getProgressivoRigaArticolo() + " ";
        alertMsg += e.getAlertMsg();
        throw new ImpossibileImportareMovimentoException(alertMsg);
      }
    }
  }
View Full Code Here

Examples of it.pdor.contabilita.domain.hbm.MovimentoContabile

  }

  private void impostaMovimentiImportati(List<MovimentoContabile> movimentiImportati) {
    List<RowMovimentoContabile> rows = new ArrayList<RowMovimentoContabile>();
    for (int i = 0; i < movimentiImportati.size(); i++) {
      MovimentoContabile movimentoImportato = movimentiImportati.get(i);
     
      RowMovimentoContabile newRow = new RowMovimentoContabile(movimentoImportato, Boolean.FALSE);
      newRow.inizializzaListeRighe();
     
      listaRigheMovIvaBackingBean.setListaRighe(newRow.getListaRigheMovIva());
View Full Code Here

Examples of it.pdor.contabilita.domain.hbm.MovimentoContabile

    return contabilitaService.pagedCercaContoMastroByCriteria(andCriteriaList, startingIndex, pageSize);
  }

  public MovimentoContabile leggiMovimentoContabileCompleto(long numeroArticoloCustom, int progressivoRigaArticolo)
      throws ContabilitaException {
    MovimentoContabile movimentoContabile = contabilitaService.leggiMovimentoContabile(numeroArticoloCustom,
        progressivoRigaArticolo);
    return resultFactory.make(movimentoContabile);
  }
View Full Code Here

Examples of it.pdor.contabilita.domain.hbm.MovimentoContabile

      flagSoggetto = "F";
    }
    if (!"S".equals(flagSoggetto) && !"M".equals(flagSoggetto) && !"B".equals(flagSoggetto) && !"F".equals(flagSoggetto))
      throw new ErrataTipologiaSottocontoException(flagSoggetto);

    MovimentoContabile movimentoContabile = new MovimentoContabile();

    MovimentoContabileId id = new MovimentoContabileId();
    id.setNumeroArticolo(datiFattura.getNumeroArticolo());
    id.setProgressivoRigaArticolo(datiFattura.setProgressivoRigaArticolo(datiFattura.getProgressivoRigaArticolo() + 1));
    movimentoContabile.setMovimentoContabileId(id);
    movimentoContabile.setNumeroArticoloCustom(datiFattura.getNumeroArticoloCustom());

    movimentoContabile.setCodiceCausale(dettaglioCausale.getCodiceCausaleOperazione());

    PianoDeiConti pianoDeiConti = new PianoDeiConti();
    pianoDeiConti.setCodiceGruppo(dettaglioCausale.getPianoDeiConti().getCodiceGruppo());
    pianoDeiConti.setCodiceMastro(dettaglioCausale.getPianoDeiConti().getCodiceMastro());
    if (dettaglioCausale.getPianoDeiConti().getCodiceConto() != null)
      pianoDeiConti.setCodiceConto(dettaglioCausale.getPianoDeiConti().getCodiceConto());
    else
      pianoDeiConti.setCodiceConto(null);
    if (pianoDeiConti.getCodiceConto() == null || pianoDeiConti.getCodiceConto().longValue() == 0)
      if (!"S".equals(dettaglioCausale.getTipoConto()) && !"M".equals(dettaglioCausale.getTipoConto()))
        pianoDeiConti.setCodiceConto(voce.getConto());
      else if ("M".equals(dettaglioCausale.getTipoConto()))
        pianoDeiConti.setCodiceConto(voce.getNumeroMutuo());
      else if ("S".equals(dettaglioCausale.getTipoConto()))
        pianoDeiConti.setCodiceConto(voce.getNumeroSoggetto());
    movimentoContabile.setPianoDeiConti(pianoDeiConti);

    if ("D".equalsIgnoreCase(dettaglioCausale.getSegno())) {
      movimentoContabile.setImportoDare(voce.getImportoVoce());
      movimentoContabile.setImportoAvere(0.0);
      movimentoContabile.setDescrizioneMovimento(StringUtils.substring(voce.getDescrizioneMovimentoDare(), 0, 60));

    } else if ("A".equalsIgnoreCase(dettaglioCausale.getSegno())) {
      movimentoContabile.setImportoAvere(voce.getImportoVoce());
      movimentoContabile.setImportoDare(0.0);
      movimentoContabile.setDescrizioneMovimento(StringUtils.substring(voce.getDescrizioneMovimentoAvere(), 0, 60));
    }

    movimentoContabile.setDataRegistrazione(datiFattura.getDataRegistrazione());

    if ("S".equalsIgnoreCase(dettaglioCausale.getFlagDataCompetenza()) && voce.isNullDataCompetenza())
      throw new DataCompetenzaNotFoundException();
    movimentoContabile.setDataCompetenza(!voce.isNullDataCompetenza() ? voce.getDataCompetenza() : datiFattura.getDataRegistrazione());

    if (!"S".equalsIgnoreCase(dettaglioCausale.getFlagDataValuta()))
      movimentoContabile.setDataValuta(null);
    else
      movimentoContabile.setDataValuta(voce.getDataValuta());

    movimentoContabile.setDataEmissione(null);

    movimentoContabile.setRiferimentoDocumento(null);

    movimentoContabile.setCodiceTipoProtocollo(datiFattura.getTp_protocollo());

    movimentoContabile.setNumeroProtocollo(0);

    movimentoContabile.setCodiceTipoDocumentoIva(null);

    movimentoContabile.setFlagModificabile("S");

    movimentoContabile.setNumeroBollato(0l);

    movimentoContabile.setTipoMovimento("C");

    movimentoContabile.setDataProtocollo(null);

    Long progr_antm = 0L;
    if (causaleAntiMafia != null) {
      GestioneAntiMafia antimafia = new GestioneAntiMafia(contabilitaDao);
      progr_antm = antimafia.creaAntiMafia(voce, causaleAntiMafia, datiFattura.getDataRegistrazione(), datiFattura.getNumeroArticolo(),
          datiFattura.getProgressivoRigaArticolo());
    }
    movimentoContabile.setNumeroAntm(progr_antm);

    movimentoContabile.setCodiceFinanziamento(calcolaCodiceFinanziamento());

    movimentoContabile.setProgressivoCausaleOperazione(dettaglioCausale.getProgressivoCausaleOperazione());

    movimentoContabile.setCodiceSocietaVeicolo(datiFattura.getCodiceSocietaVeicolo());

    contabilitaDao.scriviMovimentoContabile(movimentoContabile);

    if (dettaglioCausale.getCodicePartita() != null && !"".equals(dettaglioCausale.getCodicePartita())) {
      voce.setGruppoPartitario(dettaglioCausale.getPianoDeiConti().getCodiceGruppo());
View Full Code Here

Examples of it.pdor.contabilita.domain.hbm.MovimentoContabile

   
    totaleImportoDare = 0;
    totaleImportoAvere = 0;
    List<RowMovimentoContabile> result = new ArrayList<RowMovimentoContabile>();
    for (Object oggetto : oggetti) {
      MovimentoContabile movimentoContabile = (MovimentoContabile) oggetto;
      RowMovimentoContabile rowMovimentoContabile = new RowMovimentoContabile(movimentoContabile, Boolean.FALSE);
      result.add(rowMovimentoContabile);
      if (movimentoContabile.getImportoDare() != null)
        totaleImportoDare += movimentoContabile.getImportoDare();
      if (movimentoContabile.getImportoAvere() != null)
        totaleImportoAvere += movimentoContabile.getImportoAvere();
    }
    diffTotaliDareAvere = totaleImportoDare - totaleImportoAvere;
    return result;
  }
View Full Code Here

Examples of it.pdor.contabilita.domain.hbm.MovimentoContabile

      return;
    }
    List<Object> oggetti = pagedResult.getResult();
    resultForExport.clear();
    for (Object oggetto : oggetti) {
      MovimentoContabile movimentoContabile = (MovimentoContabile) oggetto;
      RowMovimentoContabile rowMovimentoContabile = new RowMovimentoContabile(movimentoContabile, Boolean.FALSE);
      resultForExport.add(rowMovimentoContabile);
    }
   
    // metto temporaneamente il risultato della ricerca nella dataTable dei risultati
View Full Code Here

Examples of it.pdor.contabilita.domain.hbm.MovimentoContabile

    return dettaglioMovimentoContabileBackingBean != null;
  }

  public double getImportoDaAllocare() {
    if (isPrimaNota()) {
      MovimentoContabile movimentoContabile = dettaglioMovimentoContabileBackingBean.getMovimentoContabile();
      if (movimentoContabile != null) {
        double saldoMovimentoContabile = NumberUtils.checkNull(movimentoContabile.getImportoDare())
            - NumberUtils.checkNull(movimentoContabile.getImportoAvere());
        return saldoMovimentoContabile - getSaldoPartitaPerMovimento(movimentoContabile);
      }
    }
    return 0.0;
  }
View Full Code Here

Examples of it.pdor.contabilita.domain.hbm.MovimentoContabile

    newPartita.setDataScadenza(null);
    newPartita.setDataValuta(null);
    newPartita.setFlagCalcMora(null);
    newPartita.setNumeroSoggetto(null);

    MovimentoContabile movimentoContabile = null;
    if (isPrimaNota()) {
      movimentoContabile = dettaglioMovimentoContabileBackingBean.getMovimentoContabile();
    }
    if (movimentoContabile == null) {
      if (selectedRow != null) {
        newPartita.setCodiceGruppo(selectedRow.getPartita().getCodiceGruppo());
        newPartita.setCodiceMastro(selectedRow.getPartita().getCodiceMastro());
        newPartita.getPartitaId().setCodiceConto(selectedRow.getPartita().getPartitaId().getCodiceConto());
        newPartita.getPartitaId().setTipoConto(selectedRow.getPartita().getPartitaId().getTipoConto());
      }
      newPartita.setDataRegistrazione(null);
      newPartita.setImportoDare(0.0);
      newPartita.setImportoAvere(0.0);
      newPartita.setDescrizionePartita(null);
      newPartita.setNumeroArticolo(null);
      newPartita.setProgressivoRigaArticolo(null);
    } else {
      newPartita.setDataRegistrazione(movimentoContabile.getDataRegistrazione());
      newPartita.setNumeroArticolo(movimentoContabile.getNumeroArticolo());
      newPartita.setProgressivoRigaArticolo(movimentoContabile.getProgressivoRigaArticolo());
      newPartita.setDescrizionePartita(movimentoContabile.getDescrizioneMovimento());
      newPartita.setCodiceGruppo(movimentoContabile.getPianoDeiConti().getCodiceGruppo());
      newPartita.setCodiceMastro(movimentoContabile.getPianoDeiConti().getCodiceMastro());
      newPartita.getPartitaId().setCodiceConto(movimentoContabile.getPianoDeiConti().getCodiceConto());
      if (selectedRow != null)
        newPartita.getPartitaId().setTipoConto(selectedRow.getPartita().getPartitaId().getTipoConto());
      else
        newPartita.getPartitaId().setTipoConto(flagPartitarioPerFiltro);
      newPartita.setCodicePartita(movimentoContabile.getDettaglioCausaleOperazione().getCodicePartita());
      if (getImportoDaAllocare() > 0.0) {
        newPartita.setImportoDare(getImportoDaAllocare());
        newPartita.setImportoAvere(0.0);
      } else if (getImportoDaAllocare() < 0.0) {
        newPartita.setImportoDare(0.0);
View Full Code Here

Examples of it.pdor.contabilita.domain.hbm.MovimentoContabile

  public boolean esistonoPartitePerIlMovimento(List<RowPartita> rows, long nrArticoloMovimento, int prgRigaMovimento) {
    return trovaPrimaPartitaDelMovimento(rows, nrArticoloMovimento, prgRigaMovimento) != null;
  }

  public MovimentoContabile getMovimentoContabile() {
    MovimentoContabile movimentoContabile = null;
    if (dettaglioMovimentoContabileBackingBean != null) {
      movimentoContabile = dettaglioMovimentoContabileBackingBean.getMovimentoContabile();
    }
    return movimentoContabile;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.