Aggiunto controllo su cod_mar tin vendita.
Bugfix su DialogChooseArtsFromList.
This commit is contained in:
parent
96d34afed6
commit
3c87d166a2
@ -12,7 +12,8 @@ public class ClassRouter {
|
||||
|
||||
public enum PATH {
|
||||
FILTRO_ORDINI_VENDITA,
|
||||
ORDINI_VENDITA
|
||||
ORDINI_VENDITA,
|
||||
CUSTOM_CONFIGURATION
|
||||
}
|
||||
|
||||
private static Context context;
|
||||
|
||||
@ -0,0 +1,7 @@
|
||||
package it.integry.integrywmsnative.core.class_router.interfaces;
|
||||
|
||||
public interface ICustomConfiguration {
|
||||
|
||||
boolean shoudShowCodFornInVendita();
|
||||
|
||||
}
|
||||
@ -320,43 +320,47 @@ public class PickingLiberoViewModel implements IRecyclerItemClicked<MtbColr> {
|
||||
|
||||
List<MtbColr> destNewMtbColr = new ArrayList<>();
|
||||
|
||||
askQuantities(pickedAarts.iterator(), destNewMtbColr, () -> {
|
||||
if(pickedAarts.size() > 0) {
|
||||
askQuantities(pickedAarts.iterator(), destNewMtbColr, () -> {
|
||||
|
||||
if(destNewMtbColr != null && destNewMtbColr.size() > 0){
|
||||
MtbColt clonedTestata = (MtbColt) destMtbColt.clone();
|
||||
ObservableArrayList<MtbColr> mtbColrObservableField = new ObservableArrayList<>();
|
||||
if (destNewMtbColr != null && destNewMtbColr.size() > 0) {
|
||||
MtbColt clonedTestata = (MtbColt) destMtbColt.clone();
|
||||
ObservableArrayList<MtbColr> mtbColrObservableField = new ObservableArrayList<>();
|
||||
|
||||
for(int i = 0; i < destNewMtbColr.size(); i++) {
|
||||
MtbColr cloneMtbColr = (MtbColr) destNewMtbColr.get(i).clone();
|
||||
for (int i = 0; i < destNewMtbColr.size(); i++) {
|
||||
MtbColr cloneMtbColr = (MtbColr) destNewMtbColr.get(i).clone();
|
||||
|
||||
cloneMtbColr
|
||||
.setGestioneRif(cloneMtbColr.getGestione())
|
||||
.setGestione(null);
|
||||
cloneMtbColr
|
||||
.setGestioneRif(cloneMtbColr.getGestione())
|
||||
.setGestione(null);
|
||||
|
||||
cloneMtbColr
|
||||
.setSerColloRif(cloneMtbColr.getSerCollo())
|
||||
.setSerCollo(null);
|
||||
cloneMtbColr
|
||||
.setSerColloRif(cloneMtbColr.getSerCollo())
|
||||
.setSerCollo(null);
|
||||
|
||||
cloneMtbColr
|
||||
.setNumColloRif(cloneMtbColr.getNumCollo())
|
||||
.setNumCollo(null);
|
||||
cloneMtbColr
|
||||
.setNumColloRif(cloneMtbColr.getNumCollo())
|
||||
.setNumCollo(null);
|
||||
|
||||
cloneMtbColr
|
||||
.setDataColloRif(cloneMtbColr.getDataColloS())
|
||||
.setDataCollo(null);
|
||||
cloneMtbColr
|
||||
.setDataColloRif(cloneMtbColr.getDataColloS())
|
||||
.setDataCollo(null);
|
||||
|
||||
mtbColrObservableField.add(cloneMtbColr);
|
||||
mtbColrObservableField.add(cloneMtbColr);
|
||||
}
|
||||
|
||||
clonedTestata.setMtbColr(mtbColrObservableField);
|
||||
|
||||
saveLU(clonedTestata);
|
||||
}
|
||||
|
||||
clonedTestata.setMtbColr(mtbColrObservableField);
|
||||
|
||||
saveLU(clonedTestata);
|
||||
}
|
||||
|
||||
}, () -> {
|
||||
progressDialog.dismiss();
|
||||
}, () -> {
|
||||
progressDialog.dismiss();
|
||||
BarcodeManager.enable();
|
||||
});
|
||||
} else {
|
||||
BarcodeManager.enable();
|
||||
});
|
||||
}
|
||||
|
||||
}, () -> {
|
||||
progressDialog.dismiss();
|
||||
|
||||
@ -11,6 +11,8 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.class_router.ClassRouter;
|
||||
import it.integry.integrywmsnative.core.class_router.interfaces.ICustomConfiguration;
|
||||
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||
import it.integry.integrywmsnative.gest.vendita.dto.PickingObjectDTO;
|
||||
@ -80,6 +82,8 @@ public class VenditaOrdineInevasoHelper {
|
||||
|
||||
public List<VenditaOrdineInevasoListViewModel> getListViewModelPerPosizione(List<List<PickingObjectDTO>> groupedRighe, List<MtbColr> mtbColrs) {
|
||||
|
||||
ICustomConfiguration customConfiguration = ClassRouter.getIstance(ClassRouter.PATH.CUSTOM_CONFIGURATION);
|
||||
|
||||
List<VenditaOrdineInevasoListViewModel> listModel = new ArrayList<>();
|
||||
|
||||
for(int i = 0; i < groupedRighe.size(); i++) {
|
||||
@ -98,8 +102,12 @@ public class VenditaOrdineInevasoHelper {
|
||||
|
||||
String badge1 = "";
|
||||
|
||||
badge1 += !UtilityString.isNullOrEmpty(currentItem.getCodAlis()) ? (currentItem.getCodAlis() + " - ") : "";
|
||||
badge1 += (!UtilityString.isNullOrEmpty(currentItem.getCodArtFor()) ? currentItem.getCodArtFor() : currentItem.getCodMart());
|
||||
if(customConfiguration.shoudShowCodFornInVendita()) {
|
||||
badge1 += !UtilityString.isNullOrEmpty(currentItem.getCodAlis()) ? (currentItem.getCodAlis() + " - ") : "";
|
||||
badge1 += (!UtilityString.isNullOrEmpty(currentItem.getCodArtFor()) ? currentItem.getCodArtFor() : currentItem.getCodMart());
|
||||
} else {
|
||||
badge1 += currentItem.getCodMart();
|
||||
}
|
||||
|
||||
rowModel.setBadge1(badge1);
|
||||
|
||||
|
||||
@ -9,6 +9,7 @@ import androidx.appcompat.app.AlertDialog;
|
||||
import androidx.recyclerview.widget.DividerItemDecoration;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
|
||||
import android.content.DialogInterface;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.view.LayoutInflater;
|
||||
@ -55,23 +56,23 @@ public class DialogChooseArtsFromListaArts {
|
||||
|
||||
binding.emptyView.setVisibility(listaMtbColr != null && listaMtbColr.size() > 0 ? View.GONE : View.VISIBLE);
|
||||
|
||||
|
||||
mDialog = new Dialog(context);
|
||||
mDialog.setContentView(binding.getRoot());
|
||||
mDialog.setCanceledOnTouchOutside(false);
|
||||
mDialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
|
||||
|
||||
|
||||
binding.positiveButton.setOnClickListener(v -> {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(context);
|
||||
builder.setPositiveButton(context.getResources().getText(R.string.confirm), (dialog, which) -> {
|
||||
mDialog.dismiss();
|
||||
onPositiveClick();
|
||||
});
|
||||
|
||||
binding.negativeButton.setOnClickListener(v -> {
|
||||
builder.setNegativeButton(context.getResources().getText(R.string.abort), (dialog, which) -> {
|
||||
mDialog.dismiss();
|
||||
onNegativeClick();
|
||||
});
|
||||
|
||||
builder.setView(binding.getRoot());
|
||||
|
||||
mDialog = builder.create();
|
||||
mDialog.setCanceledOnTouchOutside(false);
|
||||
mDialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
|
||||
|
||||
|
||||
initRecyclerView(binding, listaMtbColr);
|
||||
}
|
||||
|
||||
|
||||
@ -9,7 +9,6 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
app:cardCornerRadius="12dp"
|
||||
app:cardElevation="0dp">
|
||||
|
||||
<LinearLayout
|
||||
@ -37,9 +36,12 @@
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:padding="24dp">
|
||||
android:paddingTop="24dp"
|
||||
android:paddingBottom="24dp"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingEnd="8dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title_text"
|
||||
@ -50,6 +52,7 @@
|
||||
android:gravity="center_horizontal"/>
|
||||
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
@ -83,48 +86,49 @@
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp">
|
||||
<!--<androidx.constraintlayout.widget.ConstraintLayout-->
|
||||
<!--android:id="@+id/buttons"-->
|
||||
<!--android:layout_width="match_parent"-->
|
||||
<!--android:layout_height="wrap_content"-->
|
||||
<!--android:layout_marginTop="8dp">-->
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/center_guideline"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.5"/>
|
||||
<!--<androidx.constraintlayout.widget.Guideline-->
|
||||
<!--android:id="@+id/center_guideline"-->
|
||||
<!--android:layout_width="wrap_content"-->
|
||||
<!--android:layout_height="wrap_content"-->
|
||||
<!--android:orientation="vertical"-->
|
||||
<!--app:layout_constraintGuide_percent="0.5"/>-->
|
||||
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/negative_button"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/Button.PrimaryOutline"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
app:layout_constrainedHeight="true"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/center_guideline"
|
||||
android:text="@string/abort"/>
|
||||
<!--<com.google.android.material.button.MaterialButton-->
|
||||
<!--android:id="@+id/negative_button"-->
|
||||
<!--android:layout_width="0dp"-->
|
||||
<!--android:layout_height="wrap_content"-->
|
||||
<!--style="@style/Button.PrimaryOutline"-->
|
||||
<!--android:layout_marginLeft="8dp"-->
|
||||
<!--android:layout_marginRight="8dp"-->
|
||||
<!--app:layout_constrainedHeight="true"-->
|
||||
<!--app:layout_constraintTop_toTopOf="parent"-->
|
||||
<!--app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!--app:layout_constraintEnd_toStartOf="@id/center_guideline"-->
|
||||
<!--android:text="@string/abort"/>-->
|
||||
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/positive_button"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/Button.PrimaryFull"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
app:layout_constrainedHeight="true"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@id/center_guideline"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:text="@string/confirm"/>
|
||||
<!--<com.google.android.material.button.MaterialButton-->
|
||||
<!--android:id="@+id/positive_button"-->
|
||||
<!--android:layout_width="0dp"-->
|
||||
<!--android:layout_height="wrap_content"-->
|
||||
<!--style="@style/Button.PrimaryFull"-->
|
||||
<!--android:layout_marginLeft="8dp"-->
|
||||
<!--android:layout_marginRight="8dp"-->
|
||||
<!--app:layout_constrainedHeight="true"-->
|
||||
<!--app:layout_constraintTop_toTopOf="parent"-->
|
||||
<!--app:layout_constraintStart_toStartOf="@id/center_guideline"-->
|
||||
<!--app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!--android:text="@string/confirm"/>-->
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
<!--</androidx.constraintlayout.widget.ConstraintLayout>-->
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
@ -5,6 +5,7 @@ import android.util.Log;
|
||||
|
||||
import it.integry.integrywmsnative.core.class_router.ClassRouter;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
||||
import it.integry.wms.dynamic_customization.extensions.CustomConfiguration;
|
||||
import it.integry.wms.dynamic_customization.extensions.FiltroOrdiniVendita;
|
||||
import it.integry.wms.dynamic_customization.extensions.OrdiniVendita;
|
||||
|
||||
@ -16,6 +17,7 @@ public class DynamicContext {
|
||||
try {
|
||||
ClassRouter.registerPath(ClassRouter.PATH.FILTRO_ORDINI_VENDITA, FiltroOrdiniVendita.class);
|
||||
ClassRouter.registerPath(ClassRouter.PATH.ORDINI_VENDITA, OrdiniVendita.class);
|
||||
ClassRouter.registerPath(ClassRouter.PATH.CUSTOM_CONFIGURATION, CustomConfiguration.class);
|
||||
} catch (Exception ex) {
|
||||
UtilityExceptions.defaultException(context, ex);
|
||||
}
|
||||
|
||||
@ -0,0 +1,11 @@
|
||||
package it.integry.wms.dynamic_customization.extensions;
|
||||
|
||||
import it.integry.integrywmsnative.core.class_router.interfaces.ICustomConfiguration;
|
||||
|
||||
public class CustomConfiguration implements ICustomConfiguration {
|
||||
|
||||
@Override
|
||||
public boolean shoudShowCodFornInVendita() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -5,6 +5,7 @@ import android.util.Log;
|
||||
|
||||
import it.integry.integrywmsnative.core.class_router.ClassRouter;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
||||
import it.integry.wms.dynamic_customization.extensions.CustomConfiguration;
|
||||
import it.integry.wms.dynamic_customization.extensions.FiltroOrdiniVendita;
|
||||
import it.integry.wms.dynamic_customization.extensions.OrdiniVendita;
|
||||
|
||||
@ -16,6 +17,7 @@ public class DynamicContext {
|
||||
try {
|
||||
ClassRouter.registerPath(ClassRouter.PATH.FILTRO_ORDINI_VENDITA, FiltroOrdiniVendita.class);
|
||||
ClassRouter.registerPath(ClassRouter.PATH.ORDINI_VENDITA, OrdiniVendita.class);
|
||||
ClassRouter.registerPath(ClassRouter.PATH.CUSTOM_CONFIGURATION, CustomConfiguration.class);
|
||||
} catch (Exception ex) {
|
||||
UtilityExceptions.defaultException(context, ex);
|
||||
}
|
||||
|
||||
@ -0,0 +1,10 @@
|
||||
package it.integry.wms.dynamic_customization.extensions;
|
||||
|
||||
import it.integry.integrywmsnative.core.class_router.interfaces.ICustomConfiguration;
|
||||
|
||||
public class CustomConfiguration implements ICustomConfiguration {
|
||||
@Override
|
||||
public boolean shoudShowCodFornInVendita() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user