Pman.Dialog.XtupleItem.bjs
authorEdward <edward@roojs.com>
Fri, 21 Aug 2015 09:40:23 +0000 (17:40 +0800)
committerEdward <edward@roojs.com>
Fri, 21 Aug 2015 09:40:23 +0000 (17:40 +0800)
Pman.Dialog.XtupleItem.js

Pman.Dialog.XtupleItem.bjs
Pman.Dialog.XtupleItem.js

index 2540d83..fd9f018 100644 (file)
@@ -6,17 +6,21 @@
  "permname" : "",
  "modOrder" : "001",
  "strings" : {
-  "be53a0541a6d36f6ecb879fa2c584b08" : "Image",
   "346577d22bb510368e3eddab5df2ca13" : "Reference Files",
+  "be53a0541a6d36f6ecb879fa2c584b08" : "Image",
+  "92b17d3d0f13232ec1d46844c836d4db" : "Invoice UOM",
+  "390fc24b0feebfff8c3fb8625418c2e9" : "Perishable",
   "f2a6c498fb90ee345d997f888fce3b18" : "Delete",
   "956e816fa19ca04485c7101adbe07762" : "Displaying records {0} - {1} of {2}",
+  "69395719de41dd8a31905b1e94c91816" : "Select classcode",
   "82a43f89af6d331d80d441624c5c71fa" : "Default Location",
   "538a3c9d82a4ea4250b987a357d41184" : "Item Parts",
-  "69395719de41dd8a31905b1e94c91816" : "Select classcode",
   "03ab340b3f99e03cff9e84314ead38c0" : "Qty",
   "5b8c99dad1893a85076709b2d3c2d2d0" : "IP Address",
+  "fce71ab09b7795157c6e23370b4afb26" : "Stocked",
   "045a1ac263ac3a9b7420208bdc2df423" : "Select costcat",
   "0c81971f67c0bd4b33799c5365ec2bf5" : "No Images found",
+  "a1fa27779242b4902f7ae3bdd5c6d508" : "Type",
   "151ccf95db9b81c11bb20fbc302af4b6" : "Select terms",
   "786410e93beb0193d89f8608c54feb4b" : "Select item",
   "0ac9012a8c03a76ee76f04321b3b7fda" : "Lead time",
   "dd24f967299e81b9603cb071693d5c32" : "Select vendinfo",
   "023a5dfa857c4aa0156e6685231a1dbd" : "Select Type",
   "e8586011952b0d098b0e568f20ca2b1f" : "Select Currency",
+  "9bd81329febf6efe22788e03ddeaf0af" : "Class",
   "8413c683b4b27cc3f4dbd4c90329d8ba" : "Comments",
   "820dbd2b8f606aff866c0bbfb6b737c1" : "Changed",
-  "0eceeb45861f9585dd7a97a3e36f85c6" : "Created",
   "ec211f7c20af43e742bf2570c3cb84f9" : "Add",
-  "9076cbba1d9ef79280b4f39e2aa0d115" : "Nothing found",
+  "0eceeb45861f9585dd7a97a3e36f85c6" : "Created",
   "386c339d37e737a436499d423a77df0c" : "Currency",
+  "9076cbba1d9ef79280b4f39e2aa0d115" : "Nothing found",
   "1243daf593fa297e07ab03bf06d925af" : "Searching...",
+  "6df5afb79e960381ed66568c2a644ec6" : "Description (2)",
   "7be1fa478799242847d4ef861ff6f8e1" : "Min Qty",
+  "6665e3761028c84e1d228de3432229ed" : "SKU",
+  "e54f1b41d200adbd96eb53634388d780" : "Sales Account",
   "76729937a5eb6b0fd88c42581161facd" : "Select Category",
+  "eccd13e2f1acfd6b8412a2caafa37a80" : "Stock Safety Level",
+  "43b2683180fe5e67a91696c834df0a32" : "Reorder Level",
+  "e1a8f447925ed2867c591aa0865d170e" : "Multi Location",
+  "7d74f3b92b19da5e606d737d339a9679" : "Item",
+  "2ea154449c00001e87af8df7c0728678" : "Control Method",
   "19df363d15888baa395364fbcd230c05" : "No itemsrc found",
-  "49ee3087348e8d44e1feda1917443987" : "Name",
   "0d122b17933ab4173e9d75d55fc5e764" : "Standard Cost",
   "df2ad52a14d681b1cd8495f8650fdb56" : "Select prodcat",
+  "49ee3087348e8d44e1feda1917443987" : "Name",
   "e5353fc67b122d1b42181073b46cd060" : "Vendor Ref#",
   "c19ea8f7a11074ac743c58d34830b233" : "Select plancode",
   "ea4788705e6873b424c65e91c2846b19" : "Cancel",
+  "c056b1456660ea65aad6dfc664002b84" : "Item active",
+  "9d98e31f261471f426e906282544c15d" : "Item comments",
   "20f39d1311ccbd3b7e61cdd4978719f9" : "Itemsite Settings",
   "1656a671ba692e15836cd85df374556c" : "Price List",
   "bb8913cd17d59f182acc7be1020007b7" : "UOM",
+  "f9c68217f6ef9a9afe7575e766bd7b9f" : "Planner Code",
   "76d5bf9597c882d6513f71759df298d5" : "Displaying parts {0} - {1} of {2}",
   "3601146c4e948c32b6424d2c0a7f0118" : "Price",
   "1814d65a76028fdfbadab64a5a8076df" : "Suppliers",
   "90e4ac2e5a22e53df63b6b186d8727ba" : "No Events found",
   "4ee972120bcda675f75222c87cb9d356" : "Who",
   "16d2b386b2034b9488996466aaae0b57" : "History",
+  "14fc4f0a5008e1d8d5645071755c596b" : "Price UOM",
   "089ba2b5edc96565fc22c584ecfbb1a6" : "Displaying events{0} - {1} of {2}",
   "b5a7adde1af5c87d7fd797b6245c2a39" : "Description",
+  "148cb4c3e6469c6a92d24951485b65ff" : "Item listprice",
+  "c96bc98500430b5eb8e9cfc5959e09b5" : "Item sold",
   "7f841b4d2f7280eb82318988c6d649d1" : "Displaying itemsrc{0} - {1} of {2}",
-  "c0ed345ec857c06b31f7e88745c9bc40" : "Displaying Images  {0} - {1} of {2}",
   "a254c25adc7d10d7e9c4889484f875a5" : "Detail",
+  "5aa275a71868f3afcacfd6de452b07eb" : "Costcat",
+  "c0ed345ec857c06b31f7e88745c9bc40" : "Displaying Images  {0} - {1} of {2}",
   "c9cc8cce247e49bae79f15173ce97354" : "Save",
+  "6abc7326bcd435c1eb22ad3714db48c4" : "Lead time (Days)",
   "ec9ceefe0c19f4c029008c23e3c947b7" : "Vendor",
   "4d3d769b812b6faa6b76e1a8abaece2d" : "Active",
   "004bf6c9a40003140292e97330236c53" : "Action",
+  "689202409e48743b914713f96d93947c" : "Value",
   "f4c6f851b00d5518bf888815de279aba" : "Notes",
+  "10991ea03e3591bebc4c0827fc369540" : "Product Category",
   "f9838de820f2a2e16241033270c68e29" : "Select uom",
+  "8c489d0946f66d17d73f26366a4bf620" : "Weight",
+  "d85a8a381c36f6dde21d81542830e2b1" : "Sold",
   "1063e38cb53d94d386f21227fcd84717" : "Remove",
   "7996af9149ed376ce252e35c4da7146b" : "Select Vendor"
  },
     },
     {
      "region" : "center",
-     "title" : "Detail",
      "xtype" : "ContentPanel",
+     "title" : "Detail",
      "$ xns" : "Roo",
      "items" : [
       {
         "|rendered" : "function (form)\n{\n    _this.form= form;\n}\n"
        },
        "$ url" : "baseURL + '/Roo/item.php'",
-       "method" : "POST",
        "style" : "margin:10px;",
+       "method" : "POST",
        "xtype" : "Form",
        "labelWidth" : 120,
        "$ xns" : "Roo.form",
              "items" : [
               {
                "$ url" : "baseURL + '/Roo/classcode.php'",
-               "method" : "GET",
                "xtype" : "HttpProxy",
+               "method" : "GET",
                "$ xns" : "Roo.data",
                "* prop" : "proxy"
               },
              "items" : [
               {
                "$ url" : "baseURL + '/Roo/uom.php'",
-               "method" : "GET",
                "xtype" : "HttpProxy",
+               "method" : "GET",
                "$ xns" : "Roo.data",
                "* prop" : "proxy"
               },
              "items" : [
               {
                "$ url" : "baseURL + '/Roo/uom.php'",
-               "xtype" : "HttpProxy",
                "method" : "GET",
+               "xtype" : "HttpProxy",
                "$ xns" : "Roo.data",
                "* prop" : "proxy"
               },
              "items" : [
               {
                "$ url" : "baseURL + '/Roo/prodcat.php'",
-               "xtype" : "HttpProxy",
                "method" : "GET",
+               "xtype" : "HttpProxy",
                "$ xns" : "Roo.data",
                "* prop" : "proxy"
               },
            "listeners" : {
             "render" : "function (_self)\n{\n    _this.standardCostFieldSet = _self;\n}"
            },
+           "legend" : "Standard Cost",
            "style" : "width:320px",
            "xtype" : "FieldSet",
-           "legend" : "Standard Cost",
            "$ xns" : "Roo.form",
            "items" : [
             {
                "items" : [
                 {
                  "$ url" : "baseURL + '/Roo/curr_symbol.php'",
-                 "xtype" : "HttpProxy",
                  "method" : "GET",
+                 "xtype" : "HttpProxy",
                  "$ xns" : "Roo.data",
                  "* prop" : "proxy"
                 },
                "items" : [
                 {
                  "$ url" : "baseURL + '/Roo/plancode.php'",
-                 "xtype" : "HttpProxy",
                  "method" : "GET",
+                 "xtype" : "HttpProxy",
                  "$ xns" : "Roo.data",
                  "* prop" : "proxy"
                 },
                "items" : [
                 {
                  "$ url" : "baseURL + '/Roo/costcat.php'",
-                 "xtype" : "HttpProxy",
                  "method" : "GET",
+                 "xtype" : "HttpProxy",
                  "$ xns" : "Roo.data",
                  "* prop" : "proxy"
                 },
                "items" : [
                 {
                  "$ url" : "baseURL + '/Roo/location.php'",
-                 "method" : "GET",
                  "xtype" : "HttpProxy",
+                 "method" : "GET",
                  "$ xns" : "Roo.data",
                  "* prop" : "proxy"
                 },
         },
         {
          "xtype" : "Hidden",
-         "$ xns" : "Roo.form",
          "width" : 75,
+         "$ xns" : "Roo.form",
          "name" : "item_id"
         }
        ]
      "listeners" : {
       "|activate" : "function() {\n    _this.partspanel = this;\n    \n    try { if (MODULE.isBuilder) {\n        return;\n    } } catch(e) { }\n    \n    var id = _this.form.findField('item_id').getValue() * 1;\n    if (id < 1) {\n        Roo.MessageBox.alert(\"Save First\", \"Save the item first, before adding parts\");\n        _this.dialog.layout.getRegion('center').showPanel(0);\n        return;\n    }\n    \n    var type = _this.form.findField('item_type').getValue();\n    \n    if(!type.length || type != 'K'){\n        Roo.MessageBox.alert(\"Error\", \"Can't add parts to non-kit item\");\n        _this.dialog.layout.getRegion('center').showPanel(0);\n        return;\n    }\n    \n    if (_this.partsgrid) {\n        _this.partsgrid.footer.onClick('first');\n    \n     }\n}"
      },
+     "fitToframe" : true,
      "background" : true,
      "region" : "center",
-     "fitToframe" : true,
      "title" : "Item Parts",
      "xtype" : "GridPanel",
      "fitContainer" : true,
              "items" : [
               {
                "$ url" : "baseURL + '/Roo/item.php'",
-               "method" : "GET",
                "xtype" : "HttpProxy",
+               "method" : "GET",
                "$ xns" : "Roo.data",
                "* prop" : "proxy"
               },
          "items" : [
           {
            "$ url" : "baseURL + '/Roo/bomitem.php'",
-           "xtype" : "HttpProxy",
            "method" : "GET",
+           "xtype" : "HttpProxy",
            "$ xns" : "Roo.data",
            "* prop" : "proxy"
           },
         },
         {
          "xtype" : "ColumnModel",
-         "header" : "Name",
          "width" : 150,
+         "header" : "Name",
          "$ renderer" : "function(v) { return String.format('{0}', v); }",
          "$ xns" : "Roo.grid",
          "* prop" : "colModel[]",
         },
         {
          "xtype" : "ColumnModel",
-         "header" : "Description",
          "width" : 150,
+         "header" : "Description",
          "$ renderer" : "function(v) { return String.format('{0}', v); }",
          "$ xns" : "Roo.grid",
          "* prop" : "colModel[]",
      "listeners" : {
       "|activate" : "function() {\n    _this.panel = this;\n    \n    try { if (MODULE.isBuilder) {\n        return;\n    } } catch(e) { }\n    \n    var id = _this.form.findField('item_id').getValue() * 1;\n    if (id < 1) {\n        Roo.MessageBox.alert(\"Save First\", \"Save the item first, before adding image\");\n        _this.dialog.layout.getRegion('center').showPanel(0);\n        return;\n    }\n    \n    if (_this.grid) {\n        _this.grid.footer.onClick('first');\n    \n     }\n}"
      },
+     "background" : true,
      "region" : "center",
      "fitToframe" : true,
-     "background" : true,
      "title" : "Reference Files",
      "xtype" : "GridPanel",
      "fitContainer" : true,
           },
           {
            "$ url" : "baseURL + '/Roo/Images.php'",
-           "xtype" : "HttpProxy",
            "method" : "GET",
+           "xtype" : "HttpProxy",
            "$ xns" : "Roo.data",
            "* prop" : "proxy"
           }
         },
         {
          "xtype" : "ColumnModel",
-         "width" : 100,
          "header" : "Image",
+         "width" : 100,
          "$ renderer" : "function(v,x,r) { return String.format('<img src=\"{0}/Images/Thumb/100/{1}/{2}\" height=\"100\">', baseURL, v, r.data.filename); }",
          "$ xns" : "Roo.grid",
          "* prop" : "colModel[]",
      "listeners" : {
       "|activate" : "function() {\n    _this.lpanel = this;\n    \n    try { if (MODULE.isBuilder) {\n        return;\n    } } catch(e) { }\n    \n    var id = _this.form.findField('item_id').getValue() * 1;\n    if (id < 1) {\n        Roo.MessageBox.alert(\"Save First\", \"Save the item first, before adding image\");\n        _this.dialog.layout.getRegion('center').showPanel(0);\n        return;\n    }\n    \n    if (_this.lgrid) {\n        _this.lgrid.footer.onClick('first');\n    \n     }\n}"
      },
+     "background" : true,
      "region" : "center",
      "fitToframe" : true,
-     "background" : true,
      "title" : "Price List",
      "xtype" : "GridPanel",
      "fitContainer" : true,
          "items" : [
           {
            "$ url" : "baseURL + '/Roo/ipshead.php'",
-           "method" : "GET",
            "xtype" : "HttpProxy",
+           "method" : "GET",
            "$ xns" : "Roo.data",
            "* prop" : "proxy"
           },
         },
         {
          "xtype" : "ColumnModel",
-         "width" : 150,
          "header" : "Name",
+         "width" : 150,
          "$ renderer" : "function(v) { return String.format('{0}', v); }",
          "$ xns" : "Roo.grid",
          "* prop" : "colModel[]",
         },
         {
          "xtype" : "ColumnModel",
-         "width" : 150,
          "header" : "Description",
+         "width" : 150,
          "$ renderer" : "function(v) { return String.format('{0}', v); }",
          "$ xns" : "Roo.grid",
          "* prop" : "colModel[]",
         },
         {
          "xtype" : "ColumnModel",
-         "width" : 100,
          "header" : "Currency",
+         "width" : 100,
          "$ renderer" : "function(v) { return String.format('{0}', v); }",
          "$ xns" : "Roo.grid",
          "* prop" : "colModel[]",
      "listeners" : {
       "|activate" : "function() {\n    _this.itemsrcpanel = this;\n    \n    try { if (MODULE.isBuilder) {\n        return;\n    } } catch(e) { }\n    \n    var id = _this.form.findField('item_id').getValue() * 1;\n    if (id < 1) {\n        Roo.MessageBox.alert(\"Save First\", \"Save the item first, before adding suppliers\");\n        _this.dialog.layout.getRegion('center').showPanel(0);\n        return false;\n    }\n    \n    var type = _this.form.findField('item_type').getValue();\n    \n    if(type == 'K'){\n        Roo.MessageBox.alert(\"Error\", \"Can't add suppliers to kit item\");\n        _this.dialog.layout.getRegion('center').showPanel(0);\n        return false;\n    }\n    \n    if (_this.itemsrcgrid) {\n        _this.itemsrcgrid.footer.onClick('first');\n    }\n}"
      },
+     "background" : true,
      "region" : "center",
      "fitToframe" : true,
-     "background" : true,
      "title" : "Suppliers",
      "xtype" : "GridPanel",
      "fitContainer" : true,
          "items" : [
           {
            "$ url" : "baseURL + '/Roo/itemsrc.php'",
-           "xtype" : "HttpProxy",
            "method" : "GET",
+           "xtype" : "HttpProxy",
            "$ xns" : "Roo.data",
            "* prop" : "proxy"
           },
         },
         {
          "xtype" : "ColumnModel",
-         "width" : 120,
          "header" : "Vendor",
+         "width" : 120,
          "$ renderer" : "function(v,x,r) { return String.format('{0}', r.data.itemsrc_vend_id_vend_name); }",
          "$ xns" : "Roo.grid",
          "* prop" : "colModel[]",
                "items" : [
                 {
                  "$ url" : "baseURL + '/Roo/vendinfo.php'",
-                 "xtype" : "HttpProxy",
                  "method" : "GET",
+                 "xtype" : "HttpProxy",
                  "$ xns" : "Roo.data",
                  "* prop" : "proxy"
                 },
         },
         {
          "xtype" : "ColumnModel",
-         "width" : 100,
          "header" : "Vendor Ref#",
+         "width" : 100,
          "$ renderer" : "function(v) { return String.format('{0}', v); }",
          "$ xns" : "Roo.grid",
          "* prop" : "colModel[]",
         },
         {
          "xtype" : "ColumnModel",
-         "width" : 200,
          "header" : "Comments",
+         "width" : 200,
          "$ renderer" : "function(v) { return String.format('{0}', v); }",
          "$ xns" : "Roo.grid",
          "* prop" : "colModel[]",
         },
         {
          "xtype" : "ColumnModel",
-         "width" : 50,
          "header" : "UOM",
+         "width" : 50,
          "$ renderer" : "function(v) { return String.format('{0}', v); }",
          "$ xns" : "Roo.grid",
          "* prop" : "colModel[]",
         },
         {
          "xtype" : "ColumnModel",
-         "width" : 50,
          "header" : "Active",
+         "width" : 50,
          "$ renderer" : "function(v) { return String.format('{0}', v); }",
          "$ xns" : "Roo.grid",
          "* prop" : "colModel[]",
      "listeners" : {
       "|activate" : "function() {\n    _this.hpanel = this;\n    if (_this.hgrid) {\n        _this.hgrid.footer.onClick('first');\n    }\n}"
      },
+     "background" : true,
      "region" : "center",
      "fitToframe" : true,
-     "background" : true,
      "title" : "History",
      "xtype" : "GridPanel",
      "fitContainer" : true,
          "items" : [
           {
            "$ url" : "baseURL + '/Roo/events.php'",
-           "method" : "GET",
            "xtype" : "HttpProxy",
+           "method" : "GET",
            "$ xns" : "Roo.data",
            "* prop" : "proxy"
           },
         },
         {
          "xtype" : "ColumnModel",
-         "width" : 120,
          "header" : "Changed",
+         "width" : 120,
          "$ renderer" : "function(v) { return String.format('{0}', v ? v.format('d/M/Y H:i:s') : ''); }",
          "$ xns" : "Roo.grid",
          "* prop" : "colModel[]",
         },
         {
          "xtype" : "ColumnModel",
-         "width" : 200,
          "header" : "Action",
+         "width" : 200,
          "$ renderer" : "function(v,x,r) { return String.format('{0} - {1}', v, r.data.on_table); }",
          "$ xns" : "Roo.grid",
          "* prop" : "colModel[]",
         },
         {
          "xtype" : "ColumnModel",
-         "width" : 200,
          "header" : "IP Address",
+         "width" : 200,
          "$ renderer" : "function(v) { return String.format('{0}', v); }",
          "$ xns" : "Roo.grid",
          "* prop" : "colModel[]",
         },
         {
          "xtype" : "ColumnModel",
-         "width" : 75,
          "header" : "Who",
+         "width" : 75,
          "$ renderer" : "function(v) { return String.format('{0}', v); }",
          "$ xns" : "Roo.grid",
          "* prop" : "colModel[]",
         },
         {
          "xtype" : "ColumnModel",
-         "width" : 200,
          "header" : "Notes",
+         "width" : 200,
          "$ renderer" : "function(v) { return String.format('{0}', v); }",
          "$ xns" : "Roo.grid",
          "* prop" : "colModel[]",
index 3735395..2d82338 100644 (file)
@@ -7,17 +7,21 @@ Roo.namespace('Pman.Dialog');
 Pman.Dialog.XtupleItem = {
 
  _strings : {
-  'be53a0541a6d36f6ecb879fa2c584b08' :"Image",
   '346577d22bb510368e3eddab5df2ca13' :"Reference Files",
+  'be53a0541a6d36f6ecb879fa2c584b08' :"Image",
+  '92b17d3d0f13232ec1d46844c836d4db' :"Invoice UOM",
+  '390fc24b0feebfff8c3fb8625418c2e9' :"Perishable",
   'f2a6c498fb90ee345d997f888fce3b18' :"Delete",
   '956e816fa19ca04485c7101adbe07762' :"Displaying records {0} - {1} of {2}",
+  '69395719de41dd8a31905b1e94c91816' :"Select classcode",
   '82a43f89af6d331d80d441624c5c71fa' :"Default Location",
   '538a3c9d82a4ea4250b987a357d41184' :"Item Parts",
-  '69395719de41dd8a31905b1e94c91816' :"Select classcode",
   '03ab340b3f99e03cff9e84314ead38c0' :"Qty",
   '5b8c99dad1893a85076709b2d3c2d2d0' :"IP Address",
+  'fce71ab09b7795157c6e23370b4afb26' :"Stocked",
   '045a1ac263ac3a9b7420208bdc2df423' :"Select costcat",
   '0c81971f67c0bd4b33799c5365ec2bf5' :"No Images found",
+  'a1fa27779242b4902f7ae3bdd5c6d508' :"Type",
   '151ccf95db9b81c11bb20fbc302af4b6' :"Select terms",
   '786410e93beb0193d89f8608c54feb4b' :"Select item",
   '0ac9012a8c03a76ee76f04321b3b7fda' :"Lead time",
@@ -25,42 +29,63 @@ Pman.Dialog.XtupleItem = {
   'dd24f967299e81b9603cb071693d5c32' :"Select vendinfo",
   '023a5dfa857c4aa0156e6685231a1dbd' :"Select Type",
   'e8586011952b0d098b0e568f20ca2b1f' :"Select Currency",
+  '9bd81329febf6efe22788e03ddeaf0af' :"Class",
   '8413c683b4b27cc3f4dbd4c90329d8ba' :"Comments",
   '820dbd2b8f606aff866c0bbfb6b737c1' :"Changed",
-  '0eceeb45861f9585dd7a97a3e36f85c6' :"Created",
   'ec211f7c20af43e742bf2570c3cb84f9' :"Add",
-  '9076cbba1d9ef79280b4f39e2aa0d115' :"Nothing found",
+  '0eceeb45861f9585dd7a97a3e36f85c6' :"Created",
   '386c339d37e737a436499d423a77df0c' :"Currency",
+  '9076cbba1d9ef79280b4f39e2aa0d115' :"Nothing found",
   '1243daf593fa297e07ab03bf06d925af' :"Searching...",
+  '6df5afb79e960381ed66568c2a644ec6' :"Description (2)",
   '7be1fa478799242847d4ef861ff6f8e1' :"Min Qty",
+  '6665e3761028c84e1d228de3432229ed' :"SKU",
+  'e54f1b41d200adbd96eb53634388d780' :"Sales Account",
   '76729937a5eb6b0fd88c42581161facd' :"Select Category",
+  'eccd13e2f1acfd6b8412a2caafa37a80' :"Stock Safety Level",
+  '43b2683180fe5e67a91696c834df0a32' :"Reorder Level",
+  'e1a8f447925ed2867c591aa0865d170e' :"Multi Location",
+  '7d74f3b92b19da5e606d737d339a9679' :"Item",
+  '2ea154449c00001e87af8df7c0728678' :"Control Method",
   '19df363d15888baa395364fbcd230c05' :"No itemsrc found",
-  '49ee3087348e8d44e1feda1917443987' :"Name",
   '0d122b17933ab4173e9d75d55fc5e764' :"Standard Cost",
   'df2ad52a14d681b1cd8495f8650fdb56' :"Select prodcat",
+  '49ee3087348e8d44e1feda1917443987' :"Name",
   'e5353fc67b122d1b42181073b46cd060' :"Vendor Ref#",
   'c19ea8f7a11074ac743c58d34830b233' :"Select plancode",
   'ea4788705e6873b424c65e91c2846b19' :"Cancel",
+  'c056b1456660ea65aad6dfc664002b84' :"Item active",
+  '9d98e31f261471f426e906282544c15d' :"Item comments",
   '20f39d1311ccbd3b7e61cdd4978719f9' :"Itemsite Settings",
   '1656a671ba692e15836cd85df374556c' :"Price List",
   'bb8913cd17d59f182acc7be1020007b7' :"UOM",
+  'f9c68217f6ef9a9afe7575e766bd7b9f' :"Planner Code",
   '76d5bf9597c882d6513f71759df298d5' :"Displaying parts {0} - {1} of {2}",
   '3601146c4e948c32b6424d2c0a7f0118' :"Price",
   '1814d65a76028fdfbadab64a5a8076df' :"Suppliers",
   '90e4ac2e5a22e53df63b6b186d8727ba' :"No Events found",
   '4ee972120bcda675f75222c87cb9d356' :"Who",
   '16d2b386b2034b9488996466aaae0b57' :"History",
+  '14fc4f0a5008e1d8d5645071755c596b' :"Price UOM",
   '089ba2b5edc96565fc22c584ecfbb1a6' :"Displaying events{0} - {1} of {2}",
   'b5a7adde1af5c87d7fd797b6245c2a39' :"Description",
+  '148cb4c3e6469c6a92d24951485b65ff' :"Item listprice",
+  'c96bc98500430b5eb8e9cfc5959e09b5' :"Item sold",
   '7f841b4d2f7280eb82318988c6d649d1' :"Displaying itemsrc{0} - {1} of {2}",
-  'c0ed345ec857c06b31f7e88745c9bc40' :"Displaying Images  {0} - {1} of {2}",
   'a254c25adc7d10d7e9c4889484f875a5' :"Detail",
+  '5aa275a71868f3afcacfd6de452b07eb' :"Costcat",
+  'c0ed345ec857c06b31f7e88745c9bc40' :"Displaying Images  {0} - {1} of {2}",
   'c9cc8cce247e49bae79f15173ce97354' :"Save",
+  '6abc7326bcd435c1eb22ad3714db48c4' :"Lead time (Days)",
   'ec9ceefe0c19f4c029008c23e3c947b7' :"Vendor",
   '4d3d769b812b6faa6b76e1a8abaece2d' :"Active",
   '004bf6c9a40003140292e97330236c53' :"Action",
+  '689202409e48743b914713f96d93947c' :"Value",
   'f4c6f851b00d5518bf888815de279aba' :"Notes",
+  '10991ea03e3591bebc4c0827fc369540' :"Product Category",
   'f9838de820f2a2e16241033270c68e29' :"Select uom",
+  '8c489d0946f66d17d73f26366a4bf620' :"Weight",
+  'd85a8a381c36f6dde21d81542830e2b1' :"Sold",
   '1063e38cb53d94d386f21227fcd84717' :"Remove",
   '7996af9149ed376ce252e35c4da7146b' :"Select Vendor"
  },
@@ -89,79 +114,79 @@ Pman.Dialog.XtupleItem = {
  {
    var _this = this;
    this.dialog = Roo.factory({
-    center : {
-     '|xns' : 'Roo',
-     alwaysShowTabs : true,
-     tabPosition : 'top',
-     xns : Roo,
-     xtype : 'LayoutRegion'
-    },
-    '|xns' : 'Roo',
     closable : false,
     collapsible : false,
     height : 550,
     modal : true,
     resizable : false,
-    title : _this._strings['675c9bd3bbae30af03fe74346dcae9a7'],
+    title : _this._strings['675c9bd3bbae30af03fe74346dcae9a7'] /* Edit / Create item */,
     width : 800,
     xns : Roo,
+    '|xns' : 'Roo',
     xtype : 'LayoutDialog',
-    buttons : [
-      {
-       '|xns' : 'Roo',
-       text : _this._strings['ea4788705e6873b424c65e91c2846b19'],
-       xns : Roo,
-       xtype : 'Button',
-       listeners : {
-        click : function (_self, e)
-         {
-             _this.dialog.hide();
-         }
-       }
-      },
-{
-       '|xns' : 'Roo',
-       text : _this._strings['c9cc8cce247e49bae79f15173ce97354'],
-       xns : Roo,
-       xtype : 'Button',
-       listeners : {
-        click : function (_self, e)
-         {
-             // do some checks?
-              
-             
-           //  _this.dialog.el.mask("Saving");
-             _this.form.doAction("submit");
-         
-         },
-        render : function (_self)
-         {
-             _this.saveBtn = this;
-         }
-       }
-      }
-    ],
     listeners : {
      show : function (_self)
       {
            _this.dialog.layout.getRegion('center').showPanel(0);
       }
     },
-    items : [
+    center : {
+     alwaysShowTabs : true,
+     tabPosition : 'top',
+     xns : Roo,
+     '|xns' : 'Roo',
+     xtype : 'LayoutRegion'
+    },
+    buttons : [
+     {
+      text : _this._strings['ea4788705e6873b424c65e91c2846b19'] /* Cancel */,
+      xns : Roo,
+      '|xns' : 'Roo',
+      xtype : 'Button',
+      listeners : {
+       click : function (_self, e)
+        {
+            _this.dialog.hide();
+        }
+      }
+     },
      {
+      text : _this._strings['c9cc8cce247e49bae79f15173ce97354'] /* Save */,
+      xns : Roo,
       '|xns' : 'Roo',
+      xtype : 'Button',
+      listeners : {
+       click : function (_self, e)
+        {
+            // do some checks?
+             
+            
+          //  _this.dialog.el.mask("Saving");
+            _this.form.doAction("submit");
+        
+        },
+       render : function (_self)
+        {
+            _this.saveBtn = this;
+        }
+      }
+     }
+    ],
+    items  : [
+     {
       region : 'center',
-      title : _this._strings['a254c25adc7d10d7e9c4889484f875a5'],
+      title : _this._strings['a254c25adc7d10d7e9c4889484f875a5'] /* Detail */,
       xns : Roo,
+      '|xns' : 'Roo',
       xtype : 'ContentPanel',
-      items : [
+      items  : [
        {
-        '|xns' : 'Roo.form',
         labelWidth : 120,
         method : 'POST',
         style : 'margin:10px;',
         url : baseURL + '/Roo/item.php',
         xns : Roo.form,
+        '|xns' : 'Roo.form',
         xtype : 'Form',
         listeners : {
          actioncomplete : function(_self,action)
@@ -228,56 +253,44 @@ Pman.Dialog.XtupleItem = {
               _this.form= form;
           }
         },
-        items : [
+        items  : [
          {
-          '|xns' : 'Roo.form',
           allowBlank : false,
-          fieldLabel : 'SKU',
+          fieldLabel : _this._strings['6665e3761028c84e1d228de3432229ed'] /* SKU */,
           name : 'item_number',
           width : 200,
           xns : Roo.form,
+          '|xns' : 'Roo.form',
           xtype : 'TextField'
          },
          {
-          '|xns' : 'Roo.form',
-          fieldLabel : 'Description',
+          fieldLabel : _this._strings['b5a7adde1af5c87d7fd797b6245c2a39'] /* Description */,
           name : 'item_descrip1',
           width : 400,
           xns : Roo.form,
+          '|xns' : 'Roo.form',
           xtype : 'TextField'
          },
          {
-          '|xns' : 'Roo.form',
-          fieldLabel : 'Description (2)',
+          fieldLabel : _this._strings['6df5afb79e960381ed66568c2a644ec6'] /* Description (2) */,
           name : 'item_descrip2',
           width : 400,
           xns : Roo.form,
+          '|xns' : 'Roo.form',
           xtype : 'TextField'
          },
          {
-          '|xns' : 'Roo.form',
           labelWidth : 120,
           xns : Roo.form,
+          '|xns' : 'Roo.form',
           xtype : 'Column',
-          items : [
+          items  : [
            {
-            store : {
-             '|xns' : 'Roo.data',
-             data : [ 
-                 [ 'P', "Purchased (eg. a standard product)"],
-                 [ 'R' , "Reference (Non-Product)"],
-                 [ 'K', "Kit (made up of products)"]  
-             ],
-             fields : [  'ftype', 'fname'],
-             xns : Roo.data,
-             xtype : 'SimpleStore'
-            },
-            '|xns' : 'Roo.form',
             allowBlank : false,
             displayField : 'fname',
             editable : false,
-            emptyText : _this._strings['023a5dfa857c4aa0156e6685231a1dbd'],
-            fieldLabel : 'Type',
+            emptyText : _this._strings['023a5dfa857c4aa0156e6685231a1dbd'] /* Select Type */,
+            fieldLabel : _this._strings['a1fa27779242b4902f7ae3bdd5c6d508'] /* Type */,
             hiddenName : 'item_type',
             listWidth : 200,
             mode : 'local',
@@ -362,6 +375,7 @@ Pman.Dialog.XtupleItem = {
             valueField : 'ftype',
             width : 200,
             xns : Roo.form,
+            '|xns' : 'Roo.form',
             xtype : 'ComboBox',
             listeners : {
              beforeselect : function (combo, record, index)
@@ -369,59 +383,32 @@ Pman.Dialog.XtupleItem = {
                   (function() { combo.showHide(); }).defer(100);
               }
             },
-            items : [
-
-            ]
-
-           },
-           {
             store : {
-             proxy : {
-              '|xns' : 'Roo.data',
-              method : 'GET',
-              url : baseURL + '/Roo/classcode.php',
-              xns : Roo.data,
-              xtype : 'HttpProxy'
-             },
-             reader : {
-              '|xns' : 'Roo.data',
-              fields : [{"name":"id","type":"int"},{"name":"classcode_code","type":"string"}],
-              id : 'id',
-              root : 'data',
-              totalProperty : 'total',
-              xns : Roo.data,
-              xtype : 'JsonReader'
-             },
-             '|xns' : 'Roo.data',
-             remoteSort : true,
-             sortInfo : { direction : 'ASC', field: 'id' },
+             data : [ 
+                 [ 'P', "Purchased (eg. a standard product)"],
+                 [ 'R' , "Reference (Non-Product)"],
+                 [ 'K', "Kit (made up of products)"]  
+             ],
+             fields : [  'ftype', 'fname'],
              xns : Roo.data,
-             xtype : 'Store',
-             listeners : {
-              beforeload : function (_self, o){
-                   o.params = o.params || {};
-                   // set more here
-               }
-             },
-             items : [
-
-             ]
-
-            },
-            '|xns' : 'Roo.form',
+             '|xns' : 'Roo.data',
+             xtype : 'SimpleStore'
+            }
+           },
+           {
             allowBlank : false,
             displayField : 'classcode_code',
             editable : false,
-            emptyText : _this._strings['69395719de41dd8a31905b1e94c91816'],
-            fieldLabel : 'Class',
+            emptyText : _this._strings['69395719de41dd8a31905b1e94c91816'] /* Select classcode */,
+            fieldLabel : _this._strings['9bd81329febf6efe22788e03ddeaf0af'] /* Class */,
             forceSelection : true,
             hiddenName : 'item_classcode_id',
             listWidth : 400,
-            loadingText : _this._strings['1243daf593fa297e07ab03bf06d925af'],
+            loadingText : _this._strings['1243daf593fa297e07ab03bf06d925af'] /* Searching... */,
             minChars : 2,
             name : 'item_classcode_id_classcode_code',
             pageSize : 20,
-            qtip : _this._strings['69395719de41dd8a31905b1e94c91816'],
+            qtip : _this._strings['69395719de41dd8a31905b1e94c91816'] /* Select classcode */,
             queryParam : '',
             selectOnFocus : true,
             tpl : '<div class=\"x-grid-cell-text x-btn button\"><b>{classcode_code}</b> </div>',
@@ -430,64 +417,52 @@ Pman.Dialog.XtupleItem = {
             valueField : 'classcode_id',
             width : 200,
             xns : Roo.form,
+            '|xns' : 'Roo.form',
             xtype : 'ComboBox',
-            items : [
-
-            ]
-
-           },
-           {
             store : {
+             remoteSort : true,
+             sortInfo : { direction : 'ASC', field: 'id' },
+             xns : Roo.data,
+             '|xns' : 'Roo.data',
+             xtype : 'Store',
+             listeners : {
+              beforeload : function (_self, o){
+                   o.params = o.params || {};
+                   // set more here
+               }
+             },
              proxy : {
-              '|xns' : 'Roo.data',
               method : 'GET',
-              url : baseURL + '/Roo/uom.php',
+              url : baseURL + '/Roo/classcode.php',
               xns : Roo.data,
+              '|xns' : 'Roo.data',
               xtype : 'HttpProxy'
              },
              reader : {
-              '|xns' : 'Roo.data',
-              fields : [
-                  {"name":"id","type":"int"},
-                  {"name":"uom_name","type":"string"},
-                  {"name":"uom_descrip","type":"string"},
-              ],
+              fields : [{"name":"id","type":"int"},{"name":"classcode_code","type":"string"}],
               id : 'id',
               root : 'data',
               totalProperty : 'total',
               xns : Roo.data,
+              '|xns' : 'Roo.data',
               xtype : 'JsonReader'
-             },
-             '|xns' : 'Roo.data',
-             remoteSort : true,
-             sortInfo : { direction : 'ASC', field: 'uom_name' },
-             xns : Roo.data,
-             xtype : 'Store',
-             listeners : {
-              beforeload : function (_self, o){
-                   o.params = o.params || {};
-                   // set more here
-               }
-             },
-             items : [
-
-             ]
-
-            },
-            '|xns' : 'Roo.form',
+             }
+            }
+           },
+           {
             allowBlank : false,
             displayField : 'uom_descrip',
             editable : false,
-            emptyText : _this._strings['f9838de820f2a2e16241033270c68e29'],
-            fieldLabel : 'Invoice UOM',
+            emptyText : _this._strings['f9838de820f2a2e16241033270c68e29'] /* Select uom */,
+            fieldLabel : _this._strings['92b17d3d0f13232ec1d46844c836d4db'] /* Invoice UOM */,
             forceSelection : true,
             hiddenName : 'item_inv_uom_id',
             listWidth : 400,
-            loadingText : _this._strings['1243daf593fa297e07ab03bf06d925af'],
+            loadingText : _this._strings['1243daf593fa297e07ab03bf06d925af'] /* Searching... */,
             minChars : 2,
             name : 'item_inv_uom_id_uom_descrip',
             pageSize : 20,
-            qtip : _this._strings['69395719de41dd8a31905b1e94c91816'],
+            qtip : _this._strings['69395719de41dd8a31905b1e94c91816'] /* Select classcode */,
             queryParam : '',
             selectOnFocus : true,
             tpl : '<div class=\"x-grid-cell-text x-btn button\"><b>{uom_descrip}</b> </div>',
@@ -496,23 +471,28 @@ Pman.Dialog.XtupleItem = {
             valueField : 'uom_id',
             width : 200,
             xns : Roo.form,
+            '|xns' : 'Roo.form',
             xtype : 'ComboBox',
-            items : [
-
-            ]
-
-           },
-           {
             store : {
+             remoteSort : true,
+             sortInfo : { direction : 'ASC', field: 'uom_name' },
+             xns : Roo.data,
+             '|xns' : 'Roo.data',
+             xtype : 'Store',
+             listeners : {
+              beforeload : function (_self, o){
+                   o.params = o.params || {};
+                   // set more here
+               }
+             },
              proxy : {
-              '|xns' : 'Roo.data',
               method : 'GET',
               url : baseURL + '/Roo/uom.php',
               xns : Roo.data,
+              '|xns' : 'Roo.data',
               xtype : 'HttpProxy'
              },
              reader : {
-              '|xns' : 'Roo.data',
               fields : [
                   {"name":"id","type":"int"},
                   {"name":"uom_name","type":"string"},
@@ -522,38 +502,25 @@ Pman.Dialog.XtupleItem = {
               root : 'data',
               totalProperty : 'total',
               xns : Roo.data,
+              '|xns' : 'Roo.data',
               xtype : 'JsonReader'
-             },
-             '|xns' : 'Roo.data',
-             remoteSort : true,
-             sortInfo : { direction : 'ASC', field: 'uom_name' },
-             xns : Roo.data,
-             xtype : 'Store',
-             listeners : {
-              beforeload : function (_self, o){
-                   o.params = o.params || {};
-                   // set more here
-               }
-             },
-             items : [
-
-             ]
-
-            },
-            '|xns' : 'Roo.form',
+             }
+            }
+           },
+           {
             allowBlank : false,
             displayField : 'uom_descrip',
             editable : false,
-            emptyText : _this._strings['f9838de820f2a2e16241033270c68e29'],
-            fieldLabel : 'Price UOM',
+            emptyText : _this._strings['f9838de820f2a2e16241033270c68e29'] /* Select uom */,
+            fieldLabel : _this._strings['14fc4f0a5008e1d8d5645071755c596b'] /* Price UOM */,
             forceSelection : true,
             hiddenName : 'item_price_uom_id',
             listWidth : 400,
-            loadingText : _this._strings['1243daf593fa297e07ab03bf06d925af'],
+            loadingText : _this._strings['1243daf593fa297e07ab03bf06d925af'] /* Searching... */,
             minChars : 2,
             name : 'item_price_uom_id_uom_descrip',
             pageSize : 20,
-            qtip : _this._strings['69395719de41dd8a31905b1e94c91816'],
+            qtip : _this._strings['69395719de41dd8a31905b1e94c91816'] /* Select classcode */,
             queryParam : '',
             selectOnFocus : true,
             tpl : '<div class=\"x-grid-cell-text x-btn button\"><b>{uom_descrip}</b> </div>',
@@ -562,101 +529,97 @@ Pman.Dialog.XtupleItem = {
             valueField : 'uom_id',
             width : 200,
             xns : Roo.form,
-            xtype : 'ComboBox',
-            items : [
-
-            ]
-
-           },
-           {
-            '|xns' : 'Roo.form',
-            allowBlank : false,
-            allowDecimals : true,
-            decimalPrecision : 2,
-            fieldLabel : 'Weight',
-            name : 'item_prodweight',
-            width : 200,
-            xns : Roo.form,
-            xtype : 'NumberField'
-           },
-           {
             '|xns' : 'Roo.form',
-            fieldLabel : 'Item comments',
-            height : 100,
-            name : 'item_comments',
-            width : 200,
-            xns : Roo.form,
-            xtype : 'TextArea'
-           },
-           {
-            '|xns' : 'Roo.form',
-            fieldLabel : 'Item sold',
-            inputValue : true,
-            name : 'item_sold',
-            valueOff : 0,
-            width : 75,
-            xns : Roo.form,
-            xtype : 'Checkbox'
-           },
-           {
-            '|xns' : 'Roo.form',
-            fieldLabel : 'Item active',
-            inputValue : true,
-            name : 'item_active',
-            valueOff : 0,
-            width : 75,
-            xns : Roo.form,
-            xtype : 'Checkbox'
-           },
-           {
+            xtype : 'ComboBox',
             store : {
+             remoteSort : true,
+             sortInfo : { direction : 'ASC', field: 'uom_name' },
+             xns : Roo.data,
+             '|xns' : 'Roo.data',
+             xtype : 'Store',
+             listeners : {
+              beforeload : function (_self, o){
+                   o.params = o.params || {};
+                   // set more here
+               }
+             },
              proxy : {
-              '|xns' : 'Roo.data',
               method : 'GET',
-              url : baseURL + '/Roo/prodcat.php',
+              url : baseURL + '/Roo/uom.php',
               xns : Roo.data,
+              '|xns' : 'Roo.data',
               xtype : 'HttpProxy'
              },
              reader : {
-              '|xns' : 'Roo.data',
-              fields : [{"name":"id","type":"int"},{"name":"prodcat_code","type":"string"}],
+              fields : [
+                  {"name":"id","type":"int"},
+                  {"name":"uom_name","type":"string"},
+                  {"name":"uom_descrip","type":"string"},
+              ],
               id : 'id',
               root : 'data',
               totalProperty : 'total',
               xns : Roo.data,
+              '|xns' : 'Roo.data',
               xtype : 'JsonReader'
-             },
-             '|xns' : 'Roo.data',
-             remoteSort : true,
-             sortInfo : { direction : 'ASC', field: 'id' },
-             xns : Roo.data,
-             xtype : 'Store',
-             listeners : {
-              beforeload : function (_self, o){
-                   o.params = o.params || {};
-                   // set more here
-               }
-             },
-             items : [
-
-             ]
-
-            },
+             }
+            }
+           },
+           {
+            allowBlank : false,
+            allowDecimals : true,
+            decimalPrecision : 2,
+            fieldLabel : _this._strings['8c489d0946f66d17d73f26366a4bf620'] /* Weight */,
+            name : 'item_prodweight',
+            width : 200,
+            xns : Roo.form,
+            '|xns' : 'Roo.form',
+            xtype : 'NumberField'
+           },
+           {
+            fieldLabel : _this._strings['9d98e31f261471f426e906282544c15d'] /* Item comments */,
+            height : 100,
+            name : 'item_comments',
+            width : 200,
+            xns : Roo.form,
+            '|xns' : 'Roo.form',
+            xtype : 'TextArea'
+           },
+           {
+            fieldLabel : _this._strings['c96bc98500430b5eb8e9cfc5959e09b5'] /* Item sold */,
+            inputValue : true,
+            name : 'item_sold',
+            valueOff : 0,
+            width : 75,
+            xns : Roo.form,
+            '|xns' : 'Roo.form',
+            xtype : 'Checkbox'
+           },
+           {
+            fieldLabel : _this._strings['c056b1456660ea65aad6dfc664002b84'] /* Item active */,
+            inputValue : true,
+            name : 'item_active',
+            valueOff : 0,
+            width : 75,
+            xns : Roo.form,
             '|xns' : 'Roo.form',
+            xtype : 'Checkbox'
+           },
+           {
             allowBlank : false,
             alwaysQuery : true,
             displayField : 'prodcat_code',
             editable : false,
-            emptyText : _this._strings['76729937a5eb6b0fd88c42581161facd'],
-            fieldLabel : 'Product Category',
+            emptyText : _this._strings['76729937a5eb6b0fd88c42581161facd'] /* Select Category */,
+            fieldLabel : _this._strings['10991ea03e3591bebc4c0827fc369540'] /* Product Category */,
             forceSelection : true,
             hiddenName : 'item_prodcat_id',
             listWidth : 400,
-            loadingText : _this._strings['1243daf593fa297e07ab03bf06d925af'],
+            loadingText : _this._strings['1243daf593fa297e07ab03bf06d925af'] /* Searching... */,
             minChars : 2,
             name : 'item_prodcat_id_prodcat_code',
             pageSize : 20,
-            qtip : _this._strings['df2ad52a14d681b1cd8495f8650fdb56'],
+            qtip : _this._strings['df2ad52a14d681b1cd8495f8650fdb56'] /* Select prodcat */,
             queryParam : '',
             selectOnFocus : true,
             tpl : '<div class=\"x-grid-cell-text x-btn button\"><b>{prodcat_code}</b> </div>',
@@ -665,6 +628,7 @@ Pman.Dialog.XtupleItem = {
             valueField : 'prodcat_id',
             width : 200,
             xns : Roo.form,
+            '|xns' : 'Roo.form',
             xtype : 'ComboBox',
             listeners : {
              add : function (combo)
@@ -681,31 +645,56 @@ Pman.Dialog.XtupleItem = {
                   Pman.Dialog.XtupleProdcat.show({prodcat_id : s});
               }
             },
-            items : [
-
-            ]
-
+            store : {
+             remoteSort : true,
+             sortInfo : { direction : 'ASC', field: 'id' },
+             xns : Roo.data,
+             '|xns' : 'Roo.data',
+             xtype : 'Store',
+             listeners : {
+              beforeload : function (_self, o){
+                   o.params = o.params || {};
+                   // set more here
+               }
+             },
+             proxy : {
+              method : 'GET',
+              url : baseURL + '/Roo/prodcat.php',
+              xns : Roo.data,
+              '|xns' : 'Roo.data',
+              xtype : 'HttpProxy'
+             },
+             reader : {
+              fields : [{"name":"id","type":"int"},{"name":"prodcat_code","type":"string"}],
+              id : 'id',
+              root : 'data',
+              totalProperty : 'total',
+              xns : Roo.data,
+              '|xns' : 'Roo.data',
+              xtype : 'JsonReader'
+             }
+            }
            },
            {
-            '|xns' : 'Roo.form',
-            fieldLabel : 'Sales Account',
+            fieldLabel : _this._strings['e54f1b41d200adbd96eb53634388d780'] /* Sales Account */,
             name : 'item_salesaccnt',
             xns : Roo.form,
+            '|xns' : 'Roo.form',
             xtype : 'DisplayField'
            },
            {
-            '|xns' : 'Roo.form',
-            fieldLabel : 'Item listprice',
+            fieldLabel : _this._strings['148cb4c3e6469c6a92d24951485b65ff'] /* Item listprice */,
             name : 'item_listprice',
             width : 200,
             xns : Roo.form,
+            '|xns' : 'Roo.form',
             xtype : 'NumberField'
            },
            {
-            '|xns' : 'Roo.form',
-            legend : _this._strings['0d122b17933ab4173e9d75d55fc5e764'],
+            legend : _this._strings['0d122b17933ab4173e9d75d55fc5e764'] /* Standard Cost */,
             style : 'width:320px',
             xns : Roo.form,
+            '|xns' : 'Roo.form',
             xtype : 'FieldSet',
             listeners : {
              render : function (_self)
@@ -713,56 +702,21 @@ Pman.Dialog.XtupleItem = {
                   _this.standardCostFieldSet = _self;
               }
             },
-            items : [
+            items  : [
              {
-              store : {
-               proxy : {
-                '|xns' : 'Roo.data',
-                method : 'GET',
-                url : baseURL + '/Roo/curr_symbol.php',
-                xns : Roo.data,
-                xtype : 'HttpProxy'
-               },
-               reader : {
-                '|xns' : 'Roo.data',
-                fields : [{"name":"curr_id","type":"int"},"curr_symbol"],
-                id : 'curr_id',
-                root : 'data',
-                totalProperty : 'total',
-                xns : Roo.data,
-                xtype : 'JsonReader'
-               },
-               '|xns' : 'Roo.data',
-               remoteSort : true,
-               sortInfo : { direction : 'ASC', field: 'curr_symbol' },
-               xns : Roo.data,
-               xtype : 'Store',
-               listeners : {
-                beforeload : function (_self, o){
-                     o.params = o.params || {};
-                     // set more here
-                    
-                 }
-               },
-               items : [
-
-               ]
-
-              },
-              '|xns' : 'Roo.form',
               allowBlank : false,
               displayField : 'curr_name',
               editable : false,
-              emptyText : _this._strings['e8586011952b0d098b0e568f20ca2b1f'],
-              fieldLabel : 'Currency',
+              emptyText : _this._strings['e8586011952b0d098b0e568f20ca2b1f'] /* Select Currency */,
+              fieldLabel : _this._strings['386c339d37e737a436499d423a77df0c'] /* Currency */,
               forceSelection : true,
               hiddenName : 'item_itemcost_id_itemcost_curr_id',
               listWidth : 400,
-              loadingText : _this._strings['1243daf593fa297e07ab03bf06d925af'],
+              loadingText : _this._strings['1243daf593fa297e07ab03bf06d925af'] /* Searching... */,
               minChars : 2,
               name : 'curr_name',
               pageSize : 20,
-              qtip : _this._strings['e8586011952b0d098b0e568f20ca2b1f'],
+              qtip : _this._strings['e8586011952b0d098b0e568f20ca2b1f'] /* Select Currency */,
               queryParam : 'query[curr_name]',
               selectOnFocus : true,
               tpl : '<div class=\"x-grid-cell-text x-btn button\"><b>{curr_name}</b> </div>',
@@ -771,38 +725,63 @@ Pman.Dialog.XtupleItem = {
               valueField : 'curr_id',
               width : 200,
               xns : Roo.form,
+              '|xns' : 'Roo.form',
               xtype : 'ComboBox',
-              items : [
-
-              ]
-
+              store : {
+               remoteSort : true,
+               sortInfo : { direction : 'ASC', field: 'curr_symbol' },
+               xns : Roo.data,
+               '|xns' : 'Roo.data',
+               xtype : 'Store',
+               listeners : {
+                beforeload : function (_self, o){
+                     o.params = o.params || {};
+                     // set more here
+                    
+                 }
+               },
+               proxy : {
+                method : 'GET',
+                url : baseURL + '/Roo/curr_symbol.php',
+                xns : Roo.data,
+                '|xns' : 'Roo.data',
+                xtype : 'HttpProxy'
+               },
+               reader : {
+                fields : [{"name":"curr_id","type":"int"},"curr_symbol"],
+                id : 'curr_id',
+                root : 'data',
+                totalProperty : 'total',
+                xns : Roo.data,
+                '|xns' : 'Roo.data',
+                xtype : 'JsonReader'
+               }
+              }
              },
              {
-              '|xns' : 'Roo.form',
               allowBlank : false,
-              fieldLabel : 'Value',
+              fieldLabel : _this._strings['689202409e48743b914713f96d93947c'] /* Value */,
               name : 'item_itemcost_id_itemcost_actcost',
               width : 200,
               xns : Roo.form,
+              '|xns' : 'Roo.form',
               xtype : 'NumberField'
              }
             ]
-
            }
           ]
-
          },
          {
-          '|xns' : 'Roo.form',
           xns : Roo.form,
+          '|xns' : 'Roo.form',
           xtype : 'Column',
-          items : [
+          items  : [
            {
-            '|xns' : 'Roo.form',
             labelWidth : 120,
-            legend : _this._strings['20f39d1311ccbd3b7e61cdd4978719f9'],
+            legend : _this._strings['20f39d1311ccbd3b7e61cdd4978719f9'] /* Itemsite Settings */,
             style : 'width:335px;',
             xns : Roo.form,
+            '|xns' : 'Roo.form',
             xtype : 'FieldSet',
             listeners : {
              render : function (_self)
@@ -810,50 +789,39 @@ Pman.Dialog.XtupleItem = {
                   _this.itemsiteFieldSet = _self;
               }
             },
-            items : [
+            items  : [
              {
-              '|xns' : 'Roo.form',
               allowBlank : false,
-              fieldLabel : 'Reorder Level',
+              fieldLabel : _this._strings['43b2683180fe5e67a91696c834df0a32'] /* Reorder Level */,
               name : 'item_itemsite_id_itemsite_reorderlevel',
               width : 200,
               xns : Roo.form,
+              '|xns' : 'Roo.form',
               xtype : 'NumberField'
              },
              {
-              '|xns' : 'Roo.form',
               allowBlank : false,
-              fieldLabel : 'Stock Safety Level',
+              fieldLabel : _this._strings['eccd13e2f1acfd6b8412a2caafa37a80'] /* Stock Safety Level */,
               name : 'item_itemsite_id_itemsite_safetystock',
               width : 200,
               xns : Roo.form,
+              '|xns' : 'Roo.form',
               xtype : 'NumberField'
              },
              {
-              '|xns' : 'Roo.form',
               allowBlank : false,
-              fieldLabel : 'Lead time (Days)',
+              fieldLabel : _this._strings['6abc7326bcd435c1eb22ad3714db48c4'] /* Lead time (Days) */,
               name : 'item_itemsite_id_itemsite_leadtime',
               width : 200,
               xns : Roo.form,
+              '|xns' : 'Roo.form',
               xtype : 'NumberField'
              },
              {
-              store : {
-               '|xns' : 'Roo.data',
-               data : [ 
-                   [ 'N', "None"],
-                   [ 'R' , "Regular"]
-               ],
-               fields : [  'ftype', 'fname'],
-               xns : Roo.data,
-               xtype : 'SimpleStore'
-              },
-              '|xns' : 'Roo.form',
               allowBlank : false,
               displayField : 'fname',
               editable : false,
-              fieldLabel : 'Control Method',
+              fieldLabel : _this._strings['2ea154449c00001e87af8df7c0728678'] /* Control Method */,
               hiddenName : 'item_itemsite_id_itemsite_controlmethod',
               listWidth : 200,
               mode : 'local',
@@ -863,34 +831,48 @@ Pman.Dialog.XtupleItem = {
               valueField : 'ftype',
               width : 200,
               xns : Roo.form,
+              '|xns' : 'Roo.form',
               xtype : 'ComboBox',
-              items : [
-
-              ]
-
+              store : {
+               data : [ 
+                   [ 'N', "None"],
+                   [ 'R' , "Regular"]
+               ],
+               fields : [  'ftype', 'fname'],
+               xns : Roo.data,
+               '|xns' : 'Roo.data',
+               xtype : 'SimpleStore'
+              }
              },
              {
+              allowBlank : false,
+              displayField : 'plancode_name',
+              editable : false,
+              emptyText : _this._strings['c19ea8f7a11074ac743c58d34830b233'] /* Select plancode */,
+              fieldLabel : _this._strings['f9c68217f6ef9a9afe7575e766bd7b9f'] /* Planner Code */,
+              forceSelection : true,
+              hiddenName : 'item_itemsite_id_itemsite_plancode_id',
+              listWidth : 400,
+              loadingText : _this._strings['1243daf593fa297e07ab03bf06d925af'] /* Searching... */,
+              minChars : 2,
+              name : 'plancode_name',
+              pageSize : 20,
+              qtip : _this._strings['c19ea8f7a11074ac743c58d34830b233'] /* Select plancode */,
+              queryParam : '',
+              selectOnFocus : true,
+              tpl : '<div class=\"x-grid-cell-text x-btn button\"><b>{plancode_name}</b> </div>',
+              triggerAction : 'all',
+              typeAhead : true,
+              valueField : 'plancode_id',
+              width : 200,
+              xns : Roo.form,
+              '|xns' : 'Roo.form',
+              xtype : 'ComboBox',
               store : {
-               proxy : {
-                '|xns' : 'Roo.data',
-                method : 'GET',
-                url : baseURL + '/Roo/plancode.php',
-                xns : Roo.data,
-                xtype : 'HttpProxy'
-               },
-               reader : {
-                '|xns' : 'Roo.data',
-                fields : [{"name":"id","type":"int"},{"name":"plancode_code","type":"string"}],
-                id : 'id',
-                root : 'data',
-                totalProperty : 'total',
-                xns : Roo.data,
-                xtype : 'JsonReader'
-               },
-               '|xns' : 'Roo.data',
                remoteSort : true,
                sortInfo : { direction : 'ASC', field: 'id' },
                xns : Roo.data,
+               '|xns' : 'Roo.data',
                xtype : 'Store',
                listeners : {
                 beforeload : function (_self, o){
@@ -898,87 +880,38 @@ Pman.Dialog.XtupleItem = {
                      // set more here
                  }
                },
-               items : [
-
-               ]
-
-              },
-              '|xns' : 'Roo.form',
-              allowBlank : false,
-              displayField : 'plancode_name',
-              editable : false,
-              emptyText : _this._strings['c19ea8f7a11074ac743c58d34830b233'],
-              fieldLabel : 'Planner Code',
-              forceSelection : true,
-              hiddenName : 'item_itemsite_id_itemsite_plancode_id',
-              listWidth : 400,
-              loadingText : _this._strings['1243daf593fa297e07ab03bf06d925af'],
-              minChars : 2,
-              name : 'plancode_name',
-              pageSize : 20,
-              qtip : _this._strings['c19ea8f7a11074ac743c58d34830b233'],
-              queryParam : '',
-              selectOnFocus : true,
-              tpl : '<div class=\"x-grid-cell-text x-btn button\"><b>{plancode_name}</b> </div>',
-              triggerAction : 'all',
-              typeAhead : true,
-              valueField : 'plancode_id',
-              width : 200,
-              xns : Roo.form,
-              xtype : 'ComboBox',
-              items : [
-
-              ]
-
-             },
-             {
-              store : {
                proxy : {
-                '|xns' : 'Roo.data',
                 method : 'GET',
-                url : baseURL + '/Roo/costcat.php',
+                url : baseURL + '/Roo/plancode.php',
                 xns : Roo.data,
+                '|xns' : 'Roo.data',
                 xtype : 'HttpProxy'
                },
                reader : {
-                '|xns' : 'Roo.data',
-                fields : [{"name":"id","type":"int"},{"name":"costcat_code","type":"string"}],
+                fields : [{"name":"id","type":"int"},{"name":"plancode_code","type":"string"}],
                 id : 'id',
                 root : 'data',
                 totalProperty : 'total',
                 xns : Roo.data,
+                '|xns' : 'Roo.data',
                 xtype : 'JsonReader'
-               },
-               '|xns' : 'Roo.data',
-               remoteSort : true,
-               sortInfo : { direction : 'ASC', field: 'id' },
-               xns : Roo.data,
-               xtype : 'Store',
-               listeners : {
-                beforeload : function (_self, o){
-                     o.params = o.params || {};
-                     // set more here
-                 }
-               },
-               items : [
-
-               ]
-
-              },
-              '|xns' : 'Roo.form',
+               }
+              }
+             },
+             {
               allowBlank : false,
               displayField : 'costcat_code',
               editable : false,
-              emptyText : _this._strings['045a1ac263ac3a9b7420208bdc2df423'],
-              fieldLabel : 'Costcat',
+              emptyText : _this._strings['045a1ac263ac3a9b7420208bdc2df423'] /* Select costcat */,
+              fieldLabel : _this._strings['5aa275a71868f3afcacfd6de452b07eb'] /* Costcat */,
               forceSelection : true,
               hiddenName : 'item_itemsite_id_itemsite_costcat_id',
               listWidth : 400,
-              loadingText : _this._strings['1243daf593fa297e07ab03bf06d925af'],
+              loadingText : _this._strings['1243daf593fa297e07ab03bf06d925af'] /* Searching... */,
               minChars : 2,
               name : 'costcat_code',
               pageSize : 20,
-              qtip : _this._strings['045a1ac263ac3a9b7420208bdc2df423'],
+              qtip : _this._strings['045a1ac263ac3a9b7420208bdc2df423'] /* Select costcat */,
               queryParam : '',
               selectOnFocus : true,
               tpl : '<div class=\"x-grid-cell-text x-btn button\"><b>{costcat_code}</b> </div>',
@@ -987,113 +920,102 @@ Pman.Dialog.XtupleItem = {
               valueField : 'costcat_id',
               width : 200,
               xns : Roo.form,
+              '|xns' : 'Roo.form',
               xtype : 'ComboBox',
-              items : [
-
-              ]
-
+              store : {
+               remoteSort : true,
+               sortInfo : { direction : 'ASC', field: 'id' },
+               xns : Roo.data,
+               '|xns' : 'Roo.data',
+               xtype : 'Store',
+               listeners : {
+                beforeload : function (_self, o){
+                     o.params = o.params || {};
+                     // set more here
+                 }
+               },
+               proxy : {
+                method : 'GET',
+                url : baseURL + '/Roo/costcat.php',
+                xns : Roo.data,
+                '|xns' : 'Roo.data',
+                xtype : 'HttpProxy'
+               },
+               reader : {
+                fields : [{"name":"id","type":"int"},{"name":"costcat_code","type":"string"}],
+                id : 'id',
+                root : 'data',
+                totalProperty : 'total',
+                xns : Roo.data,
+                '|xns' : 'Roo.data',
+                xtype : 'JsonReader'
+               }
+              }
              },
              {
-              '|xns' : 'Roo.form',
-              fieldLabel : 'Active',
+              fieldLabel : _this._strings['4d3d769b812b6faa6b76e1a8abaece2d'] /* Active */,
               inputValue : true,
               name : 'item_itemsite_id_itemsite_active',
               valueOff : 0,
               width : 75,
               xns : Roo.form,
+              '|xns' : 'Roo.form',
               xtype : 'Checkbox'
              },
              {
-              '|xns' : 'Roo.form',
-              fieldLabel : 'Sold',
+              fieldLabel : _this._strings['d85a8a381c36f6dde21d81542830e2b1'] /* Sold */,
               inputValue : true,
               name : 'item_itemsite_id_itemsite_sold',
               valueOff : 0,
               width : 75,
               xns : Roo.form,
+              '|xns' : 'Roo.form',
               xtype : 'Checkbox'
              },
              {
-              '|xns' : 'Roo.form',
-              fieldLabel : 'Stocked',
+              fieldLabel : _this._strings['fce71ab09b7795157c6e23370b4afb26'] /* Stocked */,
               inputValue : true,
               name : 'item_itemsite_id_itemsite_stocked',
               valueOff : 0,
               width : 75,
               xns : Roo.form,
+              '|xns' : 'Roo.form',
               xtype : 'Checkbox'
              },
              {
-              '|xns' : 'Roo.form',
-              fieldLabel : 'Perishable',
+              fieldLabel : _this._strings['390fc24b0feebfff8c3fb8625418c2e9'] /* Perishable */,
               inputValue : true,
               name : 'item_itemsite_id_itemsite_perishable',
               valueOff : 0,
               width : 75,
               xns : Roo.form,
+              '|xns' : 'Roo.form',
               xtype : 'Checkbox'
              },
              {
-              '|xns' : 'Roo.form',
-              fieldLabel : 'Multi Location',
+              fieldLabel : _this._strings['e1a8f447925ed2867c591aa0865d170e'] /* Multi Location */,
               inputValue : true,
               name : 'item_itemsite_id_itemsite_loccntrl',
               valueOff : 0,
               width : 100,
               xns : Roo.form,
+              '|xns' : 'Roo.form',
               xtype : 'Checkbox'
              },
              {
-              store : {
-               proxy : {
-                '|xns' : 'Roo.data',
-                method : 'GET',
-                url : baseURL + '/Roo/location.php',
-                xns : Roo.data,
-                xtype : 'HttpProxy'
-               },
-               reader : {
-                '|xns' : 'Roo.data',
-                fields : [{"name":"location_id","type":"int"},"location_name"],
-                id : 'location_id',
-                root : 'data',
-                totalProperty : 'total',
-                xns : Roo.data,
-                xtype : 'JsonReader'
-               },
-               '|xns' : 'Roo.data',
-               remoteSort : true,
-               sortInfo : { direction : 'ASC', field: 'location_name' },
-               xns : Roo.data,
-               xtype : 'Store',
-               listeners : {
-                beforeload : function (_self, o){
-                     o.params = o.params || {};
-                     // set more here
-                      o.params.location_netable = 1;
-                      o.params._notinternalcompany = 1;
-                      o.params.location_restrict = 0;
-                 }
-               },
-               items : [
-
-               ]
-
-              },
-              '|xns' : 'Roo.form',
               allowBlank : false,
               displayField : 'location_name',
               editable : true,
-              emptyText : _this._strings['82a43f89af6d331d80d441624c5c71fa'],
-              fieldLabel : 'Default Location',
+              emptyText : _this._strings['82a43f89af6d331d80d441624c5c71fa'] /* Default Location */,
+              fieldLabel : _this._strings['82a43f89af6d331d80d441624c5c71fa'] /* Default Location */,
               forceSelection : true,
               hiddenName : 'item_itemsite_id_itemsite_location_id',
               listWidth : 400,
-              loadingText : _this._strings['1243daf593fa297e07ab03bf06d925af'],
+              loadingText : _this._strings['1243daf593fa297e07ab03bf06d925af'] /* Searching... */,
               minChars : 2,
               name : 'location_name',
               pageSize : 200,
-              qtip : _this._strings['151ccf95db9b81c11bb20fbc302af4b6'],
+              qtip : _this._strings['151ccf95db9b81c11bb20fbc302af4b6'] /* Select terms */,
               queryParam : 'query[location_name]',
               selectOnFocus : true,
               tpl : '<div class=\"x-grid-cell-text x-btn button\"><b>{location_name}</b> </div>',
@@ -1102,89 +1024,170 @@ Pman.Dialog.XtupleItem = {
               valueField : 'location_id',
               width : 200,
               xns : Roo.form,
+              '|xns' : 'Roo.form',
               xtype : 'ComboBox',
-              items : [
-
-              ]
-
+              store : {
+               remoteSort : true,
+               sortInfo : { direction : 'ASC', field: 'location_name' },
+               xns : Roo.data,
+               '|xns' : 'Roo.data',
+               xtype : 'Store',
+               listeners : {
+                beforeload : function (_self, o){
+                     o.params = o.params || {};
+                     // set more here
+                      o.params.location_netable = 1;
+                      o.params._notinternalcompany = 1;
+                      o.params.location_restrict = 0;
+                 }
+               },
+               proxy : {
+                method : 'GET',
+                url : baseURL + '/Roo/location.php',
+                xns : Roo.data,
+                '|xns' : 'Roo.data',
+                xtype : 'HttpProxy'
+               },
+               reader : {
+                fields : [{"name":"location_id","type":"int"},"location_name"],
+                id : 'location_id',
+                root : 'data',
+                totalProperty : 'total',
+                xns : Roo.data,
+                '|xns' : 'Roo.data',
+                xtype : 'JsonReader'
+               }
+              }
              }
             ]
-
            }
           ]
-
          },
          {
-          '|xns' : 'Roo.form',
           name : 'item_id',
           width : 75,
           xns : Roo.form,
+          '|xns' : 'Roo.form',
           xtype : 'Hidden'
          }
         ]
-
        }
       ]
-
      },
      {
+      background : true,
+      fitContainer : true,
+      fitToframe : true,
+      region : 'center',
+      tableName : 'bomitem',
+      title : _this._strings['538a3c9d82a4ea4250b987a357d41184'] /* Item Parts */,
+      xns : Roo,
+      '|xns' : 'Roo',
+      xtype : 'GridPanel',
+      listeners : {
+       activate : function() {
+            _this.partspanel = this;
+            
+            try { if (MODULE.isBuilder) {
+                return;
+            } } catch(e) { }
+            
+            var id = _this.form.findField('item_id').getValue() * 1;
+            if (id < 1) {
+                Roo.MessageBox.alert("Save First", "Save the item first, before adding parts");
+                _this.dialog.layout.getRegion('center').showPanel(0);
+                return;
+            }
+            
+            var type = _this.form.findField('item_type').getValue();
+            
+            if(!type.length || type != 'K'){
+                Roo.MessageBox.alert("Error", "Can't add parts to non-kit item");
+                _this.dialog.layout.getRegion('center').showPanel(0);
+                return;
+            }
+            
+            if (_this.partsgrid) {
+                _this.partsgrid.footer.onClick('first');
+            
+             }
+        }
+      },
       grid : {
-       toolbar : {
-        '|xns' : 'Roo',
-        xns : Roo,
-        xtype : 'Toolbar',
-        items : [
+       autoExpandColumn : 'bomitem_item_id_item_descrip1',
+       clicksToEdit : 1,
+       loadMask : true,
+       xns : Roo.grid,
+       '|xns' : 'Roo.grid',
+       xtype : 'EditorGrid',
+       listeners : {
+        afteredit : function (e)
          {
-          store : {
-           proxy : {
-            '|xns' : 'Roo.data',
-            method : 'GET',
-            url : baseURL + '/Roo/item.php',
-            xns : Roo.data,
-            xtype : 'HttpProxy'
-           },
-           reader : {
-            '|xns' : 'Roo.data',
-            fields : [
-                {"name":"id","type":"int"},
-                {"name":"item_number","type":"string"}
-            ],
-            id : 'id',
-            root : 'data',
-            totalProperty : 'total',
-            xns : Roo.data,
-            xtype : 'JsonReader'
-           },
-           '|xns' : 'Roo.data',
-           remoteSort : true,
-           sortInfo : { direction : 'ASC', field: 'item_number' },
-           xns : Roo.data,
-           xtype : 'Store',
-           listeners : {
-            beforeload : function (_self, o){
-                 o.params = o.params || {};
+             if(e.originalValue == e.value){
+                 return false;
+             }
+             
+             
+             new Pman.Request({
+                 method : 'POST',
+                 url : baseURL + '/Roo/bomitem.php',
+                 mask : 'Saving',
+                 params : {
+                     bomitem_id : e.record.data.bomitem_id,
+                     bomitem_qtyper : e.value
+                 },
+                 success : function() {
+                     e.record.set('bomitem_qtyper', e.value);
+                 }
+             
+             });
                  
-                 o.params.item_active = 1;
-                 o.params['!item_type'] = 'K';
+                  
+                 
+                 
+         },
+        beforeedit : function (e)
+         {
+             if(e.field != 'bomitem_qtyper'){
+                 return false;
              }
-           },
-           items : [
-
-           ]
-
-          },
-          '|xns' : 'Roo.bootstrap',
+             
+         },
+        render : function() 
+         {
+             _this.partsgrid = this; 
+             //_this.dialog = Pman.Dialog.FILL_IN
+             if (_this.partspanel.active) {
+                this.footer.onClick('first');
+             }
+         }
+       },
+       footer : {
+        displayInfo : true,
+        displayMsg : _this._strings['76d5bf9597c882d6513f71759df298d5'] /* Displaying parts {0} - {1} of {2} */,
+        emptyMsg : _this._strings['9076cbba1d9ef79280b4f39e2aa0d115'] /* Nothing found */,
+        pageSize : 50,
+        xns : Roo,
+        '|xns' : 'Roo',
+        xtype : 'PagingToolbar'
+       },
+       toolbar : {
+        xns : Roo,
+        '|xns' : 'Roo',
+        xtype : 'Toolbar',
+        items  : [
+         {
           allowBlank : true,
           alwaysQuery : true,
           displayField : 'item_number',
           editable : true,
-          emptyText : _this._strings['786410e93beb0193d89f8608c54feb4b'],
-          fieldLabel : 'Item',
+          emptyText : _this._strings['786410e93beb0193d89f8608c54feb4b'] /* Select item */,
+          fieldLabel : _this._strings['7d74f3b92b19da5e606d737d339a9679'] /* Item */,
           forceSelection : true,
-          loadingText : _this._strings['1243daf593fa297e07ab03bf06d925af'],
+          loadingText : _this._strings['1243daf593fa297e07ab03bf06d925af'] /* Searching... */,
           minChars : 2,
           pageSize : 20,
-          qtip : _this._strings['786410e93beb0193d89f8608c54feb4b'],
+          qtip : _this._strings['786410e93beb0193d89f8608c54feb4b'] /* Select item */,
           queryParam : 'query[number_or_name]',
           selectOnFocus : true,
           tpl : '<div class=\"x-grid-cell-text x-btn button\"><b>{item_number}</b> </div>',
@@ -1193,6 +1196,7 @@ Pman.Dialog.XtupleItem = {
           valueField : 'id',
           width : 200,
           xns : Roo.bootstrap,
+          '|xns' : 'Roo.bootstrap',
           xtype : 'ComboBox',
           listeners : {
            render : function (_self)
@@ -1236,22 +1240,52 @@ Pman.Dialog.XtupleItem = {
                 }); 
             }
           },
-          items : [
-
-          ]
-
+          store : {
+           remoteSort : true,
+           sortInfo : { direction : 'ASC', field: 'item_number' },
+           xns : Roo.data,
+           '|xns' : 'Roo.data',
+           xtype : 'Store',
+           listeners : {
+            beforeload : function (_self, o){
+                 o.params = o.params || {};
+                 
+                 o.params.item_active = 1;
+                 o.params['!item_type'] = 'K';
+             }
+           },
+           proxy : {
+            method : 'GET',
+            url : baseURL + '/Roo/item.php',
+            xns : Roo.data,
+            '|xns' : 'Roo.data',
+            xtype : 'HttpProxy'
+           },
+           reader : {
+            fields : [
+                {"name":"id","type":"int"},
+                {"name":"item_number","type":"string"}
+            ],
+            id : 'id',
+            root : 'data',
+            totalProperty : 'total',
+            xns : Roo.data,
+            '|xns' : 'Roo.data',
+            xtype : 'JsonReader'
+           }
+          }
          },
          {
-          '|xns' : 'Roo.Toolbar',
           xns : Roo.Toolbar,
+          '|xns' : 'Roo.Toolbar',
           xtype : 'Fill'
          },
          {
-          '|xns' : 'Roo',
           cls : 'x-btn-text-icon',
           icon : rootURL + '/Pman/templates/images/trash.gif',
-          text : _this._strings['1063e38cb53d94d386f21227fcd84717'],
+          text : _this._strings['1063e38cb53d94d386f21227fcd84717'] /* Remove */,
           xns : Roo,
+          '|xns' : 'Roo',
           xtype : 'Button',
           listeners : {
            click : function ()
@@ -1285,18 +1319,34 @@ Pman.Dialog.XtupleItem = {
           }
          }
         ]
-
        },
        dataSource : {
+        remoteSort : true,
+        sortInfo : { field : 'bomitem_item_id_item_name', direction: 'ASC' },
+        xns : Roo.data,
+        '|xns' : 'Roo.data',
+        xtype : 'Store',
+        listeners : {
+         beforeload : function (_self, o)
+          {
+             o.params = o.params || {};
+             
+             var id  = _this.form.findField('item_id').getValue() * 1;
+             if(id < 1){
+                  return false;
+             }
+             
+             o.params.bom_parent_item_id = id;
+          }
+        },
         proxy : {
-         '|xns' : 'Roo.data',
          method : 'GET',
          url : baseURL + '/Roo/bomitem.php',
          xns : Roo.data,
+         '|xns' : 'Roo.data',
          xtype : 'HttpProxy'
         },
         reader : {
-         '|xns' : 'Roo.data',
          fields : [
              {
                  'name': 'bomitem_id',
@@ -1307,157 +1357,69 @@ Pman.Dialog.XtupleItem = {
          root : 'data',
          totalProperty : 'total',
          xns : Roo.data,
+         '|xns' : 'Roo.data',
          xtype : 'JsonReader'
-        },
-        '|xns' : 'Roo.data',
-        remoteSort : true,
-        sortInfo : { field : 'bomitem_item_id_item_name', direction: 'ASC' },
-        xns : Roo.data,
-        xtype : 'Store',
-        listeners : {
-         beforeload : function (_self, o)
-          {
-             o.params = o.params || {};
-             
-             var id  = _this.form.findField('item_id').getValue() * 1;
-             if(id < 1){
-                  return false;
-             }
-             
-             o.params.bom_parent_item_id = id;
-          }
-        },
-        items : [
-
-        ]
-
-       },
-       footer : {
-        '|xns' : 'Roo',
-        displayInfo : true,
-        displayMsg : _this._strings['76d5bf9597c882d6513f71759df298d5'],
-        emptyMsg : _this._strings['9076cbba1d9ef79280b4f39e2aa0d115'],
-        pageSize : 50,
-        xns : Roo,
-        xtype : 'PagingToolbar'
+        }
        },
-       '|xns' : 'Roo.grid',
-       autoExpandColumn : 'bomitem_item_id_item_descrip1',
-       clicksToEdit : 1,
-       loadMask : true,
-       xns : Roo.grid,
-       xtype : 'EditorGrid',
        colModel : [
-         {
-          '|xns' : 'Roo.grid',
-          dataIndex : 'bomitem_item_id_item_number',
-          header : _this._strings['49ee3087348e8d44e1feda1917443987'],
-          renderer : function(v) { return String.format('{0}', v); },
-          width : 150,
-          xns : Roo.grid,
-          xtype : 'ColumnModel'
-         },
-{
-          '|xns' : 'Roo.grid',
-          dataIndex : 'bomitem_item_id_item_descrip1',
-          header : _this._strings['b5a7adde1af5c87d7fd797b6245c2a39'],
-          renderer : function(v) { return String.format('{0}', v); },
-          width : 150,
+        {
+         dataIndex : 'bomitem_item_id_item_number',
+         header : _this._strings['49ee3087348e8d44e1feda1917443987'] /* Name */,
+         renderer : function(v) { return String.format('{0}', v); },
+         width : 150,
+         xns : Roo.grid,
+         '|xns' : 'Roo.grid',
+         xtype : 'ColumnModel'
+        },
+        {
+         dataIndex : 'bomitem_item_id_item_descrip1',
+         header : _this._strings['b5a7adde1af5c87d7fd797b6245c2a39'] /* Description */,
+         renderer : function(v) { return String.format('{0}', v); },
+         width : 150,
+         xns : Roo.grid,
+         '|xns' : 'Roo.grid',
+         xtype : 'ColumnModel'
+        },
+        {
+         align : 'right',
+         dataIndex : 'bomitem_qtyper',
+         header : _this._strings['03ab340b3f99e03cff9e84314ead38c0'] /* Qty */,
+         renderer : function(v) { return String.format('{0}', v); },
+         width : 100,
+         xns : Roo.grid,
+         '|xns' : 'Roo.grid',
+         xtype : 'ColumnModel',
+         editor : {
           xns : Roo.grid,
-          xtype : 'ColumnModel'
-         },
-{
-          editor : {
-           field : {
-            '|xns' : 'Roo.form',
-            allowBlank : false,
-            cls : 'align-right',
-            decimalPrecision : 0,
-            minValue : 0,
-            xns : Roo.form,
-            xtype : 'NumberField'
-           },
-           '|xns' : 'Roo.grid',
-           xns : Roo.grid,
-           xtype : 'GridEditor',
-           items : [
-
-           ]
-
-          },
           '|xns' : 'Roo.grid',
-          align : 'right',
-          dataIndex : 'bomitem_qtyper',
-          header : _this._strings['03ab340b3f99e03cff9e84314ead38c0'],
-          renderer : function(v) { return String.format('{0}', v); },
-          width : 100,
-          xns : Roo.grid,
-          xtype : 'ColumnModel',
-          items : [
-
-          ]
-
-         }
-       ],
-       listeners : {
-        afteredit : function (e)
-         {
-             if(e.originalValue == e.value){
-                 return false;
-             }
-             
-             
-             new Pman.Request({
-                 method : 'POST',
-                 url : baseURL + '/Roo/bomitem.php',
-                 mask : 'Saving',
-                 params : {
-                     bomitem_id : e.record.data.bomitem_id,
-                     bomitem_qtyper : e.value
-                 },
-                 success : function() {
-                     e.record.set('bomitem_qtyper', e.value);
-                 }
-             
-             });
-                 
-                  
-                 
-                 
-         },
-        beforeedit : function (e)
-         {
-             if(e.field != 'bomitem_qtyper'){
-                 return false;
-             }
-             
-         },
-        render : function() 
-         {
-             _this.partsgrid = this; 
-             //_this.dialog = Pman.Dialog.FILL_IN
-             if (_this.partspanel.active) {
-                this.footer.onClick('first');
-             }
+          xtype : 'GridEditor',
+          field : {
+           allowBlank : false,
+           cls : 'align-right',
+           decimalPrecision : 0,
+           minValue : 0,
+           xns : Roo.form,
+           '|xns' : 'Roo.form',
+           xtype : 'NumberField'
+          }
          }
-       },
-       items : [
-
+        }
        ]
-
-      },
-      '|xns' : 'Roo',
+      }
+     },
+     {
       background : true,
       fitContainer : true,
       fitToframe : true,
       region : 'center',
-      tableName : 'bomitem',
-      title : _this._strings['538a3c9d82a4ea4250b987a357d41184'],
+      tableName : 'Images',
+      title : _this._strings['346577d22bb510368e3eddab5df2ca13'] /* Reference Files */,
       xns : Roo,
+      '|xns' : 'Roo',
       xtype : 'GridPanel',
       listeners : {
        activate : function() {
-            _this.partspanel = this;
+            _this.panel = this;
             
             try { if (MODULE.isBuilder) {
                 return;
@@ -1465,35 +1427,124 @@ Pman.Dialog.XtupleItem = {
             
             var id = _this.form.findField('item_id').getValue() * 1;
             if (id < 1) {
-                Roo.MessageBox.alert("Save First", "Save the item first, before adding parts");
-                _this.dialog.layout.getRegion('center').showPanel(0);
-                return;
-            }
-            
-            var type = _this.form.findField('item_type').getValue();
-            
-            if(!type.length || type != 'K'){
-                Roo.MessageBox.alert("Error", "Can't add parts to non-kit item");
+                Roo.MessageBox.alert("Save First", "Save the item first, before adding image");
                 _this.dialog.layout.getRegion('center').showPanel(0);
                 return;
             }
             
-            if (_this.partsgrid) {
-                _this.partsgrid.footer.onClick('first');
+            if (_this.grid) {
+                _this.grid.footer.onClick('first');
             
              }
         }
       },
-      items : [
-
-      ]
-
-     },
-     {
       grid : {
+       autoExpandColumn : 'id',
+       loadMask : true,
+       xns : Roo.grid,
+       '|xns' : 'Roo.grid',
+       xtype : 'Grid',
+       listeners : {
+        render : function() { 
+             _this.grid = this; 
+         
+             if (_this.panel.active) {
+                this.footer.onClick('first');
+             }
+         },
+        rowdblclick : function (_self, rowIndex, e)
+         {
+           
+            var s =  _self.getDataSource().getAt(rowIndex);
+            new Pman.Download({
+                 url : baseURL + '/Images/Download/' + s.data.id
+             });
+            
+         }
+       },
+       footer : {
+        displayInfo : true,
+        displayMsg : _this._strings['c0ed345ec857c06b31f7e88745c9bc40'] /* Displaying Images  {0} - {1} of {2} */,
+        emptyMsg : _this._strings['0c81971f67c0bd4b33799c5365ec2bf5'] /* No Images found */,
+        pageSize : 25,
+        xns : Roo,
+        '|xns' : 'Roo',
+        xtype : 'PagingToolbar'
+       },
+       toolbar : {
+        xns : Roo,
+        '|xns' : 'Roo',
+        xtype : 'Toolbar',
+        items  : [
+         {
+          cls : 'x-btn-text-icon',
+          icon : Roo.rootURL + 'images/default/dd/drop-add.gif',
+          text : _this._strings['ec211f7c20af43e742bf2570c3cb84f9'] /* Add */,
+          xns : Roo.Toolbar,
+          '|xns' : 'Roo.Toolbar',
+          xtype : 'Button',
+          listeners : {
+           click : function()
+            {
+                Pman.Dialog.Image.show({
+                    id : 0, 
+                    ontable: 'item',
+                    onid: _this.form.findField('item_id').getValue() * 1,
+                    imgtype : ''
+                }, function(data){
+                    if (!data) { return; } 
+                    _this.grid.footer.onClick('first');
+                }); 
+            
+            }
+          }
+         },
+         {
+          cls : 'x-btn-text-icon',
+          icon : rootURL + '/Pman/templates/images/trash.gif',
+          text : _this._strings['f2a6c498fb90ee345d997f888fce3b18'] /* Delete */,
+          xns : Roo.Toolbar,
+          '|xns' : 'Roo.Toolbar',
+          xtype : 'Button',
+          listeners : {
+           click : function()
+            {
+                Pman.genericDelete(_this, 'Images'); 
+            }
+          }
+         }
+        ]
+       },
        dataSource : {
-        reader : {
+        remoteSort : true,
+        sortInfo : { field: 'created' , direction: 'DESC' },
+        xns : Roo.data,
+        '|xns' : 'Roo.data',
+        xtype : 'Store',
+        listeners : {
+         beforeload : function (_self, o)
+          {
+              o.params = o.params || {};
+              
+              var id = _this.form.findField('item_id').getValue();
+              
+              if(id * 1 < 1){
+                  return false;
+              }
+              
+              o.params.onid = id;
+              o.params.ontable = 'item';
+              
+          }
+        },
+        proxy : {
+         method : 'GET',
+         url : baseURL + '/Roo/Images.php',
+         xns : Roo.data,
          '|xns' : 'Roo.data',
+         xtype : 'HttpProxy'
+        },
+        reader : {
          fields : [
              {
                  'name': 'id',
@@ -1565,161 +1616,51 @@ Pman.Dialog.XtupleItem = {
          root : 'data',
          totalProperty : 'total',
          xns : Roo.data,
-         xtype : 'JsonReader'
-        },
-        proxy : {
          '|xns' : 'Roo.data',
-         method : 'GET',
-         url : baseURL + '/Roo/Images.php',
-         xns : Roo.data,
-         xtype : 'HttpProxy'
-        },
-        '|xns' : 'Roo.data',
-        remoteSort : true,
-        sortInfo : { field: 'created' , direction: 'DESC' },
-        xns : Roo.data,
-        xtype : 'Store',
-        listeners : {
-         beforeload : function (_self, o)
-          {
-              o.params = o.params || {};
-              
-              var id = _this.form.findField('item_id').getValue();
-              
-              if(id * 1 < 1){
-                  return false;
-              }
-              
-              o.params.onid = id;
-              o.params.ontable = 'item';
-              
-          }
-        },
-        items : [
-
-        ]
-
-       },
-       footer : {
-        '|xns' : 'Roo',
-        displayInfo : true,
-        displayMsg : _this._strings['c0ed345ec857c06b31f7e88745c9bc40'],
-        emptyMsg : _this._strings['0c81971f67c0bd4b33799c5365ec2bf5'],
-        pageSize : 25,
-        xns : Roo,
-        xtype : 'PagingToolbar'
-       },
-       toolbar : {
-        '|xns' : 'Roo',
-        xns : Roo,
-        xtype : 'Toolbar',
-        items : [
-         {
-          '|xns' : 'Roo.Toolbar',
-          cls : 'x-btn-text-icon',
-          icon : Roo.rootURL + 'images/default/dd/drop-add.gif',
-          text : _this._strings['ec211f7c20af43e742bf2570c3cb84f9'],
-          xns : Roo.Toolbar,
-          xtype : 'Button',
-          listeners : {
-           click : function()
-            {
-                Pman.Dialog.Image.show({
-                    id : 0, 
-                    ontable: 'item',
-                    onid: _this.form.findField('item_id').getValue() * 1,
-                    imgtype : ''
-                }, function(data){
-                    if (!data) { return; } 
-                    _this.grid.footer.onClick('first');
-                }); 
-            
-            }
-          }
-         },
-         {
-          '|xns' : 'Roo.Toolbar',
-          cls : 'x-btn-text-icon',
-          icon : rootURL + '/Pman/templates/images/trash.gif',
-          text : _this._strings['f2a6c498fb90ee345d997f888fce3b18'],
-          xns : Roo.Toolbar,
-          xtype : 'Button',
-          listeners : {
-           click : function()
-            {
-                Pman.genericDelete(_this, 'Images'); 
-            }
-          }
-         }
-        ]
-
+         xtype : 'JsonReader'
+        }
        },
-       '|xns' : 'Roo.grid',
-       autoExpandColumn : 'id',
-       loadMask : true,
-       xns : Roo.grid,
-       xtype : 'Grid',
        colModel : [
-         {
-          '|xns' : 'Roo.grid',
-          dataIndex : 'created',
-          header : _this._strings['0eceeb45861f9585dd7a97a3e36f85c6'],
-          renderer : function(v,x,r) {
-                 return String.format('{0}<br/><i>{1}</i><br/>{2}<br/><i>{3}x{4}</i>',
-                      v.format('d/M/Y'), r.data.mimetype, r.data.filename,
-              r.data.width, r.data.height
-              ); 
-          },
-          sortable : true,
-          width : 200,
-          xns : Roo.grid,
-          xtype : 'ColumnModel'
-         },
-{
-          '|xns' : 'Roo.grid',
-          dataIndex : 'id',
-          header : _this._strings['be53a0541a6d36f6ecb879fa2c584b08'],
-          renderer : function(v,x,r) { return String.format('<img src="{0}/Images/Thumb/100/{1}/{2}" height="100">', baseURL, v, r.data.filename); },
-          width : 100,
-          xns : Roo.grid,
-          xtype : 'ColumnModel'
-         }
-       ],
-       listeners : {
-        render : function() { 
-             _this.grid = this; 
-         
-             if (_this.panel.active) {
-                this.footer.onClick('first');
-             }
+        {
+         dataIndex : 'created',
+         header : _this._strings['0eceeb45861f9585dd7a97a3e36f85c6'] /* Created */,
+         renderer : function(v,x,r) {
+                return String.format('{0}<br/><i>{1}</i><br/>{2}<br/><i>{3}x{4}</i>',
+                     v.format('d/M/Y'), r.data.mimetype, r.data.filename,
+             r.data.width, r.data.height
+             ); 
          },
-        rowdblclick : function (_self, rowIndex, e)
-         {
-           
-            var s =  _self.getDataSource().getAt(rowIndex);
-            new Pman.Download({
-                 url : baseURL + '/Images/Download/' + s.data.id
-             });
-            
-         }
-       },
-       items : [
-
+         sortable : true,
+         width : 200,
+         xns : Roo.grid,
+         '|xns' : 'Roo.grid',
+         xtype : 'ColumnModel'
+        },
+        {
+         dataIndex : 'id',
+         header : _this._strings['be53a0541a6d36f6ecb879fa2c584b08'] /* Image */,
+         renderer : function(v,x,r) { return String.format('<img src="{0}/Images/Thumb/100/{1}/{2}" height="100">', baseURL, v, r.data.filename); },
+         width : 100,
+         xns : Roo.grid,
+         '|xns' : 'Roo.grid',
+         xtype : 'ColumnModel'
+        }
        ]
-
-      },
-      '|xns' : 'Roo',
+      }
+     },
+     {
       background : true,
       fitContainer : true,
       fitToframe : true,
       region : 'center',
-      tableName : 'Images',
-      title : _this._strings['346577d22bb510368e3eddab5df2ca13'],
+      tableName : 'ipshead',
+      title : _this._strings['1656a671ba692e15836cd85df374556c'] /* Price List */,
       xns : Roo,
+      '|xns' : 'Roo',
       xtype : 'GridPanel',
       listeners : {
        activate : function() {
-            _this.panel = this;
+            _this.lpanel = this;
             
             try { if (MODULE.isBuilder) {
                 return;
@@ -1732,142 +1673,19 @@ Pman.Dialog.XtupleItem = {
                 return;
             }
             
-            if (_this.grid) {
-                _this.grid.footer.onClick('first');
+            if (_this.lgrid) {
+                _this.lgrid.footer.onClick('first');
             
              }
         }
       },
-      items : [
-
-      ]
-
-     },
-     {
       grid : {
-       dataSource : {
-        proxy : {
-         '|xns' : 'Roo.data',
-         method : 'GET',
-         url : baseURL + '/Roo/ipshead.php',
-         xns : Roo.data,
-         xtype : 'HttpProxy'
-        },
-        reader : {
-         '|xns' : 'Roo.data',
-         fields : [
-             {
-                 'name': 'ipshead_id',
-                 'type': 'int'
-             },
-             {
-                 'name': 'ipshead_name',
-                 'type': 'string'
-             }
-         ],
-         id : 'ipshead_id',
-         root : 'data',
-         totalProperty : 'total',
-         xns : Roo.data,
-         xtype : 'JsonReader'
-        },
-        '|xns' : 'Roo.data',
-        remoteSort : true,
-        sortInfo : { field : 'ipshead_id', direction: 'ASC' },
-        xns : Roo.data,
-        xtype : 'Store',
-        listeners : {
-         beforeload : function (_self, o)
-          {
-             o.params = o.params || {};
-             
-             var id  = _this.form.findField('item_id').getValue() * 1;
-             if(id < 1){
-                  return false;
-             }
-             
-             o.params._with_item = id;
-          }
-        },
-        items : [
-
-        ]
-
-       },
-       footer : {
-        '|xns' : 'Roo',
-        displayInfo : true,
-        displayMsg : _this._strings['956e816fa19ca04485c7101adbe07762'],
-        emptyMsg : _this._strings['9076cbba1d9ef79280b4f39e2aa0d115'],
-        pageSize : 50,
-        xns : Roo,
-        xtype : 'PagingToolbar'
-       },
-       '|xns' : 'Roo.grid',
        autoExpandColumn : 'ipshead_descrip',
        clicksToEdit : 1,
        loadMask : true,
        xns : Roo.grid,
+       '|xns' : 'Roo.grid',
        xtype : 'EditorGrid',
-       colModel : [
-         {
-          '|xns' : 'Roo.grid',
-          dataIndex : 'ipshead_name',
-          header : _this._strings['49ee3087348e8d44e1feda1917443987'],
-          renderer : function(v) { return String.format('{0}', v); },
-          width : 150,
-          xns : Roo.grid,
-          xtype : 'ColumnModel'
-         },
-{
-          '|xns' : 'Roo.grid',
-          dataIndex : 'ipshead_descrip',
-          header : _this._strings['b5a7adde1af5c87d7fd797b6245c2a39'],
-          renderer : function(v) { return String.format('{0}', v); },
-          width : 150,
-          xns : Roo.grid,
-          xtype : 'ColumnModel'
-         },
-{
-          '|xns' : 'Roo.grid',
-          dataIndex : 'ipshead_curr_id_curr_name',
-          header : _this._strings['386c339d37e737a436499d423a77df0c'],
-          renderer : function(v) { return String.format('{0}', v); },
-          width : 100,
-          xns : Roo.grid,
-          xtype : 'ColumnModel'
-         },
-{
-          editor : {
-           field : {
-            '|xns' : 'Roo.form',
-            cls : 'align-right',
-            decimalPrecision : 2,
-            xns : Roo.form,
-            xtype : 'NumberField'
-           },
-           '|xns' : 'Roo.grid',
-           xns : Roo.grid,
-           xtype : 'GridEditor',
-           items : [
-
-           ]
-
-          },
-          '|xns' : 'Roo.grid',
-          align : 'right',
-          dataIndex : 'ipshead_ipsitem_price',
-          header : _this._strings['3601146c4e948c32b6424d2c0a7f0118'],
-          renderer : function(v) { return String.format('{0}', Roo.util.Format.number(v*1,2)); },
-          width : 120,
-          xns : Roo.grid,
-          xtype : 'ColumnModel',
-          items : [
-
-          ]
-
-         }
-       ],
        listeners : {
         afteredit : function (e)
          {
@@ -1913,23 +1731,126 @@ Pman.Dialog.XtupleItem = {
              }
          }
        },
-       items : [
-
+       footer : {
+        displayInfo : true,
+        displayMsg : _this._strings['956e816fa19ca04485c7101adbe07762'] /* Displaying records {0} - {1} of {2} */,
+        emptyMsg : _this._strings['9076cbba1d9ef79280b4f39e2aa0d115'] /* Nothing found */,
+        pageSize : 50,
+        xns : Roo,
+        '|xns' : 'Roo',
+        xtype : 'PagingToolbar'
+       },
+       dataSource : {
+        remoteSort : true,
+        sortInfo : { field : 'ipshead_id', direction: 'ASC' },
+        xns : Roo.data,
+        '|xns' : 'Roo.data',
+        xtype : 'Store',
+        listeners : {
+         beforeload : function (_self, o)
+          {
+             o.params = o.params || {};
+             
+             var id  = _this.form.findField('item_id').getValue() * 1;
+             if(id < 1){
+                  return false;
+             }
+             
+             o.params._with_item = id;
+          }
+        },
+        proxy : {
+         method : 'GET',
+         url : baseURL + '/Roo/ipshead.php',
+         xns : Roo.data,
+         '|xns' : 'Roo.data',
+         xtype : 'HttpProxy'
+        },
+        reader : {
+         fields : [
+             {
+                 'name': 'ipshead_id',
+                 'type': 'int'
+             },
+             {
+                 'name': 'ipshead_name',
+                 'type': 'string'
+             }
+         ],
+         id : 'ipshead_id',
+         root : 'data',
+         totalProperty : 'total',
+         xns : Roo.data,
+         '|xns' : 'Roo.data',
+         xtype : 'JsonReader'
+        }
+       },
+       colModel : [
+        {
+         dataIndex : 'ipshead_name',
+         header : _this._strings['49ee3087348e8d44e1feda1917443987'] /* Name */,
+         renderer : function(v) { return String.format('{0}', v); },
+         width : 150,
+         xns : Roo.grid,
+         '|xns' : 'Roo.grid',
+         xtype : 'ColumnModel'
+        },
+        {
+         dataIndex : 'ipshead_descrip',
+         header : _this._strings['b5a7adde1af5c87d7fd797b6245c2a39'] /* Description */,
+         renderer : function(v) { return String.format('{0}', v); },
+         width : 150,
+         xns : Roo.grid,
+         '|xns' : 'Roo.grid',
+         xtype : 'ColumnModel'
+        },
+        {
+         dataIndex : 'ipshead_curr_id_curr_name',
+         header : _this._strings['386c339d37e737a436499d423a77df0c'] /* Currency */,
+         renderer : function(v) { return String.format('{0}', v); },
+         width : 100,
+         xns : Roo.grid,
+         '|xns' : 'Roo.grid',
+         xtype : 'ColumnModel'
+        },
+        {
+         align : 'right',
+         dataIndex : 'ipshead_ipsitem_price',
+         header : _this._strings['3601146c4e948c32b6424d2c0a7f0118'] /* Price */,
+         renderer : function(v) { return String.format('{0}', Roo.util.Format.number(v*1,2)); },
+         width : 120,
+         xns : Roo.grid,
+         '|xns' : 'Roo.grid',
+         xtype : 'ColumnModel',
+         editor : {
+          xns : Roo.grid,
+          '|xns' : 'Roo.grid',
+          xtype : 'GridEditor',
+          field : {
+           cls : 'align-right',
+           decimalPrecision : 2,
+           xns : Roo.form,
+           '|xns' : 'Roo.form',
+           xtype : 'NumberField'
+          }
+         }
+        }
        ]
-
-      },
-      '|xns' : 'Roo',
+      }
+     },
+     {
       background : true,
       fitContainer : true,
       fitToframe : true,
       region : 'center',
-      tableName : 'ipshead',
-      title : _this._strings['1656a671ba692e15836cd85df374556c'],
+      tableName : 'itemsrc',
+      title : _this._strings['1814d65a76028fdfbadab64a5a8076df'] /* Suppliers */,
       xns : Roo,
+      '|xns' : 'Roo',
       xtype : 'GridPanel',
       listeners : {
        activate : function() {
-            _this.lpanel = this;
+            _this.itemsrcpanel = this;
             
             try { if (MODULE.isBuilder) {
                 return;
@@ -1937,37 +1858,174 @@ Pman.Dialog.XtupleItem = {
             
             var id = _this.form.findField('item_id').getValue() * 1;
             if (id < 1) {
-                Roo.MessageBox.alert("Save First", "Save the item first, before adding image");
+                Roo.MessageBox.alert("Save First", "Save the item first, before adding suppliers");
                 _this.dialog.layout.getRegion('center').showPanel(0);
-                return;
+                return false;
             }
             
-            if (_this.lgrid) {
-                _this.lgrid.footer.onClick('first');
+            var type = _this.form.findField('item_type').getValue();
             
-             }
+            if(type == 'K'){
+                Roo.MessageBox.alert("Error", "Can't add suppliers to kit item");
+                _this.dialog.layout.getRegion('center').showPanel(0);
+                return false;
+            }
+            
+            if (_this.itemsrcgrid) {
+                _this.itemsrcgrid.footer.onClick('first');
+            }
         }
       },
-      items : [
-
-      ]
-
-     },
-     {
       grid : {
+       autoExpandColumn : 'itemsrc_comments',
+       clicksToEdit : 1,
+       loadMask : true,
+       xns : Roo.grid,
+       '|xns' : 'Roo.grid',
+       xtype : 'EditorGrid',
+       listeners : {
+        afteredit : function (e)
+         {
+             e.record.commit();
+         },
+        render : function() 
+         {
+             _this.itemsrcgrid = this; 
+             
+             if (_this.itemsrcpanel.active) {
+                this.footer.onClick('first');
+             }
+         },
+        rowdblclick : function (_self, rowIndex, e)
+         {
+             if (!_this.dialog) return;
+             _this.dialog.show( this.getDataSource().getAt(rowIndex).data, function() {
+                 _this.grid.footer.onClick('first');
+             }); 
+         }
+       },
+       footer : {
+        displayInfo : true,
+        displayMsg : _this._strings['7f841b4d2f7280eb82318988c6d649d1'] /* Displaying itemsrc{0} - {1} of {2} */,
+        emptyMsg : _this._strings['19df363d15888baa395364fbcd230c05'] /* No itemsrc found */,
+        pageSize : 25,
+        xns : Roo,
+        '|xns' : 'Roo',
+        xtype : 'PagingToolbar'
+       },
+       toolbar : {
+        xns : Roo,
+        '|xns' : 'Roo',
+        xtype : 'Toolbar',
+        items  : [
+         {
+          cls : 'x-btn-text-icon',
+          icon : Roo.rootURL + 'images/default/dd/drop-add.gif',
+          text : _this._strings['ec211f7c20af43e742bf2570c3cb84f9'] /* Add */,
+          xns : Roo.Toolbar,
+          '|xns' : 'Roo.Toolbar',
+          xtype : 'Button',
+          listeners : {
+           click : function()
+            {
+                 
+                Roo.log("add presed");
+                 
+                // work out last 
+                var grid = _this.itemsrcgrid;
+                 
+                // uses form defaults or last row value.
+                var nr = grid.ds.reader.newRow({
+                     itemsrc_id : 0,
+                     itemsrc_item_id : _this.form.findField('item_id').getValue(),
+                     itemsrc_vend_id : 0,
+                     itemsrc_vend_id_vend_name : '',
+                     itemsrc_vend_item_number : '',
+                     itemsrc_vend_item_descrip : '',
+                     itemsrc_comments           : '',
+                     itemsrc_vend_uom  :           'EA',
+                     itemsrc_invvendoruomratio : 1.0,
+                     itemsrc_minordqty        : 0,
+                     itemsrc_multordqty        : 0,
+                     itemsrc_leadtime         :  30,
+                     itemsrc_ranking         :   0,
+                     itemsrc_active          :   true,
+                     itemsrc_manuf_name       :  '',
+                     itemsrc_manuf_item_number : '',
+                     itemsrc_manuf_item_descrip: '',
+                     itemsrc_default          : true,
+                     itemsrc_upccode    : ''
+                                    
+                });
+                grid.stopEditing();
+                grid.ds.insert(0, nr); 
+                grid.startEditing(0, 0); // type..
+            
+            }
+          }
+         }
+        ]
+       },
        dataSource : {
-        proxy : {
-         '|xns' : 'Roo.data',
-         method : 'GET',
-         url : baseURL + '/Roo/itemsrc.php',
-         xns : Roo.data,
-         xtype : 'HttpProxy'
-        },
-        reader : {
-         '|xns' : 'Roo.data',
-         fields : [
-             {
-                 'name': 'itemsrc_id',
+        remoteSort : true,
+        sortInfo : { field : 'itemsrc_vend_id_vend_name', direction: 'ASC' },
+        xns : Roo.data,
+        '|xns' : 'Roo.data',
+        xtype : 'Store',
+        listeners : {
+         beforeload : function (_self, o)
+          {
+              
+              var id = 1 * _this.form.findField('item_id').getValue();
+              if (!id) {
+                  this.removeAll();
+                  return false;
+              }
+              o.params.itemsrc_item_id = id;
+          },
+         update : function (_self, record, operation)
+          {
+              Roo.log(operation);
+                Roo.log(record);
+             
+              if (operation != 'commit') {
+                  return;
+              }
+              if (record.data.itemsrc_vend_id * 1 < 1) {
+                  return; // do not save.
+              }
+              if (record.data.itemsrc_id * 1 < 0) {
+                  return; // do not save. -- updating at present...
+              }
+              
+              var p = Roo.apply({}, record.data);
+              record.set('itemsrc_id', -1);    
+              
+              new Pman.Request({
+                  url : baseURL + '/Roo/Itemsrc',
+                  params : p,
+                  method : 'POST',
+                  success: function(res) {
+                      if (record.data.itemsrc_id *1  < 1) { 
+                          record.set('itemsrc_id', res.data.itemsrc_id);
+                      }
+                  }
+              });
+              
+              
+          }
+        },
+        proxy : {
+         method : 'GET',
+         url : baseURL + '/Roo/itemsrc.php',
+         xns : Roo.data,
+         '|xns' : 'Roo.data',
+         xtype : 'HttpProxy'
+        },
+        reader : {
+         fields : [
+             {
+                 'name': 'itemsrc_id',
                  'type': 'int'
              },
              {
@@ -2051,427 +2109,246 @@ Pman.Dialog.XtupleItem = {
          root : 'data',
          totalProperty : 'total',
          xns : Roo.data,
+         '|xns' : 'Roo.data',
          xtype : 'JsonReader'
-        },
-        '|xns' : 'Roo.data',
-        remoteSort : true,
-        sortInfo : { field : 'itemsrc_vend_id_vend_name', direction: 'ASC' },
-        xns : Roo.data,
-        xtype : 'Store',
-        listeners : {
-         beforeload : function (_self, o)
-          {
-              
-              var id = 1 * _this.form.findField('item_id').getValue();
-              if (!id) {
-                  this.removeAll();
-                  return false;
-              }
-              o.params.itemsrc_item_id = id;
-          },
-         update : function (_self, record, operation)
-          {
-              Roo.log(operation);
-                Roo.log(record);
-             
-              if (operation != 'commit') {
-                  return;
-              }
-              if (record.data.itemsrc_vend_id * 1 < 1) {
-                  return; // do not save.
-              }
-              if (record.data.itemsrc_id * 1 < 0) {
-                  return; // do not save. -- updating at present...
-              }
-              
-              var p = Roo.apply({}, record.data);
-              record.set('itemsrc_id', -1);    
-              
-              new Pman.Request({
-                  url : baseURL + '/Roo/Itemsrc',
-                  params : p,
-                  method : 'POST',
-                  success: function(res) {
-                      if (record.data.itemsrc_id *1  < 1) { 
-                          record.set('itemsrc_id', res.data.itemsrc_id);
-                      }
-                  }
-              });
-              
-              
-          }
-        },
-        items : [
-
-        ]
-
-       },
-       footer : {
-        '|xns' : 'Roo',
-        displayInfo : true,
-        displayMsg : _this._strings['7f841b4d2f7280eb82318988c6d649d1'],
-        emptyMsg : _this._strings['19df363d15888baa395364fbcd230c05'],
-        pageSize : 25,
-        xns : Roo,
-        xtype : 'PagingToolbar'
-       },
-       toolbar : {
-        '|xns' : 'Roo',
-        xns : Roo,
-        xtype : 'Toolbar',
-        items : [
-         {
-          '|xns' : 'Roo.Toolbar',
-          cls : 'x-btn-text-icon',
-          icon : Roo.rootURL + 'images/default/dd/drop-add.gif',
-          text : _this._strings['ec211f7c20af43e742bf2570c3cb84f9'],
-          xns : Roo.Toolbar,
-          xtype : 'Button',
-          listeners : {
-           click : function()
-            {
-                 
-                Roo.log("add presed");
-                 
-                // work out last 
-                var grid = _this.itemsrcgrid;
-                 
-                // uses form defaults or last row value.
-                var nr = grid.ds.reader.newRow({
-                     itemsrc_id : 0,
-                     itemsrc_item_id : _this.form.findField('item_id').getValue(),
-                     itemsrc_vend_id : 0,
-                     itemsrc_vend_id_vend_name : '',
-                     itemsrc_vend_item_number : '',
-                     itemsrc_vend_item_descrip : '',
-                     itemsrc_comments           : '',
-                     itemsrc_vend_uom  :           'EA',
-                     itemsrc_invvendoruomratio : 1.0,
-                     itemsrc_minordqty        : 0,
-                     itemsrc_multordqty        : 0,
-                     itemsrc_leadtime         :  30,
-                     itemsrc_ranking         :   0,
-                     itemsrc_active          :   true,
-                     itemsrc_manuf_name       :  '',
-                     itemsrc_manuf_item_number : '',
-                     itemsrc_manuf_item_descrip: '',
-                     itemsrc_default          : true,
-                     itemsrc_upccode    : ''
-                                    
-                });
-                grid.stopEditing();
-                grid.ds.insert(0, nr); 
-                grid.startEditing(0, 0); // type..
-            
-            }
-          }
-         }
-        ]
-
+        }
        },
-       '|xns' : 'Roo.grid',
-       autoExpandColumn : 'itemsrc_comments',
-       clicksToEdit : 1,
-       loadMask : true,
-       xns : Roo.grid,
-       xtype : 'EditorGrid',
        colModel : [
-         {
-          editor : {
-           field : {
-            store : {
-             proxy : {
-              '|xns' : 'Roo.data',
-              method : 'GET',
-              url : baseURL + '/Roo/vendinfo.php',
-              xns : Roo.data,
-              xtype : 'HttpProxy'
-             },
-             reader : {
-              '|xns' : 'Roo.data',
-              fields : [{"name":"id","type":"int"},{"name":"vend_name","type":"string"}],
-              id : 'id',
-              root : 'data',
-              totalProperty : 'total',
-              xns : Roo.data,
-              xtype : 'JsonReader'
-             },
-             '|xns' : 'Roo.data',
-             remoteSort : true,
-             sortInfo : { direction : 'ASC', field: 'id' },
-             xns : Roo.data,
-             xtype : 'Store',
-             listeners : {
-              beforeload : function (_self, o){
-                   o.params = o.params || {};
-                   // set more here
-               }
-             },
-             items : [
-
-             ]
-
-            },
-            '|xns' : 'Roo.form',
-            allowBlank : false,
-            displayField : 'vend_name',
-            editable : true,
-            emptyText : _this._strings['7996af9149ed376ce252e35c4da7146b'],
-            forceSelection : true,
-            hiddenName : 'itemsrc_vend_id',
-            listWidth : 400,
-            loadingText : _this._strings['1243daf593fa297e07ab03bf06d925af'],
-            minChars : 2,
-            name : 'itemsrc_vend_id_vend_name',
-            pageSize : 20,
-            qtip : _this._strings['dd24f967299e81b9603cb071693d5c32'],
-            queryParam : 'q[search]',
-            selectOnFocus : true,
-            tpl : '<div class=\"x-grid-cell-text x-btn button\"><b>{vend_name}</b> </div>',
-            triggerAction : 'all',
-            typeAhead : true,
-            valueField : 'vend_id',
-            width : 300,
-            xns : Roo.form,
-            xtype : 'ComboBox',
-            items : [
-
-            ]
-
-           },
-           '|xns' : 'Roo.grid',
-           xns : Roo.grid,
-           xtype : 'GridEditor',
-           items : [
-
-           ]
-
-          },
-          '|xns' : 'Roo.grid',
-          dataIndex : 'itemsrc_vend_id',
-          header : _this._strings['ec9ceefe0c19f4c029008c23e3c947b7'],
-          renderer : function(v,x,r) { return String.format('{0}', r.data.itemsrc_vend_id_vend_name); },
-          width : 120,
+        {
+         dataIndex : 'itemsrc_vend_id',
+         header : _this._strings['ec9ceefe0c19f4c029008c23e3c947b7'] /* Vendor */,
+         renderer : function(v,x,r) { return String.format('{0}', r.data.itemsrc_vend_id_vend_name); },
+         width : 120,
+         xns : Roo.grid,
+         '|xns' : 'Roo.grid',
+         xtype : 'ColumnModel',
+         editor : {
           xns : Roo.grid,
-          xtype : 'ColumnModel',
-          items : [
-
-          ]
-
-         },
-{
-          editor : {
-           field : {
-            '|xns' : 'Roo.form',
-            xns : Roo.form,
-            xtype : 'TextField'
-           },
-           '|xns' : 'Roo.grid',
-           xns : Roo.grid,
-           xtype : 'GridEditor',
-           items : [
-
-           ]
-
-          },
-          '|xns' : 'Roo.grid',
-          dataIndex : 'itemsrc_vend_item_number',
-          header : _this._strings['e5353fc67b122d1b42181073b46cd060'],
-          renderer : function(v) { return String.format('{0}', v); },
-          width : 100,
-          xns : Roo.grid,
-          xtype : 'ColumnModel',
-          items : [
-
-          ]
-
-         },
-{
-          editor : {
-           field : {
-            '|xns' : 'Roo.form',
-            xns : Roo.form,
-            xtype : 'TextField'
-           },
-           '|xns' : 'Roo.grid',
-           xns : Roo.grid,
-           xtype : 'GridEditor',
-           items : [
-
-           ]
-
-          },
           '|xns' : 'Roo.grid',
-          dataIndex : 'itemsrc_comments',
-          header : _this._strings['8413c683b4b27cc3f4dbd4c90329d8ba'],
-          renderer : function(v) { return String.format('{0}', v); },
-          width : 200,
+          xtype : 'GridEditor',
+          field : {
+           allowBlank : false,
+           displayField : 'vend_name',
+           editable : true,
+           emptyText : _this._strings['7996af9149ed376ce252e35c4da7146b'] /* Select Vendor */,
+           forceSelection : true,
+           hiddenName : 'itemsrc_vend_id',
+           listWidth : 400,
+           loadingText : _this._strings['1243daf593fa297e07ab03bf06d925af'] /* Searching... */,
+           minChars : 2,
+           name : 'itemsrc_vend_id_vend_name',
+           pageSize : 20,
+           qtip : _this._strings['dd24f967299e81b9603cb071693d5c32'] /* Select vendinfo */,
+           queryParam : 'q[search]',
+           selectOnFocus : true,
+           tpl : '<div class=\"x-grid-cell-text x-btn button\"><b>{vend_name}</b> </div>',
+           triggerAction : 'all',
+           typeAhead : true,
+           valueField : 'vend_id',
+           width : 300,
+           xns : Roo.form,
+           '|xns' : 'Roo.form',
+           xtype : 'ComboBox',
+           store : {
+            remoteSort : true,
+            sortInfo : { direction : 'ASC', field: 'id' },
+            xns : Roo.data,
+            '|xns' : 'Roo.data',
+            xtype : 'Store',
+            listeners : {
+             beforeload : function (_self, o){
+                  o.params = o.params || {};
+                  // set more here
+              }
+            },
+            proxy : {
+             method : 'GET',
+             url : baseURL + '/Roo/vendinfo.php',
+             xns : Roo.data,
+             '|xns' : 'Roo.data',
+             xtype : 'HttpProxy'
+            },
+            reader : {
+             fields : [{"name":"id","type":"int"},{"name":"vend_name","type":"string"}],
+             id : 'id',
+             root : 'data',
+             totalProperty : 'total',
+             xns : Roo.data,
+             '|xns' : 'Roo.data',
+             xtype : 'JsonReader'
+            }
+           }
+          }
+         }
+        },
+        {
+         dataIndex : 'itemsrc_vend_item_number',
+         header : _this._strings['e5353fc67b122d1b42181073b46cd060'] /* Vendor Ref# */,
+         renderer : function(v) { return String.format('{0}', v); },
+         width : 100,
+         xns : Roo.grid,
+         '|xns' : 'Roo.grid',
+         xtype : 'ColumnModel',
+         editor : {
           xns : Roo.grid,
-          xtype : 'ColumnModel',
-          items : [
-
-          ]
-
-         },
-{
           '|xns' : 'Roo.grid',
-          dataIndex : 'itemsrc_vend_uom',
-          header : _this._strings['bb8913cd17d59f182acc7be1020007b7'],
-          renderer : function(v) { return String.format('{0}', v); },
-          width : 50,
+          xtype : 'GridEditor',
+          field : {
+           xns : Roo.form,
+           '|xns' : 'Roo.form',
+           xtype : 'TextField'
+          }
+         }
+        },
+        {
+         dataIndex : 'itemsrc_comments',
+         header : _this._strings['8413c683b4b27cc3f4dbd4c90329d8ba'] /* Comments */,
+         renderer : function(v) { return String.format('{0}', v); },
+         width : 200,
+         xns : Roo.grid,
+         '|xns' : 'Roo.grid',
+         xtype : 'ColumnModel',
+         editor : {
           xns : Roo.grid,
-          xtype : 'ColumnModel'
-         },
-{
-          editor : {
-           field : {
-            '|xns' : 'Roo.form',
-            decimalPrecision : 0,
-            minValue : 0,
-            xns : Roo.form,
-            xtype : 'NumberField'
-           },
-           '|xns' : 'Roo.grid',
-           xns : Roo.grid,
-           xtype : 'GridEditor',
-           items : [
-
-           ]
-
-          },
           '|xns' : 'Roo.grid',
-          align : 'right',
-          dataIndex : 'itemsrc_minordqty',
-          header : _this._strings['7be1fa478799242847d4ef861ff6f8e1'],
-          renderer : function(v) { return String.format('{0}', v); },
-          width : 50,
+          xtype : 'GridEditor',
+          field : {
+           xns : Roo.form,
+           '|xns' : 'Roo.form',
+           xtype : 'TextField'
+          }
+         }
+        },
+        {
+         dataIndex : 'itemsrc_vend_uom',
+         header : _this._strings['bb8913cd17d59f182acc7be1020007b7'] /* UOM */,
+         renderer : function(v) { return String.format('{0}', v); },
+         width : 50,
+         xns : Roo.grid,
+         '|xns' : 'Roo.grid',
+         xtype : 'ColumnModel'
+        },
+        {
+         align : 'right',
+         dataIndex : 'itemsrc_minordqty',
+         header : _this._strings['7be1fa478799242847d4ef861ff6f8e1'] /* Min Qty */,
+         renderer : function(v) { return String.format('{0}', v); },
+         width : 50,
+         xns : Roo.grid,
+         '|xns' : 'Roo.grid',
+         xtype : 'ColumnModel',
+         editor : {
           xns : Roo.grid,
-          xtype : 'ColumnModel',
-          items : [
-
-          ]
-
-         },
-{
-          editor : {
-           field : {
-            '|xns' : 'Roo.form',
-            decimalPrecision : 0,
-            minValue : 0,
-            xns : Roo.form,
-            xtype : 'NumberField'
-           },
-           '|xns' : 'Roo.grid',
-           xns : Roo.grid,
-           xtype : 'GridEditor',
-           items : [
-
-           ]
-
-          },
           '|xns' : 'Roo.grid',
-          align : 'right',
-          dataIndex : 'itemsrc_leadtime',
-          header : _this._strings['0ac9012a8c03a76ee76f04321b3b7fda'],
-          renderer : function(v) { return String.format('{0}', v); },
-          width : 75,
+          xtype : 'GridEditor',
+          field : {
+           decimalPrecision : 0,
+           minValue : 0,
+           xns : Roo.form,
+           '|xns' : 'Roo.form',
+           xtype : 'NumberField'
+          }
+         }
+        },
+        {
+         align : 'right',
+         dataIndex : 'itemsrc_leadtime',
+         header : _this._strings['0ac9012a8c03a76ee76f04321b3b7fda'] /* Lead time */,
+         renderer : function(v) { return String.format('{0}', v); },
+         width : 75,
+         xns : Roo.grid,
+         '|xns' : 'Roo.grid',
+         xtype : 'ColumnModel',
+         editor : {
           xns : Roo.grid,
-          xtype : 'ColumnModel',
-          items : [
-
-          ]
-
-         },
-{
           '|xns' : 'Roo.grid',
-          dataIndex : 'itemsrc_active',
-          header : _this._strings['4d3d769b812b6faa6b76e1a8abaece2d'],
-          renderer : function(v) { return String.format('{0}', v); },
-          width : 50,
-          xns : Roo.grid,
-          xtype : 'ColumnModel'
-         }
-       ],
-       listeners : {
-        afteredit : function (e)
-         {
-             e.record.commit();
-         },
-        render : function() 
-         {
-             _this.itemsrcgrid = this; 
-             
-             if (_this.itemsrcpanel.active) {
-                this.footer.onClick('first');
-             }
-         },
-        rowdblclick : function (_self, rowIndex, e)
-         {
-             if (!_this.dialog) return;
-             _this.dialog.show( this.getDataSource().getAt(rowIndex).data, function() {
-                 _this.grid.footer.onClick('first');
-             }); 
+          xtype : 'GridEditor',
+          field : {
+           decimalPrecision : 0,
+           minValue : 0,
+           xns : Roo.form,
+           '|xns' : 'Roo.form',
+           xtype : 'NumberField'
+          }
          }
-       },
-       items : [
-
+        },
+        {
+         dataIndex : 'itemsrc_active',
+         header : _this._strings['4d3d769b812b6faa6b76e1a8abaece2d'] /* Active */,
+         renderer : function(v) { return String.format('{0}', v); },
+         width : 50,
+         xns : Roo.grid,
+         '|xns' : 'Roo.grid',
+         xtype : 'ColumnModel'
+        }
        ]
-
-      },
-      '|xns' : 'Roo',
+      }
+     },
+     {
       background : true,
       fitContainer : true,
       fitToframe : true,
       region : 'center',
-      tableName : 'itemsrc',
-      title : _this._strings['1814d65a76028fdfbadab64a5a8076df'],
+      tableName : 'events',
+      title : _this._strings['16d2b386b2034b9488996466aaae0b57'] /* History */,
       xns : Roo,
+      '|xns' : 'Roo',
       xtype : 'GridPanel',
       listeners : {
        activate : function() {
-            _this.itemsrcpanel = this;
-            
-            try { if (MODULE.isBuilder) {
-                return;
-            } } catch(e) { }
-            
-            var id = _this.form.findField('item_id').getValue() * 1;
-            if (id < 1) {
-                Roo.MessageBox.alert("Save First", "Save the item first, before adding suppliers");
-                _this.dialog.layout.getRegion('center').showPanel(0);
-                return false;
-            }
-            
-            var type = _this.form.findField('item_type').getValue();
-            
-            if(type == 'K'){
-                Roo.MessageBox.alert("Error", "Can't add suppliers to kit item");
-                _this.dialog.layout.getRegion('center').showPanel(0);
-                return false;
-            }
-            
-            if (_this.itemsrcgrid) {
-                _this.itemsrcgrid.footer.onClick('first');
+            _this.hpanel = this;
+            if (_this.hgrid) {
+                _this.hgrid.footer.onClick('first');
             }
         }
       },
-      items : [
-
-      ]
-
-     },
-     {
       grid : {
+       autoExpandColumn : 'remarks',
+       loadMask : true,
+       xns : Roo.grid,
+       '|xns' : 'Roo.grid',
+       xtype : 'Grid',
+       listeners : {
+        render : function() 
+         {
+             _this.hgrid = this; 
+             if (_this.hpanel.active) {
+                this.footer.onClick('first');
+             }
+         }
+       },
+       footer : {
+        displayInfo : true,
+        displayMsg : _this._strings['089ba2b5edc96565fc22c584ecfbb1a6'] /* Displaying events{0} - {1} of {2} */,
+        emptyMsg : _this._strings['90e4ac2e5a22e53df63b6b186d8727ba'] /* No Events found */,
+        pageSize : 25,
+        xns : Roo,
+        '|xns' : 'Roo',
+        xtype : 'PagingToolbar'
+       },
        dataSource : {
+        remoteSort : true,
+        sortInfo : { field : 'event_when', direction: 'DESC' },
+        xns : Roo.data,
+        '|xns' : 'Roo.data',
+        xtype : 'Store',
+        listeners : {
+         beforeload : function (_self, options)
+          {
+              options.params = options.params || {};
+              
+              options.params.on_table = 'item';
+              options.params.on_id = _this.form.findField('item_id').getValue();
+          }
+        },
         proxy : {
-         '|xns' : 'Roo.data',
          method : 'GET',
          url : baseURL + '/Roo/events.php',
          xns : Roo.data,
+         '|xns' : 'Roo.data',
          xtype : 'HttpProxy'
         },
         reader : {
-         '|xns' : 'Roo.data',
          fields : [
              {
                  'name': 'event_when',
@@ -2498,126 +2375,60 @@ Pman.Dialog.XtupleItem = {
          root : 'data',
          totalProperty : 'total',
          xns : Roo.data,
+         '|xns' : 'Roo.data',
          xtype : 'JsonReader'
-        },
-        '|xns' : 'Roo.data',
-        remoteSort : true,
-        sortInfo : { field : 'event_when', direction: 'DESC' },
-        xns : Roo.data,
-        xtype : 'Store',
-        listeners : {
-         beforeload : function (_self, options)
-          {
-              options.params = options.params || {};
-              
-              options.params.on_table = 'item';
-              options.params.on_id = _this.form.findField('item_id').getValue();
-          }
-        },
-        items : [
-
-        ]
-
-       },
-       footer : {
-        '|xns' : 'Roo',
-        displayInfo : true,
-        displayMsg : _this._strings['089ba2b5edc96565fc22c584ecfbb1a6'],
-        emptyMsg : _this._strings['90e4ac2e5a22e53df63b6b186d8727ba'],
-        pageSize : 25,
-        xns : Roo,
-        xtype : 'PagingToolbar'
+        }
        },
-       '|xns' : 'Roo.grid',
-       autoExpandColumn : 'remarks',
-       loadMask : true,
-       xns : Roo.grid,
-       xtype : 'Grid',
        colModel : [
-         {
-          '|xns' : 'Roo.grid',
-          dataIndex : 'event_when',
-          header : _this._strings['820dbd2b8f606aff866c0bbfb6b737c1'],
-          renderer : function(v) { return String.format('{0}', v ? v.format('d/M/Y H:i:s') : ''); },
-          width : 120,
-          xns : Roo.grid,
-          xtype : 'ColumnModel'
-         },
-{
-          '|xns' : 'Roo.grid',
-          dataIndex : 'action',
-          header : _this._strings['004bf6c9a40003140292e97330236c53'],
-          renderer : function(v,x,r) { return String.format('{0} - {1}', v, r.data.on_table); },
-          width : 200,
-          xns : Roo.grid,
-          xtype : 'ColumnModel'
-         },
-{
-          '|xns' : 'Roo.grid',
-          dataIndex : 'ipaddr',
-          header : _this._strings['5b8c99dad1893a85076709b2d3c2d2d0'],
-          renderer : function(v) { return String.format('{0}', v); },
-          width : 200,
-          xns : Roo.grid,
-          xtype : 'ColumnModel'
-         },
-{
-          '|xns' : 'Roo.grid',
-          dataIndex : 'person_id_name',
-          header : _this._strings['4ee972120bcda675f75222c87cb9d356'],
-          renderer : function(v) { return String.format('{0}', v); },
-          width : 75,
-          xns : Roo.grid,
-          xtype : 'ColumnModel'
-         },
-{
-          '|xns' : 'Roo.grid',
-          dataIndex : 'remarks',
-          header : _this._strings['f4c6f851b00d5518bf888815de279aba'],
-          renderer : function(v) { return String.format('{0}', v); },
-          width : 200,
-          xns : Roo.grid,
-          xtype : 'ColumnModel'
-         }
-       ],
-       listeners : {
-        render : function() 
-         {
-             _this.hgrid = this; 
-             if (_this.hpanel.active) {
-                this.footer.onClick('first');
-             }
-         }
-       },
-       items : [
-
-       ]
-
-      },
-      '|xns' : 'Roo',
-      background : true,
-      fitContainer : true,
-      fitToframe : true,
-      region : 'center',
-      tableName : 'events',
-      title : _this._strings['16d2b386b2034b9488996466aaae0b57'],
-      xns : Roo,
-      xtype : 'GridPanel',
-      listeners : {
-       activate : function() {
-            _this.hpanel = this;
-            if (_this.hgrid) {
-                _this.hgrid.footer.onClick('first');
-            }
+        {
+         dataIndex : 'event_when',
+         header : _this._strings['820dbd2b8f606aff866c0bbfb6b737c1'] /* Changed */,
+         renderer : function(v) { return String.format('{0}', v ? v.format('d/M/Y H:i:s') : ''); },
+         width : 120,
+         xns : Roo.grid,
+         '|xns' : 'Roo.grid',
+         xtype : 'ColumnModel'
+        },
+        {
+         dataIndex : 'action',
+         header : _this._strings['004bf6c9a40003140292e97330236c53'] /* Action */,
+         renderer : function(v,x,r) { return String.format('{0} - {1}', v, r.data.on_table); },
+         width : 200,
+         xns : Roo.grid,
+         '|xns' : 'Roo.grid',
+         xtype : 'ColumnModel'
+        },
+        {
+         dataIndex : 'ipaddr',
+         header : _this._strings['5b8c99dad1893a85076709b2d3c2d2d0'] /* IP Address */,
+         renderer : function(v) { return String.format('{0}', v); },
+         width : 200,
+         xns : Roo.grid,
+         '|xns' : 'Roo.grid',
+         xtype : 'ColumnModel'
+        },
+        {
+         dataIndex : 'person_id_name',
+         header : _this._strings['4ee972120bcda675f75222c87cb9d356'] /* Who */,
+         renderer : function(v) { return String.format('{0}', v); },
+         width : 75,
+         xns : Roo.grid,
+         '|xns' : 'Roo.grid',
+         xtype : 'ColumnModel'
+        },
+        {
+         dataIndex : 'remarks',
+         header : _this._strings['f4c6f851b00d5518bf888815de279aba'] /* Notes */,
+         renderer : function(v) { return String.format('{0}', v); },
+         width : 200,
+         xns : Roo.grid,
+         '|xns' : 'Roo.grid',
+         xtype : 'ColumnModel'
         }
-      },
-      items : [
-
-      ]
-
+       ]
+      }
      }
     ]
-
    });
  }
 };