OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

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

Rev 151 Rev 156
Line 137... Line 137...
137
            rowValsPiece.update();
137
            rowValsPiece.update();
138
        }
138
        }
139
 
139
 
140
        SQLTable tableEchantillon = null;
140
        SQLTable tableEchantillon = null;
141
        BigDecimal portHT = BigDecimal.valueOf(saisieRow.getLong("PORT_HT")).movePointLeft(2);
141
        BigDecimal portHT = BigDecimal.valueOf(saisieRow.getLong("PORT_HT")).movePointLeft(2);
-
 
142
        BigDecimal fraisDocHT = BigDecimal.valueOf(saisieRow.getLong("FRAIS_DOCUMENT_HT")).movePointLeft(2);
142
        TotalCalculator calc;
143
        TotalCalculator calc;
143
        if (clientRow.getTable().contains("ID_COMPTE_PCE_PRODUIT") && !clientRow.isForeignEmpty("ID_COMPTE_PCE_PRODUIT")) {
144
        if (clientRow.getTable().contains("ID_COMPTE_PCE_PRODUIT") && !clientRow.isForeignEmpty("ID_COMPTE_PCE_PRODUIT")) {
144
            calc = getValuesFromElement(false, false, "T_PV_HT", saisieRow, saisieVFTable.getTable("SAISIE_VENTE_FACTURE_ELEMENT"), portHT, saisieRow.getForeign("ID_TAXE_PORT"), tableEchantillon,
145
            calc = getValuesFromElement(false, false, "T_PV_HT", saisieRow, saisieVFTable.getTable("SAISIE_VENTE_FACTURE_ELEMENT"), portHT, saisieRow.getForeign("ID_TAXE_PORT"), fraisDocHT,
145
                    clientRow.getForeign("ID_COMPTE_PCE_PRODUIT"));
146
                    saisieRow.getForeign("ID_TAXE_FRAIS_DOCUMENT"), tableEchantillon, clientRow.getForeign("ID_COMPTE_PCE_PRODUIT"));
146
        } else {
147
        } else {
147
            calc = getValuesFromElement(saisieRow, saisieVFTable.getTable("SAISIE_VENTE_FACTURE_ELEMENT"), portHT, saisieRow.getForeign("ID_TAXE_PORT"), tableEchantillon);
148
            calc = getValuesFromElement(saisieRow, saisieVFTable.getTable("SAISIE_VENTE_FACTURE_ELEMENT"), portHT, saisieRow.getForeign("ID_TAXE_PORT"), fraisDocHT,
-
 
149
                    saisieRow.getForeign("ID_TAXE_FRAIS_DOCUMENT"), tableEchantillon);
148
        }
150
        }
149
 
151
 
150
        // On génére les ecritures si la facture n'est pas un acompte
152
        // On génére les ecritures si la facture n'est pas un acompte
151
        long ttcLongValue = calc.getTotalTTC().movePointRight(2).longValue();
153
        long ttcLongValue = calc.getTotalTTC().movePointRight(2).longValue();
152
        if (acompte == null || !acompte) {
154
        if (acompte == null || !acompte) {