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 18... Line 18...
18
import org.openconcerto.erp.core.sales.product.action.InventairePanel;
18
import org.openconcerto.erp.core.sales.product.action.InventairePanel;
19
import org.openconcerto.erp.generationDoc.gestcomm.FicheArticleXmlSheet;
19
import org.openconcerto.erp.generationDoc.gestcomm.FicheArticleXmlSheet;
20
import org.openconcerto.erp.model.MouseSheetXmlListeListener;
20
import org.openconcerto.erp.model.MouseSheetXmlListeListener;
21
import org.openconcerto.sql.element.BaseSQLComponent;
21
import org.openconcerto.sql.element.BaseSQLComponent;
22
import org.openconcerto.sql.element.SQLComponent;
22
import org.openconcerto.sql.element.SQLComponent;
-
 
23
import org.openconcerto.sql.model.SQLRow;
23
import org.openconcerto.sql.model.SQLRowAccessor;
24
import org.openconcerto.sql.model.SQLRowAccessor;
24
import org.openconcerto.sql.model.SQLRowValues;
25
import org.openconcerto.sql.model.SQLRowValues;
25
import org.openconcerto.sql.model.SQLRowValuesListFetcher;
26
import org.openconcerto.sql.model.SQLRowValuesListFetcher;
26
import org.openconcerto.sql.model.SQLTable;
27
import org.openconcerto.sql.model.SQLTable;
27
import org.openconcerto.sql.model.Where;
28
import org.openconcerto.sql.model.Where;
Line 98... Line 99...
98
    }
99
    }
99
 
100
 
100
    @Override
101
    @Override
101
    public ListMap<String, String> getShowAs() {
102
    public ListMap<String, String> getShowAs() {
102
        if (getTable().contains("ID_DEPOT_STOCK")) {
103
        if (getTable().contains("ID_DEPOT_STOCK")) {
103
            return ListMap.singleton(null, "QTE_TH", "QTE_REEL", "QTE_LIV_ATTENTE", "QTE_RECEPT_ATTENTE", "ID_DEPOT_STOCK");
104
            return ListMap.singleton(null, "QTE_TH", "QTE_REEL", "QTE_MIN", "QTE_LIV_ATTENTE", "QTE_RECEPT_ATTENTE", "ID_DEPOT_STOCK");
104
        } else {
105
        } else {
105
            return ListMap.singleton(null, "QTE_TH", "QTE_REEL", "QTE_LIV_ATTENTE", "QTE_RECEPT_ATTENTE");
106
            return ListMap.singleton(null, "QTE_TH", "QTE_REEL", "QTE_LIV_ATTENTE", "QTE_RECEPT_ATTENTE");
106
        }
107
        }
107
    }
108
    }
108
 
109
 
Line 132... Line 133...
132
        SQLRowAccessor rowStock = null;
133
        SQLRowAccessor rowStock = null;
133
        final int idDepot;
134
        final int idDepot;
134
        if (rowValsSource.getForeign("ID_DEPOT_STOCK") != null && !rowValsSource.isForeignEmpty("ID_DEPOT_STOCK")) {
135
        if (rowValsSource.getForeign("ID_DEPOT_STOCK") != null && !rowValsSource.isForeignEmpty("ID_DEPOT_STOCK")) {
135
            idDepot = rowValsSource.getForeignID("ID_DEPOT_STOCK");
136
            idDepot = rowValsSource.getForeignID("ID_DEPOT_STOCK");
136
        } else {
137
        } else {
-
 
138
            SQLRowAccessor rowValsArt = rowValsSource.getForeign("ID_ARTICLE");
-
 
139
            if (rowValsArt.getObject("ID_DEPOT_STOCK") == null) {
-
 
140
                rowValsArt = rowValsArt.asRow();
-
 
141
                ((SQLRow) rowValsArt).fetchValues();
-
 
142
                System.err.println("REFETCH ARTICLE");
-
 
143
                Thread.dumpStack();
-
 
144
            }
137
            idDepot = rowValsSource.getForeign("ID_ARTICLE").getForeignID("ID_DEPOT_STOCK");
145
            idDepot = rowValsArt.getForeignID("ID_DEPOT_STOCK");
138
        }
146
        }
139
        SQLTable stockTable = rowValsSource.getTable().getTable("STOCK");
147
        SQLTable stockTable = rowValsSource.getTable().getTable("STOCK");
140
        SQLRowValues putRowValuesStock = new SQLRowValues(stockTable);
148
        SQLRowValues putRowValuesStock = new SQLRowValues(stockTable);
141
        putRowValuesStock.putNulls(stockTable.getTable().getFieldsName());
149
        putRowValuesStock.putNulls(stockTable.getTable().getFieldsName());
142
 
150