Finish v_1_4_0(58)
This commit is contained in:
commit
5fee31f594
BIN
.idea/caches/build_file_checksums.ser
generated
BIN
.idea/caches/build_file_checksums.ser
generated
Binary file not shown.
@ -17,8 +17,8 @@ apply plugin: 'com.google.gms.google-services'
|
|||||||
|
|
||||||
android {
|
android {
|
||||||
|
|
||||||
def appVersionCode = 57
|
def appVersionCode = 58
|
||||||
def appVersionName = '1.3.1'
|
def appVersionName = '1.4.0'
|
||||||
|
|
||||||
signingConfigs {
|
signingConfigs {
|
||||||
release {
|
release {
|
||||||
|
|||||||
@ -2,6 +2,7 @@ package it.integry.integrywmsnative.core.di;
|
|||||||
|
|
||||||
import androidx.annotation.ColorRes;
|
import androidx.annotation.ColorRes;
|
||||||
import androidx.annotation.IdRes;
|
import androidx.annotation.IdRes;
|
||||||
|
import androidx.appcompat.widget.AppCompatMultiAutoCompleteTextView;
|
||||||
import androidx.core.content.res.ResourcesCompat;
|
import androidx.core.content.res.ResourcesCompat;
|
||||||
import androidx.databinding.BindingAdapter;
|
import androidx.databinding.BindingAdapter;
|
||||||
import androidx.databinding.BindingConversion;
|
import androidx.databinding.BindingConversion;
|
||||||
@ -14,6 +15,7 @@ import androidx.appcompat.widget.AppCompatTextView;
|
|||||||
import android.content.res.ColorStateList;
|
import android.content.res.ColorStateList;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
import android.widget.AutoCompleteTextView;
|
||||||
import android.widget.CheckBox;
|
import android.widget.CheckBox;
|
||||||
import android.widget.EditText;
|
import android.widget.EditText;
|
||||||
import android.widget.LinearLayout;
|
import android.widget.LinearLayout;
|
||||||
@ -82,6 +84,48 @@ public class Converters {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@BindingAdapter("app:binding")
|
||||||
|
public static void bindAutoCompleteTextView(AutoCompleteTextView view, final BindableString bindableString) {
|
||||||
|
Pair<BindableString, TextWatcherAdapter> pair = (Pair) view.getTag(R.id.bound_observable);
|
||||||
|
if (pair == null || pair.first != bindableString) {
|
||||||
|
if (pair != null) {
|
||||||
|
view.removeTextChangedListener(pair.second);
|
||||||
|
}
|
||||||
|
TextWatcherAdapter watcher = new TextWatcherAdapter() {
|
||||||
|
@Override public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||||
|
bindableString.set(s.toString());
|
||||||
|
}
|
||||||
|
};
|
||||||
|
view.setTag(R.id.bound_observable, new Pair<>(bindableString, watcher));
|
||||||
|
view.addTextChangedListener(watcher);
|
||||||
|
}
|
||||||
|
String newValue = bindableString.get();
|
||||||
|
if (!view.getText().toString().equals(newValue)) {
|
||||||
|
view.setText(newValue);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@BindingAdapter("app:binding")
|
||||||
|
public static void bindAutoCompleteTextView(AppCompatMultiAutoCompleteTextView view, final BindableString bindableString) {
|
||||||
|
Pair<BindableString, TextWatcherAdapter> pair = (Pair) view.getTag(R.id.bound_observable);
|
||||||
|
if (pair == null || pair.first != bindableString) {
|
||||||
|
if (pair != null) {
|
||||||
|
view.removeTextChangedListener(pair.second);
|
||||||
|
}
|
||||||
|
TextWatcherAdapter watcher = new TextWatcherAdapter() {
|
||||||
|
@Override public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||||
|
bindableString.set(s.toString());
|
||||||
|
}
|
||||||
|
};
|
||||||
|
view.setTag(R.id.bound_observable, new Pair<>(bindableString, watcher));
|
||||||
|
view.addTextChangedListener(watcher);
|
||||||
|
}
|
||||||
|
String newValue = bindableString.get();
|
||||||
|
if (!view.getText().toString().equals(newValue)) {
|
||||||
|
view.setText(newValue);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@BindingAdapter("app:binding")
|
@BindingAdapter("app:binding")
|
||||||
public static void bindTextView(AppCompatTextView view, final BindableString bindableString) {
|
public static void bindTextView(AppCompatTextView view, final BindableString bindableString) {
|
||||||
Pair<BindableString, TextWatcherAdapter> pair = (Pair) view.getTag(R.id.bound_observable);
|
Pair<BindableString, TextWatcherAdapter> pair = (Pair) view.getTag(R.id.bound_observable);
|
||||||
|
|||||||
@ -25,21 +25,26 @@ import androidx.databinding.ObservableList;
|
|||||||
import androidx.recyclerview.widget.DividerItemDecoration;
|
import androidx.recyclerview.widget.DividerItemDecoration;
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
import it.integry.integrywmsnative.R;
|
import it.integry.integrywmsnative.R;
|
||||||
|
import it.integry.integrywmsnative.core.REST.consumers.ArticoloRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.REST.consumers.BarcodeRESTConsumer;
|
import it.integry.integrywmsnative.core.REST.consumers.BarcodeRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.REST.consumers.ColliMagazzinoRESTConsumer;
|
import it.integry.integrywmsnative.core.REST.consumers.ColliMagazzinoRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.REST.consumers.ISimpleOperationCallback;
|
import it.integry.integrywmsnative.core.REST.consumers.ISimpleOperationCallback;
|
||||||
|
import it.integry.integrywmsnative.core.REST.model.Ean128Model;
|
||||||
import it.integry.integrywmsnative.core.barcode_reader.BarcodeManager;
|
import it.integry.integrywmsnative.core.barcode_reader.BarcodeManager;
|
||||||
import it.integry.integrywmsnative.core.di.BindableBoolean;
|
import it.integry.integrywmsnative.core.di.BindableBoolean;
|
||||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||||
import it.integry.integrywmsnative.core.interfaces.IRecyclerItemClicked;
|
import it.integry.integrywmsnative.core.interfaces.IRecyclerItemClicked;
|
||||||
import it.integry.integrywmsnative.core.model.CommonModelConsts;
|
import it.integry.integrywmsnative.core.model.CommonModelConsts;
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||||
import it.integry.integrywmsnative.core.model.MtbColr;
|
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||||
import it.integry.integrywmsnative.core.model.VtbDest;
|
import it.integry.integrywmsnative.core.model.VtbDest;
|
||||||
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
||||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityBarcode;
|
import it.integry.integrywmsnative.core.utility.UtilityBarcode;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityLogger;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityNumber;
|
import it.integry.integrywmsnative.core.utility.UtilityNumber;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityProgress;
|
import it.integry.integrywmsnative.core.utility.UtilityProgress;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||||
@ -51,6 +56,7 @@ import it.integry.integrywmsnative.view.dialogs.ask_cliente.DialogAskCliente;
|
|||||||
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageHelper;
|
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageHelper;
|
||||||
import it.integry.integrywmsnative.view.dialogs.choose_arts_from_lista_arts.DialogChooseArtsFromListaArts;
|
import it.integry.integrywmsnative.view.dialogs.choose_arts_from_lista_arts.DialogChooseArtsFromListaArts;
|
||||||
import it.integry.integrywmsnative.view.dialogs.input_quantity.DialogInputQuantity;
|
import it.integry.integrywmsnative.view.dialogs.input_quantity.DialogInputQuantity;
|
||||||
|
import it.integry.integrywmsnative.view.dialogs.input_quantity.QuantityDTO;
|
||||||
import it.integry.plugins.barcode_base_library.model.BarcodeScanDTO;
|
import it.integry.plugins.barcode_base_library.model.BarcodeScanDTO;
|
||||||
|
|
||||||
public class PickingLiberoViewModel implements IRecyclerItemClicked<MtbColr> {
|
public class PickingLiberoViewModel implements IRecyclerItemClicked<MtbColr> {
|
||||||
@ -243,8 +249,9 @@ public class PickingLiberoViewModel implements IRecyclerItemClicked<MtbColr> {
|
|||||||
//Cerco tramite etichetta ean 128 (che può indicarmi una UL)
|
//Cerco tramite etichetta ean 128 (che può indicarmi una UL)
|
||||||
this.executeEtichettaEan128(data, progressDialog);
|
this.executeEtichettaEan128(data, progressDialog);
|
||||||
} else {
|
} else {
|
||||||
progressDialog.dismiss();
|
this.loadArticolo(data.getStringValue(), null, progressDialog);
|
||||||
BarcodeManager.enable();
|
// progressDialog.dismiss();
|
||||||
|
// BarcodeManager.enable();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -312,6 +319,114 @@ public class PickingLiberoViewModel implements IRecyclerItemClicked<MtbColr> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void loadArticolo(String barcodeProd, Ean128Model ean128Model, ProgressDialog progressDialog) {
|
||||||
|
if(barcodeProd.length() == 14) {
|
||||||
|
// barcodeProd = UtilityBarcode.convertITF14toNeutral(barcodeProd);
|
||||||
|
barcodeProd = UtilityBarcode.convertITF14toEAN13(barcodeProd);
|
||||||
|
}
|
||||||
|
|
||||||
|
ArticoloRESTConsumer.getByBarcodeProd(barcodeProd, mtbAartList -> {
|
||||||
|
|
||||||
|
if(mtbAartList != null && mtbAartList.size() > 0) {
|
||||||
|
|
||||||
|
this.dispatchArt(mtbAartList.get(0), ean128Model);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
BarcodeManager.enable();
|
||||||
|
progressDialog.dismiss();
|
||||||
|
|
||||||
|
DialogSimpleMessageHelper.makeWarningDialog(mContext,
|
||||||
|
new SpannableString(mContext.getResources().getText(R.string.no_result_from_barcode)),
|
||||||
|
null, null)
|
||||||
|
.show();
|
||||||
|
}
|
||||||
|
|
||||||
|
}, ex -> {
|
||||||
|
BarcodeManager.enable();
|
||||||
|
UtilityExceptions.defaultException(mContext, ex, progressDialog);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private void dispatchArt(MtbAart mtbAart, Ean128Model ean128Model){
|
||||||
|
DialogInputQuantity.DTO qtaDto = new DialogInputQuantity.DTO();
|
||||||
|
|
||||||
|
qtaDto.setMtbAart(mtbAart);
|
||||||
|
|
||||||
|
qtaDto.setQtaCnf(mtbAart.getQtaCnf());
|
||||||
|
qtaDto.setNumCnf(1);
|
||||||
|
qtaDto.setQtaTot(mtbAart.getQtaCnf());
|
||||||
|
|
||||||
|
qtaDto.setQtaDaEvadere(new BigDecimal(-1));
|
||||||
|
qtaDto.setQtaDisponibile(new BigDecimal(-1));
|
||||||
|
|
||||||
|
qtaDto.setCanPartitaMagBeChanged(true);
|
||||||
|
qtaDto.setCanDataScadBeChanged(true);
|
||||||
|
|
||||||
|
|
||||||
|
if(ean128Model != null){
|
||||||
|
if(!UtilityString.isNullOrEmpty(ean128Model.BatchLot)) {
|
||||||
|
qtaDto.setBatchLot(ean128Model.BatchLot);
|
||||||
|
qtaDto.setCanPartitaMagBeChanged(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
if(!UtilityString.isNullOrEmpty(ean128Model.BestBefore)){
|
||||||
|
qtaDto.setDataScad(UtilityDate.recognizeDate(ean128Model.BestBefore));
|
||||||
|
qtaDto.setCanDataScadBeChanged(false);
|
||||||
|
} else if(!UtilityString.isNullOrEmpty(ean128Model.Expiry)) {
|
||||||
|
qtaDto.setDataScad(UtilityDate.recognizeDate(ean128Model.Expiry));
|
||||||
|
qtaDto.setCanDataScadBeChanged(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
UtilityLogger.errorMe(e);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if(ean128Model.Count != null && ean128Model.Count > 0) {
|
||||||
|
qtaDto.setNumCnf(ean128Model.Count);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ean128Model.NetWeightKg != null && ean128Model.NetWeightKg > 0) {
|
||||||
|
qtaDto.setQtaTot(new BigDecimal(ean128Model.NetWeightKg));
|
||||||
|
} else {
|
||||||
|
qtaDto.setQtaTot(qtaDto.getQtaCnf().multiply(new BigDecimal(qtaDto.getNumCnf())));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
qtaDto.setShouldAskDataScad(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
DialogInputQuantity.makeBase(mContext, qtaDto, true, (quantityDTO) -> {
|
||||||
|
onPostDispatch(mtbAart, quantityDTO);
|
||||||
|
}, null).show();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void onPostDispatch(MtbAart mtbAart, QuantityDTO quantityDTO) {
|
||||||
|
|
||||||
|
final MtbColr mtbColr = new MtbColr()
|
||||||
|
.setCodMart(mtbAart.getCodMart())
|
||||||
|
.setPartitaMag(quantityDTO.batchLot.get())
|
||||||
|
.setDataScadPartita(quantityDTO.expireDate)
|
||||||
|
.setQtaCol(quantityDTO.qtaTot.getBigDecimal())
|
||||||
|
.setDescrizione(mtbAart.getDescrizioneEstesa());
|
||||||
|
|
||||||
|
mtbColr.setOperation(CommonModelConsts.OPERATION.INSERT_OR_UPDATE);
|
||||||
|
|
||||||
|
MtbColt cloneMtbColt = (MtbColt) mtbColt.get().clone();
|
||||||
|
cloneMtbColt.setOperation(CommonModelConsts.OPERATION.NO_OP);
|
||||||
|
|
||||||
|
cloneMtbColt.setMtbColr(new ObservableArrayList());
|
||||||
|
cloneMtbColt.getMtbColr().add(mtbColr);
|
||||||
|
|
||||||
|
saveLU(cloneMtbColt);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private void pickMerceULtoUL(MtbColt sourceMtbColt, MtbColt destMtbColt, ProgressDialog progressDialog) {
|
private void pickMerceULtoUL(MtbColt sourceMtbColt, MtbColt destMtbColt, ProgressDialog progressDialog) {
|
||||||
List<MtbColr> mtbColrsToPick = Stream.of(sourceMtbColt.getMtbColr())
|
List<MtbColr> mtbColrsToPick = Stream.of(sourceMtbColt.getMtbColr())
|
||||||
|
|||||||
@ -10,6 +10,7 @@ import android.view.LayoutInflater;
|
|||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.ArrayAdapter;
|
import android.widget.ArrayAdapter;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
|
import android.widget.MultiAutoCompleteTextView;
|
||||||
|
|
||||||
import com.annimon.stream.Stream;
|
import com.annimon.stream.Stream;
|
||||||
import com.annimon.stream.function.Predicate;
|
import com.annimon.stream.function.Predicate;
|
||||||
@ -40,6 +41,13 @@ public class DialogVenditaFiltroAvanzato {
|
|||||||
private List<OrdineVenditaInevasoDTO> currentOrderList;
|
private List<OrdineVenditaInevasoDTO> currentOrderList;
|
||||||
private List<OrdineVenditaInevasoDTO> currentFilteredOrderList;
|
private List<OrdineVenditaInevasoDTO> currentFilteredOrderList;
|
||||||
|
|
||||||
|
private ArrayAdapter<String> arrayAdapterCodMdep;
|
||||||
|
private ArrayAdapter<String> arrayAdapterNumOrds;
|
||||||
|
private ArrayAdapter<String> arrayAdapterCliente;
|
||||||
|
private ArrayAdapter<String> arrayAdapterTermCons;
|
||||||
|
private ArrayAdapter<String> arrayAdapterVettore;
|
||||||
|
private ArrayAdapter<String> arrayAdapterAutomezzo;
|
||||||
|
|
||||||
private Predicate<OrdineVenditaInevasoDTO> currentDepositoPredicate = null;
|
private Predicate<OrdineVenditaInevasoDTO> currentDepositoPredicate = null;
|
||||||
private Predicate<OrdineVenditaInevasoDTO> currentNumOrdsPredicate = null;
|
private Predicate<OrdineVenditaInevasoDTO> currentNumOrdsPredicate = null;
|
||||||
private Predicate<OrdineVenditaInevasoDTO> currentClientePredicate = null;
|
private Predicate<OrdineVenditaInevasoDTO> currentClientePredicate = null;
|
||||||
@ -79,7 +87,8 @@ public class DialogVenditaFiltroAvanzato {
|
|||||||
.setNeutralButton(context.getText(R.string.reset), null);
|
.setNeutralButton(context.getText(R.string.reset), null);
|
||||||
|
|
||||||
contentView.setViewmodel(viewModel);
|
contentView.setViewmodel(viewModel);
|
||||||
initViewModel(viewModel, contentView);
|
// initViewModel(viewModel, contentView);
|
||||||
|
initViewModelNew(viewModel, contentView);
|
||||||
initView(contentView, viewModel);
|
initView(contentView, viewModel);
|
||||||
|
|
||||||
currentAlert = alertDialog.create();
|
currentAlert = alertDialog.create();
|
||||||
@ -137,69 +146,177 @@ public class DialogVenditaFiltroAvanzato {
|
|||||||
datePickerDialog.show();
|
datePickerDialog.show();
|
||||||
});
|
});
|
||||||
|
|
||||||
bindings.inputCodMdep.setVisibility(filtroOrdiniVendita.shoudShowCodMdepFilter() ? View.VISIBLE : View.GONE);
|
|
||||||
bindings.inputCodMdep.setOnClickListener(view -> {
|
|
||||||
|
|
||||||
AlertDialog.Builder builderSingle = new AlertDialog.Builder(currentContext);
|
arrayAdapterCodMdep = new ArrayAdapter(currentContext, R.layout.dialog_vendita_filtro_avanzato__single_item);
|
||||||
builderSingle.setTitle(R.string.deposit);
|
arrayAdapterCodMdep.addAll(getAvailableCodMdeps(false));
|
||||||
|
bindings.inputCodMdepNew.setVisibility(filtroOrdiniVendita.shoudShowCodMdepFilter() ? View.VISIBLE : View.GONE);
|
||||||
|
bindings.filledExposedDropdownCodMdep.setAdapter(arrayAdapterCodMdep);
|
||||||
|
|
||||||
final ArrayAdapter<String> arrayAdapter = new ArrayAdapter(currentContext, android.R.layout.select_dialog_singlechoice);
|
arrayAdapterNumOrds = new ArrayAdapter(currentContext, R.layout.dialog_vendita_filtro_avanzato__single_item);
|
||||||
arrayAdapter.addAll(getAvailableCodMdeps());
|
arrayAdapterNumOrds.addAll(getAvailableNumOrds(false));
|
||||||
|
bindings.filledExposedDropdownNumOrds.setAdapter(arrayAdapterNumOrds);
|
||||||
|
bindings.filledExposedDropdownNumOrds.setTokenizer(new MultiAutoCompleteTextView.CommaTokenizer());
|
||||||
|
|
||||||
builderSingle.setAdapter(arrayAdapter, (dialogInterface, i) -> {
|
arrayAdapterCliente = new ArrayAdapter(currentContext, R.layout.dialog_vendita_filtro_avanzato__single_item);
|
||||||
viewModel.deposito.set(arrayAdapter.getItem(i));
|
arrayAdapterCliente.addAll(getAvailableCliente(false));
|
||||||
});
|
bindings.filledExposedDropdownCliente.setAdapter(arrayAdapterCliente);
|
||||||
builderSingle.show();
|
|
||||||
|
|
||||||
|
arrayAdapterTermCons = new ArrayAdapter(currentContext, R.layout.dialog_vendita_filtro_avanzato__single_item);
|
||||||
|
arrayAdapterTermCons.addAll(getAvailableTermCons(false));
|
||||||
|
bindings.filledExposedDropdownTermCons.setAdapter(arrayAdapterTermCons);
|
||||||
|
|
||||||
|
arrayAdapterVettore = new ArrayAdapter(currentContext, R.layout.dialog_vendita_filtro_avanzato__single_item);
|
||||||
|
arrayAdapterVettore.addAll(getAvailableVettori(false));
|
||||||
|
bindings.filledExposedDropdownVettore.setAdapter(arrayAdapterVettore);
|
||||||
|
|
||||||
|
arrayAdapterAutomezzo = new ArrayAdapter(currentContext, R.layout.dialog_vendita_filtro_avanzato__single_item);
|
||||||
|
arrayAdapterAutomezzo.addAll(getAvailableAutomezzi(false));
|
||||||
|
bindings.filledExposedDropdownAutomezzo.setAdapter(arrayAdapterAutomezzo);
|
||||||
|
|
||||||
|
|
||||||
|
viewModel.deposito.refresh();
|
||||||
|
viewModel.numOrds.refresh();
|
||||||
|
viewModel.cliente.refresh();
|
||||||
|
viewModel.terminiConsegna.refresh();
|
||||||
|
viewModel.vettore.refresh();
|
||||||
|
viewModel.automezzo.refresh();
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
private void initViewModelNew(DialogVenditaFiltroAvanzatoViewModel viewModel, DialogVenditaFiltroAvanzatoBinding bindings) {
|
||||||
|
BindableString.registerListener(viewModel.deposito, value -> {
|
||||||
|
if(UtilityString.isNullOrEmpty(value)) currentDepositoPredicate = null;
|
||||||
|
else {
|
||||||
|
currentDepositoPredicate = o -> o.getCodMdep().toLowerCase().equalsIgnoreCase(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
refreshList();
|
||||||
|
|
||||||
|
arrayAdapterNumOrds.clear();
|
||||||
|
arrayAdapterNumOrds.addAll(getAvailableNumOrds(true));
|
||||||
|
arrayAdapterCliente.clear();
|
||||||
|
arrayAdapterCliente.addAll(getAvailableCliente(true));
|
||||||
|
arrayAdapterTermCons.clear();
|
||||||
|
arrayAdapterTermCons.addAll(getAvailableTermCons(true));
|
||||||
|
arrayAdapterVettore.clear();
|
||||||
|
arrayAdapterVettore.addAll(getAvailableVettori(true));
|
||||||
|
arrayAdapterAutomezzo.clear();
|
||||||
|
arrayAdapterAutomezzo.addAll(getAvailableAutomezzi(true));
|
||||||
});
|
});
|
||||||
|
|
||||||
bindings.inputTermCons.setOnClickListener(view -> {
|
BindableString.registerListener(viewModel.numOrds, value -> {
|
||||||
|
if(UtilityString.isNullOrEmpty(value)) currentNumOrdsPredicate = null;
|
||||||
|
else {
|
||||||
|
String[] numOrdsSplitted = value.split("[,\\ ]");
|
||||||
|
|
||||||
AlertDialog.Builder builderSingle = new AlertDialog.Builder(currentContext);
|
try{
|
||||||
builderSingle.setTitle(R.string.terms_of_delivery);
|
List<Integer> numOrdsInteger = Stream.of(numOrdsSplitted)
|
||||||
|
.filter(x -> !UtilityString.isNullOrEmpty(x))
|
||||||
|
.map(Integer::parseInt).toList();
|
||||||
|
|
||||||
final ArrayAdapter<String> arrayAdapter = new ArrayAdapter(currentContext, android.R.layout.select_dialog_singlechoice);
|
currentNumOrdsPredicate = o -> numOrdsInteger.contains(o.getNumOrd());
|
||||||
arrayAdapter.addAll(getAvailableTermCons());
|
} catch (NumberFormatException ex) {
|
||||||
|
currentNumOrdsPredicate = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
builderSingle.setAdapter(arrayAdapter, (dialogInterface, i) -> {
|
refreshList();
|
||||||
viewModel.terminiConsegna.set(arrayAdapter.getItem(i));
|
|
||||||
});
|
|
||||||
builderSingle.show();
|
|
||||||
|
|
||||||
|
arrayAdapterCodMdep.clear();
|
||||||
|
arrayAdapterCodMdep.addAll(getAvailableCodMdeps(true));
|
||||||
|
arrayAdapterCliente.clear();
|
||||||
|
arrayAdapterCliente.addAll(getAvailableCliente(true));
|
||||||
|
arrayAdapterTermCons.clear();
|
||||||
|
arrayAdapterTermCons.addAll(getAvailableTermCons(true));
|
||||||
|
arrayAdapterVettore.clear();
|
||||||
|
arrayAdapterVettore.addAll(getAvailableVettori(true));
|
||||||
|
arrayAdapterAutomezzo.clear();
|
||||||
|
arrayAdapterAutomezzo.addAll(getAvailableAutomezzi(true));
|
||||||
});
|
});
|
||||||
|
|
||||||
bindings.inputVettore.setOnClickListener(view -> {
|
BindableString.registerListener(viewModel.cliente, value -> {
|
||||||
|
if(UtilityString.isNullOrEmpty(value)) currentClientePredicate = null;
|
||||||
|
else {
|
||||||
|
currentClientePredicate = o -> o.getRagSocOrd().toLowerCase().contains(value.toLowerCase());
|
||||||
|
}
|
||||||
|
|
||||||
AlertDialog.Builder builderSingle = new AlertDialog.Builder(currentContext);
|
refreshList();
|
||||||
builderSingle.setTitle(R.string.carrier);
|
|
||||||
|
|
||||||
final ArrayAdapter<String> arrayAdapter = new ArrayAdapter(currentContext, android.R.layout.select_dialog_singlechoice);
|
|
||||||
arrayAdapter.addAll(getAvailableVettori());
|
|
||||||
|
|
||||||
builderSingle.setAdapter(arrayAdapter, (dialogInterface, i) -> {
|
|
||||||
viewModel.vettore.set(arrayAdapter.getItem(i));
|
|
||||||
});
|
|
||||||
builderSingle.show();
|
|
||||||
|
|
||||||
|
arrayAdapterCodMdep.clear();
|
||||||
|
arrayAdapterCodMdep.addAll(getAvailableCodMdeps(true));
|
||||||
|
arrayAdapterNumOrds.clear();
|
||||||
|
arrayAdapterNumOrds.addAll(getAvailableNumOrds(true));
|
||||||
|
arrayAdapterTermCons.clear();
|
||||||
|
arrayAdapterTermCons.addAll(getAvailableTermCons(true));
|
||||||
|
arrayAdapterVettore.clear();
|
||||||
|
arrayAdapterVettore.addAll(getAvailableVettori(true));
|
||||||
|
arrayAdapterAutomezzo.clear();
|
||||||
|
arrayAdapterAutomezzo.addAll(getAvailableAutomezzi(true));
|
||||||
});
|
});
|
||||||
|
|
||||||
bindings.inputAutomezzo.setOnClickListener(view -> {
|
BindableString.registerListener(viewModel.terminiConsegna, value -> {
|
||||||
|
if(UtilityString.isNullOrEmpty(value)) currentTermConsPredicate = null;
|
||||||
|
else {
|
||||||
|
currentTermConsPredicate = o -> !UtilityString.isNullOrEmpty(o.getTermCons()) && o.getTermCons().equalsIgnoreCase(value);
|
||||||
|
}
|
||||||
|
|
||||||
AlertDialog.Builder builderSingle = new AlertDialog.Builder(currentContext);
|
refreshList();
|
||||||
builderSingle.setTitle(R.string.vehicle);
|
|
||||||
|
|
||||||
final ArrayAdapter<String> arrayAdapter = new ArrayAdapter(currentContext, android.R.layout.select_dialog_singlechoice);
|
arrayAdapterCodMdep.clear();
|
||||||
arrayAdapter.addAll(getAvailableAutomezzi());
|
arrayAdapterCodMdep.addAll(getAvailableCodMdeps(true));
|
||||||
|
arrayAdapterNumOrds.clear();
|
||||||
|
arrayAdapterNumOrds.addAll(getAvailableNumOrds(true));
|
||||||
|
arrayAdapterCliente.clear();
|
||||||
|
arrayAdapterCliente.addAll(getAvailableCliente(true));
|
||||||
|
arrayAdapterVettore.clear();
|
||||||
|
arrayAdapterVettore.addAll(getAvailableVettori(true));
|
||||||
|
arrayAdapterAutomezzo.clear();
|
||||||
|
arrayAdapterAutomezzo.addAll(getAvailableAutomezzi(true));
|
||||||
|
});
|
||||||
|
|
||||||
builderSingle.setAdapter(arrayAdapter, (dialogInterface, i) -> {
|
BindableString.registerListener(viewModel.vettore, value -> {
|
||||||
viewModel.automezzo.set(arrayAdapter.getItem(i));
|
if(UtilityString.isNullOrEmpty(value)) currentVettorePredicate = null;
|
||||||
});
|
else {
|
||||||
builderSingle.show();
|
currentVettorePredicate = o -> (o.getCodVvet() + " - " + o.getDescrizioneVettore()).equalsIgnoreCase(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
refreshList();
|
||||||
|
|
||||||
|
arrayAdapterCodMdep.clear();
|
||||||
|
arrayAdapterCodMdep.addAll(getAvailableCodMdeps(true));
|
||||||
|
arrayAdapterNumOrds.clear();
|
||||||
|
arrayAdapterNumOrds.addAll(getAvailableNumOrds(true));
|
||||||
|
arrayAdapterCliente.clear();
|
||||||
|
arrayAdapterCliente.addAll(getAvailableCliente(true));
|
||||||
|
arrayAdapterTermCons.clear();
|
||||||
|
arrayAdapterTermCons.addAll(getAvailableTermCons(true));
|
||||||
|
arrayAdapterAutomezzo.clear();
|
||||||
|
arrayAdapterAutomezzo.addAll(getAvailableAutomezzi(true));
|
||||||
|
});
|
||||||
|
|
||||||
|
BindableString.registerListener(viewModel.automezzo, value -> {
|
||||||
|
if(UtilityString.isNullOrEmpty(value)) currentAutomezzoPredicate = null;
|
||||||
|
else {
|
||||||
|
currentAutomezzoPredicate = o -> !UtilityString.isNullOrEmpty(o.getDescrizioneAuto()) && o.getDescrizioneAuto().toLowerCase().contains(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
refreshList();
|
||||||
|
|
||||||
|
arrayAdapterCodMdep.clear();
|
||||||
|
arrayAdapterCodMdep.addAll(getAvailableCodMdeps(true));
|
||||||
|
arrayAdapterNumOrds.clear();
|
||||||
|
arrayAdapterNumOrds.addAll(getAvailableNumOrds(true));
|
||||||
|
arrayAdapterCliente.clear();
|
||||||
|
arrayAdapterCliente.addAll(getAvailableCliente(true));
|
||||||
|
arrayAdapterTermCons.clear();
|
||||||
|
arrayAdapterTermCons.addAll(getAvailableTermCons(true));
|
||||||
|
arrayAdapterVettore.clear();
|
||||||
|
arrayAdapterVettore.addAll(getAvailableVettori(true));
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void initViewModel(DialogVenditaFiltroAvanzatoViewModel viewModel, DialogVenditaFiltroAvanzatoBinding bindings) {
|
private void initViewModel(DialogVenditaFiltroAvanzatoViewModel viewModel, DialogVenditaFiltroAvanzatoBinding bindings) {
|
||||||
|
|
||||||
firstInit = true;
|
firstInit = true;
|
||||||
@ -210,7 +327,6 @@ public class DialogVenditaFiltroAvanzato {
|
|||||||
else {
|
else {
|
||||||
String[] numOrdsSplitted = value.split("[,\\ ]");
|
String[] numOrdsSplitted = value.split("[,\\ ]");
|
||||||
|
|
||||||
|
|
||||||
try{
|
try{
|
||||||
List<Integer> numOrdsInteger = Stream.of(numOrdsSplitted)
|
List<Integer> numOrdsInteger = Stream.of(numOrdsSplitted)
|
||||||
.filter(x -> !UtilityString.isNullOrEmpty(x))
|
.filter(x -> !UtilityString.isNullOrEmpty(x))
|
||||||
@ -316,18 +432,18 @@ public class DialogVenditaFiltroAvanzato {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<String> getAvailableCodMdeps() {
|
private List<String> getAvailableCodMdeps(boolean skipRecalc) {
|
||||||
if(currentNumOrdsPredicate == null && currentClientePredicate == null && currentDataConsPredicate == null && currentAutomezzoPredicate == null && currentVettorePredicate == null && currentTermConsPredicate == null){
|
if(currentNumOrdsPredicate == null && currentClientePredicate == null && currentDataConsPredicate == null && currentAutomezzoPredicate == null && currentVettorePredicate == null && currentTermConsPredicate == null){
|
||||||
currentFilteredOrderList = currentOrderList;
|
currentFilteredOrderList = currentOrderList;
|
||||||
} else {
|
} else if(!skipRecalc){
|
||||||
Stream<OrdineVenditaInevasoDTO> tmpStream = Stream.of(currentOrderList)
|
Stream<OrdineVenditaInevasoDTO> tmpStream = Stream.of(currentOrderList)
|
||||||
.filter(x ->
|
.filter(x ->
|
||||||
(currentNumOrdsPredicate == null || (currentNumOrdsPredicate != null && currentNumOrdsPredicate.test(x))) &&
|
(currentNumOrdsPredicate == null || (currentNumOrdsPredicate != null && currentNumOrdsPredicate.test(x))) &&
|
||||||
(currentClientePredicate == null || (currentClientePredicate != null && currentClientePredicate.test(x))) &&
|
(currentClientePredicate == null || (currentClientePredicate != null && currentClientePredicate.test(x))) &&
|
||||||
(currentDataConsPredicate == null || (currentDataConsPredicate != null && currentDataConsPredicate.test(x))) &&
|
(currentDataConsPredicate == null || (currentDataConsPredicate != null && currentDataConsPredicate.test(x))) &&
|
||||||
(currentVettorePredicate == null || (currentVettorePredicate != null && currentVettorePredicate.test(x))) &&
|
(currentVettorePredicate == null || (currentVettorePredicate != null && currentVettorePredicate.test(x))) &&
|
||||||
(currentAutomezzoPredicate == null || (currentAutomezzoPredicate != null && currentAutomezzoPredicate.test(x))) &&
|
(currentAutomezzoPredicate == null || (currentAutomezzoPredicate != null && currentAutomezzoPredicate.test(x))) &&
|
||||||
(currentTermConsPredicate == null || (currentTermConsPredicate != null && currentTermConsPredicate.test(x)))
|
(currentTermConsPredicate == null || (currentTermConsPredicate != null && currentTermConsPredicate.test(x)))
|
||||||
);
|
);
|
||||||
|
|
||||||
currentFilteredOrderList = tmpStream.toList();
|
currentFilteredOrderList = tmpStream.toList();
|
||||||
@ -336,10 +452,50 @@ public class DialogVenditaFiltroAvanzato {
|
|||||||
return Stream.of(currentFilteredOrderList).map(OrdineVenditaInevasoDTO::getCodMdep).distinct().withoutNulls().toList();
|
return Stream.of(currentFilteredOrderList).map(OrdineVenditaInevasoDTO::getCodMdep).distinct().withoutNulls().toList();
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<String> getAvailableTermCons() {
|
private List<String> getAvailableCliente(boolean skipRecalc) {
|
||||||
|
if(currentNumOrdsPredicate == null && currentDepositoPredicate == null && currentDataConsPredicate == null && currentAutomezzoPredicate == null && currentVettorePredicate == null && currentTermConsPredicate == null){
|
||||||
|
currentFilteredOrderList = currentOrderList;
|
||||||
|
} else if(!skipRecalc){
|
||||||
|
Stream<OrdineVenditaInevasoDTO> tmpStream = Stream.of(currentOrderList)
|
||||||
|
.filter(x ->
|
||||||
|
(currentNumOrdsPredicate == null || (currentNumOrdsPredicate != null && currentNumOrdsPredicate.test(x))) &&
|
||||||
|
(currentDepositoPredicate == null || (currentDepositoPredicate != null && currentDepositoPredicate.test(x))) &&
|
||||||
|
(currentDataConsPredicate == null || (currentDataConsPredicate != null && currentDataConsPredicate.test(x))) &&
|
||||||
|
(currentVettorePredicate == null || (currentVettorePredicate != null && currentVettorePredicate.test(x))) &&
|
||||||
|
(currentAutomezzoPredicate == null || (currentAutomezzoPredicate != null && currentAutomezzoPredicate.test(x))) &&
|
||||||
|
(currentTermConsPredicate == null || (currentTermConsPredicate != null && currentTermConsPredicate.test(x)))
|
||||||
|
);
|
||||||
|
|
||||||
|
currentFilteredOrderList = tmpStream.toList();
|
||||||
|
}
|
||||||
|
|
||||||
|
return Stream.of(currentFilteredOrderList).map(OrdineVenditaInevasoDTO::getRagSocOrd).distinct().withoutNulls().toList();
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<String> getAvailableNumOrds(boolean skipRecalc) {
|
||||||
|
if(currentDepositoPredicate == null && currentClientePredicate == null && currentDataConsPredicate == null && currentAutomezzoPredicate == null && currentVettorePredicate == null && currentTermConsPredicate == null){
|
||||||
|
currentFilteredOrderList = currentOrderList;
|
||||||
|
} else if(!skipRecalc){
|
||||||
|
Stream<OrdineVenditaInevasoDTO> tmpStream = Stream.of(currentOrderList)
|
||||||
|
.filter(x ->
|
||||||
|
(currentDepositoPredicate == null || (currentDepositoPredicate != null && currentDepositoPredicate.test(x))) &&
|
||||||
|
(currentClientePredicate == null || (currentClientePredicate != null && currentClientePredicate.test(x))) &&
|
||||||
|
(currentDataConsPredicate == null || (currentDataConsPredicate != null && currentDataConsPredicate.test(x))) &&
|
||||||
|
(currentVettorePredicate == null || (currentVettorePredicate != null && currentVettorePredicate.test(x))) &&
|
||||||
|
(currentAutomezzoPredicate == null || (currentAutomezzoPredicate != null && currentAutomezzoPredicate.test(x))) &&
|
||||||
|
(currentTermConsPredicate == null || (currentTermConsPredicate != null && currentTermConsPredicate.test(x)))
|
||||||
|
);
|
||||||
|
|
||||||
|
currentFilteredOrderList = tmpStream.toList();
|
||||||
|
}
|
||||||
|
|
||||||
|
return Stream.of(currentFilteredOrderList).map(x -> x.getNumOrd().toString()).distinct().withoutNulls().toList();
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<String> getAvailableTermCons(boolean skipRecalc) {
|
||||||
if(currentNumOrdsPredicate == null && currentClientePredicate == null && currentDataConsPredicate == null && currentAutomezzoPredicate == null && currentVettorePredicate == null && currentDepositoPredicate == null){
|
if(currentNumOrdsPredicate == null && currentClientePredicate == null && currentDataConsPredicate == null && currentAutomezzoPredicate == null && currentVettorePredicate == null && currentDepositoPredicate == null){
|
||||||
currentFilteredOrderList = currentOrderList;
|
currentFilteredOrderList = currentOrderList;
|
||||||
} else {
|
} else if(!skipRecalc){
|
||||||
Stream<OrdineVenditaInevasoDTO> tmpStream = Stream.of(currentOrderList)
|
Stream<OrdineVenditaInevasoDTO> tmpStream = Stream.of(currentOrderList)
|
||||||
.filter(x ->
|
.filter(x ->
|
||||||
(currentNumOrdsPredicate == null || (currentNumOrdsPredicate != null && currentNumOrdsPredicate.test(x))) &&
|
(currentNumOrdsPredicate == null || (currentNumOrdsPredicate != null && currentNumOrdsPredicate.test(x))) &&
|
||||||
@ -356,10 +512,10 @@ public class DialogVenditaFiltroAvanzato {
|
|||||||
return Stream.of(currentFilteredOrderList).map(OrdineVenditaInevasoDTO::getTermCons).distinct().withoutNulls().toList();
|
return Stream.of(currentFilteredOrderList).map(OrdineVenditaInevasoDTO::getTermCons).distinct().withoutNulls().toList();
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<String> getAvailableVettori() {
|
private List<String> getAvailableVettori(boolean skipRecalc) {
|
||||||
if(currentNumOrdsPredicate == null && currentClientePredicate == null && currentDataConsPredicate == null && currentTermConsPredicate == null && currentAutomezzoPredicate == null && currentDepositoPredicate == null){
|
if(currentNumOrdsPredicate == null && currentClientePredicate == null && currentDataConsPredicate == null && currentTermConsPredicate == null && currentAutomezzoPredicate == null && currentDepositoPredicate == null){
|
||||||
currentFilteredOrderList = currentOrderList;
|
currentFilteredOrderList = currentOrderList;
|
||||||
} else {
|
} else if(!skipRecalc){
|
||||||
Stream<OrdineVenditaInevasoDTO> tmpStream = Stream.of(currentOrderList)
|
Stream<OrdineVenditaInevasoDTO> tmpStream = Stream.of(currentOrderList)
|
||||||
.filter(x ->
|
.filter(x ->
|
||||||
(currentNumOrdsPredicate == null || (currentNumOrdsPredicate != null && currentNumOrdsPredicate.test(x))) &&
|
(currentNumOrdsPredicate == null || (currentNumOrdsPredicate != null && currentNumOrdsPredicate.test(x))) &&
|
||||||
@ -376,10 +532,10 @@ public class DialogVenditaFiltroAvanzato {
|
|||||||
return Stream.of(currentFilteredOrderList).filter(x -> x.getCodVvet() != null).map(x -> x.getCodVvet() + " - " + x.getDescrizioneVettore()).distinct().withoutNulls().toList();
|
return Stream.of(currentFilteredOrderList).filter(x -> x.getCodVvet() != null).map(x -> x.getCodVvet() + " - " + x.getDescrizioneVettore()).distinct().withoutNulls().toList();
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<String> getAvailableAutomezzi() {
|
private List<String> getAvailableAutomezzi(boolean skipRecalc) {
|
||||||
if(currentNumOrdsPredicate == null && currentClientePredicate == null && currentDataConsPredicate == null && currentTermConsPredicate == null && currentVettorePredicate == null && currentDepositoPredicate == null){
|
if(currentNumOrdsPredicate == null && currentClientePredicate == null && currentDataConsPredicate == null && currentTermConsPredicate == null && currentVettorePredicate == null && currentDepositoPredicate == null){
|
||||||
currentFilteredOrderList = currentOrderList;
|
currentFilteredOrderList = currentOrderList;
|
||||||
} else {
|
} else if(!skipRecalc){
|
||||||
Stream<OrdineVenditaInevasoDTO> tmpStream = Stream.of(currentOrderList)
|
Stream<OrdineVenditaInevasoDTO> tmpStream = Stream.of(currentOrderList)
|
||||||
.filter(x ->
|
.filter(x ->
|
||||||
(currentNumOrdsPredicate == null || (currentNumOrdsPredicate != null && currentNumOrdsPredicate.test(x))) &&
|
(currentNumOrdsPredicate == null || (currentNumOrdsPredicate != null && currentNumOrdsPredicate.test(x))) &&
|
||||||
|
|||||||
@ -45,7 +45,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:hint="@string/customer">
|
android:hint="@string/customer">
|
||||||
|
|
||||||
<AutoCompleteTextView
|
<androidx.appcompat.widget.AppCompatAutoCompleteTextView
|
||||||
android:id="@+id/filled_exposed_dropdown"
|
android:id="@+id/filled_exposed_dropdown"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
|||||||
@ -45,7 +45,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:hint="@string/recipient">
|
android:hint="@string/recipient">
|
||||||
|
|
||||||
<AutoCompleteTextView
|
<androidx.appcompat.widget.AppCompatAutoCompleteTextView
|
||||||
android:id="@+id/filled_exposed_dropdown"
|
android:id="@+id/filled_exposed_dropdown"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
|||||||
@ -13,7 +13,9 @@
|
|||||||
|
|
||||||
<androidx.cardview.widget.CardView
|
<androidx.cardview.widget.CardView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content"
|
||||||
|
app:cardCornerRadius="12dp"
|
||||||
|
app:cardElevation="0dp">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -21,138 +23,207 @@
|
|||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:layout_margin="16dp">
|
android:layout_margin="16dp">
|
||||||
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
android:layout_width="wrap_content"
|
android:id="@+id/title_text"
|
||||||
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textSize="22sp"
|
style="@style/TextViewMaterial.DialogTitle"
|
||||||
android:text="@string/dialog_vendita_filtro_avanzato"
|
android:text="@string/dialog_vendita_filtro_avanzato"
|
||||||
android:textStyle="bold"
|
android:gravity="center_horizontal"
|
||||||
android:textColor="@android:color/black"
|
|
||||||
android:layout_marginBottom="12dp"/>
|
android:layout_marginBottom="12dp"/>
|
||||||
|
|
||||||
|
|
||||||
<!--<com.google.android.material.textfield.TextInputLayout-->
|
|
||||||
<!--android:layout_width="match_parent"-->
|
|
||||||
<!--android:layout_height="wrap_content"-->
|
|
||||||
<!--app:hintTextAppearance="@style/hint_text">-->
|
|
||||||
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
|
||||||
android:id="@+id/input_cod_mdep"
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:id="@+id/input_cod_mdep_new"
|
||||||
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense.ExposedDropdownMenu"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:inputType="textNoSuggestions"
|
android:hint="@string/deposit">
|
||||||
android:hint="@string/deposit"
|
|
||||||
android:focusable="false"
|
|
||||||
app:binding="@{viewmodel.deposito}"/>
|
|
||||||
|
|
||||||
<!--</com.google.android.material.textfield.TextInputLayout>-->
|
<androidx.appcompat.widget.AppCompatAutoCompleteTextView
|
||||||
|
android:id="@+id/filled_exposed_dropdown_cod_mdep"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:ellipsize="end"
|
||||||
|
app:binding="@{viewmodel.deposito}" />
|
||||||
|
|
||||||
<!--<com.google.android.material.textfield.TextInputLayout-->
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
<!--<com.google.android.material.textfield.TextInputEditText-->
|
||||||
|
<!--android:id="@+id/input_cod_mdep"-->
|
||||||
<!--android:layout_width="match_parent"-->
|
<!--android:layout_width="match_parent"-->
|
||||||
<!--android:layout_height="wrap_content"-->
|
<!--android:layout_height="wrap_content"-->
|
||||||
<!--app:hintTextAppearance="@style/hint_text">-->
|
<!--android:inputType="textNoSuggestions"-->
|
||||||
|
<!--android:hint="@string/deposit"-->
|
||||||
|
<!--android:focusable="false"-->
|
||||||
|
<!--app:binding="@{viewmodel.deposito}"/>-->
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
|
||||||
android:id="@+id/input_num_ords"
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:id="@+id/input_num_ords"
|
||||||
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense.ExposedDropdownMenu"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:hint="@string/num_ords">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatMultiAutoCompleteTextView
|
||||||
|
android:id="@+id/filled_exposed_dropdown_num_ords"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:inputType="number|text"
|
android:inputType="number|text"
|
||||||
android:hint="@string/num_ords"
|
android:singleLine="true"
|
||||||
|
android:ellipsize="end"
|
||||||
app:binding="@{viewmodel.numOrds}"/>
|
app:binding="@{viewmodel.numOrds}"/>
|
||||||
|
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
<!--</com.google.android.material.textfield.TextInputLayout>-->
|
|
||||||
|
|
||||||
|
|
||||||
<!--<com.google.android.material.textfield.TextInputLayout-->
|
<!--<com.google.android.material.textfield.TextInputEditText-->
|
||||||
|
<!--android:id="@+id/input_num_ords"-->
|
||||||
|
<!--android:layout_width="match_parent"-->
|
||||||
|
<!--android:layout_height="wrap_content"-->
|
||||||
|
<!--android:inputType="number|text"-->
|
||||||
|
<!--android:hint="@string/num_ords"-->
|
||||||
|
<!--app:binding="@{viewmodel.numOrds}"/>-->
|
||||||
|
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:id="@+id/input_cliente"
|
||||||
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense.ExposedDropdownMenu"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:hint="@string/customer">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatAutoCompleteTextView
|
||||||
|
android:id="@+id/filled_exposed_dropdown_cliente"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:inputType="textNoSuggestions"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:ellipsize="end"
|
||||||
|
app:binding="@{viewmodel.cliente}"/>
|
||||||
|
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!--<com.google.android.material.textfield.TextInputEditText-->
|
||||||
<!--android:id="@+id/input_cliente"-->
|
<!--android:id="@+id/input_cliente"-->
|
||||||
<!--android:layout_width="match_parent"-->
|
<!--android:layout_width="match_parent"-->
|
||||||
<!--android:layout_height="wrap_content"-->
|
<!--android:layout_height="wrap_content"-->
|
||||||
<!--app:hintTextAppearance="@style/hint_text">-->
|
<!--android:inputType="textNoSuggestions"-->
|
||||||
|
<!--android:hint="@string/customer"-->
|
||||||
|
<!--app:binding="@{viewmodel.cliente}"/>-->
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
|
||||||
android:id="@+id/input_cliente"
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/input_data_cons"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:inputType="textNoSuggestions"
|
||||||
|
android:hint="@string/ship_date"
|
||||||
|
android:focusable="false"
|
||||||
|
app:binding="@{viewmodel.dataConsegna}"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:id="@+id/input_term_cons"
|
||||||
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense.ExposedDropdownMenu"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:hint="@string/terms_of_delivery">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatAutoCompleteTextView
|
||||||
|
android:id="@+id/filled_exposed_dropdown_term_cons"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:inputType="textNoSuggestions"
|
android:inputType="textNoSuggestions"
|
||||||
android:hint="@string/customer"
|
android:singleLine="true"
|
||||||
app:binding="@{viewmodel.cliente}"/>
|
android:ellipsize="end"
|
||||||
|
|
||||||
|
|
||||||
<!--</com.google.android.material.textfield.TextInputLayout>-->
|
|
||||||
|
|
||||||
|
|
||||||
<!--<com.google.android.material.textfield.TextInputLayout-->
|
|
||||||
<!--android:layout_width="match_parent"-->
|
|
||||||
<!--android:layout_height="wrap_content"-->
|
|
||||||
<!--app:hintTextAppearance="@style/hint_text">-->
|
|
||||||
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
|
||||||
android:id="@+id/input_data_cons"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:inputType="textNoSuggestions"
|
|
||||||
android:hint="@string/ship_date"
|
|
||||||
android:focusable="false"
|
|
||||||
app:binding="@{viewmodel.dataConsegna}"/>
|
|
||||||
|
|
||||||
<!--</com.google.android.material.textfield.TextInputLayout>-->
|
|
||||||
|
|
||||||
|
|
||||||
<!--<com.google.android.material.textfield.TextInputLayout-->
|
|
||||||
<!--android:layout_width="match_parent"-->
|
|
||||||
<!--android:layout_height="wrap_content"-->
|
|
||||||
<!--app:hintTextAppearance="@style/hint_text">-->
|
|
||||||
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
|
||||||
android:id="@+id/input_term_cons"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:inputType="textNoSuggestions"
|
|
||||||
android:hint="@string/terms_of_delivery"
|
|
||||||
android:focusable="false"
|
|
||||||
app:binding="@{viewmodel.terminiConsegna}"/>
|
app:binding="@{viewmodel.terminiConsegna}"/>
|
||||||
|
|
||||||
<!--</com.google.android.material.textfield.TextInputLayout>-->
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
|
||||||
<!--<com.google.android.material.textfield.TextInputLayout-->
|
<!--<com.google.android.material.textfield.TextInputEditText-->
|
||||||
|
<!--android:id="@+id/input_term_cons"-->
|
||||||
<!--android:layout_width="match_parent"-->
|
<!--android:layout_width="match_parent"-->
|
||||||
<!--android:layout_height="wrap_content"-->
|
<!--android:layout_height="wrap_content"-->
|
||||||
<!--app:hintTextAppearance="@style/hint_text">-->
|
<!--android:inputType="textNoSuggestions"-->
|
||||||
|
<!--android:hint="@string/terms_of_delivery"-->
|
||||||
|
<!--android:focusable="false"-->
|
||||||
|
<!--app:binding="@{viewmodel.terminiConsegna}"/>-->
|
||||||
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
|
||||||
android:id="@+id/input_vettore"
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:id="@+id/input_vettore"
|
||||||
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense.ExposedDropdownMenu"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:hint="@string/carrier">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatAutoCompleteTextView
|
||||||
|
android:id="@+id/filled_exposed_dropdown_vettore"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:inputType="textNoSuggestions"
|
android:inputType="textNoSuggestions"
|
||||||
android:hint="@string/carrier"
|
android:singleLine="true"
|
||||||
android:focusable="false"
|
android:ellipsize="end"
|
||||||
app:binding="@{viewmodel.vettore}"/>
|
app:binding="@{viewmodel.vettore}"/>
|
||||||
|
|
||||||
<!--</com.google.android.material.textfield.TextInputLayout>-->
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
|
||||||
<!--<com.google.android.material.textfield.TextInputLayout-->
|
|
||||||
|
<!--<com.google.android.material.textfield.TextInputEditText-->
|
||||||
|
<!--android:id="@+id/input_vettore"-->
|
||||||
<!--android:layout_width="match_parent"-->
|
<!--android:layout_width="match_parent"-->
|
||||||
<!--android:layout_height="wrap_content"-->
|
<!--android:layout_height="wrap_content"-->
|
||||||
<!--app:hintTextAppearance="@style/hint_text">-->
|
<!--android:inputType="textNoSuggestions"-->
|
||||||
|
<!--android:hint="@string/carrier"-->
|
||||||
|
<!--android:focusable="false"-->
|
||||||
|
<!--app:binding="@{viewmodel.vettore}"/>-->
|
||||||
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
|
||||||
android:id="@+id/input_automezzo"
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:id="@+id/input_automezzo"
|
||||||
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense.ExposedDropdownMenu"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:hint="@string/vehicle">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatAutoCompleteTextView
|
||||||
|
android:id="@+id/filled_exposed_dropdown_automezzo"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:inputType="textNoSuggestions"
|
android:inputType="textNoSuggestions"
|
||||||
android:hint="@string/vehicle"
|
android:singleLine="true"
|
||||||
android:focusable="false"
|
android:ellipsize="end"
|
||||||
app:binding="@{viewmodel.automezzo}"/>
|
app:binding="@{viewmodel.automezzo}"/>
|
||||||
|
|
||||||
<!--</com.google.android.material.textfield.TextInputLayout>-->
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!--<com.google.android.material.textfield.TextInputEditText-->
|
||||||
|
<!--android:id="@+id/input_automezzo"-->
|
||||||
|
<!--android:layout_width="match_parent"-->
|
||||||
|
<!--android:layout_height="wrap_content"-->
|
||||||
|
<!--android:inputType="textNoSuggestions"-->
|
||||||
|
<!--android:hint="@string/vehicle"-->
|
||||||
|
<!--android:focusable="false"-->
|
||||||
|
<!--app:binding="@{viewmodel.automezzo}"/>-->
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,8 @@
|
|||||||
|
<androidx.appcompat.widget.AppCompatTextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:padding="16dp"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:textAppearance="?attr/textAppearanceSubtitle1"
|
||||||
|
style="@style/AppTheme.NewMaterial.Text"/>
|
||||||
@ -117,7 +117,7 @@
|
|||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintEnd_toStartOf="@id/guide_line_fornitore">
|
app:layout_constraintEnd_toStartOf="@id/guide_line_fornitore">
|
||||||
|
|
||||||
<AutoCompleteTextView
|
<androidx.appcompat.widget.AppCompatAutoCompleteTextView
|
||||||
android:id="@+id/auto_complete_fornitori"
|
android:id="@+id/auto_complete_fornitori"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user