Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
@@ -2,7 +2,6 @@ package it.integry.integrywmsnative.gest.contab_doc_interni.edit_form;
|
||||
|
||||
import androidx.lifecycle.MutableLiveData;
|
||||
|
||||
import com.annimon.stream.Optional;
|
||||
import com.annimon.stream.Stream;
|
||||
|
||||
import org.json.JSONException;
|
||||
@@ -278,27 +277,32 @@ public class DocInterniEditFormViewModel {
|
||||
if (doc == null || fornitori == null || tipoDocDTO == null)
|
||||
return;
|
||||
|
||||
List<FornitoreDTO> filterFornitori = Stream.of(fornitori).filter(x->x.getCodAnag().equals(doc.getCodAnag())).toList();
|
||||
List<FornitoreDTO> filterFornitori = Stream.of(fornitori)
|
||||
.filter(x -> x.getCodAnag().equals(doc.getCodAnag()))
|
||||
.toList();
|
||||
List<CheckFornitoreDTO> checkFornitoreDTO;
|
||||
|
||||
TipoDocDTO tipoDoc = Stream.of(tipoDocDTO).filter(x -> x.getCodDtip().equals(doc.getCodDtipProvv())).findFirst().get();
|
||||
TipoDocDTO tipoDoc = Stream.of(tipoDocDTO)
|
||||
.filter(x -> x.getCodDtip().equals(doc.getCodDtipProvv()))
|
||||
.findFirst()
|
||||
.get();
|
||||
|
||||
if (tipoDoc.isFlagChkTracciabilita()){
|
||||
if (tipoDoc.isFlagChkTracciabilita()) {
|
||||
this.isCheckPartitaMag = tipoDoc.isFlagChkTracciabilita();
|
||||
}else{
|
||||
} else {
|
||||
if (filterFornitori.isEmpty())
|
||||
return;
|
||||
|
||||
if (doc.getCodVdes() == null) {
|
||||
checkFornitoreDTO = Stream.of(filterFornitori)
|
||||
.filter(x -> x.getCodVdes() == null).findFirst().get().getCheckFornitoreDTO();
|
||||
} else{
|
||||
} else {
|
||||
checkFornitoreDTO = Stream.of(filterFornitori)
|
||||
.filterNot(x -> x.getCodVdes() == null)
|
||||
.filter(x -> x.getCodVdes().equals(doc.getCodVdes())).findFirst().get().getCheckFornitoreDTO();
|
||||
}
|
||||
|
||||
if (checkFornitoreDTO != null){
|
||||
if (checkFornitoreDTO != null) {
|
||||
CheckFornitoreDTO flagCheck = Stream.of(checkFornitoreDTO)
|
||||
.filter(x -> x.getCodDtip().equals(doc.getCodDtipProvv())).findFirstOrElse(null);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user