Ingrandita mtb_partita_mag.descrizione, sistemato report scheda costi aggiunta percentuale provvigioni, aggiunta nuova voce di menù
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
package it.integry.ems.migration.model;
|
||||
|
||||
import it.integry.ems.migration._base.BaseMigration;
|
||||
import it.integry.ems.migration._base.MigrationModelInterface;
|
||||
|
||||
public class Migration_20240419115745 extends BaseMigration implements MigrationModelInterface {
|
||||
|
||||
@Override
|
||||
public void up() throws Exception {
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
executeStatement("ALTER TABLE mtb_partita_mag ALTER COLUMN descrizione varchar(255)");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void down() throws Exception {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -28,7 +28,7 @@ public class MtbPartitaMag extends EntityBase {
|
||||
@SqlField(value = "partita_mag", maxLength = 20, nullable = false)
|
||||
private String partitaMag;
|
||||
|
||||
@SqlField(value = "descrizione", maxLength = 40, nullable = true)
|
||||
@SqlField(value = "descrizione", maxLength = 255, nullable = true)
|
||||
private String descrizione;
|
||||
|
||||
@SqlField(value = "data_ins", nullable = false, defaultObjectValue = CommonConstants.SYSDATE)
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -20,6 +20,7 @@ public class StampaSchedaCostiDTO {
|
||||
private BigDecimal qtaProd;
|
||||
private BigDecimal costoUnit;
|
||||
private BigDecimal valore;
|
||||
private BigDecimal perc;
|
||||
private String note;
|
||||
private BigDecimal przVend;
|
||||
private BigDecimal przVendKg;
|
||||
@@ -196,5 +197,14 @@ public class StampaSchedaCostiDTO {
|
||||
this.dataIniz = dataIniz;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getPerc() {
|
||||
return perc;
|
||||
}
|
||||
|
||||
public StampaSchedaCostiDTO setPerc(BigDecimal perc) {
|
||||
this.perc = perc;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
@@ -135,12 +136,13 @@ public class StampaSchedaCostiJavabean extends BaseReportJavabean implements IRe
|
||||
continue;
|
||||
|
||||
for (CostoProdottoDTO row : categoria.getRows()) {
|
||||
BigDecimal przVend = UtilityHashMap.getValueIfExists(dati, "prz_vend");
|
||||
StampaSchedaCostiDTO stampaSchedaCostiDTO = new StampaSchedaCostiDTO()
|
||||
.setCodMart(UtilityHashMap.getValueIfExists(dati, "cod_mart"))
|
||||
.setDescrArt(UtilityHashMap.getValueIfExists(dati, "descr_art"))
|
||||
.setCodVlis(UtilityHashMap.getValueIfExists(dati, "cod_vlis"))
|
||||
.setDescrLisv(UtilityHashMap.getValueIfExists(dati, "descr_lisv"))
|
||||
.setPrzVend(UtilityHashMap.getValueIfExists(dati, "prz_vend"))
|
||||
.setPrzVend(przVend)
|
||||
.setPrzVendKg(UtilityHashMap.getValueIfExists(dati, "prz_vend_kg"))
|
||||
.setUntMisVen(UtilityHashMap.getValueIfExists(dati, "unt_mis_ven"))
|
||||
.setNote(UtilityHashMap.getValueIfExists(dati, "note"))
|
||||
@@ -151,7 +153,8 @@ public class StampaSchedaCostiJavabean extends BaseReportJavabean implements IRe
|
||||
.setDescrCosto(row.getDescrizione())
|
||||
.setCostoUnit(row.getCostoUnt())
|
||||
.setQtaProd(row.getQtaProd())
|
||||
.setValore(row.getValore())
|
||||
.setValore(UtilityBigDecimal.isNullOrZero(row.getPerc())?row.getValore():(przVend.multiply(row.getPerc()).setScale(5, RoundingMode.HALF_UP)).divide(new BigDecimal(100), 5, RoundingMode.HALF_UP))
|
||||
.setPerc(row.getPerc())
|
||||
.setUntMis(row.getUntMis())
|
||||
.setSort(idSort)
|
||||
.setDataIniz(UtilityDate.StringToDate(paramsMap.get("data_iniz").toString(), UtilityString.determineDateFormat(paramsMap.get("data_iniz").toString())));
|
||||
|
||||
Reference in New Issue
Block a user