Finish v1.14.1(178)
This commit is contained in:
commit
58865ca34b
@ -7,8 +7,8 @@ apply plugin: 'com.google.gms.google-services'
|
||||
|
||||
android {
|
||||
|
||||
def appVersionCode = 177
|
||||
def appVersionName = '1.14.0'
|
||||
def appVersionCode = 178
|
||||
def appVersionName = '1.14.1'
|
||||
|
||||
signingConfigs {
|
||||
release {
|
||||
@ -91,7 +91,7 @@ dependencies {
|
||||
//Firebase
|
||||
|
||||
// Import the Firebase BoM
|
||||
implementation platform('com.google.firebase:firebase-bom:26.0.0')
|
||||
implementation platform('com.google.firebase:firebase-bom:26.3.0')
|
||||
implementation 'com.google.firebase:firebase-analytics'
|
||||
implementation 'com.google.firebase:firebase-core'
|
||||
implementation 'com.google.firebase:firebase-crash'
|
||||
@ -102,7 +102,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-alpha04'
|
||||
implementation 'com.google.android.material:material:1.3.0-rc01'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
|
||||
implementation 'androidx.cardview:cardview:1.0.0'
|
||||
implementation 'androidx.recyclerview:recyclerview:1.1.0'
|
||||
|
||||
@ -0,0 +1,7 @@
|
||||
package it.integry.integrywmsnative.core.expansion;
|
||||
|
||||
public interface RunnableArgsWithReturn<T, R> {
|
||||
|
||||
R run(T data);
|
||||
|
||||
}
|
||||
@ -54,6 +54,7 @@ public class MtbColt extends EntityBase {
|
||||
private BigDecimal lunghezzaCm;
|
||||
private BigDecimal larghezzaCm;
|
||||
private BigDecimal altezzaCm;
|
||||
private String codJcom;
|
||||
|
||||
private List<MtbCols> mtbCols;
|
||||
|
||||
@ -500,6 +501,15 @@ public class MtbColt extends EntityBase {
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCodJcom() {
|
||||
return codJcom;
|
||||
}
|
||||
|
||||
public MtbColt setCodJcom(String codJcom) {
|
||||
this.codJcom = codJcom;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void generaFiltroOrdineFromDTO(List<FiltroOrdineDTO> filtroOrdineDtos) {
|
||||
|
||||
String xmlPrefix = "{\"whereCond\": \"";
|
||||
|
||||
@ -44,7 +44,7 @@ public class PosizioniRESTConsumer extends _BaseRESTConsumer{
|
||||
public static void getBancaliInPosizione(MtbDepoPosizione mtbDepoPosizione, RunnableArgs<List<MtbColt>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||
|
||||
|
||||
String sql = "SELECT * FROM mtb_colt WHERE cod_mdep = " + UtilityDB.valueToString(mtbDepoPosizione.getCodMdep()) + " AND posizione = " + UtilityDB.valueToString(mtbDepoPosizione.getPosizione());
|
||||
String sql = "SELECT * FROM mtb_colt WHERE segno > 0 AND cod_mdep = " + UtilityDB.valueToString(mtbDepoPosizione.getCodMdep()) + " AND posizione = " + UtilityDB.valueToString(mtbDepoPosizione.getPosizione());
|
||||
|
||||
|
||||
Type typeOfObjectsList = new TypeToken<ArrayList<MtbColt>>() {}.getType();
|
||||
|
||||
@ -52,6 +52,7 @@ import it.integry.integrywmsnative.gest.accettazione_picking.core.AccettazioneLi
|
||||
import it.integry.integrywmsnative.gest.accettazione_picking.core.AccettazioneListModel;
|
||||
import it.integry.integrywmsnative.gest.accettazione_picking.dto.AccettazioneOrdineInevasoOrderBy;
|
||||
import it.integry.integrywmsnative.gest.accettazione_picking.dto.PickingObjectDTO;
|
||||
import it.integry.integrywmsnative.gest.accettazione_picking.rest.RecoverMtbColt;
|
||||
import it.integry.integrywmsnative.gest.lista_bancali.ListaBancaliActivity;
|
||||
import it.integry.integrywmsnative.gest.spedizione.exceptions.InvalidPesoKGException;
|
||||
import it.integry.integrywmsnative.gest.spedizione.model.PickedQuantityDTO;
|
||||
@ -455,8 +456,13 @@ public class AccettazionePickingActivity extends BaseActivity implements Accetta
|
||||
}
|
||||
|
||||
|
||||
public void startListaBancaliRegistratiActivity(ArrayList<MtbColt> mtbColts){
|
||||
Intent myIntent = ListaBancaliActivity.createIntent(this, mtbColts, false, PrinterRESTConsumer.Type.SECONDARIA, ReportManager.getReportNameLUFromGestione(GestioneEnum.ACQUISTO));
|
||||
public void startListaBancaliRegistratiActivity(ArrayList<RecoverMtbColt> mtbColts) {
|
||||
|
||||
Intent myIntent = ListaBancaliActivity.createIntent(this,
|
||||
Stream.of(mtbColts).map(x -> (MtbColt)x).toList(),
|
||||
input -> ((RecoverMtbColt) input).isFlagCanBeRecovered(),
|
||||
PrinterRESTConsumer.Type.SECONDARIA,
|
||||
ReportManager.getReportNameLUFromGestione(GestioneEnum.ACQUISTO));
|
||||
this.startActivityForResult(myIntent, PICK_UL_REQUEST);
|
||||
}
|
||||
|
||||
|
||||
@ -54,6 +54,7 @@ import it.integry.integrywmsnative.gest.accettazione.dto.SitArtOrdDTO;
|
||||
import it.integry.integrywmsnative.gest.accettazione_picking.dto.HistoryMtbAartDTO;
|
||||
import it.integry.integrywmsnative.gest.accettazione_picking.dto.PickingObjectDTO;
|
||||
import it.integry.integrywmsnative.gest.accettazione_picking.rest.AccettazionePickingRESTConsumer;
|
||||
import it.integry.integrywmsnative.gest.accettazione_picking.rest.RecoverMtbColt;
|
||||
import it.integry.integrywmsnative.gest.spedizione.exceptions.InvalidPesoKGException;
|
||||
import it.integry.integrywmsnative.gest.spedizione.exceptions.NotCurrentYearLUException;
|
||||
import it.integry.integrywmsnative.gest.spedizione.model.PickedQuantityDTO;
|
||||
@ -165,7 +166,7 @@ public class AccettazionePickingViewModel {
|
||||
return mPickingList;
|
||||
}
|
||||
|
||||
public void retrieveExistentLU(RunnableArgs<ArrayList<MtbColt>> onComplete) {
|
||||
public void retrieveExistentLU(RunnableArgs<ArrayList<RecoverMtbColt>> onComplete) {
|
||||
this.sendOnLoadingStarted();
|
||||
|
||||
this.mAccettazionePickingRESTConsumer.getBancaliGiaRegistrati(this.mSitArts, mtbColtList -> {
|
||||
|
||||
@ -5,18 +5,18 @@ import com.google.gson.reflect.TypeToken;
|
||||
|
||||
import java.lang.reflect.Type;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Singleton;
|
||||
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.ISimpleOperationCallback;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.SystemRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityLogger;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityQuery;
|
||||
import it.integry.integrywmsnative.gest.accettazione.dto.SitArtOrdDTO;
|
||||
|
||||
@Singleton
|
||||
@ -29,56 +29,87 @@ public class AccettazionePickingRESTConsumer {
|
||||
this.mSystemRestConsumer = systemRESTConsumer;
|
||||
}
|
||||
|
||||
public void getBancaliGiaRegistrati(List<SitArtOrdDTO> ordiniToShow, RunnableArgs<ArrayList<MtbColt>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||
public void getBancaliGiaRegistrati(List<SitArtOrdDTO> ordiniToShow, RunnableArgs<ArrayList<RecoverMtbColt>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||
List<HashMap<String, Object>> whereCondListMap = new ArrayList<>();
|
||||
|
||||
List<String> colliWhereCond = new ArrayList<>();
|
||||
|
||||
|
||||
Stream.of(ordiniToShow).forEach(x -> {
|
||||
Stream
|
||||
.of(ordiniToShow)
|
||||
.distinctBy(x -> x.getDataOrd() + " " + x.getGestione() + " " + x.getNumOrd())
|
||||
.forEach(x -> {
|
||||
try {
|
||||
Date date = UtilityDate.recognizeDate(x.getDataOrd());
|
||||
String dateString = UtilityDate.formatDate(date, "yyyy/MM/dd");
|
||||
HashMap<String, Object> whereCondMap = new HashMap<>();
|
||||
whereCondMap.put("mtb_colr.data_ord", UtilityDate.recognizeDate(x.getDataOrd()));
|
||||
whereCondMap.put("mtb_colr.gestione", x.getGestione().equalsIgnoreCase("P") ? "L" : x.getGestione());
|
||||
whereCondMap.put("mtb_colr.num_ord", x.getNumOrd());
|
||||
|
||||
if (!colliWhereCond.contains(x.getGestione() + " " + dateString + " " + x.getNumOrd())) {
|
||||
String gestione = x.getGestione().equalsIgnoreCase("P") ? "L" : x.getGestione();
|
||||
colliWhereCond.add(gestione + " " + dateString + " " + x.getNumOrd());
|
||||
}
|
||||
} catch (Exception ex){
|
||||
whereCondListMap.add(whereCondMap);
|
||||
} catch (Exception ex) {
|
||||
UtilityLogger.errorMe(ex);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
StringBuilder colliINCondition = new StringBuilder();
|
||||
|
||||
for(int i = 0; i < colliWhereCond.size(); i ++){
|
||||
colliINCondition.append("'").append(colliWhereCond.get(i)).append("'");
|
||||
|
||||
if(i < (colliWhereCond.size()-1)) colliINCondition.append(",");
|
||||
}
|
||||
String sql = "SELECT DISTINCT CAST(CASE WHEN MAX(ISNULL(mtb_colr_scar.num_collo, 0)) = 0 THEN 1 ELSE 0 END AS BIT) AS flagCanBeRecovered, " +
|
||||
" mtb_colt.* " +
|
||||
"FROM mtb_colt" +
|
||||
" INNER JOIN mtb_colr ON " +
|
||||
" mtb_colt.gestione = mtb_colr.gestione AND " +
|
||||
" mtb_colt.ser_collo = mtb_colr.ser_collo AND " +
|
||||
" mtb_colt.data_collo = mtb_colr.data_collo AND " +
|
||||
" mtb_colt.num_collo = mtb_colr.num_collo " +
|
||||
" LEFT OUTER JOIN mtb_colr mtb_colr_scar ON mtb_colr_scar.num_collo_rif = mtb_colr.num_collo AND " +
|
||||
" mtb_colr_scar.gestione_rif = mtb_colr.gestione AND " +
|
||||
" mtb_colr_scar.ser_collo_rif = mtb_colr.ser_collo AND " +
|
||||
" mtb_colr_scar.data_collo_rif = mtb_colr.data_collo " +
|
||||
" WHERE (" + UtilityQuery.concatFieldListInWhereCond(whereCondListMap) + ") " +
|
||||
" AND mtb_colt.data_doc IS NULL " +
|
||||
" GROUP BY mtb_colt.gestione," +
|
||||
" mtb_colt.data_collo," +
|
||||
" mtb_colt.num_collo," +
|
||||
" segno," +
|
||||
" peso_kg," +
|
||||
" lunghezza_cm," +
|
||||
" larghezza_cm," +
|
||||
" altezza_cm," +
|
||||
" cod_anag," +
|
||||
" cod_dtip," +
|
||||
" mtb_colt.data_doc," +
|
||||
" mtb_colt.ser_doc," +
|
||||
" mtb_colt.num_doc," +
|
||||
" rif_ord," +
|
||||
" mtb_colt.ser_collo," +
|
||||
" cod_tcol," +
|
||||
" mtb_colt.data_ord," +
|
||||
" mtb_colt.num_ord," +
|
||||
" cod_vdes," +
|
||||
" cod_mdep," +
|
||||
" cod_vlis," +
|
||||
" preparato_da," +
|
||||
" ora_iniz_prep," +
|
||||
" ora_fine_prep," +
|
||||
" filtro_ordini," +
|
||||
" annotazioni," +
|
||||
" posizione," +
|
||||
" cod_dtip_provv," +
|
||||
" data_doc_provv," +
|
||||
" ser_doc_provv," +
|
||||
" num_doc_provv," +
|
||||
" cod_jfas," +
|
||||
" data_vers," +
|
||||
" mtb_colt.peso_netto_kg";
|
||||
|
||||
|
||||
|
||||
String sql = "SELECT DISTINCT mtb_colt.* " +
|
||||
"FROM mtb_colt, mtb_colr " +
|
||||
"WHERE mtb_colt.gestione = mtb_colr.gestione AND " +
|
||||
"mtb_colt.ser_collo = mtb_colr.ser_collo AND " +
|
||||
"mtb_colt.data_collo = mtb_colr.data_collo AND " +
|
||||
"mtb_colt.num_collo = mtb_colr.num_collo AND " +
|
||||
"mtb_colt.gestione + ' ' + CONVERT(VARCHAR(15), mtb_colr.data_ord, 111) + ' ' + CONVERT(VARCHAR, mtb_colr.num_ord) IN (" + colliINCondition +
|
||||
") AND mtb_colt.data_doc IS NULL ";
|
||||
|
||||
|
||||
Type typeOfObjectsList = new TypeToken<ArrayList<MtbColt>>() {}.getType();
|
||||
mSystemRestConsumer.processSql(sql, typeOfObjectsList, new ISimpleOperationCallback<ArrayList<MtbColt>>() {
|
||||
Type typeOfObjectsList = new TypeToken<ArrayList<RecoverMtbColt>>() {
|
||||
}.getType();
|
||||
mSystemRestConsumer.processSql(sql, typeOfObjectsList, new ISimpleOperationCallback<ArrayList<RecoverMtbColt>>() {
|
||||
@Override
|
||||
public void onSuccess(ArrayList<MtbColt> value) {
|
||||
if(onComplete != null) onComplete.run(value);
|
||||
public void onSuccess(ArrayList<RecoverMtbColt> value) {
|
||||
if (onComplete != null) onComplete.run(value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailed(Exception ex) {
|
||||
if(onFailed != null) onFailed.run(ex);
|
||||
if (onFailed != null) onFailed.run(ex);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@ -0,0 +1,17 @@
|
||||
package it.integry.integrywmsnative.gest.accettazione_picking.rest;
|
||||
|
||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
|
||||
public class RecoverMtbColt extends MtbColt {
|
||||
|
||||
private boolean flagCanBeRecovered;
|
||||
|
||||
public boolean isFlagCanBeRecovered() {
|
||||
return flagCanBeRecovered;
|
||||
}
|
||||
|
||||
public RecoverMtbColt setFlagCanBeRecovered(boolean flagCanBeRecovered) {
|
||||
this.flagCanBeRecovered = flagCanBeRecovered;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@ -6,12 +6,12 @@ import android.os.Bundle;
|
||||
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.data_cache.DataCache;
|
||||
import it.integry.integrywmsnative.core.expansion.BaseActivity;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgsWithReturn;
|
||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.PrinterRESTConsumer;
|
||||
import it.integry.integrywmsnative.databinding.ActivityListaBancaliBinding;
|
||||
@ -32,7 +32,7 @@ public class ListaBancaliActivity extends BaseActivity {
|
||||
|
||||
private ListaBancaliViewModel mViewModel;
|
||||
|
||||
private boolean mCanRecoverUl;
|
||||
private RunnableArgsWithReturn<MtbColt, Boolean> mCanRecoverUl;
|
||||
private PrinterRESTConsumer.Type mPrinterType;
|
||||
private String mReportName;
|
||||
private boolean mFlagOnlyResiduo;
|
||||
@ -41,34 +41,25 @@ public class ListaBancaliActivity extends BaseActivity {
|
||||
|
||||
|
||||
|
||||
public static Intent createIntent(Context context, ArrayList<MtbColt> items, boolean canRecoverUl, PrinterRESTConsumer.Type printerType, String reportName) {
|
||||
Intent myIntent = new Intent(context, ListaBancaliActivity.class);
|
||||
|
||||
String mtbColtsKey = DataCache.addItem(items);
|
||||
myIntent.putExtra(Key.MtbColtsKey, mtbColtsKey);
|
||||
|
||||
String canRecoverULKey = DataCache.addItem(canRecoverUl);
|
||||
myIntent.putExtra(Key.CanRecoverUL, canRecoverULKey);
|
||||
|
||||
String printerTypeKey = DataCache.addItem(printerType);
|
||||
myIntent.putExtra(Key.PrinterType, printerTypeKey);
|
||||
|
||||
String reportNameKey = DataCache.addItem(reportName);
|
||||
myIntent.putExtra(Key.ReportName, reportNameKey);
|
||||
|
||||
String flagOnlyResiduoKey = DataCache.addItem(true);
|
||||
myIntent.putExtra(Key.FlagOnlyResiduo, flagOnlyResiduoKey);
|
||||
|
||||
return myIntent;
|
||||
public static Intent createIntent(Context context, List<MtbColt> items, RunnableArgsWithReturn<MtbColt, Boolean> canRecoverUlAction, PrinterRESTConsumer.Type printerType, String reportName) {
|
||||
return createIntent(context, items, canRecoverUlAction, printerType, true, reportName);
|
||||
}
|
||||
|
||||
public static Intent createIntent(Context context, ArrayList<MtbColt> items, boolean canRecoverUl, PrinterRESTConsumer.Type printerType, boolean onlyResiduo) {
|
||||
public static Intent createIntent(Context context, List<MtbColt> items, boolean canRecoverUl, PrinterRESTConsumer.Type printerType, boolean onlyResiduo) {
|
||||
return createIntent(context, items, input -> canRecoverUl, printerType, onlyResiduo);
|
||||
}
|
||||
|
||||
public static Intent createIntent(Context context, List<MtbColt> items, RunnableArgsWithReturn<MtbColt, Boolean> canRecoverUlAction, PrinterRESTConsumer.Type printerType, boolean onlyResiduo) {
|
||||
return createIntent(context, items, canRecoverUlAction, printerType, onlyResiduo, null);
|
||||
}
|
||||
|
||||
public static Intent createIntent(Context context, List<MtbColt> items, RunnableArgsWithReturn<MtbColt, Boolean> canRecoverUlAction, PrinterRESTConsumer.Type printerType, boolean onlyResiduo, String reportName) {
|
||||
Intent myIntent = new Intent(context, ListaBancaliActivity.class);
|
||||
|
||||
String mtbColtsKey = DataCache.addItem(items);
|
||||
myIntent.putExtra(Key.MtbColtsKey, mtbColtsKey);
|
||||
|
||||
String canRecoverULKey = DataCache.addItem(canRecoverUl);
|
||||
String canRecoverULKey = DataCache.addItem(canRecoverUlAction);
|
||||
myIntent.putExtra(Key.CanRecoverUL, canRecoverULKey);
|
||||
|
||||
String printerTypeKey = DataCache.addItem(printerType);
|
||||
@ -77,9 +68,13 @@ public class ListaBancaliActivity extends BaseActivity {
|
||||
String flagOnlyResiduoKey = DataCache.addItem(onlyResiduo);
|
||||
myIntent.putExtra(Key.FlagOnlyResiduo, flagOnlyResiduoKey);
|
||||
|
||||
String reportNameKey = DataCache.addItem(reportName);
|
||||
myIntent.putExtra(Key.ReportName, reportNameKey);
|
||||
|
||||
return myIntent;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
@ -108,7 +103,7 @@ public class ListaBancaliActivity extends BaseActivity {
|
||||
}
|
||||
|
||||
public void startContenutoBancaleActivity(MtbColt item){
|
||||
Intent myIntent = ContenutoBancaleActivity.createIntent(this, item, mCanRecoverUl, mPrinterType, mReportName);
|
||||
Intent myIntent = ContenutoBancaleActivity.createIntent(this, item, mCanRecoverUl.run(item), mPrinterType, mReportName);
|
||||
startActivityForResult(myIntent, PICK_UL_REQUEST);
|
||||
}
|
||||
|
||||
|
||||
@ -309,10 +309,10 @@ public class PickingLiberoFragment extends Fragment implements ITitledFragment,
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLUClienteRequired(RunnableArgs<VtbDest> onComplete, Runnable onAbort) {
|
||||
DialogAskCliente.makeBase(getActivity(), (status, result) -> {
|
||||
public void onLUClienteRequired(RunnableArgss<VtbDest, String> onComplete, Runnable onAbort) {
|
||||
DialogAskCliente.makeBase(getActivity(), (status, result, codJcom) -> {
|
||||
if (status == DialogConsts.Results.YES) {
|
||||
onComplete.run(result);
|
||||
onComplete.run(result, codJcom);
|
||||
} else {
|
||||
onAbort.run();
|
||||
}
|
||||
@ -401,7 +401,8 @@ public class PickingLiberoFragment extends Fragment implements ITitledFragment,
|
||||
|
||||
@Override
|
||||
public void onPreDestroy(Runnable onComplete) {
|
||||
if(thereIsAnOpenedUL.get()) mViewModel.closeLU(onComplete);
|
||||
BarcodeManager.removeCallback(barcodeScannerIstanceID);
|
||||
if(thereIsAnOpenedUL.get()) mViewModel.closeLU(onComplete);
|
||||
else onComplete.run();
|
||||
}
|
||||
}
|
||||
|
||||
@ -6,9 +6,7 @@ import com.annimon.stream.Stream;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.GregorianCalendar;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
@ -181,15 +179,15 @@ public class PickingLiberoViewModel {
|
||||
|
||||
public void createNewLU(Integer customNumCollo, String customSerCollo, Runnable onComplete) {
|
||||
if (this.mFlagAskCliente) {
|
||||
this.sendLUClienteRequired(vtbDest -> {
|
||||
createNewLU_PostClienteAsk(customNumCollo, customSerCollo, vtbDest, onComplete);
|
||||
this.sendLUClienteRequired((vtbDest, codJcom) -> {
|
||||
createNewLU_PostClienteAsk(customNumCollo, customSerCollo, vtbDest, codJcom, onComplete);
|
||||
}, onComplete);
|
||||
} else {
|
||||
createNewLU_PostClienteAsk(customNumCollo, customSerCollo, null, onComplete);
|
||||
createNewLU_PostClienteAsk(customNumCollo, customSerCollo, null, null, onComplete);
|
||||
}
|
||||
}
|
||||
|
||||
private void createNewLU_PostClienteAsk(Integer customNumCollo, String customSerCollo, VtbDest vtbDest, Runnable onComplete) {
|
||||
private void createNewLU_PostClienteAsk(Integer customNumCollo, String customSerCollo, VtbDest vtbDest, String codJcom, Runnable onComplete) {
|
||||
MtbColt mtbColt = new MtbColt();
|
||||
mtbColt.initDefaultFields();
|
||||
mtbColt.setGestione(mDefaultGestione)
|
||||
@ -211,6 +209,10 @@ public class PickingLiberoViewModel {
|
||||
mtbColt.setCodVdes(vtbDest.getCodVdes());
|
||||
}
|
||||
|
||||
if(!UtilityString.isNullOrEmpty(codJcom)) {
|
||||
mtbColt.setCodJcom(codJcom);
|
||||
}
|
||||
|
||||
mColliMagazzinoRESTConsumer.saveCollo(mtbColt, value -> {
|
||||
mtbColt
|
||||
.setNumCollo(value.getNumCollo())
|
||||
@ -233,9 +235,9 @@ public class PickingLiberoViewModel {
|
||||
BigDecimal qtaColDaPrelevare = null;
|
||||
BigDecimal qtaCnfDaPrelevare = null;
|
||||
|
||||
BigDecimal initialNumCnf = null;
|
||||
BigDecimal initialQtaCnf = null;
|
||||
BigDecimal initialQtaTot = null;
|
||||
BigDecimal initialNumCnf;
|
||||
BigDecimal initialQtaCnf;
|
||||
BigDecimal initialQtaTot;
|
||||
|
||||
String partitaMag = null;
|
||||
Date dataScad = null;
|
||||
@ -758,7 +760,7 @@ public class PickingLiberoViewModel {
|
||||
if (this.mListener != null) mListener.onMtbColrDeleteRequest(onComplete);
|
||||
}
|
||||
|
||||
private void sendLUClienteRequired(RunnableArgs<VtbDest> onComplete, Runnable onAbort) {
|
||||
private void sendLUClienteRequired(RunnableArgss<VtbDest, String> onComplete, Runnable onAbort) {
|
||||
if (this.mListener != null) mListener.onLUClienteRequired(onComplete, onAbort);
|
||||
}
|
||||
|
||||
@ -816,7 +818,7 @@ public class PickingLiberoViewModel {
|
||||
|
||||
void onError(Exception ex);
|
||||
|
||||
void onLUClienteRequired(RunnableArgs<VtbDest> onComplete, Runnable onAbort);
|
||||
void onLUClienteRequired(RunnableArgss<VtbDest, String> onComplete, Runnable onAbort);
|
||||
|
||||
void onArtSelectionRequest(List<MtbColr> mtbColrsToPick, RunnableArgs<List<MtbColr>> onComplete, Runnable onAbort);
|
||||
|
||||
|
||||
@ -1,12 +1,11 @@
|
||||
package it.integry.integrywmsnative.gest.prod_recupero_materiale.viewmodel;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.text.SpannableString;
|
||||
|
||||
import androidx.databinding.ObservableArrayList;
|
||||
import androidx.databinding.ObservableField;
|
||||
import androidx.fragment.app.FragmentActivity;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
|
||||
import com.annimon.stream.Stream;
|
||||
@ -18,6 +17,7 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
import it.integry.barcode_base_android_library.model.BarcodeScanDTO;
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.barcode_reader.BarcodeCallbackDTO;
|
||||
import it.integry.integrywmsnative.core.barcode_reader.BarcodeManager;
|
||||
@ -31,6 +31,7 @@ import it.integry.integrywmsnative.core.rest.consumers.ColliMagazzinoRESTConsume
|
||||
import it.integry.integrywmsnative.core.rest.consumers.PrinterRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityBarcode;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityBigDecimal;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityProgress;
|
||||
@ -39,15 +40,16 @@ import it.integry.integrywmsnative.databinding.FragmentProdRecuperoMaterialeBind
|
||||
import it.integry.integrywmsnative.gest.prod_recupero_materiale.core.HistoryULsListAdapter;
|
||||
import it.integry.integrywmsnative.gest.prod_recupero_materiale.core.ProdRecuperoMaterialeHelper;
|
||||
import it.integry.integrywmsnative.gest.prod_recupero_materiale.dto.HistoryVersamentoProdULDTO;
|
||||
import it.integry.integrywmsnative.gest.spedizione.model.PickedQuantityDTO;
|
||||
import it.integry.integrywmsnative.view.dialogs.DialogCommon;
|
||||
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageHelper;
|
||||
import it.integry.integrywmsnative.view.dialogs.input_quantity.DialogInputQuantity;
|
||||
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQuantityV2;
|
||||
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQuantityV2DTO;
|
||||
import it.integry.integrywmsnative.view.dialogs.scan_or_create_lu.DialogScanOrCreateLU;
|
||||
import it.integry.barcode_base_android_library.model.BarcodeScanDTO;
|
||||
|
||||
public class ProdRecuperoMaterialeViewModel {
|
||||
|
||||
private Context mContext;
|
||||
private FragmentActivity mContext;
|
||||
|
||||
private FragmentProdRecuperoMaterialeBinding mBinding;
|
||||
private ProdRecuperoMaterialeHelper mHelper;
|
||||
@ -61,7 +63,7 @@ public class ProdRecuperoMaterialeViewModel {
|
||||
|
||||
private int barcodeScannerIstanceID = -1;
|
||||
|
||||
public void init(Activity context, FragmentProdRecuperoMaterialeBinding binding, ProdRecuperoMaterialeHelper helper, Runnable onRecuperoCompleted) {
|
||||
public void init(FragmentActivity context, FragmentProdRecuperoMaterialeBinding binding, ProdRecuperoMaterialeHelper helper, Runnable onRecuperoCompleted) {
|
||||
mContext = context;
|
||||
mBinding = binding;
|
||||
mHelper = helper;
|
||||
@ -152,31 +154,71 @@ public class ProdRecuperoMaterialeViewModel {
|
||||
}
|
||||
|
||||
|
||||
// private void dispatchItem(HistoryVersamentoProdULDTO item, MtbColt sourceMtbColt, Dialog dialogProgress) {
|
||||
// BigDecimal qtaDaEvadere = BigDecimal.ZERO;
|
||||
//
|
||||
// qtaDaEvadere = qtaDaEvadere.add(item.getQtaCol());
|
||||
//
|
||||
//
|
||||
// DialogInputQuantity.DTO dto = new DialogInputQuantity.DTO()
|
||||
// .setBatchLot(item.getPartitaMag())
|
||||
// .setQtaDaEvadere(null)
|
||||
// .setQtaOrd(null)
|
||||
// .setMtbAart(item.getMtbAart())
|
||||
// .setCanPartitaMagBeChanged(false)
|
||||
// .setNumCnf(1)
|
||||
// .setQtaCnf(item.getQtaCnf())
|
||||
// .setQtaTot(item.getQtaCnf())
|
||||
// .setMaxQta(qtaDaEvadere)
|
||||
// .setQtaDisponibile(qtaDaEvadere);
|
||||
//
|
||||
// DialogInputQuantity.makeBase(mContext, dto, false, quantity -> {
|
||||
// onItemDispatched(item, quantity.qtaTot.getBigDecimal(), sourceMtbColt, dialogProgress);
|
||||
// }, () -> {
|
||||
// if (dialogProgress != null) dialogProgress.dismiss();
|
||||
// }).show();
|
||||
// }
|
||||
|
||||
|
||||
private void dispatchItem(HistoryVersamentoProdULDTO item, MtbColt sourceMtbColt, Dialog dialogProgress) {
|
||||
BigDecimal qtaDaEvadere = BigDecimal.ZERO;
|
||||
BigDecimal numCnfDaEvadere = BigDecimal.ZERO;
|
||||
|
||||
qtaDaEvadere = qtaDaEvadere.add(item.getQtaCol());
|
||||
|
||||
|
||||
DialogInputQuantity.DTO dto = new DialogInputQuantity.DTO()
|
||||
.setBatchLot(item.getPartitaMag())
|
||||
.setQtaDaEvadere(null)
|
||||
.setQtaOrd(null)
|
||||
.setMtbAart(item.getMtbAart())
|
||||
.setCanPartitaMagBeChanged(false)
|
||||
.setNumCnf(1)
|
||||
.setQtaCnf(item.getQtaCnf())
|
||||
.setQtaTot(item.getQtaCnf())
|
||||
.setMaxQta(qtaDaEvadere)
|
||||
.setQtaDisponibile(qtaDaEvadere);
|
||||
|
||||
DialogInputQuantity.makeBase(mContext, dto, false, quantity -> {
|
||||
onItemDispatched(item, quantity.qtaTot.getBigDecimal(), sourceMtbColt, dialogProgress);
|
||||
}, () -> {
|
||||
if (dialogProgress != null) dialogProgress.dismiss();
|
||||
}).show();
|
||||
if(!UtilityBigDecimal.equalsTo(qtaDaEvadere, BigDecimal.ZERO)) {
|
||||
numCnfDaEvadere = UtilityBigDecimal.divide(qtaDaEvadere, item.getQtaCnf());
|
||||
}
|
||||
|
||||
DialogInputQuantityV2DTO dialogInputQuantityV2DTO = new DialogInputQuantityV2DTO()
|
||||
.setMtbAart(item.getMtbAart())
|
||||
.setInitialNumCnf(BigDecimal.ONE)
|
||||
.setInitialQtaCnf(item.getQtaCnf())
|
||||
.setInitialQtaTot(item.getQtaCnf())
|
||||
|
||||
.setTotalQtaAvailable(qtaDaEvadere)
|
||||
.setTotalNumCnfAvailable(numCnfDaEvadere)
|
||||
.setQtaCnfAvailable(item.getQtaCnf())
|
||||
.setPartitaMag(item.getPartitaMag())
|
||||
// .setDataScad(item.getDa)
|
||||
.setCanOverflowOrderQuantity(false)
|
||||
.setCanLUBeClosed(false);
|
||||
|
||||
DialogInputQuantityV2
|
||||
.newInstance(dialogInputQuantityV2DTO, (resultDTO, shouldCloseLU) -> {
|
||||
PickedQuantityDTO pickedQuantityDTO = new PickedQuantityDTO()
|
||||
.setNumCnf(resultDTO.getNumCnf())
|
||||
.setQtaCnf(resultDTO.getQtaCnf())
|
||||
.setQtaTot(resultDTO.getQtaTot())
|
||||
.setPartitaMag(resultDTO.getPartitaMag())
|
||||
.setDataScad(resultDTO.getDataScad());
|
||||
|
||||
onItemDispatched(item, resultDTO.getQtaTot(), sourceMtbColt, dialogProgress);
|
||||
}, () -> {
|
||||
if (dialogProgress != null) dialogProgress.dismiss();
|
||||
})
|
||||
.show(mContext.getSupportFragmentManager(), "tag");
|
||||
}
|
||||
|
||||
private void onItemDispatched(HistoryVersamentoProdULDTO item, BigDecimal quantity, MtbColt sourceMtbColt, Dialog progress) {
|
||||
|
||||
|
||||
@ -1,7 +1,5 @@
|
||||
package it.integry.integrywmsnative.gest.rettifica_giacenze;
|
||||
|
||||
import androidx.databinding.ObservableArrayList;
|
||||
|
||||
import com.annimon.stream.Stream;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
@ -27,12 +25,12 @@ import it.integry.integrywmsnative.core.model.MtbColr;
|
||||
import it.integry.integrywmsnative.core.model.MtbCols;
|
||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
import it.integry.integrywmsnative.core.model.MtbDepoPosizione;
|
||||
import it.integry.integrywmsnative.core.model.dto.PickDataDTO;
|
||||
import it.integry.integrywmsnative.core.report.ReportManager;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.ArticoloRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.BarcodeRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.ColliMagazzinoRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.PrinterRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityBarcode;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityBigDecimal;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||
@ -40,7 +38,6 @@ import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||
import it.integry.integrywmsnative.gest.rettifica_giacenze.core.RettificaGiacenzeRESTConsumer;
|
||||
import it.integry.integrywmsnative.gest.rettifica_giacenze.dto.FornitoreDTO;
|
||||
import it.integry.integrywmsnative.gest.spedizione.exceptions.InvalidPesoKGException;
|
||||
import it.integry.integrywmsnative.core.model.dto.PickDataDTO;
|
||||
import it.integry.integrywmsnative.gest.spedizione.model.PickedQuantityDTO;
|
||||
import it.integry.integrywmsnative.gest.spedizione.model.PickingObjectDTO;
|
||||
|
||||
@ -329,7 +326,7 @@ public class RettificaGiacenzeViewModel {
|
||||
|
||||
mtbColr.setOperation(CommonModelConsts.OPERATION.INSERT_OR_UPDATE);
|
||||
|
||||
if (!mIsCreatedLU && mCurrentMtbColt.isDocumentPresent()) {
|
||||
// if (!mIsCreatedLU && mCurrentMtbColt.isDocumentPresent()) {
|
||||
mtbColr
|
||||
.setQtaCol(BigDecimal.ZERO)
|
||||
.setNumCnf(BigDecimal.ZERO)
|
||||
@ -359,39 +356,39 @@ public class RettificaGiacenzeViewModel {
|
||||
|
||||
if (shouldCloseLU) closeLU(true, null);
|
||||
}, this::sendError);
|
||||
} else {
|
||||
mtbColr
|
||||
.setQtaCol(qtaTot)
|
||||
.setQtaCnf(qtaCnf)
|
||||
.setNumCnf(numCnf);
|
||||
|
||||
MtbColt cloneMtbColt = (MtbColt) mCurrentMtbColt.clone();
|
||||
cloneMtbColt.setOperation(CommonModelConsts.OPERATION.NO_OP);
|
||||
|
||||
cloneMtbColt.setMtbColr(new ObservableArrayList<>());
|
||||
|
||||
cloneMtbColt.getMtbColr().add(mtbColr);
|
||||
|
||||
mColliMagazzinoRESTConsumer.saveCollo(cloneMtbColt, value -> {
|
||||
mtbColr
|
||||
.setDataCollo(value.getDataColloS())
|
||||
.setNumCollo(value.getNumCollo())
|
||||
.setGestione(value.getGestione())
|
||||
.setSerCollo(value.getSerCollo())
|
||||
.setRiga(value.getMtbColr().get(0).getRiga())
|
||||
.setUntMis(pickingObjectDTO.getMtbAart().getUntMis())
|
||||
.setMtbAart(pickingObjectDTO.getMtbAart());
|
||||
|
||||
mCurrentMtbColt.getMtbColr().add(mtbColr);
|
||||
|
||||
this.mAnyEditDone = true;
|
||||
|
||||
this.sendOnRowSaved();
|
||||
this.sendOnLoadingEnded();
|
||||
|
||||
if (shouldCloseLU) closeLU(true, null);
|
||||
}, this::sendError);
|
||||
}
|
||||
// } else {
|
||||
// mtbColr
|
||||
// .setQtaCol(qtaTot)
|
||||
// .setQtaCnf(qtaCnf)
|
||||
// .setNumCnf(numCnf);
|
||||
//
|
||||
// MtbColt cloneMtbColt = (MtbColt) mCurrentMtbColt.clone();
|
||||
// cloneMtbColt.setOperation(CommonModelConsts.OPERATION.NO_OP);
|
||||
//
|
||||
// cloneMtbColt.setMtbColr(new ObservableArrayList<>());
|
||||
//
|
||||
// cloneMtbColt.getMtbColr().add(mtbColr);
|
||||
//
|
||||
// mColliMagazzinoRESTConsumer.saveCollo(cloneMtbColt, value -> {
|
||||
// mtbColr
|
||||
// .setDataCollo(value.getDataColloS())
|
||||
// .setNumCollo(value.getNumCollo())
|
||||
// .setGestione(value.getGestione())
|
||||
// .setSerCollo(value.getSerCollo())
|
||||
// .setRiga(value.getMtbColr().get(0).getRiga())
|
||||
// .setUntMis(pickingObjectDTO.getMtbAart().getUntMis())
|
||||
// .setMtbAart(pickingObjectDTO.getMtbAart());
|
||||
//
|
||||
// mCurrentMtbColt.getMtbColr().add(mtbColr);
|
||||
//
|
||||
// this.mAnyEditDone = true;
|
||||
//
|
||||
// this.sendOnRowSaved();
|
||||
// this.sendOnLoadingEnded();
|
||||
//
|
||||
// if (shouldCloseLU) closeLU(true, null);
|
||||
// }, this::sendError);
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
@ -556,7 +553,7 @@ public class RettificaGiacenzeViewModel {
|
||||
private void saveEditedRow(MtbColr mtbColrToUpdate, BigDecimal numCnf, BigDecimal qtaCnf, BigDecimal qtaTot, String partitaMag, Date dataScad, boolean shouldCloseLU) {
|
||||
this.sendOnLoadingStarted();
|
||||
|
||||
if(!mIsCreatedLU && mCurrentMtbColt.isDocumentPresent()) {
|
||||
// if(!mIsCreatedLU && mCurrentMtbColt.isDocumentPresent()) {
|
||||
|
||||
this.mColliMagazzinoRESTConsumer.creaRettificaCollo(
|
||||
mtbColrToUpdate,
|
||||
@ -579,46 +576,46 @@ public class RettificaGiacenzeViewModel {
|
||||
this::sendError
|
||||
);
|
||||
|
||||
} else {
|
||||
|
||||
MtbColt mtbColt = new MtbColt()
|
||||
.setNumCollo(mtbColrToUpdate.getNumCollo())
|
||||
.setDataCollo(mtbColrToUpdate.getDataColloS())
|
||||
.setSerCollo(mtbColrToUpdate.getSerCollo())
|
||||
.setGestione(mtbColrToUpdate.getGestione())
|
||||
.setMtbColr(new ObservableArrayList<>());
|
||||
mtbColt.setOperation(CommonModelConsts.OPERATION.NO_OP);
|
||||
|
||||
final MtbColr mtbColr = (MtbColr) mtbColrToUpdate.clone();
|
||||
mtbColr
|
||||
.setNumCnf(numCnf.subtract(mtbColr.getNumCnf()))
|
||||
.setQtaCnf(qtaCnf)
|
||||
.setQtaCol(qtaTot.subtract(mtbColr.getQtaCol()))
|
||||
.setPartitaMag(partitaMag)
|
||||
.setDataScadPartita(dataScad)
|
||||
.setUtente(SettingsManager.i().getUser().getFullname())
|
||||
.setCausale(MtbColr.Causale.RETTIFICA)
|
||||
.setDatetimeRow(UtilityDate.getDateInstance())
|
||||
.setOperation(CommonModelConsts.OPERATION.INSERT);
|
||||
|
||||
mtbColt.getMtbColr().add(mtbColr);
|
||||
|
||||
this.mColliMagazzinoRESTConsumer.saveCollo(mtbColt, (value) -> {
|
||||
|
||||
mtbColr.setNumCnf(numCnf)
|
||||
.setQtaCnf(qtaCnf)
|
||||
.setQtaCol(qtaTot);
|
||||
|
||||
this.mCurrentMtbColt.getMtbColr().remove(mtbColrToUpdate);
|
||||
this.mCurrentMtbColt.getMtbColr().add(mtbColr);
|
||||
|
||||
this.mAnyEditDone = true;
|
||||
|
||||
this.sendOnRowSaved();
|
||||
this.sendOnLoadingEnded();
|
||||
|
||||
}, this::sendError);
|
||||
}
|
||||
// } else {
|
||||
//
|
||||
// MtbColt mtbColt = new MtbColt()
|
||||
// .setNumCollo(mtbColrToUpdate.getNumCollo())
|
||||
// .setDataCollo(mtbColrToUpdate.getDataColloS())
|
||||
// .setSerCollo(mtbColrToUpdate.getSerCollo())
|
||||
// .setGestione(mtbColrToUpdate.getGestione())
|
||||
// .setMtbColr(new ObservableArrayList<>());
|
||||
// mtbColt.setOperation(CommonModelConsts.OPERATION.NO_OP);
|
||||
//
|
||||
// final MtbColr mtbColr = (MtbColr) mtbColrToUpdate.clone();
|
||||
// mtbColr
|
||||
// .setNumCnf(numCnf.subtract(mtbColr.getNumCnf()))
|
||||
// .setQtaCnf(qtaCnf)
|
||||
// .setQtaCol(qtaTot.subtract(mtbColr.getQtaCol()))
|
||||
// .setPartitaMag(partitaMag)
|
||||
// .setDataScadPartita(dataScad)
|
||||
// .setUtente(SettingsManager.i().getUser().getFullname())
|
||||
// .setCausale(MtbColr.Causale.RETTIFICA)
|
||||
// .setDatetimeRow(UtilityDate.getDateInstance())
|
||||
// .setOperation(CommonModelConsts.OPERATION.INSERT);
|
||||
//
|
||||
// mtbColt.getMtbColr().add(mtbColr);
|
||||
//
|
||||
// this.mColliMagazzinoRESTConsumer.saveCollo(mtbColt, (value) -> {
|
||||
//
|
||||
// mtbColr.setNumCnf(numCnf)
|
||||
// .setQtaCnf(qtaCnf)
|
||||
// .setQtaCol(qtaTot);
|
||||
//
|
||||
// this.mCurrentMtbColt.getMtbColr().remove(mtbColrToUpdate);
|
||||
// this.mCurrentMtbColt.getMtbColr().add(mtbColr);
|
||||
//
|
||||
// this.mAnyEditDone = true;
|
||||
//
|
||||
// this.sendOnRowSaved();
|
||||
// this.sendOnLoadingEnded();
|
||||
//
|
||||
// }, this::sendError);
|
||||
// }
|
||||
}
|
||||
|
||||
public void deleteRow(MtbColr mtbColrToDelete) {
|
||||
@ -626,7 +623,7 @@ public class RettificaGiacenzeViewModel {
|
||||
if (shouldDelete) {
|
||||
this.sendOnLoadingStarted();
|
||||
|
||||
if(!mIsCreatedLU && mCurrentMtbColt.isDocumentPresent()) {
|
||||
// if(!mIsCreatedLU && mCurrentMtbColt.isDocumentPresent()) {
|
||||
this.mColliMagazzinoRESTConsumer.creaRettificaCollo(
|
||||
mtbColrToDelete,
|
||||
BigDecimal.ZERO,
|
||||
@ -638,37 +635,37 @@ public class RettificaGiacenzeViewModel {
|
||||
},
|
||||
this::sendError
|
||||
);
|
||||
} else {
|
||||
MtbColt mtbColt = new MtbColt()
|
||||
.setNumCollo(mtbColrToDelete.getNumCollo())
|
||||
.setDataCollo(mtbColrToDelete.getDataColloS())
|
||||
.setSerCollo(mtbColrToDelete.getSerCollo())
|
||||
.setGestione(mtbColrToDelete.getGestione())
|
||||
.setMtbColr(new ObservableArrayList<>());
|
||||
mtbColt.setOperation(CommonModelConsts.OPERATION.NO_OP);
|
||||
|
||||
MtbColr mtbColr = (MtbColr) mtbColrToDelete.clone();
|
||||
mtbColr
|
||||
.setNumCnf(mtbColr.getNumCnf().multiply(new BigDecimal(-1)))
|
||||
.setQtaCnf(mtbColr.getQtaCnf())
|
||||
.setQtaCol(mtbColr.getQtaCol().multiply(new BigDecimal(-1)))
|
||||
.setPartitaMag(mtbColr.getPartitaMag())
|
||||
.setDataScadPartita(mtbColr.getDataScadPartitaD())
|
||||
.setUtente(SettingsManager.i().getUser().getFullname())
|
||||
.setCausale(MtbColr.Causale.RETTIFICA)
|
||||
.setDatetimeRow(UtilityDate.getDateInstance())
|
||||
.setOperation(CommonModelConsts.OPERATION.INSERT);
|
||||
|
||||
mtbColt.getMtbColr().add(mtbColr);
|
||||
|
||||
this.mColliMagazzinoRESTConsumer.saveCollo(mtbColt, (value) -> {
|
||||
this.mCurrentMtbColt.getMtbColr().remove(mtbColrToDelete);
|
||||
|
||||
this.sendOnRowSaved();
|
||||
this.sendOnLoadingEnded();
|
||||
|
||||
}, this::sendError);
|
||||
}
|
||||
// } else {
|
||||
// MtbColt mtbColt = new MtbColt()
|
||||
// .setNumCollo(mtbColrToDelete.getNumCollo())
|
||||
// .setDataCollo(mtbColrToDelete.getDataColloS())
|
||||
// .setSerCollo(mtbColrToDelete.getSerCollo())
|
||||
// .setGestione(mtbColrToDelete.getGestione())
|
||||
// .setMtbColr(new ObservableArrayList<>());
|
||||
// mtbColt.setOperation(CommonModelConsts.OPERATION.NO_OP);
|
||||
//
|
||||
// MtbColr mtbColr = (MtbColr) mtbColrToDelete.clone();
|
||||
// mtbColr
|
||||
// .setNumCnf(mtbColr.getNumCnf().multiply(new BigDecimal(-1)))
|
||||
// .setQtaCnf(mtbColr.getQtaCnf())
|
||||
// .setQtaCol(mtbColr.getQtaCol().multiply(new BigDecimal(-1)))
|
||||
// .setPartitaMag(mtbColr.getPartitaMag())
|
||||
// .setDataScadPartita(mtbColr.getDataScadPartitaD())
|
||||
// .setUtente(SettingsManager.i().getUser().getFullname())
|
||||
// .setCausale(MtbColr.Causale.RETTIFICA)
|
||||
// .setDatetimeRow(UtilityDate.getDateInstance())
|
||||
// .setOperation(CommonModelConsts.OPERATION.INSERT);
|
||||
//
|
||||
// mtbColt.getMtbColr().add(mtbColr);
|
||||
//
|
||||
// this.mColliMagazzinoRESTConsumer.saveCollo(mtbColt, (value) -> {
|
||||
// this.mCurrentMtbColt.getMtbColr().remove(mtbColrToDelete);
|
||||
//
|
||||
// this.sendOnRowSaved();
|
||||
// this.sendOnLoadingEnded();
|
||||
//
|
||||
// }, this::sendError);
|
||||
// }
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@ -137,6 +137,10 @@ public class VersamentoMerceViewModel {
|
||||
UtilityExceptions.defaultException(mContext, ex, progressDialog);
|
||||
BarcodeManager.enable();
|
||||
});
|
||||
} else {
|
||||
progressDialog.dismiss();
|
||||
BarcodeManager.enable();
|
||||
showTooMuchULFound();
|
||||
}
|
||||
|
||||
}, ex -> {
|
||||
@ -148,6 +152,12 @@ public class VersamentoMerceViewModel {
|
||||
}
|
||||
}
|
||||
|
||||
private void showTooMuchULFound() {
|
||||
DialogSimpleMessageHelper.makeWarningDialog(mContext,
|
||||
new SpannableString(mContext.getResources().getText(R.string.too_much_lu_found_message_in_mono_lu)),
|
||||
null, null).show();
|
||||
}
|
||||
|
||||
private void executeEtichettaEan128(BarcodeScanDTO barcodeScanDTO, Dialog progressDialog) {
|
||||
BarcodeRESTConsumer.decodeEan128Static(barcodeScanDTO, ean128Model -> {
|
||||
|
||||
|
||||
@ -16,6 +16,7 @@ import com.google.android.material.textfield.TextInputLayout;
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.model.MtbDepoPosizione;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityDialog;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityFocus;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityPosizione;
|
||||
|
||||
@ -55,6 +56,8 @@ public class DialogAskLivelloPosizione {
|
||||
mDialog.setCancelable(false);
|
||||
mDialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
|
||||
|
||||
UtilityDialog.setTo90PercentWidth(mContext, mDialog);
|
||||
|
||||
mDialog.setOnDismissListener(dialog -> {
|
||||
if(!completedFLow) onComplete.run(null);
|
||||
});
|
||||
|
||||
@ -15,7 +15,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgss;
|
||||
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.databinding.DialogAskClienteBinding;
|
||||
@ -32,11 +32,11 @@ public class DialogAskCliente {
|
||||
private DialogAskClienteBinding mBinding;
|
||||
|
||||
|
||||
public static Dialog makeBase(final Context context, RunnableArgss<DialogConsts.Results, VtbDest> onComplete) {
|
||||
public static Dialog makeBase(final Context context, RunnableArgsss<DialogConsts.Results, VtbDest, String> onComplete) {
|
||||
return new DialogAskCliente(context, onComplete).mDialog;
|
||||
}
|
||||
|
||||
public DialogAskCliente(Context context, RunnableArgss<DialogConsts.Results, VtbDest> onComplete) {
|
||||
public DialogAskCliente(Context context, RunnableArgsss<DialogConsts.Results, VtbDest, String> onComplete) {
|
||||
mContext = context;
|
||||
|
||||
|
||||
@ -72,25 +72,24 @@ public class DialogAskCliente {
|
||||
|
||||
viewModel1
|
||||
.setOnConfirmClickListener(() -> {
|
||||
|
||||
viewModel2.setCodAnag(viewModel1.getCurrentCliente().getCodAnag());
|
||||
viewModel2.setCodAnag(viewModel1.getCurrentCliente());
|
||||
|
||||
mBinding.viewpager.setCurrentItem(mBinding.viewpager.getCurrentItem() + 1, true);
|
||||
});
|
||||
|
||||
viewModel1.setOnAbortClickListener(() -> {
|
||||
mDialog.dismiss();
|
||||
onComplete.run(DialogConsts.Results.ABORT, null);
|
||||
onComplete.run(DialogConsts.Results.ABORT, null, null);
|
||||
});
|
||||
|
||||
viewModel2.setOnConfirmClickListener(() -> {
|
||||
onComplete.run(DialogConsts.Results.YES, viewModel2.getCurrentDestinatario().toVtbDestModel());
|
||||
onComplete.run(DialogConsts.Results.YES, viewModel2.getCurrentDestinatario().toVtbDestModel(), viewModel1.getCurrentCommessa());
|
||||
mDialog.dismiss();
|
||||
});
|
||||
|
||||
viewModel2.setOnAbortClickListener(() -> {
|
||||
mDialog.dismiss();
|
||||
onComplete.run(DialogConsts.Results.ABORT, null);
|
||||
onComplete.run(DialogConsts.Results.ABORT, null, null);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
@ -1,10 +1,12 @@
|
||||
package it.integry.integrywmsnative.view.dialogs.ask_cliente.dto;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class DialogAskClienteClienteDTO {
|
||||
|
||||
private String codAnag;
|
||||
|
||||
private String ragSoc;
|
||||
private ArrayList<String> codJcoms = new ArrayList<>();
|
||||
|
||||
public String getCodAnag() {
|
||||
return codAnag;
|
||||
@ -24,6 +26,14 @@ public class DialogAskClienteClienteDTO {
|
||||
return this;
|
||||
}
|
||||
|
||||
public ArrayList<String> getCodJcoms() {
|
||||
return codJcoms;
|
||||
}
|
||||
|
||||
public DialogAskClienteClienteDTO setCodJcoms(ArrayList<String> codJcoms) {
|
||||
this.codJcoms = codJcoms;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
|
||||
@ -2,18 +2,32 @@ package it.integry.integrywmsnative.view.dialogs.ask_cliente.viewmodel;
|
||||
|
||||
import android.content.Context;
|
||||
import android.widget.AutoCompleteTextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.databinding.ObservableArrayList;
|
||||
import androidx.databinding.ObservableList;
|
||||
import androidx.databinding.ViewDataBinding;
|
||||
|
||||
import com.annimon.stream.Optional;
|
||||
import com.annimon.stream.Stream;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.tfb.fbtoast.FBToast;
|
||||
|
||||
import java.lang.reflect.Type;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import it.integry.barcode_base_android_library.model.BarcodeScanDTO;
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.barcode_reader.BarcodeCallbackDTO;
|
||||
import it.integry.integrywmsnative.core.barcode_reader.BarcodeManager;
|
||||
import it.integry.integrywmsnative.core.expansion.OnListGeneralChangedCallback;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.ISimpleOperationCallback;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.SystemRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityHashMap;
|
||||
import it.integry.integrywmsnative.databinding.DialogAskClientePage1Binding;
|
||||
import it.integry.integrywmsnative.view.dialogs.ask_cliente.dto.DialogAskClienteClienteDTO;
|
||||
|
||||
@ -22,7 +36,10 @@ public class DialogAskCliente_Page1ViewModel implements IDialogAskClienteViewMod
|
||||
private Context mContext;
|
||||
private DialogAskClientePage1Binding mBinding;
|
||||
|
||||
private List<DialogAskClienteClienteDTO> availableClienti;
|
||||
private int mBarcodeScannerInstanceID;
|
||||
|
||||
private ArrayList<DialogAskClienteClienteDTO> availableClienti;
|
||||
private ObservableArrayList<String> codJcoms = new ObservableArrayList<>();
|
||||
|
||||
public DialogAskCliente_Page1ViewModel() {
|
||||
|
||||
@ -41,18 +58,43 @@ public class DialogAskCliente_Page1ViewModel implements IDialogAskClienteViewMod
|
||||
@Override
|
||||
public void onShow() {
|
||||
|
||||
String sql = "SELECT gtb_anag.cod_anag, rag_soc " +
|
||||
String sql = "SELECT gtb_anag.cod_anag, rag_soc, jtb_comt.cod_jcom " +
|
||||
"FROM gtb_anag " +
|
||||
"LEFT OUTER JOIN jtb_comt ON gtb_anag.cod_anag = jtb_comt.cod_anag " +
|
||||
"INNER JOIN vtb_clie ON gtb_anag.cod_anag = vtb_clie.cod_anag " +
|
||||
"WHERE vtb_clie.flag_stato = 'A' " +
|
||||
"ORDER BY rag_soc";
|
||||
|
||||
Type typeOfObjectsList = new TypeToken<ArrayList<DialogAskClienteClienteDTO>>() {}.getType();
|
||||
SystemRESTConsumer.processSqlStatic(sql, typeOfObjectsList, new ISimpleOperationCallback<ArrayList<DialogAskClienteClienteDTO>>() {
|
||||
Type typeOfObjectsList = new TypeToken<ArrayList<HashMap<String, Object>>>() {
|
||||
}.getType();
|
||||
SystemRESTConsumer.processSqlStatic(sql, typeOfObjectsList, new ISimpleOperationCallback<ArrayList<HashMap<String, Object>>>() {
|
||||
@Override
|
||||
public void onSuccess(ArrayList<DialogAskClienteClienteDTO> value) {
|
||||
availableClienti = value;
|
||||
initializeAdapter(value);
|
||||
public void onSuccess(ArrayList<HashMap<String, Object>> value) {
|
||||
|
||||
availableClienti = new ArrayList<>();
|
||||
|
||||
Stream.of(value)
|
||||
.groupBy(x -> x.get("codAnag").toString() + " " + x.get("ragSoc").toString())
|
||||
.forEach(x -> {
|
||||
DialogAskClienteClienteDTO dialogAskClienteClienteDTO = new DialogAskClienteClienteDTO();
|
||||
dialogAskClienteClienteDTO.setCodAnag(UtilityHashMap.getValueIfExists(x.getValue().get(0), "codAnag"));
|
||||
dialogAskClienteClienteDTO.setRagSoc(UtilityHashMap.getValueIfExists(x.getValue().get(0), "ragSoc"));
|
||||
|
||||
for (HashMap<String, Object> group : x.getValue()) {
|
||||
if (group.containsKey("codJcom")) {
|
||||
dialogAskClienteClienteDTO.getCodJcoms().add(UtilityHashMap.getValueIfExists(group, "codJcom"));
|
||||
}
|
||||
}
|
||||
|
||||
availableClienti.add(dialogAskClienteClienteDTO);
|
||||
});
|
||||
|
||||
initializeAdapter(availableClienti);
|
||||
|
||||
mBarcodeScannerInstanceID = BarcodeManager.addCallback(new BarcodeCallbackDTO()
|
||||
.setOnScanSuccessfull(onScanSuccessful)
|
||||
.setOnScanFailed(ex -> UtilityExceptions.defaultException(mContext, ex, false)));
|
||||
BarcodeManager.enable();
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -66,9 +108,10 @@ public class DialogAskCliente_Page1ViewModel implements IDialogAskClienteViewMod
|
||||
@Override
|
||||
public void setOnConfirmClickListener(Runnable onConfirm) {
|
||||
this.mBinding.buttonYes.setOnClickListener(v -> {
|
||||
if(validateCliente()) {
|
||||
if (validateCliente()) {
|
||||
this.resetClienteError();
|
||||
if(onConfirm != null) onConfirm.run();
|
||||
BarcodeManager.removeCallback(mBarcodeScannerInstanceID);
|
||||
if (onConfirm != null) onConfirm.run();
|
||||
} else {
|
||||
this.setClienteError(mContext.getResources().getText(R.string.not_valid_customer_error).toString());
|
||||
}
|
||||
@ -76,22 +119,90 @@ public class DialogAskCliente_Page1ViewModel implements IDialogAskClienteViewMod
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
private final RunnableArgs<BarcodeScanDTO> onScanSuccessful = data -> {
|
||||
BarcodeManager.disable();
|
||||
|
||||
String barcode = data.getStringValue();
|
||||
|
||||
DialogAskClienteClienteDTO resultCodAnag = searchBarcodeInCodAnag(barcode);
|
||||
|
||||
if (resultCodAnag != null) {
|
||||
mBinding.dropdownCliente.setText(resultCodAnag.toString());
|
||||
refreshCodJcoms(resultCodAnag);
|
||||
} else {
|
||||
DialogAskClienteClienteDTO resultCodJcom = searchBarcodeInCodJcom(barcode);
|
||||
|
||||
if(resultCodJcom != null) {
|
||||
mBinding.dropdownCliente.setText(resultCodJcom.toString());
|
||||
refreshCodJcoms(resultCodJcom);
|
||||
mBinding.dropdownCommessa.setText(barcode);
|
||||
} else {
|
||||
FBToast.errorToast(mContext, "Nessun risultato trovato", Toast.LENGTH_LONG);
|
||||
mBinding.dropdownCliente.setText("");
|
||||
mBinding.dropdownCommessa.setText("");
|
||||
}
|
||||
}
|
||||
|
||||
BarcodeManager.enable();
|
||||
};
|
||||
|
||||
|
||||
private DialogAskClienteClienteDTO searchBarcodeInCodAnag(String barcode) {
|
||||
List<DialogAskClienteClienteDTO> resultCodAnag = Stream.of(availableClienti)
|
||||
.filter(x -> barcode.equalsIgnoreCase(x.getCodAnag()))
|
||||
.toList();
|
||||
if (resultCodAnag.size() > 0) {
|
||||
return resultCodAnag.get(0);
|
||||
} else return null;
|
||||
}
|
||||
|
||||
private DialogAskClienteClienteDTO searchBarcodeInCodJcom(String barcode) {
|
||||
List<DialogAskClienteClienteDTO> resultCodJcom = Stream.of(availableClienti)
|
||||
.filter(x -> x.getCodJcoms().contains(barcode))
|
||||
.toList();
|
||||
if (resultCodJcom.size() > 0) {
|
||||
return resultCodJcom.get(0);
|
||||
} else return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setOnAbortClickListener(Runnable onAbort) {
|
||||
this.mBinding.buttonNo.setOnClickListener(v -> {
|
||||
if(onAbort != null) onAbort.run();
|
||||
if (onAbort != null) onAbort.run();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
private void initializeAdapter(ArrayList<DialogAskClienteClienteDTO> items) {
|
||||
DialogAskCliente_Page1_Cliente_ArrayAdapter adapter = new DialogAskCliente_Page1_Cliente_ArrayAdapter(mContext, items);
|
||||
|
||||
DialogAskCliente_Page1_ArrayAdapter adapter = new DialogAskCliente_Page1_ArrayAdapter(mContext, items);
|
||||
AutoCompleteTextView editTextDropdownCliente = mBinding.dropdownCliente;
|
||||
editTextDropdownCliente.setThreshold(0);
|
||||
editTextDropdownCliente.setAdapter(adapter);
|
||||
editTextDropdownCliente.setOnItemClickListener((parent, view, position, id) -> {
|
||||
refreshCodJcoms(items.get(position));
|
||||
});
|
||||
|
||||
|
||||
AutoCompleteTextView editTextFilledExposedDropdown = mBinding.filledExposedDropdown;
|
||||
editTextFilledExposedDropdown.setThreshold(0);
|
||||
editTextFilledExposedDropdown.setAdapter(adapter);
|
||||
DialogAskCliente_Page1_Commessa_ArrayAdapter commessaAdapter = new DialogAskCliente_Page1_Commessa_ArrayAdapter(mContext);
|
||||
|
||||
AutoCompleteTextView editTextDropdownCommessa = mBinding.dropdownCommessa;
|
||||
editTextDropdownCommessa.setThreshold(0);
|
||||
editTextDropdownCommessa.setAdapter(commessaAdapter);
|
||||
|
||||
codJcoms.addOnListChangedCallback(new OnListGeneralChangedCallback() {
|
||||
@Override
|
||||
public void onChanged(ObservableList sender) {
|
||||
commessaAdapter.clear();
|
||||
commessaAdapter.addAll(codJcoms);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void refreshCodJcoms(DialogAskClienteClienteDTO item) {
|
||||
codJcoms.clear();
|
||||
codJcoms.addAll(item.getCodJcoms());
|
||||
}
|
||||
|
||||
|
||||
@ -99,22 +210,34 @@ public class DialogAskCliente_Page1ViewModel implements IDialogAskClienteViewMod
|
||||
return getCurrentCliente() != null;
|
||||
}
|
||||
|
||||
public DialogAskClienteClienteDTO getCurrentCliente() {
|
||||
for (DialogAskClienteClienteDTO cliente : availableClienti) {
|
||||
if(cliente.getRagSoc().equalsIgnoreCase(mBinding.inputCliente.getEditText().getText().toString())) {
|
||||
return cliente;
|
||||
}
|
||||
public String getCurrentCliente() {
|
||||
Optional<DialogAskClienteClienteDTO> result = Stream.of(availableClienti)
|
||||
.filter(x -> x.getRagSoc().equalsIgnoreCase(mBinding.inputCliente.getEditText().getText().toString()))
|
||||
.findFirst();
|
||||
|
||||
if(result.isPresent()) return result.get().getCodAnag();
|
||||
else return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
public String getCurrentCommessa() {
|
||||
String codAnag = getCurrentCliente();
|
||||
Optional<ArrayList<String>> result = Stream.of(availableClienti)
|
||||
.filter(x -> x.getCodAnag().equalsIgnoreCase(codAnag))
|
||||
.map(DialogAskClienteClienteDTO::getCodJcoms)
|
||||
.findFirst();
|
||||
|
||||
if(result.isPresent() && Stream.of(result.get()).anyMatch(x -> x.equalsIgnoreCase(mBinding.inputCommessa.getEditText().getText().toString()))) {
|
||||
return mBinding.inputCommessa.getEditText().getText().toString();
|
||||
} else return null;
|
||||
}
|
||||
|
||||
|
||||
private void setClienteError(String message){
|
||||
private void setClienteError(String message) {
|
||||
mBinding.inputCliente.setErrorEnabled(true);
|
||||
mBinding.inputCliente.setError(message);
|
||||
mBinding.inputCliente.setErrorIconDrawable(null);
|
||||
}
|
||||
|
||||
private void resetClienteError() {
|
||||
mBinding.inputCliente.setError(null);
|
||||
}
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
package it.integry.integrywmsnative.view.dialogs.ask_cliente.viewmodel;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Movie;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
@ -9,7 +8,6 @@ import android.widget.ArrayAdapter;
|
||||
import android.widget.Filter;
|
||||
import android.widget.Filterable;
|
||||
|
||||
import androidx.annotation.LayoutRes;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.widget.AppCompatTextView;
|
||||
@ -20,7 +18,7 @@ import java.util.List;
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.view.dialogs.ask_cliente.dto.DialogAskClienteClienteDTO;
|
||||
|
||||
public class DialogAskCliente_Page1_ArrayAdapter extends ArrayAdapter<DialogAskClienteClienteDTO> implements Filterable {
|
||||
public class DialogAskCliente_Page1_Cliente_ArrayAdapter extends ArrayAdapter<DialogAskClienteClienteDTO> implements Filterable {
|
||||
|
||||
private Context mContext;
|
||||
private List<DialogAskClienteClienteDTO> mDataset;
|
||||
@ -28,7 +26,7 @@ public class DialogAskCliente_Page1_ArrayAdapter extends ArrayAdapter<DialogAskC
|
||||
|
||||
private ListFilter listFilter = new ListFilter();
|
||||
|
||||
public DialogAskCliente_Page1_ArrayAdapter(@NonNull Context context, @NonNull ArrayList<DialogAskClienteClienteDTO> list) {
|
||||
public DialogAskCliente_Page1_Cliente_ArrayAdapter(@NonNull Context context, @NonNull ArrayList<DialogAskClienteClienteDTO> list) {
|
||||
super(context, 0 , list);
|
||||
mContext = context;
|
||||
mDataset = list;
|
||||
@ -43,13 +41,13 @@ public class DialogAskCliente_Page1_ArrayAdapter extends ArrayAdapter<DialogAskC
|
||||
}
|
||||
|
||||
if(position < mDataset.size()) {
|
||||
|
||||
AppCompatTextView textView = listItem.findViewById(R.id.text);
|
||||
|
||||
textView.setText(mDataset.get(position).getRagSoc());
|
||||
|
||||
return listItem;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -0,0 +1,110 @@
|
||||
package it.integry.integrywmsnative.view.dialogs.ask_cliente.viewmodel;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.Filter;
|
||||
import android.widget.Filterable;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.widget.AppCompatTextView;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import it.integry.integrywmsnative.R;
|
||||
|
||||
public class DialogAskCliente_Page1_Commessa_ArrayAdapter extends ArrayAdapter<String> implements Filterable {
|
||||
|
||||
private Context mContext;
|
||||
private List<String> mDataset = new ArrayList<>();
|
||||
private List<String> mDatasetAllItems;
|
||||
|
||||
private DialogAskCliente_Page1_Commessa_ArrayAdapter.ListFilter listFilter = new DialogAskCliente_Page1_Commessa_ArrayAdapter.ListFilter();
|
||||
|
||||
public DialogAskCliente_Page1_Commessa_ArrayAdapter(@NonNull Context context) {
|
||||
super(context, 0);
|
||||
mContext = context;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public View getView(int position, @Nullable View convertView, @NonNull ViewGroup parent) {
|
||||
View listItem = convertView;
|
||||
if(listItem == null) {
|
||||
listItem = LayoutInflater.from(mContext).inflate(R.layout.dialog_ask_cliente__dropdown_item, parent, false);
|
||||
}
|
||||
|
||||
if(position < getCount()) {
|
||||
AppCompatTextView textView = listItem.findViewById(R.id.text);
|
||||
textView.setText(getItem(position));
|
||||
return listItem;
|
||||
}
|
||||
return convertView;
|
||||
}
|
||||
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Filter getFilter() {
|
||||
return listFilter;
|
||||
}
|
||||
|
||||
public class ListFilter extends Filter {
|
||||
private Object lock = new Object();
|
||||
|
||||
@Override
|
||||
protected FilterResults performFiltering(CharSequence prefix) {
|
||||
FilterResults results = new FilterResults();
|
||||
if (mDatasetAllItems == null) {
|
||||
synchronized (lock) {
|
||||
mDatasetAllItems = new ArrayList<>(mDataset);
|
||||
}
|
||||
}
|
||||
|
||||
if (prefix == null || prefix.length() == 0) {
|
||||
synchronized (lock) {
|
||||
results.values = mDatasetAllItems;
|
||||
results.count = mDatasetAllItems.size();
|
||||
}
|
||||
} else {
|
||||
final String searchStrLowerCase = prefix.toString().toLowerCase();
|
||||
|
||||
ArrayList<String> matchValues = new ArrayList<>();
|
||||
|
||||
for (String dataItem : mDatasetAllItems) {
|
||||
if (dataItem.toLowerCase().startsWith(searchStrLowerCase)) {
|
||||
matchValues.add(dataItem);
|
||||
}
|
||||
}
|
||||
|
||||
results.values = matchValues;
|
||||
results.count = matchValues.size();
|
||||
}
|
||||
|
||||
return results;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void publishResults(CharSequence constraint, FilterResults results) {
|
||||
if (results.values != null) {
|
||||
mDataset.clear();
|
||||
mDataset.addAll((ArrayList<String>) results.values);
|
||||
} else {
|
||||
mDataset.clear();
|
||||
}
|
||||
if (results.count > 0) {
|
||||
notifyDataSetChanged();
|
||||
} else {
|
||||
notifyDataSetInvalidated();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -44,12 +44,12 @@ public class DialogAskCliente_Page2ViewModel implements IDialogAskClienteViewMod
|
||||
|
||||
@Override
|
||||
public void onShow() {
|
||||
|
||||
String sql = "SELECT cod_anag, cod_vdes, destinatario, indirizzo, cap, citta, prov, nazione " +
|
||||
"FROM vtb_dest " +
|
||||
"WHERE cod_anag = " + UtilityDB.valueToString(mCodAnag);
|
||||
|
||||
Type typeOfObjectsList = new TypeToken<ArrayList<DialogAskClienteDestinatarioDTO>>() {}.getType();
|
||||
Type typeOfObjectsList = new TypeToken<ArrayList<DialogAskClienteDestinatarioDTO>>() {
|
||||
}.getType();
|
||||
SystemRESTConsumer.processSqlStatic(sql, typeOfObjectsList, new ISimpleOperationCallback<ArrayList<DialogAskClienteDestinatarioDTO>>() {
|
||||
@Override
|
||||
public void onSuccess(ArrayList<DialogAskClienteDestinatarioDTO> value) {
|
||||
@ -67,9 +67,9 @@ public class DialogAskCliente_Page2ViewModel implements IDialogAskClienteViewMod
|
||||
@Override
|
||||
public void setOnConfirmClickListener(Runnable onConfirm) {
|
||||
this.mBinding.buttonYes.setOnClickListener(v -> {
|
||||
if(validateDestinatario()) {
|
||||
if (validateDestinatario()) {
|
||||
this.resetClienteError();
|
||||
if(onConfirm != null) onConfirm.run();
|
||||
if (onConfirm != null) onConfirm.run();
|
||||
} else {
|
||||
this.setClienteError(mContext.getResources().getText(R.string.not_valid_recipient_error).toString());
|
||||
}
|
||||
@ -80,7 +80,7 @@ public class DialogAskCliente_Page2ViewModel implements IDialogAskClienteViewMod
|
||||
@Override
|
||||
public void setOnAbortClickListener(Runnable onAbort) {
|
||||
this.mBinding.buttonNo.setOnClickListener(v -> {
|
||||
if(onAbort != null) onAbort.run();
|
||||
if (onAbort != null) onAbort.run();
|
||||
});
|
||||
}
|
||||
|
||||
@ -88,12 +88,13 @@ public class DialogAskCliente_Page2ViewModel implements IDialogAskClienteViewMod
|
||||
this.mCodAnag = codAnag;
|
||||
}
|
||||
|
||||
|
||||
private void initializeAdapter(ArrayList<DialogAskClienteDestinatarioDTO> items) {
|
||||
|
||||
DialogAskCliente_Page2_ArrayAdapter adapter = new DialogAskCliente_Page2_ArrayAdapter(mContext, items);
|
||||
|
||||
|
||||
AutoCompleteTextView editTextFilledExposedDropdown = mBinding.filledExposedDropdown;
|
||||
AutoCompleteTextView editTextFilledExposedDropdown = mBinding.dropdownDestinatario;
|
||||
editTextFilledExposedDropdown.setThreshold(0);
|
||||
editTextFilledExposedDropdown.setAdapter(adapter);
|
||||
}
|
||||
@ -105,7 +106,7 @@ public class DialogAskCliente_Page2ViewModel implements IDialogAskClienteViewMod
|
||||
|
||||
public DialogAskClienteDestinatarioDTO getCurrentDestinatario() {
|
||||
for (DialogAskClienteDestinatarioDTO destinatarioDTO : availableDestinatari) {
|
||||
if(destinatarioDTO.toString().equalsIgnoreCase(mBinding.inputDestinatario.getEditText().getText().toString())) {
|
||||
if (destinatarioDTO.toString().equalsIgnoreCase(mBinding.inputDestinatario.getEditText().getText().toString())) {
|
||||
return destinatarioDTO;
|
||||
}
|
||||
}
|
||||
@ -114,11 +115,12 @@ public class DialogAskCliente_Page2ViewModel implements IDialogAskClienteViewMod
|
||||
}
|
||||
|
||||
|
||||
private void setClienteError(String message){
|
||||
private void setClienteError(String message) {
|
||||
mBinding.inputDestinatario.setErrorEnabled(true);
|
||||
mBinding.inputDestinatario.setError(message);
|
||||
mBinding.inputDestinatario.setErrorIconDrawable(null);
|
||||
}
|
||||
|
||||
private void resetClienteError() {
|
||||
mBinding.inputDestinatario.setError(null);
|
||||
}
|
||||
|
||||
@ -1,755 +0,0 @@
|
||||
package it.integry.integrywmsnative.view.dialogs.input_quantity;
|
||||
|
||||
import android.app.DatePickerDialog;
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.content.res.ColorStateList;
|
||||
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
import androidx.databinding.Observable;
|
||||
|
||||
import android.graphics.Color;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.os.Handler;
|
||||
import com.google.android.material.textfield.TextInputLayout;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.appcompat.widget.AppCompatTextView;
|
||||
import android.text.Html;
|
||||
import android.text.SpannableString;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
import android.widget.EditText;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.GregorianCalendar;
|
||||
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.BarcodeRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.model.Ean13PesoModel;
|
||||
import it.integry.integrywmsnative.core.barcode_reader.BarcodeCallbackDTO;
|
||||
import it.integry.integrywmsnative.core.barcode_reader.BarcodeManager;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgss;
|
||||
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityBarcode;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityLogger;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityNumber;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityProgress;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||
import it.integry.integrywmsnative.databinding.DialogInputQuantityArticoloBinding;
|
||||
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageHelper;
|
||||
import it.integry.barcode_base_android_library.model.BarcodeScanDTO;
|
||||
|
||||
public class DialogInputQuantity {
|
||||
|
||||
public static class DTO {
|
||||
private MtbAart mtbAart;
|
||||
private String batchLot;
|
||||
private BigDecimal qtaDaEvadere;
|
||||
private BigDecimal qtaDisponibile;
|
||||
private BigDecimal qtaEvasa;
|
||||
private BigDecimal qtaOrd;
|
||||
private BigDecimal qtaTot;
|
||||
private BigDecimal qtaCnf;
|
||||
private Integer numCnf;
|
||||
private BigDecimal maxQta;
|
||||
private String codArtFor;
|
||||
private Date dataScad;
|
||||
private boolean canPartitaMagBeChanged;
|
||||
private Boolean canDataScadBeChanged;
|
||||
private Boolean shouldAskDataScad;
|
||||
|
||||
public MtbAart getMtbAart() {
|
||||
return mtbAart;
|
||||
}
|
||||
|
||||
public DTO setMtbAart(MtbAart mtbAart) {
|
||||
this.mtbAart = mtbAart;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getBatchLot() {
|
||||
return batchLot;
|
||||
}
|
||||
|
||||
public DTO setBatchLot(String batchLot) {
|
||||
this.batchLot = batchLot;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getQtaDaEvadere() {
|
||||
return qtaDaEvadere;
|
||||
}
|
||||
|
||||
public DTO setQtaDaEvadere(BigDecimal qtaDaEvadere) {
|
||||
this.qtaDaEvadere = qtaDaEvadere;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getQtaDisponibile() {
|
||||
return qtaDisponibile;
|
||||
}
|
||||
|
||||
public DTO setQtaDisponibile(BigDecimal qtaDisponibile) {
|
||||
this.qtaDisponibile = qtaDisponibile;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getQtaOrd() {
|
||||
return qtaOrd;
|
||||
}
|
||||
|
||||
public DTO setQtaOrd(BigDecimal qtaOrd) {
|
||||
this.qtaOrd = qtaOrd;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getQtaTot() {
|
||||
return qtaTot;
|
||||
}
|
||||
|
||||
public DTO setQtaTot(BigDecimal qtaTot) {
|
||||
this.qtaTot = qtaTot;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getQtaCnf() {
|
||||
return qtaCnf;
|
||||
}
|
||||
|
||||
public DTO setQtaCnf(BigDecimal qtaCnf) {
|
||||
this.qtaCnf = qtaCnf;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Integer getNumCnf() {
|
||||
return numCnf;
|
||||
}
|
||||
|
||||
public DTO setNumCnf(Integer numCnf) {
|
||||
this.numCnf = numCnf;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getQtaEvasa() {
|
||||
return qtaEvasa;
|
||||
}
|
||||
|
||||
public DTO setQtaEvasa(BigDecimal qtaEvasa) {
|
||||
this.qtaEvasa = qtaEvasa;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getMaxQta() {
|
||||
return maxQta;
|
||||
}
|
||||
|
||||
public DTO setMaxQta(BigDecimal maxQta) {
|
||||
this.maxQta = maxQta;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCodArtFor() {
|
||||
return codArtFor;
|
||||
}
|
||||
|
||||
public DTO setCodArtFor(String codArtFor) {
|
||||
this.codArtFor = codArtFor;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Date getDataScad() {
|
||||
return dataScad;
|
||||
}
|
||||
|
||||
public DTO setDataScad(Date dataScad) {
|
||||
this.dataScad = dataScad;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean getCanPartitaMagBeChanged() {
|
||||
return canPartitaMagBeChanged;
|
||||
}
|
||||
|
||||
public DTO setCanPartitaMagBeChanged(boolean canPartitaMagBeChanged) {
|
||||
this.canPartitaMagBeChanged = canPartitaMagBeChanged;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Boolean isCanDataScadBeChanged() {
|
||||
return canDataScadBeChanged;
|
||||
}
|
||||
|
||||
public DTO setCanDataScadBeChanged(boolean canDataScadBeChanged) {
|
||||
this.canDataScadBeChanged = canDataScadBeChanged;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Boolean getShouldAskDataScad() {
|
||||
return shouldAskDataScad;
|
||||
}
|
||||
|
||||
public DTO setShouldAskDataScad(Boolean shouldAskDataScad) {
|
||||
this.shouldAskDataScad = shouldAskDataScad;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
private ColorStateList originalColorStateList = null;
|
||||
|
||||
private String scadenzaString = "Scadenza";
|
||||
|
||||
private Dialog currentDialog;
|
||||
private Context currentContext;
|
||||
|
||||
private DialogInputQuantityArticoloBinding currentBinding;
|
||||
|
||||
private MtbAart currentMtbAart;
|
||||
private QuantityDTO currentQuantityDto;
|
||||
private DTO currentDTO;
|
||||
|
||||
public static Dialog makeBase(final Context context, final DTO dto, boolean canOverflowQuantity, final RunnableArgs<QuantityDTO> dialogCallback, final Runnable onAbort) {
|
||||
return new DialogInputQuantity(context, dto, canOverflowQuantity, false, (quantityDto, closeUL) -> {
|
||||
dialogCallback.run(quantityDto);
|
||||
}, onAbort).currentDialog;
|
||||
}
|
||||
|
||||
public static Dialog makeBase(final Context context, final DTO dto, boolean canOverflowQuantity, final RunnableArgss<QuantityDTO, Boolean> dialogCallback, final Runnable onAbort) {
|
||||
return new DialogInputQuantity(context, dto, canOverflowQuantity, true, dialogCallback, onAbort).currentDialog;
|
||||
}
|
||||
|
||||
public DialogInputQuantity(@NotNull Context context, @NotNull final DTO dto, boolean canOverflowQuantity, boolean showCloseUL, final RunnableArgss<QuantityDTO, Boolean> dialogCallback, final Runnable onAbort) {
|
||||
currentContext = context;
|
||||
currentMtbAart = dto.getMtbAart();
|
||||
currentDTO = dto;
|
||||
|
||||
LayoutInflater inflater = (LayoutInflater) context.getSystemService( Context.LAYOUT_INFLATER_SERVICE );
|
||||
currentBinding = DataBindingUtil.inflate(inflater, R.layout.dialog_input_quantity_articolo, null, false);
|
||||
|
||||
final TextInputLayout txlInputBatchLot = currentBinding.inputPartitaMag;
|
||||
|
||||
final TextInputLayout txlInputNumDiCnf = currentBinding.inputNumCnf;
|
||||
final TextInputLayout txlInputQtaPerCnf = currentBinding.inputQtaCnf;
|
||||
final TextInputLayout txlInputQtaTot = currentBinding.inputQtaTot;
|
||||
|
||||
txlInputNumDiCnf.getEditText().setSelectAllOnFocus(true);
|
||||
txlInputQtaPerCnf.getEditText().setSelectAllOnFocus(true);
|
||||
txlInputQtaTot.getEditText().setSelectAllOnFocus(true);
|
||||
|
||||
|
||||
originalColorStateList = txlInputNumDiCnf.getEditText().getTextColors();
|
||||
|
||||
currentQuantityDto = new QuantityDTO();
|
||||
currentQuantityDto.canOverflowQuantity = canOverflowQuantity;
|
||||
|
||||
setupQuantities(dto, currentQuantityDto);
|
||||
|
||||
setupQuantityListener(currentQuantityDto, txlInputNumDiCnf, txlInputQtaPerCnf, txlInputQtaTot);
|
||||
|
||||
currentBinding.setViewmodel(dto);
|
||||
currentBinding.setQuantityViewModel(currentQuantityDto);
|
||||
|
||||
|
||||
currentDialog = new Dialog(context);
|
||||
currentDialog.setContentView(currentBinding.getRoot());
|
||||
|
||||
currentDialog.setCanceledOnTouchOutside(false);
|
||||
currentDialog.setCancelable(false);
|
||||
currentDialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
|
||||
|
||||
currentDialog.setCanceledOnTouchOutside(false);
|
||||
|
||||
currentDialog.setOnShowListener(dialogInterface -> {
|
||||
|
||||
final Handler handler = new Handler();
|
||||
handler.postDelayed(() -> {
|
||||
EditText editTextToFocus;
|
||||
if(currentQuantityDto.canPartitaMagBeChanged.get()) {
|
||||
editTextToFocus = txlInputBatchLot.getEditText();
|
||||
} else {
|
||||
editTextToFocus = txlInputNumDiCnf.getEditText();
|
||||
}
|
||||
|
||||
|
||||
editTextToFocus.requestFocus();
|
||||
|
||||
InputMethodManager imm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||
imm.showSoftInput(editTextToFocus, InputMethodManager.SHOW_IMPLICIT);
|
||||
|
||||
}, 100);
|
||||
|
||||
});
|
||||
|
||||
currentBinding.saveBtn.setOnClickListener(view -> {
|
||||
onConfirm(context, currentQuantityDto, dialogCallback, false);
|
||||
currentDialog.dismiss();
|
||||
});
|
||||
currentBinding.abortBtn.setOnClickListener(view -> {
|
||||
if(onAbort != null) onAbort.run();
|
||||
currentDialog.dismiss();
|
||||
});
|
||||
|
||||
currentBinding.closeLuBtn.setVisibility(showCloseUL ? View.VISIBLE : View.INVISIBLE);
|
||||
currentBinding.closeLuBtn.setOnClickListener(view -> {
|
||||
onConfirm(context, currentQuantityDto, dialogCallback, true);
|
||||
currentDialog.dismiss();
|
||||
});
|
||||
|
||||
initDatePicker(context, currentQuantityDto, currentBinding.getRoot().findViewById(R.id.input_data_scad));
|
||||
|
||||
setupBarcode(context);
|
||||
}
|
||||
|
||||
private void setupQuantities(@NotNull DTO dto, QuantityDTO quantityDTO){
|
||||
if(dto.getQtaTot() != null) quantityDTO.qtaTot.set(dto.getQtaTot().floatValue());
|
||||
if(dto.getMaxQta() != null) quantityDTO.maxQta.set(dto.getMaxQta().floatValue());
|
||||
|
||||
float qtaDisponibile = dto.getQtaDisponibile() != null ? dto.getQtaDisponibile().floatValue() : 0f;
|
||||
if (qtaDisponibile < 0) {
|
||||
currentBinding.layoutQtaDisponibile.setVisibility(View.GONE);
|
||||
qtaDisponibile = 0;
|
||||
}
|
||||
if(qtaDisponibile > 0) quantityDTO.qtaDisponibile.set(qtaDisponibile);
|
||||
|
||||
float qtaDaEvadere = dto.qtaDaEvadere != null ? dto.qtaDaEvadere.floatValue() : 0f;
|
||||
if (qtaDaEvadere < 0) {
|
||||
currentBinding.layoutQtaDaEvadere.setVisibility(View.GONE);
|
||||
qtaDaEvadere = 0;
|
||||
}
|
||||
|
||||
if(qtaDaEvadere > 0) quantityDTO.qtaDaEvadere.set(qtaDaEvadere);
|
||||
quantityDTO.qtaEvasa.set(dto.qtaEvasa != null ? dto.qtaEvasa.floatValue() : null);
|
||||
|
||||
quantityDTO.batchLot.set(dto.batchLot);
|
||||
if(quantityDTO.qtaCnf.get(false) == null) {
|
||||
if(dto.getQtaCnf() != null) {
|
||||
|
||||
quantityDTO.qtaCnf.set(dto.getQtaCnf().floatValue());
|
||||
|
||||
} else if(dto.numCnf != null && dto.qtaTot != null &&
|
||||
dto.numCnf > 0 && dto.qtaTot.compareTo(BigDecimal.ZERO) > 0) {
|
||||
|
||||
quantityDTO.qtaCnfNotificationEnabled = false;
|
||||
quantityDTO.qtaCnf.set(dto.qtaTot.divide(new BigDecimal(dto.numCnf), RoundingMode.HALF_EVEN).floatValue());
|
||||
quantityDTO.qtaCnfNotificationEnabled = true;
|
||||
|
||||
} else {
|
||||
|
||||
quantityDTO.qtaCnf.set(dto.mtbAart.getQtaCnf().floatValue());
|
||||
|
||||
if(dto.getMtbAart().isFlagQtaCnfFissaBoolean()) {
|
||||
quantityDTO.blockedQtaPerCnf.set(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(quantityDTO.qtaTot.get(false) == null) {
|
||||
quantityDTO.qtaTot.set(qtaDaEvadere);
|
||||
}
|
||||
|
||||
if(dto.getNumCnf() != null) {
|
||||
quantityDTO.numCnf.set(new BigDecimal(dto.getNumCnf()).floatValue());
|
||||
}
|
||||
|
||||
if(quantityDTO.numCnf.get(false) == null) {
|
||||
float numCnf = (float) Math.ceil(UtilityNumber.truncateToDecimal(quantityDTO.qtaTot.get() / quantityDTO.qtaCnf.get(),3));
|
||||
if(numCnf < 1) numCnf = 1;
|
||||
quantityDTO.numCnf.set(numCnf);
|
||||
}
|
||||
|
||||
quantityDTO.canPartitaMagBeChanged.set(dto.getCanPartitaMagBeChanged());
|
||||
|
||||
if(dto.isCanDataScadBeChanged() != null){
|
||||
quantityDTO.canDataScadBeChanged.set(dto.isCanDataScadBeChanged());
|
||||
}
|
||||
|
||||
quantityDTO.shouldAskDataScad.set(dto.mtbAart.isFlagTracciabilitaBoolean() && dto.mtbAart.getGgScadPartita() != null && dto.mtbAart.getGgScadPartita() > 0);
|
||||
|
||||
if(dto.getShouldAskDataScad() != null) {
|
||||
quantityDTO.shouldAskDataScad.set(dto.getShouldAskDataScad());
|
||||
}
|
||||
|
||||
if(dto.getDataScad() != null) {
|
||||
quantityDTO.expireDate = dto.getDataScad();
|
||||
}
|
||||
|
||||
if(quantityDTO.expireDate == null && dto.mtbAart.getGgScadPartita() != null && dto.mtbAart.getGgScadPartita() > 0) {
|
||||
Calendar c = UtilityDate.getCalendarInstance();
|
||||
c.add(Calendar.DATE, dto.mtbAart.getGgScadPartita()); // number of days to add
|
||||
|
||||
quantityDTO.expireDate = c.getTime();
|
||||
}
|
||||
|
||||
refreshQtaDescriptionText();
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void setupBarcode(Context context) {
|
||||
|
||||
int barcodeIstanceID = BarcodeManager.addCallback(new BarcodeCallbackDTO()
|
||||
.setOnScanSuccessfull(onScanSuccessfull)
|
||||
.setOnScanFailed(ex -> UtilityExceptions.defaultException(context, ex, false)));
|
||||
|
||||
currentDialog.setOnDismissListener(dialog -> {
|
||||
BarcodeManager.removeCallback(barcodeIstanceID);
|
||||
});
|
||||
|
||||
BarcodeManager.enable();
|
||||
|
||||
}
|
||||
|
||||
|
||||
private final RunnableArgs<BarcodeScanDTO> onScanSuccessfull = data -> {
|
||||
BarcodeManager.disable();
|
||||
|
||||
if(UtilityBarcode.isEanPeso(data)){
|
||||
|
||||
try {
|
||||
Ean13PesoModel ean13PesoModel = Ean13PesoModel.fromBarcode(data.getStringValue());
|
||||
|
||||
if(ean13PesoModel.getPrecode().contains(currentMtbAart.getBarCode())) {
|
||||
|
||||
currentQuantityDto.numCnf.set(1f);
|
||||
currentQuantityDto.qtaCnf.set(ean13PesoModel.getPeso());
|
||||
currentQuantityDto.qtaTot.set(ean13PesoModel.getPeso());
|
||||
|
||||
BarcodeManager.enable();
|
||||
} else {
|
||||
BarcodeManager.enable();
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
UtilityLogger.errorMe(e);
|
||||
BarcodeManager.enable();
|
||||
}
|
||||
|
||||
} else if(UtilityBarcode.isEtichetta128(data)){
|
||||
final Dialog progressDialog = UtilityProgress.createDefaultProgressDialog(currentContext);
|
||||
|
||||
BarcodeRESTConsumer.decodeEan128Static(data, ean128Model -> {
|
||||
progressDialog.dismiss();
|
||||
BarcodeManager.enable();
|
||||
|
||||
if(ean128Model != null){
|
||||
if(!UtilityString.isNullOrEmpty(ean128Model.BatchLot)) {
|
||||
currentQuantityDto.batchLot.set(ean128Model.BatchLot);
|
||||
}
|
||||
|
||||
try {
|
||||
if(!UtilityString.isNullOrEmpty(ean128Model.BestBefore)){
|
||||
currentQuantityDto.expireDate = UtilityDate.recognizeDate(ean128Model.BestBefore);
|
||||
} else if(!UtilityString.isNullOrEmpty(ean128Model.Expiry)) {
|
||||
currentQuantityDto.expireDate = UtilityDate.recognizeDate(ean128Model.Expiry);
|
||||
}
|
||||
|
||||
if(currentQuantityDto.expireDate != null) {
|
||||
currentQuantityDto.expireDateString.set(UtilityDate.formatDate(currentQuantityDto.expireDate, UtilityDate.COMMONS_DATE_FORMATS.DMY_HUMAN));
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
UtilityLogger.errorMe(e);
|
||||
}
|
||||
|
||||
|
||||
if(ean128Model.Count != null && ean128Model.Count > 0) {
|
||||
currentQuantityDto.numCnf.set((float) ean128Model.Count);
|
||||
}
|
||||
|
||||
if (ean128Model.NetWeightKg != null && ean128Model.NetWeightKg > 0) {
|
||||
currentQuantityDto.qtaTot.set(ean128Model.NetWeightKg);
|
||||
}
|
||||
|
||||
if(currentQuantityDto.qtaTot.get() > 0 && currentQuantityDto.numCnf.get() > 0) {
|
||||
currentQuantityDto.qtaCnf.set(currentQuantityDto.qtaTot.get() / currentQuantityDto.numCnf.get());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}, ex -> {
|
||||
UtilityExceptions.defaultException(currentContext, ex, progressDialog);
|
||||
|
||||
BarcodeManager.enable();
|
||||
});
|
||||
|
||||
} else {
|
||||
BarcodeManager.enable();
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
private void setupQuantityListener(final QuantityDTO quantityDTO, final TextInputLayout txlInputNumDiCnf, final TextInputLayout txlInputQtaPerCnf, final TextInputLayout txlInputQtaTot) {
|
||||
|
||||
quantityDTO.numCnf.addOnPropertyChangedCallback(new Observable.OnPropertyChangedCallback() {
|
||||
@Override
|
||||
public void onPropertyChanged(Observable sender, int propertyId) {
|
||||
|
||||
if(quantityDTO.numCnfNotificationEnabled) {
|
||||
|
||||
quantityDTO.blockedNumDiCnf.set(!(quantityDTO.numCnf.get(true) == 0 || quantityDTO.numCnf.get().toString().equals("")));
|
||||
|
||||
toggleTextInputLayoutError(txlInputNumDiCnf, quantityDTO.blockedNumDiCnf.get());
|
||||
|
||||
if (!quantityDTO.blockedQtaTot.get()) {
|
||||
|
||||
quantityDTO.qtaTotNotificationEnabled = false;
|
||||
quantityDTO.qtaTot.set((float) Math.round(quantityDTO.qtaCnf.get(true) * quantityDTO.numCnf.get(true) * 1000) / 1000);
|
||||
quantityDTO.qtaTotNotificationEnabled = true;
|
||||
|
||||
|
||||
} else if (!quantityDTO.blockedQtaPerCnf.get()) {
|
||||
|
||||
quantityDTO.qtaCnfNotificationEnabled = false;
|
||||
if(quantityDTO.numCnf.get(true) != 0) {
|
||||
quantityDTO.qtaCnf.set((float) Math.round(quantityDTO.qtaTot.get(true) / quantityDTO.numCnf.get(true) * 1000) / 1000);
|
||||
} else {
|
||||
quantityDTO.qtaCnf.set((float) Math.round(quantityDTO.qtaTot.get(true) / 1 * 1000) / 1000);
|
||||
}
|
||||
quantityDTO.qtaCnfNotificationEnabled = true;
|
||||
|
||||
} else {
|
||||
Log.e("DialogInputQuantity", "Tutti i campi sono bloccati, non è possibile modificare il numero di confezioni");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// refreshQtaDescriptionText();
|
||||
}
|
||||
});
|
||||
|
||||
quantityDTO.qtaCnf.addOnPropertyChangedCallback(new Observable.OnPropertyChangedCallback() {
|
||||
@Override
|
||||
public void onPropertyChanged(Observable sender, int propertyId) {
|
||||
|
||||
if(quantityDTO.qtaCnfNotificationEnabled) {
|
||||
|
||||
quantityDTO.blockedQtaPerCnf.set(!(quantityDTO.qtaCnf.get(true) == 0 || quantityDTO.qtaCnf.get().toString().equals("")));
|
||||
|
||||
toggleTextInputLayoutError(txlInputQtaPerCnf, quantityDTO.blockedQtaPerCnf.get());
|
||||
|
||||
if (!quantityDTO.blockedQtaTot.get()) {
|
||||
|
||||
quantityDTO.qtaTotNotificationEnabled = false;
|
||||
float qtaTot = (float) Math.round(quantityDTO.qtaCnf.get(true) * quantityDTO.numCnf.get(true) * 1000) / 1000;
|
||||
if(qtaTot > quantityDTO.maxQta.get() && !quantityDTO.canOverflowQuantity) qtaTot = quantityDTO.maxQta.get();
|
||||
quantityDTO.qtaTot.set(qtaTot);
|
||||
quantityDTO.qtaTotNotificationEnabled = true;
|
||||
|
||||
} else if (!quantityDTO.blockedNumDiCnf.get()) {
|
||||
|
||||
quantityDTO.numCnfNotificationEnabled = false;
|
||||
if(quantityDTO.qtaCnf.get(true) != 0){
|
||||
quantityDTO.numCnf.set((float) Math.ceil(quantityDTO.qtaTot.get(true) / quantityDTO.qtaCnf.get(true)));
|
||||
} else {
|
||||
quantityDTO.numCnf.set((float) Math.ceil(quantityDTO.qtaTot.get(true)));
|
||||
}
|
||||
|
||||
quantityDTO.numCnfNotificationEnabled = true;
|
||||
|
||||
} else {
|
||||
Log.e("DialogInputQuantity", "Tutti i campi sono bloccati, non è possibile modificare la quantità per confezione");
|
||||
}
|
||||
}
|
||||
|
||||
// refreshQtaDescriptionText();
|
||||
}
|
||||
});
|
||||
|
||||
quantityDTO.qtaTot.addOnPropertyChangedCallback(new Observable.OnPropertyChangedCallback() {
|
||||
@Override
|
||||
public void onPropertyChanged(Observable sender, int propertyId) {
|
||||
|
||||
if (quantityDTO.qtaTotNotificationEnabled) {
|
||||
|
||||
quantityDTO.blockedQtaTot.set(!(quantityDTO.qtaTot.get(true) == 0 || quantityDTO.qtaTot.get().toString().equals("")));
|
||||
|
||||
toggleTextInputLayoutError(txlInputQtaTot, quantityDTO.blockedQtaTot.get());
|
||||
|
||||
if(!quantityDTO.blockedQtaPerCnf.get()){
|
||||
|
||||
quantityDTO.qtaCnfNotificationEnabled = false;
|
||||
quantityDTO.qtaCnf.set((float) Math.round(quantityDTO.qtaTot.get(true) / quantityDTO.numCnf.get(true) *1000)/1000);
|
||||
quantityDTO.qtaCnfNotificationEnabled = true;
|
||||
|
||||
} else if(!quantityDTO.blockedNumDiCnf.get()) {
|
||||
|
||||
quantityDTO.numCnfNotificationEnabled = false;
|
||||
quantityDTO.numCnf.set((float) Math.ceil(quantityDTO.qtaTot.get(true) / quantityDTO.qtaCnf.get(true)));
|
||||
quantityDTO.numCnfNotificationEnabled = true;
|
||||
|
||||
} else {
|
||||
Log.e("DialogInputQuantity", "Tutti i campi sono bloccati, non è possibile modificare la quantità totale");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// refreshQtaDescriptionText();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void toggleTextInputLayoutError(TextInputLayout textInputLayout, boolean isError) {
|
||||
if(isError){
|
||||
textInputLayout.setErrorEnabled(true);
|
||||
textInputLayout.setError(" ");
|
||||
textInputLayout.getEditText().setTextColor(ContextCompat.getColor(currentContext, R.color.red_600));
|
||||
textInputLayout.setHintTextAppearance(R.style.ErrorFloatingLabel);
|
||||
textInputLayout.setErrorIconDrawable(null);
|
||||
|
||||
if (textInputLayout.getChildCount() == 2) {
|
||||
textInputLayout.getChildAt(1).setVisibility(View.GONE);
|
||||
}
|
||||
} else {
|
||||
textInputLayout.setErrorEnabled(false);
|
||||
textInputLayout.setError(null);
|
||||
textInputLayout.getEditText().setTextColor(originalColorStateList);
|
||||
textInputLayout.setHintTextAppearance(R.style.NormalFloatingLabel);
|
||||
}
|
||||
}
|
||||
|
||||
private void initDatePicker(Context context, QuantityDTO quantityDTO, AppCompatTextView textInputLayout) {
|
||||
quantityDTO.expireDateString.set(scadenzaString);
|
||||
|
||||
if(quantityDTO.expireDate != null) {
|
||||
quantityDTO.expireDateString.set(UtilityDate.formatDate(quantityDTO.expireDate, UtilityDate.COMMONS_DATE_FORMATS.DMY_HUMAN));
|
||||
}
|
||||
|
||||
|
||||
Runnable onTextClicked = () -> {
|
||||
// Get Current Date
|
||||
Calendar c = UtilityDate.getCalendarInstance();
|
||||
|
||||
if(quantityDTO.expireDate != null) {
|
||||
c.setTime(quantityDTO.expireDate);
|
||||
}
|
||||
|
||||
int mYear = c.get(Calendar.YEAR);
|
||||
int mMonth = c.get(Calendar.MONTH);
|
||||
int mDay = c.get(Calendar.DAY_OF_MONTH);
|
||||
|
||||
DatePickerDialog datePickerDialog = new DatePickerDialog(context,
|
||||
(view, year, month, day) -> {
|
||||
|
||||
quantityDTO.expireDate = new GregorianCalendar(year, month, day).getTime();
|
||||
quantityDTO.expireDateString.set(UtilityDate.formatDate(quantityDTO.expireDate, UtilityDate.COMMONS_DATE_FORMATS.DMY_HUMAN));
|
||||
|
||||
}, mYear, mMonth, mDay);
|
||||
datePickerDialog.show();
|
||||
};
|
||||
|
||||
textInputLayout.setOnClickListener(v -> onTextClicked.run());
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void refreshQtaDescriptionText() {
|
||||
|
||||
int numConf = (int) (currentQuantityDto.qtaDaEvadere.get() / currentQuantityDto.qtaCnf.get());
|
||||
float qtaTot = currentQuantityDto.qtaDaEvadere.get();
|
||||
|
||||
float mod = qtaTot % numConf;
|
||||
|
||||
String text = "";
|
||||
|
||||
if(numConf > 0) {
|
||||
text += "<b>" + numConf + " " + currentContext.getResources().getQuantityString(R.plurals.item_package, numConf).toUpperCase() + "</b>";
|
||||
}
|
||||
if(numConf > 0 && mod > 0) {
|
||||
text += " e ";
|
||||
}
|
||||
if(mod > 0) {
|
||||
|
||||
text += "<b>" + UtilityNumber.decimalToString(mod) + " ";
|
||||
if(mod == 1) {
|
||||
text += currentContext.getResources().getQuantityString(R.plurals.pieces, (int) mod).toUpperCase();
|
||||
} else {
|
||||
text += currentContext.getString(R.string.piece).toUpperCase();
|
||||
}
|
||||
|
||||
text += "</b>";
|
||||
}
|
||||
|
||||
currentBinding.qtaDescriptionText.setText(Html.fromHtml(text));
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void onConfirm(Context context, QuantityDTO quantityDTO, RunnableArgss<QuantityDTO, Boolean> dialogCallback, boolean closeUL){
|
||||
if(currentDTO.mtbAart.isFlagTracciabilitaBoolean() && (quantityDTO.batchLot == null || quantityDTO.batchLot.get().trim().length() == 0)){
|
||||
|
||||
showBatchLotErrorPrompt(context);
|
||||
|
||||
} else if(quantityDTO.shouldAskDataScad.get() && (quantityDTO.batchLot == null || quantityDTO.batchLot.get().trim().length() == 0)){
|
||||
|
||||
showBatchLotErrorPrompt(context);
|
||||
|
||||
} else if(quantityDTO.shouldAskDataScad.get() && quantityDTO.expireDate == null){
|
||||
|
||||
showExpireDateErrorPrompt(context);
|
||||
|
||||
} else if(!quantityDTO.canOverflowQuantity && quantityDTO.qtaTot.get() > quantityDTO.maxQta.get()) {
|
||||
|
||||
showQuantityOverflowErrorPrompt(context);
|
||||
|
||||
} else if(quantityDTO.qtaCnf.get() <= 0 || quantityDTO.numCnf.get() <= 0 || quantityDTO.qtaTot.get() <= 0) {
|
||||
|
||||
showQuantityErrorDialog(context);
|
||||
|
||||
} else {
|
||||
|
||||
if(quantityDTO.batchLot != null && !quantityDTO.batchLot.isEmpty()) {
|
||||
quantityDTO.batchLot.set(quantityDTO.batchLot.get().toUpperCase());
|
||||
}
|
||||
|
||||
dialogCallback.run(quantityDTO, closeUL);
|
||||
currentDialog.dismiss();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void showQuantityErrorDialog(Context mContext){
|
||||
|
||||
String errorMessage = mContext.getText(R.string.wrong_quantity_input_message).toString();
|
||||
|
||||
DialogSimpleMessageHelper.makeErrorDialog(mContext, new SpannableString(Html.fromHtml(errorMessage)), null, null).show();
|
||||
}
|
||||
|
||||
|
||||
private void showQuantityOverflowErrorPrompt(Context mContext){
|
||||
|
||||
String errorMessage = mContext.getText(R.string.available_quantity_overflow_error_message).toString();
|
||||
|
||||
DialogSimpleMessageHelper.makeErrorDialog(mContext, new SpannableString(Html.fromHtml(errorMessage)), null, null).show();
|
||||
}
|
||||
|
||||
|
||||
private void showExpireDateErrorPrompt(Context mContext){
|
||||
|
||||
String errorMessage = mContext.getText(R.string.expire_date_error_message).toString();
|
||||
|
||||
DialogSimpleMessageHelper.makeErrorDialog(mContext, new SpannableString(Html.fromHtml(errorMessage)), null, null).show();
|
||||
}
|
||||
|
||||
|
||||
private void showBatchLotErrorPrompt(Context mContext){
|
||||
|
||||
String errorMessage = mContext.getText(R.string.batch_lot_error_message).toString();
|
||||
DialogSimpleMessageHelper.makeErrorDialog(mContext, new SpannableString(Html.fromHtml(errorMessage)), null, null).show();
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,42 +0,0 @@
|
||||
package it.integry.integrywmsnative.view.dialogs.input_quantity;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import it.integry.integrywmsnative.core.di.BindableBoolean;
|
||||
import it.integry.integrywmsnative.core.di.BindableFloat;
|
||||
import it.integry.integrywmsnative.core.di.BindableString;
|
||||
|
||||
public class QuantityDTO {
|
||||
|
||||
public BindableString batchLot = new BindableString();
|
||||
public BindableString expireDateString = new BindableString();
|
||||
|
||||
public Date expireDate = null;
|
||||
|
||||
public BindableFloat numCnf = new BindableFloat();
|
||||
public BindableFloat qtaCnf = new BindableFloat();
|
||||
public BindableFloat qtaTot = new BindableFloat();
|
||||
|
||||
public BindableFloat qtaEvasa = new BindableFloat();
|
||||
public BindableFloat qtaDaEvadere = new BindableFloat();
|
||||
public BindableFloat qtaDisponibile = new BindableFloat();
|
||||
|
||||
|
||||
|
||||
public BindableBoolean blockedNumDiCnf = new BindableBoolean();
|
||||
public BindableBoolean blockedQtaTot = new BindableBoolean();
|
||||
public BindableBoolean blockedQtaPerCnf = new BindableBoolean();
|
||||
|
||||
public boolean numCnfNotificationEnabled = true;
|
||||
public boolean qtaCnfNotificationEnabled = true;
|
||||
public boolean qtaTotNotificationEnabled = true;
|
||||
public boolean canOverflowQuantity = false;
|
||||
public BindableFloat maxQta = new BindableFloat();
|
||||
|
||||
|
||||
public BindableBoolean canPartitaMagBeChanged = new BindableBoolean(true);
|
||||
public BindableBoolean canDataScadBeChanged = new BindableBoolean(true);
|
||||
public BindableBoolean shouldAskDataScad = new BindableBoolean();
|
||||
|
||||
|
||||
}
|
||||
@ -288,7 +288,7 @@ public class DialogScanOrCreateLU {
|
||||
|
||||
private void showTooMuchULFound() {
|
||||
DialogSimpleMessageHelper.makeWarningDialog(mContext,
|
||||
new SpannableString(mContext.getResources().getText(R.string.too_much_lu_found_message)),
|
||||
new SpannableString(mContext.getResources().getText(R.string.too_much_lu_found_message_in_mono_lu)),
|
||||
null, null).show();
|
||||
}
|
||||
|
||||
|
||||
@ -124,7 +124,7 @@
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/spedizione_empty_view"
|
||||
android:id="@+id/accettazione_empty_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:alpha="0.3"
|
||||
|
||||
@ -69,7 +69,8 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scrollbars="vertical"
|
||||
android:clipToPadding="false"/>
|
||||
android:clipToPadding="false"
|
||||
android:paddingBottom="72dp"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@ -186,7 +187,7 @@
|
||||
<!-- android:id="@+id/empty_space_padding"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="?attr/actionBarSize"-->
|
||||
<!-- android:visibility="@{viewmodel.currentMtbColt != null ? View.VISIBLE : View.GONE}"-->
|
||||
<!-- android:visibility="@{pickingResiView.bottomSheetEnabled ? View.VISIBLE : View.GONE}"-->
|
||||
<!-- android:layout_alignParentBottom="true">-->
|
||||
|
||||
<!-- </RelativeLayout>-->
|
||||
|
||||
@ -34,9 +34,10 @@
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginBottom="8dp" />
|
||||
|
||||
<RelativeLayout
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/input_cliente"
|
||||
@ -46,14 +47,30 @@
|
||||
android:hint="@string/customer">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatAutoCompleteTextView
|
||||
android:id="@+id/filled_exposed_dropdown"
|
||||
android:id="@+id/dropdown_cliente"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="end"/>
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/input_commessa"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense.ExposedDropdownMenu"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/job">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatAutoCompleteTextView
|
||||
android:id="@+id/dropdown_commessa"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="end"/>
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
|
||||
@ -46,7 +46,7 @@
|
||||
android:hint="@string/recipient">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatAutoCompleteTextView
|
||||
android:id="@+id/filled_exposed_dropdown"
|
||||
android:id="@+id/dropdown_destinatario"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:singleLine="true"
|
||||
|
||||
@ -1,425 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<data>
|
||||
<import type="android.view.View" />
|
||||
|
||||
<variable
|
||||
name="viewmodel"
|
||||
type="it.integry.integrywmsnative.view.dialogs.input_quantity.DialogInputQuantity.DTO"/>
|
||||
<variable
|
||||
name="quantityViewModel"
|
||||
type="it.integry.integrywmsnative.view.dialogs.input_quantity.QuantityDTO"/>
|
||||
|
||||
<import type="androidx.core.content.ContextCompat" />
|
||||
|
||||
<import type="it.integry.integrywmsnative.MainApplication" />
|
||||
|
||||
<import type="it.integry.integrywmsnative.R" />
|
||||
|
||||
<import type="androidx.databinding.adapters.Converters"/>
|
||||
|
||||
<import type="android.graphics.Color" />
|
||||
|
||||
<import type="it.integry.integrywmsnative.core.utility.UtilityString" />
|
||||
<import type="it.integry.integrywmsnative.core.utility.UtilityNumber" />
|
||||
|
||||
</data>
|
||||
|
||||
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:cardCornerRadius="12dp"
|
||||
app:cardElevation="0dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/dialog_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/dialog_title_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:text='@{viewmodel.mtbAart.codMart + (!UtilityString.isNullOrEmpty(viewmodel.batchLot) ? " (" + viewmodel.batchLot + ")" : "") }'
|
||||
android:textColor="@color/colorPrimary"
|
||||
android:textStyle="bold"
|
||||
style="@style/AppTheme.NewMaterial.Text.Medium"
|
||||
tools:text="AV25D200010B"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_below="@id/dialog_title_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:text='@{!UtilityString.isNullOrEmpty(viewmodel.mtbAart.diacod) ? viewmodel.mtbAart.diacod : ""}'
|
||||
android:textColor="@color/red_600"
|
||||
android:textStyle="bold"
|
||||
android:visibility="@{UtilityString.isNullOrEmpty(viewmodel.mtbAart.diacod) ? View.GONE : View.VISIBLE}"
|
||||
style="@style/AppTheme.NewMaterial.Text.Medium"
|
||||
tools:text="DIACOD HERE"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingEnd="0dp"
|
||||
android:text='@{viewmodel.mtbAart.untMis != null ? "(" + viewmodel.mtbAart.untMis + ")" : ""}'
|
||||
android:textColor="#000"
|
||||
android:textStyle="bold"
|
||||
tools:text="(PZ)"
|
||||
style="@style/AppTheme.NewMaterial.Text.Medium"
|
||||
app:layout_constraintRight_toRightOf="parent" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/dialog_title"
|
||||
android:layout_marginTop="6dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!--<androidx.appcompat.widget.AppCompatTextView-->
|
||||
<!--android:layout_width="wrap_content"-->
|
||||
<!--android:layout_height="wrap_content"-->
|
||||
<!--android:text="@string/description"-->
|
||||
<!--android:textSize="16sp"-->
|
||||
<!--tools:text="Descrizione" />-->
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{viewmodel.mtbAart.descrizioneEstesa}"
|
||||
android:textStyle="bold"
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
tools:text="RAD 25 D H/L 200 - 10 EL B BIANCO" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="@{viewmodel.qtaOrd == null ? View.GONE : View.VISIBLE}"
|
||||
android:text="@string/ordered_abbr"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="@{viewmodel.qtaOrd == null ? View.GONE : View.VISIBLE}"
|
||||
android:text='@{UtilityNumber.decimalToString(viewmodel.qtaOrd)}'
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
android:paddingStart="4dp"
|
||||
tools:text="1200" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="12dp"
|
||||
android:text="@string/dispatched_abbr"
|
||||
android:textSize="16sp"
|
||||
android:visibility="@{quantityViewModel.qtaEvasa.get() == 0 ? View.GONE : View.VISIBLE}" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text='@{UtilityNumber.decimalToString(quantityViewModel.qtaEvasa.get())}'
|
||||
android:visibility="@{quantityViewModel.qtaEvasa.get() == 0 ? View.GONE : View.VISIBLE}"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
android:paddingLeft="4dp"
|
||||
tools:text="1200" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/layout_qta_da_evadere"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/to_dispatch_abbr"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text='@{UtilityNumber.decimalToString(quantityViewModel.qtaDaEvadere.get())}'
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
android:paddingLeft="4dp"
|
||||
tools:text="1200" />
|
||||
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:id="@+id/layout_qta_disponibile"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="12dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="("
|
||||
android:textSize="16sp" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/available_abbr"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text='@{UtilityNumber.decimalToString(quantityViewModel.qtaDisponibile.get())}'
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
android:paddingStart="4dp"
|
||||
tools:text="1200" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text=")"
|
||||
android:textSize="16sp" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/qta_description_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="16sp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:paddingTop="4dp"
|
||||
tools:text="2 CARTONI e 3 PEZZI"/>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/guideline_partita_data"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent='@{quantityViewModel.shouldAskDataScad.get() == false ? 1.0f : 0.5f}'/>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/input_partita_mag"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:enabled="@{quantityViewModel.canPartitaMagBeChanged}"
|
||||
app:hintTextAppearance="@style/hint_text"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/guideline_partita_data"
|
||||
android:nextFocusRight="@+id/input_data_scad"
|
||||
style="@style/TextInputLayout.NoLine">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="textNoSuggestions"
|
||||
android:hint="@string/batch_lot"
|
||||
android:textAllCaps="true"
|
||||
app:binding="@{quantityViewModel.batchLot}"/>
|
||||
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/input_data_scad"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
tools:text="11 nov 2018"
|
||||
android:textSize="16sp"
|
||||
android:enabled="@{quantityViewModel.canDataScadBeChanged}"
|
||||
android:visibility="@{quantityViewModel.shouldAskDataScad.get() == false ? View.GONE : View.VISIBLE}"
|
||||
app:binding="@{quantityViewModel.expireDateString}"
|
||||
app:layout_constraintStart_toEndOf="@id/guideline_partita_data"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"/>
|
||||
|
||||
|
||||
<!--<android.support.design.widget.TextInputLayout-->
|
||||
<!--android:id="@+id/input_data_scad_layout"-->
|
||||
<!--android:layout_width="0dp"-->
|
||||
<!--android:layout_height="wrap_content"-->
|
||||
<!--android:enabled="@{quantityViewModel.shouldAskDataScad.get()}"-->
|
||||
<!--app:hintTextAppearance="@style/hint_text"-->
|
||||
<!--app:layout_constraintStart_toEndOf="@id/guideline_partita_data"-->
|
||||
<!--app:layout_constraintEnd_toEndOf="parent">-->
|
||||
|
||||
<!--<android.support.design.widget.TextInputEditText-->
|
||||
<!--android:id="@+id/input_data_scad"-->
|
||||
<!--android:layout_width="match_parent"-->
|
||||
<!--android:layout_height="wrap_content"-->
|
||||
<!--android:inputType="textNoSuggestions"-->
|
||||
<!--android:hint="@string/expire_date"-->
|
||||
<!--app:binding="@{quantityViewModel.expireDate}"/>-->
|
||||
|
||||
|
||||
<!--</android.support.design.widget.TextInputLayout>-->
|
||||
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:weightSum="3">
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/input_num_cnf"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:enabled="@{!(quantityViewModel.blockedQtaTot.get() && quantityViewModel.blockedQtaPerCnf.get())}"
|
||||
style="@style/TextInputLayout.NoLine">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="number"
|
||||
android:hint="@string/num_pcks"
|
||||
android:gravity="end"
|
||||
app:binding="@{quantityViewModel.numCnf}" >
|
||||
</com.google.android.material.textfield.TextInputEditText>
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:id="@+id/input_qta_cnf"
|
||||
android:enabled="@{!(quantityViewModel.blockedQtaTot.get() && quantityViewModel.blockedNumDiCnf.get())}"
|
||||
style="@style/TextInputLayout.NoLine">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="numberDecimal"
|
||||
android:hint="@string/qty_x_pck"
|
||||
android:gravity="end"
|
||||
app:binding="@{quantityViewModel.qtaCnf}"/>
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:id="@+id/input_qta_tot"
|
||||
android:enabled="@{!(quantityViewModel.blockedNumDiCnf.get() && quantityViewModel.blockedQtaPerCnf.get())}"
|
||||
style="@style/TextInputLayout.NoLine">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="numberDecimal"
|
||||
android:hint="@string/tot_qty"
|
||||
android:gravity="end"
|
||||
app:binding="@{quantityViewModel.qtaTot}"/>
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginTop="8dp"
|
||||
android:weightSum="1">
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/close_lu_btn"
|
||||
android:layout_weight="0.4"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/Button.PrimaryOutline"
|
||||
android:layout_marginStart="0dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/left_buttons_guideline"
|
||||
app:strokeColor="@color/colorPrimary"
|
||||
android:text="@string/action_close_ul"/>
|
||||
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/abort_btn"
|
||||
android:layout_weight="0.3"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/Button.DangerFull"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:paddingEnd="3dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@id/left_buttons_guideline"
|
||||
app:layout_constraintEnd_toStartOf="@id/right_buttons_guideline"
|
||||
app:icon="@drawable/ic_close_24dp"
|
||||
app:iconGravity="textStart"/>
|
||||
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/save_btn"
|
||||
android:layout_weight="0.3"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/Button.PrimaryFull"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_marginEnd="0dp"
|
||||
android:paddingEnd="3dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@id/right_buttons_guideline"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:icon="@drawable/ic_save_24"
|
||||
app:iconGravity="textStart"/>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
</layout>
|
||||
@ -200,6 +200,7 @@
|
||||
<string name="num_ords">Numero ordine</string>
|
||||
<string name="order_cod_jcoms">Commessa</string>
|
||||
<string name="customer">Cliente</string>
|
||||
<string name="job">Commessa</string>
|
||||
<string name="recipient">Destinatario</string>
|
||||
<string name="ship_date">Data consegna</string>
|
||||
<string name="document_date">Data documento</string>
|
||||
@ -217,7 +218,7 @@
|
||||
<string name="gestione_A_L_only_accepted_message">Sono ammesse solo UL di <b>Acquisto</b> o <b>Lavorazione</b> qui</string>
|
||||
<string name="gestione_A_V_not_accepted_message"><![CDATA[Le UL di tipo <b>Acquisto</b> o <b>Vendita</b> non sono ammesse qui]]></string>
|
||||
<string name="gestione_V_not_accepted_message"><![CDATA[Le UL di tipo <b>Vendita</b> non sono ammesse qui]]></string>
|
||||
<string name="too_much_lu_found_message">E\' stata trovata più di una UL</string>
|
||||
<string name="too_much_lu_found_message_in_mono_lu">E\' stata trovata più di una UL in una posizione MONO-UL</string>
|
||||
<string name="ask_print_message"><![CDATA[Si vuole procedere con la stampa dell\'etichetta?]]></string>
|
||||
<string name="ask_position_of_lu_message">Scansiona il codice a barre di una <b>Posizione</b></string>
|
||||
<string name="ask_production_line_of_lu_message">Scansiona il codice a barre di una <b>Linea di Produzione</b></string>
|
||||
|
||||
@ -203,6 +203,7 @@
|
||||
<string name="num_ords">Orders number</string>
|
||||
<string name="order_cod_jcoms">Orders job</string>
|
||||
<string name="customer">Customer</string>
|
||||
<string name="job">Job</string>
|
||||
<string name="recipient">Recipient</string>
|
||||
<string name="ship_date">Ship date</string>
|
||||
<string name="document_date">Document date</string>
|
||||
@ -220,7 +221,7 @@
|
||||
<string name="gestione_A_L_only_accepted_message">Only <b>Purchase</b> or <b>Production\'s</b> LU are accepted here</string>
|
||||
<string name="gestione_A_V_not_accepted_message">The LU of type Purchase or Sale is not accepted here</string>
|
||||
<string name="gestione_V_not_accepted_message">The LU of type Sale is not accepted here</string>
|
||||
<string name="too_much_lu_found_message">Multiple LU found</string>
|
||||
<string name="too_much_lu_found_message_in_mono_lu">Multiple LU found in MONO-LU position</string>
|
||||
<string name="ask_print_message">Do you want print the label?</string>
|
||||
<string name="ask_position_of_lu_message">Please scan a <b>Position</b> barcode</string>
|
||||
<string name="ask_production_line_of_lu_message">Please scan a <b>Production Line</b> barcode</string>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user