Line 1... |
Line 1... |
1 |
/*
|
1 |
/*
|
2 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
|
2 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
|
3 |
*
|
3 |
*
|
4 |
* Copyright 2011 OpenConcerto, by ILM Informatique. All rights reserved.
|
4 |
* Copyright 2011-2019 OpenConcerto, by ILM Informatique. All rights reserved.
|
5 |
*
|
5 |
*
|
6 |
* The contents of this file are subject to the terms of the GNU General Public License Version 3
|
6 |
* The contents of this file are subject to the terms of the GNU General Public License Version 3
|
7 |
* only ("GPL"). You may not use this file except in compliance with the License. You can obtain a
|
7 |
* only ("GPL"). You may not use this file except in compliance with the License. You can obtain a
|
8 |
* copy of the License at http://www.gnu.org/licenses/gpl-3.0.html See the License for the specific
|
8 |
* copy of the License at http://www.gnu.org/licenses/gpl-3.0.html See the License for the specific
|
9 |
* language governing permissions and limitations under the License.
|
9 |
* language governing permissions and limitations under the License.
|
Line 15... |
Line 15... |
15 |
|
15 |
|
16 |
import org.openconcerto.erp.config.ComptaPropsConfiguration;
|
16 |
import org.openconcerto.erp.config.ComptaPropsConfiguration;
|
17 |
import org.openconcerto.erp.core.common.element.ComptaSQLConfElement;
|
17 |
import org.openconcerto.erp.core.common.element.ComptaSQLConfElement;
|
18 |
import org.openconcerto.erp.core.sales.product.element.ReferenceArticleSQLElement;
|
18 |
import org.openconcerto.erp.core.sales.product.element.ReferenceArticleSQLElement;
|
19 |
import org.openconcerto.erp.core.sales.product.element.UniteVenteArticleSQLElement;
|
19 |
import org.openconcerto.erp.core.sales.product.element.UniteVenteArticleSQLElement;
|
- |
|
20 |
import org.openconcerto.erp.core.sales.product.model.ProductComponent;
|
20 |
import org.openconcerto.erp.core.supplychain.order.component.CommandeSQLComponent;
|
21 |
import org.openconcerto.erp.core.supplychain.order.component.CommandeSQLComponent;
|
21 |
import org.openconcerto.erp.core.supplychain.order.ui.CommandeItemTable;
|
22 |
import org.openconcerto.erp.core.supplychain.order.ui.CommandeItemTable;
|
- |
|
23 |
import org.openconcerto.erp.core.supplychain.stock.element.StockItem.TypeStockMouvement;
|
22 |
import org.openconcerto.erp.core.supplychain.supplier.component.MouvementStockSQLComponent;
|
24 |
import org.openconcerto.erp.core.supplychain.supplier.component.MouvementStockSQLComponent;
|
23 |
import org.openconcerto.erp.preferences.GestionArticleGlobalPreferencePanel;
|
25 |
import org.openconcerto.erp.preferences.GestionArticleGlobalPreferencePanel;
|
24 |
import org.openconcerto.erp.preferences.GestionCommercialeGlobalPreferencePanel;
|
26 |
import org.openconcerto.erp.preferences.GestionCommercialeGlobalPreferencePanel;
|
25 |
import org.openconcerto.sql.Configuration;
|
27 |
import org.openconcerto.sql.Configuration;
|
26 |
import org.openconcerto.sql.element.SQLComponent;
|
28 |
import org.openconcerto.sql.element.SQLComponent;
|
27 |
import org.openconcerto.sql.element.SQLElement;
|
29 |
import org.openconcerto.sql.element.SQLElement;
|
28 |
import org.openconcerto.sql.element.TreesOfSQLRows;
|
30 |
import org.openconcerto.sql.element.TreesOfSQLRows;
|
- |
|
31 |
import org.openconcerto.sql.model.ConnectionHandlerNoSetup;
|
- |
|
32 |
import org.openconcerto.sql.model.DBRoot;
|
29 |
import org.openconcerto.sql.model.SQLBackgroundTableCache;
|
33 |
import org.openconcerto.sql.model.SQLBackgroundTableCache;
|
30 |
import org.openconcerto.sql.model.SQLBase;
|
34 |
import org.openconcerto.sql.model.SQLBase;
|
- |
|
35 |
import org.openconcerto.sql.model.SQLDataSource;
|
31 |
import org.openconcerto.sql.model.SQLInjector;
|
36 |
import org.openconcerto.sql.model.SQLInjector;
|
32 |
import org.openconcerto.sql.model.SQLRow;
|
37 |
import org.openconcerto.sql.model.SQLRow;
|
- |
|
38 |
import org.openconcerto.sql.model.SQLRowAccessor;
|
33 |
import org.openconcerto.sql.model.SQLRowListRSH;
|
39 |
import org.openconcerto.sql.model.SQLRowListRSH;
|
34 |
import org.openconcerto.sql.model.SQLRowValues;
|
40 |
import org.openconcerto.sql.model.SQLRowValues;
|
35 |
import org.openconcerto.sql.model.SQLSelect;
|
41 |
import org.openconcerto.sql.model.SQLSelect;
|
36 |
import org.openconcerto.sql.model.SQLTable;
|
42 |
import org.openconcerto.sql.model.SQLTable;
|
37 |
import org.openconcerto.sql.model.Where;
|
43 |
import org.openconcerto.sql.model.Where;
|
38 |
import org.openconcerto.sql.preferences.SQLPreferences;
|
44 |
import org.openconcerto.sql.preferences.SQLPreferences;
|
39 |
import org.openconcerto.sql.request.ListSQLRequest;
|
45 |
import org.openconcerto.sql.request.ListSQLRequest;
|
40 |
import org.openconcerto.sql.users.UserManager;
|
46 |
import org.openconcerto.sql.users.UserManager;
|
- |
|
47 |
import org.openconcerto.sql.utils.SQLUtils;
|
41 |
import org.openconcerto.sql.view.EditFrame;
|
48 |
import org.openconcerto.sql.view.EditFrame;
|
42 |
import org.openconcerto.sql.view.EditPanel;
|
49 |
import org.openconcerto.sql.view.EditPanel;
|
43 |
import org.openconcerto.sql.view.EditPanel.EditMode;
|
50 |
import org.openconcerto.sql.view.EditPanel.EditMode;
|
44 |
import org.openconcerto.sql.view.list.RowValuesTableModel;
|
51 |
import org.openconcerto.sql.view.list.RowValuesTableModel;
|
45 |
import org.openconcerto.ui.FrameUtil;
|
52 |
import org.openconcerto.ui.FrameUtil;
|
- |
|
53 |
import org.openconcerto.utils.ExceptionHandler;
|
46 |
import org.openconcerto.utils.ListMap;
|
54 |
import org.openconcerto.utils.ListMap;
|
47 |
|
55 |
|
48 |
import java.math.BigDecimal;
|
56 |
import java.math.BigDecimal;
|
- |
|
57 |
import java.math.RoundingMode;
|
49 |
import java.sql.SQLException;
|
58 |
import java.sql.SQLException;
|
- |
|
59 |
import java.text.SimpleDateFormat;
|
50 |
import java.util.ArrayList;
|
60 |
import java.util.ArrayList;
|
51 |
import java.util.Collection;
|
61 |
import java.util.Collection;
|
- |
|
62 |
import java.util.Date;
|
52 |
import java.util.List;
|
63 |
import java.util.List;
|
53 |
import java.util.Map.Entry;
|
64 |
import java.util.Map.Entry;
|
54 |
|
65 |
|
55 |
import javax.swing.JOptionPane;
|
66 |
import javax.swing.JOptionPane;
|
56 |
import javax.swing.SwingUtilities;
|
67 |
import javax.swing.SwingUtilities;
|
57 |
|
68 |
|
- |
|
69 |
import org.apache.commons.dbutils.ResultSetHandler;
|
- |
|
70 |
|
58 |
public class MouvementStockSQLElement extends ComptaSQLConfElement {
|
71 |
public class MouvementStockSQLElement extends ComptaSQLConfElement {
|
59 |
|
72 |
|
60 |
public MouvementStockSQLElement() {
|
73 |
public MouvementStockSQLElement() {
|
61 |
super("MOUVEMENT_STOCK", "un mouvement de stock", "mouvements de stock");
|
74 |
super("MOUVEMENT_STOCK", "un mouvement de stock", "mouvements de stock");
|
62 |
}
|
75 |
}
|
Line 117... |
Line 130... |
117 |
// QTE_RECEPT_ATTENTE
|
130 |
// QTE_RECEPT_ATTENTE
|
118 |
// Stock Th : inc/dec QTE_TH, inc/dec QTE_LIV_ATTENTE/inc/dec
|
131 |
// Stock Th : inc/dec QTE_TH, inc/dec QTE_LIV_ATTENTE/inc/dec
|
119 |
// QTE_RECEPT_ATTENTE
|
132 |
// QTE_RECEPT_ATTENTE
|
120 |
|
133 |
|
121 |
final ListMap<SQLRow, SQLRowValues> map = new ListMap<>();
|
134 |
final ListMap<SQLRow, SQLRowValues> map = new ListMap<>();
|
- |
|
135 |
|
- |
|
136 |
if (rowsMvt == null || rowsMvt.isEmpty()) {
|
- |
|
137 |
return map;
|
- |
|
138 |
}
|
- |
|
139 |
|
- |
|
140 |
final DBRoot root = rowsMvt.iterator().next().getTable().getDBRoot();
|
- |
|
141 |
|
122 |
final SQLTable tableCommandeElement = Configuration.getInstance().getBase().getTable("COMMANDE_ELEMENT");
|
142 |
final SQLTable tableCommandeElement = root.getTable("COMMANDE_ELEMENT");
|
123 |
final SQLElement elementStock = Configuration.getInstance().getDirectory().getElement("STOCK");
|
143 |
final SQLTable tableStock = root.getTable("STOCK");
|
124 |
|
144 |
|
125 |
for (SQLRow rowMvtStock : rowsMvt) {
|
145 |
for (SQLRow rowMvtStock : rowsMvt) {
|
126 |
|
146 |
|
127 |
boolean retour = rowMvtStock.getString("SOURCE") == null || rowMvtStock.getString("SOURCE").startsWith("AVOIR_CLIENT");
|
147 |
boolean retour = rowMvtStock.getString("SOURCE") == null || rowMvtStock.getString("SOURCE").startsWith("AVOIR_CLIENT");
|
128 |
// Mise à jour des stocks
|
148 |
// Mise à jour des stocks
|
Line 136... |
Line 156... |
136 |
|
156 |
|
137 |
if (rowMvtStock.getBoolean("REEL")) {
|
157 |
if (rowMvtStock.getBoolean("REEL")) {
|
138 |
float qte = rowStock.getFloat("QTE_REEL");
|
158 |
float qte = rowStock.getFloat("QTE_REEL");
|
139 |
float qteMvt = rowMvtStock.getFloat("QTE");
|
159 |
float qteMvt = rowMvtStock.getFloat("QTE");
|
140 |
|
160 |
|
141 |
SQLRowValues rowVals = new SQLRowValues(elementStock.getTable());
|
161 |
SQLRowValues rowVals = new SQLRowValues(tableStock);
|
142 |
|
162 |
|
143 |
float qteNvlle;
|
163 |
float qteNvlle;
|
144 |
float qteNvlleEnAttenteRecept = rowStock.getFloat("QTE_RECEPT_ATTENTE");
|
164 |
float qteNvlleEnAttenteRecept = rowStock.getFloat("QTE_RECEPT_ATTENTE");
|
145 |
float qteNvlleEnAttenteExp = rowStock.getFloat("QTE_LIV_ATTENTE");
|
165 |
float qteNvlleEnAttenteExp = rowStock.getFloat("QTE_LIV_ATTENTE");
|
146 |
if (archive) {
|
166 |
if (archive) {
|
Line 171... |
Line 191... |
171 |
rowVals.put("QTE_LIV_ATTENTE", qteNvlleEnAttenteExp);
|
191 |
rowVals.put("QTE_LIV_ATTENTE", qteNvlleEnAttenteExp);
|
172 |
|
192 |
|
173 |
try {
|
193 |
try {
|
174 |
rowVals.update(rowStock.getID());
|
194 |
rowVals.update(rowStock.getID());
|
175 |
|
195 |
|
176 |
SQLPreferences prefs = new SQLPreferences(getTable().getDBRoot());
|
196 |
SQLPreferences prefs = new SQLPreferences(root);
|
177 |
boolean gestionStockMin = prefs.getBoolean(GestionArticleGlobalPreferencePanel.WARNING_STOCK_MIN, true);
|
197 |
boolean gestionStockMin = prefs.getBoolean(GestionArticleGlobalPreferencePanel.WARNING_STOCK_MIN, true);
|
178 |
|
198 |
|
179 |
if (!archive && gestionStockMin && rowStock.getObject("QTE_MIN") != null && qteNvlle < rowStock.getFloat("QTE_MIN")) {
|
199 |
if (!archive && gestionStockMin && rowStock.getObject("QTE_MIN") != null && qteNvlle < rowStock.getFloat("QTE_MIN")) {
|
180 |
// final float qteShow = qteNvlle;
|
200 |
// final float qteShow = qteNvlle;
|
181 |
SQLInjector inj = SQLInjector.getInjector(rowArticle.getTable(), tableCommandeElement);
|
201 |
SQLInjector inj = SQLInjector.getInjector(rowArticle.getTable(), tableCommandeElement);
|
Line 201... |
Line 221... |
201 |
}
|
221 |
}
|
202 |
} else {
|
222 |
} else {
|
203 |
float qte = rowStock.getFloat("QTE_TH");
|
223 |
float qte = rowStock.getFloat("QTE_TH");
|
204 |
float qteMvt = rowMvtStock.getFloat("QTE");
|
224 |
float qteMvt = rowMvtStock.getFloat("QTE");
|
205 |
|
225 |
|
206 |
SQLRowValues rowVals = new SQLRowValues(elementStock.getTable());
|
226 |
SQLRowValues rowVals = new SQLRowValues(tableStock);
|
207 |
|
227 |
|
208 |
float qteNvlle;
|
228 |
float qteNvlle;
|
209 |
float qteNvlleEnAttenteRecept = rowStock.getFloat("QTE_RECEPT_ATTENTE");
|
229 |
float qteNvlleEnAttenteRecept = rowStock.getFloat("QTE_RECEPT_ATTENTE");
|
210 |
float qteNvlleEnAttenteExp = rowStock.getFloat("QTE_LIV_ATTENTE");
|
230 |
float qteNvlleEnAttenteExp = rowStock.getFloat("QTE_LIV_ATTENTE");
|
211 |
|
231 |
|
Line 319... |
Line 339... |
319 |
SQLRowValues rowValsMatch = null;
|
339 |
SQLRowValues rowValsMatch = null;
|
320 |
int index = 0;
|
340 |
int index = 0;
|
321 |
|
341 |
|
322 |
for (int i = 0; i < model.getRowCount(); i++) {
|
342 |
for (int i = 0; i < model.getRowCount(); i++) {
|
323 |
final SQLRowValues rowValsCmdElt = model.getRowValuesAt(i);
|
343 |
final SQLRowValues rowValsCmdElt = model.getRowValuesAt(i);
|
- |
|
344 |
Number lineArticleNumber = rowValsCmdElt.contains("ID_ARTICLE") ? rowValsCmdElt.getNonEmptyForeignIDNumber("ID_ARTICLE") : null;
|
- |
|
345 |
Number lineToAddArticleNumber = rowValsElt.contains("ID_ARTICLE") ? rowValsElt.getNonEmptyForeignIDNumber("ID_ARTICLE") : null;
|
- |
|
346 |
if (lineToAddArticleNumber == null || lineArticleNumber == null || lineArticleNumber.equals(lineToAddArticleNumber)) {
|
324 |
if (ReferenceArticleSQLElement.isReferenceEquals(rowValsCmdElt, rowValsElt)) {
|
347 |
if (ReferenceArticleSQLElement.isReferenceEquals(rowValsCmdElt, rowValsElt)) {
|
325 |
rowValsMatch = rowValsCmdElt;
|
348 |
rowValsMatch = rowValsCmdElt;
|
326 |
index = i;
|
349 |
index = i;
|
327 |
break;
|
350 |
break;
|
328 |
}
|
351 |
}
|
329 |
}
|
352 |
}
|
- |
|
353 |
}
|
330 |
if (rowValsMatch != null) {
|
354 |
if (rowValsMatch != null) {
|
331 |
|
355 |
|
332 |
int qte = rowValsMatch.getInt("QTE");
|
356 |
int qte = rowValsMatch.getInt("QTE");
|
333 |
BigDecimal qteUV = rowValsMatch.getBigDecimal("QTE_UNITAIRE");
|
357 |
BigDecimal qteUV = rowValsMatch.getBigDecimal("QTE_UNITAIRE");
|
334 |
|
358 |
|
Line 409... |
Line 433... |
409 |
} else {
|
433 |
} else {
|
410 |
System.err.println("Aucun mouvement associé, impossible de modifier ou d'accéder à la source de cette ecriture!");
|
434 |
System.err.println("Aucun mouvement associé, impossible de modifier ou d'accéder à la source de cette ecriture!");
|
411 |
}
|
435 |
}
|
412 |
}
|
436 |
}
|
413 |
|
437 |
|
- |
|
438 |
public void transfertStock(BigDecimal qteReel, final Date dateValue, final SQLRow selectedRowArticle, final SQLRow selectedRowDepotDepart, final SQLRow selectedRowDepotArrivee,
|
- |
|
439 |
final String labelTrStock) {
|
- |
|
440 |
final boolean usePrice = getTable().contains("PRICE");
|
- |
|
441 |
try {
|
- |
|
442 |
SQLUtils.executeAtomic(selectedRowDepotDepart.getTable().getDBSystemRoot().getDataSource(), new ConnectionHandlerNoSetup<Object, SQLException>() {
|
- |
|
443 |
@Override
|
- |
|
444 |
public Object handle(SQLDataSource ds) throws SQLException {
|
- |
|
445 |
List<StockItem> stockItems = new ArrayList<StockItem>();
|
- |
|
446 |
List<String> multipleRequestsHundred = new ArrayList<String>(100);
|
- |
|
447 |
{
|
- |
|
448 |
// DEPART
|
- |
|
449 |
final SQLRowAccessor rowStockDepart = ProductComponent.findOrCreateStock(selectedRowArticle, selectedRowDepotDepart);
|
- |
|
450 |
StockItem item = new StockItem(selectedRowArticle, rowStockDepart);
|
- |
|
451 |
if (!item.isStockInit()) {
|
- |
|
452 |
SQLRowValues rowVals = new SQLRowValues(getTable().getTable("STOCK"));
|
- |
|
453 |
rowVals.put("ID_ARTICLE", selectedRowArticle.getID());
|
- |
|
454 |
rowVals.put("ID_DEPOT_STOCK", selectedRowDepotDepart.getID());
|
- |
|
455 |
rowVals.commit();
|
- |
|
456 |
selectedRowArticle.fetchValues();
|
- |
|
457 |
item = new StockItem(selectedRowArticle, rowStockDepart);
|
- |
|
458 |
}
|
- |
|
459 |
stockItems.add(item);
|
- |
|
460 |
double diff = -qteReel.doubleValue();
|
- |
|
461 |
item.updateQty(diff, TypeStockMouvement.REEL);
|
- |
|
462 |
multipleRequestsHundred.add(getMvtRequest(dateValue, BigDecimal.ZERO, diff, item, getLabel(labelTrStock, selectedRowDepotDepart, selectedRowDepotArrivee), true, usePrice));
|
- |
|
463 |
item.updateQty(diff, TypeStockMouvement.THEORIQUE);
|
- |
|
464 |
multipleRequestsHundred.add(getMvtRequest(dateValue, BigDecimal.ZERO, diff, item, getLabel(labelTrStock, selectedRowDepotDepart, selectedRowDepotArrivee), false, usePrice));
|
- |
|
465 |
multipleRequestsHundred.add(item.getUpdateRequest());
|
- |
|
466 |
}
|
- |
|
467 |
// ARRIVEE
|
- |
|
468 |
{
|
- |
|
469 |
final SQLRowAccessor rowStockArrivee = ProductComponent.findOrCreateStock(selectedRowArticle, selectedRowDepotArrivee);
|
- |
|
470 |
StockItem item = new StockItem(selectedRowArticle, rowStockArrivee);
|
- |
|
471 |
if (!item.isStockInit()) {
|
- |
|
472 |
SQLRowValues rowVals = new SQLRowValues(getTable().getTable("STOCK"));
|
- |
|
473 |
rowVals.put("ID_ARTICLE", selectedRowArticle.getID());
|
- |
|
474 |
rowVals.put("ID_DEPOT_STOCK", selectedRowDepotArrivee.getID());
|
- |
|
475 |
rowVals.commit();
|
- |
|
476 |
selectedRowArticle.fetchValues();
|
- |
|
477 |
item = new StockItem(selectedRowArticle, rowStockArrivee);
|
- |
|
478 |
}
|
- |
|
479 |
stockItems.add(item);
|
- |
|
480 |
double diff = qteReel.doubleValue();
|
- |
|
481 |
item.updateQty(diff, TypeStockMouvement.REEL);
|
- |
|
482 |
multipleRequestsHundred.add(getMvtRequest(dateValue, BigDecimal.ZERO, diff, item, getLabel(labelTrStock, selectedRowDepotDepart, selectedRowDepotArrivee), true, usePrice));
|
- |
|
483 |
item.updateQty(diff, TypeStockMouvement.THEORIQUE);
|
- |
|
484 |
multipleRequestsHundred.add(getMvtRequest(dateValue, BigDecimal.ZERO, diff, item, getLabel(labelTrStock, selectedRowDepotDepart, selectedRowDepotArrivee), false, usePrice));
|
- |
|
485 |
multipleRequestsHundred.add(item.getUpdateRequest());
|
- |
|
486 |
}
|
- |
|
487 |
|
- |
|
488 |
final int size = multipleRequestsHundred.size();
|
- |
|
489 |
List<? extends ResultSetHandler> handlers = new ArrayList<ResultSetHandler>(size);
|
- |
|
490 |
for (int i = 0; i < size; i++) {
|
- |
|
491 |
handlers.add(null);
|
- |
|
492 |
}
|
- |
|
493 |
SQLUtils.executeMultiple(selectedRowArticle.getTable().getDBSystemRoot(), multipleRequestsHundred, handlers);
|
- |
|
494 |
|
- |
|
495 |
final DBRoot root = getTable().getDBRoot();
|
- |
|
496 |
if (root.contains("ARTICLE_ELEMENT")) {
|
- |
|
497 |
// Mise à jour des stocks des nomenclatures
|
- |
|
498 |
ComposedItemStockUpdater comp = new ComposedItemStockUpdater(root, stockItems);
|
- |
|
499 |
comp.update();
|
- |
|
500 |
}
|
- |
|
501 |
return null;
|
- |
|
502 |
}
|
- |
|
503 |
});
|
- |
|
504 |
} catch (SQLException e1) {
|
- |
|
505 |
ExceptionHandler.handle("Stock update error", e1);
|
- |
|
506 |
}
|
- |
|
507 |
}
|
- |
|
508 |
|
- |
|
509 |
private String getLabel(String label, SQLRowAccessor fromDepot, SQLRowAccessor toDepot) {
|
- |
|
510 |
return label + " de " + fromDepot.getString("NOM") + " vers " + toDepot.getString("NOM");
|
- |
|
511 |
}
|
- |
|
512 |
|
- |
|
513 |
private String getMvtRequest(Date time, BigDecimal prc, double qteFinal, StockItem item, String label, boolean reel, boolean usePrice) {
|
- |
|
514 |
String mvtStockTableQuoted = getTable().getSQLName().quote();
|
- |
|
515 |
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
- |
|
516 |
String mvtStockQuery = "INSERT INTO " + mvtStockTableQuoted + " (\"QTE\",\"DATE\",\"ID_ARTICLE\",\"ID_STOCK\",\"NOM\",\"REEL\",\"ORDRE\"";
|
- |
|
517 |
|
- |
|
518 |
if (usePrice && prc != null) {
|
- |
|
519 |
mvtStockQuery += ",\"PRICE\"";
|
- |
|
520 |
}
|
- |
|
521 |
|
- |
|
522 |
mvtStockQuery += ") VALUES(" + qteFinal + ",'" + dateFormat.format(time) + "'," + item.getArticle().getID() + "," + item.stock.getID() + ",'" + label + "'," + reel
|
- |
|
523 |
+ ", (SELECT (MAX(\"ORDRE\")+1) FROM " + mvtStockTableQuoted + ")";
|
- |
|
524 |
if (usePrice && prc != null) {
|
- |
|
525 |
mvtStockQuery += "," + prc.setScale(6, RoundingMode.HALF_UP).toString();
|
- |
|
526 |
}
|
- |
|
527 |
mvtStockQuery += ")";
|
- |
|
528 |
return mvtStockQuery;
|
- |
|
529 |
}
|
- |
|
530 |
|
414 |
@Override
|
531 |
@Override
|
415 |
protected String createCode() {
|
532 |
protected String createCode() {
|
416 |
return createCodeOfPackage() + ".transaction";
|
533 |
return createCodeOfPackage() + ".transaction";
|
417 |
}
|
534 |
}
|
418 |
}
|
535 |
}
|