2 "name" : "Pman.Dialog.XtupleItem",
5 "path" : "/home/edward/gitlive/Pman.Xtuple/Pman.Dialog.XtupleItem.bjs",
9 "346577d22bb510368e3eddab5df2ca13" : "Reference Files",
10 "be53a0541a6d36f6ecb879fa2c584b08" : "Image",
11 "92b17d3d0f13232ec1d46844c836d4db" : "Invoice UOM",
12 "390fc24b0feebfff8c3fb8625418c2e9" : "Perishable",
13 "f2a6c498fb90ee345d997f888fce3b18" : "Delete",
14 "956e816fa19ca04485c7101adbe07762" : "Displaying records {0} - {1} of {2}",
15 "69395719de41dd8a31905b1e94c91816" : "Select classcode",
16 "82a43f89af6d331d80d441624c5c71fa" : "Default Location",
17 "538a3c9d82a4ea4250b987a357d41184" : "Item Parts",
18 "03ab340b3f99e03cff9e84314ead38c0" : "Qty",
19 "5b8c99dad1893a85076709b2d3c2d2d0" : "IP Address",
20 "fce71ab09b7795157c6e23370b4afb26" : "Stocked",
21 "045a1ac263ac3a9b7420208bdc2df423" : "Select costcat",
22 "0c81971f67c0bd4b33799c5365ec2bf5" : "No Images found",
23 "a1fa27779242b4902f7ae3bdd5c6d508" : "Type",
24 "151ccf95db9b81c11bb20fbc302af4b6" : "Select terms",
25 "786410e93beb0193d89f8608c54feb4b" : "Select item",
26 "0ac9012a8c03a76ee76f04321b3b7fda" : "Lead time",
27 "675c9bd3bbae30af03fe74346dcae9a7" : "Edit / Create item",
28 "dd24f967299e81b9603cb071693d5c32" : "Select vendinfo",
29 "023a5dfa857c4aa0156e6685231a1dbd" : "Select Type",
30 "e8586011952b0d098b0e568f20ca2b1f" : "Select Currency",
31 "9bd81329febf6efe22788e03ddeaf0af" : "Class",
32 "8413c683b4b27cc3f4dbd4c90329d8ba" : "Comments",
33 "820dbd2b8f606aff866c0bbfb6b737c1" : "Changed",
34 "ec211f7c20af43e742bf2570c3cb84f9" : "Add",
35 "0eceeb45861f9585dd7a97a3e36f85c6" : "Created",
36 "386c339d37e737a436499d423a77df0c" : "Currency",
37 "9076cbba1d9ef79280b4f39e2aa0d115" : "Nothing found",
38 "1243daf593fa297e07ab03bf06d925af" : "Searching...",
39 "6df5afb79e960381ed66568c2a644ec6" : "Description (2)",
40 "7be1fa478799242847d4ef861ff6f8e1" : "Min Qty",
41 "6665e3761028c84e1d228de3432229ed" : "SKU",
42 "e54f1b41d200adbd96eb53634388d780" : "Sales Account",
43 "76729937a5eb6b0fd88c42581161facd" : "Select Category",
44 "eccd13e2f1acfd6b8412a2caafa37a80" : "Stock Safety Level",
45 "43b2683180fe5e67a91696c834df0a32" : "Reorder Level",
46 "e1a8f447925ed2867c591aa0865d170e" : "Multi Location",
47 "7d74f3b92b19da5e606d737d339a9679" : "Item",
48 "2ea154449c00001e87af8df7c0728678" : "Control Method",
49 "19df363d15888baa395364fbcd230c05" : "No itemsrc found",
50 "0d122b17933ab4173e9d75d55fc5e764" : "Standard Cost",
51 "df2ad52a14d681b1cd8495f8650fdb56" : "Select prodcat",
52 "49ee3087348e8d44e1feda1917443987" : "Name",
53 "e5353fc67b122d1b42181073b46cd060" : "Vendor Ref#",
54 "c19ea8f7a11074ac743c58d34830b233" : "Select plancode",
55 "ea4788705e6873b424c65e91c2846b19" : "Cancel",
56 "c056b1456660ea65aad6dfc664002b84" : "Item active",
57 "9d98e31f261471f426e906282544c15d" : "Item comments",
58 "20f39d1311ccbd3b7e61cdd4978719f9" : "Itemsite Settings",
59 "1656a671ba692e15836cd85df374556c" : "Price List",
60 "bb8913cd17d59f182acc7be1020007b7" : "UOM",
61 "f9c68217f6ef9a9afe7575e766bd7b9f" : "Planner Code",
62 "76d5bf9597c882d6513f71759df298d5" : "Displaying parts {0} - {1} of {2}",
63 "3601146c4e948c32b6424d2c0a7f0118" : "Price",
64 "1814d65a76028fdfbadab64a5a8076df" : "Suppliers",
65 "90e4ac2e5a22e53df63b6b186d8727ba" : "No Events found",
66 "4ee972120bcda675f75222c87cb9d356" : "Who",
67 "16d2b386b2034b9488996466aaae0b57" : "History",
68 "14fc4f0a5008e1d8d5645071755c596b" : "Price UOM",
69 "089ba2b5edc96565fc22c584ecfbb1a6" : "Displaying events{0} - {1} of {2}",
70 "b5a7adde1af5c87d7fd797b6245c2a39" : "Description",
71 "148cb4c3e6469c6a92d24951485b65ff" : "Item listprice",
72 "c96bc98500430b5eb8e9cfc5959e09b5" : "Item sold",
73 "7f841b4d2f7280eb82318988c6d649d1" : "Displaying itemsrc{0} - {1} of {2}",
74 "a254c25adc7d10d7e9c4889484f875a5" : "Detail",
75 "5aa275a71868f3afcacfd6de452b07eb" : "Costcat",
76 "c0ed345ec857c06b31f7e88745c9bc40" : "Displaying Images {0} - {1} of {2}",
77 "c9cc8cce247e49bae79f15173ce97354" : "Save",
78 "6abc7326bcd435c1eb22ad3714db48c4" : "Lead time (Days)",
79 "ec9ceefe0c19f4c029008c23e3c947b7" : "Vendor",
80 "4d3d769b812b6faa6b76e1a8abaece2d" : "Active",
81 "004bf6c9a40003140292e97330236c53" : "Action",
82 "689202409e48743b914713f96d93947c" : "Value",
83 "f4c6f851b00d5518bf888815de279aba" : "Notes",
84 "10991ea03e3591bebc4c0827fc369540" : "Product Category",
85 "f9838de820f2a2e16241033270c68e29" : "Select uom",
86 "8c489d0946f66d17d73f26366a4bf620" : "Weight",
87 "d85a8a381c36f6dde21d81542830e2b1" : "Sold",
88 "1063e38cb53d94d386f21227fcd84717" : "Remove",
89 "7996af9149ed376ce252e35c4da7146b" : "Select Vendor"
94 "show" : "function (_self)\n{\n _this.dialog.layout.getRegion('center').showPanel(0);\n}"
97 "collapsible" : false,
98 "title" : "Edit / Create item",
99 "xtype" : "LayoutDialog",
107 "alwaysShowTabs" : true,
108 "xtype" : "LayoutRegion",
109 "tabPosition" : "top",
116 "xtype" : "ContentPanel",
121 "|actioncomplete" : "function(_self,action)\n{\n if (action.type == 'setdata') {\n _this.form.findField('item_number').el.dom.readOnly = true;\n _this.form.findField('item_type').disabled = true; \n \n if(_this.data.item_id * 1 > 0){\n \n this.load({ \n method: 'GET', \n params: {\n '_id' : _this.data.item_id,\n '_with_itemsite' : 1,\n '_with_itemcost' : 1,\n '_with_prodcat' : 1 ,\n '_with_salesaccnt' : 1 \n }\n });\n return;\n }\n // if it's new..\n _this.form.findField('item_number').el.dom.readOnly = false;\n _this.form.findField('item_type').disabled = false; \n _this.form.findField('item_salesaccnt').setValue('');\n \n _this.form.findField('item_type').showHide();\n \n return;\n }\n if (action.type == 'load') {\n _this.form.findField('item_type').showHide();\n return;\n }\n if (action.type =='submit') {\n \n var id = _this.form.findField('item_id').getValue() * 1;\n if (id < 1) {\n \n this.load({ \n method: 'GET', \n params: {\n '_id' : action.result.data.item_id,\n '_with_itemsite' : 1,\n '_with_itemcost' : 1,\n '_with_prodcat' : 1 ,\n '_with_salesaccnt' : 1 \n }\n });\n return;\n }\n _this.dialog.hide();\n \n if (_this.callback) {\n _this.callback.call(_this, _this.form.getValues());\n }\n _this.form.reset();\n return;\n }\n}\n",
122 "|rendered" : "function (form)\n{\n _this.form= form;\n}\n"
124 "$ url" : "baseURL + '/Roo/item.php'",
126 "style" : "margin:10px;",
129 "$ xns" : "Roo.form",
132 "fieldLabel" : "SKU",
133 "xtype" : "TextField",
134 "allowBlank" : false,
136 "$ xns" : "Roo.form",
137 "name" : "item_number"
140 "fieldLabel" : "Description",
141 "xtype" : "TextField",
143 "$ xns" : "Roo.form",
144 "name" : "item_descrip1"
147 "fieldLabel" : "Description (2)",
148 "xtype" : "TextField",
150 "$ xns" : "Roo.form",
151 "name" : "item_descrip2"
156 "$ xns" : "Roo.form",
160 "beforeselect" : "function (combo, record, index)\n{\n (function() { combo.showHide(); }).defer(100);\n}"
163 "triggerAction" : "all",
164 "fieldLabel" : "Type",
165 "displayField" : "fname",
166 "emptyText" : "Select Type",
167 "hiddenName" : "item_type",
168 "valueField" : "ftype",
169 "xtype" : "ComboBox",
170 "allowBlank" : false,
171 "$ showHide" : "function() {\n\n var it = this.getValue();\n \n var options = [ \n 'item_itemcost_id_itemcost_curr_id',\n 'item_itemcost_id_itemcost_actcost',\n 'item_itemsite_id_itemsite_reorderlevel',\n 'item_itemsite_id_itemsite_leadtime',\n 'item_itemsite_id_itemsite_location_id',\n 'item_itemsite_id_itemsite_loccntrl',\n 'item_itemsite_id_itemsite_stocked',\n 'item_itemsite_id_itemsite_perishable',\n \n 'item_itemsite_id_itemsite_safetystock',\n 'item_itemsite_id_itemsite_controlmethod',\n 'item_itemsite_id_itemsite_plancode_id',\n 'item_itemsite_id_itemsite_costcat_id',\n 'item_itemsite_id_itemsite_active',\n 'item_itemsite_id_itemsite_sold'\n \n ];\n \n var r_req = [ \n 'item_listprice'\n ];\n \n var state = true;\n \n _this.standardCostFieldSet.show();\n _this.itemsiteFieldSet.show();\n\n \n switch(it) {\n case 'K':\n state = false;\n\n _this.form.findField('item_listprice').allowBlank = false;\n _this.form.findField('item_listprice').actionMode = 'fieldEl';\n _this.form.findField('item_listprice').hideMode = 'display';\n _this.form.findField('item_listprice').show();\n \n break;\n \n case 'R': // refrence\n options = options.concat(r_req);\n state = false;\n _this.standardCostFieldSet.hide();\n break;\n \n case 'P': // purchased..\n options = options.concat(r_req);\n // must have\n break;\n }\n \n Roo.each(options, function(n) {\n var ff = _this.form.findField(n);\n ff.allowBlank = !state;\n ff.actionMode = 'fieldEl';\n ff.hideMode = 'display';\n state ? ff.show() : ff.hide(); \n \n });\n \n \n if(!state){\n _this.standardCostFieldSet.hide();\n _this.itemsiteFieldSet.hide();\n\n }\n \n \n \n}\n",
174 "$ xns" : "Roo.form",
176 "name" : "item_type_name",
177 "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{fname}</b> </div>",
180 "xtype" : "SimpleStore",
181 "$ data" : "[ \n [ 'P', \"Purchased (eg. a standard product)\"],\n [ 'R' , \"Reference (Non-Product)\"],\n [ 'K', \"Kit (made up of products)\"] \n]\n",
182 "$ fields" : "[ 'ftype', 'fname']",
183 "$ xns" : "Roo.data",
190 "triggerAction" : "all",
191 "fieldLabel" : "Class",
192 "forceSelection" : true,
193 "selectOnFocus" : true,
195 "displayField" : "classcode_code",
196 "emptyText" : "Select classcode",
197 "hiddenName" : "item_classcode_id",
199 "valueField" : "classcode_id",
200 "xtype" : "ComboBox",
201 "allowBlank" : false,
205 "$ xns" : "Roo.form",
206 "name" : "item_classcode_id_classcode_code",
207 "qtip" : "Select classcode",
209 "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{classcode_code}</b> </div>",
210 "loadingText" : "Searching...",
214 "|beforeload" : "function (_self, o){\n o.params = o.params || {};\n // set more here\n}\n"
218 "$ sortInfo" : "{ direction : 'ASC', field: 'id' }",
219 "$ xns" : "Roo.data",
223 "$ url" : "baseURL + '/Roo/classcode.php'",
225 "xtype" : "HttpProxy",
226 "$ xns" : "Roo.data",
232 "xtype" : "JsonReader",
233 "$ xns" : "Roo.data",
234 "$ fields" : "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"classcode_code\",\"type\":\"string\"}]",
236 "totalProperty" : "total"
244 "triggerAction" : "all",
245 "fieldLabel" : "Invoice UOM",
246 "forceSelection" : true,
247 "selectOnFocus" : true,
249 "displayField" : "uom_descrip",
250 "emptyText" : "Select uom",
251 "hiddenName" : "item_inv_uom_id",
253 "valueField" : "uom_id",
254 "xtype" : "ComboBox",
255 "allowBlank" : false,
259 "$ xns" : "Roo.form",
260 "name" : "item_inv_uom_id_uom_descrip",
261 "qtip" : "Select classcode",
263 "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{uom_descrip}</b> </div>",
264 "loadingText" : "Searching...",
268 "|beforeload" : "function (_self, o){\n o.params = o.params || {};\n // set more here\n}\n"
272 "$ sortInfo" : "{ direction : 'ASC', field: 'uom_name' }",
273 "$ xns" : "Roo.data",
277 "$ url" : "baseURL + '/Roo/uom.php'",
279 "xtype" : "HttpProxy",
280 "$ xns" : "Roo.data",
286 "xtype" : "JsonReader",
287 "$ xns" : "Roo.data",
288 "$ fields" : "[\n {\"name\":\"id\",\"type\":\"int\"},\n {\"name\":\"uom_name\",\"type\":\"string\"},\n {\"name\":\"uom_descrip\",\"type\":\"string\"},\n]",
290 "totalProperty" : "total"
298 "triggerAction" : "all",
299 "fieldLabel" : "Price UOM",
300 "forceSelection" : true,
301 "selectOnFocus" : true,
303 "displayField" : "uom_descrip",
304 "emptyText" : "Select uom",
305 "hiddenName" : "item_price_uom_id",
307 "valueField" : "uom_id",
308 "xtype" : "ComboBox",
309 "allowBlank" : false,
313 "$ xns" : "Roo.form",
314 "name" : "item_price_uom_id_uom_descrip",
315 "qtip" : "Select classcode",
317 "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{uom_descrip}</b> </div>",
318 "loadingText" : "Searching...",
322 "|beforeload" : "function (_self, o){\n o.params = o.params || {};\n // set more here\n}\n"
326 "$ sortInfo" : "{ direction : 'ASC', field: 'uom_name' }",
327 "$ xns" : "Roo.data",
331 "$ url" : "baseURL + '/Roo/uom.php'",
332 "xtype" : "HttpProxy",
334 "$ xns" : "Roo.data",
340 "xtype" : "JsonReader",
341 "$ xns" : "Roo.data",
342 "$ fields" : "[\n {\"name\":\"id\",\"type\":\"int\"},\n {\"name\":\"uom_name\",\"type\":\"string\"},\n {\"name\":\"uom_descrip\",\"type\":\"string\"},\n]",
344 "totalProperty" : "total"
351 "fieldLabel" : "Weight",
352 "xtype" : "NumberField",
353 "allowBlank" : false,
354 "allowDecimals" : true,
355 "decimalPrecision" : 2,
357 "$ xns" : "Roo.form",
358 "name" : "item_prodweight"
361 "fieldLabel" : "Item comments",
362 "xtype" : "TextArea",
364 "$ xns" : "Roo.form",
365 "name" : "item_comments",
369 "fieldLabel" : "Item sold",
371 "xtype" : "Checkbox",
374 "$ xns" : "Roo.form",
378 "fieldLabel" : "Item active",
380 "xtype" : "Checkbox",
383 "$ xns" : "Roo.form",
384 "name" : "item_active"
388 "add" : "function (combo)\n{\n Pman.Dialog.XtupleProdcat.show({prodcat_id : 0});\n}",
389 "edit" : "function (combo, record)\n{\n var s = _this.form.findField('item_prodcat_id').getValue() * 1;\n if(s < 1){\n Roo.MessageBox.alert('Error','Please select a account assignment');\n return;\n }\n Pman.Dialog.XtupleProdcat.show({prodcat_id : s});\n}"
391 "alwaysQuery" : true,
393 "triggerAction" : "all",
394 "fieldLabel" : "Product Category",
395 "forceSelection" : true,
396 "selectOnFocus" : true,
398 "displayField" : "prodcat_code",
399 "emptyText" : "Select Category",
400 "hiddenName" : "item_prodcat_id",
402 "valueField" : "prodcat_id",
403 "xtype" : "ComboBox",
404 "allowBlank" : false,
408 "$ xns" : "Roo.form",
409 "name" : "item_prodcat_id_prodcat_code",
410 "qtip" : "Select prodcat",
412 "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{prodcat_code}</b> </div>",
413 "loadingText" : "Searching...",
417 "|beforeload" : "function (_self, o){\n o.params = o.params || {};\n // set more here\n}\n"
421 "$ xns" : "Roo.data",
422 "$ sortInfo" : "{ direction : 'ASC', field: 'id' }",
426 "$ url" : "baseURL + '/Roo/prodcat.php'",
427 "xtype" : "HttpProxy",
429 "$ xns" : "Roo.data",
435 "xtype" : "JsonReader",
436 "$ xns" : "Roo.data",
437 "$ fields" : "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"prodcat_code\",\"type\":\"string\"}]",
439 "totalProperty" : "total"
446 "fieldLabel" : "Sales Account",
447 "xtype" : "DisplayField",
448 "$ xns" : "Roo.form",
449 "name" : "item_salesaccnt"
452 "fieldLabel" : "Item listprice",
453 "xtype" : "NumberField",
455 "$ xns" : "Roo.form",
456 "name" : "item_listprice"
460 "render" : "function (_self)\n{\n _this.standardCostFieldSet = _self;\n}"
462 "xtype" : "FieldSet",
463 "legend" : "Standard Cost",
464 "style" : "width:320px",
465 "$ xns" : "Roo.form",
469 "triggerAction" : "all",
470 "fieldLabel" : "Currency",
471 "forceSelection" : true,
472 "selectOnFocus" : true,
474 "displayField" : "curr_name",
475 "emptyText" : "Select Currency",
476 "hiddenName" : "item_itemcost_id_itemcost_curr_id",
478 "valueField" : "curr_id",
479 "xtype" : "ComboBox",
480 "allowBlank" : false,
484 "$ xns" : "Roo.form",
485 "name" : "curr_name",
486 "qtip" : "Select Currency",
487 "queryParam" : "query[curr_name]",
488 "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{curr_name}</b> </div>",
489 "loadingText" : "Searching...",
493 "|beforeload" : "function (_self, o){\n o.params = o.params || {};\n // set more here\n \n}\n"
497 "$ sortInfo" : "{ direction : 'ASC', field: 'curr_symbol' }",
498 "$ xns" : "Roo.data",
502 "$ url" : "baseURL + '/Roo/curr_symbol.php'",
503 "xtype" : "HttpProxy",
505 "$ xns" : "Roo.data",
511 "xtype" : "JsonReader",
512 "$ xns" : "Roo.data",
513 "$ fields" : "[{\"name\":\"curr_id\",\"type\":\"int\"},\"curr_symbol\"]",
515 "totalProperty" : "total"
522 "fieldLabel" : "Value",
523 "xtype" : "NumberField",
524 "allowBlank" : false,
526 "$ xns" : "Roo.form",
527 "name" : "item_itemcost_id_itemcost_actcost"
535 "$ xns" : "Roo.form",
539 "render" : "function (_self)\n{\n _this.itemsiteFieldSet = _self;\n}"
541 "xtype" : "FieldSet",
542 "legend" : "Itemsite Settings",
543 "$ xns" : "Roo.form",
544 "String/Object/Function style" : "width:335px;",
545 "Number labelWidth" : 120,
548 "fieldLabel" : "Reorder Level",
549 "xtype" : "NumberField",
550 "allowBlank" : false,
552 "$ xns" : "Roo.form",
553 "name" : "item_itemsite_id_itemsite_reorderlevel"
556 "fieldLabel" : "Stock Safety Level",
557 "xtype" : "NumberField",
558 "allowBlank" : false,
560 "$ xns" : "Roo.form",
561 "name" : "item_itemsite_id_itemsite_safetystock"
564 "fieldLabel" : "Lead time (Days)",
565 "xtype" : "NumberField",
566 "allowBlank" : false,
568 "$ xns" : "Roo.form",
569 "name" : "item_itemsite_id_itemsite_leadtime"
573 "triggerAction" : "all",
574 "fieldLabel" : "Control Method",
575 "displayField" : "fname",
576 "hiddenName" : "item_itemsite_id_itemsite_controlmethod",
577 "valueField" : "ftype",
578 "xtype" : "ComboBox",
579 "allowBlank" : false,
582 "$ xns" : "Roo.form",
584 "name" : "item_itemsite_id_itemsite_controlmethod_name",
585 "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{fname}</b> </div>",
588 "xtype" : "SimpleStore",
589 "$ data" : "[ \n [ 'N', \"None\"],\n [ 'R' , \"Regular\"]\n]\n",
590 "$ fields" : "[ 'ftype', 'fname']",
591 "$ xns" : "Roo.data",
598 "triggerAction" : "all",
599 "fieldLabel" : "Planner Code",
600 "forceSelection" : true,
601 "selectOnFocus" : true,
603 "displayField" : "plancode_name",
604 "emptyText" : "Select plancode",
605 "hiddenName" : "item_itemsite_id_itemsite_plancode_id",
607 "valueField" : "plancode_id",
608 "xtype" : "ComboBox",
609 "allowBlank" : false,
613 "$ xns" : "Roo.form",
614 "name" : "plancode_name",
615 "qtip" : "Select plancode",
617 "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{plancode_name}</b> </div>",
618 "loadingText" : "Searching...",
622 "|beforeload" : "function (_self, o){\n o.params = o.params || {};\n // set more here\n}\n"
626 "$ xns" : "Roo.data",
627 "$ sortInfo" : "{ direction : 'ASC', field: 'id' }",
631 "$ url" : "baseURL + '/Roo/plancode.php'",
632 "xtype" : "HttpProxy",
634 "$ xns" : "Roo.data",
640 "xtype" : "JsonReader",
641 "$ xns" : "Roo.data",
642 "$ fields" : "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"plancode_code\",\"type\":\"string\"}]",
644 "totalProperty" : "total"
652 "triggerAction" : "all",
653 "fieldLabel" : "Costcat",
654 "forceSelection" : true,
655 "selectOnFocus" : true,
657 "displayField" : "costcat_code",
658 "emptyText" : "Select costcat",
659 "hiddenName" : "item_itemsite_id_itemsite_costcat_id",
661 "valueField" : "costcat_id",
662 "xtype" : "ComboBox",
663 "allowBlank" : false,
667 "$ xns" : "Roo.form",
668 "name" : "costcat_code",
669 "qtip" : "Select costcat",
671 "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{costcat_code}</b> </div>",
672 "loadingText" : "Searching...",
676 "|beforeload" : "function (_self, o){\n o.params = o.params || {};\n // set more here\n}\n"
680 "$ xns" : "Roo.data",
681 "$ sortInfo" : "{ direction : 'ASC', field: 'id' }",
685 "$ url" : "baseURL + '/Roo/costcat.php'",
686 "xtype" : "HttpProxy",
688 "$ xns" : "Roo.data",
694 "xtype" : "JsonReader",
695 "$ xns" : "Roo.data",
696 "$ fields" : "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"costcat_code\",\"type\":\"string\"}]",
698 "totalProperty" : "total"
705 "fieldLabel" : "Active",
707 "xtype" : "Checkbox",
710 "$ xns" : "Roo.form",
711 "name" : "item_itemsite_id_itemsite_active"
714 "fieldLabel" : "Sold",
716 "xtype" : "Checkbox",
719 "$ xns" : "Roo.form",
720 "name" : "item_itemsite_id_itemsite_sold"
723 "fieldLabel" : "Stocked",
725 "xtype" : "Checkbox",
728 "$ xns" : "Roo.form",
729 "name" : "item_itemsite_id_itemsite_stocked"
732 "fieldLabel" : "Perishable",
734 "xtype" : "Checkbox",
737 "$ xns" : "Roo.form",
738 "name" : "item_itemsite_id_itemsite_perishable"
741 "fieldLabel" : "Multi Location",
743 "xtype" : "Checkbox",
746 "$ xns" : "Roo.form",
747 "name" : "item_itemsite_id_itemsite_loccntrl"
751 "triggerAction" : "all",
752 "fieldLabel" : "Default Location",
753 "forceSelection" : true,
754 "selectOnFocus" : true,
756 "displayField" : "location_name",
757 "emptyText" : "Default Location",
758 "hiddenName" : "item_itemsite_id_itemsite_location_id",
760 "valueField" : "location_id",
761 "xtype" : "ComboBox",
762 "allowBlank" : false,
766 "$ xns" : "Roo.form",
767 "name" : "location_name",
768 "qtip" : "Select terms",
769 "queryParam" : "query[location_name]",
770 "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{location_name}</b> </div>",
771 "loadingText" : "Searching...",
775 "|beforeload" : "function (_self, o){\n o.params = o.params || {};\n // set more here\n o.params.location_netable = 1;\n o.params._notinternalcompany = 1;\n o.params.location_restrict = 0;\n}\n"
779 "$ sortInfo" : "{ direction : 'ASC', field: 'location_name' }",
780 "$ xns" : "Roo.data",
784 "$ url" : "baseURL + '/Roo/location.php'",
786 "xtype" : "HttpProxy",
787 "$ xns" : "Roo.data",
791 "id" : "location_id",
793 "xtype" : "JsonReader",
794 "$ fields" : "[{\"name\":\"location_id\",\"type\":\"int\"},\"location_name\"]",
795 "$ xns" : "Roo.data",
797 "totalProperty" : "total"
809 "$ xns" : "Roo.form",
819 "|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}"
824 "title" : "Item Parts",
825 "xtype" : "GridPanel",
826 "fitContainer" : true,
828 "tableName" : "bomitem",
832 "beforeedit" : "function (e)\n{\n if(e.field != 'bomitem_qtyper'){\n return false;\n }\n \n}",
833 "|render" : "function() \n{\n _this.partsgrid = this; \n //_this.dialog = Pman.Dialog.FILL_IN\n if (_this.partspanel.active) {\n this.footer.onClick('first');\n }\n}",
834 "afteredit" : "function (e)\n{\n if(e.originalValue == e.value){\n return false;\n }\n \n \n new Pman.Request({\n method : 'POST',\n url : baseURL + '/Roo/bomitem.php',\n mask : 'Saving',\n params : {\n bomitem_id : e.record.data.bomitem_id,\n bomitem_qtyper : e.value\n },\n success : function() {\n e.record.set('bomitem_qtyper', e.value);\n }\n \n });\n \n \n \n \n}"
836 "autoExpandColumn" : "bomitem_item_id_item_descrip1",
837 "xtype" : "EditorGrid",
840 "$ xns" : "Roo.grid",
846 "* prop" : "toolbar",
850 "render" : "function (_self)\n{\n _this.partsBox = _self;\n}",
851 "select" : "function (combo, record, index)\n{\n var item_id = _this.form.findField('item_id').getValue() * 1;\n \n if(typeof(record) == 'undefined' || !record || record.data.id * 1 < 1 || item_id < 1){\n return;\n }\n \n var err = false;\n\n _this.partsgrid.ds.each(function(d){\n if(record.data.item_id == d.data.bomitem_item_id){\n err = true;\n }\n });\n\n if(err){\n Roo.MessageBox.alert('Error', record.data.item_number + ' already exists!');\n _this.partsBox.reset();\n return;\n }\n \n new Pman.Request({\n url : baseURL + '/Roo/bomitem.php',\n method : 'POST',\n params : {\n bomitem_parent_item_id : item_id,\n bomitem_item_id : record.data.item_id,\n bomitem_qtyper : 1\n }, \n success : function(res) {\n _this.partsBox.reset();\n _this.partsgrid.footer.onClick('first');\n }\n }); \n}"
853 "alwaysQuery" : true,
854 "triggerAction" : "all",
855 "fieldLabel" : "Item",
856 "forceSelection" : true,
857 "selectOnFocus" : true,
859 "displayField" : "item_number",
860 "emptyText" : "Select item",
863 "xtype" : "ComboBox",
868 "$ xns" : "Roo.bootstrap",
869 "qtip" : "Select item",
870 "queryParam" : "query[number_or_name]",
871 "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{item_number}</b> </div>",
872 "loadingText" : "Searching...",
876 "|beforeload" : "function (_self, o){\n o.params = o.params || {};\n \n o.params.item_active = 1;\n o.params['!item_type'] = 'K';\n}\n"
880 "$ sortInfo" : "{ direction : 'ASC', field: 'item_number' }",
881 "$ xns" : "Roo.data",
885 "$ url" : "baseURL + '/Roo/item.php'",
887 "xtype" : "HttpProxy",
888 "$ xns" : "Roo.data",
894 "xtype" : "JsonReader",
895 "$ fields" : "[\n {\"name\":\"id\",\"type\":\"int\"},\n {\"name\":\"item_number\",\"type\":\"string\"}\n]",
896 "$ xns" : "Roo.data",
898 "totalProperty" : "total"
906 "$ xns" : "Roo.Toolbar"
910 "|click" : "function ()\n{\n var sel = _this.partsgrid.getSelectionModel().getSelectedCell();\n \n if(!sel || !sel.length){\n Roo.MessageBox.alert(\"Error\", \"Please select a item from below list\");\n return;\n }\n \n var d = _this.partsgrid.ds.getAt(sel[0]); \n \n if(d.data.bomitem_id * 1 < 1){\n Roo.MessageBox.alert(\"Error\", \"Invaild selection\");\n return;\n }\n \n new Pman.Request({\n url : baseURL + '/Roo/bomitem.php',\n method : 'POST',\n params : {\n _delete : d.data.bomitem_id\n }, \n success : function(res) {\n _this.partsgrid.footer.onClick('first');\n }\n }); \n \n}"
914 "cls" : "x-btn-text-icon",
915 "$ icon" : "rootURL + '/Pman/templates/images/trash.gif'",
922 "beforeload" : "function (_self, o)\n{\n o.params = o.params || {};\n \n var id = _this.form.findField('item_id').getValue() * 1;\n if(id < 1){\n return false;\n }\n \n o.params.bom_parent_item_id = id;\n}"
926 "$ sortInfo" : "{ field : 'bomitem_item_id_item_name', direction: 'ASC' }",
927 "$ xns" : "Roo.data",
928 "* prop" : "dataSource",
931 "$ url" : "baseURL + '/Roo/bomitem.php'",
932 "xtype" : "HttpProxy",
934 "$ xns" : "Roo.data",
940 "xtype" : "JsonReader",
941 "$ fields" : "[\n {\n 'name': 'bomitem_id',\n 'type': 'int'\n }\n]",
942 "$ xns" : "Roo.data",
944 "totalProperty" : "total"
950 "xtype" : "PagingToolbar",
951 "emptyMsg" : "Nothing found",
953 "displayMsg" : "Displaying parts {0} - {1} of {2}",
954 "displayInfo" : true,
958 "xtype" : "ColumnModel",
961 "$ renderer" : "function(v) { return String.format('{0}', v); }",
962 "$ xns" : "Roo.grid",
963 "* prop" : "colModel[]",
964 "dataIndex" : "bomitem_item_id_item_number"
967 "xtype" : "ColumnModel",
968 "header" : "Description",
970 "$ renderer" : "function(v) { return String.format('{0}', v); }",
971 "$ xns" : "Roo.grid",
972 "* prop" : "colModel[]",
973 "dataIndex" : "bomitem_item_id_item_descrip1"
976 "xtype" : "ColumnModel",
977 "String align" : "right",
980 "$ renderer" : "function(v) { return String.format('{0}', v); }",
981 "$ xns" : "Roo.grid",
982 "* prop" : "colModel[]",
983 "dataIndex" : "bomitem_qtyper",
986 "xtype" : "GridEditor",
987 "$ xns" : "Roo.grid",
991 "Boolean allowBlank" : false,
992 "String cls" : "align-right",
993 "xtype" : "NumberField",
994 "Number decimalPrecision" : 0,
995 "$ xns" : "Roo.form",
997 "Number minValue" : 0
1009 "|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}"
1011 "fitToframe" : true,
1012 "background" : true,
1013 "region" : "center",
1014 "title" : "Reference Files",
1015 "xtype" : "GridPanel",
1016 "fitContainer" : true,
1018 "tableName" : "Images",
1022 "|rowdblclick" : "function (_self, rowIndex, e)\n{\n \n var s = _self.getDataSource().getAt(rowIndex);\n new Pman.Download({\n url : baseURL + '/Images/Download/' + s.data.id\n });\n \n}",
1023 "|render" : "function() { \n _this.grid = this; \n\n if (_this.panel.active) {\n this.footer.onClick('first');\n }\n}"
1025 "autoExpandColumn" : "id",
1028 "$ xns" : "Roo.grid",
1033 "beforeload" : "function (_self, o)\n{\n o.params = o.params || {};\n \n var id = _this.form.findField('item_id').getValue();\n \n if(id * 1 < 1){\n return false;\n }\n \n o.params.onid = id;\n o.params.ontable = 'item';\n \n}"
1036 "remoteSort" : true,
1037 "$ sortInfo" : "{ field: 'created' , direction: 'DESC' }",
1038 "$ xns" : "Roo.data",
1039 "* prop" : "dataSource",
1044 "xtype" : "JsonReader",
1045 "$ fields" : "[\n {\n 'name': 'id',\n 'type': 'int'\n },\n {\n 'name': 'filename',\n 'type': 'string'\n },\n {\n 'name': 'ontable',\n 'type': 'string'\n },\n {\n 'name': 'onid',\n 'type': 'int'\n },\n {\n 'name': 'mimetype',\n 'type': 'string'\n },\n {\n 'name': 'width',\n 'type': 'int'\n },\n {\n 'name': 'height',\n 'type': 'int'\n },\n {\n 'name': 'filesize',\n 'type': 'int'\n },\n {\n 'name': 'displayorder',\n 'type': 'int'\n },\n {\n 'name': 'language',\n 'type': 'string'\n },\n {\n 'name': 'parent_image_id',\n 'type': 'int'\n },\n {\n 'name': 'created',\n 'type': 'date',\n 'dateFormat' : 'Y-m-d H:i:s'\n },\n {\n 'name': 'imgtype',\n 'type': 'string'\n },\n {\n 'name': 'linkurl',\n 'type': 'string'\n },\n {\n 'name': 'descript',\n 'type': 'string'\n },\n {\n 'name': 'title',\n 'type': 'string'\n }\n]",
1046 "$ xns" : "Roo.data",
1047 "* prop" : "reader",
1048 "totalProperty" : "total"
1051 "$ url" : "baseURL + '/Roo/Images.php'",
1052 "xtype" : "HttpProxy",
1054 "$ xns" : "Roo.data",
1061 "xtype" : "PagingToolbar",
1062 "emptyMsg" : "No Images found",
1064 "displayInfo" : true,
1065 "displayMsg" : "Displaying Images {0} - {1} of {2}",
1069 "xtype" : "Toolbar",
1071 "* prop" : "toolbar",
1075 "|click" : "function()\n{\n Pman.Dialog.Image.show({\n id : 0, \n ontable: 'item',\n onid: _this.form.findField('item_id').getValue() * 1,\n imgtype : ''\n }, function(data){\n if (!data) { return; } \n _this.grid.footer.onClick('first');\n }); \n\n} "
1079 "cls" : "x-btn-text-icon",
1080 "$ icon" : "Roo.rootURL + 'images/default/dd/drop-add.gif'",
1081 "$ xns" : "Roo.Toolbar"
1085 "|click" : "function()\n{\n Pman.genericDelete(_this, 'Images'); \n}\n "
1089 "cls" : "x-btn-text-icon",
1090 "$ icon" : "rootURL + '/Pman/templates/images/trash.gif'",
1091 "$ xns" : "Roo.Toolbar"
1096 "xtype" : "ColumnModel",
1098 "header" : "Created",
1100 "$ renderer" : "function(v,x,r) {\n return String.format('{0}<br/><i>{1}</i><br/>{2}<br/><i>{3}x{4}</i>',\n v.format('d/M/Y'), r.data.mimetype, r.data.filename,\n r.data.width, r.data.height\n ); \n}\n ",
1101 "$ xns" : "Roo.grid",
1102 "* prop" : "colModel[]",
1103 "dataIndex" : "created"
1106 "xtype" : "ColumnModel",
1109 "$ renderer" : "function(v,x,r) { return String.format('<img src=\"{0}/Images/Thumb/100/{1}/{2}\" height=\"100\">', baseURL, v, r.data.filename); }",
1110 "$ xns" : "Roo.grid",
1111 "* prop" : "colModel[]",
1120 "|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}"
1122 "fitToframe" : true,
1123 "background" : true,
1124 "region" : "center",
1125 "title" : "Price List",
1126 "xtype" : "GridPanel",
1127 "fitContainer" : true,
1129 "tableName" : "ipshead",
1133 "beforeedit" : "function (e)\n{\n if(e.field != 'ipshead_ipsitem_price'){\n return false;\n }\n \n}",
1134 "|render" : "function() \n{\n _this.lgrid = this; \n //_this.dialog = Pman.Dialog.FILL_IN\n if (_this.lpanel.active) {\n this.footer.onClick('first');\n }\n}",
1135 "afteredit" : "function (e)\n{\n if(e.originalValue == e.value){\n return false;\n }\n \n var id = _this.form.findField('item_id').getValue() * 1;\n if(id < 1){\n return false;\n }\n \n new Pman.Request({\n method : 'POST',\n url : baseURL + '/Roo/ipsiteminfo',\n mask : 'Saving',\n params : {\n ipsitem_ipshead_id : e.record.data.ipshead_id,\n ipsitem_item_id : id,\n ipsitem_price : e.record.data.ipshead_ipsitem_price,\n ipsitem_id : e.record.data.ipshead_ipsitem_id\n }\n \n });\n \n \n \n \n}"
1137 "autoExpandColumn" : "ipshead_descrip",
1138 "xtype" : "EditorGrid",
1141 "$ xns" : "Roo.grid",
1146 "beforeload" : "function (_self, o)\n{\n o.params = o.params || {};\n \n var id = _this.form.findField('item_id').getValue() * 1;\n if(id < 1){\n return false;\n }\n \n o.params._with_item = id;\n}"
1149 "remoteSort" : true,
1150 "$ sortInfo" : "{ field : 'ipshead_id', direction: 'ASC' }",
1151 "$ xns" : "Roo.data",
1152 "* prop" : "dataSource",
1155 "$ url" : "baseURL + '/Roo/ipshead.php'",
1157 "xtype" : "HttpProxy",
1158 "$ xns" : "Roo.data",
1162 "id" : "ipshead_id",
1164 "xtype" : "JsonReader",
1165 "$ fields" : "[\n {\n 'name': 'ipshead_id',\n 'type': 'int'\n },\n {\n 'name': 'ipshead_name',\n 'type': 'string'\n }\n]",
1166 "$ xns" : "Roo.data",
1167 "* prop" : "reader",
1168 "totalProperty" : "total"
1174 "xtype" : "PagingToolbar",
1175 "emptyMsg" : "Nothing found",
1177 "displayMsg" : "Displaying records {0} - {1} of {2}",
1178 "displayInfo" : true,
1182 "xtype" : "ColumnModel",
1185 "$ renderer" : "function(v) { return String.format('{0}', v); }",
1186 "$ xns" : "Roo.grid",
1187 "* prop" : "colModel[]",
1188 "dataIndex" : "ipshead_name"
1191 "xtype" : "ColumnModel",
1193 "header" : "Description",
1194 "$ renderer" : "function(v) { return String.format('{0}', v); }",
1195 "$ xns" : "Roo.grid",
1196 "* prop" : "colModel[]",
1197 "dataIndex" : "ipshead_descrip"
1200 "xtype" : "ColumnModel",
1202 "header" : "Currency",
1203 "$ renderer" : "function(v) { return String.format('{0}', v); }",
1204 "$ xns" : "Roo.grid",
1205 "* prop" : "colModel[]",
1206 "dataIndex" : "ipshead_curr_id_curr_name"
1210 "xtype" : "ColumnModel",
1213 "$ renderer" : "function(v) { return String.format('{0}', Roo.util.Format.number(v*1,2)); }",
1214 "$ xns" : "Roo.grid",
1215 "* prop" : "colModel[]",
1216 "dataIndex" : "ipshead_ipsitem_price",
1219 "xtype" : "GridEditor",
1220 "$ xns" : "Roo.grid",
1221 "* prop" : "editor",
1224 "xtype" : "NumberField",
1225 "cls" : "align-right",
1226 "decimalPrecision" : 2,
1227 "$ xns" : "Roo.form",
1240 "|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}"
1242 "fitToframe" : true,
1243 "background" : true,
1244 "region" : "center",
1245 "title" : "Suppliers",
1246 "xtype" : "GridPanel",
1247 "fitContainer" : true,
1249 "tableName" : "itemsrc",
1253 "|rowdblclick" : "function (_self, rowIndex, e)\n{\n if (!_this.dialog) return;\n _this.dialog.show( this.getDataSource().getAt(rowIndex).data, function() {\n _this.grid.footer.onClick('first');\n }); \n}\n",
1254 "|render" : "function() \n{\n _this.itemsrcgrid = this; \n \n if (_this.itemsrcpanel.active) {\n this.footer.onClick('first');\n }\n}",
1255 "afteredit" : "function (e)\n{\n e.record.commit();\n}"
1257 "autoExpandColumn" : "itemsrc_comments",
1258 "xtype" : "EditorGrid",
1261 "$ xns" : "Roo.grid",
1266 "update" : "function (_self, record, operation)\n{\n Roo.log(operation);\n Roo.log(record);\n \n if (operation != 'commit') {\n return;\n }\n if (record.data.itemsrc_vend_id * 1 < 1) {\n return; // do not save.\n }\n if (record.data.itemsrc_id * 1 < 0) {\n return; // do not save. -- updating at present...\n }\n \n var p = Roo.apply({}, record.data);\n record.set('itemsrc_id', -1); \n \n new Pman.Request({\n url : baseURL + '/Roo/Itemsrc',\n params : p,\n method : 'POST',\n success: function(res) {\n if (record.data.itemsrc_id *1 < 1) { \n record.set('itemsrc_id', res.data.itemsrc_id);\n }\n }\n });\n \n \n}",
1267 "beforeload" : "function (_self, o)\n{\n \n var id = 1 * _this.form.findField('item_id').getValue();\n if (!id) {\n this.removeAll();\n return false;\n }\n o.params.itemsrc_item_id = id;\n}"
1270 "remoteSort" : true,
1271 "$ sortInfo" : "{ field : 'itemsrc_vend_id_vend_name', direction: 'ASC' }",
1272 "$ xns" : "Roo.data",
1273 "* prop" : "dataSource",
1276 "$ url" : "baseURL + '/Roo/itemsrc.php'",
1277 "xtype" : "HttpProxy",
1279 "$ xns" : "Roo.data",
1285 "xtype" : "JsonReader",
1286 "$ xns" : "Roo.data",
1287 "$ fields" : "[\n {\n 'name': 'itemsrc_id',\n 'type': 'int'\n },\n {\n 'name': 'itemsrc_item_id',\n 'type': 'int'\n },\n {\n 'name': 'itemsrc_item_id',\n 'type': 'int'\n },\n {\n 'name': 'itemsrc_vend_id',\n 'type': 'int'\n },\n {\n 'name': 'itemsrc_vend_id',\n 'type': 'int'\n },\n {\n 'name': 'itemsrc_vend_item_number',\n 'type': 'string'\n },\n {\n 'name': 'itemsrc_vend_item_descrip',\n 'type': 'string'\n },\n {\n 'name': 'itemsrc_comments',\n 'type': 'string'\n },\n {\n 'name': 'itemsrc_vend_uom',\n 'type': 'string'\n },\n {\n 'name': 'itemsrc_invvendoruomratio',\n 'type': 'float'\n },\n {\n 'name': 'itemsrc_minordqty',\n 'type': 'float'\n },\n {\n 'name': 'itemsrc_multordqty',\n 'type': 'float'\n },\n {\n 'name': 'itemsrc_leadtime',\n 'type': 'int'\n },\n {\n 'name': 'itemsrc_ranking',\n 'type': 'int'\n },\n {\n 'name': 'itemsrc_active',\n 'type': 'int'\n },\n {\n 'name': 'itemsrc_manuf_name',\n 'type': 'string'\n },\n {\n 'name': 'itemsrc_manuf_item_number',\n 'type': 'string'\n },\n {\n 'name': 'itemsrc_manuf_item_descrip',\n 'type': 'string'\n },\n {\n 'name': 'itemsrc_default',\n 'type': 'int'\n },\n {\n 'name': 'itemsrc_upccode',\n 'type': 'string'\n }\n]",
1288 "* prop" : "reader",
1289 "totalProperty" : "total"
1295 "xtype" : "PagingToolbar",
1296 "emptyMsg" : "No itemsrc found",
1298 "displayInfo" : true,
1299 "displayMsg" : "Displaying itemsrc{0} - {1} of {2}",
1303 "xtype" : "Toolbar",
1305 "* prop" : "toolbar",
1309 "|click" : "function()\n{\n \n Roo.log(\"add presed\");\n \n // work out last \n var grid = _this.itemsrcgrid;\n \n // uses form defaults or last row value.\n var nr = grid.ds.reader.newRow({\n itemsrc_id : 0,\n itemsrc_item_id : _this.form.findField('item_id').getValue(),\n itemsrc_vend_id : 0,\n itemsrc_vend_id_vend_name : '',\n itemsrc_vend_item_number : '',\n itemsrc_vend_item_descrip : '',\n itemsrc_comments : '',\n itemsrc_vend_uom : 'EA',\n itemsrc_invvendoruomratio : 1.0,\n itemsrc_minordqty : 0,\n itemsrc_multordqty : 0,\n itemsrc_leadtime : 30,\n itemsrc_ranking : 0,\n itemsrc_active : true,\n itemsrc_manuf_name : '',\n itemsrc_manuf_item_number : '',\n itemsrc_manuf_item_descrip: '',\n itemsrc_default : true,\n itemsrc_upccode : ''\n \n });\n grid.stopEditing();\n grid.ds.insert(0, nr); \n grid.startEditing(0, 0); // type..\n\n}\n \n"
1313 "cls" : "x-btn-text-icon",
1314 "$ icon" : "Roo.rootURL + 'images/default/dd/drop-add.gif'",
1315 "$ xns" : "Roo.Toolbar"
1320 "xtype" : "ColumnModel",
1322 "header" : "Vendor",
1323 "$ renderer" : "function(v,x,r) { return String.format('{0}', r.data.itemsrc_vend_id_vend_name); }",
1324 "$ xns" : "Roo.grid",
1325 "* prop" : "colModel[]",
1326 "dataIndex" : "itemsrc_vend_id",
1329 "xtype" : "GridEditor",
1330 "$ xns" : "Roo.grid",
1331 "* prop" : "editor",
1335 "triggerAction" : "all",
1336 "forceSelection" : true,
1337 "selectOnFocus" : true,
1339 "displayField" : "vend_name",
1340 "emptyText" : "Select Vendor",
1341 "hiddenName" : "itemsrc_vend_id",
1343 "valueField" : "vend_id",
1344 "xtype" : "ComboBox",
1345 "allowBlank" : false,
1349 "$ xns" : "Roo.form",
1351 "name" : "itemsrc_vend_id_vend_name",
1352 "qtip" : "Select vendinfo",
1353 "queryParam" : "q[search]",
1354 "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{vend_name}</b> </div>",
1355 "loadingText" : "Searching...",
1359 "|beforeload" : "function (_self, o){\n o.params = o.params || {};\n // set more here\n}\n"
1362 "remoteSort" : true,
1363 "$ xns" : "Roo.data",
1364 "$ sortInfo" : "{ direction : 'ASC', field: 'id' }",
1368 "$ url" : "baseURL + '/Roo/vendinfo.php'",
1369 "xtype" : "HttpProxy",
1371 "$ xns" : "Roo.data",
1377 "xtype" : "JsonReader",
1378 "$ xns" : "Roo.data",
1379 "$ fields" : "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"vend_name\",\"type\":\"string\"}]",
1380 "* prop" : "reader",
1381 "totalProperty" : "total"
1392 "xtype" : "ColumnModel",
1394 "header" : "Vendor Ref#",
1395 "$ renderer" : "function(v) { return String.format('{0}', v); }",
1396 "$ xns" : "Roo.grid",
1397 "* prop" : "colModel[]",
1398 "dataIndex" : "itemsrc_vend_item_number",
1401 "xtype" : "GridEditor",
1402 "$ xns" : "Roo.grid",
1403 "* prop" : "editor",
1406 "xtype" : "TextField",
1407 "$ xns" : "Roo.form",
1415 "xtype" : "ColumnModel",
1417 "header" : "Comments",
1418 "$ renderer" : "function(v) { return String.format('{0}', v); }",
1419 "$ xns" : "Roo.grid",
1420 "* prop" : "colModel[]",
1421 "dataIndex" : "itemsrc_comments",
1424 "xtype" : "GridEditor",
1425 "$ xns" : "Roo.grid",
1426 "* prop" : "editor",
1429 "xtype" : "TextField",
1430 "$ xns" : "Roo.form",
1438 "xtype" : "ColumnModel",
1441 "$ renderer" : "function(v) { return String.format('{0}', v); }",
1442 "$ xns" : "Roo.grid",
1443 "* prop" : "colModel[]",
1444 "dataIndex" : "itemsrc_vend_uom"
1448 "xtype" : "ColumnModel",
1449 "header" : "Min Qty",
1451 "$ renderer" : "function(v) { return String.format('{0}', v); }",
1452 "$ xns" : "Roo.grid",
1453 "* prop" : "colModel[]",
1454 "dataIndex" : "itemsrc_minordqty",
1457 "xtype" : "GridEditor",
1458 "$ xns" : "Roo.grid",
1459 "* prop" : "editor",
1463 "xtype" : "NumberField",
1464 "decimalPrecision" : 0,
1465 "$ xns" : "Roo.form",
1474 "xtype" : "ColumnModel",
1475 "header" : "Lead time",
1477 "$ renderer" : "function(v) { return String.format('{0}', v); }",
1478 "$ xns" : "Roo.grid",
1479 "* prop" : "colModel[]",
1480 "dataIndex" : "itemsrc_leadtime",
1483 "xtype" : "GridEditor",
1484 "$ xns" : "Roo.grid",
1485 "* prop" : "editor",
1489 "xtype" : "NumberField",
1490 "decimalPrecision" : 0,
1491 "$ xns" : "Roo.form",
1499 "xtype" : "ColumnModel",
1501 "header" : "Active",
1502 "$ renderer" : "function(v) { return String.format('{0}', v); }",
1503 "$ xns" : "Roo.grid",
1504 "* prop" : "colModel[]",
1505 "dataIndex" : "itemsrc_active"
1513 "|activate" : "function() {\n _this.hpanel = this;\n if (_this.hgrid) {\n _this.hgrid.footer.onClick('first');\n }\n}"
1515 "fitToframe" : true,
1516 "background" : true,
1517 "region" : "center",
1518 "title" : "History",
1519 "xtype" : "GridPanel",
1520 "fitContainer" : true,
1522 "tableName" : "events",
1526 "|render" : "function() \n{\n _this.hgrid = this; \n if (_this.hpanel.active) {\n this.footer.onClick('first');\n }\n}"
1528 "autoExpandColumn" : "remarks",
1531 "$ xns" : "Roo.grid",
1536 "beforeload" : "function (_self, options)\n{\n options.params = options.params || {};\n \n options.params.on_table = 'item';\n options.params.on_id = _this.form.findField('item_id').getValue();\n}"
1539 "remoteSort" : true,
1540 "$ sortInfo" : "{ field : 'event_when', direction: 'DESC' }",
1541 "$ xns" : "Roo.data",
1542 "* prop" : "dataSource",
1545 "$ url" : "baseURL + '/Roo/events.php'",
1547 "xtype" : "HttpProxy",
1548 "$ xns" : "Roo.data",
1554 "xtype" : "JsonReader",
1555 "$ fields" : "[\n {\n 'name': 'event_when',\n 'type': 'date'\n },\n {\n 'name': 'action',\n 'type': 'string'\n },\n {\n 'name': 'ipaddr',\n 'type': 'string'\n },\n {\n 'name': 'person_id_name',\n 'type': 'string'\n },\n {\n 'name': 'remarks',\n 'type': 'string'\n }\n]",
1556 "$ xns" : "Roo.data",
1557 "* prop" : "reader",
1558 "totalProperty" : "total"
1564 "xtype" : "PagingToolbar",
1565 "emptyMsg" : "No Events found",
1567 "displayMsg" : "Displaying events{0} - {1} of {2}",
1568 "displayInfo" : true,
1572 "xtype" : "ColumnModel",
1574 "header" : "Changed",
1575 "$ renderer" : "function(v) { return String.format('{0}', v ? v.format('d/M/Y H:i:s') : ''); }",
1576 "$ xns" : "Roo.grid",
1577 "* prop" : "colModel[]",
1578 "dataIndex" : "event_when"
1581 "xtype" : "ColumnModel",
1583 "header" : "Action",
1584 "$ renderer" : "function(v,x,r) { return String.format('{0} - {1}', v, r.data.on_table); }",
1585 "$ xns" : "Roo.grid",
1586 "* prop" : "colModel[]",
1587 "dataIndex" : "action"
1590 "xtype" : "ColumnModel",
1592 "header" : "IP Address",
1593 "$ renderer" : "function(v) { return String.format('{0}', v); }",
1594 "$ xns" : "Roo.grid",
1595 "* prop" : "colModel[]",
1596 "dataIndex" : "ipaddr"
1599 "xtype" : "ColumnModel",
1602 "$ renderer" : "function(v) { return String.format('{0}', v); }",
1603 "$ xns" : "Roo.grid",
1604 "* prop" : "colModel[]",
1605 "dataIndex" : "person_id_name"
1608 "xtype" : "ColumnModel",
1611 "$ renderer" : "function(v) { return String.format('{0}', v); }",
1612 "$ xns" : "Roo.grid",
1613 "* prop" : "colModel[]",
1614 "dataIndex" : "remarks"
1622 "click" : "function (_self, e)\n{\n _this.dialog.hide();\n}"
1627 "* prop" : "buttons[]"
1631 "render" : "function (_self)\n{\n _this.saveBtn = this;\n}",
1632 "click" : "function (_self, e)\n{\n // do some checks?\n \n \n // _this.dialog.el.mask(\"Saving\");\n _this.form.doAction(\"submit\");\n\n}"
1637 "* prop" : "buttons[]"