OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

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

Rev 156 Rev 174
Line 394... Line 394...
394
 
394
 
395
        SQLRowAccessor rowCatCompta = null;
395
        SQLRowAccessor rowCatCompta = null;
396
        if (tiers.getObject("ID_CATEGORIE_COMPTABLE") != null && !tiers.isForeignEmpty("ID_CATEGORIE_COMPTABLE")) {
396
        if (tiers.getObject("ID_CATEGORIE_COMPTABLE") != null && !tiers.isForeignEmpty("ID_CATEGORIE_COMPTABLE")) {
397
            rowCatCompta = tiers.getForeign("ID_CATEGORIE_COMPTABLE");
397
            rowCatCompta = tiers.getForeign("ID_CATEGORIE_COMPTABLE");
398
        }
398
        }
-
 
399
 
-
 
400
        if (row.getTable().contains("ID_CATEGORIE_COMPTABLE") && row.getObject("ID_CATEGORIE_COMPTABLE") != null && !row.isForeignEmpty("ID_CATEGORIE_COMPTABLE")) {
-
 
401
            rowCatCompta = row.getForeign("ID_CATEGORIE_COMPTABLE");
-
 
402
        }
399
        TotalCalculator calc = new TotalCalculator("T_PA_HT", fieldTotalHT, null, achat, defaultCompte, rowCatCompta);
403
        TotalCalculator calc = new TotalCalculator("T_PA_HT", fieldTotalHT, null, achat, defaultCompte, rowCatCompta);
400
        calc.setIntraComm(intra);
404
        calc.setIntraComm(intra);
401
 
405
 
402
        String val = DefaultNXProps.getInstance().getStringProperty("ArticleService");
406
        String val = DefaultNXProps.getInstance().getStringProperty("ArticleService");
403
        Boolean bServiceActive = Boolean.valueOf(val);
407
        Boolean bServiceActive = Boolean.valueOf(val);
Line 434... Line 438...
434
                    List<SQLRow> rowsEch = row.getReferentRows(tableEchantillon);
438
                    List<SQLRow> rowsEch = row.getReferentRows(tableEchantillon);
435
                    for (SQLRow sqlRow : rowsEch) {
439
                    for (SQLRow sqlRow : rowsEch) {
436
                        calc.addEchantillon((BigDecimal) sqlRow.getObject("T_PV_HT"), sqlRow.getForeign("ID_TAXE"));
440
                        calc.addEchantillon((BigDecimal) sqlRow.getObject("T_PV_HT"), sqlRow.getForeign("ID_TAXE"));
437
                    }
441
                    }
438
                }
442
                }
-
 
443
 
439
                calc.checkResult();
444
                calc.checkResult();
440
                totalAvtRemise = calc.getTotalHT();
445
                totalAvtRemise = calc.getTotalHT();
441
            }
446
            }
442
        }
447
        }
443
 
448
 
Line 512... Line 517...
512
            rowValsFraisDoc.put("SERVICE", Boolean.TRUE);
517
            rowValsFraisDoc.put("SERVICE", Boolean.TRUE);
513
            rowValsFraisDoc.put("ID_FAMILLE_ARTICLE", null);
518
            rowValsFraisDoc.put("ID_FAMILLE_ARTICLE", null);
514
            calc.addLine(rowValsFraisDoc, null, 1, false);
519
            calc.addLine(rowValsFraisDoc, null, 1, false);
515
        }
520
        }
516
 
521
 
-
 
522
        // Fix TVA si nécessaire pour facture fournisseur
-
 
523
        if (row.getTable().contains("TVA_ADJUSTMENT")) {
-
 
524
            BigDecimal tvaFix = row.getBigDecimal("TVA_ADJUSTMENT");
-
 
525
            calc.addTVAAdjust(tvaFix);
-
 
526
        }
-
 
527
 
517
        calc.checkResult();
528
        calc.checkResult();
518
        return calc;
529
        return calc;
519
    }
530
    }
520
 
531
 
521
    /**
532
    /**