OpenConcerto

Dépôt officiel du code source de l'ERP OpenConcerto
sonarqube

svn://code.openconcerto.org/openconcerto

Rev

Rev 156 | Rev 177 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 156 Rev 174
Line 91... Line 91...
91
            this.putValue("ID_JOURNAL", idJrnl);
91
            this.putValue("ID_JOURNAL", idJrnl);
92
        }
92
        }
93
 
93
 
94
        List<Integer> pieceIDs = new ArrayList<Integer>();
94
        List<Integer> pieceIDs = new ArrayList<Integer>();
95
        SQLRowValues rowValsDepotElt = new SQLRowValues(depot.getTable().getTable("DEPOT_CHEQUE_ELEMENT"));
95
        SQLRowValues rowValsDepotElt = new SQLRowValues(depot.getTable().getTable("DEPOT_CHEQUE_ELEMENT"));
96
        rowValsDepotElt.putNulls("MONTANT", "TIERS");
96
        rowValsDepotElt.putNulls("MONTANT", "TIERS", "PIECE");
97
        rowValsDepotElt.putRowValues("ID_CLIENT").putNulls("NOM", "ID_COMPTE_PCE");
97
        rowValsDepotElt.putRowValues("ID_CLIENT").putNulls("NOM", "ID_COMPTE_PCE");
98
        final SQLRowValues rowValuesChq = rowValsDepotElt.putRowValues("ID_CHEQUE_A_ENCAISSER");
98
        final SQLRowValues rowValuesChq = rowValsDepotElt.putRowValues("ID_CHEQUE_A_ENCAISSER");
99
        rowValuesChq.putNulls("SANS_VALEUR_ENCAISSEMENT").putRowValues("ID_MOUVEMENT").putNulls("ID_PIECE");
99
        rowValuesChq.putNulls("SANS_VALEUR_ENCAISSEMENT").putRowValues("ID_MOUVEMENT").putNulls("ID_PIECE");
100
        rowValuesChq.putNulls("ID_COMPTE_PCE_TIERS").putNulls("NUMERO");
100
        rowValuesChq.putNulls("ID_COMPTE_PCE_TIERS").putNulls("NUMERO");
101
        List<SQLRowValues> cheques = SQLRowValuesListFetcher.create(rowValsDepotElt).fetch(new Where(rowValsDepotElt.getTable().getField("ID_DEPOT_CHEQUE"), "=", depot.getID()));
101
        List<SQLRowValues> cheques = SQLRowValuesListFetcher.create(rowValsDepotElt).fetch(new Where(rowValsDepotElt.getTable().getField("ID_DEPOT_CHEQUE"), "=", depot.getID()));
102
        for (SQLRowValues sqlRowAccessor : cheques) {
102
        for (SQLRowValues sqlRowAccessor : cheques) {
103
            final SQLRowAccessor clientRow = sqlRowAccessor.getForeign("ID_CLIENT");
103
            final SQLRowAccessor clientRow = sqlRowAccessor.getForeign("ID_CLIENT");
104
            // this.nom = this.nom + " " + StringUtils.limitLength(clientRow.getString("NOM"), 20);
104
            // this.nom = this.nom + " " + StringUtils.limitLength(clientRow.getString("NOM"), 20);
105
            this.putValue("NOM", this.nom + " " + StringUtils.limitLength(clientRow.getString("NOM"), 20));
105
            this.putValue("NOM", this.nom + " " + sqlRowAccessor.getString("PIECE") + " " + StringUtils.limitLength(clientRow.getString("NOM"), 20));
106
            SQLRowAccessor chequeRow = sqlRowAccessor.getForeign("ID_CHEQUE_A_ENCAISSER");
106
            SQLRowAccessor chequeRow = sqlRowAccessor.getForeign("ID_CHEQUE_A_ENCAISSER");
107
            pieceIDs.add(chequeRow.getForeign("ID_MOUVEMENT").getForeignID("ID_PIECE"));
107
            pieceIDs.add(chequeRow.getForeign("ID_MOUVEMENT").getForeignID("ID_PIECE"));
108
            // compte Clients
108
            // compte Clients
109
            SQLRowAccessor rowCptTiers = chequeRow.getForeign("ID_COMPTE_PCE_TIERS");
109
            SQLRowAccessor rowCptTiers = chequeRow.getForeign("ID_COMPTE_PCE_TIERS");
110
            int idCompteClient = rowCptTiers != null && !rowCptTiers.isUndefined() ? rowCptTiers.getID() : -1;
110
            int idCompteClient = rowCptTiers != null && !rowCptTiers.isUndefined() ? rowCptTiers.getID() : -1;