Pman.Tab.XtupleSalesOrder.bjs
authorEdward <edward@roojs.com>
Fri, 14 Feb 2014 11:50:33 +0000 (19:50 +0800)
committerEdward <edward@roojs.com>
Fri, 14 Feb 2014 11:50:33 +0000 (19:50 +0800)
Pman.Tab.XtupleSalesOrder.js

Pman.Tab.XtupleSalesOrder.bjs
Pman.Tab.XtupleSalesOrder.js

index 02ea989..900ecda 100644 (file)
                                                 },
                                                 {
                                                     "listeners": {
-                                                        "|click": "function()\n{\n    var s = _this.grid.getSelectionModel().getSelected();\n    if (!s) {\n        Roo.MessageBox.alert(\"Error\", \"Select an order to close\");\n        return;\n    }\n    \n    if(s.data.cohead_status == 'C'){\n        Roo.MessageBox.alert(\"Error\", \"This order has been closed\");\n        return;\n    }\n    \n    Roo.MessageBox.confirm(\"Confirm\", \"Are you sure?\",\n        function(v) {\n            if (yn != 'yes') {\n                return;\n            }\n            new Pman.Request({\n                url: baseURL + '/Roo/cohead',\n                method : 'POST',\n                params :  {\n                    cohead_id : s.data.cohead_id,\n                    _close : 1\n                },\n                mask : 'Sending',\n                success : function()\n                {\n                    Roo.MessageBox.alert(\"Notice\", \"DONE\");\n                    _this.grid.footer.onClick('first');\n                }\n           });\n        }\n    );\n    \n    \n}\n"
+                                                        "|click": "function()\n{\n    var s = _this.grid.getSelectionModel().getSelected();\n    if (!s) {\n        Roo.MessageBox.alert(\"Error\", \"Select an order to close\");\n        return;\n    }\n    \n    if(s.data.cohead_status == 'C'){\n        Roo.MessageBox.alert(\"Error\", \"This order has been closed\");\n        return;\n    }\n    \n    Roo.MessageBox.confirm(\"Confirm\", \"Are you sure?\",\n        function(v) {\n            if (v != 'yes') {\n                return;\n            }\n            new Pman.Request({\n                url: baseURL + '/Roo/cohead',\n                method : 'POST',\n                params :  {\n                    cohead_id : s.data.cohead_id,\n                    _close : 1\n                },\n                mask : 'Sending',\n                success : function()\n                {\n                    Roo.MessageBox.alert(\"Notice\", \"DONE\");\n                    _this.grid.footer.onClick('first');\n                }\n           });\n        }\n    );\n    \n    \n}\n"
                                                     },
                                                     "cls": "x-btn-text-icon",
                                                     "text": "Complete and Close",
index 4500a0c..51ab3ac 100644 (file)
@@ -653,7 +653,7 @@ Pman.Tab.XtupleSalesOrder = new Roo.XComponent({
                                                 
                                                 Roo.MessageBox.confirm("Confirm", "Are you sure?",
                                                     function(v) {
-                                                        if (yn != 'yes') {
+                                                        if (v != 'yes') {
                                                             return;
                                                         }
                                                         new Pman.Request({