diff --git a/Verdnaturaventas/Verdnaturaventas.xcworkspace/xcuserdata/enriqueblascoblanquer.xcuserdatad/UserInterfaceState.xcuserstate b/Verdnaturaventas/Verdnaturaventas.xcworkspace/xcuserdata/enriqueblascoblanquer.xcuserdatad/UserInterfaceState.xcuserstate
index 1bbe222..07ea4e2 100644
Binary files a/Verdnaturaventas/Verdnaturaventas.xcworkspace/xcuserdata/enriqueblascoblanquer.xcuserdatad/UserInterfaceState.xcuserstate and b/Verdnaturaventas/Verdnaturaventas.xcworkspace/xcuserdata/enriqueblascoblanquer.xcuserdatad/UserInterfaceState.xcuserstate differ
diff --git a/Verdnaturaventas/Verdnaturaventas/Dialog/DialogPrecios.swift b/Verdnaturaventas/Verdnaturaventas/Dialog/DialogPrecios.swift
index adce843..7bb8130 100644
--- a/Verdnaturaventas/Verdnaturaventas/Dialog/DialogPrecios.swift
+++ b/Verdnaturaventas/Verdnaturaventas/Dialog/DialogPrecios.swift
@@ -174,8 +174,15 @@ class DialogPrecios: MyViewVentas, UITableViewDelegate, UITableViewDataSource {
cmd.callbacks = CommandCallbacks(
handlerStart: {},
handlerFinish: {
- self.aplication.pedido = cmd.order
- _ = self.navigationController?.popViewController(animated: true)
+
+ if (cmd.order?.id as! Int) <= 0{
+ self.showErrorOrder()
+
+ }else{
+ self.aplication.pedido = cmd.order
+ _ = self.navigationController?.popViewController(animated: true)
+ }
+
},
handlerRetry: {
for d in self.datosSalvados
@@ -196,6 +203,15 @@ class DialogPrecios: MyViewVentas, UITableViewDelegate, UITableViewDataSource {
execute(cmd);
}
+ func showErrorOrder(){
+ let alert = UIAlertController(title: "Error", message: "Error to create order.", preferredStyle: UIAlertControllerStyle.alert)
+ alert.addAction(UIAlertAction(title: "Ok", style: UIAlertActionStyle.default, handler: { action in
+ ControllerPedido.reiniciarPedido()
+ UIApplication.shared.keyWindow?.rootViewController = self.storyboard!.instantiateViewController(withIdentifier: "TabView")
+ }))
+ self.present(alert, animated: true, completion: nil)
+ }
+
func prepareOrder(_ show: Bool)
{
showProgress(show)
diff --git a/Verdnaturaventas/Verdnaturaventas/Info.plist b/Verdnaturaventas/Verdnaturaventas/Info.plist
index 6d152cd..1bafaf4 100644
--- a/Verdnaturaventas/Verdnaturaventas/Info.plist
+++ b/Verdnaturaventas/Verdnaturaventas/Info.plist
@@ -26,11 +26,11 @@
CFBundlePackageType
APPL
CFBundleShortVersionString
- 1.3
+ 1.31
CFBundleSignature
????
CFBundleVersion
- 20
+ 21
LSApplicationCategoryType
LSRequiresIPhoneOS
diff --git a/Verdnaturaventas/Verdnaturaventas/Main.storyboard b/Verdnaturaventas/Verdnaturaventas/Main.storyboard
index effdb44..d158513 100644
--- a/Verdnaturaventas/Verdnaturaventas/Main.storyboard
+++ b/Verdnaturaventas/Verdnaturaventas/Main.storyboard
@@ -2578,9 +2578,9 @@
-
+
-
+