2 "name" : "Pman.Dialog.XtupleItem",
5 "path" : "/home/edward/gitlive/web.xtuple/Pman/Xtuple/Pman.Dialog.XtupleItem.bjs",
9 "be53a0541a6d36f6ecb879fa2c584b08" : "Image",
10 "346577d22bb510368e3eddab5df2ca13" : "Reference Files",
11 "f2a6c498fb90ee345d997f888fce3b18" : "Delete",
12 "956e816fa19ca04485c7101adbe07762" : "Displaying records {0} - {1} of {2}",
13 "82a43f89af6d331d80d441624c5c71fa" : "Default Location",
14 "538a3c9d82a4ea4250b987a357d41184" : "Item Parts",
15 "69395719de41dd8a31905b1e94c91816" : "Select classcode",
16 "03ab340b3f99e03cff9e84314ead38c0" : "Qty",
17 "5b8c99dad1893a85076709b2d3c2d2d0" : "IP Address",
18 "045a1ac263ac3a9b7420208bdc2df423" : "Select costcat",
19 "0c81971f67c0bd4b33799c5365ec2bf5" : "No Images found",
20 "151ccf95db9b81c11bb20fbc302af4b6" : "Select terms",
21 "786410e93beb0193d89f8608c54feb4b" : "Select item",
22 "0ac9012a8c03a76ee76f04321b3b7fda" : "Lead time",
23 "675c9bd3bbae30af03fe74346dcae9a7" : "Edit / Create item",
24 "dd24f967299e81b9603cb071693d5c32" : "Select vendinfo",
25 "023a5dfa857c4aa0156e6685231a1dbd" : "Select Type",
26 "e8586011952b0d098b0e568f20ca2b1f" : "Select Currency",
27 "8413c683b4b27cc3f4dbd4c90329d8ba" : "Comments",
28 "820dbd2b8f606aff866c0bbfb6b737c1" : "Changed",
29 "0eceeb45861f9585dd7a97a3e36f85c6" : "Created",
30 "ec211f7c20af43e742bf2570c3cb84f9" : "Add",
31 "9076cbba1d9ef79280b4f39e2aa0d115" : "Nothing found",
32 "386c339d37e737a436499d423a77df0c" : "Currency",
33 "1243daf593fa297e07ab03bf06d925af" : "Searching...",
34 "7be1fa478799242847d4ef861ff6f8e1" : "Min Qty",
35 "76729937a5eb6b0fd88c42581161facd" : "Select Category",
36 "19df363d15888baa395364fbcd230c05" : "No itemsrc found",
37 "49ee3087348e8d44e1feda1917443987" : "Name",
38 "0d122b17933ab4173e9d75d55fc5e764" : "Standard Cost",
39 "df2ad52a14d681b1cd8495f8650fdb56" : "Select prodcat",
40 "e5353fc67b122d1b42181073b46cd060" : "Vendor Ref#",
41 "c19ea8f7a11074ac743c58d34830b233" : "Select plancode",
42 "ea4788705e6873b424c65e91c2846b19" : "Cancel",
43 "20f39d1311ccbd3b7e61cdd4978719f9" : "Itemsite Settings",
44 "1656a671ba692e15836cd85df374556c" : "Price List",
45 "bb8913cd17d59f182acc7be1020007b7" : "UOM",
46 "76d5bf9597c882d6513f71759df298d5" : "Displaying parts {0} - {1} of {2}",
47 "3601146c4e948c32b6424d2c0a7f0118" : "Price",
48 "1814d65a76028fdfbadab64a5a8076df" : "Suppliers",
49 "90e4ac2e5a22e53df63b6b186d8727ba" : "No Events found",
50 "4ee972120bcda675f75222c87cb9d356" : "Who",
51 "16d2b386b2034b9488996466aaae0b57" : "History",
52 "089ba2b5edc96565fc22c584ecfbb1a6" : "Displaying events{0} - {1} of {2}",
53 "b5a7adde1af5c87d7fd797b6245c2a39" : "Description",
54 "7f841b4d2f7280eb82318988c6d649d1" : "Displaying itemsrc{0} - {1} of {2}",
55 "c0ed345ec857c06b31f7e88745c9bc40" : "Displaying Images {0} - {1} of {2}",
56 "a254c25adc7d10d7e9c4889484f875a5" : "Detail",
57 "c9cc8cce247e49bae79f15173ce97354" : "Save",
58 "ec9ceefe0c19f4c029008c23e3c947b7" : "Vendor",
59 "4d3d769b812b6faa6b76e1a8abaece2d" : "Active",
60 "004bf6c9a40003140292e97330236c53" : "Action",
61 "f4c6f851b00d5518bf888815de279aba" : "Notes",
62 "f9838de820f2a2e16241033270c68e29" : "Select uom",
63 "1063e38cb53d94d386f21227fcd84717" : "Remove",
64 "7996af9149ed376ce252e35c4da7146b" : "Select Vendor"
69 "show" : "function (_self)\n{\n _this.dialog.layout.getRegion('center').showPanel(0);\n}"
72 "collapsible" : false,
73 "title" : "Edit / Create item",
74 "xtype" : "LayoutDialog",
82 "alwaysShowTabs" : true,
83 "xtype" : "LayoutRegion",
84 "tabPosition" : "top",
91 "xtype" : "ContentPanel",
96 "|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",
97 "|rendered" : "function (form)\n{\n _this.form= form;\n}\n"
99 "$ url" : "baseURL + '/Roo/item.php'",
101 "style" : "margin:10px;",
104 "$ xns" : "Roo.form",
107 "fieldLabel" : "SKU",
108 "xtype" : "TextField",
109 "allowBlank" : false,
111 "$ xns" : "Roo.form",
112 "name" : "item_number"
115 "fieldLabel" : "Description",
116 "xtype" : "TextField",
118 "$ xns" : "Roo.form",
119 "name" : "item_descrip1"
122 "fieldLabel" : "Description (2)",
123 "xtype" : "TextField",
125 "$ xns" : "Roo.form",
126 "name" : "item_descrip2"
131 "$ xns" : "Roo.form",
135 "beforeselect" : "function (combo, record, index)\n{\n (function() { combo.showHide(); }).defer(100);\n}"
138 "triggerAction" : "all",
139 "fieldLabel" : "Type",
140 "displayField" : "fname",
141 "emptyText" : "Select Type",
142 "hiddenName" : "item_type",
143 "valueField" : "ftype",
144 "xtype" : "ComboBox",
145 "allowBlank" : false,
146 "$ 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",
149 "$ xns" : "Roo.form",
151 "name" : "item_type_name",
152 "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{fname}</b> </div>",
155 "xtype" : "SimpleStore",
156 "$ data" : "[ \n [ 'P', \"Purchased (eg. a standard product)\"],\n [ 'R' , \"Reference (Non-Product)\"],\n [ 'K', \"Kit (made up of products)\"] \n]\n",
157 "$ fields" : "[ 'ftype', 'fname']",
158 "$ xns" : "Roo.data",
165 "triggerAction" : "all",
166 "fieldLabel" : "Class",
167 "forceSelection" : true,
168 "selectOnFocus" : true,
170 "displayField" : "classcode_code",
171 "emptyText" : "Select classcode",
172 "hiddenName" : "item_classcode_id",
174 "valueField" : "classcode_id",
175 "xtype" : "ComboBox",
176 "allowBlank" : false,
180 "$ xns" : "Roo.form",
181 "name" : "item_classcode_id_classcode_code",
182 "qtip" : "Select classcode",
184 "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{classcode_code}</b> </div>",
185 "loadingText" : "Searching...",
189 "|beforeload" : "function (_self, o){\n o.params = o.params || {};\n // set more here\n}\n"
193 "$ sortInfo" : "{ direction : 'ASC', field: 'id' }",
194 "$ xns" : "Roo.data",
198 "$ url" : "baseURL + '/Roo/classcode.php'",
200 "xtype" : "HttpProxy",
201 "$ xns" : "Roo.data",
207 "xtype" : "JsonReader",
208 "$ xns" : "Roo.data",
209 "$ fields" : "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"classcode_code\",\"type\":\"string\"}]",
211 "totalProperty" : "total"
219 "triggerAction" : "all",
220 "fieldLabel" : "Invoice UOM",
221 "forceSelection" : true,
222 "selectOnFocus" : true,
224 "displayField" : "uom_descrip",
225 "emptyText" : "Select uom",
226 "hiddenName" : "item_inv_uom_id",
228 "valueField" : "uom_id",
229 "xtype" : "ComboBox",
230 "allowBlank" : false,
234 "$ xns" : "Roo.form",
235 "name" : "item_inv_uom_id_uom_descrip",
236 "qtip" : "Select classcode",
238 "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{uom_descrip}</b> </div>",
239 "loadingText" : "Searching...",
243 "|beforeload" : "function (_self, o){\n o.params = o.params || {};\n // set more here\n}\n"
247 "$ sortInfo" : "{ direction : 'ASC', field: 'uom_name' }",
248 "$ xns" : "Roo.data",
252 "$ url" : "baseURL + '/Roo/uom.php'",
254 "xtype" : "HttpProxy",
255 "$ xns" : "Roo.data",
261 "xtype" : "JsonReader",
262 "$ xns" : "Roo.data",
263 "$ fields" : "[\n {\"name\":\"id\",\"type\":\"int\"},\n {\"name\":\"uom_name\",\"type\":\"string\"},\n {\"name\":\"uom_descrip\",\"type\":\"string\"},\n]",
265 "totalProperty" : "total"
273 "triggerAction" : "all",
274 "fieldLabel" : "Price UOM",
275 "forceSelection" : true,
276 "selectOnFocus" : true,
278 "displayField" : "uom_descrip",
279 "emptyText" : "Select uom",
280 "hiddenName" : "item_price_uom_id",
282 "valueField" : "uom_id",
283 "xtype" : "ComboBox",
284 "allowBlank" : false,
288 "$ xns" : "Roo.form",
289 "name" : "item_price_uom_id_uom_descrip",
290 "qtip" : "Select classcode",
292 "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{uom_descrip}</b> </div>",
293 "loadingText" : "Searching...",
297 "|beforeload" : "function (_self, o){\n o.params = o.params || {};\n // set more here\n}\n"
301 "$ sortInfo" : "{ direction : 'ASC', field: 'uom_name' }",
302 "$ xns" : "Roo.data",
306 "$ url" : "baseURL + '/Roo/uom.php'",
307 "xtype" : "HttpProxy",
309 "$ xns" : "Roo.data",
315 "xtype" : "JsonReader",
316 "$ xns" : "Roo.data",
317 "$ fields" : "[\n {\"name\":\"id\",\"type\":\"int\"},\n {\"name\":\"uom_name\",\"type\":\"string\"},\n {\"name\":\"uom_descrip\",\"type\":\"string\"},\n]",
319 "totalProperty" : "total"
326 "fieldLabel" : "Weight",
327 "xtype" : "NumberField",
328 "allowBlank" : false,
329 "allowDecimals" : true,
330 "decimalPrecision" : 2,
332 "$ xns" : "Roo.form",
333 "name" : "item_prodweight"
336 "fieldLabel" : "Item comments",
337 "xtype" : "TextArea",
339 "$ xns" : "Roo.form",
340 "name" : "item_comments",
344 "fieldLabel" : "Item sold",
346 "xtype" : "Checkbox",
349 "$ xns" : "Roo.form",
353 "fieldLabel" : "Item active",
355 "xtype" : "Checkbox",
358 "$ xns" : "Roo.form",
359 "name" : "item_active"
363 "add" : "function (combo)\n{\n Pman.Dialog.XtupleProdcat.show({prodcat_id : 0});\n}",
364 "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}"
366 "alwaysQuery" : true,
368 "triggerAction" : "all",
369 "fieldLabel" : "Product Category",
370 "forceSelection" : true,
371 "selectOnFocus" : true,
373 "displayField" : "prodcat_code",
374 "emptyText" : "Select Category",
375 "hiddenName" : "item_prodcat_id",
377 "valueField" : "prodcat_id",
378 "xtype" : "ComboBox",
379 "allowBlank" : false,
383 "$ xns" : "Roo.form",
384 "name" : "item_prodcat_id_prodcat_code",
385 "qtip" : "Select prodcat",
387 "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{prodcat_code}</b> </div>",
388 "loadingText" : "Searching...",
392 "|beforeload" : "function (_self, o){\n o.params = o.params || {};\n // set more here\n}\n"
396 "$ xns" : "Roo.data",
397 "$ sortInfo" : "{ direction : 'ASC', field: 'id' }",
401 "$ url" : "baseURL + '/Roo/prodcat.php'",
402 "xtype" : "HttpProxy",
404 "$ xns" : "Roo.data",
410 "xtype" : "JsonReader",
411 "$ xns" : "Roo.data",
412 "$ fields" : "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"prodcat_code\",\"type\":\"string\"}]",
414 "totalProperty" : "total"
421 "fieldLabel" : "Sales Account",
422 "xtype" : "DisplayField",
423 "$ xns" : "Roo.form",
424 "name" : "item_salesaccnt"
427 "fieldLabel" : "Item listprice",
428 "xtype" : "NumberField",
430 "$ xns" : "Roo.form",
431 "name" : "item_listprice"
435 "render" : "function (_self)\n{\n _this.standardCostFieldSet = _self;\n}"
437 "style" : "width:320px",
438 "xtype" : "FieldSet",
439 "legend" : "Standard Cost",
440 "$ xns" : "Roo.form",
444 "triggerAction" : "all",
445 "fieldLabel" : "Currency",
446 "forceSelection" : true,
447 "selectOnFocus" : true,
449 "displayField" : "curr_name",
450 "emptyText" : "Select Currency",
451 "hiddenName" : "item_itemcost_id_itemcost_curr_id",
453 "valueField" : "curr_id",
454 "xtype" : "ComboBox",
455 "allowBlank" : false,
459 "$ xns" : "Roo.form",
460 "name" : "curr_name",
461 "qtip" : "Select Currency",
462 "queryParam" : "query[curr_name]",
463 "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{curr_name}</b> </div>",
464 "loadingText" : "Searching...",
468 "|beforeload" : "function (_self, o){\n o.params = o.params || {};\n // set more here\n \n}\n"
472 "$ sortInfo" : "{ direction : 'ASC', field: 'curr_symbol' }",
473 "$ xns" : "Roo.data",
477 "$ url" : "baseURL + '/Roo/curr_symbol.php'",
478 "xtype" : "HttpProxy",
480 "$ xns" : "Roo.data",
486 "xtype" : "JsonReader",
487 "$ xns" : "Roo.data",
488 "$ fields" : "[{\"name\":\"curr_id\",\"type\":\"int\"},\"curr_symbol\"]",
490 "totalProperty" : "total"
497 "fieldLabel" : "Value",
498 "xtype" : "NumberField",
499 "allowBlank" : false,
501 "$ xns" : "Roo.form",
502 "name" : "item_itemcost_id_itemcost_actcost"
510 "$ xns" : "Roo.form",
514 "render" : "function (_self)\n{\n _this.itemsiteFieldSet = _self;\n}"
516 "xtype" : "FieldSet",
517 "legend" : "Itemsite Settings",
518 "$ xns" : "Roo.form",
519 "String/Object/Function style" : "width:335px;",
520 "Number labelWidth" : 120,
523 "fieldLabel" : "Reorder Level",
524 "xtype" : "NumberField",
525 "allowBlank" : false,
527 "$ xns" : "Roo.form",
528 "name" : "item_itemsite_id_itemsite_reorderlevel"
531 "fieldLabel" : "Stock Safety Level",
532 "xtype" : "NumberField",
533 "allowBlank" : false,
535 "$ xns" : "Roo.form",
536 "name" : "item_itemsite_id_itemsite_safetystock"
539 "fieldLabel" : "Lead time (Days)",
540 "xtype" : "NumberField",
541 "allowBlank" : false,
543 "$ xns" : "Roo.form",
544 "name" : "item_itemsite_id_itemsite_leadtime"
548 "triggerAction" : "all",
549 "fieldLabel" : "Control Method",
550 "displayField" : "fname",
551 "hiddenName" : "item_itemsite_id_itemsite_controlmethod",
552 "valueField" : "ftype",
553 "xtype" : "ComboBox",
554 "allowBlank" : false,
557 "$ xns" : "Roo.form",
559 "name" : "item_itemsite_id_itemsite_controlmethod_name",
560 "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{fname}</b> </div>",
563 "xtype" : "SimpleStore",
564 "$ data" : "[ \n [ 'N', \"None\"],\n [ 'R' , \"Regular\"]\n]\n",
565 "$ fields" : "[ 'ftype', 'fname']",
566 "$ xns" : "Roo.data",
573 "triggerAction" : "all",
574 "fieldLabel" : "Planner Code",
575 "forceSelection" : true,
576 "selectOnFocus" : true,
578 "displayField" : "plancode_name",
579 "emptyText" : "Select plancode",
580 "hiddenName" : "item_itemsite_id_itemsite_plancode_id",
582 "valueField" : "plancode_id",
583 "xtype" : "ComboBox",
584 "allowBlank" : false,
588 "$ xns" : "Roo.form",
589 "name" : "plancode_name",
590 "qtip" : "Select plancode",
592 "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{plancode_name}</b> </div>",
593 "loadingText" : "Searching...",
597 "|beforeload" : "function (_self, o){\n o.params = o.params || {};\n // set more here\n}\n"
601 "$ xns" : "Roo.data",
602 "$ sortInfo" : "{ direction : 'ASC', field: 'id' }",
606 "$ url" : "baseURL + '/Roo/plancode.php'",
607 "xtype" : "HttpProxy",
609 "$ xns" : "Roo.data",
615 "xtype" : "JsonReader",
616 "$ xns" : "Roo.data",
617 "$ fields" : "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"plancode_code\",\"type\":\"string\"}]",
619 "totalProperty" : "total"
627 "triggerAction" : "all",
628 "fieldLabel" : "Costcat",
629 "forceSelection" : true,
630 "selectOnFocus" : true,
632 "displayField" : "costcat_code",
633 "emptyText" : "Select costcat",
634 "hiddenName" : "item_itemsite_id_itemsite_costcat_id",
636 "valueField" : "costcat_id",
637 "xtype" : "ComboBox",
638 "allowBlank" : false,
642 "$ xns" : "Roo.form",
643 "name" : "costcat_code",
644 "qtip" : "Select costcat",
646 "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{costcat_code}</b> </div>",
647 "loadingText" : "Searching...",
651 "|beforeload" : "function (_self, o){\n o.params = o.params || {};\n // set more here\n}\n"
655 "$ xns" : "Roo.data",
656 "$ sortInfo" : "{ direction : 'ASC', field: 'id' }",
660 "$ url" : "baseURL + '/Roo/costcat.php'",
661 "xtype" : "HttpProxy",
663 "$ xns" : "Roo.data",
669 "xtype" : "JsonReader",
670 "$ xns" : "Roo.data",
671 "$ fields" : "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"costcat_code\",\"type\":\"string\"}]",
673 "totalProperty" : "total"
680 "fieldLabel" : "Active",
682 "xtype" : "Checkbox",
685 "$ xns" : "Roo.form",
686 "name" : "item_itemsite_id_itemsite_active"
689 "fieldLabel" : "Sold",
691 "xtype" : "Checkbox",
694 "$ xns" : "Roo.form",
695 "name" : "item_itemsite_id_itemsite_sold"
698 "fieldLabel" : "Stocked",
700 "xtype" : "Checkbox",
703 "$ xns" : "Roo.form",
704 "name" : "item_itemsite_id_itemsite_stocked"
707 "fieldLabel" : "Perishable",
709 "xtype" : "Checkbox",
712 "$ xns" : "Roo.form",
713 "name" : "item_itemsite_id_itemsite_perishable"
716 "fieldLabel" : "Multi Location",
718 "xtype" : "Checkbox",
721 "$ xns" : "Roo.form",
722 "name" : "item_itemsite_id_itemsite_loccntrl"
726 "triggerAction" : "all",
727 "fieldLabel" : "Default Location",
728 "forceSelection" : true,
729 "selectOnFocus" : true,
731 "displayField" : "location_name",
732 "emptyText" : "Default Location",
733 "hiddenName" : "item_itemsite_id_itemsite_location_id",
735 "valueField" : "location_id",
736 "xtype" : "ComboBox",
737 "allowBlank" : false,
741 "$ xns" : "Roo.form",
742 "name" : "location_name",
743 "qtip" : "Select terms",
744 "queryParam" : "query[location_name]",
745 "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{location_name}</b> </div>",
746 "loadingText" : "Searching...",
750 "|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"
754 "$ sortInfo" : "{ direction : 'ASC', field: 'location_name' }",
755 "$ xns" : "Roo.data",
759 "$ url" : "baseURL + '/Roo/location.php'",
761 "xtype" : "HttpProxy",
762 "$ xns" : "Roo.data",
766 "id" : "location_id",
768 "xtype" : "JsonReader",
769 "$ fields" : "[{\"name\":\"location_id\",\"type\":\"int\"},\"location_name\"]",
770 "$ xns" : "Roo.data",
772 "totalProperty" : "total"
784 "$ xns" : "Roo.form",
794 "|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}"
799 "title" : "Item Parts",
800 "xtype" : "GridPanel",
801 "fitContainer" : true,
803 "tableName" : "bomitem",
807 "beforeedit" : "function (e)\n{\n if(e.field != 'bomitem_qtyper'){\n return false;\n }\n \n}",
808 "|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}",
809 "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}"
811 "autoExpandColumn" : "bomitem_item_id_item_descrip1",
812 "xtype" : "EditorGrid",
815 "$ xns" : "Roo.grid",
821 "* prop" : "toolbar",
825 "render" : "function (_self)\n{\n _this.partsBox = _self;\n}",
826 "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}"
828 "alwaysQuery" : true,
829 "triggerAction" : "all",
830 "fieldLabel" : "Item",
831 "forceSelection" : true,
832 "selectOnFocus" : true,
834 "displayField" : "item_number",
835 "emptyText" : "Select item",
838 "xtype" : "ComboBox",
843 "$ xns" : "Roo.bootstrap",
844 "qtip" : "Select item",
845 "queryParam" : "query[number_or_name]",
846 "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{item_number}</b> </div>",
847 "loadingText" : "Searching...",
851 "|beforeload" : "function (_self, o){\n o.params = o.params || {};\n \n o.params.item_active = 1;\n o.params['!item_type'] = 'K';\n}\n"
855 "$ sortInfo" : "{ direction : 'ASC', field: 'item_number' }",
856 "$ xns" : "Roo.data",
860 "$ url" : "baseURL + '/Roo/item.php'",
862 "xtype" : "HttpProxy",
863 "$ xns" : "Roo.data",
869 "xtype" : "JsonReader",
870 "$ fields" : "[\n {\"name\":\"id\",\"type\":\"int\"},\n {\"name\":\"item_number\",\"type\":\"string\"}\n]",
871 "$ xns" : "Roo.data",
873 "totalProperty" : "total"
881 "$ xns" : "Roo.Toolbar"
885 "|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}"
889 "cls" : "x-btn-text-icon",
890 "$ icon" : "rootURL + '/Pman/templates/images/trash.gif'",
897 "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}"
901 "$ sortInfo" : "{ field : 'bomitem_item_id_item_name', direction: 'ASC' }",
902 "$ xns" : "Roo.data",
903 "* prop" : "dataSource",
906 "$ url" : "baseURL + '/Roo/bomitem.php'",
907 "xtype" : "HttpProxy",
909 "$ xns" : "Roo.data",
915 "xtype" : "JsonReader",
916 "$ fields" : "[\n {\n 'name': 'bomitem_id',\n 'type': 'int'\n }\n]",
917 "$ xns" : "Roo.data",
919 "totalProperty" : "total"
925 "xtype" : "PagingToolbar",
926 "emptyMsg" : "Nothing found",
928 "displayMsg" : "Displaying parts {0} - {1} of {2}",
929 "displayInfo" : true,
933 "xtype" : "ColumnModel",
936 "$ renderer" : "function(v) { return String.format('{0}', v); }",
937 "$ xns" : "Roo.grid",
938 "* prop" : "colModel[]",
939 "dataIndex" : "bomitem_item_id_item_number"
942 "xtype" : "ColumnModel",
943 "header" : "Description",
945 "$ renderer" : "function(v) { return String.format('{0}', v); }",
946 "$ xns" : "Roo.grid",
947 "* prop" : "colModel[]",
948 "dataIndex" : "bomitem_item_id_item_descrip1"
951 "xtype" : "ColumnModel",
952 "String align" : "right",
955 "$ renderer" : "function(v) { return String.format('{0}', v); }",
956 "$ xns" : "Roo.grid",
957 "* prop" : "colModel[]",
958 "dataIndex" : "bomitem_qtyper",
961 "xtype" : "GridEditor",
962 "$ xns" : "Roo.grid",
966 "Boolean allowBlank" : false,
967 "String cls" : "align-right",
968 "xtype" : "NumberField",
969 "Number decimalPrecision" : 0,
970 "$ xns" : "Roo.form",
972 "Number minValue" : 0
984 "|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}"
989 "title" : "Reference Files",
990 "xtype" : "GridPanel",
991 "fitContainer" : true,
993 "tableName" : "Images",
997 "|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}",
998 "|render" : "function() { \n _this.grid = this; \n\n if (_this.panel.active) {\n this.footer.onClick('first');\n }\n}"
1000 "autoExpandColumn" : "id",
1003 "$ xns" : "Roo.grid",
1008 "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}"
1011 "remoteSort" : true,
1012 "$ sortInfo" : "{ field: 'created' , direction: 'DESC' }",
1013 "$ xns" : "Roo.data",
1014 "* prop" : "dataSource",
1019 "xtype" : "JsonReader",
1020 "$ 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]",
1021 "$ xns" : "Roo.data",
1022 "* prop" : "reader",
1023 "totalProperty" : "total"
1026 "$ url" : "baseURL + '/Roo/Images.php'",
1027 "xtype" : "HttpProxy",
1029 "$ xns" : "Roo.data",
1036 "xtype" : "PagingToolbar",
1037 "emptyMsg" : "No Images found",
1039 "displayInfo" : true,
1040 "displayMsg" : "Displaying Images {0} - {1} of {2}",
1044 "xtype" : "Toolbar",
1046 "* prop" : "toolbar",
1050 "|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} "
1054 "cls" : "x-btn-text-icon",
1055 "$ icon" : "Roo.rootURL + 'images/default/dd/drop-add.gif'",
1056 "$ xns" : "Roo.Toolbar"
1060 "|click" : "function()\n{\n Pman.genericDelete(_this, 'Images'); \n}\n "
1064 "cls" : "x-btn-text-icon",
1065 "$ icon" : "rootURL + '/Pman/templates/images/trash.gif'",
1066 "$ xns" : "Roo.Toolbar"
1071 "xtype" : "ColumnModel",
1073 "header" : "Created",
1075 "$ 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 ",
1076 "$ xns" : "Roo.grid",
1077 "* prop" : "colModel[]",
1078 "dataIndex" : "created"
1081 "xtype" : "ColumnModel",
1084 "$ renderer" : "function(v,x,r) { return String.format('<img src=\"{0}/Images/Thumb/100/{1}/{2}\" height=\"100\">', baseURL, v, r.data.filename); }",
1085 "$ xns" : "Roo.grid",
1086 "* prop" : "colModel[]",
1095 "|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}"
1097 "region" : "center",
1098 "fitToframe" : true,
1099 "background" : true,
1100 "title" : "Price List",
1101 "xtype" : "GridPanel",
1102 "fitContainer" : true,
1104 "tableName" : "ipshead",
1108 "beforeedit" : "function (e)\n{\n if(e.field != 'ipshead_ipsitem_price'){\n return false;\n }\n \n}",
1109 "|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}",
1110 "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}"
1112 "autoExpandColumn" : "ipshead_descrip",
1113 "xtype" : "EditorGrid",
1116 "$ xns" : "Roo.grid",
1121 "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}"
1124 "remoteSort" : true,
1125 "$ sortInfo" : "{ field : 'ipshead_id', direction: 'ASC' }",
1126 "$ xns" : "Roo.data",
1127 "* prop" : "dataSource",
1130 "$ url" : "baseURL + '/Roo/ipshead.php'",
1132 "xtype" : "HttpProxy",
1133 "$ xns" : "Roo.data",
1137 "id" : "ipshead_id",
1139 "xtype" : "JsonReader",
1140 "$ fields" : "[\n {\n 'name': 'ipshead_id',\n 'type': 'int'\n },\n {\n 'name': 'ipshead_name',\n 'type': 'string'\n }\n]",
1141 "$ xns" : "Roo.data",
1142 "* prop" : "reader",
1143 "totalProperty" : "total"
1149 "xtype" : "PagingToolbar",
1150 "emptyMsg" : "Nothing found",
1152 "displayMsg" : "Displaying records {0} - {1} of {2}",
1153 "displayInfo" : true,
1157 "xtype" : "ColumnModel",
1160 "$ renderer" : "function(v) { return String.format('{0}', v); }",
1161 "$ xns" : "Roo.grid",
1162 "* prop" : "colModel[]",
1163 "dataIndex" : "ipshead_name"
1166 "xtype" : "ColumnModel",
1168 "header" : "Description",
1169 "$ renderer" : "function(v) { return String.format('{0}', v); }",
1170 "$ xns" : "Roo.grid",
1171 "* prop" : "colModel[]",
1172 "dataIndex" : "ipshead_descrip"
1175 "xtype" : "ColumnModel",
1177 "header" : "Currency",
1178 "$ renderer" : "function(v) { return String.format('{0}', v); }",
1179 "$ xns" : "Roo.grid",
1180 "* prop" : "colModel[]",
1181 "dataIndex" : "ipshead_curr_id_curr_name"
1185 "xtype" : "ColumnModel",
1188 "$ renderer" : "function(v) { return String.format('{0}', Roo.util.Format.number(v*1,2)); }",
1189 "$ xns" : "Roo.grid",
1190 "* prop" : "colModel[]",
1191 "dataIndex" : "ipshead_ipsitem_price",
1194 "xtype" : "GridEditor",
1195 "$ xns" : "Roo.grid",
1196 "* prop" : "editor",
1199 "xtype" : "NumberField",
1200 "cls" : "align-right",
1201 "decimalPrecision" : 2,
1202 "$ xns" : "Roo.form",
1215 "|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}"
1217 "region" : "center",
1218 "fitToframe" : true,
1219 "background" : true,
1220 "title" : "Suppliers",
1221 "xtype" : "GridPanel",
1222 "fitContainer" : true,
1224 "tableName" : "itemsrc",
1228 "|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",
1229 "|render" : "function() \n{\n _this.itemsrcgrid = this; \n \n if (_this.itemsrcpanel.active) {\n this.footer.onClick('first');\n }\n}",
1230 "afteredit" : "function (e)\n{\n e.record.commit();\n}"
1232 "autoExpandColumn" : "itemsrc_comments",
1233 "xtype" : "EditorGrid",
1236 "$ xns" : "Roo.grid",
1241 "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}",
1242 "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}"
1245 "remoteSort" : true,
1246 "$ sortInfo" : "{ field : 'itemsrc_vend_id_vend_name', direction: 'ASC' }",
1247 "$ xns" : "Roo.data",
1248 "* prop" : "dataSource",
1251 "$ url" : "baseURL + '/Roo/itemsrc.php'",
1252 "xtype" : "HttpProxy",
1254 "$ xns" : "Roo.data",
1260 "xtype" : "JsonReader",
1261 "$ xns" : "Roo.data",
1262 "$ 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]",
1263 "* prop" : "reader",
1264 "totalProperty" : "total"
1270 "xtype" : "PagingToolbar",
1271 "emptyMsg" : "No itemsrc found",
1273 "displayInfo" : true,
1274 "displayMsg" : "Displaying itemsrc{0} - {1} of {2}",
1278 "xtype" : "Toolbar",
1280 "* prop" : "toolbar",
1284 "|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"
1288 "cls" : "x-btn-text-icon",
1289 "$ icon" : "Roo.rootURL + 'images/default/dd/drop-add.gif'",
1290 "$ xns" : "Roo.Toolbar"
1295 "xtype" : "ColumnModel",
1297 "header" : "Vendor",
1298 "$ renderer" : "function(v,x,r) { return String.format('{0}', r.data.itemsrc_vend_id_vend_name); }",
1299 "$ xns" : "Roo.grid",
1300 "* prop" : "colModel[]",
1301 "dataIndex" : "itemsrc_vend_id",
1304 "xtype" : "GridEditor",
1305 "$ xns" : "Roo.grid",
1306 "* prop" : "editor",
1310 "triggerAction" : "all",
1311 "forceSelection" : true,
1312 "selectOnFocus" : true,
1314 "displayField" : "vend_name",
1315 "emptyText" : "Select Vendor",
1316 "hiddenName" : "itemsrc_vend_id",
1318 "valueField" : "vend_id",
1319 "xtype" : "ComboBox",
1320 "allowBlank" : false,
1324 "$ xns" : "Roo.form",
1326 "name" : "itemsrc_vend_id_vend_name",
1327 "qtip" : "Select vendinfo",
1328 "queryParam" : "q[search]",
1329 "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{vend_name}</b> </div>",
1330 "loadingText" : "Searching...",
1334 "|beforeload" : "function (_self, o){\n o.params = o.params || {};\n // set more here\n}\n"
1337 "remoteSort" : true,
1338 "$ xns" : "Roo.data",
1339 "$ sortInfo" : "{ direction : 'ASC', field: 'id' }",
1343 "$ url" : "baseURL + '/Roo/vendinfo.php'",
1344 "xtype" : "HttpProxy",
1346 "$ xns" : "Roo.data",
1352 "xtype" : "JsonReader",
1353 "$ xns" : "Roo.data",
1354 "$ fields" : "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"vend_name\",\"type\":\"string\"}]",
1355 "* prop" : "reader",
1356 "totalProperty" : "total"
1367 "xtype" : "ColumnModel",
1369 "header" : "Vendor Ref#",
1370 "$ renderer" : "function(v) { return String.format('{0}', v); }",
1371 "$ xns" : "Roo.grid",
1372 "* prop" : "colModel[]",
1373 "dataIndex" : "itemsrc_vend_item_number",
1376 "xtype" : "GridEditor",
1377 "$ xns" : "Roo.grid",
1378 "* prop" : "editor",
1381 "xtype" : "TextField",
1382 "$ xns" : "Roo.form",
1390 "xtype" : "ColumnModel",
1392 "header" : "Comments",
1393 "$ renderer" : "function(v) { return String.format('{0}', v); }",
1394 "$ xns" : "Roo.grid",
1395 "* prop" : "colModel[]",
1396 "dataIndex" : "itemsrc_comments",
1399 "xtype" : "GridEditor",
1400 "$ xns" : "Roo.grid",
1401 "* prop" : "editor",
1404 "xtype" : "TextField",
1405 "$ xns" : "Roo.form",
1413 "xtype" : "ColumnModel",
1416 "$ renderer" : "function(v) { return String.format('{0}', v); }",
1417 "$ xns" : "Roo.grid",
1418 "* prop" : "colModel[]",
1419 "dataIndex" : "itemsrc_vend_uom"
1423 "xtype" : "ColumnModel",
1424 "header" : "Min Qty",
1426 "$ renderer" : "function(v) { return String.format('{0}', v); }",
1427 "$ xns" : "Roo.grid",
1428 "* prop" : "colModel[]",
1429 "dataIndex" : "itemsrc_minordqty",
1432 "xtype" : "GridEditor",
1433 "$ xns" : "Roo.grid",
1434 "* prop" : "editor",
1438 "xtype" : "NumberField",
1439 "decimalPrecision" : 0,
1440 "$ xns" : "Roo.form",
1449 "xtype" : "ColumnModel",
1450 "header" : "Lead time",
1452 "$ renderer" : "function(v) { return String.format('{0}', v); }",
1453 "$ xns" : "Roo.grid",
1454 "* prop" : "colModel[]",
1455 "dataIndex" : "itemsrc_leadtime",
1458 "xtype" : "GridEditor",
1459 "$ xns" : "Roo.grid",
1460 "* prop" : "editor",
1464 "xtype" : "NumberField",
1465 "decimalPrecision" : 0,
1466 "$ xns" : "Roo.form",
1474 "xtype" : "ColumnModel",
1476 "header" : "Active",
1477 "$ renderer" : "function(v) { return String.format('{0}', v); }",
1478 "$ xns" : "Roo.grid",
1479 "* prop" : "colModel[]",
1480 "dataIndex" : "itemsrc_active"
1488 "|activate" : "function() {\n _this.hpanel = this;\n if (_this.hgrid) {\n _this.hgrid.footer.onClick('first');\n }\n}"
1490 "region" : "center",
1491 "fitToframe" : true,
1492 "background" : true,
1493 "title" : "History",
1494 "xtype" : "GridPanel",
1495 "fitContainer" : true,
1497 "tableName" : "events",
1501 "|render" : "function() \n{\n _this.hgrid = this; \n if (_this.hpanel.active) {\n this.footer.onClick('first');\n }\n}"
1503 "autoExpandColumn" : "remarks",
1506 "$ xns" : "Roo.grid",
1511 "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}"
1514 "remoteSort" : true,
1515 "$ sortInfo" : "{ field : 'event_when', direction: 'DESC' }",
1516 "$ xns" : "Roo.data",
1517 "* prop" : "dataSource",
1520 "$ url" : "baseURL + '/Roo/events.php'",
1522 "xtype" : "HttpProxy",
1523 "$ xns" : "Roo.data",
1529 "xtype" : "JsonReader",
1530 "$ 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]",
1531 "$ xns" : "Roo.data",
1532 "* prop" : "reader",
1533 "totalProperty" : "total"
1539 "xtype" : "PagingToolbar",
1540 "emptyMsg" : "No Events found",
1542 "displayMsg" : "Displaying events{0} - {1} of {2}",
1543 "displayInfo" : true,
1547 "xtype" : "ColumnModel",
1549 "header" : "Changed",
1550 "$ renderer" : "function(v) { return String.format('{0}', v ? v.format('d/M/Y H:i:s') : ''); }",
1551 "$ xns" : "Roo.grid",
1552 "* prop" : "colModel[]",
1553 "dataIndex" : "event_when"
1556 "xtype" : "ColumnModel",
1558 "header" : "Action",
1559 "$ renderer" : "function(v,x,r) { return String.format('{0} - {1}', v, r.data.on_table); }",
1560 "$ xns" : "Roo.grid",
1561 "* prop" : "colModel[]",
1562 "dataIndex" : "action"
1565 "xtype" : "ColumnModel",
1567 "header" : "IP Address",
1568 "$ renderer" : "function(v) { return String.format('{0}', v); }",
1569 "$ xns" : "Roo.grid",
1570 "* prop" : "colModel[]",
1571 "dataIndex" : "ipaddr"
1574 "xtype" : "ColumnModel",
1577 "$ renderer" : "function(v) { return String.format('{0}', v); }",
1578 "$ xns" : "Roo.grid",
1579 "* prop" : "colModel[]",
1580 "dataIndex" : "person_id_name"
1583 "xtype" : "ColumnModel",
1586 "$ renderer" : "function(v) { return String.format('{0}', v); }",
1587 "$ xns" : "Roo.grid",
1588 "* prop" : "colModel[]",
1589 "dataIndex" : "remarks"
1597 "click" : "function (_self, e)\n{\n _this.dialog.hide();\n}"
1602 "* prop" : "buttons[]"
1606 "render" : "function (_self)\n{\n _this.saveBtn = this;\n}",
1607 "click" : "function (_self, e)\n{\n // do some checks?\n \n \n // _this.dialog.el.mask(\"Saving\");\n _this.form.doAction(\"submit\");\n\n}"
1612 "* prop" : "buttons[]"