Controllo su chiusura UL in Rettifica.
Return dell'errore nel caso non venga riconosciuto automaticamente.
This commit is contained in:
parent
7c394d3d78
commit
08431d3e44
@ -26,9 +26,9 @@ public class CommonRESTException {
|
|||||||
} else if(ex instanceof SocketTimeoutException){
|
} else if(ex instanceof SocketTimeoutException){
|
||||||
return "Errore di timeout durante la comunicazione con il server remoto. Riprova.";
|
return "Errore di timeout durante la comunicazione con il server remoto. Riprova.";
|
||||||
} else if(ex.getMessage().startsWith("Printer not found")){
|
} else if(ex.getMessage().startsWith("Printer not found")){
|
||||||
return "Stampante non configurata";
|
return "Stampante non trovata";
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return ex.getMessage();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -426,37 +426,40 @@ public class RettificaGiacenzeViewModel implements IRecyclerItemClicked<MtbColr>
|
|||||||
|
|
||||||
public void closeLU(boolean openNewOne) {
|
public void closeLU(boolean openNewOne) {
|
||||||
|
|
||||||
final ProgressDialog progress = ProgressDialog.show(mContext, mContext.getText(R.string.waiting),
|
if(thereIsAnyRowInUL()) {
|
||||||
mContext.getText(R.string.loading) + " ...", true);
|
|
||||||
|
|
||||||
if(thereIsAnyRowInUL()){
|
final ProgressDialog progress = ProgressDialog.show(mContext, mContext.getText(R.string.waiting),
|
||||||
|
mContext.getText(R.string.loading) + " ...", true);
|
||||||
|
|
||||||
if(!UtilityString.isNullOrEmpty(SettingsManager.iDB().getDefaultCausaleRettificaGiacenze())) {
|
if (thereIsAnyRowInUL()) {
|
||||||
|
|
||||||
progress.show();
|
if (!UtilityString.isNullOrEmpty(SettingsManager.iDB().getDefaultCausaleRettificaGiacenze())) {
|
||||||
saveCausaleRettificaGiacenze(progress, () -> {
|
|
||||||
if(!mtbColt.get().getDisablePrint()){
|
progress.show();
|
||||||
|
saveCausaleRettificaGiacenze(progress, () -> {
|
||||||
|
if (!mtbColt.get().getDisablePrint()) {
|
||||||
|
printCollo(progress);
|
||||||
|
} else {
|
||||||
|
progress.dismiss();
|
||||||
|
resetMtbColt(openNewOne);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
if (!mtbColt.get().getDisablePrint()) {
|
||||||
|
progress.show();
|
||||||
printCollo(progress);
|
printCollo(progress);
|
||||||
} else {
|
} else {
|
||||||
progress.dismiss();
|
|
||||||
resetMtbColt(openNewOne);
|
resetMtbColt(openNewOne);
|
||||||
}
|
}
|
||||||
});
|
|
||||||
} else {
|
|
||||||
if(!mtbColt.get().getDisablePrint()){
|
|
||||||
progress.show();
|
|
||||||
printCollo(progress);
|
|
||||||
} else {
|
|
||||||
resetMtbColt(openNewOne);
|
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
} else {
|
progress.show();
|
||||||
progress.show();
|
ColliMagazzinoRESTConsumer.deleteCollo(mtbColt.get(), () -> {
|
||||||
ColliMagazzinoRESTConsumer.deleteCollo(mtbColt.get(), () -> {
|
progress.dismiss();
|
||||||
progress.dismiss();
|
resetMtbColt(openNewOne);
|
||||||
resetMtbColt(openNewOne);
|
}, ex -> UtilityExceptions.defaultException(mContext, ex, progress));
|
||||||
}, ex -> UtilityExceptions.defaultException(mContext, ex, progress));
|
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user