Implementata gestione dei colli
This commit is contained in:
parent
0e519c1123
commit
0d96274786
@ -11,6 +11,8 @@ import androidx.recyclerview.widget.RecyclerView;
|
||||
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.ListaPickingLiberoListModelBinding;
|
||||
|
||||
public class PickingLiberoListAdapter extends RecyclerView.Adapter<PickingLiberoListAdapter.ViewHolder>{
|
||||
@ -20,8 +22,8 @@ public class PickingLiberoListAdapter extends RecyclerView.Adapter<PickingLibero
|
||||
|
||||
private IRecyclerItemClicked<MtbColr> mOnItemClickListener;
|
||||
|
||||
public static class ViewHolder extends RecyclerView.ViewHolder {
|
||||
protected ListaPickingLiberoListModelBinding mViewDataBinding;
|
||||
public class ViewHolder extends RecyclerView.ViewHolder {
|
||||
private ListaPickingLiberoListModelBinding mViewDataBinding;
|
||||
|
||||
|
||||
public ViewHolder(ListaPickingLiberoListModelBinding v) {
|
||||
@ -30,6 +32,18 @@ public class PickingLiberoListAdapter extends RecyclerView.Adapter<PickingLibero
|
||||
}
|
||||
|
||||
public void bind(MtbColr mtbColr) {
|
||||
|
||||
//Setting qty with unt_mis
|
||||
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.setMtbColr(mtbColr);
|
||||
mViewDataBinding.executePendingBindings();
|
||||
}
|
||||
|
||||
@ -121,8 +121,6 @@ public class RettificaGiacenzeViewModel implements IRecyclerItemClicked<MtbColr>
|
||||
mBinding.rettificaGiacenzeMainList.setAdapter(null);
|
||||
|
||||
((IPoppableActivity) mContext).pop();
|
||||
|
||||
//if(openNew) openLU();
|
||||
}
|
||||
|
||||
|
||||
@ -419,6 +417,7 @@ public class RettificaGiacenzeViewModel implements IRecyclerItemClicked<MtbColr>
|
||||
.setPartitaMag(quantityDTO.batchLot.get())
|
||||
.setDataScadPartita(quantityDTO.expireDate)
|
||||
.setQtaCol(quantityDTO.qtaTot.getBigDecimal())
|
||||
.setNumCnf(quantityDTO.numCnf.getBigDecimal())
|
||||
.setDescrizione(mtbAart.getDescrizioneEstesa())
|
||||
.setCausale(MtbColr.Causale.RETTIFICA)
|
||||
.setUtente(SettingsManager.i().user.fullname);
|
||||
|
||||
@ -15,6 +15,8 @@ import java.util.List;
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.model.CheckableMtbColr;
|
||||
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.DialogChooseArtsFromListaArtsItemModelBinding;
|
||||
|
||||
public class DialogChooseArtsFromListaArtsAdapter extends RecyclerView.Adapter<DialogChooseArtsFromListaArtsAdapter.ViewHolder> {
|
||||
@ -58,8 +60,8 @@ public class DialogChooseArtsFromListaArtsAdapter extends RecyclerView.Adapter<D
|
||||
}
|
||||
|
||||
|
||||
public static class ViewHolder extends RecyclerView.ViewHolder {
|
||||
protected DialogChooseArtsFromListaArtsItemModelBinding mViewDataBinding;
|
||||
public class ViewHolder extends RecyclerView.ViewHolder {
|
||||
private DialogChooseArtsFromListaArtsItemModelBinding mViewDataBinding;
|
||||
|
||||
|
||||
public ViewHolder(DialogChooseArtsFromListaArtsItemModelBinding v) {
|
||||
@ -69,6 +71,19 @@ public class DialogChooseArtsFromListaArtsAdapter extends RecyclerView.Adapter<D
|
||||
|
||||
public void bind(CheckableMtbColr checkableMtbColr) {
|
||||
mViewDataBinding.setCheckableMtbColr(checkableMtbColr);
|
||||
|
||||
MtbColr mtbColr = checkableMtbColr.getItem().getMtbColr();
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
@ -67,43 +67,8 @@
|
||||
tools:text="Descrizione lunga articolo" />
|
||||
|
||||
|
||||
<!--<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{`Lotto: ` + dtoModel.partitaMag}"
|
||||
android:textSize="14sp"
|
||||
android:visibility="@{UtilityString.isNullOrEmpty(dtoModel.partitaMag) ? View.INVISIBLE : View.VISIBLE}"
|
||||
tools:text="Lotto: ABCDE" />-->
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<!--<RelativeLayout
|
||||
android:id="@+id/qta_box"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingEnd="12dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent">
|
||||
|
||||
<android.support.v7.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/badge1_round_corner"
|
||||
android:gravity="center"
|
||||
android:paddingLeft="6dp"
|
||||
android:paddingTop="2dp"
|
||||
android:paddingRight="6dp"
|
||||
android:paddingBottom="2dp"
|
||||
android:text="@{UtilityNumber.decimalToString(mtbColr.getQtaCol()) + `\n` + mtbColr.getUntMis()}"
|
||||
android:textSize="16sp"
|
||||
android:textColor="@android:color/white"
|
||||
android:textStyle="bold"
|
||||
tools:text="280.45\nCONF" />
|
||||
|
||||
</RelativeLayout>-->
|
||||
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
@ -47,6 +47,12 @@
|
||||
android:layout_toStartOf="@id/qta_box">
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
@ -57,6 +63,24 @@
|
||||
tools:text="COD MART" />
|
||||
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{UtilityNumber.decimalToString(checkableMtbColr.item.mtbColr.qtaCol) + checkableMtbColr.item.mtbColr.mtbAart.untMis}"
|
||||
android:visibility="@{checkableMtbColr.item.mtbColr.mtbAart != null && !checkableMtbColr.item.mtbColr.mtbAart.isFlagQtaCnfFissa() ? View.VISIBLE : View.GONE}"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
android:paddingStart="6dp"
|
||||
android:paddingEnd="6dp"
|
||||
android:background="@drawable/badge2_round_corner"
|
||||
android:textColor="@android:color/white"
|
||||
android:layout_alignParentEnd="true"
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
tools:text="PESO KG" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
@ -93,6 +117,7 @@
|
||||
android:layout_centerVertical="true">
|
||||
|
||||
<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"
|
||||
@ -101,10 +126,10 @@
|
||||
android:paddingTop="2dp"
|
||||
android:paddingRight="6dp"
|
||||
android:paddingBottom="2dp"
|
||||
android:text="@{UtilityNumber.decimalToString(checkableMtbColr.item.mtbColr.getQtaCol()) + (checkableMtbColr.item.mtbColr.mtbAart != null && !UtilityString.isNullOrEmpty(checkableMtbColr.item.mtbColr.mtbAart.untMis) ? `\n` + checkableMtbColr.item.mtbColr.mtbAart.untMis : ``)}"
|
||||
android:textSize="16sp"
|
||||
android:textColor="@android:color/white"
|
||||
android:textStyle="bold"
|
||||
android:textAllCaps="true"
|
||||
tools:text="280.45\nCONF" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
app:cardCornerRadius="12dp"
|
||||
app:cardElevation="0dp">
|
||||
|
||||
<RelativeLayout
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
@ -50,9 +50,7 @@
|
||||
android:paddingTop="24dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_above="@id/buttons">
|
||||
android:paddingEnd="8dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title_text"
|
||||
@ -121,7 +119,6 @@
|
||||
android:id="@+id/buttons"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
@ -165,7 +162,7 @@
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
@ -68,6 +68,8 @@
|
||||
android:text="@{mtbColr.getDescrizione()}"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="16sp"
|
||||
android:paddingStart="0dp"
|
||||
android:paddingEnd="8dp"
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
tools:text="Descrizione lunga articolo" />
|
||||
|
||||
|
||||
@ -23,9 +23,13 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/qta_box"
|
||||
app:layout_constraintStart_toStartOf="parent">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
@ -34,19 +38,37 @@
|
||||
android:textColor="@color/colorPrimary"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
tools:text="COD MART" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{UtilityNumber.decimalToString(mtbColr.qtaCol) + mtbColr.mtbAart.untMis}"
|
||||
android:visibility="@{mtbColr.mtbAart != null && !mtbColr.mtbAart.isFlagQtaCnfFissa() ? View.VISIBLE : View.GONE}"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:paddingStart="6dp"
|
||||
android:paddingEnd="6dp"
|
||||
android:background="@drawable/badge2_round_corner"
|
||||
android:textColor="@android:color/white"
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
tools:text="PESO KG" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_toLeftOf="@id/posizione_collo"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_toStartOf="@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 +78,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 +95,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 +104,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>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user