Finish v1_10_01
This commit is contained in:
commit
8bc7b2aa68
@ -17,8 +17,8 @@ apply plugin: 'com.google.gms.google-services'
|
||||
|
||||
android {
|
||||
|
||||
def appVersionCode = 100
|
||||
def appVersionName = '1.9.6'
|
||||
def appVersionCode = 104
|
||||
def appVersionName = '1.10.1'
|
||||
|
||||
signingConfigs {
|
||||
release {
|
||||
|
||||
@ -72,7 +72,7 @@ public class ClassRouter {
|
||||
return (T)clazz.newInstance();
|
||||
|
||||
} catch (InstantiationException | MethodPathNotRegisteredException | IllegalAccessException ex) {
|
||||
UtilityExceptions.defaultException(context, ex, true);
|
||||
// UtilityExceptions.defaultException(null, ex, true);
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
@ -1,10 +1,12 @@
|
||||
package it.integry.integrywmsnative.core.data_store.db.dao;
|
||||
|
||||
import androidx.room.Dao;
|
||||
import androidx.room.Delete;
|
||||
import androidx.room.Insert;
|
||||
import androidx.room.Query;
|
||||
import androidx.room.Update;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.ArticoloGriglia;
|
||||
@ -13,6 +15,7 @@ import it.integry.integrywmsnative.core.data_store.db.entity.ArticoloGriglia;
|
||||
public interface ArticoloGrigliaDao {
|
||||
@Query("SELECT * from articoli_griglia")
|
||||
List<ArticoloGriglia> getAll();
|
||||
|
||||
@Query("SELECT articolo_griglia_id FROM articoli_griglia WHERE cod_mart = :codMart AND id_griglia = :idGriglia")
|
||||
Integer getIdArticoloByGrigliaAndCodMart(int idGriglia, String codMart);
|
||||
|
||||
@ -25,6 +28,9 @@ public interface ArticoloGrigliaDao {
|
||||
@Update
|
||||
void update(ArticoloGriglia articolo);
|
||||
|
||||
@Delete
|
||||
void deleteList(List<ArticoloGriglia> toDelete);
|
||||
|
||||
@Query("SELECT * FROM articoli_griglia WHERE bar_code = :barcode AND id_griglia = :idGriglia LIMIT 1")
|
||||
ArticoloGriglia findArticoloByBarcodeAndGriglia(String barcode, int idGriglia);
|
||||
|
||||
@ -36,4 +42,7 @@ public interface ArticoloGrigliaDao {
|
||||
|
||||
@Query("SELECT articolo_griglia_id FROM articoli_griglia WHERE (cod_mart = :codMart AND bar_code =:barCode )AND id_griglia = :idGriglia LIMIT 1")
|
||||
Integer getIdArticoloByGrigliaAndBarcodeAndCodMart(int idGriglia, String barCode, String codMart);
|
||||
|
||||
@Query("SELECT * FROM articoli_griglia WHERE id_griglia = :grigliaId")
|
||||
List<ArticoloGriglia> getArticoliFromGriglia(int grigliaId);
|
||||
}
|
||||
|
||||
@ -1,5 +1,8 @@
|
||||
package it.integry.integrywmsnative.core.data_store.db.repository;
|
||||
|
||||
import com.annimon.stream.Collectors;
|
||||
import com.annimon.stream.Stream;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@ -8,6 +11,7 @@ import java.util.List;
|
||||
import it.integry.integrywmsnative.MainApplication;
|
||||
import it.integry.integrywmsnative.core.data_store.db.dao.ArticoloGrigliaDao;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.ArticoloGriglia;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.Griglia;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
|
||||
public class ArticoliGrigliaRepository extends Repository{
|
||||
@ -18,13 +22,15 @@ public class ArticoliGrigliaRepository extends Repository{
|
||||
this.mRepository = MainApplication.getArticoliGrigliaRepository();
|
||||
}
|
||||
|
||||
public void saveArticoliToGriglia(List<ArticoloGriglia> articoli, Runnable onSuccess, RunnableArgs<Exception> onFail) {
|
||||
public void saveArticoliToGriglia(List<ArticoloGriglia> articoli, Griglia griglia, Runnable onSuccess, RunnableArgs<Exception> onFail) {
|
||||
execute(()->{
|
||||
try{
|
||||
List<ArticoloGriglia> toUpdate = new ArrayList<>();
|
||||
List<ArticoloGriglia> toInsert = new ArrayList<>();
|
||||
List<String> codMarts = new ArrayList<>();
|
||||
for (ArticoloGriglia art : articoli){
|
||||
Integer id = mRepository.getIdArticoloByGrigliaAndBarcodeAndCodMart(art.getIdGriglia(),art.getBarCode(),art.getCodMart());
|
||||
Integer id = mRepository.getIdArticoloByGrigliaAndBarcodeAndCodMart(griglia.getGrigliaId(),art.getBarCode(),art.getCodMart());
|
||||
codMarts.add(art.getCodMart());
|
||||
if (id != null){
|
||||
art.setArticoloGrigliaId(id);
|
||||
toUpdate.add(art);
|
||||
@ -34,6 +40,9 @@ public class ArticoliGrigliaRepository extends Repository{
|
||||
}
|
||||
mRepository.insertAll(toInsert);
|
||||
mRepository.updateAll(toUpdate);
|
||||
List<ArticoloGriglia> articoliGriglia = mRepository.getArticoliFromGriglia(griglia.getGrigliaId());
|
||||
List<ArticoloGriglia> toDelete =Stream.of(articoliGriglia).filter(articolo-> !codMarts.contains(articolo.getCodMart())).toList();
|
||||
mRepository.deleteList(toDelete);
|
||||
onSuccess.run();
|
||||
}catch (Exception e){
|
||||
onFail.run(e);
|
||||
|
||||
@ -12,10 +12,20 @@ public class BaseActivity extends AppCompatActivity {
|
||||
@Override
|
||||
public boolean dispatchKeyEvent(KeyEvent event) {
|
||||
if (BarcodeManager.isEnabled() && BarcodeManager.isKeyboardEmulator()) {
|
||||
if (event.getAction() == KeyEvent.ACTION_DOWN || event.getAction() == KeyEvent.ACTION_MULTIPLE) {
|
||||
if (event.getAction() == KeyEvent.ACTION_DOWN || event.getAction() == KeyEvent.ACTION_MULTIPLE && !isControlKey(event)) {
|
||||
return BarcodeManager.onKeyDown(event.getKeyCode(), event);
|
||||
}
|
||||
}
|
||||
return super.dispatchKeyEvent(event);
|
||||
}
|
||||
|
||||
private boolean isControlKey(KeyEvent keyEvent) {
|
||||
int keyCode = keyEvent.getKeyCode();
|
||||
return (
|
||||
keyCode == KeyEvent.KEYCODE_BACK ||
|
||||
keyCode == KeyEvent.KEYCODE_SHIFT_LEFT ||
|
||||
keyCode == KeyEvent.KEYCODE_DEL
|
||||
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -18,7 +18,7 @@ public class BaseDialog extends Dialog {
|
||||
|
||||
public BaseDialog(@NonNull Context context) {
|
||||
super(context);
|
||||
if (BarcodeManager.isEnabled() && BarcodeManager.isKeyboardEmulator()){
|
||||
if (BarcodeManager.isEnabled() && BarcodeManager.isKeyboardEmulator()) {
|
||||
setOnKeyListener((dialog, keyCode, event) -> {
|
||||
if (mBarcodeListener && (event.getAction() == KeyEvent.ACTION_DOWN || event.getAction() == KeyEvent.ACTION_MULTIPLE) && !isControlKey(event)) {
|
||||
return BarcodeManager.onKeyDown(event.getKeyCode(), event);
|
||||
@ -32,8 +32,8 @@ public class BaseDialog extends Dialog {
|
||||
int keyCode = keyEvent.getKeyCode();
|
||||
return (
|
||||
keyCode == KeyEvent.KEYCODE_BACK ||
|
||||
keyCode == KeyEvent.KEYCODE_SHIFT_LEFT
|
||||
|
||||
keyCode == KeyEvent.KEYCODE_SHIFT_LEFT ||
|
||||
keyCode == KeyEvent.KEYCODE_DEL
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -3,6 +3,8 @@ package it.integry.integrywmsnative.core.rest.consumers;
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
|
||||
import androidx.databinding.ObservableArrayList;
|
||||
|
||||
import com.annimon.stream.Stream;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.JsonObject;
|
||||
@ -50,15 +52,18 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer{
|
||||
|
||||
|
||||
public static void saveCollo(MtbColt mtbColtToSave, RunnableArgs<MtbColt> onComplete, RunnableArgs<Exception> onFailed){
|
||||
MtbColt mtbColtToSaveClone = (MtbColt) mtbColtToSave.clone();
|
||||
|
||||
mtbColtToSaveClone.setMtbColr(new ObservableArrayList<>());
|
||||
|
||||
for (int i = 0; i < mtbColtToSave.getMtbColr().size(); i++) {
|
||||
mtbColtToSave.getMtbColr().get(i)
|
||||
mtbColtToSaveClone.getMtbColr().add(
|
||||
((MtbColr) mtbColtToSave.getMtbColr().get(i).clone())
|
||||
.setMtbAart(null)
|
||||
.setRifPartitaMag(null);
|
||||
.setRifPartitaMag(null));
|
||||
}
|
||||
|
||||
EntityRESTConsumer.processEntity(mtbColtToSave, new ISimpleOperationCallback<MtbColt>() {
|
||||
EntityRESTConsumer.processEntity(mtbColtToSaveClone, new ISimpleOperationCallback<MtbColt>() {
|
||||
@Override
|
||||
public void onSuccess(MtbColt value) {
|
||||
if(onComplete != null) onComplete.run(value);
|
||||
|
||||
@ -38,7 +38,7 @@ public class UtilityLogger {
|
||||
}
|
||||
|
||||
public static void errorMe(Exception ex, String additionalText, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||
if(!(ex instanceof SocketTimeoutException)) {
|
||||
if(!(ex instanceof SocketTimeoutException) && !(ex.getCause() instanceof SocketTimeoutException)) {
|
||||
|
||||
String message = UtilityResources.readRawTextFile(R.raw.error_mail);
|
||||
|
||||
|
||||
@ -11,12 +11,14 @@ import android.view.ViewGroup;
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.interfaces.IRecyclerItemClicked;
|
||||
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityNumber;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||
import it.integry.integrywmsnative.databinding.ListaContenutoBancaleListModelBinding;
|
||||
|
||||
public class ContenutoBancaleListAdapter extends RecyclerView.Adapter<ContenutoBancaleListAdapter.ViewHolder> {
|
||||
|
||||
|
||||
protected Context mContext;
|
||||
protected static Context mContext;
|
||||
protected ObservableArrayList<MtbColr> mDataset;
|
||||
|
||||
private IRecyclerItemClicked<MtbColr> mOnItemClickListener;
|
||||
@ -32,6 +34,18 @@ public class ContenutoBancaleListAdapter extends RecyclerView.Adapter<ContenutoB
|
||||
|
||||
public void bind(MtbColr mtbColr) {
|
||||
mViewDataBinding.setMtbColr(mtbColr);
|
||||
|
||||
|
||||
if(mtbColr.getMtbAart() != null) {
|
||||
if (mtbColr.getMtbAart().isFlagQtaCnfFissa()) {
|
||||
mViewDataBinding.qtaTextview.setText(UtilityNumber.decimalToString(mtbColr.getQtaCol()) + (!UtilityString.isNullOrEmpty(mtbColr.getMtbAart().getUntMis()) ? "\n" + mtbColr.getMtbAart().getUntMis() : ""));
|
||||
} else {
|
||||
mViewDataBinding.qtaTextview.setText(UtilityNumber.decimalToString(mtbColr.getNumCnf()) + "\n" + mContext.getString(R.string.unt_mis_col));
|
||||
}
|
||||
} else {
|
||||
mViewDataBinding.qtaTextview.setText(UtilityNumber.decimalToString(mtbColr.getQtaCol()));
|
||||
}
|
||||
|
||||
mViewDataBinding.executePendingBindings();
|
||||
}
|
||||
}
|
||||
|
||||
@ -10,29 +10,31 @@ import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.appcompat.app.ActionBar;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
import it.integry.integrywmsnative.BuildConfig;
|
||||
|
||||
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.interfaces.IPoppableActivity;
|
||||
import it.integry.integrywmsnative.core.interfaces.IScrollableFragment;
|
||||
import it.integry.integrywmsnative.core.interfaces.ITitledFragment;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
||||
import it.integry.integrywmsnative.databinding.FragmentPickingLiberoBinding;
|
||||
import it.integry.integrywmsnative.gest.picking_libero.core.PickingLiberoHelper;
|
||||
import it.integry.integrywmsnative.gest.picking_libero.viewmodel.PickingLiberoViewModel;
|
||||
import it.integry.integrywmsnative.ui.ElevatedToolbar;
|
||||
|
||||
/**
|
||||
* A simple {@link Fragment} subclass.
|
||||
*/
|
||||
public class PickingLiberoFragment extends Fragment implements ITitledFragment {
|
||||
public class PickingLiberoFragment extends Fragment implements ITitledFragment, IScrollableFragment {
|
||||
|
||||
private FragmentPickingLiberoBinding mBindings;
|
||||
|
||||
private PickingLiberoHelper mHelper;
|
||||
private PickingLiberoViewModel mViewModel;
|
||||
private AppCompatTextView mAppCompatActionBar;
|
||||
|
||||
private Runnable mOnPreDestroy;
|
||||
private ElevatedToolbar mToolbar;
|
||||
private AppCompatTextView mToolbarTitleText;
|
||||
|
||||
private int barcodeScannerIstanceID = -1;
|
||||
|
||||
@ -49,8 +51,8 @@ public class PickingLiberoFragment extends Fragment implements ITitledFragment {
|
||||
|
||||
@Override
|
||||
public void onCreateActionBar(AppCompatTextView titleText, Context context) {
|
||||
mAppCompatActionBar = titleText;
|
||||
titleText.setText(context.getText(R.string.free_picking_title_fragment).toString());
|
||||
mToolbarTitleText = titleText;
|
||||
mToolbarTitleText.setText(context.getText(R.string.free_picking_title_fragment).toString());
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -66,10 +68,9 @@ public class PickingLiberoFragment extends Fragment implements ITitledFragment {
|
||||
// Inflate the layout for this fragment
|
||||
mBindings = DataBindingUtil.inflate(inflater, R.layout.fragment_picking_libero, container, false);
|
||||
|
||||
mHelper = new PickingLiberoHelper(getActivity());
|
||||
|
||||
mViewModel = new PickingLiberoViewModel();
|
||||
mViewModel.init(getActivity(), mBindings, mHelper, mAppCompatActionBar, () -> {
|
||||
mViewModel.init(getActivity(), mBindings, mToolbarTitleText, () -> {
|
||||
((IPoppableActivity) getActivity()).pop();
|
||||
});
|
||||
|
||||
@ -80,7 +81,7 @@ public class PickingLiberoFragment extends Fragment implements ITitledFragment {
|
||||
.setOnScanFailed(ex -> UtilityExceptions.defaultException(getActivity(), ex, false)));
|
||||
|
||||
|
||||
mBindings.elevatedToolbar.setNestedScrollView(mBindings.scrollView);
|
||||
mToolbar.setRecyclerView(mBindings.pickingLiberoMainList);
|
||||
|
||||
return mBindings.getRoot();
|
||||
}
|
||||
@ -89,7 +90,17 @@ public class PickingLiberoFragment extends Fragment implements ITitledFragment {
|
||||
public void onDestroyView() {
|
||||
mViewModel.closeLU();
|
||||
BarcodeManager.removeCallback(barcodeScannerIstanceID);
|
||||
if(mOnPreDestroy != null) mOnPreDestroy.run();
|
||||
super.onDestroyView();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setScrollToolbar(ElevatedToolbar toolbar) {
|
||||
mToolbar = toolbar;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setOnPreDestroy(Runnable onPreDestroy) {
|
||||
mOnPreDestroy = onPreDestroy;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,13 +0,0 @@
|
||||
package it.integry.integrywmsnative.gest.picking_libero.core;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
public class PickingLiberoHelper {
|
||||
|
||||
private final Context mContext;
|
||||
|
||||
public PickingLiberoHelper(Context context) {
|
||||
mContext = context;
|
||||
}
|
||||
|
||||
}
|
||||
@ -2,7 +2,6 @@ package it.integry.integrywmsnative.gest.picking_libero.viewmodel;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.Dialog;
|
||||
import android.app.ProgressDialog;
|
||||
import android.text.SpannableString;
|
||||
import android.view.View;
|
||||
|
||||
@ -50,8 +49,9 @@ 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.FragmentPickingLiberoBinding;
|
||||
import it.integry.integrywmsnative.gest.picking_libero.core.PickingLiberoHelper;
|
||||
import it.integry.integrywmsnative.gest.picking_libero.core.PickingLiberoListAdapter;
|
||||
import it.integry.integrywmsnative.ui.ElevatedToolbar;
|
||||
import it.integry.integrywmsnative.view.dialogs.DialogCommon;
|
||||
import it.integry.integrywmsnative.view.dialogs.DialogConsts;
|
||||
import it.integry.integrywmsnative.view.dialogs.ask_cliente.DialogAskCliente;
|
||||
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageHelper;
|
||||
@ -73,17 +73,15 @@ public class PickingLiberoViewModel implements IRecyclerItemClicked<MtbColr> {
|
||||
|
||||
private Activity mContext;
|
||||
private FragmentPickingLiberoBinding mBinding;
|
||||
private PickingLiberoHelper mHelper;
|
||||
|
||||
private AppCompatTextView mAppBarTitle;
|
||||
private AppCompatTextView mToolbarTitleText;
|
||||
|
||||
private PickingLiberoListAdapter mAdapter;
|
||||
|
||||
public void init(Activity context, FragmentPickingLiberoBinding binding, PickingLiberoHelper helper, AppCompatTextView titleText, Runnable onComplete) {
|
||||
public void init(Activity context, FragmentPickingLiberoBinding binding, AppCompatTextView toolbarTitleText, Runnable onComplete) {
|
||||
mContext = context;
|
||||
mBinding = binding;
|
||||
mHelper = helper;
|
||||
mAppBarTitle = titleText;
|
||||
mToolbarTitleText = toolbarTitleText;
|
||||
|
||||
initObservable();
|
||||
|
||||
@ -108,14 +106,14 @@ public class PickingLiberoViewModel implements IRecyclerItemClicked<MtbColr> {
|
||||
if(mtbColt.get() != null) {
|
||||
initAdapter();
|
||||
|
||||
if(mAppBarTitle != null) mAppBarTitle.setText(String.format(mContext.getText(R.string.lu_number_text).toString(), mtbColt.get().getNumCollo()));
|
||||
if(mToolbarTitleText != null) mToolbarTitleText.setText(String.format(mContext.getText(R.string.lu_number_text).toString(), mtbColt.get().getNumCollo()));
|
||||
|
||||
initObservableMtbColr();
|
||||
}
|
||||
else {
|
||||
destroyAdapter();
|
||||
|
||||
mAppBarTitle.setText(mContext.getText(R.string.free_picking).toString());
|
||||
mToolbarTitleText.setText(mContext.getText(R.string.free_picking).toString());
|
||||
}
|
||||
|
||||
thereIsAnOpenedUL.set(mtbColt.get() != null);
|
||||
@ -278,21 +276,21 @@ public class PickingLiberoViewModel implements IRecyclerItemClicked<MtbColr> {
|
||||
ColliMagazzinoRESTConsumer.getBySSCC(sscc, true, false, mtbColtScanned -> {
|
||||
|
||||
if(mtbColtScanned == null) {
|
||||
showNoULFound(() -> {
|
||||
DialogCommon.showNoULFound(mContext, () -> {
|
||||
BarcodeManager.enable();
|
||||
progressDialog.dismiss();
|
||||
});
|
||||
} else if((mtbColtScanned.getGestioneEnum() == GestioneEnum.ACQUISTO || mtbColtScanned.getGestioneEnum() == GestioneEnum.LAVORAZIONE) && mtbColtScanned.getSegno() > 0) {
|
||||
pickMerceULtoUL(mtbColtScanned, mtbColt.get(), progressDialog);
|
||||
} else {
|
||||
showNoULFound(() -> {
|
||||
DialogCommon.showNoULFound(mContext, () -> {
|
||||
BarcodeManager.enable();
|
||||
progressDialog.dismiss();
|
||||
});
|
||||
}
|
||||
|
||||
}, ex -> {
|
||||
showNoULFound(() -> {
|
||||
DialogCommon.showNoULFound(mContext, () -> {
|
||||
BarcodeManager.enable();
|
||||
progressDialog.dismiss();
|
||||
});
|
||||
@ -320,7 +318,7 @@ public class PickingLiberoViewModel implements IRecyclerItemClicked<MtbColr> {
|
||||
}
|
||||
this.loadArticolo(barcodeProd, ean128Model, progressDialog);
|
||||
} else {
|
||||
showNoULFound(() -> {
|
||||
DialogCommon.showNoULFound(mContext, () -> {
|
||||
BarcodeManager.enable();
|
||||
progressDialog.dismiss();
|
||||
});
|
||||
@ -330,7 +328,7 @@ public class PickingLiberoViewModel implements IRecyclerItemClicked<MtbColr> {
|
||||
|
||||
} else {
|
||||
//EAN 128 non completo o comunque mancano i riferimenti al prodotto
|
||||
showNoULFound(() -> {
|
||||
DialogCommon.showNoULFound(mContext, () -> {
|
||||
BarcodeManager.enable();
|
||||
progressDialog.dismiss();
|
||||
});
|
||||
@ -555,6 +553,8 @@ public class PickingLiberoViewModel implements IRecyclerItemClicked<MtbColr> {
|
||||
private void saveLU(MtbColt mtbColtToSave) {
|
||||
mtbColtToSave.setOperation(CommonModelConsts.OPERATION.INSERT_OR_UPDATE);
|
||||
|
||||
|
||||
|
||||
for(int i = 0; i < mtbColtToSave.getMtbColr().size(); i++) {
|
||||
mtbColtToSave.getMtbColr().get(i).setOperation(CommonModelConsts.OPERATION.INSERT_OR_UPDATE);
|
||||
}
|
||||
@ -578,23 +578,6 @@ public class PickingLiberoViewModel implements IRecyclerItemClicked<MtbColr> {
|
||||
}
|
||||
|
||||
|
||||
private void showDataSavedDialog() {
|
||||
|
||||
DialogSimpleMessageHelper.makeSuccessDialog(
|
||||
mContext,
|
||||
mContext.getResources().getString(R.string.completed),
|
||||
new SpannableString(mContext.getResources().getString(R.string.data_saved)),
|
||||
null, null).show();
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void showNoULFound(Runnable onComplete) {
|
||||
DialogSimpleMessageHelper.makeWarningDialog(mContext,
|
||||
new SpannableString(mContext.getResources().getText(R.string.no_lu_found_message)),
|
||||
null, onComplete).show();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -2,15 +2,14 @@ package it.integry.integrywmsnative.gest.prod_recupero_materiale.viewmodel;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.Dialog;
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.Context;
|
||||
import android.text.Html;
|
||||
import android.text.SpannableString;
|
||||
|
||||
import androidx.databinding.ObservableArrayList;
|
||||
import androidx.databinding.ObservableField;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
|
||||
import com.annimon.stream.Stream;
|
||||
import com.tfb.fbtoast.FBToast;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
@ -22,32 +21,25 @@ 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.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.interfaces.IPoppableActivity;
|
||||
import it.integry.integrywmsnative.core.model.CommonModelConsts;
|
||||
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
||||
import it.integry.integrywmsnative.core.report.ReportManager;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.ColliMagazzinoRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.PrinterRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.model.Ean128Model;
|
||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||
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.UtilityPosizione;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityProgress;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||
import it.integry.integrywmsnative.databinding.FragmentProdRecuperoMaterialeBinding;
|
||||
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.HistoryVersamentoProdUL;
|
||||
import it.integry.integrywmsnative.gest.prod_recupero_materiale.views.InputQuantityToReturnDialog;
|
||||
import it.integry.integrywmsnative.view.dialogs.ask_should_print.DialogAskShouldPrint;
|
||||
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.QuantityDTO;
|
||||
import it.integry.integrywmsnative.view.dialogs.scan_or_create_lu.DialogScanOrCreateLU;
|
||||
import it.integry.barcode_base_android_library.model.BarcodeScanDTO;
|
||||
|
||||
@ -65,6 +57,7 @@ public class ProdRecuperoMaterialeViewModel {
|
||||
|
||||
public ObservableField<MtbColt> mtbColt = new ObservableField<>();
|
||||
|
||||
private int barcodeScannerIstanceID = -1;
|
||||
|
||||
public void init(Activity context, FragmentProdRecuperoMaterialeBinding binding, ProdRecuperoMaterialeHelper helper, Runnable onRecuperoCompleted) {
|
||||
mContext = context;
|
||||
@ -74,6 +67,8 @@ public class ProdRecuperoMaterialeViewModel {
|
||||
|
||||
initRecyclerView();
|
||||
refreshAdapter();
|
||||
|
||||
initBarcode();
|
||||
}
|
||||
|
||||
|
||||
@ -83,15 +78,81 @@ public class ProdRecuperoMaterialeViewModel {
|
||||
|
||||
|
||||
|
||||
private void initBarcode() {
|
||||
barcodeScannerIstanceID = BarcodeManager.addCallback(new BarcodeCallbackDTO()
|
||||
.setOnScanSuccessfull(onScanSuccessful)
|
||||
.setOnScanFailed(ex -> UtilityExceptions.defaultException(mContext, ex, false)));
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void initRecyclerView() {
|
||||
mAdapter = new HistoryULsListAdapter(mContext, new ArrayList<>());
|
||||
mAdapter.setOnItemClicked(this::onListItemClicked);
|
||||
mAdapter.setOnItemClicked(data -> this.dispatchItem(data, null, null));
|
||||
|
||||
mBinding.prodRecuperoMaterialeMainList.setLayoutManager(new LinearLayoutManager(mContext));
|
||||
mBinding.prodRecuperoMaterialeMainList.setAdapter(mAdapter);
|
||||
}
|
||||
|
||||
private void onListItemClicked(HistoryVersamentoProdUL item) {
|
||||
|
||||
|
||||
private RunnableArgs<BarcodeScanDTO> onScanSuccessful = data -> {
|
||||
BarcodeManager.disable();
|
||||
|
||||
Dialog progressDialog = UtilityProgress.createDefaultProgressDialog(mContext);
|
||||
|
||||
if(UtilityBarcode.isEtichettaAnonima(data) || UtilityBarcode.isEtichetta128(data)){
|
||||
this.executeEtichettaUL(data, progressDialog);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
private void executeEtichettaUL(BarcodeScanDTO barcodeScanDTO, Dialog progressDialog) {
|
||||
ColliMagazzinoRESTConsumer.getBySSCC(barcodeScanDTO.getStringValue(), true, false, mtbColt -> {
|
||||
|
||||
if(mtbColt != null) {
|
||||
|
||||
HistoryVersamentoProdUL historyVersamentoProdUL = this.getHistoryElementFromMtbColt(mtbColt);
|
||||
if(historyVersamentoProdUL != null) {
|
||||
this.dispatchItem(historyVersamentoProdUL, mtbColt, progressDialog);
|
||||
} else {
|
||||
DialogCommon.showNoULFound(mContext, () -> {
|
||||
BarcodeManager.enable();
|
||||
progressDialog.dismiss();
|
||||
});
|
||||
}
|
||||
|
||||
} else {
|
||||
DialogCommon.showNoULFound(mContext, () -> {
|
||||
BarcodeManager.enable();
|
||||
progressDialog.dismiss();
|
||||
});
|
||||
}
|
||||
|
||||
}, ex -> {
|
||||
UtilityExceptions.defaultException(mContext, ex, progressDialog);
|
||||
BarcodeManager.enable();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
private HistoryVersamentoProdUL getHistoryElementFromMtbColt(MtbColt mtbColt) {
|
||||
List<HistoryVersamentoProdUL> filteredItems = Stream.of(mDataset)
|
||||
.filter(x -> Objects.equals(x.getNumColloRif(), mtbColt.getNumCollo()) &&
|
||||
x.getDataColloRif().equals(mtbColt.getDataColloS()) &&
|
||||
x.getSerColloRif().equalsIgnoreCase(mtbColt.getSerCollo()) &&
|
||||
x.getGestioneRif().equalsIgnoreCase(mtbColt.getGestione()))
|
||||
.toList();
|
||||
|
||||
if(filteredItems != null && filteredItems.size() > 0) {
|
||||
return filteredItems.get(0);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
private void dispatchItem(HistoryVersamentoProdUL item, MtbColt sourceMtbColt, Dialog dialogProgress) {
|
||||
BigDecimal qtaDaEvadere = BigDecimal.ZERO;
|
||||
|
||||
qtaDaEvadere = qtaDaEvadere.add(item.getQtaCol());
|
||||
@ -108,20 +169,22 @@ public class ProdRecuperoMaterialeViewModel {
|
||||
.setQtaDisponibile(qtaDaEvadere);
|
||||
|
||||
DialogInputQuantity.makeBase(mContext, dto, false, quantity -> {
|
||||
onItemDispatched(item, quantity.qtaTot.getBigDecimal());
|
||||
onItemDispatched(item, quantity.qtaTot.getBigDecimal(), sourceMtbColt, dialogProgress);
|
||||
}, () -> {
|
||||
|
||||
}).show();
|
||||
|
||||
// InputQuantityToReturnDialog.make(mContext, item.getMtbAart(), BigDecimal.ONE, qtaDaEvadere, quantity -> {
|
||||
// onItemDispatched(item, quantity);
|
||||
// }).show();
|
||||
|
||||
}
|
||||
|
||||
private void onItemDispatched(HistoryVersamentoProdUL item, BigDecimal quantity) {
|
||||
|
||||
final Dialog progress = UtilityProgress.createDefaultProgressDialog(mContext);
|
||||
|
||||
|
||||
|
||||
private void onItemDispatched(HistoryVersamentoProdUL item, BigDecimal quantity, MtbColt sourceMtbColt, Dialog progress) {
|
||||
|
||||
if(progress == null) {
|
||||
progress = UtilityProgress.createDefaultProgressDialog(mContext);
|
||||
}
|
||||
Dialog finalProgress = progress;
|
||||
|
||||
final MtbColt mtbColtScarico = new MtbColt()
|
||||
.setDataCollo(item.getDataCollo())
|
||||
@ -141,17 +204,15 @@ public class ProdRecuperoMaterialeViewModel {
|
||||
.setGestioneRif(item.getGestioneRif())
|
||||
.setSerColloRif(item.getSerColloRif());
|
||||
|
||||
|
||||
|
||||
mtbColrScarico.setOperation(CommonModelConsts.OPERATION.INSERT);
|
||||
mtbColtScarico.setOperation(CommonModelConsts.OPERATION.INSERT_OR_UPDATE);
|
||||
mtbColtScarico.getMtbColr().add(mtbColrScarico);
|
||||
|
||||
DialogScanOrCreateLU.make(mContext, false, false, mtbColt -> {
|
||||
|
||||
RunnableArgs<MtbColt> saveRunnable = mtbColt -> {
|
||||
|
||||
if(mtbColt != null) {
|
||||
|
||||
|
||||
List<MtbColt> colliToSave = new ArrayList<>();
|
||||
boolean shouldPrint = false;
|
||||
|
||||
@ -192,29 +253,27 @@ public class ProdRecuperoMaterialeViewModel {
|
||||
FBToast.successToast(mContext, mContext.getResources().getString(R.string.data_saved), FBToast.LENGTH_SHORT);
|
||||
|
||||
if(finalShouldPrint) {
|
||||
printCollo(progress, value.get(0), () -> {
|
||||
printCollo(finalProgress, value.get(0), () -> {
|
||||
this.refreshAdapter();
|
||||
mOnRecuperoCompleted.run();
|
||||
});
|
||||
} else {
|
||||
finalProgress.dismiss();
|
||||
this.refreshAdapter();
|
||||
mOnRecuperoCompleted.run();
|
||||
}
|
||||
|
||||
}, ex -> {
|
||||
UtilityExceptions.defaultException(mContext, ex, progress);
|
||||
UtilityExceptions.defaultException(mContext, ex, finalProgress);
|
||||
});
|
||||
|
||||
|
||||
} else {
|
||||
progress.dismiss();
|
||||
finalProgress.dismiss();
|
||||
}
|
||||
};
|
||||
|
||||
}).show();
|
||||
|
||||
|
||||
|
||||
|
||||
if(sourceMtbColt != null) saveRunnable.run(sourceMtbColt);
|
||||
else DialogScanOrCreateLU.make(mContext, false, false, saveRunnable).show();
|
||||
|
||||
}
|
||||
|
||||
@ -284,4 +343,7 @@ public class ProdRecuperoMaterialeViewModel {
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -20,6 +20,7 @@ import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityProgress;
|
||||
import it.integry.integrywmsnative.databinding.FragmentProdVersamentoMaterialeBinding;
|
||||
import it.integry.integrywmsnative.gest.prod_versamento_materiale.core.ProdVersamentoMaterialHelper;
|
||||
import it.integry.integrywmsnative.view.dialogs.DialogCommon;
|
||||
import it.integry.integrywmsnative.view.dialogs.DialogConsts;
|
||||
import it.integry.integrywmsnative.view.dialogs.ask_position_of_lu.DialogAskPositionOfLU;
|
||||
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageHelper;
|
||||
@ -103,7 +104,7 @@ public class ProdVersamentoMaterialViewModel {
|
||||
cloneUL.setCodJfas(mtbDepoPosizione.getPosizione());
|
||||
|
||||
ColliMagazzinoRESTConsumer.createColloScaricoDaCarico(cloneUL, mtbDepoPosizione, generatedMtbColt -> {
|
||||
showDataSavedDialog(() -> {
|
||||
DialogCommon.showDataSaved(mContext, () -> {
|
||||
progressDialog.dismiss();
|
||||
mOnVersamentoCompleted.run();
|
||||
});
|
||||
@ -123,14 +124,4 @@ public class ProdVersamentoMaterialViewModel {
|
||||
}
|
||||
|
||||
|
||||
private void showDataSavedDialog(Runnable onPositiveClick) {
|
||||
|
||||
DialogSimpleMessageHelper.makeSuccessDialog(
|
||||
mContext,
|
||||
mContext.getResources().getString(R.string.completed),
|
||||
new SpannableString(mContext.getResources().getString(R.string.data_saved)),
|
||||
null, onPositiveClick).show();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -210,16 +210,6 @@ public class PVOrdineAcquistoEditActivity extends BaseActivity {
|
||||
super.onBackPressed();
|
||||
}
|
||||
|
||||
private void showDataSavedDialog() {
|
||||
|
||||
DialogSimpleMessageHelper.makeSuccessDialog(
|
||||
this,
|
||||
getString(R.string.completed),
|
||||
new SpannableString(getString(R.string.data_saved)),
|
||||
null, null).show();
|
||||
|
||||
}
|
||||
|
||||
public void manualSearch(){
|
||||
BarcodeManager.disable();
|
||||
DialogSimpleInputHelper.makeInputDialog(this,"Inserisci il codice a barre/codice articolo da cercare",codice->{
|
||||
|
||||
@ -50,9 +50,7 @@ public class OrdineAcquistoPvHelper {
|
||||
griglia.setDescrLisa(dto.getDescrLisa());
|
||||
griglia.setDescrDepo(dto.getDescrDepo());
|
||||
griglia.setCountArticoli(dto.getGrigliaAcquistiChild().size());
|
||||
mGrigliaRepository.saveGriglia(griglia, id -> {
|
||||
saveLisAToGriglia(dto.getGrigliaAcquistiChild(), griglia, onSave, onFail);
|
||||
}, onFail);
|
||||
mGrigliaRepository.saveGriglia(griglia, id -> saveLisAToGriglia(dto.getGrigliaAcquistiChild(), griglia, onSave, onFail), onFail);
|
||||
|
||||
}, onFail);
|
||||
}
|
||||
@ -64,7 +62,7 @@ public class OrdineAcquistoPvHelper {
|
||||
toSave.setIdGriglia(griglia.getGrigliaId());
|
||||
articoliGriglia.add(toSave);
|
||||
}
|
||||
mArticoliGrigliaRepository.saveArticoliToGriglia(articoliGriglia, () -> onSave.run(griglia), onFail);
|
||||
mArticoliGrigliaRepository.saveArticoliToGriglia(articoliGriglia,griglia, () -> onSave.run(griglia), onFail);
|
||||
}
|
||||
|
||||
public void createNewOrder(Griglia griglia, RunnableArgs<Ordine> onSuccess, RunnableArgs<Exception> onError) {
|
||||
|
||||
@ -1,8 +1,5 @@
|
||||
package it.integry.integrywmsnative.gest.vendita.dto;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
@ -16,7 +13,7 @@ import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityLogger;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||
|
||||
public class PickingObjectDTO implements Parcelable {
|
||||
public class PickingObjectDTO {
|
||||
|
||||
private Integer numCollo;
|
||||
private String gestione;
|
||||
@ -35,7 +32,7 @@ public class PickingObjectDTO implements Parcelable {
|
||||
private String partitaMag;
|
||||
private BigDecimal qtaOrd;
|
||||
private BigDecimal numCnfCollo;
|
||||
private BigDecimal numCnf;
|
||||
private BigDecimal numCnfOrd;
|
||||
private String codAlis;
|
||||
private BigDecimal colliPedana;
|
||||
private BigDecimal qtaDisponibileCollo;
|
||||
@ -51,165 +48,6 @@ public class PickingObjectDTO implements Parcelable {
|
||||
|
||||
private ArrayList<MtbColr> withdrawRows = new ArrayList<>();
|
||||
|
||||
protected PickingObjectDTO(Parcel in) {
|
||||
if (in.readByte() == 0) {
|
||||
numCollo = null;
|
||||
} else {
|
||||
numCollo = in.readInt();
|
||||
}
|
||||
gestione = in.readString();
|
||||
serCollo = in.readString();
|
||||
descrizioneEstesa = in.readString();
|
||||
codJcom = in.readString();
|
||||
codMart = in.readString();
|
||||
posizione = in.readString();
|
||||
dataCollo = in.readString();
|
||||
if (in.readByte() == 0) {
|
||||
idViaggio = null;
|
||||
} else {
|
||||
idViaggio = in.readInt();
|
||||
}
|
||||
codTagl = in.readString();
|
||||
codCol = in.readString();
|
||||
dataScad = in.readString();
|
||||
codArtFor = in.readString();
|
||||
partitaMag = in.readString();
|
||||
codAlis = in.readString();
|
||||
hidden = in.readByte() == 0x00 ? null : in.readByte() != 0x00;
|
||||
deactivated = in.readByte() == 0x00 ? null : in.readByte() != 0x00;
|
||||
|
||||
if (in.readByte() == 0) {
|
||||
qtaCollo = null;
|
||||
} else {
|
||||
qtaCollo = new BigDecimal(in.readFloat());
|
||||
}
|
||||
if (in.readByte() == 0) {
|
||||
qtaOrd = null;
|
||||
} else {
|
||||
qtaOrd = new BigDecimal(in.readFloat());
|
||||
}
|
||||
if (in.readByte() == 0) {
|
||||
numCnf = null;
|
||||
} else {
|
||||
numCnf = new BigDecimal(in.readFloat());
|
||||
}
|
||||
if (in.readByte() == 0) {
|
||||
numCnfCollo = null;
|
||||
} else {
|
||||
numCnfCollo = new BigDecimal(in.readFloat());
|
||||
}
|
||||
if (in.readByte() == 0) {
|
||||
qtaDisponibileCollo = null;
|
||||
} else {
|
||||
qtaDisponibileCollo = new BigDecimal(in.readFloat());
|
||||
}
|
||||
if (in.readByte() == 0) {
|
||||
numCnfDisponibileCollo = null;
|
||||
} else {
|
||||
numCnfDisponibileCollo = new BigDecimal(in.readFloat());
|
||||
}
|
||||
|
||||
|
||||
mtbAart = (MtbAart) in.readValue(MtbAart.class.getClassLoader());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel(Parcel dest, int flags) {
|
||||
if (numCollo == null) {
|
||||
dest.writeByte((byte) 0);
|
||||
} else {
|
||||
dest.writeByte((byte) 1);
|
||||
dest.writeInt(numCollo);
|
||||
}
|
||||
dest.writeString(gestione);
|
||||
dest.writeString(serCollo);
|
||||
dest.writeString(descrizioneEstesa);
|
||||
dest.writeString(codJcom);
|
||||
dest.writeString(codMart);
|
||||
dest.writeString(posizione);
|
||||
dest.writeString(dataCollo);
|
||||
if (idViaggio == null) {
|
||||
dest.writeByte((byte) 0);
|
||||
} else {
|
||||
dest.writeByte((byte) 1);
|
||||
dest.writeInt(idViaggio);
|
||||
}
|
||||
dest.writeString(codTagl);
|
||||
dest.writeString(codCol);
|
||||
dest.writeString(dataScad);
|
||||
dest.writeString(codArtFor);
|
||||
dest.writeString(partitaMag);
|
||||
dest.writeString(codAlis);
|
||||
if (hidden == null) {
|
||||
dest.writeByte((byte) (0x00));
|
||||
} else {
|
||||
dest.writeByte((byte) (0x01));
|
||||
dest.writeByte((byte) (hidden ? 0x01 : 0x00));
|
||||
}
|
||||
if (deactivated == null) {
|
||||
dest.writeByte((byte) (0x00));
|
||||
} else {
|
||||
dest.writeByte((byte) (0x01));
|
||||
dest.writeByte((byte) (deactivated ? 0x01 : 0x00));
|
||||
}
|
||||
|
||||
if (qtaCollo == null) {
|
||||
dest.writeByte((byte) (0x00));
|
||||
} else {
|
||||
dest.writeByte((byte) (0x01));
|
||||
dest.writeFloat(qtaCollo.floatValue());
|
||||
}
|
||||
if (qtaOrd == null) {
|
||||
dest.writeByte((byte) (0x00));
|
||||
} else {
|
||||
dest.writeByte((byte) (0x01));
|
||||
dest.writeFloat(qtaOrd.floatValue());
|
||||
}
|
||||
if (numCnf == null) {
|
||||
dest.writeByte((byte) (0x00));
|
||||
} else {
|
||||
dest.writeByte((byte) (0x01));
|
||||
dest.writeFloat(numCnf.floatValue());
|
||||
}
|
||||
if (numCnfCollo == null) {
|
||||
dest.writeByte((byte) (0x00));
|
||||
} else {
|
||||
dest.writeByte((byte) (0x01));
|
||||
dest.writeFloat(numCnfCollo.floatValue());
|
||||
}
|
||||
if (qtaDisponibileCollo == null) {
|
||||
dest.writeByte((byte) (0x00));
|
||||
} else {
|
||||
dest.writeByte((byte) (0x01));
|
||||
dest.writeFloat(qtaDisponibileCollo.floatValue());
|
||||
}
|
||||
if (numCnfDisponibileCollo == null) {
|
||||
dest.writeByte((byte) (0x00));
|
||||
} else {
|
||||
dest.writeByte((byte) (0x01));
|
||||
dest.writeFloat(numCnfDisponibileCollo.floatValue());
|
||||
}
|
||||
|
||||
dest.writeValue(mtbAart);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static final Creator<PickingObjectDTO> CREATOR = new Creator<PickingObjectDTO>() {
|
||||
@Override
|
||||
public PickingObjectDTO createFromParcel(Parcel in) {
|
||||
return new PickingObjectDTO(in);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PickingObjectDTO[] newArray(int size) {
|
||||
return new PickingObjectDTO[size];
|
||||
}
|
||||
};
|
||||
|
||||
public Integer getNumCollo() {
|
||||
return numCollo;
|
||||
}
|
||||
@ -384,12 +222,12 @@ public class PickingObjectDTO implements Parcelable {
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getNumCnf() {
|
||||
return numCnf;
|
||||
public BigDecimal getNumCnfOrd() {
|
||||
return numCnfOrd;
|
||||
}
|
||||
|
||||
public PickingObjectDTO setNumCnf(BigDecimal numCnf) {
|
||||
this.numCnf = numCnf;
|
||||
public PickingObjectDTO setNumCnfOrd(BigDecimal numCnfOrd) {
|
||||
this.numCnfOrd = numCnfOrd;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@ -27,6 +27,7 @@ import it.integry.integrywmsnative.databinding.FragmentMainVenditaBinding;
|
||||
import it.integry.integrywmsnative.gest.vendita.MainVenditaFragment;
|
||||
import it.integry.integrywmsnative.gest.vendita.core.VenditaHelper;
|
||||
import it.integry.integrywmsnative.gest.vendita.dto.OrdineVenditaInevasoDTO;
|
||||
import it.integry.integrywmsnative.view.dialogs.DialogCommon;
|
||||
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageHelper;
|
||||
import it.integry.barcode_base_android_library.model.BarcodeScanDTO;
|
||||
|
||||
@ -82,7 +83,7 @@ public class VenditaViewModel {
|
||||
if(!UtilityString.isNullOrEmpty(ean128Model.Sscc)){
|
||||
this.executeEtichettaLU(ean128Model.Sscc, progressDialog);
|
||||
} else {
|
||||
showNoULFound();
|
||||
DialogCommon.showNoULFound(mContext, null);
|
||||
progressDialog.dismiss();
|
||||
BarcodeManager.enable();
|
||||
|
||||
@ -91,7 +92,7 @@ public class VenditaViewModel {
|
||||
|
||||
} else {
|
||||
//EAN 128 non completo o comunque mancano i riferimenti al prodotto
|
||||
showNoULFound();
|
||||
DialogCommon.showNoULFound(mContext, null);
|
||||
progressDialog.dismiss();
|
||||
BarcodeManager.enable();
|
||||
}
|
||||
@ -124,7 +125,7 @@ public class VenditaViewModel {
|
||||
mFragment.refreshOrdini(filteredOrders);
|
||||
mFragment.refreshRecyclerView();
|
||||
} else {
|
||||
showNoOrderFound();
|
||||
DialogCommon.showNoOrderFound(mContext, null);
|
||||
}
|
||||
|
||||
progressDialog.dismiss();
|
||||
@ -149,7 +150,7 @@ public class VenditaViewModel {
|
||||
} else {
|
||||
progressDialog.dismiss();
|
||||
BarcodeManager.enable();
|
||||
showNoULFound();
|
||||
DialogCommon.showNoULFound(mContext, null);
|
||||
}
|
||||
|
||||
|
||||
@ -161,19 +162,6 @@ public class VenditaViewModel {
|
||||
|
||||
|
||||
|
||||
private void showNoOrderFound() {
|
||||
DialogSimpleMessageHelper.makeWarningDialog(mContext,
|
||||
new SpannableString(mContext.getResources().getText(R.string.no_orders_found_message)),
|
||||
null, null).show();
|
||||
}
|
||||
|
||||
|
||||
private void showNoULFound() {
|
||||
DialogSimpleMessageHelper.makeWarningDialog(mContext,
|
||||
new SpannableString(mContext.getResources().getText(R.string.no_lu_found_message)),
|
||||
null, null).show();
|
||||
}
|
||||
|
||||
|
||||
private void showWrongGestioneUL() {
|
||||
DialogSimpleMessageHelper.makeWarningDialog(mContext,
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package it.integry.integrywmsnative.gest.vendita_ordine_inevaso;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.Intent;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
@ -9,6 +10,7 @@ import android.view.MenuItem;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import it.integry.integrywmsnative.BuildConfig;
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.expansion.BaseActivity;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.PrinterRESTConsumer;
|
||||
@ -17,6 +19,7 @@ import it.integry.integrywmsnative.core.barcode_reader.BarcodeManager;
|
||||
import it.integry.integrywmsnative.core.data_cache.DataCache;
|
||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityProgress;
|
||||
import it.integry.integrywmsnative.databinding.ActivityVenditaOrdineInevasoBinding;
|
||||
import it.integry.integrywmsnative.databinding.FragmentArticoliInColloBottomSheetBinding;
|
||||
import it.integry.integrywmsnative.gest.lista_bancali.ListaBancaliActivity;
|
||||
@ -24,6 +27,7 @@ import it.integry.integrywmsnative.gest.vendita.dto.OrdineVenditaInevasoDTO;
|
||||
import it.integry.integrywmsnative.gest.vendita.dto.PickingObjectDTO;
|
||||
import it.integry.integrywmsnative.gest.vendita_ordine_inevaso.viewmodel.VenditaOrdineInevasoViewModel;
|
||||
import it.integry.integrywmsnative.view.bottomsheet.viewmodel.ArticoliInColloBottomSheetViewModel;
|
||||
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleInputHelper;
|
||||
|
||||
public class VenditaOrdineInevasoActivity extends BaseActivity {
|
||||
|
||||
|
||||
@ -200,7 +200,8 @@ public class MainListOrdineVenditaInevasoAdapter extends RecyclerView.Adapter<Ma
|
||||
final TextView qtaTot = groupModelView.findViewById(R.id.vendita_ordine_inevaso_main_list_group_item_qta_tot);
|
||||
qtaTot.setText(UtilityNumber.decimalToString(rowItem.getQtaOrdinata()));
|
||||
|
||||
|
||||
final TextView untMis = groupModelView.findViewById(R.id.vendita_ordine_inevaso_main_list_group_item_unt_mis);
|
||||
untMis.setText(rowItem.getUntMis());
|
||||
|
||||
|
||||
|
||||
|
||||
@ -149,7 +149,14 @@ public class VenditaOrdineInevasoHelper {
|
||||
}
|
||||
|
||||
rowModel.setQtaRiservata(getRigaQuantityEvasa(currentItem, mtbColrs));
|
||||
|
||||
if(currentItem.getMtbAart().isFlagQtaCnfFissa()) {
|
||||
rowModel.setUntMis(currentItem.getMtbAart().getUntMis());
|
||||
rowModel.setQtaOrdinata(currentItem.getNumCollo() != null ? currentItem.getQtaCollo() : currentItem.getQtaOrd());
|
||||
} else {
|
||||
rowModel.setUntMis("col");
|
||||
rowModel.setQtaOrdinata(currentItem.getNumCollo() != null ? currentItem.getNumCnfDisponibileCollo() : currentItem.getNumCnfOrd());
|
||||
}
|
||||
|
||||
rowModel.setOriginalModel(currentItem);
|
||||
|
||||
@ -166,16 +173,8 @@ public class VenditaOrdineInevasoHelper {
|
||||
BigDecimal currentQtaEvasa = BigDecimal.ZERO;
|
||||
|
||||
if(mtbColrs != null) {
|
||||
|
||||
|
||||
// List<MtbColr> filteredMtbColrs = Stream.of(mtbColrs).filter(
|
||||
// x -> x.getCodMart().equalsIgnoreCase(item.getCodMart()) &&
|
||||
// ((x.getCodJcom() == null && item.getCodJcom() == null) || (x.getCodJcom() != null && x.getCodJcom().equalsIgnoreCase(item.getCodJcom()))) &&
|
||||
// (!SettingsManager.iDB().isEnableCheckPartitaMagCheckPickingV() || (SettingsManager.iDB().isEnableCheckPartitaMagCheckPickingV() && ((x.getPartitaMag() == null && item.getPartitaMag() == null) || (x.getPartitaMag() != null && x.getPartitaMag().equalsIgnoreCase(item.getPartitaMag()))))) &&
|
||||
// ((x.getNumColloRif() == null && item.getNumCollo() == null) || (x.getNumColloRif() != null && x.getNumColloRif().equals(item.getNumCollo())))).toList();
|
||||
|
||||
for (MtbColr mtbColr : item.getWithdrawRows()) {
|
||||
currentQtaEvasa = currentQtaEvasa.add(mtbColr.getQtaCol());
|
||||
currentQtaEvasa = currentQtaEvasa.add(item.getMtbAart().isFlagQtaCnfFissa() ? mtbColr.getQtaCol() : mtbColr.getNumCnf());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -27,6 +27,7 @@ public class VenditaOrdineInevasoListViewModel {
|
||||
private String subDescrizione2;
|
||||
private BigDecimal qtaRiservata;
|
||||
private BigDecimal qtaOrdinata;
|
||||
private String untMis;
|
||||
|
||||
private PickingObjectDTO originalModel;
|
||||
|
||||
@ -101,6 +102,15 @@ public class VenditaOrdineInevasoListViewModel {
|
||||
this.originalModel = originalModel;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getUntMis() {
|
||||
return untMis;
|
||||
}
|
||||
|
||||
public SubItem setUntMis(String untMis) {
|
||||
this.untMis = untMis;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -19,6 +19,7 @@ import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
import it.integry.barcode_base_android_library.model.BarcodeType;
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.CommonConst;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.ArticoloRESTConsumer;
|
||||
@ -64,6 +65,7 @@ import it.integry.integrywmsnative.view.bottomsheet.viewmodel.ArticoliInColloBot
|
||||
|
||||
import it.integry.integrywmsnative.view.dialogs.DialogCommon;
|
||||
import it.integry.integrywmsnative.view.dialogs.DialogConsts;
|
||||
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleInputHelper;
|
||||
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageHelper;
|
||||
import it.integry.integrywmsnative.view.dialogs.ask_should_print.DialogAskShouldPrint;
|
||||
import it.integry.integrywmsnative.view.dialogs.input_quantity.DialogInputQuantity;
|
||||
@ -179,23 +181,8 @@ public class VenditaOrdineInevasoViewModel implements IOnColloClosedCallback, IO
|
||||
defaultGestioneOfUL = GestioneEnum.VENDITA;
|
||||
}
|
||||
|
||||
//Definizione del deposito di default
|
||||
List<String> foundCodMdep = Stream.of(mTestateOrdini)
|
||||
.map(OrdineVenditaInevasoDTO::getCodMdep)
|
||||
// .withoutNulls()
|
||||
.distinctBy(x -> x)
|
||||
.toList();
|
||||
|
||||
// if(foundCodMdep != null && foundCodMdep.size() > 1){
|
||||
// DialogSimpleMessageHelper.makeErrorDialog(mActivity, new SpannableString(mActivity.getString(R.string.error_multiple_cod_mdep_ordv)), null, () -> {
|
||||
// mActivity.finish();
|
||||
// }).show();
|
||||
// return;
|
||||
// } else if(foundCodMdep != null && foundCodMdep.size() == 1){
|
||||
// defaultCodMdepOfUL = foundCodMdep.get(0);
|
||||
// } else {
|
||||
defaultCodMdepOfUL = SettingsManager.i().userSession.depo.getCodMdep();
|
||||
// }
|
||||
|
||||
|
||||
|
||||
@ -348,26 +335,6 @@ public class VenditaOrdineInevasoViewModel implements IOnColloClosedCallback, IO
|
||||
}
|
||||
|
||||
public void recoverUL(MtbColt recoveredMtbColt){
|
||||
|
||||
for(int i = 0; i < recoveredMtbColt.getMtbColr().size(); i++){
|
||||
|
||||
// MtbColr currentMtbColr = recoveredMtbColt.getItem().get(i);
|
||||
|
||||
// List<OrdineAccettazioneDTO.Riga> foundRows = Stream.of(groupedOrdini)
|
||||
// .filter(x -> x.getNumOrd() == currentMtbColr.getNumOrd() &&
|
||||
// x.getRigaOrd() == currentMtbColr.getRigaOrd()&&
|
||||
// x.getDataOrdD().equals(currentMtbColr.getDataOrdD()))
|
||||
// .toList();
|
||||
//
|
||||
// if(foundRows != null && foundRows.size() > 0){
|
||||
// OrdineAccettazioneDTO.Riga currentRow = foundRows.get(0);
|
||||
//
|
||||
// currentRow.setHidden(false);
|
||||
// currentRow.setQtaRiservate(currentRow.getQtaRiservate().subtract(currentMtbColr.getQtaCol()));
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
mtbColtSessionID = ColliDataRecover.startNewSession(recoveredMtbColt);
|
||||
setULToCurrentContext(recoveredMtbColt);
|
||||
refreshOrderBy(false);
|
||||
@ -384,6 +351,7 @@ public class VenditaOrdineInevasoViewModel implements IOnColloClosedCallback, IO
|
||||
|
||||
//Se è un'etichetta anonima
|
||||
if(UtilityBarcode.isEtichettaAnonima(data)){
|
||||
|
||||
//Se il collo non esiste allora lo creo associandolo a questa etichetta anonima
|
||||
//invece se esiste apro un collo nuovo e cerco gli articoli presenti nell'ul
|
||||
//dell'etichetta anonima
|
||||
@ -1157,9 +1125,16 @@ public class VenditaOrdineInevasoViewModel implements IOnColloClosedCallback, IO
|
||||
} else {
|
||||
dto.setQtaTot(tmpPickData.getQtaTot());
|
||||
dto.setMaxQta(tmpPickData.getQtaTot());
|
||||
|
||||
if(tmpPickData.getNumCnf() != null) {
|
||||
dto.setQtaCnf(tmpPickData.getQtaTot().divide(tmpPickData.getNumCnf()));
|
||||
} else {
|
||||
dto.setQtaCnf(tmpPickData.getQtaTot());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (tmpPickData.getQtaCnf() != null && useQtaDaEvadere) {
|
||||
dto.setQtaCnf(tmpPickData.getQtaCnf());
|
||||
}
|
||||
@ -1424,6 +1399,19 @@ public class VenditaOrdineInevasoViewModel implements IOnColloClosedCallback, IO
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public void manualSearch() {
|
||||
BarcodeManager.disable();
|
||||
DialogSimpleInputHelper.makeInputDialog(mActivity,"Inserisci il codice a barre", codice->{
|
||||
|
||||
this.onScanSuccessfull.run(new BarcodeScanDTO().setStringValue(codice).setType(BarcodeType.CODE128));
|
||||
|
||||
}, BarcodeManager::enable).show();
|
||||
}
|
||||
|
||||
|
||||
private void showBatchLotDisabledWarning(String batchLot, Runnable onAccepted, Runnable onRejected) {
|
||||
|
||||
DialogSimpleMessageHelper.makeWarningDialog(mActivity, new SpannableString(String.format(mActivity.getText(R.string.batch_lot_not_enabled).toString(), batchLot)), null, onAccepted, onRejected).show();
|
||||
|
||||
@ -40,6 +40,7 @@ import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||
import it.integry.integrywmsnative.databinding.FragmentMainVersamentoMerceBinding;
|
||||
import it.integry.integrywmsnative.gest.versamento_merce.core.VersamentoMerceHelper;
|
||||
import it.integry.integrywmsnative.view.dialogs.DialogAskLivelloPosizione;
|
||||
import it.integry.integrywmsnative.view.dialogs.DialogCommon;
|
||||
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageHelper;
|
||||
import it.integry.integrywmsnative.view.dialogs.choose_arts_from_lista_arts.DialogChooseArtsFromListaArts;
|
||||
import it.integry.integrywmsnative.view.dialogs.input_quantity.DialogInputQuantity;
|
||||
@ -125,7 +126,7 @@ public class VersamentoMerceViewModel {
|
||||
if(mtbColtList == null || mtbColtList.size() == 0){
|
||||
progressDialog.dismiss();
|
||||
BarcodeManager.enable();
|
||||
showNoULFound();
|
||||
DialogCommon.showNoULFound(mContext, null);
|
||||
} else if (mtbColtList.size() == 1) {
|
||||
ColliMagazzinoRESTConsumer.getByTestata(mtbColtList.get(0), true, false, mtbColt -> {
|
||||
|
||||
@ -162,7 +163,7 @@ public class VersamentoMerceViewModel {
|
||||
if(!UtilityString.isNullOrEmpty(ean128Model.Sscc)){
|
||||
this.executeEtichettaLU(ean128Model.Sscc, false, progressDialog);
|
||||
} else {
|
||||
showNoULFound();
|
||||
DialogCommon.showNoULFound(mContext, null);
|
||||
progressDialog.dismiss();
|
||||
BarcodeManager.enable();
|
||||
}
|
||||
@ -186,7 +187,7 @@ public class VersamentoMerceViewModel {
|
||||
ColliMagazzinoRESTConsumer.getBySSCC(sscc, true, false, mtbColt -> {
|
||||
|
||||
if(mtbColt == null && !isAnonima) {
|
||||
showNoULFound();
|
||||
DialogCommon.showNoULFound(mContext, null);
|
||||
BarcodeManager.enable();
|
||||
progressDialog.dismiss();
|
||||
} else if(mtbColt != null && (/*mtbColt.getGestioneEnum() == GestioneEnum.ACQUISTO ||*/ mtbColt.getGestioneEnum() == GestioneEnum.VENDITA)) {
|
||||
@ -236,7 +237,7 @@ public class VersamentoMerceViewModel {
|
||||
progressDialog.dismiss();
|
||||
BarcodeManager.enable();
|
||||
|
||||
showDataSavedDialog(mOnVersamentoCompleted);
|
||||
DialogCommon.showDataSaved(mContext, mOnVersamentoCompleted);
|
||||
}, ex -> {
|
||||
UtilityExceptions.defaultException(mContext, ex, progressDialog);
|
||||
BarcodeManager.enable();
|
||||
@ -382,13 +383,6 @@ public class VersamentoMerceViewModel {
|
||||
}
|
||||
|
||||
|
||||
private void showNoULFound() {
|
||||
DialogSimpleMessageHelper.makeWarningDialog(mContext,
|
||||
new SpannableString(mContext.getResources().getText(R.string.no_lu_found_message)),
|
||||
null, null).show();
|
||||
}
|
||||
|
||||
|
||||
private void showWrongGestioneUL() {
|
||||
DialogSimpleMessageHelper.makeWarningDialog(mContext,
|
||||
new SpannableString(Html.fromHtml(mContext.getResources().getText(R.string.gestione_V_not_accepted_message).toString())),
|
||||
@ -419,7 +413,7 @@ public class VersamentoMerceViewModel {
|
||||
|
||||
|
||||
ColliMagazzinoRESTConsumer.saveColli(mtbColts, value -> {
|
||||
showDataSavedDialog(() -> {
|
||||
DialogCommon.showDataSaved(mContext, () -> {
|
||||
mOnVersamentoCompleted.run();
|
||||
});
|
||||
}, ex -> {
|
||||
@ -428,17 +422,4 @@ public class VersamentoMerceViewModel {
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void showDataSavedDialog(Runnable onComplete) {
|
||||
|
||||
DialogSimpleMessageHelper.makeSuccessDialog(
|
||||
mContext,
|
||||
mContext.getResources().getString(R.string.completed),
|
||||
new SpannableString(mContext.getResources().getString(R.string.data_saved)),
|
||||
null, () -> {
|
||||
onComplete.run();
|
||||
//resetMtbColt();
|
||||
}).show();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -66,8 +66,6 @@ public class ArticoliInColloBottomSheetHelper extends BottomSheetBehavior.Bottom
|
||||
|
||||
|
||||
mBinding.articoliInColloDetailsPosizione.setText(mtbColt.getPosizione() != null ? mtbColt.getPosizione() : "N/A");
|
||||
// mBindings.articoliInColloDetailsPreparatoDa.setText(mtbColt.getPreparatoDa() != null ? mtbColt.getPreparatoDa() : "N/A");
|
||||
|
||||
}
|
||||
|
||||
public void updateRigheNumber(int newRigheNumber){
|
||||
|
||||
@ -0,0 +1,135 @@
|
||||
package it.integry.integrywmsnative.view.bottomsheet.view;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.BaseAdapter;
|
||||
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
import androidx.databinding.ObservableField;
|
||||
import androidx.databinding.ObservableList;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityNumber;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||
import it.integry.integrywmsnative.databinding.FragmentArticoliInColloBottomSheetMtbcolrItemBinding;
|
||||
|
||||
public class ArticoliInColloBottomSheetMtbColrAdapter extends BaseAdapter {
|
||||
|
||||
|
||||
private final WeakReferenceOnListChangedCallback onListChangedCallback;
|
||||
private Context mContext;
|
||||
private ObservableField<MtbColt> mtbColt;
|
||||
|
||||
|
||||
public ArticoliInColloBottomSheetMtbColrAdapter(Context context, ObservableField<MtbColt> mtbColt) {
|
||||
super();
|
||||
this.mContext = context;
|
||||
this.mtbColt = mtbColt;
|
||||
this.onListChangedCallback = new WeakReferenceOnListChangedCallback(this);
|
||||
|
||||
this.mtbColt.get().getMtbColr().addOnListChangedCallback(onListChangedCallback);
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getView(int position, View convertView, ViewGroup parent) {
|
||||
|
||||
LayoutInflater inflater = LayoutInflater.from(parent.getContext());
|
||||
|
||||
FragmentArticoliInColloBottomSheetMtbcolrItemBinding binding = DataBindingUtil.inflate(inflater, R.layout.fragment_articoli_in_collo_bottom_sheet__mtbcolr_item, parent, false);
|
||||
|
||||
final MtbColr mtbColr = mtbColt.get().getMtbColr().get(position);
|
||||
binding.setMtbColr(mtbColr);
|
||||
|
||||
//Setting qty with unt_mis
|
||||
if(mtbColr.getMtbAart() != null) {
|
||||
if (mtbColr.getMtbAart().isFlagQtaCnfFissa()) {
|
||||
binding.qtaTextview.setText(UtilityNumber.decimalToString(mtbColr.getQtaCol()) + (!UtilityString.isNullOrEmpty(mtbColr.getMtbAart().getUntMis()) ? "\n" + mtbColr.getMtbAart().getUntMis() : ""));
|
||||
} else {
|
||||
binding.qtaTextview.setText(UtilityNumber.decimalToString(mtbColr.getNumCnf()) + "\n" + mContext.getString(R.string.unt_mis_col));
|
||||
}
|
||||
} else {
|
||||
binding.qtaTextview.setText(UtilityNumber.decimalToString(mtbColr.getQtaCol()));
|
||||
}
|
||||
|
||||
|
||||
binding.executePendingBindings();
|
||||
|
||||
if(position % 2 == 1) binding.getRoot().setBackgroundColor(mContext.getResources().getColor(R.color.letturaFacilitataBG));
|
||||
|
||||
return binding.getRoot();
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getItemId(int position) {
|
||||
return position;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getItem(int position) {
|
||||
return position;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCount() {
|
||||
if(mtbColt.get() != null && mtbColt.get().getMtbColr() != null) {
|
||||
|
||||
return mtbColt.get().getMtbColr().size();
|
||||
} else return 0;
|
||||
}
|
||||
|
||||
|
||||
public class WeakReferenceOnListChangedCallback extends ObservableList.OnListChangedCallback {
|
||||
|
||||
private final WeakReference<BaseAdapter> adapterReference;
|
||||
|
||||
public WeakReferenceOnListChangedCallback(BaseAdapter baseAdapter) {
|
||||
this.adapterReference = new WeakReference<>(baseAdapter);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onChanged(ObservableList sender) {
|
||||
BaseAdapter adapter = adapterReference.get();
|
||||
if (adapter != null) {
|
||||
adapter.notifyDataSetChanged();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onItemRangeChanged(ObservableList sender, int positionStart, int itemCount) {
|
||||
BaseAdapter adapter = adapterReference.get();
|
||||
if (adapter != null) {
|
||||
adapter.notifyDataSetChanged();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onItemRangeInserted(ObservableList sender, int positionStart, int itemCount) {
|
||||
BaseAdapter adapter = adapterReference.get();
|
||||
if (adapter != null) {
|
||||
adapter.notifyDataSetChanged();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onItemRangeMoved(ObservableList sender, int fromPosition, int toPosition, int itemCount) {
|
||||
BaseAdapter adapter = adapterReference.get();
|
||||
if (adapter != null) {
|
||||
adapter.notifyDataSetChanged();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onItemRangeRemoved(ObservableList sender, int positionStart, int itemCount) {
|
||||
BaseAdapter adapter = adapterReference.get();
|
||||
if (adapter != null) {
|
||||
adapter.notifyDataSetChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -36,6 +36,7 @@ import it.integry.integrywmsnative.databinding.FragmentArticoliInColloBottomShee
|
||||
import it.integry.integrywmsnative.databinding.FragmentArticoliInColloBottomSheetMtbcolrItemBinding;
|
||||
import it.integry.integrywmsnative.view.bottomsheet.ArticoliInColloBottomSheetHelper;
|
||||
import it.integry.integrywmsnative.view.bottomsheet.interfaces.IOnColloClosedCallback;
|
||||
import it.integry.integrywmsnative.view.bottomsheet.view.ArticoliInColloBottomSheetMtbColrAdapter;
|
||||
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageHelper;
|
||||
import it.integry.integrywmsnative.view.dialogs.input_quantity.DialogInputQuantity;
|
||||
|
||||
@ -64,21 +65,13 @@ public class ArticoliInColloBottomSheetViewModel {
|
||||
|
||||
mBindings.setViewModel(this);
|
||||
|
||||
// ShapeAppearanceModel shapeAppearanceModel = new ShapeAppearanceModel();
|
||||
//
|
||||
// shapeAppearanceModel.setTopLeftCorner(CornerFamily.ROUNDED, 6);
|
||||
// shapeAppearanceModel.setTopRightCorner(CornerFamily.ROUNDED, 6);
|
||||
//
|
||||
// MaterialShapeDrawable materialShapeDrawable = new MaterialShapeDrawable(shapeAppearanceModel);
|
||||
// mBindings.getRoot().setBackground(materialShapeDrawable);
|
||||
|
||||
mtbColt.addOnPropertyChangedCallback(new Observable.OnPropertyChangedCallback() {
|
||||
@Override
|
||||
public void onPropertyChanged(Observable sender, int propertyId) {
|
||||
|
||||
if(mtbColt.get() != null) {
|
||||
|
||||
mBindings.linearListview.setAdapter(new ArticoliInColloBottomSheetMtbColrAdapter());
|
||||
mBindings.linearListview.setAdapter(new ArticoliInColloBottomSheetMtbColrAdapter(mContext, mtbColt));
|
||||
|
||||
mBindings.linearListview.setOnItemClickListener((parent, view, position, id) -> {
|
||||
mBottomSheetBehavior.setState(BottomSheetBehavior.STATE_EXPANDED);
|
||||
@ -192,6 +185,7 @@ public class ArticoliInColloBottomSheetViewModel {
|
||||
final Dialog progress = UtilityProgress.createDefaultProgressDialog(mContext);
|
||||
|
||||
itemToEdit.setQtaCol(quantityDTO.qtaTot.getBigDecimal());
|
||||
itemToEdit.setNumCnf(quantityDTO.numCnf.getBigDecimal());
|
||||
|
||||
ColliMagazzinoRESTConsumer.updateRiga(itemToEdit, () ->{
|
||||
mBottomSheetBehavior.setState(BottomSheetBehavior.STATE_COLLAPSED);
|
||||
@ -232,101 +226,6 @@ public class ArticoliInColloBottomSheetViewModel {
|
||||
}
|
||||
|
||||
|
||||
public class ArticoliInColloBottomSheetMtbColrAdapter extends BaseAdapter {
|
||||
|
||||
|
||||
private final WeakReferenceOnListChangedCallback onListChangedCallback;
|
||||
|
||||
public ArticoliInColloBottomSheetMtbColrAdapter() {
|
||||
super();
|
||||
this.onListChangedCallback = new WeakReferenceOnListChangedCallback(this);
|
||||
|
||||
mtbColt.get().getMtbColr().addOnListChangedCallback(onListChangedCallback);
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getView(int position, View convertView, ViewGroup parent) {
|
||||
|
||||
LayoutInflater inflater = LayoutInflater.from(parent.getContext());
|
||||
|
||||
FragmentArticoliInColloBottomSheetMtbcolrItemBinding binding = DataBindingUtil.inflate(inflater, R.layout.fragment_articoli_in_collo_bottom_sheet__mtbcolr_item, parent, false);
|
||||
|
||||
final MtbColr item = mtbColt.get().getMtbColr().get(position);
|
||||
binding.setMtbColr(item);
|
||||
binding.executePendingBindings();
|
||||
|
||||
if(position % 2 == 1) binding.getRoot().setBackgroundColor(mContext.getResources().getColor(R.color.letturaFacilitataBG));
|
||||
|
||||
return binding.getRoot();
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getItemId(int position) {
|
||||
return position;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getItem(int position) {
|
||||
return position;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCount() {
|
||||
if(mtbColt.get() != null && mtbColt.get().getMtbColr() != null) {
|
||||
|
||||
return mtbColt.get().getMtbColr().size();
|
||||
} else return 0;
|
||||
}
|
||||
|
||||
|
||||
public class WeakReferenceOnListChangedCallback extends ObservableList.OnListChangedCallback {
|
||||
|
||||
private final WeakReference<BaseAdapter> adapterReference;
|
||||
|
||||
public WeakReferenceOnListChangedCallback(BaseAdapter baseAdapter) {
|
||||
this.adapterReference = new WeakReference<>(baseAdapter);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onChanged(ObservableList sender) {
|
||||
BaseAdapter adapter = adapterReference.get();
|
||||
if (adapter != null) {
|
||||
adapter.notifyDataSetChanged();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onItemRangeChanged(ObservableList sender, int positionStart, int itemCount) {
|
||||
BaseAdapter adapter = adapterReference.get();
|
||||
if (adapter != null) {
|
||||
adapter.notifyDataSetChanged();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onItemRangeInserted(ObservableList sender, int positionStart, int itemCount) {
|
||||
BaseAdapter adapter = adapterReference.get();
|
||||
if (adapter != null) {
|
||||
adapter.notifyDataSetChanged();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onItemRangeMoved(ObservableList sender, int fromPosition, int toPosition, int itemCount) {
|
||||
BaseAdapter adapter = adapterReference.get();
|
||||
if (adapter != null) {
|
||||
adapter.notifyDataSetChanged();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onItemRangeRemoved(ObservableList sender, int positionStart, int itemCount) {
|
||||
BaseAdapter adapter = adapterReference.get();
|
||||
if (adapter != null) {
|
||||
adapter.notifyDataSetChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -18,4 +18,27 @@ public class DialogCommon {
|
||||
null, onPositiveClick).show();
|
||||
}
|
||||
|
||||
public static void showNoULFound(@NotNull Context context, @Nullable Runnable onPositiveClick) {
|
||||
DialogSimpleMessageHelper.makeWarningDialog(context,
|
||||
new SpannableString(context.getResources().getText(R.string.no_lu_found_message)),
|
||||
null, onPositiveClick).show();
|
||||
}
|
||||
|
||||
|
||||
public static void showNoOrderFound(@NotNull Context context, @Nullable Runnable onPositiveClick) {
|
||||
DialogSimpleMessageHelper.makeWarningDialog(context,
|
||||
new SpannableString(context.getResources().getText(R.string.no_orders_found_message)),
|
||||
null, onPositiveClick).show();
|
||||
}
|
||||
|
||||
|
||||
public static void showDataSaved(@NotNull Context context, @Nullable Runnable onPositiveClick) {
|
||||
|
||||
DialogSimpleMessageHelper.makeSuccessDialog(
|
||||
context,
|
||||
context.getResources().getString(R.string.completed),
|
||||
new SpannableString(context.getResources().getString(R.string.data_saved)),
|
||||
null, onPositiveClick).show();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -4,6 +4,7 @@ import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.os.Build;
|
||||
import android.text.SpannableString;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
@ -12,7 +13,10 @@ import androidx.databinding.DataBindingUtil;
|
||||
|
||||
import com.annimon.stream.Stream;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import it.integry.barcode_base_android_library.model.BarcodeScanDTO;
|
||||
import it.integry.integrywmsnative.BuildConfig;
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.barcode_reader.BarcodeCallbackDTO;
|
||||
import it.integry.integrywmsnative.core.barcode_reader.BarcodeManager;
|
||||
@ -29,6 +33,7 @@ import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityProgress;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||
import it.integry.integrywmsnative.databinding.DialogScanOrCreateLuBinding;
|
||||
import it.integry.integrywmsnative.view.dialogs.DialogCommon;
|
||||
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageHelper;
|
||||
|
||||
public class DialogScanOrCreateLU {
|
||||
@ -130,7 +135,7 @@ public class DialogScanOrCreateLU {
|
||||
} else {
|
||||
progressDialog.dismiss();
|
||||
BarcodeManager.enable();
|
||||
showNoULFound();
|
||||
DialogCommon.showNoULFound(mContext, null);
|
||||
}
|
||||
|
||||
};
|
||||
@ -146,7 +151,7 @@ public class DialogScanOrCreateLU {
|
||||
if(mtbColtList == null || mtbColtList.size() == 0){
|
||||
progressDialog.dismiss();
|
||||
BarcodeManager.enable();
|
||||
showNoULFound();
|
||||
DialogCommon.showNoULFound(mContext, null);
|
||||
} else if (mtbColtList.size() == 1) {
|
||||
ColliMagazzinoRESTConsumer.getByTestata(mtbColtList.get(0), mShouldCheckResiduo, false, mtbColt -> {
|
||||
sendMtbColt(mtbColt, progressDialog);
|
||||
@ -237,7 +242,7 @@ public class DialogScanOrCreateLU {
|
||||
} else {
|
||||
BarcodeManager.enable();
|
||||
progressDialog.dismiss();
|
||||
showNoULFound();
|
||||
DialogCommon.showNoULFound(mContext, null);
|
||||
}
|
||||
|
||||
}, ex -> {
|
||||
@ -249,7 +254,7 @@ public class DialogScanOrCreateLU {
|
||||
BarcodeManager.enable();
|
||||
progressDialog.dismiss();
|
||||
|
||||
showNoULFound();
|
||||
DialogCommon.showNoULFound(mContext, null);
|
||||
}
|
||||
|
||||
|
||||
@ -268,12 +273,6 @@ public class DialogScanOrCreateLU {
|
||||
null, null).show();
|
||||
}
|
||||
|
||||
private void showNoULFound() {
|
||||
DialogSimpleMessageHelper.makeWarningDialog(mContext,
|
||||
new SpannableString(mContext.getResources().getText(R.string.no_lu_found_message)),
|
||||
null, null).show();
|
||||
}
|
||||
|
||||
private void sendMtbColt(MtbColt mtbColtToSend, Dialog progressDialog) {
|
||||
currentMtbColt = mtbColtToSend;
|
||||
progressDialog.dismiss();
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
|
||||
<data>
|
||||
<import type="android.view.View" />
|
||||
<import type="it.integry.integrywmsnative.BuildConfig" />
|
||||
|
||||
<variable
|
||||
name="viewmodel"
|
||||
@ -39,7 +40,8 @@
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
app:layout_collapseMode="pin"
|
||||
android:layout_width="match_parent">
|
||||
android:layout_width="match_parent"
|
||||
style="@style/AppTheme.NewMaterial.Text">
|
||||
|
||||
|
||||
|
||||
@ -55,6 +57,18 @@
|
||||
android:tint="@color/colorPrimaryGray"/>
|
||||
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageButton
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="50dp"
|
||||
android:layout_gravity="end"
|
||||
android:background="@drawable/ripple_effect"
|
||||
android:adjustViewBounds="true"
|
||||
android:src="@drawable/ic_black_barcode"
|
||||
android:visibility="@{BuildConfig.DEBUG ? View.VISIBLE : View.GONE}"
|
||||
android:onClick="@{() -> viewmodel.manualSearch()}"
|
||||
android:tint="@color/colorPrimaryGray"/>
|
||||
|
||||
</androidx.appcompat.widget.Toolbar>
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
@ -48,7 +48,7 @@
|
||||
android:textStyle="bold"
|
||||
android:drawablePadding="12dp"
|
||||
android:textColor="@color/colorPrimary"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingTop="12dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingRight="16dp"
|
||||
@ -57,19 +57,6 @@
|
||||
android:textSize="16sp"
|
||||
style="@style/AppTheme.NewMaterial.Text"/>
|
||||
|
||||
<!--<Button-->
|
||||
<!--android:id="@+id/articoli_in_collo_close_collo"-->
|
||||
<!--android:layout_width="wrap_content"-->
|
||||
<!--android:layout_height="wrap_content"-->
|
||||
<!--android:text="@string/action_close_ul"-->
|
||||
<!--android:textSize="16sp"-->
|
||||
<!--android:layout_alignParentEnd="true"-->
|
||||
<!--android:theme="@style/white_button"-->
|
||||
<!--android:drawableEnd="@drawable/ic_close_red_24dp"-->
|
||||
<!--android:drawablePadding="8dp"-->
|
||||
<!--android:onClick="@{() -> viewModel.closeCurrentUL()}"-->
|
||||
<!--android:drawableTint="@color/red_600"-->
|
||||
<!--android:textColor="@color/red_600"/>-->
|
||||
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
@ -84,23 +71,6 @@
|
||||
android:onClick="@{() -> viewModel.closeCurrentUL()}"
|
||||
app:strokeColor="@color/red_600"/>
|
||||
|
||||
<!--<android.support.v7.widget.AppCompatButton-->
|
||||
<!--android:id="@+id/articoli_in_collo_close_collo"-->
|
||||
<!--android:layout_width="wrap_content"-->
|
||||
<!--android:layout_height="match_parent"-->
|
||||
<!--android:drawableEnd="@drawable/ic_close_red_24dp"-->
|
||||
<!--android:drawableTint="@color/red_600"-->
|
||||
<!--android:text="@string/action_close_ul"-->
|
||||
<!--android:textColor="@color/red_600"-->
|
||||
<!--android:paddingTop="8dp"-->
|
||||
<!--android:paddingBottom="8dp"-->
|
||||
<!--android:paddingLeft="16dp"-->
|
||||
<!--android:paddingRight="16dp"-->
|
||||
<!--android:elevation="0dp"-->
|
||||
<!--android:theme="@style/white_button"-->
|
||||
<!--android:layout_alignParentEnd="true"-->
|
||||
<!--android:textSize="16sp"-->
|
||||
<!--android:onClick="@{() -> viewModel.closeCurrentUL()}"/>-->
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
@ -314,6 +284,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/already_read_articles"
|
||||
style="@style/AppTheme.NewMaterial.Text"
|
||||
android:textAllCaps="true"
|
||||
android:textStyle="bold"/>
|
||||
|
||||
@ -356,6 +327,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:orientation="vertical"
|
||||
app:dividerThickness="0.5dp" />
|
||||
|
||||
@ -409,9 +381,11 @@
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:gravity="center"
|
||||
android:text="Cioccolato"
|
||||
android:textAppearance="@android:style/TextAppearance.Material.Title"
|
||||
app:layout_constraintTop_toTopOf="parent"/>
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
style="@style/AppTheme.NewMaterial.Text.ToolbarTitle.DarkActionBar"
|
||||
tools:text="Num UL"/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
@ -451,6 +425,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginBottom="8dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/bottom_sheet_actions_quantity"
|
||||
app:layout_constraintStart_toStartOf="parent">
|
||||
|
||||
@ -460,30 +435,31 @@
|
||||
android:layout_height="wrap_content"
|
||||
tools:text="Descrizione articolo"
|
||||
android:textColor="#444"
|
||||
android:textSize="18dp"
|
||||
android:maxLines="1"
|
||||
android:maxLines="2"
|
||||
android:ellipsize="end"
|
||||
android:paddingRight="8dp"
|
||||
android:textStyle="bold" />
|
||||
android:paddingStart="0dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:textStyle="bold"
|
||||
style="@style/AppTheme.NewMaterial.Text.Medium"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/bottom_sheet_actions_subtitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
tools:text="ABF52IL"
|
||||
android:textSize="14dp"
|
||||
android:textStyle="bold" />
|
||||
style="@style/AppTheme.NewMaterial.Text.Small" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/bottom_sheet_actions_quantity"
|
||||
android:layout_width="wrap_content"
|
||||
android:gravity="right"
|
||||
android:gravity="end"
|
||||
android:layout_height="wrap_content"
|
||||
android:textStyle="bold"
|
||||
android:textSize="15dp"
|
||||
tools:text="250 PZ"
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"/>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
@ -504,6 +480,7 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/guideline_action"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:gravity="center">
|
||||
@ -522,6 +499,7 @@
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
android:text="Modifica"/>
|
||||
|
||||
</LinearLayout>
|
||||
@ -530,6 +508,7 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@id/guideline_action"
|
||||
android:gravity="center">
|
||||
@ -548,6 +527,7 @@
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
android:text="Cancella"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@ -34,19 +34,19 @@
|
||||
android:textColor="@color/colorPrimary"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
tools:text="COD MART" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_toLeftOf="@id/posizione_collo"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:text="@{mtbColr.getDescrizione()}"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="16sp"
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
tools:text="Descrizione lunga articolo" />
|
||||
|
||||
|
||||
@ -56,6 +56,7 @@
|
||||
android:text="@{`Lotto: ` + mtbColr.getPartitaMag()}"
|
||||
android:textSize="14sp"
|
||||
android:visibility="@{UtilityString.isNullOrEmpty(mtbColr.getPartitaMag()) ? View.INVISIBLE : View.VISIBLE}"
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
tools:text="Lotto: ABCDE" />
|
||||
|
||||
</LinearLayout>
|
||||
@ -72,6 +73,7 @@
|
||||
app:layout_constraintBottom_toBottomOf="parent">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/qta_textview"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/badge1_round_corner"
|
||||
@ -80,10 +82,11 @@
|
||||
android:paddingTop="2dp"
|
||||
android:paddingRight="6dp"
|
||||
android:paddingBottom="2dp"
|
||||
android:text="@{UtilityNumber.decimalToString(mtbColr.getQtaCol()) + (mtbColr.mtbAart != null && !UtilityString.isNullOrEmpty(mtbColr.mtbAart.untMis) ? `\n` + mtbColr.mtbAart.untMis : ``)}"
|
||||
android:textSize="16sp"
|
||||
android:textColor="@android:color/white"
|
||||
android:textStyle="bold"
|
||||
android:textAllCaps="true"
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
tools:text="280.45\nCONF" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
@ -20,56 +20,6 @@
|
||||
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:background="@color/full_white">
|
||||
|
||||
<it.integry.integrywmsnative.ui.ElevatedToolbar
|
||||
android:id="@+id/elevated_toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?actionBarSize"
|
||||
android:gravity="center_horizontal"
|
||||
app:popupTheme="@style/AppTheme.PopupOverlay">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/toolbar_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
tools:text="Picking Libero"
|
||||
style="@style/TextAppearance.AppCompat.Widget.ActionBar.Title"
|
||||
android:layout_gravity="center" />
|
||||
|
||||
</androidx.appcompat.widget.Toolbar>
|
||||
|
||||
</it.integry.integrywmsnative.ui.ElevatedToolbar>
|
||||
|
||||
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:id="@+id/scroll_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="8dp"
|
||||
android:focusableInTouchMode="true"
|
||||
tools:context=".gest.contenuto_bancale.ContenutoBancaleActivity">
|
||||
|
||||
|
||||
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/picking_libero_main_list"
|
||||
@ -82,12 +32,6 @@
|
||||
|
||||
</androidx.recyclerview.widget.RecyclerView>
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
|
||||
@ -84,6 +84,7 @@
|
||||
app:layout_constraintBottom_toBottomOf="parent">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/qta_textview"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/badge1_round_corner"
|
||||
@ -92,10 +93,10 @@
|
||||
android:paddingTop="2dp"
|
||||
android:paddingRight="6dp"
|
||||
android:paddingBottom="2dp"
|
||||
android:text="@{UtilityNumber.decimalToString(mtbColr.getQtaCol()) + (mtbColr.mtbAart != null && !UtilityString.isNullOrEmpty(mtbColr.mtbAart.untMis) ? `\n` + mtbColr.mtbAart.untMis : ``)}"
|
||||
android:textSize="16sp"
|
||||
android:textColor="@android:color/white"
|
||||
android:textStyle="bold"
|
||||
android:textAllCaps="true"
|
||||
tools:text="280.45\nCONF"
|
||||
style="@style/AppTheme.NewMaterial.Text.Small" />
|
||||
|
||||
|
||||
@ -50,7 +50,7 @@
|
||||
android:id="@+id/vendita_ordine_inevaso_main_list_group_item_qta_evasa"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="4dp"
|
||||
android:layout_marginStart="4dp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/green_700"
|
||||
style="@style/AppTheme.NewMaterial.Text.Medium"
|
||||
@ -73,6 +73,17 @@
|
||||
style="@style/AppTheme.NewMaterial.Text.Medium"
|
||||
tools:text="QTA"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/vendita_ordine_inevaso_main_list_group_item_unt_mis"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@android:color/black"
|
||||
android:layout_marginStart="4dp"
|
||||
android:textAllCaps="true"
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
tools:text="cnf"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@ -85,9 +85,10 @@
|
||||
<item quantity="other">pezzi</item>
|
||||
</plurals>
|
||||
<plurals name="item_package">
|
||||
<item quantity="one">confezione</item>
|
||||
<item quantity="other">confezioni</item>
|
||||
<item quantity="one">collo</item>
|
||||
<item quantity="other">colli</item>
|
||||
</plurals>
|
||||
<string name="unt_mis_col">col</string>
|
||||
<string name="action_close_ul">Chiudi UL</string>
|
||||
<string name="already_read_articles">Articoli presenti</string>
|
||||
<string name="orders">Ordini</string>
|
||||
|
||||
@ -31,6 +31,7 @@
|
||||
<item quantity="one">package</item>
|
||||
<item quantity="other">packages</item>
|
||||
</plurals>
|
||||
<string name="unt_mis_col">pkg</string>
|
||||
<string name="app_name" translatable="false">Integry WMS</string>
|
||||
<string name="integry" translatable="false">Integry</string>
|
||||
<string name="navigation_drawer_open">Open navigation drawer</string>
|
||||
|
||||
@ -52,6 +52,12 @@
|
||||
<item name="android:textColor">@android:color/black</item>
|
||||
</style>
|
||||
|
||||
<style name="AppTheme.NewMaterial.Text.ToolbarTitle.DarkActionBar" parent="AppTheme.NewMaterial.Text">
|
||||
<item name="android:textSize">20sp</item>
|
||||
<!--<item name="android:textColor">#5F6368</item>-->
|
||||
<item name="android:textColor">@android:color/white</item>
|
||||
</style>
|
||||
|
||||
<style name="AppTheme.NewMaterial.Text.ListDivider" parent="AppTheme.NewMaterial.Text">
|
||||
<item name="android:textSize">16sp</item>
|
||||
<item name="android:textColor">#5F6368</item>
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
buildscript {
|
||||
ext{
|
||||
kotlin_version = '1.3.50'
|
||||
kotlin_version = '1.3.61'
|
||||
}
|
||||
|
||||
repositories {
|
||||
@ -16,7 +16,7 @@ buildscript {
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:3.5.1'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
classpath 'com.google.gms:google-services:4.3.2'
|
||||
classpath 'com.google.gms:google-services:4.3.3'
|
||||
classpath 'com.google.firebase:perf-plugin:1.3.1'
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package it.integry.wms.dynamic_customization.extensions;
|
||||
|
||||
import it.integry.integrywmsnative.core.class_router.configs.BaseMenuConfiguration;
|
||||
import it.integry.integrywmsnative.gest.picking_libero.PickingLiberoFragment;
|
||||
import it.integry.integrywmsnative.gest.pv_ordini_acquisto.PVOrdiniAcquistoGrigliaFragment;
|
||||
|
||||
public class MenuConfigurationSAPORIVERIPV extends BaseMenuConfiguration {
|
||||
@ -25,6 +26,18 @@ public class MenuConfigurationSAPORIVERIPV extends BaseMenuConfiguration {
|
||||
// .setTitleIcon(it.integry.integrywmsnative.R.drawable.ic_dashboard_trasmitted_orders_list)
|
||||
// .setDrawerIcon(it.integry.integrywmsnative.R.drawable.ic_dashboard_trasmitted_orders_list)
|
||||
// .setFragmentClass(PVOrdiniAcquistoTransmittedListFragment.newInstance()))
|
||||
)
|
||||
.addGroup(
|
||||
new MenuGroup()
|
||||
.setGroupText(it.integry.integrywmsnative.R.string.checkout)
|
||||
.setGroupId(it.integry.integrywmsnative.R.id.nav_group_spedizione)
|
||||
|
||||
.addItem(new MenuItem()
|
||||
.setID(it.integry.integrywmsnative.R.id.nav_free_picking)
|
||||
.setTitleText(it.integry.integrywmsnative.R.string.free_picking)
|
||||
.setTitleIcon(it.integry.integrywmsnative.R.drawable.ic_dashboard_picking_libero)
|
||||
.setDrawerIcon(it.integry.integrywmsnative.R.drawable.ic_black_barcode_scanner)
|
||||
.setFragmentClass(PickingLiberoFragment.newInstance()))
|
||||
);
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user