This commit is contained in:
Giuseppe Scorrano 2025-03-03 17:50:18 +01:00
parent 326a3a00b2
commit 7c35e19ed4
2 changed files with 11 additions and 3 deletions

View File

@ -859,11 +859,19 @@ public class PickingLiberoViewModel {
var closeUDSRequest = new CloseUDSRequestDTO() var closeUDSRequest = new CloseUDSRequestDTO()
.setMtbColt(mCurrentMtbColt); .setMtbColt(mCurrentMtbColt);
if (this.mDefaultGestione == GestioneEnum.LAVORAZIONE) { if (this.mDefaultGestione == GestioneEnum.LAVORAZIONE && SettingsManager.iDB().isProduzioneGeneraDocScar()) {
if(SettingsManager.iDB().getInternalCodAnags() == null || SettingsManager.iDB().getInternalCodAnags().isEmpty())
throw new Exception("Nessuna anagrafica aziendale configurata. Assicurarsi di aver abilitato il flag FLAG_USE_COD_ANAG_AZIENDALE.");
closeUDSRequest closeUDSRequest
.setCreateDocument(SettingsManager.iDB().isProduzioneGeneraDocScar()) .setCreateDocument(SettingsManager.iDB().isProduzioneGeneraDocScar())
.setDocumentCodDtip(SettingsManager.iDB().getProduzioneCodDtipScar()) .setDocumentCodDtip(SettingsManager.iDB().getProduzioneCodDtipScar())
.setDocumentCodAnag(SettingsManager.iDB().getInternalCodAnags().stream().filter(InternalCodAnagsDTO::isFornitore).findFirst().get().getCodAnag()); .setDocumentCodAnag(SettingsManager.iDB().getInternalCodAnags().stream()
.filter(InternalCodAnagsDTO::isFornitore)
.findFirst()
.get()
.getCodAnag());
} }
var response = this.mColliScaricoRESTConsumer.closeUDSSynchronized(closeUDSRequest); var response = this.mColliScaricoRESTConsumer.closeUDSSynchronized(closeUDSRequest);

View File

@ -690,7 +690,7 @@ public class SpedizioneViewModel {
if (mtbColt != null && mtbColt.getMtbColr() != null && !mtbColt.getMtbColr().isEmpty()) { if (mtbColt != null && mtbColt.getMtbColr() != null && !mtbColt.getMtbColr().isEmpty()) {
if (mtbColt.getSegno() != -1) { if (mtbColt.getSegno() != -1) {
boolean codMdepMatchPreviousPick = mCurrentMtbColt == null || mtbColt.getMtbColr().isEmpty() || mCurrentMtbColt.getCodMdep().equalsIgnoreCase(mtbColt.getCodMdep()); boolean codMdepMatchPreviousPick = mCurrentMtbColt == null || mCurrentMtbColt.getMtbColr().isEmpty() || mCurrentMtbColt.getCodMdep().equalsIgnoreCase(mtbColt.getCodMdep());
boolean codMdepIsValid = SettingsManager.iDB().getAvailableCodMdep().stream() boolean codMdepIsValid = SettingsManager.iDB().getAvailableCodMdep().stream()
.anyMatch(x -> x.getCodMdep().equalsIgnoreCase(mtbColt.getCodMdep())); .anyMatch(x -> x.getCodMdep().equalsIgnoreCase(mtbColt.getCodMdep()));