Merge branch 'develop' into feature/JDK11
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,24 @@
|
||||
package it.integry.ems.migration.model;
|
||||
|
||||
import it.integry.ems.migration._base.BaseMigration;
|
||||
import it.integry.ems.migration._base.MigrationModelInterface;
|
||||
|
||||
public class Migration_20250307143631 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("FATTURA_ELETTRONICA_CUSTOM", "CAUSALE", "TERM_CONS", "N",
|
||||
"Se S attiva la visualizzazione dei termini di consegna nel tag Causale", 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_20250307163255 extends BaseMigration implements MigrationModelInterface {
|
||||
|
||||
@Override
|
||||
public void up() throws Exception {
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
executeStatement("delete from stb_gest_setup where gest_name ='fattura_elettronica_custom' and section ='causale' and key_section ='note_pie_pagina'");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void down() throws Exception {
|
||||
}
|
||||
}
|
||||
@@ -499,17 +499,31 @@ public class DigitalInvoiceBodyFactory {
|
||||
}
|
||||
}
|
||||
|
||||
// se configurato inserisce nel tag CAUSALE i termini di consegna del documento
|
||||
if (setupCustom.getSetupBoolean("FATTURA_ELETTRONICA_CUSTOM", "CAUSALE", "TERM_CONS")) {
|
||||
sql = "select dtb_doct.term_cons " +
|
||||
" from dtb_doct " +
|
||||
" where dtb_doct.cod_dtip = " + UtilityDB.valueToString(bodyFattura.getCodDtipDocumento()) + " and " +
|
||||
" dtb_doct.cod_anag = " + UtilityDB.valueToString(bodyFattura.getCodAnagDocumento()) + "and " +
|
||||
" dtb_doct.data_doc = " + UtilityDB.valueDateToString(bodyFattura.getDataDocumento(), CommonConstants.DATE_FORMAT_YMD) + "and " +
|
||||
" dtb_doct.ser_doc = " + UtilityDB.valueToString(bodyFattura.getSerieDocumento()) + "and " +
|
||||
" dtb_doct.num_doc = " + UtilityDB.valueToString(bodyFattura.getNumeroDocumento());
|
||||
String termCons = UtilityDB.executeSimpleQueryOnlyFirstRowFirstColumn(multiDBTransactionManager.getPrimaryConnection(), sql);
|
||||
if (!UtilityString.isNullOrEmpty(termCons)) {
|
||||
datiGeneraliDocumento.getCausale().add(termCons);
|
||||
}
|
||||
}
|
||||
|
||||
// se configurato inserisce nel tag CAUSALE le note del cliente presenti nella gtb_anag_note con flag_stampa_doc ='S'
|
||||
if (setupCustom.getSetupBoolean("FATTURA_ELETTRONICA_CUSTOM", "CAUSALE", "GTB_ANAG_NOTE")) {
|
||||
sql = "SELECT note FROM gtb_anag_note WHERE flag_stampa_doc ='S' and cod_anag = " + UtilityDB.valueToString(request.getCodAnag()) + " ORDER BY riga_note";
|
||||
|
||||
List<String> notes = UtilityDB.executeSimpleQueryOnlyFirstColumn(multiDBTransactionManager.getPrimaryConnection(), sql);
|
||||
|
||||
for (String note : notes) {
|
||||
datiGeneraliDocumento.getCausale().add(note);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//se configurato inserisce nel tag CAUSALE tutte le partite di magazzino presenti nel docuemnto
|
||||
if (setupCustom.getSetupBoolean("FATTURA_ELETTRONICA_CUSTOM", "COD_ANAG_" + request.getCodAnag(), "CAUSALE_LOTTO")) {
|
||||
final String[] matricole = {""};
|
||||
@@ -525,15 +539,6 @@ public class DigitalInvoiceBodyFactory {
|
||||
}
|
||||
}
|
||||
|
||||
// Elenco note da aggiungere alla fattura (Es. dicitura CONAI )
|
||||
String noteDoc = setup.getSetup("FATTURA_ELETTRONICA_CUSTOM", "CAUSALE", "NOTE_PIE_PAGINA");
|
||||
if (noteDoc != null && !noteDoc.isEmpty()) {
|
||||
String[] notes = noteDoc.split("\\|");
|
||||
for (int j = 0; j < notes.length; j++) {
|
||||
datiGeneraliDocumento.getCausale().add(notes[j]);
|
||||
}
|
||||
}
|
||||
|
||||
return datiGeneraliDocumento;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user