Merge remote-tracking branch 'origin/develop' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
package it.integry.ems.migration.model;
|
||||
|
||||
import it.integry.ems.migration._base.BaseMigration;
|
||||
import it.integry.ems.migration._base.IntegryCustomerDB;
|
||||
import it.integry.ems.migration._base.MigrationModelInterface;
|
||||
|
||||
public class Migration_20250508101354 extends BaseMigration implements MigrationModelInterface {
|
||||
|
||||
@Override
|
||||
public void up() throws Exception {
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
if (isCustomerDb(IntegryCustomerDB.RossoGargano_RossoGargano))
|
||||
return;
|
||||
|
||||
createSetup("PVM","CONTROLLO_GIACENZE","TIPOLOGIA_COMMESSE_DA_INCLUDERE",null,"Indicare le tipologie di commesse (separate da |) che devono essere selezionabili, in Giacenze per UL e Posizione, nell'attribuzione di una commessa ad una pedana, oltre alle commesse legate ad ordini di vendita",null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void down() throws Exception {
|
||||
}
|
||||
}
|
||||
@@ -850,8 +850,8 @@ public class SalesRules extends QueryRules {
|
||||
return campi;
|
||||
}
|
||||
|
||||
public static Boolean checkArtEquiLisv(VtbListData vtbListData) throws Exception {
|
||||
boolean bloccaDiff = setupGest.getSetupBoolean("vtb_list", "ART_EQUIVALENTI", "LOCK_DIFF");
|
||||
public static Boolean checkArtEquiLisv(Connection connection, VtbListData vtbListData) throws Exception {
|
||||
boolean bloccaDiff = setupGest.getSetupBoolean(connection, "vtb_list", "ART_EQUIVALENTI", "LOCK_DIFF");
|
||||
if (!bloccaDiff)
|
||||
return false;
|
||||
|
||||
|
||||
@@ -30,4 +30,11 @@ public class AziendaService {
|
||||
|
||||
return UtilityDB.executeSimpleQueryOnlyFirstRowFirstColumn(multiDBTransactionManager.getPrimaryConnection(), internalCodAnagsQuery);
|
||||
}
|
||||
|
||||
public String retrieveInternalPartIva() throws Exception {
|
||||
String internalCodAnagsQuery = "SELECT part_iva\n" +
|
||||
"FROM azienda";
|
||||
|
||||
return UtilityDB.executeSimpleQueryOnlyFirstRowFirstColumn(multiDBTransactionManager.getPrimaryConnection(), internalCodAnagsQuery);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -175,7 +175,7 @@ public class EntityProcessor {
|
||||
|
||||
private void checkEntityChildsUsage(EntityInterface entityInterface, MultiDBTransactionManager multiDBTransactionManager, RequestDataDTO requestDataDTO) throws Exception {
|
||||
boolean isMaster = entityPropertyHolder.isEntityMaster(((EntityBase) entityInterface).getClass());
|
||||
;
|
||||
|
||||
OperationType operationType = entityInterface.getOperation();
|
||||
|
||||
if (!isMaster && (operationType != OperationType.SELECT_OBJECT && operationType != OperationType.SELECT)) {
|
||||
|
||||
@@ -1486,8 +1486,8 @@ public class GeneraOrdLav {
|
||||
List<DtbOrdSteps> dtbOrdSteps = UtilityDB.executeSimpleQueryDTO(conn, sql, DtbOrdSteps.class);
|
||||
|
||||
dtbOrdSteps.stream().forEach(x -> {
|
||||
x.setDataIniz(UtilityDate.dateAdd(x.getDataIniz(), ggDiff));
|
||||
x.setDataFine(UtilityDate.dateAdd(x.getDataFine(), ggDiff));
|
||||
x.setDataIniz(x.getDataIniz()!=null?UtilityDate.dateAdd(x.getDataIniz(), ggDiff):null);
|
||||
x.setDataFine(x.getDataFine() != null ?UtilityDate.dateAdd(x.getDataFine(), ggDiff):null);
|
||||
x.setOperation(OperationType.UPDATE);
|
||||
});
|
||||
|
||||
@@ -1571,7 +1571,7 @@ public class GeneraOrdLav {
|
||||
|
||||
if (dtbOrds != null && !dtbOrds.isEmpty()) {
|
||||
dtbOrds.forEach(x -> {
|
||||
x.setQta(x.getQta().multiply(moltiplicatore).setScale(2, RoundingMode.HALF_UP)).setValUnt(valUntProd).setImporto((x.getQta().multiply(moltiplicatore).setScale(2, RoundingMode.HALF_UP)).multiply(valUntProd));
|
||||
x.setQta(x.getQta().multiply(moltiplicatore).setScale(5, RoundingMode.HALF_UP)).setValUnt(valUntProd).setImporto((x.getQta().multiply(moltiplicatore).setScale(2, RoundingMode.HALF_UP)).multiply(valUntProd));
|
||||
x.setOperation(OperationType.UPDATE);
|
||||
});
|
||||
|
||||
|
||||
@@ -343,7 +343,7 @@ public class VtbListData extends EntityBase {
|
||||
|
||||
@Override
|
||||
public void checkPreSave() throws Exception {
|
||||
SalesRules.checkArtEquiLisv(this);
|
||||
SalesRules.checkArtEquiLisv(connection, this);
|
||||
}
|
||||
|
||||
public VtbList getVtbList() {
|
||||
|
||||
@@ -121,5 +121,12 @@ public class UtilityBigDecimal {
|
||||
return input.setScale(5, RoundingMode.HALF_EVEN);
|
||||
}
|
||||
|
||||
public static BigDecimal calculatePercentage(BigDecimal base, double percentValue) {
|
||||
return calculatePercentage(base,percentValue,5);
|
||||
}
|
||||
public static BigDecimal calculatePercentage(BigDecimal base, double percentValue, int scale) {
|
||||
BigDecimal percent = new BigDecimal(percentValue).divide(new BigDecimal("100"), 5, RoundingMode.HALF_EVEN);
|
||||
return base.multiply(percent).setScale(scale,RoundingMode.HALF_UP);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -218,6 +218,10 @@ public class UtilityString {
|
||||
return string == null || "".equals(string) || string.equals(EmsRestConstants.NULL);
|
||||
}
|
||||
|
||||
public static boolean hasContent(Object string) {
|
||||
return !isNullOrEmpty(string);
|
||||
}
|
||||
|
||||
public static String identifyLineDelimiter(String str) {
|
||||
if (str.matches("(?s).*(\\r\\n).*")) { //Windows //$NON-NLS-1$
|
||||
return "\r\n"; //$NON-NLS-1$
|
||||
|
||||
@@ -37,14 +37,14 @@ end
|
||||
|
||||
|
||||
//ANNULLAMENTO RICALCOLO TOTALI ORDINI PRODUZIONE
|
||||
rule "annullamentoCalcTotaliOrdP"
|
||||
no-loop
|
||||
when
|
||||
eval(postRulesEnabled)
|
||||
$ordT : DtbOrdt(executeRecalc == true && gestione == "A" && gestioneRif != null)
|
||||
then
|
||||
modify ( $ordT ) { setExecuteRecalc(false) }
|
||||
end
|
||||
//rule "annullamentoCalcTotaliOrdP"
|
||||
//no-loop
|
||||
//when
|
||||
// eval(postRulesEnabled)
|
||||
// $ordT : DtbOrdt(executeRecalc == true && gestione == "A" && gestioneRif != null)
|
||||
//then
|
||||
// modify ( $ordT ) { setExecuteRecalc(false) }
|
||||
//end
|
||||
|
||||
rule "completeCalcTotaliOrd"
|
||||
no-loop
|
||||
|
||||
Reference in New Issue
Block a user