Fix: in caso di edit row do un collo recuperato, in Spedizione, l'applicazione si bloccava.

This commit is contained in:
Giuseppe Scorrano 2020-10-05 12:57:04 +02:00
parent 507a38f3a7
commit eff50dce03
2 changed files with 6 additions and 5 deletions

View File

@ -292,8 +292,6 @@ public class SpedizioneActivity extends BaseActivity implements SpedizioneViewMo
if (SettingsManager.iDB().isFlagForceAllToColli() || (x.getMtbAart() == null || !x.getMtbAart().isFlagQtaCnfFissaBoolean())) {
cloneModel.setUntMis("col");
// cloneModel.setQtaTot(mtbColrToDispatch != null ? mtbColrToDispatch.getNumCnf() : x.getSitArtOrdDTO().getNumCnfOrd());
// cloneModel.setQtaEvasa(numCnfWithdrawRows.getBigDecimalValue());
BigDecimal numCnfOrdToSubstract = UtilityBigDecimal.getLowerBetween(mtbColrToDispatch.getNumCnf(), numCnfOrdCounter);

View File

@ -1269,11 +1269,14 @@ public class SpedizioneViewModel {
this.mColliMagazzinoRESTConsumer.saveCollo(mtbColt, (value) -> {
PickingObjectDTO pickingObjectDTO = Stream.of(this.mPickingList.getValue())
Optional<PickingObjectDTO> pickingObjectDTO = Stream.of(this.mPickingList.getValue())
.filter(x -> Stream.of(x.getWithdrawMtbColrs()).anyMatch(y -> y == mtbColrToDelete))
.single();
.findSingle();
if(pickingObjectDTO.isPresent()) {
pickingObjectDTO.get().getWithdrawMtbColrs().remove(mtbColrToDelete);
}
pickingObjectDTO.getWithdrawMtbColrs().remove(mtbColrToDelete);
this.mCurrentMtbColt.getMtbColr().remove(mtbColrToDelete);
this.resetMatchedRows();