Pman.Tab.XtupleItem.bjs
[Pman.Xtuple] / Pman.Tab.XtupleItem.bjs
index dad28b0..5be1478 100644 (file)
@@ -2,7 +2,7 @@
  "name" : "Pman.Tab.XtupleItem",
  "parent" : "Pman.Tab.XtupleManage",
  "title" : "Pman.Tab.XtupleItem",
- "path" : "/home/edward/gitlive/web.xtuple/Pman/Xtuple/Pman.Tab.XtupleItem.bjs",
+ "path" : "/home/edward/gitlive/Pman.Xtuple/Pman.Tab.XtupleItem.bjs",
  "permname" : "",
  "modOrder" : "001",
  "strings" : {
@@ -28,6 +28,7 @@
   "9a8faafb674c03474827bcb6fcde43a3" : "Search Product",
   "f1c3ca6cadc4a9f57a08d5f7482a3f83" : "No item found",
   "d6ea9efa48916e9563d76ddc233ebe2a" : "Sync Product from HK (New Products Only)",
+  "ec53a8c4f07baed5d8825072c89799be" : "Status",
   "2cfd827c6e37453fe1ddde82a5bd9474" : "No itemloc found",
   "d8ab3576a67fe0cc175ee77d57d0fd85" : "Pickface",
   "5bc3fd20294c17c9803942958fd7f26d" : "Show Inactive",
@@ -66,8 +67,8 @@
       },
       {
        "xtype" : "LayoutRegion",
-       "$ xns" : "Roo",
        "width" : 200,
+       "$ xns" : "Roo",
        "split" : true,
        "* prop" : "east"
       },
@@ -75,9 +76,9 @@
        "listeners" : {
         "|activate" : "function() {\n    _this.panel = this;\n    if (_this.grid) {\n        _this.grid.footer.onClick('first');\n    }\n}"
        },
+       "background" : false,
        "region" : "center",
        "fitToframe" : true,
-       "background" : false,
        "title" : "Products",
        "xtype" : "GridPanel",
        "fitContainer" : true,
@@ -86,9 +87,9 @@
        "items" : [
         {
          "listeners" : {
+          "cellclick" : "function (_self, row, col, e)\n{\n     var di = _this.grid.colModel.getDataIndex(col);\n     \n     var rec = _this.grid.ds.getAt(row);\n     \n     \n     if (di == 'item_active') {\n     \n        var nv = rec.data.item_active ? 0 : 1;\n        new Pman.Request({\n            mask : 'Saving',\n            url : baseURL + '/Roo/Item',\n            params : {\n                item_id : rec.data.item_id,\n                item_active : nv\n            },\n            success : function() {\n                rec.set('item_active', nv);\n            }\n        });\n        return;\n        \n     \n     }\n     \n     if(di == 'itemsrc_active'){\n     \n     \n     \n\n        if(rec.data.itemsrc_active * 1){\n            Roo.MessageBox.confirm(\"Confirm\", \"Are you sure this product is no longer purchased\",\n                function (res) {\n                    if(res!='yes') {\n                        return;\n                    }\n                    rec.set('itemsrc_active', 0);\n                    rec.commit();\n            });\n            return;\n        }\n        \n        Pman.Dialog.XtupleItem.show( { item_id : rec.data.item_id } , function() {\n            _this.grid.footer.onClick('first');\n       }); \n       return;\n        \n    }\n     \n     _this.locgrid.footer.onClick('first');\n     \n     \n     \n     \n}",
           "celldblclick" : "function (_self, rowIndex, columnIndex, e)\n{\n    var s = _this.grid.ds.getAt(rowIndex);\n    \n    Pman.Dialog.XtupleItem.show( { item_id : s.data.item_id } , function() {\n        _this.grid.footer.onClick('first');\n   }); \n}",
           "|render" : "function() \n{\n    _this.grid = this; \n    //_this.dialog = Pman.Dialog.FILL_IN\n    if (_this.panel.active) {\n       this.footer.onClick('first');\n    }\n}",
-          "cellclick" : "function (_self, row, col, e)\n{\n     var di = _this.grid.colModel.getDataIndex(col);\n     \n     var rec = _this.grid.ds.getAt(row);\n     \n     \n     if (di == 'item_active') {\n     \n        var nv = rec.data.item_active ? 0 : 1;\n        new Pman.Request({\n            mask : 'Saving',\n            url : baseURL + '/Roo/Item',\n            params : {\n                item_id : rec.data.item_id,\n                item_active : nv\n            },\n            success : function() {\n                rec.set('item_active', nv);\n            }\n        });\n        return;\n        \n     \n     }\n     \n     if(di == 'itemsrc_active'){\n     \n     \n     \n\n        if(rec.data.itemsrc_active * 1){\n            Roo.MessageBox.confirm(\"Confirm\", \"Are you sure this product is no longer purchased\",\n                function (res) {\n                    if(res!='yes') {\n                        return;\n                    }\n                    rec.set('itemsrc_active', 0);\n                    rec.commit();\n            });\n            return;\n        }\n        \n        Pman.Dialog.XtupleItem.show( { item_id : rec.data.item_id } , function() {\n            _this.grid.footer.onClick('first');\n       }); \n       return;\n        \n    }\n     \n     _this.locgrid.footer.onClick('first');\n     \n     \n     \n     \n}",
           "afteredit" : "function (e)\n{\n    \n    \n    Roo.log(e);\n    new Pman.Request({\n        url : baseURL +'/Roo/Charass',\n        params : {\n             charass_char_id_char_name : e.field.replace(/^item_char_/,'').toUpperCase(),\n             charass_value : e.value,\n             charass_target_type : 'I',\n             charass_default : 1,\n             charass_target_id : e.record.data.item_id\n         },\n         method : 'POST'\n     });\n    \n    \n    e.record.commit();\n    \n    \n    \n}"
          },
          "autoExpandColumn" : "item_descrip1",
            "items" : [
             {
              "$ url" : "baseURL + '/Roo/item.php'",
-             "xtype" : "HttpProxy",
              "method" : "GET",
+             "xtype" : "HttpProxy",
              "$ xns" : "Roo.data",
              "* prop" : "proxy"
             },
                "items" : [
                 {
                  "$ url" : "baseURL + '/Roo/Charass.php'",
-                 "method" : "GET",
                  "xtype" : "HttpProxy",
+                 "method" : "GET",
                  "$ xns" : "Roo.data",
                  "* prop" : "proxy"
                 },
               "render" : "function (_self)\n{\n    _this.dateFrom = _self;\n}"
              },
              "format" : "d/M/Y",
-             "useIso" : true,
              "xtype" : "DateField",
+             "useIso" : true,
              "| value" : "(function() { return (new Date()).format('Y') + '-01-01'; })()",
              "$ xns" : "Roo.form"
             },
                  "items" : [
                   {
                    "$ url" : "baseURL + '/Roo/Charass.php'",
-                   "method" : "GET",
                    "xtype" : "HttpProxy",
+                   "method" : "GET",
                    "$ xns" : "Roo.data",
                    "* prop" : "proxy"
                   },
                  "items" : [
                   {
                    "$ url" : "baseURL + '/Roo/Charass.php'",
-                   "method" : "GET",
                    "xtype" : "HttpProxy",
+                   "method" : "GET",
                    "$ xns" : "Roo.data",
                    "* prop" : "proxy"
                   },
           },
           {
            "xtype" : "ColumnModel",
-           "width" : 100,
            "header" : "Item prodcat",
+           "width" : 100,
            "$ renderer" : "function(v,x,r) { \n    return String.format('{0}/{1}', r.data.item_type, v); \n    }",
            "$ xns" : "Roo.grid",
            "* prop" : "colModel[]",
        "listeners" : {
         "|activate" : "function() {\n    _this.locpanel = this;\n \n}"
        },
+       "background" : true,
        "region" : "east",
        "fitToframe" : true,
-       "background" : true,
        "title" : "itemloc",
        "xtype" : "GridPanel",
        "fitContainer" : true,
            "items" : [
             {
              "$ url" : "baseURL + '/Roo/location.php'",
-             "method" : "GET",
              "xtype" : "HttpProxy",
+             "method" : "GET",
              "$ xns" : "Roo.data",
              "* prop" : "proxy"
             },
           },
           {
            "xtype" : "ColumnModel",
-           "width" : 75,
            "header" : "Location",
+           "width" : 75,
            "$ renderer" : "function(v) { return String.format('{0}', v); }",
            "$ xns" : "Roo.grid",
            "* prop" : "colModel[]",
           },
           {
            "xtype" : "ColumnModel",
-           "width" : 75,
            "header" : "Itemloc qty",
+           "width" : 75,
            "$ renderer" : "function(v) { return String.format('{0}', v*1 ? (v*1).toFixed(0) : ''); }",
            "$ xns" : "Roo.grid",
            "* prop" : "colModel[]",