Merge branch 'feature/RefactoringGestioneColli' into master-beta
This commit is contained in:
@@ -123,14 +123,12 @@ dependencies {
|
||||
runtimeOnly 'io.jsonwebtoken:jjwt-impl:0.11.5'
|
||||
runtimeOnly 'io.jsonwebtoken:jjwt-jackson:0.11.5'
|
||||
|
||||
implementation 'com.google.guava:guava:33.4.0-android'
|
||||
|
||||
implementation 'androidx.appcompat:appcompat:1.7.0'
|
||||
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
||||
implementation 'com.google.android.material:material:1.12.0'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.2.1'
|
||||
implementation 'androidx.cardview:cardview:1.0.0'
|
||||
implementation 'androidx.recyclerview:recyclerview:1.4.0'
|
||||
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
|
||||
|
||||
implementation('androidx.preference:preference-ktx:1.2.1') {
|
||||
exclude group: 'androidx.lifecycle', module: 'lifecycle-viewmodel'
|
||||
@@ -138,9 +136,8 @@ dependencies {
|
||||
}
|
||||
|
||||
implementation "androidx.slidingpanelayout:slidingpanelayout:1.2.0"
|
||||
implementation 'com.squareup.okhttp3:okhttp:4.10.0'
|
||||
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
|
||||
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
|
||||
implementation 'com.squareup.retrofit2:retrofit:2.11.0'
|
||||
implementation 'com.squareup.retrofit2:converter-gson:2.11.0'
|
||||
implementation 'com.annimon:stream:1.2.2'
|
||||
implementation 'androidx.lifecycle:lifecycle-runtime:2.9.0'
|
||||
implementation 'org.apache.commons:commons-text:1.9'
|
||||
@@ -177,11 +174,7 @@ dependencies {
|
||||
|
||||
|
||||
implementation 'com.github.RaviKoradiya:LiveAdapter:1.3.4'
|
||||
|
||||
// Required -- JUnit 4 framework
|
||||
// testImplementation "org.junit.jupiter:junit-jupiter-api:5.8.1"
|
||||
// androidTestImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.1'
|
||||
// androidTestImplementation 'org.testng:testng:7.4.0'
|
||||
// implementation 'com.mikepenz:fastadapter:5.5.0' // LiveAdapter è parte di FastAdapter
|
||||
|
||||
|
||||
//Bluetooth device manager
|
||||
@@ -191,7 +184,7 @@ dependencies {
|
||||
implementation 'io.reactivex.rxjava2:rxjava:2.1.12'
|
||||
implementation 'io.reactivex.rxjava2:rxandroid:2.0.2'
|
||||
|
||||
implementation 'org.greenrobot:eventbus:3.3.1'
|
||||
// implementation 'org.greenrobot:eventbus:3.3.1'
|
||||
|
||||
//Barcode generator
|
||||
// implementation group: 'com.google.zxing', name: 'core', version: '3.5.3'
|
||||
|
||||
@@ -55,7 +55,7 @@ public class AuthInterceptor implements Interceptor {
|
||||
.protocol(Protocol.HTTP_1_1)
|
||||
.code(401)
|
||||
.message("Unauthorized")
|
||||
.body(ResponseBody.create(new byte[0], null))
|
||||
.body(ResponseBody.create(okhttp3.MediaType.get("application/json"), new byte[0]))
|
||||
.build();
|
||||
} catch (Exception e) {
|
||||
return chain.proceed(originalRequest);
|
||||
|
||||
@@ -6,7 +6,7 @@ import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||
public class UntMisUtils {
|
||||
|
||||
public static boolean shouldBeShowInColli(MtbAart mtbAart) {
|
||||
return SettingsManager.iDB().isFlagForceAllToColli() || (mtbAart == null || !mtbAart.isFlagQtaCnfFissaBoolean());
|
||||
return SettingsManager.iDB().isFlagForceAllToColli() || mtbAart == null || !mtbAart.isFlagQtaCnfFissaBoolean();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -48,6 +48,7 @@ import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
||||
import it.integry.integrywmsnative.core.report.ReportManager;
|
||||
import it.integry.integrywmsnative.core.rest.model.VersamentoAutomaticoULResponseDTO;
|
||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||
import it.integry.integrywmsnative.core.utility.UntMisUtils;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityBigDecimal;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
||||
@@ -394,7 +395,7 @@ public class AccettazioneBollaPickingActivity extends BaseActivity implements Ac
|
||||
}
|
||||
|
||||
|
||||
if (SettingsManager.iDB().isFlagForceAllToColli() || (x.getMtbAart() == null || !x.getMtbAart().isFlagQtaCnfFissaBoolean())) {
|
||||
if (UntMisUtils.shouldBeShowInColli(x.getMtbAart())) {
|
||||
accettazioneBollaPickingListModel.setQtaEvasa(numCnfEvasa);
|
||||
accettazioneBollaPickingListModel.setQtaTot(x.getSitBollaAccettazione().getNumCnfDaAccettare());
|
||||
accettazioneBollaPickingListModel.setUntMis(UtilityResources.getString(R.string.unt_mis_col));
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package it.integry.integrywmsnative.gest.prod_recupero_materiale;
|
||||
|
||||
import java.util.concurrent.ExecutorService;
|
||||
|
||||
import dagger.Module;
|
||||
import dagger.Provides;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.ArticoloRESTConsumer;
|
||||
@@ -21,8 +23,9 @@ public class ProdRecuperoMaterialeModule {
|
||||
ProdRecuperoMaterialeViewModel providesProdRecuperoMaterialeViewModel(ProdRecuperoMaterialeRESTConsumer prodRecuperoMaterialeRESTConsumer,
|
||||
ColliMagazzinoRESTConsumer colliMagazzinoRESTConsumer,
|
||||
PrinterRESTConsumer printerRESTConsumer,
|
||||
MaterialiRESTConsumer materialiRESTConsumer) {
|
||||
return new ProdRecuperoMaterialeViewModel(prodRecuperoMaterialeRESTConsumer, colliMagazzinoRESTConsumer, printerRESTConsumer, materialiRESTConsumer);
|
||||
MaterialiRESTConsumer materialiRESTConsumer,
|
||||
ExecutorService executorService) {
|
||||
return new ProdRecuperoMaterialeViewModel(prodRecuperoMaterialeRESTConsumer, colliMagazzinoRESTConsumer, printerRESTConsumer, materialiRESTConsumer, executorService);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import androidx.lifecycle.MutableLiveData;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import javax.inject.Inject;
|
||||
@@ -32,6 +33,7 @@ public class ProdRecuperoMaterialeViewModel {
|
||||
private final ColliMagazzinoRESTConsumer mColliMagazzinoRESTConsumer;
|
||||
private final PrinterRESTConsumer mPrinterRESTConsumer;
|
||||
private final MaterialiRESTConsumer mMaterialiRESTConsumer;
|
||||
private final ExecutorService mExecutorService;
|
||||
|
||||
private final MutableLiveData<List<HistoryVersamentoProdULDTO>> mUlList = new MutableLiveData<>();
|
||||
|
||||
@@ -42,21 +44,28 @@ public class ProdRecuperoMaterialeViewModel {
|
||||
public ProdRecuperoMaterialeViewModel(ProdRecuperoMaterialeRESTConsumer prodRecuperoMaterialeRESTConsumer,
|
||||
ColliMagazzinoRESTConsumer colliMagazzinoRESTConsumer,
|
||||
PrinterRESTConsumer printerRESTConsumer,
|
||||
MaterialiRESTConsumer materialiRESTConsumer) {
|
||||
MaterialiRESTConsumer materialiRESTConsumer,
|
||||
ExecutorService executorService) {
|
||||
this.mProdRecuperoMaterialeRESTConsumer = prodRecuperoMaterialeRESTConsumer;
|
||||
this.mColliMagazzinoRESTConsumer = colliMagazzinoRESTConsumer;
|
||||
this.mPrinterRESTConsumer = printerRESTConsumer;
|
||||
this.mMaterialiRESTConsumer = materialiRESTConsumer;
|
||||
this.mExecutorService = executorService;
|
||||
}
|
||||
|
||||
public void init(String codJfas) {
|
||||
this.sendOnLoadingStarted();
|
||||
|
||||
mProdRecuperoMaterialeRESTConsumer.loadLastULVersate(codJfas, ulList -> {
|
||||
this.mUlList.setValue(ulList);
|
||||
this.mExecutorService.execute(() -> {
|
||||
try {
|
||||
List<HistoryVersamentoProdULDTO> lastUlVersate = mProdRecuperoMaterialeRESTConsumer.loadLastULVersateSynchronized(codJfas);
|
||||
this.mUlList.postValue(lastUlVersate);
|
||||
this.sendOnLoadingEnded();
|
||||
} catch (Exception e) {
|
||||
this.sendError(e);
|
||||
}
|
||||
});
|
||||
|
||||
this.sendOnLoadingEnded();
|
||||
}, this::sendError);
|
||||
}
|
||||
|
||||
public void processBarcodeDTO(BarcodeScanDTO data) {
|
||||
@@ -164,7 +173,7 @@ public class ProdRecuperoMaterialeViewModel {
|
||||
.setNumColloRif(item.getNumColloRif())
|
||||
.setOrdini(ordiniRequest);
|
||||
|
||||
if(mtbColt != null) {
|
||||
if (mtbColt != null) {
|
||||
request.setMtbColtCarico(mtbColt);
|
||||
} else {
|
||||
request.setMtbColtCarico(sourceMtbColt);
|
||||
|
||||
@@ -12,7 +12,6 @@ import java.util.stream.Collectors;
|
||||
|
||||
import javax.inject.Singleton;
|
||||
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.ArticoloRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.SystemRESTConsumer;
|
||||
@@ -35,11 +34,11 @@ public class ProdRecuperoMaterialeRESTConsumer extends _BaseRESTConsumer {
|
||||
}
|
||||
|
||||
|
||||
public void loadLastULVersate(RunnableArgs<List<HistoryVersamentoProdULDTO>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||
loadLastULVersate(null, onComplete, onFailed);
|
||||
public List<HistoryVersamentoProdULDTO> loadLastULVersateSynchronized() throws Exception {
|
||||
return loadLastULVersateSynchronized(null);
|
||||
}
|
||||
|
||||
public void loadLastULVersate(String codJfas, RunnableArgs<List<HistoryVersamentoProdULDTO>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||
public List<HistoryVersamentoProdULDTO> loadLastULVersateSynchronized(String codJfas) throws Exception {
|
||||
|
||||
String sql = "WITH ul_list AS ( " +
|
||||
" SELECT jtb_fasi.cod_jfas, " +
|
||||
@@ -191,119 +190,108 @@ public class ProdRecuperoMaterialeRESTConsumer extends _BaseRESTConsumer {
|
||||
|
||||
Type typeOfObjectsList = new TypeToken<ArrayList<HistoryVersamentoProdULRestDTO>>() {
|
||||
}.getType();
|
||||
this.mSystemRESTConsumer.<ArrayList<HistoryVersamentoProdULRestDTO>>processSql(sql, typeOfObjectsList, ulList -> {
|
||||
var ulList = this.mSystemRESTConsumer.<ArrayList<HistoryVersamentoProdULRestDTO>>processSqlSynchronized(sql, typeOfObjectsList);
|
||||
|
||||
if (ulList == null) {
|
||||
onComplete.run(null);
|
||||
return;
|
||||
}
|
||||
if (ulList == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
List<HistoryVersamentoProdULDTO> newUlList = new ArrayList<>();
|
||||
List<HistoryVersamentoProdULDTO> newUlList = new ArrayList<>();
|
||||
|
||||
Stream.of(ulList)
|
||||
.distinctBy(x -> {
|
||||
HashMap<String, Object> hashMap = new HashMap<>();
|
||||
hashMap.put("gestione", x.getGestione());
|
||||
hashMap.put("data_collo", x.getDataCollo());
|
||||
hashMap.put("ser_collo", x.getSerCollo());
|
||||
hashMap.put("num_collo", x.getNumCollo());
|
||||
hashMap.put("cod_mart", x.getCodMart());
|
||||
hashMap.put("gestione_rif", x.getGestioneRif());
|
||||
hashMap.put("data_collo_rif", x.getDataColloRif());
|
||||
hashMap.put("ser_collo_rif", x.getSerColloRif());
|
||||
hashMap.put("num_collo_rif", x.getNumColloRif());
|
||||
Stream.of(ulList)
|
||||
.distinctBy(x -> {
|
||||
HashMap<String, Object> hashMap = new HashMap<>();
|
||||
hashMap.put("gestione", x.getGestione());
|
||||
hashMap.put("data_collo", x.getDataCollo());
|
||||
hashMap.put("ser_collo", x.getSerCollo());
|
||||
hashMap.put("num_collo", x.getNumCollo());
|
||||
hashMap.put("cod_mart", x.getCodMart());
|
||||
hashMap.put("gestione_rif", x.getGestioneRif());
|
||||
hashMap.put("data_collo_rif", x.getDataColloRif());
|
||||
hashMap.put("ser_collo_rif", x.getSerColloRif());
|
||||
hashMap.put("num_collo_rif", x.getNumColloRif());
|
||||
|
||||
return hashMap;
|
||||
})
|
||||
.forEach(restDTO -> {
|
||||
return hashMap;
|
||||
})
|
||||
.forEach(restDTO -> {
|
||||
|
||||
List<HistoryVersamentoProdULDTO.OrdineDto> ordineList = ulList.stream()
|
||||
.filter(x -> x.getNumCollo().equals(restDTO.getNumCollo()) &&
|
||||
x.getDataCollo().equals(restDTO.getDataCollo()) &&
|
||||
x.getSerCollo().equals(restDTO.getSerCollo()) &&
|
||||
x.getGestione().equals(restDTO.getGestione()) &&
|
||||
(x.getRigaOrd() == null || Objects.equals(x.getRigaOrd(), restDTO.getRigaOrd())))
|
||||
.map(x -> new HistoryVersamentoProdULDTO.OrdineDto()
|
||||
.setData(x.getDataOrd())
|
||||
.setNumero(x.getNumOrd())
|
||||
.setGestione(x.getGestione())
|
||||
.setRigaOrd(x.getRigaOrd())
|
||||
.setQtaCol(x.getQtaCol())
|
||||
.setNumCnf(x.getNumCnf())
|
||||
.setPercentageHr(x.getPercentageHr()))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
// BigDecimal qtaColTot = BigDecimal.ZERO;
|
||||
// BigDecimal numCnfColTot = BigDecimal.ZERO;
|
||||
//
|
||||
// for (HistoryVersamentoProdULDTO.OrdineDto ordine :
|
||||
// ordineList) {
|
||||
// qtaColTot = qtaColTot.add(ordine.getQtaCol());
|
||||
// numCnfColTot = numCnfColTot.add(ordine.getNumCnf());
|
||||
// }
|
||||
|
||||
newUlList.add(new HistoryVersamentoProdULDTO()
|
||||
.setGestione(restDTO.getGestione())
|
||||
.setDataCollo(restDTO.getDataCollo())
|
||||
.setSerCollo(restDTO.getSerCollo())
|
||||
.setNumCollo(restDTO.getNumCollo())
|
||||
.setSegno(restDTO.getSegno())
|
||||
.setCodMart(restDTO.getCodMart())
|
||||
.setCodCol(restDTO.getCodCol())
|
||||
.setCodTagl(restDTO.getCodTagl())
|
||||
.setCodJfas(restDTO.getCodJfas())
|
||||
.setDescrizioneArt(restDTO.getDescrizioneArt())
|
||||
.setDescrizioneFase(restDTO.getDescrizioneFase())
|
||||
.setQtaCol(restDTO.getQtaCol())
|
||||
.setQtaCnf(restDTO.getQtaCnf())
|
||||
.setNumCnf(restDTO.getNumCnf())
|
||||
.setPartitaMag(restDTO.getPartitaMag())
|
||||
.setCodJcom(restDTO.getCodJcom())
|
||||
.setDatetimeRow(restDTO.getDatetimeRow())
|
||||
.setUntMis(restDTO.getUntMis())
|
||||
.setGestioneRif(restDTO.getGestioneRif())
|
||||
.setDataColloRif(restDTO.getDataColloRif())
|
||||
.setSerColloRif(restDTO.getSerColloRif())
|
||||
.setNumColloRif(restDTO.getNumColloRif())
|
||||
.setOrdini(ordineList));
|
||||
|
||||
});
|
||||
List<HistoryVersamentoProdULDTO.OrdineDto> ordineList = ulList.stream()
|
||||
.filter(x -> x.getNumCollo().equals(restDTO.getNumCollo()) &&
|
||||
x.getDataCollo().equals(restDTO.getDataCollo()) &&
|
||||
x.getSerCollo().equals(restDTO.getSerCollo()) &&
|
||||
x.getGestione().equals(restDTO.getGestione()) &&
|
||||
(x.getRigaOrd() == null || Objects.equals(x.getRigaOrd(), restDTO.getRigaOrd())))
|
||||
.map(x -> new HistoryVersamentoProdULDTO.OrdineDto()
|
||||
.setData(x.getDataOrd())
|
||||
.setNumero(x.getNumOrd())
|
||||
.setGestione(x.getGestione())
|
||||
.setRigaOrd(x.getRigaOrd())
|
||||
.setQtaCol(x.getQtaCol())
|
||||
.setNumCnf(x.getNumCnf())
|
||||
.setPercentageHr(x.getPercentageHr()))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
|
||||
if (!newUlList.isEmpty()) {
|
||||
List<String> codMarts = Stream.of(newUlList)
|
||||
.map(HistoryVersamentoProdULDTO::getCodMart)
|
||||
.withoutNulls()
|
||||
.distinct()
|
||||
.toList();
|
||||
newUlList.add(new HistoryVersamentoProdULDTO()
|
||||
.setGestione(restDTO.getGestione())
|
||||
.setDataCollo(restDTO.getDataCollo())
|
||||
.setSerCollo(restDTO.getSerCollo())
|
||||
.setNumCollo(restDTO.getNumCollo())
|
||||
.setSegno(restDTO.getSegno())
|
||||
.setCodMart(restDTO.getCodMart())
|
||||
.setCodCol(restDTO.getCodCol())
|
||||
.setCodTagl(restDTO.getCodTagl())
|
||||
.setCodJfas(restDTO.getCodJfas())
|
||||
.setDescrizioneArt(restDTO.getDescrizioneArt())
|
||||
.setDescrizioneFase(restDTO.getDescrizioneFase())
|
||||
.setQtaCol(restDTO.getQtaCol())
|
||||
.setQtaCnf(restDTO.getQtaCnf())
|
||||
.setNumCnf(restDTO.getNumCnf())
|
||||
.setPartitaMag(restDTO.getPartitaMag())
|
||||
.setCodJcom(restDTO.getCodJcom())
|
||||
.setDatetimeRow(restDTO.getDatetimeRow())
|
||||
.setUntMis(restDTO.getUntMis())
|
||||
.setGestioneRif(restDTO.getGestioneRif())
|
||||
.setDataColloRif(restDTO.getDataColloRif())
|
||||
.setSerColloRif(restDTO.getSerColloRif())
|
||||
.setNumColloRif(restDTO.getNumColloRif())
|
||||
.setOrdini(ordineList));
|
||||
|
||||
this.mArticoloRESTConsumer.getByCodMarts(codMarts, arts -> {
|
||||
});
|
||||
|
||||
if (arts != null && !arts.isEmpty()) {
|
||||
for (HistoryVersamentoProdULDTO value : newUlList) {
|
||||
|
||||
MtbAart foundMtbAart = null;
|
||||
if (!newUlList.isEmpty()) {
|
||||
List<String> codMarts = Stream.of(newUlList)
|
||||
.map(HistoryVersamentoProdULDTO::getCodMart)
|
||||
.withoutNulls()
|
||||
.distinct()
|
||||
.toList();
|
||||
|
||||
List<MtbAart> mtbAartStream = Stream.of(arts)
|
||||
.filter(x -> x.getCodMart().equalsIgnoreCase(value.getCodMart())).toList();
|
||||
var arts = this.mArticoloRESTConsumer.getByCodMartsSynchronized(codMarts);
|
||||
|
||||
if (mtbAartStream != null && !mtbAartStream.isEmpty()) {
|
||||
foundMtbAart = mtbAartStream.get(0);
|
||||
}
|
||||
if (arts != null && !arts.isEmpty()) {
|
||||
for (HistoryVersamentoProdULDTO value : newUlList) {
|
||||
|
||||
value.setMtbAart(foundMtbAart);
|
||||
}
|
||||
MtbAart foundMtbAart = null;
|
||||
|
||||
List<MtbAart> mtbAartStream = arts.stream()
|
||||
.filter(x -> x.getCodMart().equalsIgnoreCase(value.getCodMart()))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
if (!mtbAartStream.isEmpty()) {
|
||||
foundMtbAart = mtbAartStream.get(0);
|
||||
}
|
||||
|
||||
onComplete.run(newUlList);
|
||||
|
||||
}, onFailed);
|
||||
|
||||
} else {
|
||||
onComplete.run(newUlList);
|
||||
value.setMtbAart(foundMtbAart);
|
||||
}
|
||||
}
|
||||
|
||||
}, onFailed);
|
||||
return newUlList;
|
||||
|
||||
|
||||
} else {
|
||||
return newUlList;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ public class ProdRientroMerceOrderListFilterViewModel {
|
||||
|
||||
public void init(List<OrdineLavorazioneDTO> initialList) {
|
||||
this.initialOrderList = initialList;
|
||||
this.currentFilteredOrderList.setValue(this.initialOrderList);
|
||||
this.currentFilteredOrderList.postValue(this.initialOrderList);
|
||||
}
|
||||
|
||||
public MutableLiveData<List<OrdineLavorazioneDTO>> getMutableFilteredOrderList() {
|
||||
|
||||
@@ -269,6 +269,14 @@ public class SpedizioneActivity extends BaseActivity implements SpedizioneViewMo
|
||||
this.noLUPresent.observeForever(newValue -> {
|
||||
this.bottomSheetEnabled.set(!newValue);
|
||||
});
|
||||
|
||||
mViewmodel.isFilterApplied().observe(this, newValue -> {
|
||||
if(newValue) {
|
||||
this.mBindings.filteredArtsInListExpandableLayout.expand(true);
|
||||
} else {
|
||||
this.mBindings.filteredArtsInListExpandableLayout.collapse(true);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void initBarcodeReader() {
|
||||
@@ -918,15 +926,13 @@ public class SpedizioneActivity extends BaseActivity implements SpedizioneViewMo
|
||||
@Override
|
||||
public void onFilterApplied(String newValue) {
|
||||
handler.post(() -> {
|
||||
this.mBindings.filteredArtsInListExpandableLayout.expand(true);
|
||||
this.mBindings.descriptionFilterText.setText(!UtilityString.isNullOrEmpty(newValue) ? newValue : "");
|
||||
this.mBindings.descriptionFilterText.setText(UtilityString.isNull(newValue, ""));
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFilterRemoved() {
|
||||
handler.post(() -> {
|
||||
this.mBindings.filteredArtsInListExpandableLayout.collapse(true);
|
||||
this.mBindings.descriptionFilterText.setText("");
|
||||
});
|
||||
}
|
||||
@@ -1014,7 +1020,7 @@ public class SpedizioneActivity extends BaseActivity implements SpedizioneViewMo
|
||||
.setCanPartitaMagBeChanged(canPartitaMagBeChanged)
|
||||
.setStatoPartitaMag(pickingObjectDTO != null ? pickingObjectDTO.getStatoArticoloDTO() : null)
|
||||
.setNotifyProductLotStatus(SettingsManager.iDB().isNotifyLotStatus())
|
||||
.setMtbPartitaMagList(mViewmodel.getmPartitaMagList())
|
||||
.setMtbPartitaMagList(mViewmodel.getPartitaMagList())
|
||||
.setEnableSSCCRead(SettingsManager.iDB().isFlagSpedizioneEnableFastPicking());
|
||||
|
||||
if (!mDialogInputQuantityV2View.isVisible())
|
||||
|
||||
@@ -4,6 +4,7 @@ import android.os.Handler;
|
||||
import android.util.Pair;
|
||||
|
||||
import androidx.databinding.ObservableArrayList;
|
||||
import androidx.lifecycle.LiveData;
|
||||
import androidx.lifecycle.MutableLiveData;
|
||||
|
||||
import org.apache.commons.lang3.NotImplementedException;
|
||||
@@ -106,6 +107,7 @@ public class SpedizioneViewModel {
|
||||
|
||||
private List<OrdineUscitaInevasoDTO> mTestateOrdini;
|
||||
private MutableLiveData<List<PickingObjectDTO>> mPickingList = new MutableLiveData<>();
|
||||
private MutableLiveData<Boolean> mFilterApplied = new MutableLiveData<>(false);
|
||||
private List<MtbColt> mColliRegistrati = new ArrayList<>();
|
||||
private List<MtbPartitaMag> mPartitaMagList = new ArrayList<>();
|
||||
|
||||
@@ -442,10 +444,12 @@ public class SpedizioneViewModel {
|
||||
}
|
||||
|
||||
private void sendFilterApplied(String newValue) {
|
||||
mFilterApplied.postValue(true);
|
||||
if (this.mListener != null) mListener.onFilterApplied(newValue);
|
||||
}
|
||||
|
||||
private void sendFilterRemoved() {
|
||||
mFilterApplied.postValue(false);
|
||||
if (this.mListener != null) mListener.onFilterRemoved();
|
||||
}
|
||||
|
||||
@@ -919,7 +923,17 @@ public class SpedizioneViewModel {
|
||||
|
||||
|
||||
private void searchArtFromAnag(MtbAart mtbAart, PickDataDTO pickData) throws Exception {
|
||||
final List<PickingObjectDTO> pickingList = mPickingList.getValue();
|
||||
List<PickingObjectDTO> pickingList = mPickingList.getValue();
|
||||
|
||||
final boolean isFilterApplied = Boolean.TRUE.equals(mFilterApplied.getValue());
|
||||
|
||||
if(pickingList == null)
|
||||
return;
|
||||
|
||||
if(isFilterApplied) {
|
||||
pickingList = pickingList.stream().filter(x -> !x.isHidden())
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
List<PickingObjectDTO> matchPickingObject = pickingList.stream()
|
||||
.filter(x -> UtilityString.equalsIgnoreCase(mtbAart.getCodMart(), x.getSitArtOrdDTO().getCodMart()))
|
||||
@@ -929,10 +943,18 @@ public class SpedizioneViewModel {
|
||||
return !mEnableCheckPartitaMag || (mtbPartitaMag != null && UtilityString.equalsIgnoreCase(x.getSitArtOrdDTO().getPartitaMag(), mtbPartitaMag.getPartitaMag()));
|
||||
}).collect(Collectors.toList());
|
||||
|
||||
for (PickingObjectDTO pickingObjectDTO : matchPickingObject) {
|
||||
pickingObjectDTO.setTempPickData(pickData);
|
||||
if(matchPickingObject.isEmpty() && isFilterApplied) {
|
||||
matchPickingObject = pickingList.stream()
|
||||
.filter(x -> UtilityString.equalsIgnoreCase(mtbAart.getCodMart(), x.getSitArtOrdDTO().getCodMart()))
|
||||
.filter(x -> x.getTempPickData() != null)
|
||||
.collect(Collectors.toList());
|
||||
} else {
|
||||
for (PickingObjectDTO pickingObjectDTO : matchPickingObject) {
|
||||
pickingObjectDTO.setTempPickData(pickData);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
this.loadMatchedRows(matchPickingObject);
|
||||
}
|
||||
|
||||
@@ -951,7 +973,7 @@ public class SpedizioneViewModel {
|
||||
pickingList.stream().filter(x -> x != matchedItem).forEach(x -> x.setHidden(true));
|
||||
|
||||
this.sendFilterApplied(null);
|
||||
this.getPickingList().postValue(pickingList);
|
||||
this.mPickingList.postValue(pickingList);
|
||||
} else {
|
||||
|
||||
MtbColt refMtbColt = matchedItem.getRefMtbColt();
|
||||
@@ -974,7 +996,7 @@ public class SpedizioneViewModel {
|
||||
}
|
||||
|
||||
this.sendFilterApplied(null);
|
||||
this.getPickingList().postValue(pickingList);
|
||||
this.mPickingList.postValue(pickingList);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -2161,11 +2183,16 @@ public class SpedizioneViewModel {
|
||||
}
|
||||
|
||||
|
||||
public MutableLiveData<List<PickingObjectDTO>> getPickingList() {
|
||||
public LiveData<List<PickingObjectDTO>> getPickingList() {
|
||||
return mPickingList;
|
||||
}
|
||||
|
||||
public List<MtbPartitaMag> getmPartitaMagList() {
|
||||
public LiveData<Boolean> isFilterApplied() {
|
||||
return mFilterApplied;
|
||||
}
|
||||
|
||||
|
||||
public List<MtbPartitaMag> getPartitaMagList() {
|
||||
return mPartitaMagList;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
||||
import com.ravikoradiya.liveadapter.LiveAdapter;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
@@ -107,13 +108,13 @@ public class DialogChooseArtsFromMtbAartListView extends BaseDialogFragment impl
|
||||
}
|
||||
|
||||
private void initList() {
|
||||
this.artsItemModels = Stream.of(this.mtbAarts)
|
||||
this.artsItemModels = this.mtbAarts.stream()
|
||||
.map(x -> new DialogChooseArtsFromMtbAartListItemModel()
|
||||
.setCodMart(x.getCodMart())
|
||||
.setDescrizione(x.getDescrizioneEstesa())
|
||||
.setDiacod(x.getDiacod())
|
||||
.setOriginalModel(x))
|
||||
.toList();
|
||||
.collect(Collectors.toList());
|
||||
|
||||
new LiveAdapter(this.artsItemModels, BR.item)
|
||||
.map(DialogChooseArtsFromMtbAartListItemModel.class, R.layout.dialog_choose_arts_from_mtb_aart_list__item_model)
|
||||
|
||||
@@ -15,8 +15,10 @@ import androidx.lifecycle.MutableLiveData;
|
||||
import com.annimon.stream.Stream;
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
||||
import com.ravikoradiya.liveadapter.LiveAdapter;
|
||||
import com.ravikoradiya.liveadapter.Type;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
@@ -36,6 +38,7 @@ import it.integry.integrywmsnative.core.rest.model.Ean128Model;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityBarcode;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||
import it.integry.integrywmsnative.databinding.DialogChooseArtsFromMtbColrListItemModelBinding;
|
||||
import it.integry.integrywmsnative.databinding.DialogChooseArtsFromMtbColrListLayoutBinding;
|
||||
import it.integry.integrywmsnative.view.dialogs.DialogCommon;
|
||||
import kotlin.Unit;
|
||||
@@ -84,18 +87,6 @@ public class DialogChooseArtsFromMtbColrList extends BaseDialogFragment implemen
|
||||
|
||||
this.onConfirmed = onConfirmed;
|
||||
this.onAbort = onAbort;
|
||||
|
||||
// mDataset = new ArrayList<>();
|
||||
|
||||
// if (listaMtbColr != null) {
|
||||
// for (MtbColr mtbColr : listaMtbColr) {
|
||||
// if (UtilityString.isNullOrEmpty(mtbColr.getUntMis()) && mtbColr.getMtbAart() != null) {
|
||||
// mtbColr.setUntMis(mtbColr.getMtbAart().getUntMis());
|
||||
// }
|
||||
//
|
||||
// mDataset.add(new DialogChooseArtsFromMtbColrListItemModel().setMtbColr(mtbColr));
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@@ -155,24 +146,33 @@ public class DialogChooseArtsFromMtbColrList extends BaseDialogFragment implemen
|
||||
}
|
||||
|
||||
private void initList() {
|
||||
mBindings.listaArts.setHasFixedSize(true);
|
||||
mBindings.listaArts.setHasFixedSize(false);
|
||||
|
||||
this.mtbColrItemModels = Stream.of(this.inputMtbColrList)
|
||||
|
||||
this.mtbColrItemModels = this.inputMtbColrList.stream()
|
||||
.map(x -> {
|
||||
x.setUntMis(x.getMtbAart() != null && x.getMtbAart().getFirstUntMis() != null ? x.getMtbAart().getFirstUntMis().getUntMis() : null);
|
||||
return new DialogChooseArtsFromMtbColrListItemModel()
|
||||
.setMtbColr(x);
|
||||
})
|
||||
.toList();
|
||||
.collect(Collectors.toList());
|
||||
|
||||
this.hiddenMtbColrItemModels.setValue(this.mtbColrItemModels);
|
||||
|
||||
new LiveAdapter(this.hiddenMtbColrItemModels, this, BR.item)
|
||||
.map(DialogChooseArtsFromMtbColrListItemModel.class, R.layout.dialog_choose_arts_from_mtb_colr_list__item_model)
|
||||
var itemType = new Type<DialogChooseArtsFromMtbColrListItemModel, DialogChooseArtsFromMtbColrListItemModelBinding>(R.layout.dialog_choose_arts_from_mtb_colr_list__item_model, BR.item);
|
||||
itemType.onBind(holder -> {
|
||||
holder.getBinding().executePendingBindings();
|
||||
holder.getBinding().qtaLayout.post(holder.getBinding().qtaLayout::requestLayout);
|
||||
|
||||
return Unit.INSTANCE;
|
||||
});
|
||||
|
||||
new LiveAdapter(this.hiddenMtbColrItemModels, this)
|
||||
.onNoData(noData -> {
|
||||
mBindings.emptyView.setVisibility(noData ? View.VISIBLE : View.GONE);
|
||||
return Unit.INSTANCE;
|
||||
})
|
||||
.map(DialogChooseArtsFromMtbColrListItemModel.class, itemType)
|
||||
.into(this.mBindings.listaArts);
|
||||
}
|
||||
|
||||
|
||||
@@ -13,6 +13,8 @@
|
||||
|
||||
<import type="it.integry.integrywmsnative.core.utility.UtilityNumber" />
|
||||
|
||||
<import type="it.integry.integrywmsnative.core.utility.UntMisUtils" />
|
||||
|
||||
<variable
|
||||
name="item"
|
||||
type="it.integry.integrywmsnative.view.dialogs.choose_arts_from_mtbcolr_list.DialogChooseArtsFromMtbColrListItemModel" />
|
||||
@@ -43,8 +45,8 @@
|
||||
android:id="@+id/linearLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_toStartOf="@id/qta_box"
|
||||
android:layout_marginStart="2dp"
|
||||
android:layout_toStartOf="@id/qta_layout"
|
||||
android:layout_toEndOf="@id/checkbox"
|
||||
android:orientation="vertical">
|
||||
|
||||
@@ -55,98 +57,114 @@
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Medium"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{item.mtbColr.mtbAart.getCodMart()}"
|
||||
android:textColor="?colorPrimary"
|
||||
android:textSize="14sp"
|
||||
android:text="@{item.mtbColr.mtbAart.codMart}"
|
||||
android:textStyle="bold"
|
||||
tools:text="COD MART" />
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:background="@drawable/badge_round_corner"
|
||||
android:backgroundTint="@color/orange_600"
|
||||
android:paddingStart="6dp"
|
||||
android:paddingEnd="6dp"
|
||||
android:text="@{UtilityNumber.decimalToString(item.mtbColr.qtaCol) + item.mtbColr.mtbAart.untMis}"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
android:visibility="@{item.mtbColr.mtbAart != null && !item.mtbColr.mtbAart.flagQtaCnfFissaBoolean ? View.VISIBLE : View.GONE}"
|
||||
tools:text="PESO KG" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{item.mtbColr.mtbAart.getDiacod()}"
|
||||
android:textColor="@color/red_600"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
android:visibility="@{UtilityString.isNullOrEmpty(item.mtbColr.mtbAart.diacod) ? View.GONE : View.VISIBLE}"
|
||||
tools:text="DIACOD" />
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="2"
|
||||
android:text="@{item.mtbColr.mtbAart.descrizioneEstesa}"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="16sp"
|
||||
tools:text="Descrizione lunga articolo" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/badge_round_corner"
|
||||
android:backgroundTint="?colorSecondaryContainer"
|
||||
android:orientation="vertical"
|
||||
android:paddingHorizontal="4dp"
|
||||
android:paddingVertical="4dp"
|
||||
android:visibility="@{!UtilityString.isNullOrEmpty(item.mtbColr.mtbAart.diacod) || !UtilityString.isNullOrEmpty(item.mtbColr.partitaMag) ? View.VISIBLE : View.GONE}">
|
||||
|
||||
<TextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{"Diacod: " + item.mtbColr.mtbAart.diacod}"
|
||||
android:textColor="?colorOnSecondaryContainer"
|
||||
android:textStyle="bold"
|
||||
app:visibilityWhenNotNull="@{item.mtbColr.mtbAart.diacod}"
|
||||
tools:text="Diacod: 123TEST" />
|
||||
|
||||
<TextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{"Lotto: " + item.mtbColr.partitaMag}"
|
||||
android:textColor="?colorOnSecondaryContainer"
|
||||
android:textStyle="bold"
|
||||
app:visibilityWhenNotNull="@{item.mtbColr.partitaMag}"
|
||||
tools:text="Lotto: LottoTest" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:id="@+id/qta_box"
|
||||
<LinearLayout
|
||||
android:id="@+id/qta_layout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginStart="8dp"
|
||||
android:padding="6dp"
|
||||
android:background="@drawable/badge_round_corner"
|
||||
android:backgroundTint="?colorPrimary"
|
||||
android:gravity="center_horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical"
|
||||
android:visibility="@{item.mtbColr.qtaCol != null ? View.VISIBLE : View.GONE}">
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
<TextView
|
||||
android:id="@+id/num_cnf_text"
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:backgroundTint="?colorPrimary"
|
||||
android:layout_marginBottom="-16dp"
|
||||
android:background="@drawable/badge_round_corner_top"
|
||||
android:backgroundTint="?colorSecondaryContainer"
|
||||
android:gravity="center_horizontal"
|
||||
android:paddingStart="6dp"
|
||||
android:paddingEnd="6dp"
|
||||
android:paddingBottom="16dp"
|
||||
android:text="@{UtilityNumber.decimalToString(item.mtbColr.numCnf, 0)}"
|
||||
android:textColor="?colorOnSecondaryContainer"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
app:visibility="@{UntMisUtils.shouldBeShowInColli(item.mtbColr.mtbAart)}"
|
||||
tools:text="NUM CNF" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/qta_textview"
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/badge_round_corner"
|
||||
android:backgroundTint="?colorPrimaryContainer"
|
||||
android:gravity="center"
|
||||
android:text="@{UtilityNumber.decimalToString(item.mtbColr.qtaCol, 2)}"
|
||||
android:paddingLeft="6dp"
|
||||
android:paddingTop="2dp"
|
||||
android:paddingRight="6dp"
|
||||
android:paddingBottom="2dp"
|
||||
android:text="@{UtilityNumber.decimalToString(item.mtbColr.qtaCol, item.mtbColr.mtbAart.firstUntMis.cifreDec.intValue()) + "\n" + item.mtbColr.mtbAart.firstUntMis.untMis}"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="@android:color/white"
|
||||
android:textColor="?colorOnPrimaryContainer"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
tools:text="280.45" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="@{item.mtbColr.untMis}"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
tools:text="CONF" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
app:reverse_visibility="@{UntMisUtils.shouldBeShowInColli(item.mtbColr.mtbAart)}"
|
||||
tools:text="280.45\nCONF" />
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
</layout>
|
||||
@@ -15,7 +15,6 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingHorizontal="16dp"
|
||||
android:paddingVertical="16dp">
|
||||
|
||||
|
||||
@@ -32,8 +31,8 @@
|
||||
android:id="@+id/loading_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
android:orientation="vertical"
|
||||
android:layout_marginHorizontal="16dp">
|
||||
|
||||
<com.google.android.material.progressindicator.LinearProgressIndicator
|
||||
android:id="@+id/progressBar"
|
||||
@@ -63,6 +62,7 @@
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
tools:itemCount="1"
|
||||
android:paddingBottom="16dp"
|
||||
android:paddingHorizontal="16dp"
|
||||
tools:listitem="@layout/dialog_info_giacenza_situazione_articolo"
|
||||
tools:visibility="gone" />
|
||||
|
||||
@@ -83,6 +83,8 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:nestedScrollingEnabled="false"
|
||||
android:layout_marginTop="4dp"
|
||||
android:paddingHorizontal="8dp"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
tools:itemCount="5"
|
||||
tools:listitem="@layout/dialog_info_giacenza_list_item" />
|
||||
|
||||
@@ -26,17 +26,18 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:paddingVertical="8dp">
|
||||
android:paddingVertical="8dp"
|
||||
android:paddingHorizontal="8dp">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toStartOf="@id/qta_box"
|
||||
android:layout_toStartOf="@id/qta_layout"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
<TextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Medium"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -44,30 +45,21 @@
|
||||
android:textStyle="bold"
|
||||
tools:text="UL 109467 del 17 mar 2023" />
|
||||
|
||||
<!-- <androidx.appcompat.widget.AppCompatTextView-->
|
||||
<!-- style="@style/TextAppearance.AppCompat.Small"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:ellipsize="end"-->
|
||||
<!-- android:maxLines="2"-->
|
||||
<!-- android:text="@{UtilityString.isNull(item.descrizioneEstesa, "Nessuna descrizione")}"-->
|
||||
<!-- tools:text="Descrizione lunga articolo" />-->
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:background="@drawable/badge_round_corner_without_padding"
|
||||
android:backgroundTint="@color/light_blue_500"
|
||||
android:gravity="center_vertical"
|
||||
android:visibility="@{item.posizione != null ? View.VISIBLE : View.GONE}">
|
||||
app:visibilityWhenNotNull="@{item.posizione}">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="4dp"
|
||||
@@ -76,16 +68,16 @@
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
<ImageView
|
||||
android:id="@+id/position_label_icon"
|
||||
android:layout_width="12dp"
|
||||
android:layout_height="12dp"
|
||||
android:src="@drawable/ic_location_24"
|
||||
android:tint="@android:color/white"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:tint="@android:color/white" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
<TextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -95,10 +87,10 @@
|
||||
app:layout_constraintStart_toEndOf="@id/position_label_icon"
|
||||
tools:text="POSIZIONE" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
@@ -107,10 +99,10 @@
|
||||
android:backgroundTint="@color/red_300"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="@{item.codJcom != null ? View.VISIBLE : View.GONE}"
|
||||
app:visibilityWhenNotNull="@{item.codJcom}"
|
||||
tools:visibility="invisible">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="4dp"
|
||||
@@ -119,95 +111,79 @@
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
<ImageView
|
||||
android:layout_width="12dp"
|
||||
android:layout_height="12dp"
|
||||
android:src="@drawable/ic_tag"
|
||||
android:tint="@android:color/black" />
|
||||
app:tint="@android:color/black" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
<TextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:text="@{item.codJcom}"
|
||||
tools:text="COMMESSA" />
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:id="@+id/qta_box"
|
||||
<LinearLayout
|
||||
android:id="@+id/qta_layout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginStart="8dp"
|
||||
android:background="@drawable/badge_round_corner"
|
||||
android:backgroundTint="?colorPrimary"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
android:padding="6dp"
|
||||
android:visibility="@{item.qtaCol != null ? View.VISIBLE : View.GONE}">
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent">
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/TextAppearance.AppCompat.Small"
|
||||
android:layout_width="wrap_content"
|
||||
<TextView
|
||||
android:id="@+id/num_cnf_text"
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:backgroundTint="?colorPrimary"
|
||||
android:gravity="center"
|
||||
android:background="@drawable/badge_round_corner_top"
|
||||
android:backgroundTint="?colorSecondaryContainer"
|
||||
android:gravity="center_horizontal"
|
||||
android:paddingStart="6dp"
|
||||
android:paddingEnd="6dp"
|
||||
android:paddingBottom="16dp"
|
||||
android:layout_marginBottom="-16dp"
|
||||
android:text="@{UtilityNumber.decimalToString(item.numCnf, 0)}"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="@android:color/white"
|
||||
android:textColor="?colorOnSecondaryContainer"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
app:visibility="@{UntMisUtils.shouldBeShowInColli(item.mtbAart)}"
|
||||
tools:text="280"
|
||||
tools:visibility="gone"/>
|
||||
tools:text="NUM CNF" />
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/TextAppearance.AppCompat.Small"
|
||||
android:layout_width="wrap_content"
|
||||
<TextView
|
||||
android:id="@+id/qta_textview"
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/badge_round_corner"
|
||||
android:backgroundTint="?colorPrimaryContainer"
|
||||
android:gravity="center"
|
||||
android:text="@string/unt_mis_col"
|
||||
android:paddingLeft="6dp"
|
||||
android:paddingTop="2dp"
|
||||
android:paddingRight="6dp"
|
||||
android:paddingBottom="2dp"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="@android:color/white"
|
||||
android:textStyle="bold"
|
||||
app:visibility="@{UntMisUtils.shouldBeShowInColli(item.mtbAart)}"
|
||||
tools:text="CONF"
|
||||
tools:visibility="gone" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/TextAppearance.AppCompat.Small"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:backgroundTint="?colorPrimary"
|
||||
android:gravity="center"
|
||||
android:text="@{UtilityNumber.decimalToString(item.qtaCol, item.mtbAart.firstUntMis.cifreDec.intValue())}"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="@android:color/white"
|
||||
android:textColor="?colorOnPrimaryContainer"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
android:text="@{UtilityNumber.decimalToString(item.qtaCol, item.mtbAart.firstUntMis.cifreDec.intValue()) + "\n" + item.mtbAart.firstUntMis.untMis}"
|
||||
app:reverse_visibility="@{UntMisUtils.shouldBeShowInColli(item.mtbAart)}"
|
||||
tools:text="280.45" />
|
||||
tools:text="280.45\nCONF" />
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/TextAppearance.AppCompat.Small"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="@{item.untMis}"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="@android:color/white"
|
||||
android:textStyle="bold"
|
||||
app:reverse_visibility="@{UntMisUtils.shouldBeShowInColli(item.mtbAart)}"
|
||||
tools:text="CONF" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
@@ -11,22 +11,13 @@
|
||||
app:cardElevation="0dp">
|
||||
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingHorizontal="16dp"
|
||||
android:paddingVertical="16dp">
|
||||
|
||||
<!-- <androidx.appcompat.widget.AppCompatImageView-->
|
||||
<!-- style="@style/MaterialAlertDialog.Material3.Title.Icon.CenterStacked"-->
|
||||
<!-- android:layout_width="36dp"-->
|
||||
<!-- android:layout_height="36dp"-->
|
||||
<!-- android:src="@drawable/ic_error_white_24dp"-->
|
||||
<!-- app:tint="?colorPrimary" />-->
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
<TextView
|
||||
android:id="@+id/title_text"
|
||||
style="@style/MaterialAlertDialog.Material3.Title.Text.CenterStacked"
|
||||
android:layout_width="match_parent"
|
||||
@@ -39,12 +30,12 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
<TextView
|
||||
android:id="@+id/incoming_label"
|
||||
style="@style/TextAppearance.Material3.TitleMedium"
|
||||
android:background="@drawable/badge_round_corner"
|
||||
@@ -63,12 +54,13 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:nestedScrollingEnabled="false"
|
||||
android:paddingHorizontal="8dp"
|
||||
tools:listitem="@layout/dialog_info_situazione_articolo_incoming_list_item"
|
||||
tools:itemCount="1"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
<TextView
|
||||
android:id="@+id/available_label"
|
||||
style="@style/TextAppearance.Material3.TitleMedium"
|
||||
android:textAllCaps="true"
|
||||
@@ -86,12 +78,14 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:nestedScrollingEnabled="false"
|
||||
android:layout_marginTop="4dp"
|
||||
android:paddingHorizontal="8dp"
|
||||
tools:listitem="@layout/dialog_info_situazione_articolo_available_list_item"
|
||||
tools:itemCount="3"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
|
||||
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
@@ -99,6 +93,6 @@
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
</layout>
|
||||
@@ -26,17 +26,18 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:paddingVertical="8dp">
|
||||
android:paddingVertical="8dp"
|
||||
android:paddingHorizontal="8dp">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toStartOf="@id/qta_box"
|
||||
android:layout_toStartOf="@id/qta_layout"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
<TextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Medium"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -45,7 +46,7 @@
|
||||
tools:text="UL 109467 del 17 mar 2023" />
|
||||
|
||||
|
||||
<!-- <androidx.appcompat.widget.AppCompatTextView-->
|
||||
<!-- <TextView-->
|
||||
<!-- style="@style/TextAppearance.AppCompat.Small"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
@@ -54,7 +55,7 @@
|
||||
<!-- android:text="@{UtilityString.isNull(item.descrizioneEstesa, "Nessuna descrizione")}"-->
|
||||
<!-- tools:text="Descrizione lunga articolo" />-->
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
@@ -62,9 +63,9 @@
|
||||
android:backgroundTint="@color/green_200"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="@{item.partitaMag != null ? View.VISIBLE : View.GONE}">
|
||||
app:visibilityWhenNotNull="@{item.partitaMag}">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="4dp"
|
||||
@@ -73,13 +74,13 @@
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
<ImageView
|
||||
android:layout_width="12dp"
|
||||
android:layout_height="12dp"
|
||||
android:src="@drawable/ic_info_78dp"
|
||||
android:tint="@android:color/black" />
|
||||
app:tint="@android:color/black" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
<TextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -88,41 +89,41 @@
|
||||
android:textColor="@android:color/black"
|
||||
tools:text="PARTITA" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
<ImageView
|
||||
android:layout_width="12dp"
|
||||
android:layout_height="12dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:visibility="@{item.dataScad != null ? View.VISIBLE : View.GONE}"
|
||||
app:visibilityWhenNotNull="@{item.dataScad}"
|
||||
android:src="@drawable/ic_calendar_schedule"
|
||||
android:tint="@android:color/black" />
|
||||
app:tint="@android:color/black" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
<TextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:visibility="@{item.dataScad != null ? View.VISIBLE : View.GONE}"
|
||||
app:visibilityWhenNotNull="@{item.dataScad}"
|
||||
android:text="@{UtilityDate.formatDate(item.dataScad, UtilityDate.COMMONS_DATE_FORMATS.DMY_HUMAN)}"
|
||||
android:textColor="@android:color/black"
|
||||
tools:text="17 mag 2023" />
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:background="@drawable/badge_round_corner_without_padding"
|
||||
android:backgroundTint="@color/light_blue_500"
|
||||
android:gravity="center_vertical"
|
||||
android:visibility="@{item.posizione != null ? View.VISIBLE : View.GONE}">
|
||||
app:visibilityWhenNotNull="@{item.posizione}">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="4dp"
|
||||
@@ -131,16 +132,16 @@
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
<ImageView
|
||||
android:id="@+id/position_label_icon"
|
||||
android:layout_width="12dp"
|
||||
android:layout_height="12dp"
|
||||
android:src="@drawable/ic_location_24"
|
||||
android:tint="@android:color/black"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:tint="@android:color/black" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
<TextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -149,10 +150,10 @@
|
||||
app:layout_constraintStart_toEndOf="@id/position_label_icon"
|
||||
tools:text="POSIZIONE" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
@@ -161,9 +162,9 @@
|
||||
android:backgroundTint="@color/red_300"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="@{item.codJcom != null ? View.VISIBLE : View.GONE}">
|
||||
app:visibilityWhenNotNull="@{item.codJcom}">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="4dp"
|
||||
@@ -172,95 +173,77 @@
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
<ImageView
|
||||
android:layout_width="12dp"
|
||||
android:layout_height="12dp"
|
||||
android:src="@drawable/ic_tag"
|
||||
android:tint="@android:color/black" />
|
||||
app:tint="@android:color/black" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
<TextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:text="@{item.codJcom}"
|
||||
tools:text="COMMESSA" />
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:id="@+id/qta_box"
|
||||
<LinearLayout
|
||||
android:id="@+id/qta_layout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginStart="8dp"
|
||||
android:background="@drawable/badge_round_corner"
|
||||
android:backgroundTint="?colorPrimary"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
android:padding="6dp"
|
||||
android:visibility="@{item.qtaCol != null ? View.VISIBLE : View.GONE}">
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent">
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/TextAppearance.AppCompat.Small"
|
||||
android:layout_width="wrap_content"
|
||||
<TextView
|
||||
android:id="@+id/num_cnf_text"
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:backgroundTint="?colorPrimary"
|
||||
android:gravity="center"
|
||||
android:background="@drawable/badge_round_corner_top"
|
||||
android:backgroundTint="?colorSecondaryContainer"
|
||||
android:gravity="center_horizontal"
|
||||
android:paddingStart="6dp"
|
||||
android:paddingEnd="6dp"
|
||||
android:paddingBottom="16dp"
|
||||
android:layout_marginBottom="-16dp"
|
||||
android:text="@{UtilityNumber.decimalToString(item.numCnf, 0)}"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="@android:color/white"
|
||||
android:textColor="?colorOnSecondaryContainer"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
app:visibility="@{UntMisUtils.shouldBeShowInColli(item.mtbAart)}"
|
||||
tools:text="280"
|
||||
tools:visibility="gone"/>
|
||||
tools:text="NUM CNF" />
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/TextAppearance.AppCompat.Small"
|
||||
android:layout_width="wrap_content"
|
||||
<TextView
|
||||
android:id="@+id/qta_textview"
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/badge_round_corner"
|
||||
android:backgroundTint="?colorPrimaryContainer"
|
||||
android:gravity="center"
|
||||
android:text="@string/unt_mis_col"
|
||||
android:paddingLeft="6dp"
|
||||
android:paddingTop="2dp"
|
||||
android:paddingRight="6dp"
|
||||
android:paddingBottom="2dp"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="@android:color/white"
|
||||
android:textStyle="bold"
|
||||
app:visibility="@{UntMisUtils.shouldBeShowInColli(item.mtbAart)}"
|
||||
tools:text="CONF"
|
||||
tools:visibility="gone" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/TextAppearance.AppCompat.Small"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:backgroundTint="?colorPrimary"
|
||||
android:gravity="center"
|
||||
android:text="@{UtilityNumber.decimalToString(item.qtaCol, item.mtbAart.firstUntMis.cifreDec.intValue())}"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="@android:color/white"
|
||||
android:textColor="?colorOnPrimaryContainer"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
android:text="@{UtilityNumber.decimalToString(item.qtaCol, item.mtbAart.firstUntMis.cifreDec.intValue()) + "\n" + item.mtbAart.firstUntMis.untMis}"
|
||||
app:reverse_visibility="@{UntMisUtils.shouldBeShowInColli(item.mtbAart)}"
|
||||
tools:text="280.45" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/TextAppearance.AppCompat.Small"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="@{item.untMis}"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="@android:color/white"
|
||||
android:textStyle="bold"
|
||||
app:reverse_visibility="@{UntMisUtils.shouldBeShowInColli(item.mtbAart)}"
|
||||
tools:text="CONF" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
tools:text="280.45\nCONF" />
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
@@ -23,22 +23,22 @@
|
||||
</data>
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:paddingVertical="8dp">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toStartOf="@id/qta_box"
|
||||
android:gravity="center_vertical"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/qta_layout"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
<TextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Medium"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -47,7 +47,7 @@
|
||||
tools:text="Data cons" />
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
<TextView
|
||||
style="@style/TextAppearance.AppCompat.Small"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -55,81 +55,63 @@
|
||||
android:maxLines="2"
|
||||
android:text="@{UtilityString.isNull(item.descrizione, "Nessuna descrizione")}"
|
||||
tools:text="Descrizione lunga articolo" />
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:id="@+id/qta_box"
|
||||
<LinearLayout
|
||||
android:id="@+id/qta_layout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginStart="8dp"
|
||||
android:background="@drawable/badge_round_corner"
|
||||
android:backgroundTint="?colorPrimary"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
android:padding="6dp"
|
||||
android:visibility="@{item.qtaOrd != null ? View.VISIBLE : View.GONE}">
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent">
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/TextAppearance.AppCompat.Small"
|
||||
android:layout_width="wrap_content"
|
||||
<TextView
|
||||
android:id="@+id/num_cnf_text"
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:backgroundTint="?colorPrimary"
|
||||
android:gravity="center"
|
||||
android:background="@drawable/badge_round_corner_top"
|
||||
android:backgroundTint="?colorSecondaryContainer"
|
||||
android:gravity="center_horizontal"
|
||||
android:paddingStart="6dp"
|
||||
android:paddingEnd="6dp"
|
||||
android:paddingBottom="16dp"
|
||||
android:layout_marginBottom="-16dp"
|
||||
android:text="@{UtilityNumber.decimalToString(item.numCnf, 0)}"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="@android:color/white"
|
||||
android:textColor="?colorOnSecondaryContainer"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
app:visibility="@{UntMisUtils.shouldBeShowInColli(item.mtbAart)}"
|
||||
tools:text="280"
|
||||
tools:visibility="gone"/>
|
||||
tools:text="NUM CNF" />
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/TextAppearance.AppCompat.Small"
|
||||
android:layout_width="wrap_content"
|
||||
<TextView
|
||||
android:id="@+id/qta_textview"
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/badge_round_corner"
|
||||
android:backgroundTint="?colorPrimaryContainer"
|
||||
android:gravity="center"
|
||||
android:text="@string/unt_mis_col"
|
||||
android:paddingLeft="6dp"
|
||||
android:paddingTop="2dp"
|
||||
android:paddingRight="6dp"
|
||||
android:paddingBottom="2dp"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="@android:color/white"
|
||||
android:textStyle="bold"
|
||||
app:visibility="@{UntMisUtils.shouldBeShowInColli(item.mtbAart)}"
|
||||
tools:text="CONF"
|
||||
tools:visibility="gone" />
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/TextAppearance.AppCompat.Small"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:backgroundTint="?colorPrimary"
|
||||
android:gravity="center"
|
||||
android:text="@{UtilityNumber.decimalToString(item.qtaOrd, item.mtbAart.firstUntMis.cifreDec.intValue())}"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="@android:color/white"
|
||||
android:textColor="?colorOnPrimaryContainer"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
android:text="@{UtilityNumber.decimalToString(item.qtaOrd, 2) + "\n" + item.untMis}"
|
||||
app:reverse_visibility="@{UntMisUtils.shouldBeShowInColli(item.mtbAart)}"
|
||||
tools:text="280.45" />
|
||||
tools:text="280.45\nCONF" />
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/TextAppearance.AppCompat.Small"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="@{item.untMis}"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="@android:color/white"
|
||||
android:textStyle="bold"
|
||||
app:reverse_visibility="@{UntMisUtils.shouldBeShowInColli(item.mtbAart)}"
|
||||
tools:text="CONF" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</RelativeLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
</layout>
|
||||
@@ -16,6 +16,7 @@
|
||||
<import type="it.integry.integrywmsnative.core.utility.UtilityString" />
|
||||
|
||||
<import type="it.integry.integrywmsnative.core.utility.UtilityNumber" />
|
||||
<import type="it.integry.integrywmsnative.core.utility.UntMisUtils" />
|
||||
|
||||
<import type="it.integry.integrywmsnative.core.settings.SettingsManager" />
|
||||
|
||||
@@ -114,7 +115,7 @@
|
||||
android:textColor="?colorOnSecondaryContainer"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
app:visibility="@{SettingsManager.iDB().isFlagForceAllToColli() || (mtbColr.mtbAart != null && !mtbColr.mtbAart.flagQtaCnfFissaBoolean)}"
|
||||
app:visibility="@{UntMisUtils.shouldBeShowInColli(mtbColr.mtbAart)}"
|
||||
tools:text="NUM CNF" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
|
||||
Reference in New Issue
Block a user