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){
|
||||
return "Errore di timeout durante la comunicazione con il server remoto. Riprova.";
|
||||
} else if(ex.getMessage().startsWith("Printer not found")){
|
||||
return "Stampante non configurata";
|
||||
return "Stampante non trovata";
|
||||
} else {
|
||||
return null;
|
||||
return ex.getMessage();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -426,37 +426,40 @@ public class RettificaGiacenzeViewModel implements IRecyclerItemClicked<MtbColr>
|
||||
|
||||
public void closeLU(boolean openNewOne) {
|
||||
|
||||
final ProgressDialog progress = ProgressDialog.show(mContext, mContext.getText(R.string.waiting),
|
||||
mContext.getText(R.string.loading) + " ...", true);
|
||||
if(thereIsAnyRowInUL()) {
|
||||
|
||||
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();
|
||||
saveCausaleRettificaGiacenze(progress, () -> {
|
||||
if(!mtbColt.get().getDisablePrint()){
|
||||
if (!UtilityString.isNullOrEmpty(SettingsManager.iDB().getDefaultCausaleRettificaGiacenze())) {
|
||||
|
||||
progress.show();
|
||||
saveCausaleRettificaGiacenze(progress, () -> {
|
||||
if (!mtbColt.get().getDisablePrint()) {
|
||||
printCollo(progress);
|
||||
} else {
|
||||
progress.dismiss();
|
||||
resetMtbColt(openNewOne);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
if (!mtbColt.get().getDisablePrint()) {
|
||||
progress.show();
|
||||
printCollo(progress);
|
||||
} else {
|
||||
progress.dismiss();
|
||||
resetMtbColt(openNewOne);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
if(!mtbColt.get().getDisablePrint()){
|
||||
progress.show();
|
||||
printCollo(progress);
|
||||
} else {
|
||||
resetMtbColt(openNewOne);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
progress.show();
|
||||
ColliMagazzinoRESTConsumer.deleteCollo(mtbColt.get(), () -> {
|
||||
progress.dismiss();
|
||||
resetMtbColt(openNewOne);
|
||||
}, ex -> UtilityExceptions.defaultException(mContext, ex, progress));
|
||||
} else {
|
||||
progress.show();
|
||||
ColliMagazzinoRESTConsumer.deleteCollo(mtbColt.get(), () -> {
|
||||
progress.dismiss();
|
||||
resetMtbColt(openNewOne);
|
||||
}, ex -> UtilityExceptions.defaultException(mContext, ex, progress));
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user