BrowserView.js
[app.wkmirror] / nsinject.js
index c05d50a..2e0a585 100644 (file)
@@ -140,7 +140,7 @@ NS = {
             '&style=NORMAL'+
             '&report='+
             '&grid='+
-            '&searchid=118'+
+            '&searchid=120'+
             '&dle=F',
             
             {
@@ -324,10 +324,10 @@ NS = {
                     data: ar
                 }));
            
-            if (pref == 'SG-Account') {
+            if (data.pref == 'SG-Account') {
                 console.log(
                     JSON.stringify ({
-                        'action' : 'exit'
+                        method : 'exit'
                     })
                 );
                 return;
@@ -335,8 +335,8 @@ NS = {
             NS.downloadgetdata(
                 'https://system.netsuite.com/app/common/search/searchresults.csv' +
                 '?searchtype=Transaction' + 
-                '&Transaction_ACCOUNT=' + id +
-                '&Transaction_DEPARTMENT=2' + // hk
+                '&Transaction_ACCOUNT=' + data.id +
+                '&Transaction_DEPARTMENT=1' + // sg
                 '&sortcol=Transaction_TRANDATE_raw' +
                 '&sortdir=ASC'+
                 '&csv=Export'+
@@ -345,11 +345,11 @@ NS = {
                 '&style=NORMAL'+
                 '&report='+
                 '&grid='+
-                '&searchid=118'+
+                '&searchid=120'+
                 '&dle=F',
                 
                 {
-                    id: id,
+                    id: data.id,
                     pref: 'SG-Account'
                     //reportaction: 'exportcsv',
                     //apptype: 'html',