OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

Rev 156 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 156 Rev 174
Line 65... Line 65...
65
 
65
 
66
        if (getSource().getTable().contains("MONTANT_REMISE") && tableFacture.contains("MONTANT_REMISE")) {
66
        if (getSource().getTable().contains("MONTANT_REMISE") && tableFacture.contains("MONTANT_REMISE")) {
67
            map(tableDevis.getField("MONTANT_REMISE"), tableFacture.getField("MONTANT_REMISE"));
67
            map(tableDevis.getField("MONTANT_REMISE"), tableFacture.getField("MONTANT_REMISE"));
68
            map(tableDevis.getField("POURCENT_REMISE"), tableFacture.getField("POURCENT_REMISE"));
68
            map(tableDevis.getField("POURCENT_REMISE"), tableFacture.getField("POURCENT_REMISE"));
69
        }
69
        }
-
 
70
        if (getSource().getTable().contains("ID_CATEGORIE_COMPTABLE") && getDestination().getTable().contains("ID_CATEGORIE_COMPTABLE")) {
-
 
71
            map(getSource().getField("ID_CATEGORIE_COMPTABLE"), getDestination().getField("ID_CATEGORIE_COMPTABLE"));
-
 
72
        }
70
    }
73
    }
71
 
74
 
72
    @Override
75
    @Override
73
    protected void merge(SQLRowAccessor srcRow, SQLRowValues rowVals) {
76
    protected void merge(SQLRowAccessor srcRow, SQLRowValues rowVals) {
74
        super.merge(srcRow, rowVals);
77
        super.merge(srcRow, rowVals);
Line 76... Line 79...
76
 
79
 
77
        // Merge elements
80
        // Merge elements
78
        final SQLTable tableElementSource = getSource().getTable("DEVIS_ELEMENT");
81
        final SQLTable tableElementSource = getSource().getTable("DEVIS_ELEMENT");
79
        final SQLTable tableElementDestination = getSource().getTable("SAISIE_VENTE_FACTURE_ELEMENT");
82
        final SQLTable tableElementDestination = getSource().getTable("SAISIE_VENTE_FACTURE_ELEMENT");
80
        final Collection<? extends SQLRowAccessor> myListItem = srcRow.asRow().getReferentRows(tableElementSource);
83
        final Collection<? extends SQLRowAccessor> myListItem = srcRow.asRow().getReferentRows(tableElementSource);
81
        transfertReference(srcRow, rowVals, "OBJET", "NOM");
-
 
82
        transfertReference(srcRow, rowVals, "INFOS", "INFOS");
-
 
83
        transfertNumberReference(srcRow, rowVals, tableElementDestination, "ID_SAISIE_VENTE_FACTURE");
84
        transfertNumberReference(srcRow, rowVals, tableElementDestination, "ID_SAISIE_VENTE_FACTURE");
-
 
85
        transfertReference(srcRow, rowVals, tableElementDestination, "ID_SAISIE_VENTE_FACTURE", "OBJET", "NOM");
-
 
86
        transfertReference(srcRow, rowVals, tableElementDestination, "ID_SAISIE_VENTE_FACTURE", "INFOS", "INFOS");
84
 
87
 
85
        if (getDestination().contains("ID_TAXE_FRAIS_DOCUMENT")) {
88
        if (getDestination().contains("ID_TAXE_FRAIS_DOCUMENT")) {
86
            final SQLRowAccessor rowClient = srcRow.getForeign("ID_CLIENT");
89
            final SQLRowAccessor rowClient = srcRow.getForeign("ID_CLIENT");
87
            SQLRowAccessor rowFrais = rowClient.getForeign("ID_FRAIS_DOCUMENT");
90
            SQLRowAccessor rowFrais = rowClient.getForeign("ID_FRAIS_DOCUMENT");
88
            if (rowFrais != null && !rowFrais.isUndefined()) {
91
            if (rowFrais != null && !rowFrais.isUndefined()) {