Gestione note fattura in generazione xml fattura elettronica
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.MigrationModelInterface;
|
||||||
|
|
||||||
|
public class Migration_20240503181252 extends BaseMigration implements MigrationModelInterface {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void up() throws Exception {
|
||||||
|
if (isHistoryDB())
|
||||||
|
return;
|
||||||
|
|
||||||
|
|
||||||
|
createSetup("FATTURA_ELETTRONICA_CUSTOM", "CAUSALE", "NOTE_PIE_PAGINA", null, "Elenco note da visualizzare a pie pagina separate da |", false, null, false, false, false, false, false, null, false, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void down() throws Exception {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
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;
|
||||||
|
import it.integry.ems_model.utility.UtilityDB;
|
||||||
|
|
||||||
|
public class Migration_20240503184010 extends BaseMigration implements MigrationModelInterface {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void up() throws Exception {
|
||||||
|
if (isHistoryDB())
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (!isCustomerDb(
|
||||||
|
IntegryCustomerDB.Frudis_Frudis)){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
executeStatement(
|
||||||
|
"UPDATE stb_gest_setup " +
|
||||||
|
" SET value = 'Paese d''origine: ITALIA (CEE 3148/94)|Condiz. di vendita: COFREUROP/RUCIP|CONTRIBUTO AMBIENTALE CONAI ASSOLTO' " +
|
||||||
|
"WHERE gest_name = " + UtilityDB.valueToString("FATTURA_ELETTRONICA_CUSTOM") + " AND " +
|
||||||
|
"section = " + UtilityDB.valueToString("CAUSALE") + " AND " +
|
||||||
|
"key_section = " + UtilityDB.valueToString("NOTE_PIE_PAGINA")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void down() throws Exception {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -215,7 +215,6 @@ public class DigitalInvoiceBodyFactory {
|
|||||||
resultSet.close();
|
resultSet.close();
|
||||||
ps.close();
|
ps.close();
|
||||||
|
|
||||||
|
|
||||||
BigDecimal tot_imponib = BigDecimal.ZERO, tot_iva = BigDecimal.ZERO;
|
BigDecimal tot_imponib = BigDecimal.ZERO, tot_iva = BigDecimal.ZERO;
|
||||||
for (DatiRiepilogoDTO dato : datiRiepilogo) {
|
for (DatiRiepilogoDTO dato : datiRiepilogo) {
|
||||||
String codDtipCcau = dato.getCodDtipCcau();
|
String codDtipCcau = dato.getCodDtipCcau();
|
||||||
@@ -513,6 +512,16 @@ public class DigitalInvoiceBodyFactory {
|
|||||||
datiGeneraliDocumento.getCausale().add(matricole[0]);
|
datiGeneraliDocumento.getCausale().add(matricole[0]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 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;
|
return datiGeneraliDocumento;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user