Merge branch 'develop' into feature/export_documenti_intesa
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,23 @@
|
||||
package it.integry.ems.migration.model;
|
||||
|
||||
import it.integry.ems.migration._base.BaseMigration;
|
||||
import it.integry.ems.migration._base.MigrationModelInterface;
|
||||
|
||||
public class Migration_20250430154023 extends BaseMigration implements MigrationModelInterface {
|
||||
|
||||
@Override
|
||||
public void up() throws Exception {
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
createSetup("TASK", "SETUP", "DEFAULT_ACTIVITY_TYPE", null,
|
||||
"Tipo attività di default proposto in inserimento ore", false, null, false, false,
|
||||
true, false, false, null, false, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void down() throws Exception {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package it.integry.ems.migration.model;
|
||||
|
||||
import it.integry.ems.migration._base.BaseMigration;
|
||||
import it.integry.ems.migration._base.MigrationModelInterface;
|
||||
|
||||
public class Migration_20250502095239 extends BaseMigration implements MigrationModelInterface {
|
||||
|
||||
@Override
|
||||
public void up() throws Exception {
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
createSetupQuery("SI_NO", "SI_NO", "SELECT 'S' UNION ALL SELECT 'N'");
|
||||
createSetup("TASK", "AGENDA", "SEND_EMAIL", "N",
|
||||
"Se abilitata invia una mail all'amministrazione quando vengono inserite o modificate delle assenze.", false, "SI_NO", false, false,
|
||||
false, false, false, null, false, "SELECT 'S' UNION ALL SELECT 'N'");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void down() throws Exception {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package it.integry.ems.migration.model;
|
||||
|
||||
import it.integry.ems.migration._base.BaseMigration;
|
||||
import it.integry.ems.migration._base.MigrationModelInterface;
|
||||
|
||||
public class Migration_20250502115240 extends BaseMigration implements MigrationModelInterface {
|
||||
|
||||
@Override
|
||||
public void up() throws Exception {
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
createSetupQuery("SI_NO", "SI_NO", "SELECT 'S' UNION ALL SELECT 'N'");
|
||||
createSetup("TASK", "SETUP", "MANAGE_ACTIVITIES", "S",
|
||||
"Permette di scegliere se gestire o meno le attività. Se non abilitata permetterà la sola visualizzazione del calendario e gestione assenze.", false, "SI_NO", false, false,
|
||||
false, false, false, null, false, "SELECT 'S' UNION ALL SELECT 'N'");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void down() throws Exception {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package it.integry.ems.migration.model;
|
||||
|
||||
import it.integry.ems.migration._base.BaseMigration;
|
||||
import it.integry.ems.migration._base.MigrationModelInterface;
|
||||
|
||||
public class Migration_20250502120455 extends BaseMigration implements MigrationModelInterface {
|
||||
|
||||
@Override
|
||||
public void up() throws Exception {
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
createSetupQuery("SI_NO", "SI_NO", "SELECT 'S' UNION ALL SELECT 'N'");
|
||||
createSetup("TASK", "AGENDA", "EXCLUDE_WEEKEND", "N",
|
||||
"Permette di scegliere se considerare o meno il weekend nel calendario.", false, "SI_NO", false, false,
|
||||
false, false, false, null, false, "SELECT 'S' UNION ALL SELECT 'N'");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void down() throws Exception {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package it.integry.ems.migration.model;
|
||||
|
||||
import it.integry.ems.migration._base.BaseMigration;
|
||||
import it.integry.ems.migration._base.MigrationModelInterface;
|
||||
|
||||
public class Migration_20250502164926 extends BaseMigration implements MigrationModelInterface {
|
||||
|
||||
@Override
|
||||
public void up() throws Exception {
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
executeStatement("ALTER TABLE jtb_giustifica ADD flag_permesso bit");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void down() throws Exception {
|
||||
}
|
||||
}
|
||||
@@ -11,13 +11,16 @@ public class Migration_20250505155800 extends BaseMigration implements Migration
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
if (isCustomerDb(IntegryCustomerDB.Siciliani_DMS))
|
||||
return;
|
||||
|
||||
executeStatement(
|
||||
"alter table mtb_partita_mag_carat add chk_compatibilita bit not null default 0\n",
|
||||
"update mtb_aart_carat set mtb_aart_carat.cod_mtip = mtb_aart.cod_mtip,\n" +
|
||||
"mtb_aart_carat.cod_mstp = mtb_aart.cod_mstp\n" +
|
||||
"from mtb_aart_carat inner join mtb_aart on mtb_aart_carat.cod_mart = mtb_aart.cod_mart\n" +
|
||||
"where isnull(mtb_aart.cod_mstp, '') <> mtb_aart_carat.cod_mstp\n" +
|
||||
"and isnull(mtb_aart.cod_mtip, '') <> mtb_aart_carat.cod_mtip");
|
||||
"and isnull(mtb_aart.cod_mtip, '') <> mtb_aart_carat.cod_mtip and mtb_aart.cod_mtip is not null");
|
||||
|
||||
if (!isCustomerDb(IntegryCustomerDB.Biolevante_Biolevante)) return;
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
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_20250505171741 extends BaseMigration implements MigrationModelInterface {
|
||||
@@ -10,6 +11,8 @@ public class Migration_20250505171741 extends BaseMigration implements Migration
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
if (isCustomerDb(IntegryCustomerDB.Siciliani_DMS))
|
||||
return;
|
||||
|
||||
createOrUpdateFunction("getCompatibiltaCaratteristiche", "CREATE FUNCTION [dbo].[getCompatibiltaCaratteristiche] \n" +
|
||||
"(\n" +
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
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_20250505181805 extends BaseMigration implements MigrationModelInterface {
|
||||
@@ -10,6 +11,17 @@ public class Migration_20250505181805 extends BaseMigration implements Migration
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
if (isCustomerDb(IntegryCustomerDB.Siciliani_DMS))
|
||||
return;
|
||||
|
||||
if (isCustomerDb(IntegryCustomerDB.Ime_ImeTe) || isCustomerDb(IntegryCustomerDB.Materica_ImeBa) || isCustomerDb(IntegryCustomerDB.Levanplast_Levanplast)){
|
||||
executeStatement("delete from mtb_aart_carat\n" +
|
||||
"from mtb_aart_carat left outer join mtb_aart on mtb_aart_carat.cod_mart = mtb_aart.cod_mart and\n" +
|
||||
" mtb_aart_carat.cod_mtip = mtb_aart.cod_mtip and\n" +
|
||||
" mtb_aart_carat.cod_mstp = mtb_aart.cod_mstp\n" +
|
||||
"where mtb_aart.cod_mtip is null\n");
|
||||
}
|
||||
|
||||
executeStatement("exec DropPrimaryKey 'mtb_aart_carat'\n",
|
||||
"exec DropForeignKey 'mtb_aart_carat', 'mtb_stip'\n",
|
||||
"exec DropForeignKey 'mtb_aart_carat', 'mtb_tipi'\n",
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
package it.integry.ems.migration.model;
|
||||
|
||||
import it.integry.ems.migration._base.BaseMigration;
|
||||
import it.integry.ems.migration._base.MigrationModelInterface;
|
||||
|
||||
public class Migration_20250507122848 extends BaseMigration implements MigrationModelInterface {
|
||||
|
||||
@Override
|
||||
public void up() throws Exception {
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
executeStatement(
|
||||
"UPDATE mtb_aart SET bar_code = NULL WHERE bar_code = ''\n",
|
||||
"UPDATE mtb_aart SET cod_barre_imb = NULL WHERE cod_barre_imb = ''",
|
||||
"UPDATE mtb_aart SET bar_code = NULL WHERE bar_code = '0'\n",
|
||||
"UPDATE mtb_aart SET cod_barre_imb = NULL WHERE cod_barre_imb = '0'");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void down() throws Exception {
|
||||
}
|
||||
}
|
||||
@@ -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 {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
package it.integry.ems.migration.model;
|
||||
|
||||
import it.integry.ems.migration._base.BaseMigration;
|
||||
import it.integry.ems.migration._base.MigrationModelInterface;
|
||||
import it.integry.ems_model.entity.VtbBdgr;
|
||||
import it.integry.ems_model.types.OperationType;
|
||||
import it.integry.ems_model.utility.UtilityDB;
|
||||
import it.integry.ems_model.utility.UtilityHashMap;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
public class Migration_20250508103620 extends BaseMigration implements MigrationModelInterface {
|
||||
|
||||
@Override
|
||||
public void up() throws Exception {
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
String sql = "SELECT STUFF((SELECT DISTINCT CONCAT(',', vbr2.id_row)\n" +
|
||||
" FROM vtb_bdgr vbr2\n" +
|
||||
" WHERE vbr2.id_bdg = vtb_bdgr.id_bdg\n" +
|
||||
" AND vbr2.cod_anag = vtb_bdgr.cod_anag\n" +
|
||||
" AND vbr2.cod_mart = vtb_bdgr.cod_mart\n" +
|
||||
" FOR XML PATH ('')), 1, 1, '') AS id_row_duplicati,\n" +
|
||||
" id_bdg,\n" +
|
||||
" cod_anag,\n" +
|
||||
" cod_mart,\n" +
|
||||
" SUM(qta_storico) AS qta_storico,\n" +
|
||||
" SUM(qta_budget) AS qta_budget,\n" +
|
||||
" SUM(val_storico) AS val_storico,\n" +
|
||||
" SUM(val_budget) AS val_budget\n" +
|
||||
"FROM vtb_bdgr\n" +
|
||||
"WHERE cod_anag IS NOT NULL\n" +
|
||||
" AND cod_mart IS NOT NULL\n" +
|
||||
"GROUP BY id_bdg, cod_anag, cod_mart\n" +
|
||||
"HAVING COUNT(*) > 1";
|
||||
|
||||
List<HashMap<String, Object>> listBdgDuplicati = UtilityDB.executeSimpleQuery(advancedDataSource.getConnection(), sql);
|
||||
|
||||
if (!listBdgDuplicati.isEmpty()) {
|
||||
for (HashMap<String, Object> bdgDuplicati : listBdgDuplicati) {
|
||||
VtbBdgr vtbBdgr = new VtbBdgr()
|
||||
.setIdBdg(UtilityHashMap.getValueIfExists(bdgDuplicati, "id_bdg"))
|
||||
.setCodAnag(UtilityHashMap.getValueIfExists(bdgDuplicati, "cod_anag"))
|
||||
.setCodMart(UtilityHashMap.getValueIfExists(bdgDuplicati, "cod_mart"))
|
||||
.setQtaStorico(UtilityHashMap.getValueIfExists(bdgDuplicati, "qta_storico"))
|
||||
.setQtaBudget(UtilityHashMap.getValueIfExists(bdgDuplicati, "qta_budget"))
|
||||
.setValStorico(UtilityHashMap.getValueIfExists(bdgDuplicati, "val_storico"))
|
||||
.setValBudget(UtilityHashMap.getValueIfExists(bdgDuplicati, "val_budget"));
|
||||
|
||||
vtbBdgr.setOperation(OperationType.INSERT);
|
||||
|
||||
vtbBdgr.manageWithParentConnection(advancedDataSource.getConnection());
|
||||
|
||||
String idRowDuplicati = UtilityHashMap.getValueIfExists(bdgDuplicati, "id_row_duplicati");
|
||||
|
||||
sql = String.format("DELETE FROM vtb_bdgr WHERE id_row IN (%s)", idRowDuplicati);
|
||||
|
||||
executeStatement(sql);
|
||||
}
|
||||
}
|
||||
|
||||
executeStatement(
|
||||
"ALTER TABLE vtb_bdgr\n" +
|
||||
" ADD CONSTRAINT vtb_bdgr_id_bdg_cod_mart_cod_anag_uk\n" +
|
||||
" UNIQUE (id_bdg, cod_mart, cod_anag)"
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void down() throws Exception {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package it.integry.ems.migration.model;
|
||||
|
||||
import it.integry.ems.migration._base.BaseMigration;
|
||||
import it.integry.ems.migration._base.IntegryCustomer;
|
||||
import it.integry.ems.migration._base.MigrationModelInterface;
|
||||
|
||||
public class Migration_20250508164056 extends BaseMigration implements MigrationModelInterface {
|
||||
|
||||
@Override
|
||||
public void up() throws Exception {
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
if (!isCustomer(IntegryCustomer.Agricoper)) return;
|
||||
|
||||
updateSetupValue("DATI_AZIENDA", "SETUP", "LOGIN_OVER_WEBSERVICES", "S");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void down() throws Exception {
|
||||
}
|
||||
}
|
||||
@@ -1339,7 +1339,7 @@ public class CommonRules extends QueryRules {
|
||||
codMart, carat);
|
||||
|
||||
Boolean chkCompatibilita = UtilityDB.executeSimpleQueryOnlyFirstRowFirstColumn(connection, sql);
|
||||
if (chkCompatibilita = null) chkCompatibilita = false;
|
||||
if (chkCompatibilita == null) chkCompatibilita = false;
|
||||
return chkCompatibilita;
|
||||
|
||||
}
|
||||
|
||||
@@ -40,9 +40,9 @@ public class DocumentRules extends QueryRules {
|
||||
}
|
||||
|
||||
public static void completeIdRigaDrlTipiNoteDoc(Connection conn, DtbNoteDoc dtbNoteDoc) throws SQLException {
|
||||
if (!dtbNoteDoc.getDrlTipiNoteDoc().isEmpty()){
|
||||
if (!dtbNoteDoc.getDrlTipiNoteDoc().isEmpty()) {
|
||||
for (DrlTipiNoteDoc drlTipiNoteDoc : dtbNoteDoc.getDrlTipiNoteDoc()) {
|
||||
if ( drlTipiNoteDoc.getIdRiga() == null ) {
|
||||
if (drlTipiNoteDoc.getIdRiga() == null) {
|
||||
String sql = Query.format("SELECT Max(id_riga) FROM drl_tipi_note_doc WHERE cod_dtip = %s",
|
||||
drlTipiNoteDoc.getCodDtip());
|
||||
int maxIdRiga = UtilityDB.executeSimpleQueryOnlyFirstRowFirstColumn(conn, sql);
|
||||
@@ -236,9 +236,9 @@ public class DocumentRules extends QueryRules {
|
||||
public static String completeGeneraMovCont(Connection conn, DtbDoct entity) throws Exception {
|
||||
String sql =
|
||||
Query.format(
|
||||
"SELECT IsNull(cod_ccau, cod_ccau_ant) as cod_ccau " +
|
||||
" FROM dtb_tipi " +
|
||||
" WHERE dtb_tipi.cod_dtip = %s", entity.getCodDtip());
|
||||
"SELECT IsNull(cod_ccau, cod_ccau_ant) as cod_ccau " +
|
||||
" FROM dtb_tipi " +
|
||||
" WHERE dtb_tipi.cod_dtip = %s", entity.getCodDtip());
|
||||
|
||||
String codCcau = UtilityDB.executeSimpleQueryOnlyFirstRowFirstColumn(conn, sql);
|
||||
|
||||
@@ -326,12 +326,12 @@ public class DocumentRules extends QueryRules {
|
||||
}
|
||||
|
||||
sql =
|
||||
Query.format(
|
||||
"SELECT CAST(COUNT(*) AS BIT)\n" +
|
||||
"FROM mtb_depo\n" +
|
||||
"WHERE %s BETWEEN ISNULL(data_iniz_vent, %s) AND ISNULL(data_fine_vent, CAST(GETDATE() AS DATE))\n" +
|
||||
" AND mtb_depo.cod_mdep = %s\n",
|
||||
dataReg,dataReg, codMdep);
|
||||
Query.format(
|
||||
"SELECT CAST(COUNT(*) AS BIT)\n" +
|
||||
"FROM mtb_depo\n" +
|
||||
"WHERE %s BETWEEN ISNULL(data_iniz_vent, %s) AND ISNULL(data_fine_vent, CAST(GETDATE() AS DATE))\n" +
|
||||
" AND mtb_depo.cod_mdep = %s\n",
|
||||
dataReg, dataReg, codMdep);
|
||||
Boolean ventilazione = UtilityDB.executeSimpleQueryOnlyFirstRowFirstColumn(conn, sql);
|
||||
|
||||
HashMap<String, Boolean> dati = new HashMap<>();
|
||||
@@ -598,40 +598,50 @@ public class DocumentRules extends QueryRules {
|
||||
}
|
||||
}
|
||||
|
||||
public static void completeDatiDocMtbColt(Connection connection, DtbDoct testata) throws SQLException {
|
||||
public static void completeDatiDocMtbColt(Connection connection, DtbDoct testata) throws Exception {
|
||||
List<MtbColt> colli = testata.getMtbColt().stream().filter(x -> x.getNativeSql() == null).collect(Collectors.toList());
|
||||
for (MtbColt mtbColt: colli) {
|
||||
boolean cancellaRifDoc;
|
||||
if ( mtbColt.getCancellaRifDoc()==null) {
|
||||
if ( mtbColt.getOperation() == OperationType.DELETE) {
|
||||
cancellaRifDoc = true;
|
||||
mtbColt.setOperation(OperationType.UPDATE);
|
||||
} else {
|
||||
cancellaRifDoc = false;
|
||||
}
|
||||
} else {
|
||||
List<MtbColt> colliDaCanc = new ArrayList<>();
|
||||
for (MtbColt mtbColt : colli) {
|
||||
boolean isDelete = false;
|
||||
boolean cancellaRifDoc = false;
|
||||
if (mtbColt.getOperation() == OperationType.DELETE) {
|
||||
cancellaRifDoc = true;
|
||||
isDelete = true;
|
||||
} else if (mtbColt.getCancellaRifDoc() != null) {
|
||||
cancellaRifDoc = mtbColt.getCancellaRifDoc();
|
||||
}
|
||||
if (mtbColt.getOperation() != OperationType.DELETE) {
|
||||
String sql =
|
||||
Query.format(
|
||||
"SELECT CAST(IIF(flag_collo_anonimo='N',0,1) as bit) FROM mtb_colt WHERE gestione = %s AND data_collo = %s AND ser_collo = %s AND num_collo = %s",
|
||||
mtbColt.getGestione(),
|
||||
mtbColt.getDataCollo(),
|
||||
mtbColt.getSerCollo(),
|
||||
mtbColt.getNumCollo());
|
||||
|
||||
boolean colloAnonimo = UtilityDB.executeSimpleQueryOnlyFirstRowFirstColumn(connection, sql);
|
||||
String sql =
|
||||
Query.format(
|
||||
"SELECT CAST(IIF(flag_collo_anonimo='N',0,1) as bit) FROM mtb_colt WHERE gestione = %s AND data_collo = %s AND ser_collo = %s AND num_collo = %s",
|
||||
mtbColt.getGestione(),
|
||||
mtbColt.getDataCollo(),
|
||||
mtbColt.getSerCollo(),
|
||||
mtbColt.getNumCollo());
|
||||
|
||||
mtbColt
|
||||
.setCodAnag(cancellaRifDoc && colloAnonimo ? EmsRestConstants.NULL : testata.getCodAnag())
|
||||
.setCodDtip(cancellaRifDoc ? EmsRestConstants.NULL : testata.getCodDtip())
|
||||
.setDataDoc(cancellaRifDoc ? EmsRestConstants.DATE_NULL : testata.getDataDoc())
|
||||
.setSerDoc(cancellaRifDoc ? EmsRestConstants.NULL : testata.getSerDoc())
|
||||
.setNumDoc(cancellaRifDoc ? EmsRestConstants.INTEGER_NULL : testata.getNumDoc())
|
||||
.setOperation(OperationType.UPDATE);
|
||||
boolean colloAnonimo = UtilityDB.executeSimpleQueryOnlyFirstRowFirstColumn(connection, sql);
|
||||
|
||||
mtbColt
|
||||
.setCodAnag(cancellaRifDoc && colloAnonimo ? EmsRestConstants.NULL : testata.getCodAnag())
|
||||
.setCodDtip(cancellaRifDoc ? EmsRestConstants.NULL : testata.getCodDtip())
|
||||
.setDataDoc(cancellaRifDoc ? EmsRestConstants.DATE_NULL : testata.getDataDoc())
|
||||
.setSerDoc(cancellaRifDoc ? EmsRestConstants.NULL : testata.getSerDoc())
|
||||
.setNumDoc(cancellaRifDoc ? EmsRestConstants.INTEGER_NULL : testata.getNumDoc());
|
||||
mtbColt.setOperation(OperationType.UPDATE);
|
||||
|
||||
if (isDelete) {
|
||||
MtbColt c = new MtbColt()
|
||||
.setGestione(mtbColt.getGestione())
|
||||
.setDataCollo(mtbColt.getDataCollo())
|
||||
.setSerCollo(mtbColt.getSerCollo())
|
||||
.setNumCollo(mtbColt.getNumCollo());
|
||||
c.setOperation(OperationType.DELETE);
|
||||
colliDaCanc.add(c);
|
||||
}
|
||||
}
|
||||
|
||||
if (colliDaCanc.size() > 0) {
|
||||
testata.getMtbColt().addAll(colliDaCanc);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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)) {
|
||||
|
||||
@@ -146,6 +146,7 @@ public class UserCacheService {
|
||||
(application == IntegryApplicationEnum.PVM && x.isWeb()) ||
|
||||
(application == IntegryApplicationEnum.CONSEGNA && x.isWeb()) ||
|
||||
(application == IntegryApplicationEnum.WMS && x.isWeb()) ||
|
||||
(application == IntegryApplicationEnum.TASK && x.isWeb()) ||
|
||||
(application == IntegryApplicationEnum.GESTIONALE_BASE && x.isInternal())))
|
||||
.findFirst();
|
||||
|
||||
@@ -171,6 +172,7 @@ public class UserCacheService {
|
||||
(application == IntegryApplicationEnum.PVM && x.isWeb()) ||
|
||||
(application == IntegryApplicationEnum.CONSEGNA && x.isWeb()) ||
|
||||
(application == IntegryApplicationEnum.WMS && x.isWeb()) ||
|
||||
(application == IntegryApplicationEnum.TASK && x.isWeb()) ||
|
||||
(application == IntegryApplicationEnum.GESTIONALE_BASE && x.isInternal())))
|
||||
.findFirst();
|
||||
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
|
||||
|
||||
@@ -1634,13 +1634,6 @@ public class DtbDoct extends DtbBaseDocT implements EquatableEntityInterface<Dtb
|
||||
insertChilds();
|
||||
}
|
||||
|
||||
private void deleteRifDocdaCollo(MtbColt mtbColt) throws Exception {
|
||||
String sql = "UPDATE mtb_colt " + " SET cod_dtip = null, " + " data_doc = null, " + " ser_doc = null, " + " num_doc = null, " + " cod_anag = case when flag_collo_anonimo = 'S' then NULL else cod_anag end, " + " cod_vdes = case when flag_collo_anonimo = 'S' then NULL else cod_vdes end " + " WHERE cod_dtip = " + UtilityDB.valueToString(this.getCodDtip()) + " AND " + " data_doc = " + UtilityDB.valueDateToString(this.getDataDoc(), CommonConstants.DATE_FORMAT_YMD) + " AND " + " ser_doc = " + UtilityDB.valueToString(this.getSerDoc()) + " AND " + " num_doc = " + UtilityDB.valueToString(this.getNumDoc()) + " AND " + " cod_anag = " + UtilityDB.valueToString(this.getCodAnag()) + " AND " + " gestione = " + UtilityDB.valueToString(mtbColt.getGestione()) + " AND " + " data_collo = " + UtilityDB.valueToString(mtbColt.getDataCollo()) + " AND " + " ser_collo = " + UtilityDB.valueToString(mtbColt.getSerCollo()) + " AND " + " num_collo = " + UtilityDB.valueToString(mtbColt.getNumCollo());
|
||||
Statement cmd = connection.createStatement();
|
||||
cmd.executeUpdate(sql);
|
||||
cmd.close();
|
||||
}
|
||||
|
||||
public String getUserName() {
|
||||
return userName;
|
||||
}
|
||||
@@ -1683,20 +1676,13 @@ public class DtbDoct extends DtbBaseDocT implements EquatableEntityInterface<Dtb
|
||||
sql = UtilityDB.addwhereCond(sql, this.getWhereCondOldPk(null), false);
|
||||
connection.createStatement().executeUpdate(sql);
|
||||
|
||||
if ("S".equals(getGeneraMovCont())) {
|
||||
if ("S".equalsIgnoreCase(getGeneraMovCont())) {
|
||||
if (getWhereCond() == null) {
|
||||
setWhereCond(getPkWhereCond());
|
||||
}
|
||||
sql = "SELECT num_cmov FROM dtb_doct ";
|
||||
sql = UtilityDB.addwhereCond(sql, getWhereCond(), false);
|
||||
PreparedStatement ps = connection.prepareStatement(sql);
|
||||
ResultSet rs = ps.executeQuery();
|
||||
Integer numCmov = null;
|
||||
if (rs.next()) {
|
||||
numCmov = rs.getInt(1);
|
||||
}
|
||||
rs.close();
|
||||
ps.close();
|
||||
Integer numCmov = UtilityDB.executeSimpleQueryOnlyFirstRowFirstColumn(connection, sql);
|
||||
if (numCmov != null && numCmov != 0) {
|
||||
CtbMovt ctbMovt = getCtbMovt();
|
||||
if (ctbMovt == null) {
|
||||
|
||||
@@ -41,6 +41,9 @@ public class JtbGiustifica extends EntityBase {
|
||||
@SqlField(value = "cod_intercode", maxLength = 5)
|
||||
private String codIntercode;
|
||||
|
||||
@SqlField(value = "flag_permesso", defaultObjectValue = "0")
|
||||
private Boolean flagPermesso;
|
||||
|
||||
@EntityChild
|
||||
private List<JtbGiustificaRow> jtbGiustificaRow = new ArrayList<>();
|
||||
|
||||
@@ -104,6 +107,15 @@ public class JtbGiustifica extends EntityBase {
|
||||
this.jtbGiustificaRow = jtbGiustificaRow;
|
||||
}
|
||||
|
||||
public Boolean getFlagPermesso() {
|
||||
return flagPermesso;
|
||||
}
|
||||
|
||||
public JtbGiustifica setFlagPermesso(Boolean flagPermesso) {
|
||||
this.flagPermesso = flagPermesso;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void insertChilds() throws Exception {
|
||||
for (JtbGiustificaRow jtbGiustificaRow : getJtbGiustificaRow()) {
|
||||
|
||||
@@ -217,416 +217,468 @@ public class MtbLisvData extends EntityBase {
|
||||
return codMart;
|
||||
}
|
||||
|
||||
public void setCodMart(String codMart) {
|
||||
public MtbLisvData setCodMart(String codMart) {
|
||||
this.codMart = codMart;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCodVlis() {
|
||||
return codVlis;
|
||||
}
|
||||
|
||||
public void setCodVlis(String codVlis) {
|
||||
public MtbLisvData setCodVlis(String codVlis) {
|
||||
this.codVlis = codVlis;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Integer getVersione() {
|
||||
return versione;
|
||||
}
|
||||
|
||||
public void setVersione(Integer versione) {
|
||||
public MtbLisvData setVersione(Integer versione) {
|
||||
this.versione = versione;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getUntMisVen() {
|
||||
return untMisVen;
|
||||
}
|
||||
|
||||
public void setUntMisVen(String untMisVen) {
|
||||
public MtbLisvData setUntMisVen(String untMisVen) {
|
||||
this.untMisVen = untMisVen;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getRapConv() {
|
||||
return rapConv;
|
||||
}
|
||||
|
||||
public void setRapConv(BigDecimal rapConv) {
|
||||
public MtbLisvData setRapConv(BigDecimal rapConv) {
|
||||
this.rapConv = rapConv;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getPrzBase() {
|
||||
return przBase;
|
||||
}
|
||||
|
||||
public void setPrzBase(BigDecimal przBase) {
|
||||
public MtbLisvData setPrzBase(BigDecimal przBase) {
|
||||
this.przBase = przBase;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getRicarica() {
|
||||
return ricarica;
|
||||
}
|
||||
|
||||
public void setRicarica(BigDecimal ricarica) {
|
||||
public MtbLisvData setRicarica(BigDecimal ricarica) {
|
||||
this.ricarica = ricarica;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getPrzVend() {
|
||||
return przVend;
|
||||
}
|
||||
|
||||
public void setPrzVend(BigDecimal przVend) {
|
||||
public MtbLisvData setPrzVend(BigDecimal przVend) {
|
||||
this.przVend = przVend;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getPercSco1() {
|
||||
return percSco1;
|
||||
}
|
||||
|
||||
public void setPercSco1(BigDecimal percSco1) {
|
||||
public MtbLisvData setPercSco1(BigDecimal percSco1) {
|
||||
this.percSco1 = percSco1;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getPercSco2() {
|
||||
return percSco2;
|
||||
}
|
||||
|
||||
public void setPercSco2(BigDecimal percSco2) {
|
||||
public MtbLisvData setPercSco2(BigDecimal percSco2) {
|
||||
this.percSco2 = percSco2;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getPercSco3() {
|
||||
return percSco3;
|
||||
}
|
||||
|
||||
public void setPercSco3(BigDecimal percSco3) {
|
||||
public MtbLisvData setPercSco3(BigDecimal percSco3) {
|
||||
this.percSco3 = percSco3;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getPercSco4() {
|
||||
return percSco4;
|
||||
}
|
||||
|
||||
public void setPercSco4(BigDecimal percSco4) {
|
||||
public MtbLisvData setPercSco4(BigDecimal percSco4) {
|
||||
this.percSco4 = percSco4;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getPercProv() {
|
||||
return percProv;
|
||||
}
|
||||
|
||||
public void setPercProv(BigDecimal percProv) {
|
||||
public MtbLisvData setPercProv(BigDecimal percProv) {
|
||||
this.percProv = percProv;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getFissoProv() {
|
||||
return fissoProv;
|
||||
}
|
||||
|
||||
public void setFissoProv(BigDecimal fissoProv) {
|
||||
public MtbLisvData setFissoProv(BigDecimal fissoProv) {
|
||||
this.fissoProv = fissoProv;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getPosizione() {
|
||||
return posizione;
|
||||
}
|
||||
|
||||
public void setPosizione(String posizione) {
|
||||
public MtbLisvData setPosizione(String posizione) {
|
||||
this.posizione = posizione;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getPercGest() {
|
||||
return percGest;
|
||||
}
|
||||
|
||||
public void setPercGest(BigDecimal percGest) {
|
||||
public MtbLisvData setPercGest(BigDecimal percGest) {
|
||||
this.percGest = percGest;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getValGest() {
|
||||
return valGest;
|
||||
}
|
||||
|
||||
public void setValGest(BigDecimal valGest) {
|
||||
public MtbLisvData setValGest(BigDecimal valGest) {
|
||||
this.valGest = valGest;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getPrzVendIva() {
|
||||
return przVendIva;
|
||||
}
|
||||
|
||||
public void setPrzVendIva(BigDecimal przVendIva) {
|
||||
public MtbLisvData setPrzVendIva(BigDecimal przVendIva) {
|
||||
this.przVendIva = przVendIva;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getPercIspe() {
|
||||
return percIspe;
|
||||
}
|
||||
|
||||
public void setPercIspe(BigDecimal percIspe) {
|
||||
public MtbLisvData setPercIspe(BigDecimal percIspe) {
|
||||
this.percIspe = percIspe;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getValIspe() {
|
||||
return valIspe;
|
||||
}
|
||||
|
||||
public void setValIspe(BigDecimal valIspe) {
|
||||
public MtbLisvData setValIspe(BigDecimal valIspe) {
|
||||
this.valIspe = valIspe;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getPercPromo() {
|
||||
return percPromo;
|
||||
}
|
||||
|
||||
public void setPercPromo(BigDecimal percPromo) {
|
||||
public MtbLisvData setPercPromo(BigDecimal percPromo) {
|
||||
this.percPromo = percPromo;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getValPromo() {
|
||||
return valPromo;
|
||||
}
|
||||
|
||||
public void setValPromo(BigDecimal valPromo) {
|
||||
public MtbLisvData setValPromo(BigDecimal valPromo) {
|
||||
this.valPromo = valPromo;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getPercOneri() {
|
||||
return percOneri;
|
||||
}
|
||||
|
||||
public void setPercOneri(BigDecimal percOneri) {
|
||||
public MtbLisvData setPercOneri(BigDecimal percOneri) {
|
||||
this.percOneri = percOneri;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getValOneri() {
|
||||
return valOneri;
|
||||
}
|
||||
|
||||
public void setValOneri(BigDecimal valOneri) {
|
||||
public MtbLisvData setValOneri(BigDecimal valOneri) {
|
||||
this.valOneri = valOneri;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Date getDataAggPrz() {
|
||||
return dataAggPrz;
|
||||
}
|
||||
|
||||
public void setDataAggPrz(Date dataAggPrz) {
|
||||
public MtbLisvData setDataAggPrz(Date dataAggPrz) {
|
||||
this.dataAggPrz = dataAggPrz;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getTipoVariazione() {
|
||||
return tipoVariazione;
|
||||
}
|
||||
|
||||
public void setTipoVariazione(String tipoVariazione) {
|
||||
public MtbLisvData setTipoVariazione(String tipoVariazione) {
|
||||
this.tipoVariazione = tipoVariazione;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getNote() {
|
||||
return note;
|
||||
}
|
||||
|
||||
public void setNote(String note) {
|
||||
public MtbLisvData setNote(String note) {
|
||||
this.note = note;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getAggiornatoDa() {
|
||||
return aggiornatoDa;
|
||||
}
|
||||
|
||||
public void setAggiornatoDa(String aggiornatoDa) {
|
||||
public MtbLisvData setAggiornatoDa(String aggiornatoDa) {
|
||||
this.aggiornatoDa = aggiornatoDa;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getGiacenza() {
|
||||
return giacenza;
|
||||
}
|
||||
|
||||
public void setGiacenza(BigDecimal giacenza) {
|
||||
public MtbLisvData setGiacenza(BigDecimal giacenza) {
|
||||
this.giacenza = giacenza;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCodTcolUi() {
|
||||
return codTcolUi;
|
||||
}
|
||||
|
||||
public void setCodTcolUi(String codTcolUi) {
|
||||
public MtbLisvData setCodTcolUi(String codTcolUi) {
|
||||
this.codTcolUi = codTcolUi;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCodTcolUl() {
|
||||
return codTcolUl;
|
||||
}
|
||||
|
||||
public void setCodTcolUl(String codTcolUl) {
|
||||
public MtbLisvData setCodTcolUl(String codTcolUl) {
|
||||
this.codTcolUl = codTcolUl;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getColliPedana() {
|
||||
return colliPedana;
|
||||
}
|
||||
|
||||
public void setColliPedana(BigDecimal colliPedana) {
|
||||
public MtbLisvData setColliPedana(BigDecimal colliPedana) {
|
||||
this.colliPedana = colliPedana;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getMaggPrzVend() {
|
||||
return maggPrzVend;
|
||||
}
|
||||
|
||||
public void setMaggPrzVend(BigDecimal maggPrzVend) {
|
||||
public MtbLisvData setMaggPrzVend(BigDecimal maggPrzVend) {
|
||||
this.maggPrzVend = maggPrzVend;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getPrzVendSug() {
|
||||
return przVendSug;
|
||||
}
|
||||
|
||||
public void setPrzVendSug(BigDecimal przVendSug) {
|
||||
public MtbLisvData setPrzVendSug(BigDecimal przVendSug) {
|
||||
this.przVendSug = przVendSug;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getQtaCnf() {
|
||||
return qtaCnf;
|
||||
}
|
||||
|
||||
public void setQtaCnf(BigDecimal qtaCnf) {
|
||||
public MtbLisvData setQtaCnf(BigDecimal qtaCnf) {
|
||||
this.qtaCnf = qtaCnf;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getColliStrato() {
|
||||
return colliStrato;
|
||||
}
|
||||
|
||||
public void setColliStrato(BigDecimal colliStrato) {
|
||||
public MtbLisvData setColliStrato(BigDecimal colliStrato) {
|
||||
this.colliStrato = colliStrato;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getDescrizioneHtml() {
|
||||
return descrizioneHtml;
|
||||
}
|
||||
|
||||
public void setDescrizioneHtml(String descrizioneHtml) {
|
||||
public MtbLisvData setDescrizioneHtml(String descrizioneHtml) {
|
||||
this.descrizioneHtml = descrizioneHtml;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getScontoCartoni() {
|
||||
return scontoCartoni;
|
||||
}
|
||||
|
||||
public void setScontoCartoni(BigDecimal scontoCartoni) {
|
||||
public MtbLisvData setScontoCartoni(BigDecimal scontoCartoni) {
|
||||
this.scontoCartoni = scontoCartoni;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getScontoStrato() {
|
||||
return scontoStrato;
|
||||
}
|
||||
|
||||
public void setScontoStrato(BigDecimal scontoStrato) {
|
||||
public MtbLisvData setScontoStrato(BigDecimal scontoStrato) {
|
||||
this.scontoStrato = scontoStrato;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getScontoPedane() {
|
||||
return scontoPedane;
|
||||
}
|
||||
|
||||
public void setScontoPedane(BigDecimal scontoPedana) {
|
||||
this.scontoPedane = scontoPedana;
|
||||
}
|
||||
|
||||
public String getTagliaMin() {
|
||||
return tagliaMin;
|
||||
}
|
||||
|
||||
public void setTagliaMin(String tagliaMin) {
|
||||
this.tagliaMin = tagliaMin;
|
||||
}
|
||||
|
||||
public String getTagliaMax() {
|
||||
return tagliaMax;
|
||||
}
|
||||
|
||||
public void setTagliaMax(String tagliaMax) {
|
||||
this.tagliaMax = tagliaMax;
|
||||
}
|
||||
|
||||
public Date getDataIniz() {
|
||||
return dataIniz;
|
||||
}
|
||||
|
||||
public void setDataIniz(Date dataIniz) {
|
||||
this.dataIniz = dataIniz;
|
||||
}
|
||||
|
||||
public Date getDataFine() {
|
||||
return dataFine;
|
||||
}
|
||||
|
||||
public void setDataFine(Date dataFine) {
|
||||
this.dataFine = dataFine;
|
||||
}
|
||||
|
||||
public String getCodPromo() {
|
||||
return codPromo;
|
||||
}
|
||||
|
||||
public void setCodPromo(String codPromo) {
|
||||
this.codPromo = codPromo;
|
||||
}
|
||||
|
||||
public String getDescrPromo() {
|
||||
return descrPromo;
|
||||
}
|
||||
|
||||
public void setDescrPromo(String descrPromo) {
|
||||
this.descrPromo = descrPromo;
|
||||
}
|
||||
|
||||
public String getNoteLisv() {
|
||||
return noteLisv;
|
||||
}
|
||||
|
||||
public void setNoteLisv(String noteLisv) {
|
||||
this.noteLisv = noteLisv;
|
||||
}
|
||||
|
||||
public String getCodAliq() {
|
||||
return codAliq;
|
||||
}
|
||||
|
||||
public void setCodAliq(String codAliq) {
|
||||
this.codAliq = codAliq;
|
||||
}
|
||||
|
||||
public String getElencoLisvRif() {
|
||||
return elencoLisvRif;
|
||||
}
|
||||
|
||||
public void setElencoLisvRif(String elencoLisvRif) {
|
||||
this.elencoLisvRif = elencoLisvRif;
|
||||
public MtbLisvData setScontoPedane(BigDecimal scontoPedane) {
|
||||
this.scontoPedane = scontoPedane;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getSystemNote() {
|
||||
return systemNote;
|
||||
}
|
||||
|
||||
public void setSystemNote(String systemNote) {
|
||||
public MtbLisvData setSystemNote(String systemNote) {
|
||||
this.systemNote = systemNote;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getTagliaMin() {
|
||||
return tagliaMin;
|
||||
}
|
||||
|
||||
public MtbLisvData setTagliaMin(String tagliaMin) {
|
||||
this.tagliaMin = tagliaMin;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getTagliaMax() {
|
||||
return tagliaMax;
|
||||
}
|
||||
|
||||
public MtbLisvData setTagliaMax(String tagliaMax) {
|
||||
this.tagliaMax = tagliaMax;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getFlagListIvaInclusa() {
|
||||
return flagListIvaInclusa;
|
||||
}
|
||||
|
||||
public void setFlagListIvaInclusa(String flagListIvaInclusa) {
|
||||
public MtbLisvData setFlagListIvaInclusa(String flagListIvaInclusa) {
|
||||
this.flagListIvaInclusa = flagListIvaInclusa;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getIdArtEqui() {
|
||||
return idArtEqui;
|
||||
}
|
||||
|
||||
public void setIdArtEqui(String idArtEqui) {
|
||||
public MtbLisvData setIdArtEqui(String idArtEqui) {
|
||||
this.idArtEqui = idArtEqui;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Date getDataIniz() {
|
||||
return dataIniz;
|
||||
}
|
||||
|
||||
public MtbLisvData setDataIniz(Date dataIniz) {
|
||||
this.dataIniz = dataIniz;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Date getDataFine() {
|
||||
return dataFine;
|
||||
}
|
||||
|
||||
public MtbLisvData setDataFine(Date dataFine) {
|
||||
this.dataFine = dataFine;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCodPromo() {
|
||||
return codPromo;
|
||||
}
|
||||
|
||||
public MtbLisvData setCodPromo(String codPromo) {
|
||||
this.codPromo = codPromo;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getDescrPromo() {
|
||||
return descrPromo;
|
||||
}
|
||||
|
||||
public MtbLisvData setDescrPromo(String descrPromo) {
|
||||
this.descrPromo = descrPromo;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getNoteLisv() {
|
||||
return noteLisv;
|
||||
}
|
||||
|
||||
public MtbLisvData setNoteLisv(String noteLisv) {
|
||||
this.noteLisv = noteLisv;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCodAliq() {
|
||||
return codAliq;
|
||||
}
|
||||
|
||||
public MtbLisvData setCodAliq(String codAliq) {
|
||||
this.codAliq = codAliq;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getElencoLisvRif() {
|
||||
return elencoLisvRif;
|
||||
}
|
||||
|
||||
public MtbLisvData setElencoLisvRif(String elencoLisvRif) {
|
||||
this.elencoLisvRif = elencoLisvRif;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getFlagEquiPrezzo() {
|
||||
|
||||
@@ -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$
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -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