Pman.Tab.XtupleCustomer.bjs
authorEdward <edward@roojs.com>
Fri, 14 Feb 2014 12:18:05 +0000 (20:18 +0800)
committerEdward <edward@roojs.com>
Fri, 14 Feb 2014 12:18:05 +0000 (20:18 +0800)
Pman.Tab.XtupleCustomer.js

Pman.Tab.XtupleCustomer.bjs
Pman.Tab.XtupleCustomer.js

index 4d21c27..de2a0f7 100644 (file)
@@ -97,7 +97,7 @@
                                                 },
                                                 {
                                                     "listeners": {
-                                                        "click": "function (_self, e)\n{\n    \n    if (!Pman.hasPerm('Admin.Admin_Tab','S')) {\n        Roo.MessageBox.alert(\"Error\", \"Permission Denied\");\n        return;\n    }\n    \n    var c = _this.country.getValue();\n    if(!c.length){\n        Roo.MessageBox.alert(\"Error\", \"Please select a country\");\n        return;\n    }\n    \n    \n    var params = {\n        '_group' : 'customer',\n        '_name' : 'subscribers',\n        'limit' : 99999,\n        'csvTitles' : '*',\n        'csvCols' : '*'\n    };\n    \n    \n    new Pman.Download({\n      url : baseURL + '/Roo/Metasql',\n      params :   params,\n      method : 'GET'\n    });\n    Roo.MessageBox.alert(\"Notice\", \"Report will download shortly\");\n}"
+                                                        "click": "function (_self, e)\n{\n    \n    if (!Pman.hasPerm('Admin.Admin_Tab','S')) {\n        Roo.MessageBox.alert(\"Error\", \"Permission Denied\");\n        return;\n    }\n    \n    var c = _this.country.getValue();\n    if(!c.length){\n        Roo.MessageBox.alert(\"Error\", \"Please select a country\");\n        return;\n    }\n    \n    new Pman.Download({\n        url : baseURL + '/Roo/custinfo',\n        method : 'GET',\n        params : {\n            _my_json : 1,\n            limit : 9999,\n            'search[_country]' : c,\n            'search[with_address]' : 1\n        }\n        \n    });\n}"
                                                     },
                                                     "text": "Download Customers As Json",
                                                     "xtype": "Item",
index 498b2aa..0dd1eb6 100644 (file)
@@ -196,22 +196,17 @@ Pman.Tab.XtupleCustomer = new Roo.XComponent({
                                                     return;
                                                 }
                                                 
-                                                
-                                                var params = {
-                                                    '_group' : 'customer',
-                                                    '_name' : 'subscribers',
-                                                    'limit' : 99999,
-                                                    'csvTitles' : '*',
-                                                    'csvCols' : '*'
-                                                };
-                                                
-                                                
                                                 new Pman.Download({
-                                                  url : baseURL + '/Roo/Metasql',
-                                                  params :   params,
-                                                  method : 'GET'
+                                                    url : baseURL + '/Roo/custinfo',
+                                                    method : 'GET',
+                                                    params : {
+                                                        _my_json : 1,
+                                                        limit : 9999,
+                                                        'search[_country]' : c,
+                                                        'search[with_address]' : 1
+                                                    }
+                                                    
                                                 });
-                                                Roo.MessageBox.alert("Notice", "Report will download shortly");
                                             }
                                         },
                                         text : "Download Customers As Json"