Compare commits

...

58 Commits

Author SHA1 Message Date
e0c07ea06e Finish v1.16.33(215) 2021-05-07 13:04:50 +02:00
3e79b52e23 -> v1.16.33 (215) 2021-05-07 13:04:44 +02:00
7d7712e57a Ordinamento ordini uscita 2021-05-07 13:03:45 +02:00
6d7a047e8e Finish v1.16.32(214) 2021-05-04 17:34:36 +02:00
72e4f2a0b9 Finish v1.16.32(214) 2021-05-04 17:34:35 +02:00
ef6cdc6a86 -> v1.16.32 (214) 2021-05-04 17:34:30 +02:00
23b86e68cc Fix su scansione barcode ean13 in dialog input quantity 2021-05-04 17:34:00 +02:00
2e46f9f665 Finish v1.16.31(213) 2021-04-26 12:01:38 +02:00
88b1c56360 Finish v1.16.31(213) 2021-04-26 12:01:37 +02:00
1d71ac10bd -> v1.16.31 (213) 2021-04-26 12:01:29 +02:00
8eb677ecdf Sostituito getBySSCC con get generica dei colli. 2021-04-26 12:01:00 +02:00
74efbac452 Finish v1.16.30(212) 2021-04-23 15:25:16 +02:00
9c6375083f Finish v1.16.30(212) 2021-04-23 15:25:16 +02:00
b24d5271a4 -> v1.16.30 (212) 2021-04-23 15:23:54 +02:00
b5626e5b08 Fix su refMtbColr in Spedizione 2021-04-23 15:23:28 +02:00
fd2e1fa4f4 Finish v1.16.29(211) 2021-04-23 12:59:11 +02:00
a3f5072646 Finish v1.16.29(211) 2021-04-23 12:59:10 +02:00
1258e8c3e6 -> v1.16.29 (211) 2021-04-23 12:58:58 +02:00
ccef0fe528 Fix su qtaDaPrelevare in spedizione 2021-04-23 12:58:03 +02:00
9bb5d1adce Finish v1.16.28(210) 2021-04-16 18:33:55 +02:00
ac446d953c Finish v1.16.28(210) 2021-04-16 18:33:53 +02:00
407ff0b264 -> v1.16.28 (210) 2021-04-16 18:33:49 +02:00
10e748b9d4 Fix su getValue nel caso di integer in gest setup 2021-04-16 18:33:16 +02:00
e30273fe42 Finish v1.16.27(209) 2021-04-15 12:10:26 +02:00
44564245a7 Finish v1.16.27(209) 2021-04-15 12:10:25 +02:00
920f306907 -> v1.16.27 (209) 2021-04-15 12:10:20 +02:00
90aa52ab55 Fix versamento merce 2021-04-15 12:09:43 +02:00
93f3eb65f0 Finish v1.16.26(208) 2021-04-14 12:25:51 +02:00
eb94944928 Finish v1.16.26(208) 2021-04-14 12:25:50 +02:00
28698ba306 -> v1.16.26 (208) 2021-04-14 12:25:45 +02:00
c713bbebbc Fix su creazione collo involontaria in DialogScanOrCreateUL 2021-04-14 12:25:09 +02:00
38e2a02766 Finish v1.16.25(207) 2021-04-14 11:41:26 +02:00
dd8bf264a4 Finish v1.16.25(207) 2021-04-14 11:41:25 +02:00
9488c1994d -> v1.16.25 (207) 2021-04-14 11:41:20 +02:00
16099cdaf6 Fix su mtbPartitaMag in servizio spostaArtsTraUL 2021-04-14 11:40:06 +02:00
f061f2bfc9 Finish v1.16.24(206)#2 2021-04-12 15:34:42 +02:00
f7253fd44c Finish v1.16.24(206)#2 2021-04-12 15:34:42 +02:00
e12d371567 Finish v1.16.24(206) 2021-04-12 13:44:17 +02:00
5596f71c03 Merge branch 'master' into develop 2021-04-12 13:44:17 +02:00
8669b812f5 -> v1.16.24 (206) 2021-04-12 13:44:10 +02:00
3243484dd0 Ripristinato stato del filtro nell'elenco di ordini in uscita 2021-04-12 13:43:39 +02:00
37114dc4d1 Finish v1.16.23(205) 2021-04-12 12:48:26 +02:00
d5af79abba Finish v1.16.23(205) 2021-04-12 12:48:25 +02:00
b50aa7a9d2 -> v1.16.23 (205) 2021-04-12 12:48:19 +02:00
cc333c3147 Mini refactoring DialogAskCliente 2021-04-12 12:47:28 +02:00
fc5044134c Finish v1.16.22(204) 2021-04-12 09:39:10 +02:00
93a3e39332 Merge branch 'master' into develop 2021-04-12 09:39:10 +02:00
3eaf187136 -> v1.16.22 (204) 2021-04-12 09:39:03 +02:00
36f9fa1e36 Fix su null in ColliDataRecover 2021-04-12 09:37:45 +02:00
0f89913609 Finish v1.16.21(203) 2021-04-09 16:51:41 +02:00
4cda247ddc Finish v1.16.21(203) 2021-04-09 16:51:41 +02:00
e88ea0a45c -> v1.16.21 (203) 2021-04-09 16:51:36 +02:00
726cf80dc0 Implementata setup per ricalcolo qta 2021-04-09 16:51:02 +02:00
a779d8b94d Finish v1.16.20(202) 2021-04-08 18:18:32 +02:00
f41e1f3a02 Finish v1.16.20(202) 2021-04-08 18:18:31 +02:00
aa75a77913 -> v1.16.20 (202) 2021-04-08 18:18:24 +02:00
639be21ab5 Revert su ricalcolo qta_cnf in caso di peso variabile 2021-04-08 18:17:17 +02:00
dfc241e7f6 Finish v1.16.19(201) 2021-04-06 13:36:15 +02:00
33 changed files with 559 additions and 283 deletions

View File

@@ -1,24 +1,12 @@
<component name="ProjectCodeStyleConfiguration">
<code_scheme name="Project" version="173">
<JetCodeStyleSettings>
<option name="PACKAGES_TO_USE_STAR_IMPORTS">
<value>
<package name="java.util" alias="false" withSubpackages="false" />
<package name="kotlinx.android.synthetic" alias="false" withSubpackages="true" />
<package name="io.ktor" alias="false" withSubpackages="true" />
</value>
</option>
<option name="PACKAGES_IMPORT_LAYOUT">
<value>
<package name="" alias="false" withSubpackages="true" />
<package name="java" alias="false" withSubpackages="true" />
<package name="javax" alias="false" withSubpackages="true" />
<package name="kotlin" alias="false" withSubpackages="true" />
<package name="" alias="true" withSubpackages="true" />
</value>
</option>
<option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
</JetCodeStyleSettings>
<codeStyleSettings language="XML">
<indentOptions>
<option name="CONTINUATION_INDENT_SIZE" value="4" />
</indentOptions>
<arrangement>
<rules>
<section>
@@ -127,5 +115,8 @@
</rules>
</arrangement>
</codeStyleSettings>
<codeStyleSettings language="kotlin">
<option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
</codeStyleSettings>
</code_scheme>
</component>

5
.idea/codeStyles/codeStyleConfig.xml generated Normal file
View File

@@ -0,0 +1,5 @@
<component name="ProjectCodeStyleConfiguration">
<state>
<option name="USE_PER_PROJECT_SETTINGS" value="true" />
</state>
</component>

View File

@@ -3,6 +3,7 @@
<component name="RunConfigurationProducerService">
<option name="ignoredProducers">
<set>
<option value="com.android.tools.idea.compose.preview.runconfiguration.ComposePreviewRunConfigurationProducer" />
<option value="org.jetbrains.plugins.gradle.execution.test.runner.AllInPackageGradleConfigurationProducer" />
<option value="org.jetbrains.plugins.gradle.execution.test.runner.TestClassGradleConfigurationProducer" />
<option value="org.jetbrains.plugins.gradle.execution.test.runner.TestMethodGradleConfigurationProducer" />

View File

@@ -6,8 +6,8 @@ apply plugin: 'com.google.gms.google-services'
android {
def appVersionCode = 201
def appVersionName = '1.16.19'
def appVersionCode = 215
def appVersionName = '1.16.33'
signingConfigs {
release {
@@ -101,7 +101,7 @@ dependencies {
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.google.android.material:material:1.3.0-rc01'
implementation 'com.google.android.material:material:1.3.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0'

View File

@@ -6,7 +6,6 @@ import androidx.appcompat.app.AppCompatActivity;
import com.annimon.stream.Optional;
import com.annimon.stream.Stream;
import com.google.android.gms.common.util.IOUtils;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
@@ -122,7 +121,7 @@ public class ColliDataRecover {
}
public static boolean thereIsAnExistantSession() {
return mtbColtsSessions.size() > 0;
return mtbColtsSessions != null && mtbColtsSessions.size() > 0;
}
public static List<Integer> getAllSessionIDs() {
@@ -193,13 +192,16 @@ public class ColliDataRecover {
try {
inputStream = mContext.openFileInput(CommonConst.Files.RECOVER_COLLO_FILE);
byte[] bytes = IOUtils.readInputStreamFully(inputStream);
byte[] bytes = new byte[inputStream.available()];
inputStream.read(bytes);
inputStream.close();
String jsonString = new String(bytes);
Type listType = new TypeToken<ArrayList<RecoverDTO>>(){}.getType();
mtbColtsSessions = gson.fromJson(jsonString, listType);
inputStream.close();
if(mtbColtsSessions == null) mtbColtsSessions = new ArrayList<>();
} catch (Exception e) {
e.printStackTrace();
UtilityExceptions.defaultException(mContext, e);

View File

@@ -12,19 +12,24 @@ public class BaseFragment extends Fragment {
protected void openProgress() {
if (this.mCurrentProgress == null) {
new Thread(() -> {
getActivity().runOnUiThread(() -> {
this.mCurrentProgress = UtilityProgress.createDefaultProgressDialog(getActivity());
if (this.mCurrentProgress == null) {
this.mCurrentProgress = UtilityProgress.createDefaultProgressDialog(getActivity());
}
});
}
}).start();
}
protected void closeProgress() {
if (mCurrentProgress != null) {
new Thread(() -> {
getActivity().runOnUiThread(() -> {
mCurrentProgress.dismiss();
mCurrentProgress = null;
if (mCurrentProgress != null) {
mCurrentProgress.dismiss();
mCurrentProgress = null;
}
});
}
}).start();
}
}

View File

@@ -11,7 +11,6 @@ import org.jetbrains.annotations.NotNull;
import java.lang.reflect.Type;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
@@ -485,40 +484,31 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
}
public static void getByTestataStatic(MtbColt testata, boolean onlyResiduo, boolean throwExcIfNull, RunnableArgs<MtbColt> onComplete, RunnableArgs<Exception> onFailed) {
String ssccString = null;
testata.setMtbColr(new ObservableArrayList<>());
if (testata.getSerCollo().equalsIgnoreCase(CommonConst.Config.DEFAULT_ANONYMOUS_UL_SERIE)) {
ssccString = "U";
SimpleDateFormat sdf = new SimpleDateFormat("yy");
ssccString += sdf.format(testata.getDataColloD());
ColliMagazzinoRESTConsumerService colliMagazzinoRESTConsumerService = RESTBuilder.getService(ColliMagazzinoRESTConsumerService.class);
colliMagazzinoRESTConsumerService.getColloInGiac(onlyResiduo, throwExcIfNull, testata).enqueue(new Callback<ServiceRESTResponse<MtbColt>>() {
@Override
public void onResponse(Call<ServiceRESTResponse<MtbColt>> call, Response<ServiceRESTResponse<MtbColt>> response) {
analyzeAnswer(response, "getColloInGiac", mtbColt -> {
ssccString += String.format("%07d", testata.getNumCollo());
} else {
ssccString = "";
if (mtbColt != null && mtbColt.getMtbColr() != null && mtbColt.getMtbColr().size() > 0) {
List<MtbColt> mtbColtList = new ArrayList<>();
mtbColtList.add(mtbColt);
fillMtbAartsOfMtbColtsStatic(mtbColtList, mtbColts -> onComplete.run(mtbColts.get(0)), onFailed);
} else {
onComplete.run(mtbColt);
}
switch (testata.getGestioneEnum()) {
case ACQUISTO:
ssccString += "1";
break;
case LAVORAZIONE:
ssccString += "2";
break;
case VENDITA:
ssccString += "3";
break;
}, onFailed);
}
SimpleDateFormat sdf = new SimpleDateFormat("yy");
ssccString += sdf.format(testata.getDataColloD());
ssccString += String.format("%05d", testata.getNumCollo());
ssccString += "0";
}
getBySSCCStatic(ssccString, onlyResiduo, throwExcIfNull, onComplete, onFailed);
@Override
public void onFailure(Call<ServiceRESTResponse<MtbColt>> call, Throwable t) {
onFailed.run(new Exception(t));
}
});
}
@@ -660,9 +650,7 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
).enqueue(new Callback<ServiceRESTResponse<MtbColr>>() {
@Override
public void onResponse(Call<ServiceRESTResponse<MtbColr>> call, Response<ServiceRESTResponse<MtbColr>> response) {
analyzeAnswer(response, "creaRettificaCollo", data -> {
onComplete.run(data);
}, onFailed);
analyzeAnswer(response, "creaRettificaCollo", onComplete, onFailed);
}
@Override
@@ -674,6 +662,7 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
public void spostaArtsTraUL(MtbColt sourceMtbColt, MtbColt destMtbColt, Runnable onComplete, RunnableArgs<Exception> onFailed) {
MtbColt mtbColtToMoveClone = (MtbColt) sourceMtbColt.clone();
MtbColt mtbColtDestClone = (MtbColt) destMtbColt.clone();
for (int i = 0; i < mtbColtToMoveClone.getMtbColr().size(); i++) {
mtbColtToMoveClone.getMtbColr().get(i)
@@ -681,9 +670,11 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
.setMtbPartitaMag(null);
}
mtbColtDestClone.setMtbColr(null);
SpostaArtsTraULRequestDTO spostaArtsTraULRequestDTO = new SpostaArtsTraULRequestDTO()
.setSourceMtbColt(sourceMtbColt)
.setDestinationMtbColt(destMtbColt);
.setSourceMtbColt(mtbColtToMoveClone)
.setDestinationMtbColt(mtbColtDestClone);
ColliMagazzinoRESTConsumerService colliMagazzinoRESTConsumerService = RESTBuilder.getService(ColliMagazzinoRESTConsumerService.class);
colliMagazzinoRESTConsumerService.spostaArtsTraUL(

View File

@@ -24,6 +24,9 @@ public interface ColliMagazzinoRESTConsumerService {
@POST("getColloByBarcode")
Call<ServiceRESTResponse<MtbColt>> getColloByBarcode(@Query("codBarreCollo") String sscc, @Query("onlyResiduo") boolean onlyResiduo, @Query("throwExcIfNull") boolean throwExcIfNull);
@POST("getColloInGiac")
Call<ServiceRESTResponse<MtbColt>> getColloInGiac(@Query("onlyResiduo") boolean onlyResiduo, @Query("throwExcIfNull") boolean throwExcIfNull, @Body MtbColt mtbColt);
@GET("getColliInBasket")
Call<ServiceRESTResponse<List<MtbColt>>> getColliInBasket(@Query("codMdep") String codMdep);

View File

@@ -36,6 +36,7 @@ public class DBSettingsModel {
private boolean flagSpedizioneUseQtaOrd;
private String produzioneDefaultCodAnag;
private String reportNameSpedizionChiudiOrdine;
private int onNumCnfInputChanged = 1;
public boolean isFlagSpedizioneEnableFakeGiacenza() {
return flagSpedizioneEnableFakeGiacenza;
@@ -261,4 +262,13 @@ public class DBSettingsModel {
this.reportNameSpedizionChiudiOrdine = reportNameSpedizionChiudiOrdine;
return this;
}
public int getOnNumCnfInputChanged() {
return onNumCnfInputChanged;
}
public DBSettingsModel setOnNumCnfInputChanged(int onNumCnfInputChanged) {
this.onNumCnfInputChanged = onNumCnfInputChanged;
return this;
}
}

View File

@@ -262,6 +262,10 @@ public class SettingsManager {
.setGestName("PICKING")
.setSection("SPEDIZIONE")
.setKeySection("FLAG_USE_QTA_ORD"));
stbGestSetupList.add(new StbGestSetup()
.setGestName("PICKING")
.setSection("SETUP")
.setKeySection("ON_NUM_CNF_INPUT_CHANGED"));
GestSetupRESTConsumer.getValues(stbGestSetupList, list -> {
@@ -287,6 +291,11 @@ public class SettingsManager {
dbSettingsModelIstance.setReportNameSpedizionChiudiOrdine(getValueFromList(list, "SPEDIZIONE", "REPORT_PACKING_LIST", String.class));
dbSettingsModelIstance.setFlagSpedizioneUseQtaOrd(getValueFromList(list, "SPEDIZIONE", "FLAG_USE_QTA_ORD", Boolean.class));
Integer onNumCnfInputChanged = getValueFromList(list, "SETUP", "ON_NUM_CNF_INPUT_CHANGED", Integer.class);
if(onNumCnfInputChanged != null) {
dbSettingsModelIstance.setOnNumCnfInputChanged(onNumCnfInputChanged);
}
if(onComplete != null) onComplete.run();
}, onFailed);
@@ -303,6 +312,8 @@ public class SettingsManager {
return clazz.cast(value.getValue());
} else if(clazz == Boolean.class) {
return clazz.cast("S".equalsIgnoreCase(value.getValue()));
} else if(clazz == Integer.class && value.getValue() != null) {
return clazz.cast(Integer.parseInt(value.getValue()));
} else return null;
}

View File

@@ -1,11 +1,8 @@
package it.integry.integrywmsnative.core.utility;
import android.app.Dialog;
import android.app.ProgressDialog;
import android.content.Context;
import android.widget.ProgressBar;
import it.integry.integrywmsnative.R;
import it.integry.integrywmsnative.view.dialogs.DialogProgress;
public class UtilityProgress {
@@ -26,27 +23,4 @@ public class UtilityProgress {
return progress;
}
public static Thread makeProgressBarIndeterminate(ProgressBar progressBar) {
progressBar.setMax(100);
Thread updateProgressThread = new Thread(() -> {
try {
while (true) {
for (int i = 0; i < 100; i++) {
progressBar.setProgress(i);
Thread.sleep(10);
}
}
} catch (Exception ex) {
// String message = ex.toString();
}
});
updateProgressThread.start();
return updateProgressThread;
}
}

View File

@@ -125,6 +125,9 @@ public class OrdiniUscitaElencoFragment extends BaseFragment implements ITitledF
this.initRecyclerView();
this.initBarcodeReader();
String codMdep = SettingsManager.i().getUserSession().getDepo().getCodMdep();
mViewModel.init(codMdep, mCurrentGestioneOrd, mCurrentGestioneCol, mCurrentSegnoCol);
return mBindings.getRoot();
}
@@ -132,8 +135,9 @@ public class OrdiniUscitaElencoFragment extends BaseFragment implements ITitledF
public void onStart() {
super.onStart();
String codMdep = SettingsManager.i().getUserSession().getDepo().getCodMdep();
mViewModel.init(codMdep, mCurrentGestioneOrd, mCurrentGestioneCol, mCurrentSegnoCol);
if(mAppliedFilterViewModel != null) {
}
}
@Override
@@ -216,6 +220,7 @@ public class OrdiniUscitaElencoFragment extends BaseFragment implements ITitledF
ComparatorCompat<OrdiniUscitaElencoDTO> comparator = ComparatorCompat
.comparing(OrdiniUscitaElencoDTO::getRagSocOrd)
.thenComparing(ComparatorCompat.comparing(x -> x.getDestinatario() != null ? x.getDestinatario() : "zzzzzzzzz"))
.thenComparing(ComparatorCompat.comparing(OrdiniUscitaElencoDTO::getNumOrd));
List<OrdiniUscitaElencoListModel> notHiddenElements = Stream.of(dataList)

View File

@@ -50,6 +50,7 @@ public class DialogVenditaFiltroAvanzato {
private ArrayAdapter<String> arrayAdapterVettore;
private ArrayAdapter<String> arrayAdapterAgente;
private ArrayAdapter<String> arrayAdapterAutomezzo;
private ArrayAdapter<String> arrayAdapterPaese;
private Predicate<OrdiniUscitaElencoDTO> currentDepositoPredicate = null;
private Predicate<OrdiniUscitaElencoDTO> currentIdViaggioPredicate = null;
@@ -60,6 +61,7 @@ public class DialogVenditaFiltroAvanzato {
private Predicate<OrdiniUscitaElencoDTO> currentVettorePredicate = null;
private Predicate<OrdiniUscitaElencoDTO> currentAgentePredicate = null;
private Predicate<OrdiniUscitaElencoDTO> currentAutomezzoPredicate = null;
private Predicate<OrdiniUscitaElencoDTO> currentPaesePredicate = null;
private boolean firstInit = true;
@@ -126,6 +128,7 @@ public class DialogVenditaFiltroAvanzato {
viewModel.vettore.set(null);
viewModel.automezzo.set(null);
viewModel.agente.set(null);
viewModel.paese.set(null);
}
private void initView(DialogVenditaFiltroAvanzatoBinding bindings, DialogVenditaFiltroAvanzatoViewModel viewModel) {
@@ -193,6 +196,10 @@ public class DialogVenditaFiltroAvanzato {
arrayAdapterAutomezzo.addAll(getAvailableAutomezzi(false));
bindings.filledExposedDropdownAutomezzo.setAdapter(arrayAdapterAutomezzo);
arrayAdapterPaese = new ArrayAdapter(currentContext, R.layout.dialog_vendita_filtro_avanzato__single_item);
arrayAdapterPaese.addAll(getAvailablePaesi(false));
bindings.filledExposedDropdownPaese.setAdapter(arrayAdapterPaese);
viewModel.deposito.refresh();
viewModel.idViaggio.refresh();
@@ -203,6 +210,7 @@ public class DialogVenditaFiltroAvanzato {
viewModel.automezzo.refresh();
viewModel.dataConsegna.refresh();
viewModel.agente.refresh();
viewModel.paese.refresh();
}
@@ -240,6 +248,8 @@ public class DialogVenditaFiltroAvanzato {
arrayAdapterAutomezzo.addAll(getAvailableAutomezzi(true));
arrayAdapterAgente.clear();
arrayAdapterAgente.addAll(getAvailableAgente(true));
arrayAdapterPaese.clear();
arrayAdapterPaese.addAll(getAvailablePaesi(true));
});
BindableString.registerListener(viewModel.deposito, value -> {
@@ -264,6 +274,8 @@ public class DialogVenditaFiltroAvanzato {
arrayAdapterAutomezzo.addAll(getAvailableAutomezzi(true));
arrayAdapterAgente.clear();
arrayAdapterAgente.addAll(getAvailableAgente(true));
arrayAdapterPaese.clear();
arrayAdapterPaese.addAll(getAvailablePaesi(true));
});
BindableString.registerListener(viewModel.numOrds, value -> {
@@ -298,6 +310,8 @@ public class DialogVenditaFiltroAvanzato {
arrayAdapterAutomezzo.addAll(getAvailableAutomezzi(true));
arrayAdapterAgente.clear();
arrayAdapterAgente.addAll(getAvailableAgente(true));
arrayAdapterPaese.clear();
arrayAdapterPaese.addAll(getAvailablePaesi(true));
});
BindableString.registerListener(viewModel.cliente, value -> {
@@ -322,6 +336,8 @@ public class DialogVenditaFiltroAvanzato {
arrayAdapterAutomezzo.addAll(getAvailableAutomezzi(true));
arrayAdapterAgente.clear();
arrayAdapterAgente.addAll(getAvailableAgente(true));
arrayAdapterPaese.clear();
arrayAdapterPaese.addAll(getAvailablePaesi(true));
});
BindableString.registerListener(viewModel.terminiConsegna, value -> {
@@ -346,6 +362,8 @@ public class DialogVenditaFiltroAvanzato {
arrayAdapterAutomezzo.addAll(getAvailableAutomezzi(true));
arrayAdapterAgente.clear();
arrayAdapterAgente.addAll(getAvailableAgente(true));
arrayAdapterPaese.clear();
arrayAdapterPaese.addAll(getAvailablePaesi(true));
});
BindableString.registerListener(viewModel.vettore, value -> {
@@ -370,6 +388,8 @@ public class DialogVenditaFiltroAvanzato {
arrayAdapterAutomezzo.addAll(getAvailableAutomezzi(true));
arrayAdapterAgente.clear();
arrayAdapterAgente.addAll(getAvailableAgente(true));
arrayAdapterPaese.clear();
arrayAdapterPaese.addAll(getAvailablePaesi(true));
});
BindableString.registerListener(viewModel.automezzo, value -> {
@@ -394,6 +414,8 @@ public class DialogVenditaFiltroAvanzato {
arrayAdapterVettore.addAll(getAvailableVettori(true));
arrayAdapterAgente.clear();
arrayAdapterAgente.addAll(getAvailableAgente(true));
arrayAdapterPaese.clear();
arrayAdapterPaese.addAll(getAvailablePaesi(true));
});
BindableString.resetListeners(viewModel.dataConsegna);
@@ -421,6 +443,8 @@ public class DialogVenditaFiltroAvanzato {
arrayAdapterAutomezzo.addAll(getAvailableAutomezzi(true));
arrayAdapterAgente.clear();
arrayAdapterAgente.addAll(getAvailableAgente(true));
arrayAdapterPaese.clear();
arrayAdapterPaese.addAll(getAvailablePaesi(true));
});
BindableString.resetListeners(viewModel.agente);
@@ -446,6 +470,35 @@ public class DialogVenditaFiltroAvanzato {
arrayAdapterVettore.addAll(getAvailableVettori(true));
arrayAdapterAutomezzo.clear();
arrayAdapterAutomezzo.addAll(getAvailableAutomezzi(true));
arrayAdapterPaese.clear();
arrayAdapterPaese.addAll(getAvailablePaesi(true));
});
BindableString.resetListeners(viewModel.paese);
BindableString.registerListener(viewModel.paese, value -> {
if(UtilityString.isNullOrEmpty(value)) currentPaesePredicate = null;
else {
currentPaesePredicate = o -> !UtilityString.isNullOrEmpty(o.getCitta()) && (o.getCitta().toLowerCase().contains(value) || o.getCitta().equalsIgnoreCase(value));
}
refreshList();
arrayAdapterCodMdep.clear();
arrayAdapterCodMdep.addAll(getAvailableCodMdeps(true));
arrayAdapterIdViaggio.clear();
arrayAdapterIdViaggio.addAll(getAvailableIdViaggio(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));
arrayAdapterAutomezzo.clear();
arrayAdapterAutomezzo.addAll(getAvailableAutomezzi(true));
arrayAdapterAgente.clear();
arrayAdapterAgente.addAll(getAvailableAgente(true));
});
}
@@ -453,7 +506,16 @@ public class DialogVenditaFiltroAvanzato {
private List<String> getAvailableIdViaggio(boolean skipRecalc) {
if(currentAgentePredicate == null && currentNumOrdsPredicate == null && currentClientePredicate == null && currentDataConsPredicate == null && currentAutomezzoPredicate == null && currentVettorePredicate == null && currentTermConsPredicate == null && currentDepositoPredicate == null){
if(currentAgentePredicate == null &&
currentNumOrdsPredicate == null &&
currentClientePredicate == null &&
currentDataConsPredicate == null &&
currentAutomezzoPredicate == null &&
currentVettorePredicate == null &&
currentTermConsPredicate == null &&
currentDepositoPredicate == null &&
currentPaesePredicate == null
){
currentFilteredOrderList = currentOrderList;
} else if(!skipRecalc){
Stream<OrdiniUscitaElencoDTO> tmpStream = Stream.of(currentOrderList)
@@ -465,7 +527,8 @@ public class DialogVenditaFiltroAvanzato {
(currentAutomezzoPredicate == null || (currentAutomezzoPredicate.test(x))) &&
(currentTermConsPredicate == null || (currentTermConsPredicate.test(x))) &&
(currentDepositoPredicate == null || (currentDepositoPredicate.test(x))) &&
(currentAgentePredicate == null || (currentAgentePredicate.test(x)))
(currentAgentePredicate == null || (currentAgentePredicate.test(x))) &&
(currentPaesePredicate == null || (currentPaesePredicate.test(x)))
);
currentFilteredOrderList = tmpStream.toList();
@@ -481,7 +544,16 @@ public class DialogVenditaFiltroAvanzato {
}
private List<String> getAvailableAgente(boolean skipRecalc) {
if(currentDepositoPredicate == null && currentIdViaggioPredicate == null && currentNumOrdsPredicate == null && currentClientePredicate == null && currentDataConsPredicate == null && currentAutomezzoPredicate == null && currentVettorePredicate == null && currentTermConsPredicate == null){
if(currentDepositoPredicate == null &&
currentIdViaggioPredicate == null &&
currentNumOrdsPredicate == null &&
currentClientePredicate == null &&
currentDataConsPredicate == null &&
currentAutomezzoPredicate == null &&
currentVettorePredicate == null &&
currentTermConsPredicate == null &&
currentPaesePredicate == null
){
currentFilteredOrderList = currentOrderList;
} else if(!skipRecalc){
Stream<OrdiniUscitaElencoDTO> tmpStream = Stream.of(currentOrderList)
@@ -494,7 +566,8 @@ public class DialogVenditaFiltroAvanzato {
(currentTermConsPredicate == null || (currentTermConsPredicate.test(x))) &&
(currentIdViaggioPredicate == null || (currentIdViaggioPredicate.test(x))) &&
(currentDepositoPredicate == null || (currentDepositoPredicate.test(x))) &&
(currentAgentePredicate == null || (currentAgentePredicate.test(x)))
(currentAgentePredicate == null || (currentAgentePredicate.test(x))) &&
(currentPaesePredicate == null || (currentPaesePredicate.test(x)))
);
currentFilteredOrderList = tmpStream.toList();
@@ -504,7 +577,16 @@ public class DialogVenditaFiltroAvanzato {
}
private List<String> getAvailableCodMdeps(boolean skipRecalc) {
if(currentAgentePredicate == null && currentIdViaggioPredicate == null && currentNumOrdsPredicate == null && currentClientePredicate == null && currentDataConsPredicate == null && currentAutomezzoPredicate == null && currentVettorePredicate == null && currentTermConsPredicate == null){
if(currentAgentePredicate == null &&
currentIdViaggioPredicate == null &&
currentNumOrdsPredicate == null &&
currentClientePredicate == null &&
currentDataConsPredicate == null &&
currentAutomezzoPredicate == null &&
currentVettorePredicate == null &&
currentTermConsPredicate == null &&
currentPaesePredicate == null
){
currentFilteredOrderList = currentOrderList;
} else if(!skipRecalc){
Stream<OrdiniUscitaElencoDTO> tmpStream = Stream.of(currentOrderList)
@@ -516,7 +598,8 @@ public class DialogVenditaFiltroAvanzato {
(currentAutomezzoPredicate == null || (currentAutomezzoPredicate.test(x))) &&
(currentTermConsPredicate == null || (currentTermConsPredicate.test(x))) &&
(currentIdViaggioPredicate == null || (currentIdViaggioPredicate.test(x))) &&
(currentAgentePredicate == null || (currentAgentePredicate.test(x)))
(currentAgentePredicate == null || (currentAgentePredicate.test(x))) &&
(currentPaesePredicate == null || (currentPaesePredicate.test(x)))
);
currentFilteredOrderList = tmpStream.toList();
@@ -526,7 +609,16 @@ public class DialogVenditaFiltroAvanzato {
}
private List<String> getAvailableCliente(boolean skipRecalc) {
if(currentAgentePredicate == null && currentIdViaggioPredicate == null && currentNumOrdsPredicate == null && currentDepositoPredicate == null && currentDataConsPredicate == null && currentAutomezzoPredicate == null && currentVettorePredicate == null && currentTermConsPredicate == null){
if(currentAgentePredicate == null &&
currentIdViaggioPredicate == null &&
currentNumOrdsPredicate == null &&
currentDepositoPredicate == null &&
currentDataConsPredicate == null &&
currentAutomezzoPredicate == null &&
currentVettorePredicate == null &&
currentTermConsPredicate == null &&
currentPaesePredicate == null
){
currentFilteredOrderList = currentOrderList;
} else if(!skipRecalc){
Stream<OrdiniUscitaElencoDTO> tmpStream = Stream.of(currentOrderList)
@@ -538,7 +630,8 @@ public class DialogVenditaFiltroAvanzato {
(currentAutomezzoPredicate == null || (currentAutomezzoPredicate.test(x))) &&
(currentTermConsPredicate == null || (currentTermConsPredicate.test(x))) &&
(currentIdViaggioPredicate == null || (currentIdViaggioPredicate.test(x))) &&
(currentAgentePredicate == null || (currentAgentePredicate.test(x)))
(currentAgentePredicate == null || (currentAgentePredicate.test(x))) &&
(currentPaesePredicate == null || (currentPaesePredicate.test(x)))
);
currentFilteredOrderList = tmpStream.toList();
@@ -548,7 +641,16 @@ public class DialogVenditaFiltroAvanzato {
}
private List<String> getAvailableNumOrds(boolean skipRecalc) {
if(currentAgentePredicate == null && currentIdViaggioPredicate == null && currentDepositoPredicate == null && currentClientePredicate == null && currentDataConsPredicate == null && currentAutomezzoPredicate == null && currentVettorePredicate == null && currentTermConsPredicate == null){
if(currentAgentePredicate == null &&
currentIdViaggioPredicate == null &&
currentDepositoPredicate == null &&
currentClientePredicate == null &&
currentDataConsPredicate == null &&
currentAutomezzoPredicate == null &&
currentVettorePredicate == null &&
currentTermConsPredicate == null &&
currentPaesePredicate == null
){
currentFilteredOrderList = currentOrderList;
} else if(!skipRecalc){
Stream<OrdiniUscitaElencoDTO> tmpStream = Stream.of(currentOrderList)
@@ -560,7 +662,8 @@ public class DialogVenditaFiltroAvanzato {
(currentAutomezzoPredicate == null || (currentAutomezzoPredicate.test(x))) &&
(currentTermConsPredicate == null || (currentTermConsPredicate.test(x))) &&
(currentIdViaggioPredicate == null || (currentIdViaggioPredicate.test(x))) &&
(currentAgentePredicate == null || (currentAgentePredicate.test(x)))
(currentAgentePredicate == null || (currentAgentePredicate.test(x))) &&
(currentPaesePredicate == null || (currentPaesePredicate.test(x)))
);
currentFilteredOrderList = tmpStream.toList();
@@ -570,7 +673,16 @@ public class DialogVenditaFiltroAvanzato {
}
private List<String> getAvailableTermCons(boolean skipRecalc) {
if(currentAgentePredicate == null && currentIdViaggioPredicate == null && currentNumOrdsPredicate == null && currentClientePredicate == null && currentDataConsPredicate == null && currentAutomezzoPredicate == null && currentVettorePredicate == null && currentDepositoPredicate == null){
if(currentAgentePredicate == null &&
currentIdViaggioPredicate == null &&
currentNumOrdsPredicate == null &&
currentClientePredicate == null &&
currentDataConsPredicate == null &&
currentAutomezzoPredicate == null &&
currentVettorePredicate == null &&
currentDepositoPredicate == null &&
currentPaesePredicate == null
){
currentFilteredOrderList = currentOrderList;
} else if(!skipRecalc){
Stream<OrdiniUscitaElencoDTO> tmpStream = Stream.of(currentOrderList)
@@ -582,7 +694,8 @@ public class DialogVenditaFiltroAvanzato {
(currentAutomezzoPredicate == null || (currentAutomezzoPredicate.test(x))) &&
(currentDepositoPredicate == null || (currentDepositoPredicate.test(x))) &&
(currentIdViaggioPredicate == null || (currentIdViaggioPredicate.test(x))) &&
(currentAgentePredicate == null || (currentAgentePredicate.test(x)))
(currentAgentePredicate == null || (currentAgentePredicate.test(x))) &&
(currentPaesePredicate == null || (currentPaesePredicate.test(x)))
);
currentFilteredOrderList = tmpStream.toList();
@@ -592,7 +705,16 @@ public class DialogVenditaFiltroAvanzato {
}
private List<String> getAvailableVettori(boolean skipRecalc) {
if(currentAgentePredicate == null && currentIdViaggioPredicate == null && currentNumOrdsPredicate == null && currentClientePredicate == null && currentDataConsPredicate == null && currentTermConsPredicate == null && currentAutomezzoPredicate == null && currentDepositoPredicate == null){
if(currentAgentePredicate == null &&
currentIdViaggioPredicate == null &&
currentNumOrdsPredicate == null &&
currentClientePredicate == null &&
currentDataConsPredicate == null &&
currentTermConsPredicate == null &&
currentAutomezzoPredicate == null &&
currentDepositoPredicate == null &&
currentPaesePredicate == null
){
currentFilteredOrderList = currentOrderList;
} else if(!skipRecalc){
Stream<OrdiniUscitaElencoDTO> tmpStream = Stream.of(currentOrderList)
@@ -604,7 +726,8 @@ public class DialogVenditaFiltroAvanzato {
(currentAutomezzoPredicate == null || (currentAutomezzoPredicate .test(x))) &&
(currentDepositoPredicate == null || (currentDepositoPredicate.test(x))) &&
(currentIdViaggioPredicate == null || (currentIdViaggioPredicate.test(x))) &&
(currentAgentePredicate == null || (currentAgentePredicate.test(x)))
(currentAgentePredicate == null || (currentAgentePredicate.test(x))) &&
(currentPaesePredicate == null || (currentPaesePredicate.test(x)))
);
currentFilteredOrderList = tmpStream.toList();
@@ -614,7 +737,16 @@ public class DialogVenditaFiltroAvanzato {
}
private List<String> getAvailableAutomezzi(boolean skipRecalc) {
if(currentAgentePredicate == null && currentIdViaggioPredicate == null && currentNumOrdsPredicate == null && currentClientePredicate == null && currentDataConsPredicate == null && currentTermConsPredicate == null && currentVettorePredicate == null && currentDepositoPredicate == null){
if(currentAgentePredicate == null &&
currentIdViaggioPredicate == null &&
currentNumOrdsPredicate == null &&
currentClientePredicate == null &&
currentDataConsPredicate == null &&
currentTermConsPredicate == null &&
currentVettorePredicate == null &&
currentDepositoPredicate == null &&
currentPaesePredicate == null
){
currentFilteredOrderList = currentOrderList;
} else if(!skipRecalc){
Stream<OrdiniUscitaElencoDTO> tmpStream = Stream.of(currentOrderList)
@@ -626,7 +758,8 @@ public class DialogVenditaFiltroAvanzato {
(currentVettorePredicate == null || (currentVettorePredicate.test(x))) &&
(currentDepositoPredicate == null || (currentDepositoPredicate.test(x))) &&
(currentIdViaggioPredicate == null || (currentIdViaggioPredicate.test(x))) &&
(currentAgentePredicate == null || (currentAgentePredicate.test(x)))
(currentAgentePredicate == null || (currentAgentePredicate.test(x))) &&
(currentPaesePredicate == null || (currentPaesePredicate.test(x)))
);
currentFilteredOrderList = tmpStream.toList();
@@ -635,9 +768,51 @@ public class DialogVenditaFiltroAvanzato {
return Stream.of(currentFilteredOrderList).map(OrdiniUscitaElencoDTO::getDescrizioneAuto).distinct().withoutNulls().sorted().toList();
}
private List<String> getAvailablePaesi(boolean skipRecalc) {
if(currentAgentePredicate == null &&
currentIdViaggioPredicate == null &&
currentNumOrdsPredicate == null &&
currentClientePredicate == null &&
currentDataConsPredicate == null &&
currentTermConsPredicate == null &&
currentVettorePredicate == null &&
currentDepositoPredicate == null &&
currentAutomezzoPredicate == null
){
currentFilteredOrderList = currentOrderList;
} else if(!skipRecalc){
Stream<OrdiniUscitaElencoDTO> tmpStream = Stream.of(currentOrderList)
.filter(x ->
(currentNumOrdsPredicate == null || (currentNumOrdsPredicate.test(x))) &&
(currentClientePredicate == null || (currentClientePredicate.test(x))) &&
(currentDataConsPredicate == null || (currentDataConsPredicate.test(x))) &&
(currentTermConsPredicate == null || (currentTermConsPredicate.test(x))) &&
(currentVettorePredicate == null || (currentVettorePredicate.test(x))) &&
(currentDepositoPredicate == null || (currentDepositoPredicate.test(x))) &&
(currentIdViaggioPredicate == null || (currentIdViaggioPredicate.test(x))) &&
(currentAgentePredicate == null || (currentAgentePredicate.test(x))) &&
(currentAutomezzoPredicate == null || (currentAutomezzoPredicate.test(x)))
);
currentFilteredOrderList = tmpStream.toList();
}
return Stream.of(currentFilteredOrderList).map(OrdiniUscitaElencoDTO::getCitta).withoutNulls().distinct().sorted().toList();
}
private void refreshList() {
if(currentAgentePredicate == null && currentIdViaggioPredicate == null && currentNumOrdsPredicate == null && currentClientePredicate == null && currentDataConsPredicate == null && currentTermConsPredicate == null && currentVettorePredicate == null && currentAutomezzoPredicate == null && currentDepositoPredicate == null){
if(currentAgentePredicate == null &&
currentIdViaggioPredicate == null &&
currentNumOrdsPredicate == null &&
currentClientePredicate == null &&
currentDataConsPredicate == null &&
currentTermConsPredicate == null &&
currentVettorePredicate == null &&
currentAutomezzoPredicate == null &&
currentDepositoPredicate == null &&
currentPaesePredicate == null
){
currentFilteredOrderList = currentOrderList;
} else {
Stream<OrdiniUscitaElencoDTO> tmpStream = Stream.of(currentOrderList)
@@ -650,7 +825,8 @@ public class DialogVenditaFiltroAvanzato {
(currentAutomezzoPredicate == null || (currentAutomezzoPredicate.test(x))) &&
(currentDepositoPredicate == null || (currentDepositoPredicate.test(x))) &&
(currentIdViaggioPredicate == null || (currentIdViaggioPredicate.test(x))) &&
(currentAgentePredicate == null || (currentAgentePredicate.test(x)))
(currentAgentePredicate == null || (currentAgentePredicate.test(x))) &&
(currentPaesePredicate == null || (currentPaesePredicate.test(x)))
);
currentFilteredOrderList = tmpStream.toList();

View File

@@ -15,6 +15,7 @@ public class DialogVenditaFiltroAvanzatoViewModel {
public BindableString agente = new BindableString();
public BindableString vettore = new BindableString();
public BindableString automezzo = new BindableString();
public BindableString paese = new BindableString();
public Date dataConsegnaDate;

View File

@@ -53,8 +53,7 @@ import it.integry.integrywmsnative.gest.spedizione.model.PickedQuantityDTO;
import it.integry.integrywmsnative.gest.spedizione.model.PickingObjectDTO;
import it.integry.integrywmsnative.ui.ElevatedToolbar;
import it.integry.integrywmsnative.view.bottom_sheet__mtb_colr_edit.BottomSheetMtbColrEditView;
import it.integry.integrywmsnative.view.dialogs.DialogConsts;
import it.integry.integrywmsnative.view.dialogs.ask_cliente.DialogAskCliente;
import it.integry.integrywmsnative.view.dialogs.ask_cliente.DialogAskClienteView;
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageView;
import it.integry.integrywmsnative.view.dialogs.choose_arts_from_lista_arts.DialogChooseArtsFromListaArts;
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQuantityV2DTO;
@@ -290,13 +289,8 @@ public class PickingLiberoFragment extends BaseFragment implements ITitledFragme
@Override
public void onLUClienteRequired(RunnableArgss<VtbDest, String> onComplete, Runnable onAbort) {
DialogAskCliente.makeBase(getActivity(), (status, result, codJcom) -> {
if (status == DialogConsts.Results.YES) {
onComplete.run(result, codJcom);
} else {
onAbort.run();
}
}).show();
DialogAskClienteView.newInstance(onComplete, onAbort)
.show(getActivity().getSupportFragmentManager(), "tag");
}
@Override
@@ -305,7 +299,7 @@ public class PickingLiberoFragment extends BaseFragment implements ITitledFragme
onAbort.run();
BarcodeManager.enable();
})
.show();
.show();
}
@Override
@@ -368,7 +362,6 @@ public class PickingLiberoFragment extends BaseFragment implements ITitledFragme
}
@Override
public void onMtbColrEdit(MtbColr mtbColr) {
this.mViewModel.dispatchRowEdit(mtbColr);
@@ -382,7 +375,7 @@ public class PickingLiberoFragment extends BaseFragment implements ITitledFragme
@Override
public void onPreDestroy(Runnable onComplete) {
BarcodeManager.removeCallback(barcodeScannerIstanceID);
if(thereIsAnOpenedUL.get()) mViewModel.closeLU(onComplete);
if (thereIsAnOpenedUL.get()) mViewModel.closeLU(onComplete);
else onComplete.run();
}

View File

@@ -179,7 +179,9 @@ public class PickingLiberoViewModel {
public void createNewLU(Integer customNumCollo, String customSerCollo, Runnable onComplete) {
if (this.mFlagAskCliente) {
this.sendOnLoadingEnded();
this.sendLUClienteRequired((vtbDest, codJcom) -> {
this.sendOnLoadingStarted();
createNewLU_PostClienteAsk(customNumCollo, customSerCollo, vtbDest, codJcom, onComplete);
}, onComplete);
} else {

View File

@@ -128,7 +128,7 @@ public class ProdVersamentoMaterialViewModel {
DialogSimpleMessageView
.makeWarningDialog(new SpannableString(Html.fromHtml("Il collo selezionato non presenta articoli versabili sulla linea.")),
null, this::openLU)
.show(((AppCompatActivity) mContext).getSupportFragmentManager(), "tag");
.show(mContext.getSupportFragmentManager(), "tag");
return;
} else if (mtbColt.get().getMtbColr().size() > 1) {
@@ -137,10 +137,11 @@ public class ProdVersamentoMaterialViewModel {
null, () -> {
cyclicGetOrdiniLavByCollo(mtbColt.get().getMtbColr().iterator(), mtbDepoPosizione);
})
.show(((AppCompatActivity) mContext).getSupportFragmentManager(), "tag");
.show(mContext.getSupportFragmentManager(), "tag");
return;
}
MesRESTConsumer.getOrdiniLavorazioneMateriale(
mtbDepoPosizione.getPosizione(),
getIdMaterialeFromCollo(mtbColt.get()),
@@ -148,7 +149,7 @@ public class ProdVersamentoMaterialViewModel {
e -> DialogSimpleMessageView.makeWarningDialog(new SpannableString(Html.fromHtml(e.getMessage())),
null,
this::openLU)
.show(((AppCompatActivity) mContext).getSupportFragmentManager(), "tag"));
.show(mContext.getSupportFragmentManager(), "tag"));
}
} else {
DialogSimpleMessageView

View File

@@ -805,7 +805,7 @@ public class SpedizioneViewModel {
MtbColr refMtbColr = null;
if (scannedMtbColr != null && refMtbColt != null && refMtbColt.getMtbColr().size() > 0) {
if (refMtbColt != null && refMtbColt.getMtbColr().size() > 0) {
Optional<MtbColr> optionalMtbColr = Stream.of(refMtbColt.getMtbColr())
.filter(y -> UtilityString.equalsIgnoreCase(y.getCodMart(), scannedMtbColr.getCodMart()) &&
UtilityString.equalsIgnoreCase(y.getCodTagl(), scannedMtbColr.getCodTagl()) &&
@@ -816,7 +816,7 @@ public class SpedizioneViewModel {
if (optionalMtbColr.isPresent()) refMtbColr = optionalMtbColr.get();
}
MtbColr mtbColrToUse = refMtbColr != null ? refMtbColr : scannedMtbColr;
MtbColr mtbColrToUse = scannedMtbColr != null ? scannedMtbColr : refMtbColr;
if (mtbColrToUse != null) {
if (pickingObjectDTO.getMtbAart().isFlagQtaCnfFissaBoolean()) {

View File

@@ -93,9 +93,9 @@ public class VersamentoMerceViewModel {
}, this::sendError);
} else {
if(!UtilityString.equalsIgnoreCase(mCurrentMtbColt.getValue().getCodMdep(), foundPosizione.getCodMdep())) {
if (!UtilityString.equalsIgnoreCase(mCurrentMtbColt.getValue().getCodMdep(), foundPosizione.getCodMdep())) {
this.sendOnSpostamentoTraDepConfirmRequired(mCurrentMtbColt.getValue().getCodMdep(), foundPosizione.getCodMdep(), canContinue -> {
if(canContinue) {
if (canContinue) {
updatePosizione(foundPosizione, UtilityPosizione.isPosizioneWithLivello(foundPosizione));
} else {
onComplete.run();
@@ -165,7 +165,7 @@ public class VersamentoMerceViewModel {
private void pickMerceULtoUL(MtbColt destMtbColt) {
MtbColt sourceMtbColt = mCurrentMtbColt.getValue();
if(!UtilityString.equalsIgnoreCase(sourceMtbColt.getCodMdep(), destMtbColt.getCodMdep())) {
if (!UtilityString.equalsIgnoreCase(sourceMtbColt.getCodMdep(), destMtbColt.getCodMdep())) {
this.sendError(new Exception("Impossibile spostare la merce tra UL di due depositi differenti"));
return;
}
@@ -174,7 +174,7 @@ public class VersamentoMerceViewModel {
.filter(x -> x.getQtaCol().floatValue() > 0)
.toList();
if(mtbColrsToPick.size() == 0) {
if (mtbColrsToPick.size() == 0) {
this.sendError(new NoArtsInLUException());
return;
}
@@ -191,7 +191,7 @@ public class VersamentoMerceViewModel {
this.sendOnLoadingStarted();
this.mColliMagazzinoRESTConsumer.spostaArtsTraUL(
sourceMtbColt,
clonedSourceTestata,
destMtbColt,
this::sendOnDataSaved,
this::sendError

View File

@@ -4,6 +4,7 @@ import android.content.Context;
import android.text.SpannableString;
import androidx.appcompat.app.AppCompatActivity;
import androidx.fragment.app.FragmentActivity;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -17,7 +18,7 @@ public class DialogCommon {
public static void showNoArtFoundDialog(@NotNull Context context, @Nullable Runnable onPositiveClick) {
DialogSimpleMessageView
.makeWarningDialog(new SpannableString(context.getResources().getText(R.string.no_result_from_barcode)),
null, onPositiveClick)
null, onPositiveClick)
.show(((AppCompatActivity) context).getSupportFragmentManager(), "tag");
}
@@ -31,17 +32,19 @@ public class DialogCommon {
public static void showNoOrderFound(@NotNull Context context, @Nullable Runnable onPositiveClick) {
DialogSimpleMessageView.makeWarningDialog(new SpannableString(context.getResources().getText(R.string.no_orders_found_message)),
null, onPositiveClick)
.show(((AppCompatActivity) context).getSupportFragmentManager(), "tag");;
.show(((AppCompatActivity) context).getSupportFragmentManager(), "tag");
;
}
public static void showDataSaved(@NotNull Context context, @Nullable Runnable onPositiveClick) {
DialogSimpleMessageView.makeSuccessDialog(
context.getResources().getString(R.string.completed),
new SpannableString(context.getResources().getString(R.string.data_saved)),
null, onPositiveClick)
.show(((AppCompatActivity) context).getSupportFragmentManager(), "tag");
public static void showDataSaved(@NotNull FragmentActivity context, @Nullable Runnable onPositiveClick) {
context.runOnUiThread(() -> {
DialogSimpleMessageView.makeSuccessDialog(
context.getResources().getString(R.string.completed),
new SpannableString(context.getResources().getString(R.string.data_saved)),
null, onPositiveClick)
.show(context.getSupportFragmentManager(), "tag");
});
}

View File

@@ -1,109 +0,0 @@
package it.integry.integrywmsnative.view.dialogs.ask_cliente;
import android.app.Dialog;
import android.content.Context;
import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
import android.view.LayoutInflater;
import android.view.WindowManager;
import androidx.databinding.DataBindingUtil;
import java.util.AbstractMap;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import it.integry.integrywmsnative.R;
import it.integry.integrywmsnative.core.expansion.RunnableArgsss;
import it.integry.integrywmsnative.core.model.VtbDest;
import it.integry.integrywmsnative.core.utility.UtilityDialog;
import it.integry.integrywmsnative.core.utility.UtilityString;
import it.integry.integrywmsnative.databinding.DialogAskClienteBinding;
import it.integry.integrywmsnative.view.dialogs.DialogConsts;
import it.integry.integrywmsnative.view.dialogs.ask_cliente.dto.DialogAskClienteDestinatarioDTO;
import it.integry.integrywmsnative.view.dialogs.ask_cliente.viewmodel.DialogAskCliente_Page1ViewModel;
import it.integry.integrywmsnative.view.dialogs.ask_cliente.viewmodel.DialogAskCliente_Page2ViewModel;
public class DialogAskCliente {
private Context mContext;
private Dialog mDialog;
private DialogAskClienteBinding mBinding;
public static Dialog makeBase(final Context context, RunnableArgsss<DialogConsts.Results, VtbDest, String> onComplete) {
return new DialogAskCliente(context, onComplete).mDialog;
}
public DialogAskCliente(Context context, RunnableArgsss<DialogConsts.Results, VtbDest, String> onComplete) {
mContext = context;
LayoutInflater inflater = (LayoutInflater) context.getSystemService( Context.LAYOUT_INFLATER_SERVICE );
mBinding = DataBindingUtil.inflate(inflater, R.layout.dialog_ask_cliente, null, false);
List<Map.Entry<Integer, Class>> views = new ArrayList<>();
views.add(new AbstractMap.SimpleEntry<>(R.layout.dialog_ask_cliente__page1, DialogAskCliente_Page1ViewModel.class));
views.add(new AbstractMap.SimpleEntry<>(R.layout.dialog_ask_cliente__page2, DialogAskCliente_Page2ViewModel.class));
DialogAskClienteAdapter adapter = new DialogAskClienteAdapter(mContext, views);
mBinding.viewpager.setAdapter(adapter);
mBinding.viewpager.beginFakeDrag();
mBinding.viewpager.addOnPageChangeListener(adapter);
mDialog = new Dialog(mContext);
mDialog.setContentView(mBinding.getRoot());
mDialog.setCanceledOnTouchOutside(false);
// mDialog.setCancelable(false);
UtilityDialog.setTo90PercentWidth(mContext, mDialog);
mDialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
mDialog.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
mDialog.setOnShowListener(dialog -> {
DialogAskCliente_Page1ViewModel viewModel1 = (DialogAskCliente_Page1ViewModel) adapter.getViewModel(R.layout.dialog_ask_cliente__page1);
DialogAskCliente_Page2ViewModel viewModel2 = (DialogAskCliente_Page2ViewModel) adapter.getViewModel(R.layout.dialog_ask_cliente__page2);
viewModel1
.setOnConfirmClickListener(() -> {
String codAnag = viewModel1.getCurrentCliente();
if(UtilityString.isNullOrEmpty(codAnag)) {
mDialog.dismiss();
onComplete.run(DialogConsts.Results.YES, null, null);
}
viewModel2.setCodAnag(codAnag);
mBinding.viewpager.setCurrentItem(mBinding.viewpager.getCurrentItem() + 1, true);
});
viewModel1.setOnAbortClickListener(() -> {
mDialog.dismiss();
onComplete.run(DialogConsts.Results.ABORT, null, null);
});
viewModel2.setOnConfirmClickListener(() -> {
DialogAskClienteDestinatarioDTO cliente = viewModel2.getCurrentDestinatario();
onComplete.run(DialogConsts.Results.YES, cliente != null ? cliente.toVtbDestModel() : null, viewModel1.getCurrentCommessa());
mDialog.dismiss();
});
viewModel2.setOnAbortClickListener(() -> {
mDialog.dismiss();
onComplete.run(DialogConsts.Results.ABORT, null, null);
});
});
}
}

View File

@@ -1,7 +1,6 @@
package it.integry.integrywmsnative.view.dialogs.ask_cliente;
import android.content.Context;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@@ -15,13 +14,10 @@ import androidx.viewpager.widget.ViewPager;
import java.util.AbstractMap;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import it.integry.integrywmsnative.BR;
import it.integry.integrywmsnative.R;
import it.integry.integrywmsnative.ui.DeactivatableViewPager;
import it.integry.integrywmsnative.view.dialogs.ask_cliente.viewmodel.IDialogAskClienteViewModel;
@@ -58,9 +54,7 @@ public class DialogAskClienteAdapter extends PagerAdapter implements ViewPager.O
viewModel = (IDialogAskClienteViewModel) viewModelClass.newInstance();
viewModel.setBinding(mBinding);
viewModel.setContext(mContext);
} catch (IllegalAccessException e) {
e.printStackTrace();
} catch (InstantiationException e) {
} catch (IllegalAccessException | InstantiationException e) {
e.printStackTrace();
}

View File

@@ -0,0 +1,142 @@
package it.integry.integrywmsnative.view.dialogs.ask_cliente;
import android.content.DialogInterface;
import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.WindowManager;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.databinding.DataBindingUtil;
import androidx.fragment.app.FragmentActivity;
import org.jetbrains.annotations.NotNull;
import java.util.AbstractMap;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import it.integry.integrywmsnative.R;
import it.integry.integrywmsnative.core.expansion.BaseDialogFragment;
import it.integry.integrywmsnative.core.expansion.RunnableArgss;
import it.integry.integrywmsnative.core.model.VtbDest;
import it.integry.integrywmsnative.core.utility.UtilityDialog;
import it.integry.integrywmsnative.core.utility.UtilityString;
import it.integry.integrywmsnative.databinding.DialogAskClienteBinding;
import it.integry.integrywmsnative.view.dialogs.ask_cliente.dto.DialogAskClienteDestinatarioDTO;
import it.integry.integrywmsnative.view.dialogs.ask_cliente.viewmodel.DialogAskCliente_Page1ViewModel;
import it.integry.integrywmsnative.view.dialogs.ask_cliente.viewmodel.DialogAskCliente_Page2ViewModel;
public class DialogAskClienteView extends BaseDialogFragment {
private final RunnableArgss<VtbDest, String> mOnComplete;
private final Runnable mOnAbort;
private DialogAskClienteAdapter mAdapter;
private FragmentActivity mContext;
private DialogAskClienteBinding mBindings;
private boolean mIsClienteSelected = false;
public static DialogAskClienteView newInstance(@NotNull RunnableArgss<VtbDest, String> onComplete, @NotNull Runnable onAbort) {
return new DialogAskClienteView( onComplete, onAbort);
}
private DialogAskClienteView(@NotNull RunnableArgss<VtbDest, String> onComplete, @NotNull Runnable onAbort) {
super();
this.mOnComplete = onComplete;
this.mOnAbort = onAbort;
}
@Nullable
@Override
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
this.mContext = getActivity();
mBindings = DataBindingUtil.inflate(inflater, R.layout.dialog_ask_cliente, container, false);
mBindings.setLifecycleOwner(this);
getDialog().setCanceledOnTouchOutside(false);
getDialog().getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
getDialog().getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
List<Map.Entry<Integer, Class>> views = new ArrayList<>();
views.add(new AbstractMap.SimpleEntry<>(R.layout.dialog_ask_cliente__page1, DialogAskCliente_Page1ViewModel.class));
views.add(new AbstractMap.SimpleEntry<>(R.layout.dialog_ask_cliente__page2, DialogAskCliente_Page2ViewModel.class));
mAdapter = new DialogAskClienteAdapter(mContext, views);
mBindings.viewpager.setAdapter(mAdapter);
mBindings.viewpager.beginFakeDrag();
mBindings.viewpager.addOnPageChangeListener(mAdapter);
mBindings.viewpager.setCurrentItem(0, false);
getDialog().setOnShowListener(d -> {
this.initView();
});
return mBindings.getRoot();
}
@Override
public void onStart() {
super.onStart();
UtilityDialog.setTo90PercentWidth(this.mContext, this);
}
@Override
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
}
private void initView() {
DialogAskCliente_Page1ViewModel viewModel1 = (DialogAskCliente_Page1ViewModel) mAdapter.getViewModel(R.layout.dialog_ask_cliente__page1);
DialogAskCliente_Page2ViewModel viewModel2 = (DialogAskCliente_Page2ViewModel) mAdapter.getViewModel(R.layout.dialog_ask_cliente__page2);
viewModel1
.setOnConfirmClickListener(() -> {
String codAnag = viewModel1.getCurrentCliente();
if(UtilityString.isNullOrEmpty(codAnag)) {
this.mIsClienteSelected = true;
dismiss();
mOnComplete.run(null, null);
}
viewModel2.setCodAnag(codAnag);
mBindings.viewpager.setCurrentItem(mBindings.viewpager.getCurrentItem() + 1, true);
});
viewModel2.setOnConfirmClickListener(() -> {
DialogAskClienteDestinatarioDTO cliente = viewModel2.getCurrentDestinatario();
this.mIsClienteSelected = true;
dismiss();
mOnComplete.run(cliente != null ? cliente.toVtbDestModel() : null, viewModel1.getCurrentCommessa());
});
viewModel1.setOnAbortClickListener(this::dismiss);
viewModel2.setOnAbortClickListener(this::dismiss);
}
@Override
public void onDismiss(@NonNull DialogInterface dialog) {
if(!mIsClienteSelected) {
this.mOnAbort.run();
}
super.onDismiss(dialog);
}
}

View File

@@ -38,6 +38,7 @@ import it.integry.integrywmsnative.core.expansion.BaseDialogFragment;
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
import it.integry.integrywmsnative.core.expansion.RunnableArgss;
import it.integry.integrywmsnative.core.model.MtbUntMis;
import it.integry.integrywmsnative.core.settings.SettingsManager;
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
import it.integry.integrywmsnative.core.utility.UtilityObservable;
import it.integry.integrywmsnative.databinding.DialogInputQuantityV2Binding;
@@ -179,8 +180,10 @@ public class DialogInputQuantityV2View extends BaseDialogFragment implements Dia
super.onStart();
this.init();
int onNumCnfInputChanged = SettingsManager.iDB().getOnNumCnfInputChanged();
this.mViewModel.setListener(this);
this.mViewModel.init();
this.mViewModel.init(onNumCnfInputChanged);
}
private void init() {

View File

@@ -26,6 +26,9 @@ import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.exception.Over
public class DialogInputQuantityV2ViewModel {
private final int UPDATE_QTA_CNF = 1;
private final int UPDATE_QTA_TOT = 2;
public ObservableField<MtbAart> mtbAart = new ObservableField<>();
public ObservableField<Boolean> blockedNumCnf = new ObservableField<>();
@@ -60,6 +63,7 @@ public class DialogInputQuantityV2ViewModel {
private boolean canOverflowOrderQuantity;
private boolean canPartitaMagBeChanged;
private int onNumCnfInputChanged;
private Listener mListener;
@@ -70,7 +74,9 @@ public class DialogInputQuantityV2ViewModel {
this.mBarcodeRESTConsumer = barcodeRESTConsumer;
}
public void init() {
public void init(int onNumCnfInputChanged) {
this.onNumCnfInputChanged = onNumCnfInputChanged;
if (this.initialNumCnf != null && this.initialQtaTot != null && this.initialQtaCnf != null) {
this.internalNumCnf = this.initialNumCnf;
this.internalQtaCnf = this.initialQtaCnf;
@@ -179,6 +185,8 @@ public class DialogInputQuantityV2ViewModel {
this.mListener.onError(ex);
onComplete.run();
});
} else {
onComplete.run();
}
}
@@ -304,10 +312,21 @@ public class DialogInputQuantityV2ViewModel {
// return;
}
if (!this.blockedQtaCnf.get() && !this.mtbAart.get().isFlagQtaCnfFissaBoolean() && this.internalQtaTot != null)
this.internalQtaCnf = UtilityBigDecimal.divide(internalQtaTot, newValue);
else if (!this.blockedQtaTot.get() && this.internalQtaCnf != null)
this.internalQtaTot = UtilityBigDecimal.multiply(newValue, this.internalQtaCnf);
switch (onNumCnfInputChanged) {
case UPDATE_QTA_CNF:
if (!this.blockedQtaCnf.get() && !this.mtbAart.get().isFlagQtaCnfFissaBoolean() && this.internalQtaTot != null)
this.internalQtaCnf = UtilityBigDecimal.divide(internalQtaTot, newValue);
else if (!this.blockedQtaTot.get() && this.internalQtaCnf != null)
this.internalQtaTot = UtilityBigDecimal.multiply(newValue, this.internalQtaCnf);
break;
case UPDATE_QTA_TOT:if (!this.blockedQtaTot.get() && this.internalQtaCnf != null)
this.internalQtaTot = UtilityBigDecimal.multiply(newValue, this.internalQtaCnf);
else if (!this.blockedQtaCnf.get() && !this.mtbAart.get().isFlagQtaCnfFissaBoolean() && this.internalQtaTot != null)
this.internalQtaCnf = UtilityBigDecimal.divide(internalQtaTot, newValue);
break;
}
this.mListener.onDataChanged();
}

View File

@@ -46,6 +46,7 @@ public class DialogScanOrCreateLUView extends BaseDialogFragment implements Dial
private boolean mShouldCheckResiduo;
private boolean mShouldCheckIfExistDoc;
private boolean mEnableCreation;
private final BindableBoolean basketEnabled = new BindableBoolean();
private final BindableBoolean creationEnabled = new BindableBoolean();
@@ -71,6 +72,7 @@ public class DialogScanOrCreateLUView extends BaseDialogFragment implements Dial
this.basketEnabled.set(enableBasket);
this.creationEnabled.set(enableCreation);
mEnableCreation = enableCreation;
mOnComplete = onComplete;
}
@@ -95,7 +97,7 @@ public class DialogScanOrCreateLUView extends BaseDialogFragment implements Dial
getDialog().setCanceledOnTouchOutside(false);
getDialog().getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
this.mViewModel.init(mShouldCheckResiduo, mShouldCheckIfExistDoc);
this.mViewModel.init(mShouldCheckResiduo, mShouldCheckIfExistDoc, mEnableCreation);
mBindings.createNewLuButton.setOnClickListener(v -> {
this.mViewModel.createNewLU();

View File

@@ -29,6 +29,7 @@ public class DialogScanOrCreateLUViewModel {
private boolean mShouldCheckResiduo = false;
private boolean mShouldCheckIfExistDoc = true;
private boolean mEnableCreation = false;
private Listener mListener;
@@ -40,9 +41,10 @@ public class DialogScanOrCreateLUViewModel {
}
public void init(boolean checkResiduo, boolean shouldCheckIfExistDoc) {
public void init(boolean checkResiduo, boolean shouldCheckIfExistDoc, boolean enableCreation) {
this.mShouldCheckResiduo = checkResiduo;
this.mShouldCheckIfExistDoc = shouldCheckIfExistDoc;
this.mEnableCreation = enableCreation;
}
public void createNewLU() {
@@ -94,11 +96,14 @@ public class DialogScanOrCreateLUViewModel {
this.mColliMagazzinoRESTConsumer.getBySSCC(barcodeScanDTO.getStringValue(), mShouldCheckResiduo, false, mtbColt -> {
if (mtbColt == null) {
this.mColliMagazzinoRESTConsumer.createColloFromEtichettaAnonima(barcodeScanDTO, GestioneEnum.LAVORAZIONE, createdMtbColt -> {
onComplete.run();
this.sendOnLUOpened(createdMtbColt, true);
}, this::sendError);
if(mEnableCreation) {
this.mColliMagazzinoRESTConsumer.createColloFromEtichettaAnonima(barcodeScanDTO, GestioneEnum.LAVORAZIONE, createdMtbColt -> {
onComplete.run();
this.sendOnLUOpened(createdMtbColt, true);
}, this::sendError);
} else {
this.sendError(new NoLUFoundException());
}
} else {
if (mtbColt.getCodDtip() != null && mShouldCheckIfExistDoc) {
this.sendError(new AlreadyAttachedDocumentToLUException());

View File

@@ -223,8 +223,20 @@
android:textStyle="bold" />
</androidx.appcompat.widget.LinearLayoutCompat>
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:orientation="horizontal">
<androidx.appcompat.widget.AppCompatTextView
style="@style/AppTheme.NewMaterial.Text.Medium"
style="@style/AppTheme.NewMaterial.Text.Small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
@@ -234,7 +246,7 @@
android:textStyle="bold" />
<androidx.appcompat.widget.AppCompatTextView
style="@style/AppTheme.NewMaterial.Text.Medium"
style="@style/AppTheme.NewMaterial.Text.Small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="0dp"
@@ -243,7 +255,7 @@
android:textStyle="bold" />
<androidx.appcompat.widget.AppCompatTextView
style="@style/AppTheme.NewMaterial.Text.Medium"
style="@style/AppTheme.NewMaterial.Text.Small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
@@ -253,7 +265,7 @@
android:textStyle="bold" />
<androidx.appcompat.widget.AppCompatTextView
style="@style/AppTheme.NewMaterial.Text.Medium"
style="@style/AppTheme.NewMaterial.Text.Small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
@@ -262,7 +274,6 @@
android:textColor="@android:color/white"
android:textStyle="bold" />
</androidx.appcompat.widget.LinearLayoutCompat>
@@ -312,9 +323,21 @@
android:textColor="@android:color/white"
android:textStyle="bold" />
</androidx.appcompat.widget.LinearLayoutCompat>
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:orientation="horizontal">
<androidx.appcompat.widget.AppCompatTextView
style="@style/AppTheme.NewMaterial.Text.Medium"
style="@style/AppTheme.NewMaterial.Text.Small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
@@ -324,7 +347,7 @@
android:textStyle="bold" />
<androidx.appcompat.widget.AppCompatTextView
style="@style/AppTheme.NewMaterial.Text.Medium"
style="@style/AppTheme.NewMaterial.Text.Small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="0dp"
@@ -333,7 +356,7 @@
android:textStyle="bold" />
<androidx.appcompat.widget.AppCompatTextView
style="@style/AppTheme.NewMaterial.Text.Medium"
style="@style/AppTheme.NewMaterial.Text.Small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
@@ -343,7 +366,7 @@
android:textStyle="bold" />
<androidx.appcompat.widget.AppCompatTextView
style="@style/AppTheme.NewMaterial.Text.Medium"
style="@style/AppTheme.NewMaterial.Text.Small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
@@ -355,7 +378,6 @@
</androidx.appcompat.widget.LinearLayoutCompat>
</androidx.appcompat.widget.LinearLayoutCompat>

View File

@@ -163,12 +163,34 @@
android:singleLine="true"
android:ellipsize="end"
android:imeOptions="actionNext"
android:nextFocusForward="@id/filled_exposed_dropdown_agente"
android:nextFocusForward="@id/filled_exposed_dropdown_paese"
app:binding="@{viewmodel.automezzo}"/>
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/input_paese"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense.ExposedDropdownMenu"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/city"
android:visibility="gone">
<androidx.appcompat.widget.AppCompatAutoCompleteTextView
android:id="@+id/filled_exposed_dropdown_paese"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textNoSuggestions"
android:singleLine="true"
android:ellipsize="end"
android:imeOptions="actionNext"
android:nextFocusForward="@id/filled_exposed_dropdown_agente"
app:binding="@{viewmodel.paese}"/>
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/input_agente"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense.ExposedDropdownMenu"

View File

@@ -210,6 +210,7 @@
<string name="document_date">Data documento</string>
<string name="terms_of_delivery">Termini di consegna</string>
<string name="vehicle">Automezzo</string>
<string name="city">Paese</string>
<string name="deposit">Deposito</string>
<string name="rag_soc">Ragione sociale</string>
<string name="travel_id">ID Viaggio</string>

View File

@@ -213,6 +213,7 @@
<string name="document_date">Document date</string>
<string name="terms_of_delivery">Terms of delivery</string>
<string name="vehicle">Vehicle</string>
<string name="city">City</string>
<string name="deposit">Deposit</string>
<string name="rag_soc">Company name</string>
<string name="travel_id">Travel ID</string>

View File

@@ -10,7 +10,7 @@ buildscript {
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.3'
classpath 'com.android.tools.build:gradle:4.2.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.3.5'
classpath 'com.google.firebase:perf-plugin:1.3.5'

View File

@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip