eliminto campo flag_fatt_vettore
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,19 @@
|
||||
package it.integry.ems.migration.model;
|
||||
|
||||
import it.integry.ems.migration._base.BaseMigration;
|
||||
import it.integry.ems.migration._base.MigrationModelInterface;
|
||||
|
||||
public class Migration_20250109154212 extends BaseMigration implements MigrationModelInterface {
|
||||
|
||||
@Override
|
||||
public void up() throws Exception {
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
dropColumn("gtb_porto", "flag_fattura_vettore");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void down() throws Exception {
|
||||
}
|
||||
}
|
||||
@@ -44,9 +44,6 @@ public class GtbPorto extends EntityBase {
|
||||
@SqlField(value = "flag_attivo", nullable = false)
|
||||
private Boolean flagAttivo;
|
||||
|
||||
@SqlField(value = "flag_fattura_vettore", nullable = false)
|
||||
private Boolean flagFatturaVettore;
|
||||
|
||||
@SqlField(value = "flag_incoterms", nullable = false)
|
||||
private Boolean flagIncoterms;
|
||||
|
||||
@@ -114,15 +111,6 @@ public class GtbPorto extends EntityBase {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Boolean getFlagFatturaVettore() {
|
||||
return flagFatturaVettore;
|
||||
}
|
||||
|
||||
public GtbPorto setFlagFatturaVettore(Boolean flagFatturaVettore) {
|
||||
this.flagFatturaVettore = flagFatturaVettore;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Boolean getFlagIncoterms() {
|
||||
return flagIncoterms;
|
||||
}
|
||||
|
||||
@@ -132,11 +132,14 @@ public class DocumentiDirettiService {
|
||||
|
||||
boolean fatturaPedaneCliente = UtilityDB.executeSimpleQueryOnlyFirstRowFirstColumn(multiDBTransactionManager.getPrimaryConnection(), sql);
|
||||
|
||||
sql =
|
||||
Query.format(
|
||||
"SELECT flag_fattura_vettore FROM gtb_porto WHERE porto = %s",
|
||||
dtbDoct.getIncoterms());
|
||||
boolean fatturaVettore = UtilityDB.executeSimpleQueryOnlyFirstRowFirstColumn(multiDBTransactionManager.getPrimaryConnection(), sql);
|
||||
boolean fatturaVettore = false;
|
||||
if (!UtilityString.isNullOrEmpty(dtbDoct.getIncoterms())) {
|
||||
sql =
|
||||
Query.format(
|
||||
"SELECT CAST(IIF(costo=2,1,0) as bit) FROM gtb_porto WHERE porto = %s",
|
||||
dtbDoct.getIncoterms());
|
||||
fatturaVettore = UtilityDB.executeSimpleQueryOnlyFirstRowFirstColumn(multiDBTransactionManager.getPrimaryConnection(), sql);
|
||||
}
|
||||
|
||||
if ((fatturaPedaneCliente || fatturaVettore) &&
|
||||
dtbDoct.getDtbDocImb().stream().anyMatch(x->x.getTipoReso()!= 2 && !x.getNumImbCons().equals(x.getNumImbResi()))
|
||||
|
||||
Reference in New Issue
Block a user