Lint Report: 2 errors
+Check performed at Thu Feb 14 13:07:41 CET 2019
diff --git a/verdnaturaventas/release/output.json b/verdnaturaventas/release/output.json
index c778d5a7..b31f44cc 100644
--- a/verdnaturaventas/release/output.json
+++ b/verdnaturaventas/release/output.json
@@ -1 +1 @@
-[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":87,"versionName":"1.9.0","enabled":true,"outputFile":"verdnaturaventas-release.apk","fullName":"release","baseName":"release"},"path":"verdnaturaventas-release.apk","properties":{}}]
\ No newline at end of file
+[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":89,"versionName":"1.9.2","enabled":true,"outputFile":"verdnaturaventas-release.apk","fullName":"release","baseName":"release"},"path":"verdnaturaventas-release.apk","properties":{}}]
\ No newline at end of file
diff --git a/verdnaturaventas/release/vncliente.apk b/verdnaturaventas/release/vncliente.apk
deleted file mode 100644
index 3ed4e099..00000000
Binary files a/verdnaturaventas/release/vncliente.apk and /dev/null differ
diff --git a/verdnaturaventas/src/main/java/com/verdnatura/verdnaturaventas/controller/ControllerPedido.java b/verdnaturaventas/src/main/java/com/verdnatura/verdnaturaventas/controller/ControllerPedido.java
index 40fc867e..e8d9fd20 100644
--- a/verdnaturaventas/src/main/java/com/verdnatura/verdnaturaventas/controller/ControllerPedido.java
+++ b/verdnaturaventas/src/main/java/com/verdnatura/verdnaturaventas/controller/ControllerPedido.java
@@ -271,6 +271,7 @@ public class ControllerPedido{
Toast.makeText(this.activity.getBaseContext(),"Error al finalizar,vuelva a intentar.",Toast.LENGTH_LONG).show();
}
+
}
public void reiniciarPedido()
diff --git a/verdnaturaventas/src/main/java/com/verdnatura/verdnaturaventas/dialog/DialogComprar.java b/verdnaturaventas/src/main/java/com/verdnatura/verdnaturaventas/dialog/DialogComprar.java
index 883cb92d..2c2c31b4 100644
--- a/verdnaturaventas/src/main/java/com/verdnatura/verdnaturaventas/dialog/DialogComprar.java
+++ b/verdnaturaventas/src/main/java/com/verdnatura/verdnaturaventas/dialog/DialogComprar.java
@@ -245,11 +245,20 @@ public class DialogComprar extends DialogBase{
@Override
public void Realice(CommandBase cmd) {
pedido.setOrder(((CmdCrearOrder)cmd).getOrder());
- pedido.guardarOrder();
- Toast.makeText(activity, activity.getResources().getString(R.string.activity_articulo_producto_anyadido), Toast.LENGTH_SHORT).show();
- activity.showTotalPedido();
- activity.showCarritoRows();
- DialogComprar.this.dismiss();
+
+ if (pedido.getOrder().getId() == 0){
+ Toast.makeText(activity, "Error al aƱadir la linea,vuelva a intentar.",Toast.LENGTH_LONG).show();
+ pedido.reiniciarPedido();
+ }else{
+ pedido.guardarOrder();
+ Toast.makeText(activity, activity.getResources().getString(R.string.activity_articulo_producto_anyadido), Toast.LENGTH_SHORT).show();
+ activity.showTotalPedido();
+ activity.showCarritoRows();
+ DialogComprar.this.dismiss();
+ }
+
+
+
}
});
cmd.setErrorManager(new CommandError() {
diff --git a/verdnaturaventas/src/main/java/com/verdnatura/verdnaturaventas/dialog/DialogValidarPedido.java b/verdnaturaventas/src/main/java/com/verdnatura/verdnaturaventas/dialog/DialogValidarPedido.java
index 8c937098..3865846b 100644
--- a/verdnaturaventas/src/main/java/com/verdnatura/verdnaturaventas/dialog/DialogValidarPedido.java
+++ b/verdnaturaventas/src/main/java/com/verdnatura/verdnaturaventas/dialog/DialogValidarPedido.java
@@ -67,6 +67,7 @@ public class DialogValidarPedido extends DialogBase {
if(tieneCredito)
{
pedido.showFinalizar(false, true);
+
this.dismiss();
}
else