corretto controllo su creazione collo in accettazione

aggiunto controllo su stato articoli in servizio getArticoloBybarcode
This commit is contained in:
Valerio Castellana 2022-07-20 16:07:14 +02:00
parent 90cf83e3cd
commit c6fc287a3f
2 changed files with 4 additions and 2 deletions

View File

@ -36,7 +36,9 @@ public class ArticoloRESTConsumer extends _BaseRESTConsumer {
@Override
public void onResponse(Call<ServiceRESTResponse<MtbAart>> call, Response<ServiceRESTResponse<MtbAart>> response) {
analyzeAnswer(response, "getByBarcodeProd", (m) -> {
onComplete.run(response.body().getEntityList());
List<MtbAart> aartList = response.body().getEntityList();
aartList = Stream.of(aartList).filter(x -> x.getFlagStato().equalsIgnoreCase("A")).toList();
onComplete.run(aartList);
}, onFailed);
}

View File

@ -131,7 +131,7 @@ public class InfoAggiuntiveLUDialog extends BaseDialogFragment implements InfoAg
codTcolArrayAdapter = new DialogInputLUProdTipoColloAdapter(getActivity(), R.layout.array_adapter_single_item, tipiCollo);
mBindings.filledExposedDropdownCodTcol.setAdapter(codTcolArrayAdapter);
if (currentMtbTCol != null && !UtilityString.isNullOrEmpty(currentMtbColt.getCodTcol()) && UtilityString.isNullOrEmpty(this.selectedMtbTcol.get())) {
if (currentMtbColt != null && !UtilityString.isNullOrEmpty(currentMtbColt.getCodTcol()) && UtilityString.isNullOrEmpty(this.selectedMtbTcol.get())) {
MtbTCol tipoPedana = Stream.of(tipiCollo).filter(x -> x.getCodTcol().equalsIgnoreCase(currentMtbColt.getCodTcol())).findFirstOrElse(null);
if (tipoPedana != null) {
this.selectedMtbTcol.set(tipoPedana.getCodTcol() + " - " + tipoPedana.getDescrizione());