[WMS] Aggiunto parametro per indicare se la rettifica deve disabilitare la creazione del movimento fiscale
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good

This commit is contained in:
2025-02-06 17:39:13 +01:00
parent c57251bc2c
commit adb1367ded
5 changed files with 11 additions and 13 deletions

1
.idea/misc.xml generated
View File

@@ -9,7 +9,6 @@
</option>
</component>
<component name="PWA">
<option name="enabled" value="true" />
<option name="wasEnabledAtLeastOnce" value="true" />
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK" />

View File

@@ -143,7 +143,7 @@ public class GrammProductionService {
BigDecimal newQtaCol = mtbColrCarichiGiac.get(0).getQtaCol().add(qtaDaRettificare);
BigDecimal newNumCnf = UtilityBigDecimal.divide(newQtaCol, mtbColrCarichiGiac.get(0).getQtaCnf());
wmsGenericService.creaRettificaCollo(codMdep, mtbColrCarichiGiac.get(0), newNumCnf, newQtaCol);
wmsGenericService.creaRettificaCollo(codMdep, mtbColrCarichiGiac.get(0), newNumCnf, newQtaCol, false, false, null);
} else if (isNegativeUpdate) {
BigDecimal qtaDaRettificare = caricoTotale.subtract(chiusuraLavorazioneSemoleRequestDTO.getQtaPastaSeccaProdotta());
@@ -154,7 +154,7 @@ public class GrammProductionService {
BigDecimal newQtaCol = mtbColrCarichiGiac.get(i).getQtaCol().subtract(qtaToTake);
BigDecimal newNumCnf = UtilityBigDecimal.divide(newQtaCol, mtbColrCarichiGiac.get(i).getQtaCnf());
wmsGenericService.creaRettificaCollo(codMdep, mtbColrCarichiGiac.get(i), newNumCnf, newQtaCol);
wmsGenericService.creaRettificaCollo(codMdep, mtbColrCarichiGiac.get(i), newNumCnf, newQtaCol, false, false, null);
counterQta = counterQta.add(qtaToTake);
}
}
@@ -449,7 +449,7 @@ public class GrammProductionService {
BigDecimal newQtaCol = mtbColrCarichi.get(0).getQtaCol().add(qtaDaRettificare);
BigDecimal newNumCnf = UtilityBigDecimal.divide(newQtaCol, mtbColrCarichi.get(0).getQtaCnf());
wmsGenericService.creaRettificaCollo(codMdep, mtbColrCarichi.get(0).toMtbColr(), newNumCnf, newQtaCol);
wmsGenericService.creaRettificaCollo(codMdep, mtbColrCarichi.get(0).toMtbColr(), newNumCnf, newQtaCol, false, false, null);
} else {
BigDecimal qtaDaRettificare = residuoCalc.subtract(chiusuraLavorazioneFornoRequestDTO.getQtaResiduo());
@@ -462,7 +462,7 @@ public class GrammProductionService {
BigDecimal newQtaCol = mtbColrCarichiGiac.get(i).getQtaCol().subtract(qtaToTake);
BigDecimal newNumCnf = UtilityBigDecimal.divide(newQtaCol, mtbColrCarichiGiac.get(i).getQtaCnf());
wmsGenericService.creaRettificaCollo(codMdep, mtbColrCarichiGiac.get(i).toMtbColr(), newNumCnf, newQtaCol);
wmsGenericService.creaRettificaCollo(codMdep, mtbColrCarichiGiac.get(i).toMtbColr(), newNumCnf, newQtaCol, false, false, null);
counterQta = counterQta.add(qtaToTake);
}
}

View File

@@ -57,7 +57,8 @@ public class ProductionWarehouseService {
rettificaDto.getNewNumCnf(),
rettificaDto.getNewQtaCol(),
true,
true));
true,
null));
MtbColt testata = new MtbColt();
testata.setNumCollo(rettifica.getNumCollo());
testata.setDataCollo(rettifica.getDataCollo());

View File

@@ -412,6 +412,7 @@ public class WMSGenericController {
@RequestParam String codMdep,
@RequestParam(required = false, defaultValue = "false") Boolean forceNewCollo,
@RequestParam(required = false, defaultValue = "false") Boolean returnRettifica,
@RequestParam(required = false) Boolean shouldCreateMovFiscale,
@RequestBody RettificaULDTO rettificaULDTO) throws Exception {
MtbColr mtbColr = wmsGenericService.creaRettificaCollo(
@@ -419,8 +420,9 @@ public class WMSGenericController {
rettificaULDTO.getSourceMtbColr(),
rettificaULDTO.getNewNumCnf(),
rettificaULDTO.getNewQtaCol(),
forceNewCollo,
returnRettifica);
forceNewCollo != null ? forceNewCollo : false,
returnRettifica != null ? returnRettifica : false,
shouldCreateMovFiscale);
return ServiceRestResponse.createEntityPositiveResponse(mtbColr);
}

View File

@@ -1181,11 +1181,7 @@ public class WMSGenericService {
return shoudBeDeleted;
}
public MtbColr creaRettificaCollo(String codMdep, MtbColr sourceMtbColr, BigDecimal newNumCnf, BigDecimal newQtaCol) throws Exception {
return creaRettificaCollo(codMdep, sourceMtbColr, newNumCnf, newQtaCol, false, false);
}
public MtbColr creaRettificaCollo(String codMdep, MtbColr sourceMtbColr, BigDecimal newNumCnf, BigDecimal newQtaCol, boolean createNewCollo, boolean returnRettifica) throws Exception {
public MtbColr creaRettificaCollo(String codMdep, MtbColr sourceMtbColr, BigDecimal newNumCnf, BigDecimal newQtaCol, boolean createNewCollo, boolean returnRettifica, Boolean shouldCreateMovFiscale) throws Exception {
/*
Warning: il campo sourceMtbColr potrebbe non essere una reale mtb_colr ma potrebbe essere la somma delle
qta delle mtb_colr con stesso cod_mart, partita_mag, cod_col, cod_tagl.