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,16 +426,18 @@ public class RettificaGiacenzeViewModel implements IRecyclerItemClicked<MtbColr>
|
|||||||
|
|
||||||
public void closeLU(boolean openNewOne) {
|
public void closeLU(boolean openNewOne) {
|
||||||
|
|
||||||
|
if(thereIsAnyRowInUL()) {
|
||||||
|
|
||||||
final ProgressDialog progress = ProgressDialog.show(mContext, mContext.getText(R.string.waiting),
|
final ProgressDialog progress = ProgressDialog.show(mContext, mContext.getText(R.string.waiting),
|
||||||
mContext.getText(R.string.loading) + " ...", true);
|
mContext.getText(R.string.loading) + " ...", true);
|
||||||
|
|
||||||
if(thereIsAnyRowInUL()){
|
if (thereIsAnyRowInUL()) {
|
||||||
|
|
||||||
if(!UtilityString.isNullOrEmpty(SettingsManager.iDB().getDefaultCausaleRettificaGiacenze())) {
|
if (!UtilityString.isNullOrEmpty(SettingsManager.iDB().getDefaultCausaleRettificaGiacenze())) {
|
||||||
|
|
||||||
progress.show();
|
progress.show();
|
||||||
saveCausaleRettificaGiacenze(progress, () -> {
|
saveCausaleRettificaGiacenze(progress, () -> {
|
||||||
if(!mtbColt.get().getDisablePrint()){
|
if (!mtbColt.get().getDisablePrint()) {
|
||||||
printCollo(progress);
|
printCollo(progress);
|
||||||
} else {
|
} else {
|
||||||
progress.dismiss();
|
progress.dismiss();
|
||||||
@ -443,7 +445,7 @@ public class RettificaGiacenzeViewModel implements IRecyclerItemClicked<MtbColr>
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
if(!mtbColt.get().getDisablePrint()){
|
if (!mtbColt.get().getDisablePrint()) {
|
||||||
progress.show();
|
progress.show();
|
||||||
printCollo(progress);
|
printCollo(progress);
|
||||||
} else {
|
} else {
|
||||||
@ -459,6 +461,7 @@ public class RettificaGiacenzeViewModel implements IRecyclerItemClicked<MtbColr>
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void saveCausaleRettificaGiacenze(ProgressDialog progress, Runnable onComplete) {
|
private void saveCausaleRettificaGiacenze(ProgressDialog progress, Runnable onComplete) {
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user