Pman.Dialog.XtupleSalesOrder.bjs
authorEdward <edward@roojs.com>
Thu, 27 Feb 2014 11:04:09 +0000 (19:04 +0800)
committerEdward <edward@roojs.com>
Thu, 27 Feb 2014 11:04:09 +0000 (19:04 +0800)
Pman.Dialog.XtupleSalesOrder.js

Pman.Dialog.XtupleSalesOrder.bjs
Pman.Dialog.XtupleSalesOrder.js

index c4a9545..cc54ed2 100644 (file)
                                                         },
                                                         {
                                                             "listeners": {
-                                                                "|click": "function()\n{\n\n    \n}\n"
+                                                                "|click": "function()\n{\n    var s = _this.shipgrid.getSelectionModel().getSelected();\n    \n    if(!s || s.data.shiphead_id * 1 < 1){\n        Roo.MessageBox.alert('Error', 'Please select a shipment');\n        return;\n    }\n    \n}\n"
                                                             },
                                                             "cls": "x-btn-text-icon",
                                                             "text": "Send Delivery Email",
index 09e2463..478f31e 100644 (file)
@@ -3632,7 +3632,12 @@ Pman.Dialog.XtupleSalesOrder = {
                                                 listeners : {
                                                     click : function()
                                                     {
-                                                    
+                                                        var s = _this.shipgrid.getSelectionModel().getSelected();
+                                                        
+                                                        if(!s || s.data.shiphead_id * 1 < 1){
+                                                            Roo.MessageBox.alert('Error', 'Please select a shipment');
+                                                            return;
+                                                        }
                                                         
                                                     }
                                                 },