Pman.Dialog.XtuplePurchaseOrder.bjs
authorAlan Knowles <alan@roojs.com>
Tue, 10 Dec 2013 05:46:26 +0000 (13:46 +0800)
committerAlan Knowles <alan@roojs.com>
Tue, 10 Dec 2013 05:46:26 +0000 (13:46 +0800)
Pman.Dialog.XtuplePurchaseOrder.js

Pman.Dialog.XtuplePurchaseOrder.bjs
Pman.Dialog.XtuplePurchaseOrder.js

index cb4d84d..0adee9a 100644 (file)
                                                         },
                                                         {
                                                             "listeners": {
-                                                                "|click": "function()\n{\n    var s = _this.gltransgrid.getSelected();\n    if (s) {\n        Roo.MessageBox.alert(\"Error\", \"Select an item to reverse\");\n        return;\n    }\n    \n    var fixit = function(){\n        new Pman.Request({\n            url : baseURL + '/Roo/invdetail.php',\n            method :'POST',\n            params : {\n                invdetail_id : s.data.invdetail_id,\n                _reverse : 1\n                \n            },\n            success : function(res) {\n                Roo.MessageBox.alert('Notice', 'DONE');\n            }\n        });\n    }\n    \n    Roo.MessageBox.confirm(\n        \"Confirm\",\n        \"Are you sure to reverse that line\",\n        function(r) {\n            if (r != 'yes') {\n                return;\n            }\n\n            fixit();\n            return;\n        }\n    ); \n    \n    \n}\n"
+                                                                "|click": "function()\n{\n    var s = _this.gltransgrid.selModel.getSelected();\n    if (s) {\n        Roo.MessageBox.alert(\"Error\", \"Select an item to reverse\");\n        return;\n    }\n    \n    var fixit = function(){\n        new Pman.Request({\n            url : baseURL + '/Roo/invdetail.php',\n            method :'POST',\n            params : {\n                invdetail_id : s.data.invdetail_id,\n                _reverse : 1\n                \n            },\n            success : function(res) {\n                Roo.MessageBox.alert('Notice', 'DONE');\n            }\n        });\n    }\n    \n    Roo.MessageBox.confirm(\n        \"Confirm\",\n        \"Are you sure to reverse that line\",\n        function(r) {\n            if (r != 'yes') {\n                return;\n            }\n\n            fixit();\n            return;\n        }\n    ); \n    \n    \n}\n"
                                                             },
                                                             "cls": "x-btn-text-icon",
                                                             "text": "Reverse",
index df04c5f..7fe1090 100644 (file)
@@ -1664,7 +1664,7 @@ Pman.Dialog.XtuplePurchaseOrder = {
                                                 listeners : {
                                                     click : function()
                                                     {
-                                                        var s = _this.gltransgrid.getSelected();
+                                                        var s = _this.gltransgrid.selModel.getSelected();
                                                         if (s) {
                                                             Roo.MessageBox.alert("Error", "Select an item to reverse");
                                                             return;