Merge branch 'develop' into feature/Refactoring_Spedizione
This commit is contained in:
commit
9d5e3d7d94
@ -7,8 +7,8 @@ apply plugin: 'com.google.gms.google-services'
|
|||||||
|
|
||||||
android {
|
android {
|
||||||
|
|
||||||
def appVersionCode = 134
|
def appVersionCode = 135
|
||||||
def appVersionName = '1.12.5'
|
def appVersionName = '1.12.6'
|
||||||
|
|
||||||
signingConfigs {
|
signingConfigs {
|
||||||
release {
|
release {
|
||||||
|
|||||||
@ -4,14 +4,18 @@ import android.app.Activity;
|
|||||||
import android.app.Dialog;
|
import android.app.Dialog;
|
||||||
import android.app.ProgressDialog;
|
import android.app.ProgressDialog;
|
||||||
import android.content.res.Resources;
|
import android.content.res.Resources;
|
||||||
|
|
||||||
import androidx.databinding.ObservableArrayList;
|
import androidx.databinding.ObservableArrayList;
|
||||||
import androidx.databinding.ObservableField;
|
import androidx.databinding.ObservableField;
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
import com.google.android.material.bottomsheet.BottomSheetBehavior;
|
import com.google.android.material.bottomsheet.BottomSheetBehavior;
|
||||||
import com.google.android.material.textfield.TextInputLayout;
|
import com.google.android.material.textfield.TextInputLayout;
|
||||||
|
|
||||||
import androidx.core.content.ContextCompat;
|
import androidx.core.content.ContextCompat;
|
||||||
import androidx.recyclerview.widget.DividerItemDecoration;
|
import androidx.recyclerview.widget.DividerItemDecoration;
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
|
|
||||||
import android.text.SpannableString;
|
import android.text.SpannableString;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.inputmethod.EditorInfo;
|
import android.view.inputmethod.EditorInfo;
|
||||||
@ -83,7 +87,6 @@ public class RettificaGiacenzeViewModel implements IRecyclerItemClicked<MtbColr>
|
|||||||
public BindableBoolean isMtbColtLoaded = new BindableBoolean();
|
public BindableBoolean isMtbColtLoaded = new BindableBoolean();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public void init(Activity context, FragmentMainRettificaGiacenzeBinding binding, RettificaGiacenzeHelper helper) {
|
public void init(Activity context, FragmentMainRettificaGiacenzeBinding binding, RettificaGiacenzeHelper helper) {
|
||||||
mContext = context;
|
mContext = context;
|
||||||
mBinding = binding;
|
mBinding = binding;
|
||||||
@ -96,12 +99,13 @@ public class RettificaGiacenzeViewModel implements IRecyclerItemClicked<MtbColr>
|
|||||||
isFabVisible.set(mtbColt != null);
|
isFabVisible.set(mtbColt != null);
|
||||||
isMtbColtLoaded.set(mtbColt != null);
|
isMtbColtLoaded.set(mtbColt != null);
|
||||||
|
|
||||||
if(this.mtbColt.get().getMtbColr() == null) this.mtbColt.get().setMtbColr(new ObservableArrayList<>());
|
if (this.mtbColt.get().getMtbColr() == null)
|
||||||
|
this.mtbColt.get().setMtbColr(new ObservableArrayList<>());
|
||||||
else {
|
else {
|
||||||
ObservableArrayList<MtbColr> mtbColrList = this.mtbColt.get().getMtbColr();
|
ObservableArrayList<MtbColr> mtbColrList = this.mtbColt.get().getMtbColr();
|
||||||
|
|
||||||
for(int i = 0; i < mtbColrList.size(); i++) {
|
for (int i = 0; i < mtbColrList.size(); i++) {
|
||||||
if(mtbColrList.get(i).getQtaCol() == null || mtbColrList.get(i).getQtaCol().floatValue() < 0){
|
if (mtbColrList.get(i).getQtaCol() == null || mtbColrList.get(i).getQtaCol().floatValue() < 0) {
|
||||||
mtbColrList.remove(i);
|
mtbColrList.remove(i);
|
||||||
i--;
|
i--;
|
||||||
}
|
}
|
||||||
@ -165,9 +169,9 @@ public class RettificaGiacenzeViewModel implements IRecyclerItemClicked<MtbColr>
|
|||||||
|
|
||||||
Dialog progressDialog = UtilityProgress.createDefaultProgressDialog(mContext);
|
Dialog progressDialog = UtilityProgress.createDefaultProgressDialog(mContext);
|
||||||
|
|
||||||
if(data.getType() == BarcodeType.EAN8 || data.getType() == BarcodeType.EAN13 || data.getType() == BarcodeType.UPCA){
|
if (data.getType() == BarcodeType.EAN8 || data.getType() == BarcodeType.EAN13 || data.getType() == BarcodeType.UPCA) {
|
||||||
searchArtInt(data.getStringValue(), progressDialog);
|
searchArtInt(data.getStringValue(), progressDialog);
|
||||||
} else if(UtilityBarcode.isEtichetta128(data)) {
|
} else if (UtilityBarcode.isEtichetta128(data)) {
|
||||||
this.executeEtichettaEan128(data, progressDialog);
|
this.executeEtichettaEan128(data, progressDialog);
|
||||||
} else {
|
} else {
|
||||||
BarcodeManager.enable();
|
BarcodeManager.enable();
|
||||||
@ -182,11 +186,12 @@ public class RettificaGiacenzeViewModel implements IRecyclerItemClicked<MtbColr>
|
|||||||
|
|
||||||
String barcodeProd = null;
|
String barcodeProd = null;
|
||||||
|
|
||||||
if(!UtilityString.isNullOrEmpty(ean128Model.Sscc)) barcodeProd = ean128Model.Sscc;
|
if (!UtilityString.isNullOrEmpty(ean128Model.Sscc)) barcodeProd = ean128Model.Sscc;
|
||||||
if(!UtilityString.isNullOrEmpty(ean128Model.Gtin)) barcodeProd = ean128Model.Gtin;
|
if (!UtilityString.isNullOrEmpty(ean128Model.Gtin)) barcodeProd = ean128Model.Gtin;
|
||||||
if(!UtilityString.isNullOrEmpty(ean128Model.Content)) barcodeProd = ean128Model.Content;
|
if (!UtilityString.isNullOrEmpty(ean128Model.Content))
|
||||||
|
barcodeProd = ean128Model.Content;
|
||||||
|
|
||||||
if(!UtilityString.isNullOrEmpty(barcodeProd)) {
|
if (!UtilityString.isNullOrEmpty(barcodeProd)) {
|
||||||
if (barcodeProd.startsWith("0") || barcodeProd.startsWith("9")) {
|
if (barcodeProd.startsWith("0") || barcodeProd.startsWith("9")) {
|
||||||
barcodeProd = barcodeProd.substring(1, barcodeProd.length());
|
barcodeProd = barcodeProd.substring(1, barcodeProd.length());
|
||||||
}
|
}
|
||||||
@ -196,7 +201,7 @@ public class RettificaGiacenzeViewModel implements IRecyclerItemClicked<MtbColr>
|
|||||||
progressDialog.dismiss();
|
progressDialog.dismiss();
|
||||||
BarcodeManager.enable();
|
BarcodeManager.enable();
|
||||||
}
|
}
|
||||||
}, ex-> {
|
}, ex -> {
|
||||||
UtilityExceptions.defaultException(mContext, ex, progressDialog);
|
UtilityExceptions.defaultException(mContext, ex, progressDialog);
|
||||||
BarcodeManager.enable();
|
BarcodeManager.enable();
|
||||||
});
|
});
|
||||||
@ -204,14 +209,14 @@ public class RettificaGiacenzeViewModel implements IRecyclerItemClicked<MtbColr>
|
|||||||
|
|
||||||
|
|
||||||
private void loadBarcodeArticolo(String barcodeProd, Ean128Model ean128Model, Dialog progressDialog) {
|
private void loadBarcodeArticolo(String barcodeProd, Ean128Model ean128Model, Dialog progressDialog) {
|
||||||
if(barcodeProd.length() == 14) {
|
if (barcodeProd.length() == 14) {
|
||||||
// barcodeProd = UtilityBarcode.convertITF14toNeutral(barcodeProd);
|
// barcodeProd = UtilityBarcode.convertITF14toNeutral(barcodeProd);
|
||||||
barcodeProd = UtilityBarcode.convertITF14toEAN13(barcodeProd);
|
barcodeProd = UtilityBarcode.convertITF14toEAN13(barcodeProd);
|
||||||
}
|
}
|
||||||
|
|
||||||
ArticoloRESTConsumer.getByBarcodeProd(barcodeProd, mtbAartList -> {
|
ArticoloRESTConsumer.getByBarcodeProd(barcodeProd, mtbAartList -> {
|
||||||
|
|
||||||
if(mtbAartList != null && mtbAartList.size() > 0) {
|
if (mtbAartList != null && mtbAartList.size() > 0) {
|
||||||
|
|
||||||
this.dispatchArt(mtbAartList.get(0), ean128Model);
|
this.dispatchArt(mtbAartList.get(0), ean128Model);
|
||||||
|
|
||||||
@ -243,12 +248,12 @@ public class RettificaGiacenzeViewModel implements IRecyclerItemClicked<MtbColr>
|
|||||||
mBinding.inputCodArtDescrForn.setOnEditorActionListener((v, actionId, event) -> {
|
mBinding.inputCodArtDescrForn.setOnEditorActionListener((v, actionId, event) -> {
|
||||||
if (actionId == EditorInfo.IME_ACTION_DONE) {
|
if (actionId == EditorInfo.IME_ACTION_DONE) {
|
||||||
resetAllError();
|
resetAllError();
|
||||||
if(UtilityString.isNullOrEmpty(mBinding.autoCompleteFornitori.getText().toString())) {
|
if (UtilityString.isNullOrEmpty(mBinding.autoCompleteFornitori.getText().toString())) {
|
||||||
setError(mBinding.autoCompleteFornitoriLayout, mContext.getResources().getText(R.string.error).toString());
|
setError(mBinding.autoCompleteFornitoriLayout, mContext.getResources().getText(R.string.error).toString());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(UtilityString.isNullOrEmpty(mBinding.inputCodArtDescrForn.getText().toString())) {
|
if (UtilityString.isNullOrEmpty(mBinding.inputCodArtDescrForn.getText().toString())) {
|
||||||
setError(mBinding.layoutCodArtDescrForn, mContext.getResources().getText(R.string.error).toString());
|
setError(mBinding.layoutCodArtDescrForn, mContext.getResources().getText(R.string.error).toString());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -266,7 +271,7 @@ public class RettificaGiacenzeViewModel implements IRecyclerItemClicked<MtbColr>
|
|||||||
if (actionId == EditorInfo.IME_ACTION_DONE) {
|
if (actionId == EditorInfo.IME_ACTION_DONE) {
|
||||||
resetAllError();
|
resetAllError();
|
||||||
|
|
||||||
if(UtilityString.isNullOrEmpty(mBinding.inputCodArtDescrInt.getText().toString())) {
|
if (UtilityString.isNullOrEmpty(mBinding.inputCodArtDescrInt.getText().toString())) {
|
||||||
setError(mBinding.layoutCodArtDescrInt, mContext.getResources().getText(R.string.error).toString());
|
setError(mBinding.layoutCodArtDescrInt, mContext.getResources().getText(R.string.error).toString());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -279,7 +284,7 @@ public class RettificaGiacenzeViewModel implements IRecyclerItemClicked<MtbColr>
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void setError(TextInputLayout textInputLayout, String message){
|
private void setError(TextInputLayout textInputLayout, String message) {
|
||||||
textInputLayout.setErrorEnabled(true);
|
textInputLayout.setErrorEnabled(true);
|
||||||
textInputLayout.setError(message);
|
textInputLayout.setError(message);
|
||||||
}
|
}
|
||||||
@ -294,7 +299,7 @@ public class RettificaGiacenzeViewModel implements IRecyclerItemClicked<MtbColr>
|
|||||||
//mBinding.autoCompleteFornitori.setText("");
|
//mBinding.autoCompleteFornitori.setText("");
|
||||||
mBinding.inputCodArtDescrForn.setText("");
|
mBinding.inputCodArtDescrForn.setText("");
|
||||||
mBinding.inputCodArtDescrInt.setText("");
|
mBinding.inputCodArtDescrInt.setText("");
|
||||||
}
|
}
|
||||||
|
|
||||||
private void resetError(TextInputLayout textInputLayout) {
|
private void resetError(TextInputLayout textInputLayout) {
|
||||||
textInputLayout.setErrorEnabled(false);
|
textInputLayout.setErrorEnabled(false);
|
||||||
@ -328,12 +333,12 @@ public class RettificaGiacenzeViewModel implements IRecyclerItemClicked<MtbColr>
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void dispatchArtsList(List<MtbAart> articoloFornitoreDTOS){
|
private void dispatchArtsList(List<MtbAart> articoloFornitoreDTOS) {
|
||||||
|
|
||||||
if(articoloFornitoreDTOS != null){
|
if (articoloFornitoreDTOS != null) {
|
||||||
if(articoloFornitoreDTOS.size() == 0) {
|
if (articoloFornitoreDTOS.size() == 0) {
|
||||||
showNoArtsFound();
|
showNoArtsFound();
|
||||||
} else if(articoloFornitoreDTOS.size() == 1) {
|
} else if (articoloFornitoreDTOS.size() == 1) {
|
||||||
dispatchArt(articoloFornitoreDTOS.get(0), null);
|
dispatchArt(articoloFornitoreDTOS.get(0), null);
|
||||||
} else {
|
} else {
|
||||||
DialogChooseArtFromListaArts.make(mContext, articoloFornitoreDTOS, mtbAart -> this.dispatchArt(mtbAart, null)).show();
|
DialogChooseArtFromListaArts.make(mContext, articoloFornitoreDTOS, mtbAart -> this.dispatchArt(mtbAart, null)).show();
|
||||||
@ -350,7 +355,7 @@ public class RettificaGiacenzeViewModel implements IRecyclerItemClicked<MtbColr>
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void dispatchArt(MtbAart mtbAart, Ean128Model ean128Model){
|
private void dispatchArt(MtbAart mtbAart, Ean128Model ean128Model) {
|
||||||
DialogInputQuantity.DTO qtaDto = new DialogInputQuantity.DTO();
|
DialogInputQuantity.DTO qtaDto = new DialogInputQuantity.DTO();
|
||||||
|
|
||||||
qtaDto.setMtbAart(mtbAart);
|
qtaDto.setMtbAart(mtbAart);
|
||||||
@ -366,17 +371,17 @@ public class RettificaGiacenzeViewModel implements IRecyclerItemClicked<MtbColr>
|
|||||||
qtaDto.setCanDataScadBeChanged(true);
|
qtaDto.setCanDataScadBeChanged(true);
|
||||||
|
|
||||||
|
|
||||||
if(ean128Model != null){
|
if (ean128Model != null) {
|
||||||
if(!UtilityString.isNullOrEmpty(ean128Model.BatchLot)) {
|
if (!UtilityString.isNullOrEmpty(ean128Model.BatchLot)) {
|
||||||
qtaDto.setBatchLot(ean128Model.BatchLot);
|
qtaDto.setBatchLot(ean128Model.BatchLot);
|
||||||
qtaDto.setCanPartitaMagBeChanged(false);
|
qtaDto.setCanPartitaMagBeChanged(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if(!UtilityString.isNullOrEmpty(ean128Model.BestBefore)){
|
if (!UtilityString.isNullOrEmpty(ean128Model.BestBefore)) {
|
||||||
qtaDto.setDataScad(UtilityDate.recognizeDate(ean128Model.BestBefore));
|
qtaDto.setDataScad(UtilityDate.recognizeDate(ean128Model.BestBefore));
|
||||||
qtaDto.setCanDataScadBeChanged(false);
|
qtaDto.setCanDataScadBeChanged(false);
|
||||||
} else if(!UtilityString.isNullOrEmpty(ean128Model.Expiry)) {
|
} else if (!UtilityString.isNullOrEmpty(ean128Model.Expiry)) {
|
||||||
qtaDto.setDataScad(UtilityDate.recognizeDate(ean128Model.Expiry));
|
qtaDto.setDataScad(UtilityDate.recognizeDate(ean128Model.Expiry));
|
||||||
qtaDto.setCanDataScadBeChanged(false);
|
qtaDto.setCanDataScadBeChanged(false);
|
||||||
}
|
}
|
||||||
@ -386,7 +391,7 @@ public class RettificaGiacenzeViewModel implements IRecyclerItemClicked<MtbColr>
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if(ean128Model.Count != null && ean128Model.Count > 0) {
|
if (ean128Model.Count != null && ean128Model.Count > 0) {
|
||||||
qtaDto.setNumCnf(ean128Model.Count);
|
qtaDto.setNumCnf(ean128Model.Count);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -407,7 +412,6 @@ public class RettificaGiacenzeViewModel implements IRecyclerItemClicked<MtbColr>
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private void onPostDispatch(MtbAart mtbAart, QuantityDTO quantityDTO) {
|
private void onPostDispatch(MtbAart mtbAart, QuantityDTO quantityDTO) {
|
||||||
|
|
||||||
final Dialog progress = UtilityProgress.createDefaultProgressDialog(mContext);
|
final Dialog progress = UtilityProgress.createDefaultProgressDialog(mContext);
|
||||||
@ -445,7 +449,7 @@ public class RettificaGiacenzeViewModel implements IRecyclerItemClicked<MtbColr>
|
|||||||
|
|
||||||
mtbColt.get().getMtbColr().add(mtbColr);
|
mtbColt.get().getMtbColr().add(mtbColr);
|
||||||
|
|
||||||
FBToast.successToast(mContext, mContext.getResources().getString(R.string.data_saved) ,FBToast.LENGTH_SHORT);
|
FBToast.successToast(mContext, mContext.getResources().getString(R.string.data_saved), FBToast.LENGTH_SHORT);
|
||||||
|
|
||||||
resetTexts();
|
resetTexts();
|
||||||
progress.dismiss();
|
progress.dismiss();
|
||||||
@ -460,8 +464,6 @@ public class RettificaGiacenzeViewModel implements IRecyclerItemClicked<MtbColr>
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onItemClick(MtbColr item, int position) {
|
public void onItemClick(MtbColr item, int position) {
|
||||||
mBottomSheetBehavior.setState(BottomSheetBehavior.STATE_EXPANDED);
|
mBottomSheetBehavior.setState(BottomSheetBehavior.STATE_EXPANDED);
|
||||||
@ -479,8 +481,8 @@ public class RettificaGiacenzeViewModel implements IRecyclerItemClicked<MtbColr>
|
|||||||
|
|
||||||
public void openLU() {
|
public void openLU() {
|
||||||
DialogScanOrCreateLU.make(mContext, true, false, mtbColt -> {
|
DialogScanOrCreateLU.make(mContext, true, false, mtbColt -> {
|
||||||
if(mtbColt == null) {
|
if (mtbColt == null) {
|
||||||
((IPoppableActivity)mContext).pop();
|
((IPoppableActivity) mContext).pop();
|
||||||
} else {
|
} else {
|
||||||
setMtbColt(mtbColt);
|
setMtbColt(mtbColt);
|
||||||
}
|
}
|
||||||
@ -490,6 +492,7 @@ public class RettificaGiacenzeViewModel implements IRecyclerItemClicked<MtbColr>
|
|||||||
public boolean thereIsAnOpenedUL() {
|
public boolean thereIsAnOpenedUL() {
|
||||||
return mtbColt.get() != null;
|
return mtbColt.get() != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean thereIsAnyRowInUL() {
|
public boolean thereIsAnyRowInUL() {
|
||||||
return mtbColt.get() != null &&
|
return mtbColt.get() != null &&
|
||||||
mtbColt.get().getMtbColr() != null &&
|
mtbColt.get().getMtbColr() != null &&
|
||||||
@ -498,7 +501,7 @@ public class RettificaGiacenzeViewModel implements IRecyclerItemClicked<MtbColr>
|
|||||||
|
|
||||||
public void closeLU(boolean openNewOne, boolean saveCausale) {
|
public void closeLU(boolean openNewOne, boolean saveCausale) {
|
||||||
|
|
||||||
if(thereIsAnOpenedUL()) {
|
if (thereIsAnOpenedUL()) {
|
||||||
|
|
||||||
final Dialog progress = UtilityProgress.createDefaultProgressDialog(mContext);
|
final Dialog progress = UtilityProgress.createDefaultProgressDialog(mContext);
|
||||||
|
|
||||||
@ -552,21 +555,14 @@ public class RettificaGiacenzeViewModel implements IRecyclerItemClicked<MtbColr>
|
|||||||
|
|
||||||
MtbColt cloneMtbColt = (MtbColt) mtbColt.get().clone();
|
MtbColt cloneMtbColt = (MtbColt) mtbColt.get().clone();
|
||||||
cloneMtbColt.setOperation(CommonModelConsts.OPERATION.NO_OP);
|
cloneMtbColt.setOperation(CommonModelConsts.OPERATION.NO_OP);
|
||||||
|
cloneMtbColt.setMtbColr(new ObservableArrayList<>());
|
||||||
|
|
||||||
cloneMtbColt.setMtbCols(new ArrayList<>());
|
cloneMtbColt.setMtbCols(new ArrayList<>());
|
||||||
cloneMtbColt.getMtbCols().add(mtbCols);
|
cloneMtbColt.getMtbCols().add(mtbCols);
|
||||||
|
|
||||||
ColliMagazzinoRESTConsumer.saveCollo(cloneMtbColt, new ISimpleOperationCallback<MtbColt>() {
|
ColliMagazzinoRESTConsumer.saveCollo(cloneMtbColt, mtbColt -> onComplete.run(), ex -> {
|
||||||
@Override
|
|
||||||
public void onSuccess(MtbColt value) {
|
|
||||||
onComplete.run();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onFailed(Exception ex) {
|
|
||||||
UtilityExceptions.defaultException(mContext, ex, progress);
|
UtilityExceptions.defaultException(mContext, ex, progress);
|
||||||
DialogCommon.showRestError(mContext, ex, onComplete::run);
|
DialogCommon.showRestError(mContext, ex, onComplete::run);
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -574,10 +570,10 @@ public class RettificaGiacenzeViewModel implements IRecyclerItemClicked<MtbColr>
|
|||||||
|
|
||||||
DialogYesNo.make(mContext, "Posiziona UL", "Vuoi cambiare la posizione della UL corrente?", result -> {
|
DialogYesNo.make(mContext, "Posiziona UL", "Vuoi cambiare la posizione della UL corrente?", result -> {
|
||||||
|
|
||||||
switch (result){
|
switch (result) {
|
||||||
case YES:
|
case YES:
|
||||||
DialogAskPositionOfLU.makeBase(mContext, mtbColt.get(), false, (status, mtbDepoPosizione) -> {
|
DialogAskPositionOfLU.makeBase(mContext, mtbColt.get(), false, (status, mtbDepoPosizione) -> {
|
||||||
if(status == DialogConsts.Results.ABORT) {
|
if (status == DialogConsts.Results.ABORT) {
|
||||||
onAbort.run();
|
onAbort.run();
|
||||||
} else {
|
} else {
|
||||||
if (mtbDepoPosizione != null && mtbColt.get() != null) {
|
if (mtbDepoPosizione != null && mtbColt.get() != null) {
|
||||||
@ -622,7 +618,7 @@ public class RettificaGiacenzeViewModel implements IRecyclerItemClicked<MtbColr>
|
|||||||
|
|
||||||
BigDecimal qtaCol = value.qtaTot.getBigDecimal().subtract(mtbColrToEditClone.getQtaCol());
|
BigDecimal qtaCol = value.qtaTot.getBigDecimal().subtract(mtbColrToEditClone.getQtaCol());
|
||||||
|
|
||||||
if(qtaCol.compareTo(BigDecimal.ZERO) != 0) {
|
if (qtaCol.compareTo(BigDecimal.ZERO) != 0) {
|
||||||
|
|
||||||
BigDecimal numCnf = value.numCnf.getBigDecimal().subtract(mtbColrToEditClone.getNumCnf());
|
BigDecimal numCnf = value.numCnf.getBigDecimal().subtract(mtbColrToEditClone.getNumCnf());
|
||||||
|
|
||||||
@ -696,12 +692,11 @@ public class RettificaGiacenzeViewModel implements IRecyclerItemClicked<MtbColr>
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private void printCollo(Dialog progress) {
|
private void printCollo(Dialog progress) {
|
||||||
|
|
||||||
this.showAskPrint(shouldPrint -> {
|
this.showAskPrint(shouldPrint -> {
|
||||||
|
|
||||||
if(shouldPrint) {
|
if (shouldPrint) {
|
||||||
PrinterRESTConsumer.getAvailablePrinters(SettingsManager.i().userSession.depo.getCodMdep(), new ISimpleOperationCallback<List<String>>() {
|
PrinterRESTConsumer.getAvailablePrinters(SettingsManager.i().userSession.depo.getCodMdep(), new ISimpleOperationCallback<List<String>>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(List<String> value) {
|
public void onSuccess(List<String> value) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user