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 615... Line 615...
615
            completionField.add("ID_PAYS");
615
            completionField.add("ID_PAYS");
616
        }
616
        }
617
        if (e.getTable().getFieldsName().contains("ID_ECO_CONTRIBUTION")) {
617
        if (e.getTable().getFieldsName().contains("ID_ECO_CONTRIBUTION")) {
618
            completionField.add("ID_ECO_CONTRIBUTION");
618
            completionField.add("ID_ECO_CONTRIBUTION");
619
        }
619
        }
-
 
620
        completionField.add("POURCENT_REMISE");
620
        completionField.add("ID_UNITE_VENTE");
621
        completionField.add("ID_UNITE_VENTE");
621
        completionField.add("QTE_UNITAIRE");
622
        completionField.add("QTE_UNITAIRE");
622
        completionField.add("PA_HT");
623
        completionField.add("PA_HT");
623
        completionField.add("PV_HT");
624
        completionField.add("PV_HT");
624
        completionField.add("ID_TAXE");
625
        completionField.add("ID_TAXE");
Line 651... Line 652...
651
                this.table.getRowValuesTableModel()) {
652
                this.table.getRowValuesTableModel()) {
652
            @Override
653
            @Override
653
            protected Object getValueFrom(SQLRow row, String field, SQLRowAccessor rowDest) {
654
            protected Object getValueFrom(SQLRow row, String field, SQLRowAccessor rowDest) {
654
                Object res = tarifCompletion(row, field, rowDest, true);
655
                Object res = tarifCompletion(row, field, rowDest, true);
655
                if (res == null) {
656
                if (res == null) {
656
                    return super.getValueFrom(row, field, rowDest);
657
                    res = super.getValueFrom(row, field, rowDest);
657
                } else {
658
                }                
-
 
659
                if (field.equals("POURCENT_REMISE")) {
658
                    return res;
660
                    return getRemiseClient(row);
659
                }
661
                }
-
 
662
                return res;
660
            }
663
            }
661
        };
664
        };
662
        m.fill("NOM", "NOM");
665
        m.fill("NOM", "NOM");
663
        m.fill("ID", "ID_ARTICLE");
666
        m.fill("ID", "ID_ARTICLE");
664
        for (String string : completionField) {
667
        for (String string : completionField) {
Line 741... Line 744...
741
                this.table.getRowValuesTableModel()) {
744
                this.table.getRowValuesTableModel()) {
742
            @Override
745
            @Override
743
            protected Object getValueFrom(SQLRow row, String field, SQLRowAccessor rowDest) {
746
            protected Object getValueFrom(SQLRow row, String field, SQLRowAccessor rowDest) {
744
                Object res = tarifCompletion(row, field, rowDest, true);
747
                Object res = tarifCompletion(row, field, rowDest, true);
745
                if (res == null) {
748
                if (res == null) {
746
                    return super.getValueFrom(row, field, rowDest);
749
                    res = super.getValueFrom(row, field, rowDest);
747
                } else {
-
 
748
                    return res;
-
 
749
                }
750
                }                
-
 
751
                if (field.equals("POURCENT_REMISE")) {
-
 
752
                    return getRemiseClient(row);
-
 
753
                }
-
 
754
                return res;
750
            }
755
            }
751
        };
756
        };
752
        m2.fill("CODE", "CODE");
757
        m2.fill("CODE", "CODE");
753
        m2.fill("ID", "ID_ARTICLE");
758
        m2.fill("ID", "ID_ARTICLE");
754
        for (String string : completionField) {
759
        for (String string : completionField) {
Line 762... Line 767...
762
                ITextWithCompletion.MODE_CONTAINS, true, true, new ValidStateChecker()) {
767
                ITextWithCompletion.MODE_CONTAINS, true, true, new ValidStateChecker()) {
763
            @Override
768
            @Override
764
            protected Object getValueFrom(SQLRow row, String field, SQLRowAccessor rowDest) {
769
            protected Object getValueFrom(SQLRow row, String field, SQLRowAccessor rowDest) {
765
                Object res = tarifCompletion(row, field, rowDest, true);
770
                Object res = tarifCompletion(row, field, rowDest, true);
766
                if (res == null) {
771
                if (res == null) {
767
                    return super.getValueFrom(row, field, rowDest);
772
                    res = super.getValueFrom(row, field, rowDest);
768
                } else {
773
                }               
-
 
774
                if (field.equals("POURCENT_REMISE")) {
769
                    return res;
775
                    return getRemiseClient(row);
770
                }
776
                }
-
 
777
                return res;
771
            }
778
            }
772
        };
779
        };
773
        m3.fill("CODE", "CODE");
780
        m3.fill("CODE", "CODE");
774
        m3.fill("NOM", "NOM");
781
        m3.fill("NOM", "NOM");
775
        for (String string : completionField) {
782
        for (String string : completionField) {