Line 38... |
Line 38... |
38 |
map(tableCmd.getField("INFOS"), tableBr.getField("INFOS"));
|
38 |
map(tableCmd.getField("INFOS"), tableBr.getField("INFOS"));
|
39 |
map(tableCmd.getField("ID"), tableBr.getField("ID_COMMANDE"));
|
39 |
map(tableCmd.getField("ID"), tableBr.getField("ID_COMMANDE"));
|
40 |
if (tableBr.contains("CREATE_VIRTUAL_STOCK")) {
|
40 |
if (tableBr.contains("CREATE_VIRTUAL_STOCK")) {
|
41 |
mapDefaultValues(tableBr.getField("CREATE_VIRTUAL_STOCK"), Boolean.FALSE);
|
41 |
mapDefaultValues(tableBr.getField("CREATE_VIRTUAL_STOCK"), Boolean.FALSE);
|
42 |
}
|
42 |
}
|
- |
|
43 |
if (getSource().contains("ID_AFFAIRE") && getDestination().contains("ID_AFFAIRE")) {
|
- |
|
44 |
map(getSource().getField("ID_AFFAIRE"), getDestination().getField("ID_AFFAIRE"));
|
- |
|
45 |
}
|
43 |
}
|
46 |
}
|
44 |
|
47 |
|
45 |
@Override
|
48 |
@Override
|
46 |
protected void merge(SQLRowAccessor srcRow, SQLRowValues rowVals) {
|
49 |
protected void merge(SQLRowAccessor srcRow, SQLRowValues rowVals) {
|
47 |
super.merge(srcRow, rowVals);
|
50 |
super.merge(srcRow, rowVals);
|
48 |
|
51 |
|
49 |
// Merge elements
|
52 |
// Merge elements
|
50 |
final SQLTable tableElementSource = getSource().getTable("COMMANDE_ELEMENT");
|
53 |
final SQLTable tableElementSource = getSource().getTable("COMMANDE_ELEMENT");
|
51 |
final SQLTable tableElementDestination = getSource().getTable("BON_RECEPTION_ELEMENT");
|
54 |
final SQLTable tableElementDestination = getSource().getTable("BON_RECEPTION_ELEMENT");
|
52 |
final Collection<? extends SQLRowAccessor> myListItem = srcRow.asRow().getReferentRows(tableElementSource);
|
55 |
final Collection<? extends SQLRowAccessor> myListItem = srcRow.asRow().getReferentRows(tableElementSource);
|
- |
|
56 |
transfertNumberReference(srcRow, rowVals, tableElementDestination, "ID_BON_RECEPTION");
|
53 |
|
57 |
|
54 |
if (myListItem.size() != 0) {
|
58 |
if (myListItem.size() != 0) {
|
55 |
final SQLInjector injector = SQLInjector.getInjector(tableElementSource, tableElementDestination);
|
59 |
final SQLInjector injector = SQLInjector.getInjector(tableElementSource, tableElementDestination);
|
56 |
for (SQLRowAccessor rowElt : myListItem) {
|
60 |
for (SQLRowAccessor rowElt : myListItem) {
|
57 |
final SQLRowValues createRowValuesFrom = injector.createRowValuesFrom(rowElt.asRow());
|
61 |
final SQLRowValues createRowValuesFrom = injector.createRowValuesFrom(rowElt.asRow());
|