OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

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

Rev 142 Rev 144
Line 56... Line 56...
56
    private Map<SQLRowAccessor, BigDecimal> mapHt = new HashMap<SQLRowAccessor, BigDecimal>();
56
    private Map<SQLRowAccessor, BigDecimal> mapHt = new HashMap<SQLRowAccessor, BigDecimal>();
57
    private Map<SQLRowAccessor, BigDecimal> mapHtSel = new HashMap<SQLRowAccessor, BigDecimal>();
57
    private Map<SQLRowAccessor, BigDecimal> mapHtSel = new HashMap<SQLRowAccessor, BigDecimal>();
58
 
58
 
59
    // Total des TVA par comptes
59
    // Total des TVA par comptes
60
    private Map<SQLRowAccessor, BigDecimal> mapHtTVA = new HashMap<SQLRowAccessor, BigDecimal>();
60
    private Map<SQLRowAccessor, BigDecimal> mapHtTVA = new HashMap<SQLRowAccessor, BigDecimal>();
61
    private Map<SQLRowAccessor, BigDecimal> mapHtTaxeCompl = new HashMap<SQLRowAccessor, BigDecimal>();
61
    private Map<SQLRowAccessor, Map<SQLRowAccessor, BigDecimal>> mapHtTaxeCompl = new HashMap<SQLRowAccessor, Map<SQLRowAccessor, BigDecimal>>();
62
    private Map<SQLRowAccessor, BigDecimal> mapHtTVAIntra = new HashMap<SQLRowAccessor, BigDecimal>();
62
    private Map<SQLRowAccessor, BigDecimal> mapHtTVAIntra = new HashMap<SQLRowAccessor, BigDecimal>();
63
    private Map<SQLRowAccessor, BigDecimal> mapHtTVASel = new HashMap<SQLRowAccessor, BigDecimal>();
63
    private Map<SQLRowAccessor, BigDecimal> mapHtTVASel = new HashMap<SQLRowAccessor, BigDecimal>();
64
 
64
 
65
    // Total HT par TVA
65
    // Total HT par TVA
66
    private Map<SQLRowAccessor, Tuple2<BigDecimal, BigDecimal>> mapHtTVARowTaux = new HashMap<SQLRowAccessor, Tuple2<BigDecimal, BigDecimal>>();
66
    private Map<SQLRowAccessor, Tuple2<BigDecimal, BigDecimal>> mapHtTVARowTaux = new HashMap<SQLRowAccessor, Tuple2<BigDecimal, BigDecimal>>();
Line 471... Line 471...
471
 
471
 
472
                    familleArticle = familleArticle.getForeign("ID_FAMILLE_ARTICLE_PERE");
472
                    familleArticle = familleArticle.getForeign("ID_FAMILLE_ARTICLE_PERE");
473
                }
473
                }
474
            }
474
            }
475
            if (!achat) {
475
            if (!achat) {
476
                SQLRowAccessor taxeCompl = (article.getFields().contains("ID_TAXE_COMPLEMENTAIRE") ? article.getForeign("ID_TAXE_COMPLEMENTAIRE") : null);
476
                SQLRowAccessor taxeCompl = (article.getFields().contains("ID_TAXE_COMPLEMENTAIRE") && article.getObject("ID_TAXE_COMPLEMENTAIRE") != null
-
 
477
                        && !article.isForeignEmpty("ID_TAXE_COMPLEMENTAIRE") ? article.getForeign("ID_TAXE_COMPLEMENTAIRE") : null);
477
                if (taxeCompl != null && !taxeCompl.isUndefined()) {
478
                if (taxeCompl != null && !taxeCompl.isUndefined()) {
-
 
479
 
-
 
480
                    Map<SQLRowAccessor, BigDecimal> mapCptTaxeValue = this.mapHtTaxeCompl.get(cpt);
-
 
481
                    if (mapCptTaxeValue == null) {
-
 
482
                        mapCptTaxeValue = new HashMap<SQLRowAccessor, BigDecimal>();
-
 
483
                        this.mapHtTaxeCompl.put(cpt, mapCptTaxeValue);
-
 
484
                    }
478
                    BigDecimal b = this.mapHtTaxeCompl.get(taxeCompl);
485
                    BigDecimal b = mapCptTaxeValue.get(taxeCompl);
479
                    if (b == null) {
486
                    if (b == null) {
480
                        b = BigDecimal.ZERO;
487
                        b = BigDecimal.ZERO;
481
                    }
488
                    }
482
                    b = b.add(totalLineHT);
489
                    b = b.add(totalLineHT);
483
                    this.mapHtTaxeCompl.put(taxeCompl, b);
490
                    mapCptTaxeValue.put(taxeCompl, b);
484
                }
491
                }
485
            }
492
            }
486
        }
493
        }
487
 
494
 
488
        if (achat) {
495
        if (achat) {
Line 575... Line 582...
575
 
582
 
576
    public BigDecimal getTotalServiceSel() {
583
    public BigDecimal getTotalServiceSel() {
577
        return totalServiceSel;
584
        return totalServiceSel;
578
    }
585
    }
579
 
586
 
580
    public Map<SQLRowAccessor, BigDecimal> getMapHtTaxeCompl() {
587
    public Map<SQLRowAccessor, Map<SQLRowAccessor, BigDecimal>> getMapHtTaxeCompl() {
581
        return mapHtTaxeCompl;
588
        return mapHtTaxeCompl;
582
    }
589
    }
583
 
590
 
584
    public BigDecimal getTotalHT() {
591
    public BigDecimal getTotalHT() {
585
        BigDecimal ht = BigDecimal.ZERO;
592
        BigDecimal ht = BigDecimal.ZERO;